:root {
    --bg: #f4f7fb;
    --bg-alt: #eef3f8;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --border: #dbe4ee;
    --border-strong: #c7d3e0;

    --text: #102032;
    --muted: #62748a;

    /* Sabres gold */
    --accent: #d8a200;
    --accent-soft: #fff5d0;

    /* Royal / cobalt blue */
    --link: #1f5fd6;
    --brand-blue: #1f5fd6;
    --brand-blue-soft: #e8f0ff;

    --shadow: 0 10px 28px rgba(16, 32, 50, 0.06);
    --radius: 18px;
    --container: 1260px;
    
    /* Neutral Gray */
    --neutral: #EEE;
    --neutral-dark: #DDD;
    --neutral-text: #666;
}

body.theme-dark {
    --bg: #0f0f10;
    --bg-alt: #17181b;
    --panel: #18191c;
    --panel-soft: #202226;
    --border: #2b2e34;
    --border-strong: #3a3e46;

    --text: #f3f4f6;
    --muted: #a7adb8;

    /* replace yellow accents with light gray / white */
    --accent: #d9dde3;
    --accent-soft: #2a2d33;

    /* replace blue with red */
    --link: #c62828;
    --brand-blue: #c62828;
    --brand-blue-soft: #351717;
    
    /**
       
    --accent: #d9dde3;
    --accent-soft: #2a2d33;

    --link: #c62828;
    --brand-blue: #c62828;
    --brand-blue-soft: #351717;
    
    **/
    /* Neutral Gray */
    --neutral: #222;
    --neutral-dark: #777;
    --neutral-text: #DDD;
    
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.site-logo {
    display: inline-flex;
    align-items: center;
}

.site-branding {
    min-width: 0;
}

.site-logo img {
    height: 48px;
    width: auto;
}

.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

body.theme-dark .logo-light {
    display: none;
}

body.theme-dark .logo-dark {
    display: block;
}

body.theme-dark .site-header {
    background: rgba(18, 18, 20, 0.92);
    border-bottom-color: var(--border);
}

body.theme-dark .site-footer {
    background: rgba(18, 18, 20, 0.92);
    border-top-color: var(--border);
}

body.theme-dark .site-main {
    background: #111;
}

body.theme-dark .main-nav {
    background: var(--brand-blue);
}

body.theme-dark .main-nav a {
    color: #fff;
}

body.theme-dark .main-nav a:hover,
body.theme-dark .main-nav a.is-active {
    background: rgba(255, 255, 255, 0.14);
}

body.theme-dark .news-text a,
body.theme-dark .news-list a {
    color: var(--text);
}

body.theme-dark .status-pill {
    background: #2c2f36;
    border-color: #444952;
    color: #f0f2f5;
}

body.theme-dark .status-pill-muted {
    background: #23262c;
    border-color: #3c414a;
    color: #d3d7de;
}

body.theme-dark .chip {
    background: #25282e;
    border-color: #383d46;
    color: var(--text);
}

body.theme-dark .chip-sabres {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}

body.theme-dark .goal-flag {
    background: rgba(255,255,255,0.12);
}

body.theme-dark .buffalo-summary-panel,
body.theme-dark .hero-grid .hero-card {
    background: linear-gradient(180deg, #18191c 0%, #202226 100%);
}

body.theme-dark .mini-result-win {
    background: var(--panel-soft);
}

body.theme-dark .mini-result-loss {
    background: var(--panel-soft);
}

body.theme-dark .stats-table thead th {
    background: none;
}

body.theme-dark .stats-table tbody tr:nth-child(even) {
    background: #111111;
}

body.theme-dark .standings-mini-table thead th,
body.theme-dark .standings-table thead th {
    background: none;
}

body.theme-dark {
    transition:
        background-color 0.1s ease,
        color 0.1s ease,
        border-color 0.1s ease,
        box-shadow 0.1s ease;
}

body.theme-dark .schedule-result-win {
    background: var(--panel-soft);
}

body.theme-dark .schedule-result-loss {
    background: var(--panel-soft);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html,
body,
.panel,
.hero-card,
.main-nav a,
.mini-tab,
.chip,
.status-pill,
.promo-box,
.standings-table th,
.standings-table td,
.standings-mini-table th,
.standings-mini-table td,
.stats-table th,
.stats-table td {
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

body {
    background: linear-gradient(180deg, #f8fbff 0%, #eef3f8 100%);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    background: var(--panel-soft);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 0;
}

.site-branding {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-logo {
    display: inline-block;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}

.site-logo-main {
    color: var(--brand-blue);
}

.site-logo-accent {
    color: var(--accent);
}

.site-logo-dotcom {
    color: #8b99aa;
    font-size: 0.7em;
    margin-left: 2px;
}

.site-tagline {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    display: none;
}

/* ---------------------------
   Main Navigation
--------------------------- */

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-blue);
    padding: 6px;
    border-radius: 10px;
}

/* Nav links */

.main-nav a {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    color: #ffffff;
    border-radius: 8px;
    transition: background 160ms ease, transform 120ms ease;
}

/* Hover */

.main-nav a:hover {
    background: rgba(255,255,255,0.15);
}

/* Active page */

.main-nav a.is-active {
    background: rgba(255,255,255,0.22);
}

/* Optional subtle press effect */

.main-nav a:active {
    transform: translateY(1px);
}

.site-main {
    padding: 26px 0 46px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: stretch;
}

.hero-grid .hero-card {
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #f9fbff 100%
    );
}

.hero-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 22px;
}

.hero-card:hover,
.panel:hover {
    transform: translateY(-2px);
    transition: 0.2s ease;
}

.hero-card-wide {
    padding: 24px;
}

.hero-card h1,
.hero-card h2,
.panel h3 {
    margin-top: 4px;
    margin-bottom: 14px;
    line-height: 1.15;
}

.hero-card h1 {
    font-size: 2rem;
}

.hero-card h2,
.panel h3 {
    font-size: 1.2rem;
}

.section-kicker {
    display: inline-block;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.74rem;
    font-weight: 700;
}

.mini-stat-grid {
    display: grid;
    gap: 12px;
}

.mini-stat-grid.six-up {
    grid-template-columns: repeat(6, 1fr);
}

.mini-stat-box {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
}

.mini-stat-box span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mini-stat-box strong {
    display: block;
    margin-top: 6px;
    font-size: 1.35rem;
}

.stacked-stat-list {
    display: grid;
    gap: 12px;
}

.stacked-stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 14px;
    padding: 13px 14px;
}

.stacked-stat-item span {
    color: var(--muted);
    font-weight: 600;
}

.stacked-stat-item strong {
    font-size: 1.25rem;
}

.leader-list {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.leader-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 14px;
    padding: 13px 14px;
}

.leader-label {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}

.leader-item strong {
    display: block;
}

.leader-item em {
    font-style: normal;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
}

.content-section {
    margin-bottom: 30px;
}

.section-heading {
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: 1.8rem;
}

.main-content-grid {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr);
    gap: 18px;
    align-items: start;
}

.main-column,
.sidebar-column {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.two-card-grid {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.panel {
    padding: 22px;
}

.panel p {
    color: var(--muted);
    margin: 0;
}

.panel-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.matchup {
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 6px;
}

.meta-line {
    color: var(--muted);
    font-size: 0.75rem;
    margin-bottom: 3px;
}

.status-pill {
    display: inline-block;
    background: var(--accent-soft);
    border: 1px solid #efd77f;
    color: #8a6600;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill-muted {
    background: #f2f5f8;
    border-color: var(--border-strong);
    color: #617182;
}

.subsection-title {
    margin-top: 16px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.subsection-title.centered {
    text-align: center;
}

.news-list,
.schedule-list,
.compact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.schedule-list {
    margin-top: 30px;
}

.news-list li,
.schedule-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.news-list li:last-child,
.schedule-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.news-list li:first-child,
.schedule-list li:first-child {
    padding-top: 0;
}

.news-list a {
    display: block;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.news-list span,
.schedule-list span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Schedule layout */
.schedule-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.schedule-left {
    flex: 1 1 auto;
    min-width: 0;
}

.schedule-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 4px;
    min-width: 170px;
}

.schedule-right em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.9rem;
}

.schedule-venue {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.3;
}

.compact-list li {
    margin-bottom: 8px;
    color: var(--text);
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-block;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.9rem;
}

/* Sabres goal chip */

.chip-sabres {
    background: var(--brand-blue);
    color: #ffffff;
    border-color: var(--brand-blue);
}

.text-link {
    color: var(--brand-blue);
    font-weight: 700;
}

.promo-stack {
    display: grid;
    gap: 12px;
}

.promo-box {
    border: 1px dashed var(--border-strong);
    background: var(--panel-soft);
    border-radius: 14px;
    padding: 16px;
    color: var(--muted);
}

.split-section-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 18px;
}

.three-column-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
}

.footer-text {
    color: var(--muted);
    font-size: 0.95rem;
}

/* --------------------------------
   Team Logos
-------------------------------- */

.team-logo {
    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.team-logo-sm {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
}

.matchup-with-logos {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.matchup-team {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    line-height: 1;
}

.matchup-separator {
    color: var(--muted);
    font-weight: 700;
    line-height: 1;
}

.matchup-team .team-logo {
    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.team-score {
    margin-left: 4px;
    font-size: 1.15rem;
}

.schedule-matchup {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.schedule-team {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.schedule-separator {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.schedule-team .team-logo.team-logo-sm {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* --------------------------------
   Leader Photos
-------------------------------- */

.leader-item-photo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.leader-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.player-headshot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    background: #fff;
    flex-shrink: 0;
}

.player-headshot-placeholder {
    background: linear-gradient(180deg, #f3f6fa 0%, #e7edf5 100%);
}

/* --------------------------------
   Last Game Goalie Stats
-------------------------------- */

.goalie-game-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 8px;
}

.goalie-game-column {
    display: grid;
    gap: 10px;
}

.goalie-game-team-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.goalie-game-card {
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 14px;
    padding: 12px;
}

.goalie-game-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.goalie-game-name {
    font-weight: 700;
    line-height: 1.2;
}

.goalie-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.goalie-mini-stats div {
    border: 1px solid var(--border);
    background: var(panel-soft);
    border-radius: 10px;
    padding: 8px 6px;
    text-align: center;
}

.goalie-mini-stats span {
    display: block;
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.goalie-mini-stats strong {
    display: block;
    margin-top: 4px;
    font-size: 0.95rem;
}

@media (max-width: 700px) {
    .goalie-game-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .mini-stat-grid.six-up {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-content-grid,
    .split-section-grid,
    .three-column-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .two-card-grid {
        grid-template-columns: 1fr;
    }

    .schedule-list li {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .schedule-left {
        flex: 1 1 55%;
        min-width: 0;
    }

    .schedule-right {
        flex: 0 0 45%;
        min-width: 0;
        align-items: flex-end;
        text-align: right;
    }

    .schedule-right em,
    .schedule-venue {
        font-size: 0.70rem !important;
        line-height: 1.25;
    }
}

@media (max-width: 700px) {
    .container {
        width: min(var(--container), calc(100% - 22px));
    }

    .header-inner,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-logo {
        font-size: 1.7rem;
    }

    .mini-stat-grid.six-up {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-card,
    .panel {
        padding: 18px;
    }

    .section-heading h2 {
        font-size: 1.5rem;
    }

    .matchup {
        font-size: 1.2rem;
    }

    .panel-header-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .panel-header-row h3 {
        margin: 0;
        font-size: 1rem;
        line-height: 1.15;
        min-width: 0;
        flex: 1 1 auto;
    }

    .panel-header-row .status-pill,
    .panel-header-row .mini-tabs {
        flex-shrink: 0;
    }

    .panel-header-row .mini-tabs {
        margin: 0;
        justify-content: flex-end;
        gap: 4px;
    }

    .panel-header-row .mini-tab {
        padding: 5px 9px;
        font-size: 0.75rem;
    }

    .panel-header-row .status-pill {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    
    .stacked-stat-list-compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .panel-header-row h3 {
        font-size: 0.92rem;
    }

    .panel-header-row .mini-tab {
        padding: 4px 7px;
        font-size: 0.7rem;
    }

    .panel-header-row .status-pill {
        padding: 4px 7px;
        font-size: 0.66rem;
    }

    .schedule-right em,
    .schedule-venue {
        font-size: 0.72rem;
    }

    .schedule-team span,
    .schedule-score {
        font-size: 0.85rem;
    }
}

.hero-subsection {
    margin-top: 18px;
    margin-bottom: 20px;
}

.stacked-stat-list-compact {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mini-tabs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 10px 0 14px;
}

.mini-tab {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.mini-tab:hover {
    background: var(--brand-blue-soft);
    border-color: var(--brand-blue);
}

.mini-tab.is-active {
    background: var(--brand-blue-soft);
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.mini-tab-panel {
    display: none;
}

.mini-tab-panel.is-active {
    display: block;
}

.goalie-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--panel-soft);
    border: 1px solid var(--border);
}

.panel,
.hero-card,
.main-column,
.sidebar-column {
    min-width: 0;
}

/* --------------------------------
   Last Game Scoring Events
-------------------------------- */

.goal-event-list {
    display: grid;
    gap: 10px;
}

.goal-event {
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 14px;
    overflow: hidden;
}

.goal-event-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
}

.goal-event-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.goal-event-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.goal-expand-label {
    font-weight: 700;
    color: var(--brand-blue);
}

.goal-event-details {
    display: none;
    padding: 0 12px 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.goal-event-details.is-open {
    display: block;
}

.goal-event-gwg {
    font-weight: 600;
}

.goal-flag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(255,255,255,0.18);
    color: inherit;
}

/* --------------------------------
   Penalty Pills (ultra-compact) + CSS tooltip
-------------------------------- */

.penalty-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.penalty-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.85rem;
    line-height: 1.1;
    color: var(--text);
    white-space: nowrap;
    cursor: help;
    outline: none;
}

.penalty-pill-sabres {
    color: #FFF;
    border: 0px;
    border-color: var(--brand-blue-soft);
    background: var(--brand-blue);
}

.penalty-pill:focus {
    box-shadow: 0 0 0 3px rgba(31, 95, 214, 0.25);
    border-color: rgba(31, 95, 214, 0.6);
}

/* Tooltip bubble */
.penalty-pill::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(6px);
    width: max-content;
    max-width: 320px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(16, 32, 50, 0.96);
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.25;
    white-space: normal;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
    z-index: 50;
}

/* Tooltip arrow */
.penalty-pill::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%) translateY(6px);
    width: 10px;
    height: 10px;
    background: rgba(16, 32, 50, 0.96);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    transform: translateX(-50%) rotate(45deg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
    z-index: 49;
}

/* Show tooltip on hover or focus */
.penalty-pill:hover::after,
.penalty-pill:focus::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.penalty-pill:hover::before,
.penalty-pill:focus::before {
    opacity: 1;
}

/* On small screens, make tooltip a bit wider and avoid off-screen */
@media (max-width: 700px) {
    .penalty-pill::after {
        max-width: 260px;
    }
}

/* --------------------------------
   Last Game: Game Stats table
-------------------------------- */

.game-stats-table {
    display: grid;
    gap: 8px;
}

.game-stats-head,
.game-stats-row {
    display: grid;
    grid-template-columns: 0.85fr 1.3fr 0.85fr;
    gap: 10px;
    align-items: center;
}

.game-stats-head {
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 12px;
}

.game-stats-team {
    text-align: center;
    font-weight: 600;
    color: var(--text);
}

.game-stats-row {
    padding: 10px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 12px;
}

.game-stats-label {
    text-align: center;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
}

.game-stats-val {
    font-weight: 600;
}

.game-stats-val-away {
    text-align: left;
}

.game-stats-val-home {
    text-align: right;
}

.shootout-section {
    margin-top: 16px;
}

.goal-event-toggle-static {
    cursor: default;
}

/* --------------------------------
   Centered matchup layout
-------------------------------- */

.matchup-centered {
    justify-content: center;
    text-align: center;
    gap: 18px;
}

.matchup-team-stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 72px;
}

.matchup-team-stacked span {
    font-weight: 600;
    line-height: 1;
}

.matchup-separator-centered {
    align-self: center;
    font-size: 1.1rem;
    margin-top: 6px;
}

.team-logo-lg {
    width: 74px !important;
    height: 74px !important;
    max-width: 74px !important;
    max-height: 74px !important;
    object-fit: contain;
}

.meta-line-centered {
    text-align: center;
}

.matchup-scoreline .team-score {
    margin-left: 0;
    font-size: 1.15rem;
    line-height: 1;
}

/* --------------------------------
   Stats Page
-------------------------------- */

.stats-intro {
    margin: 0;
}

.stats-table-panel {
    overflow: hidden;
}

.stats-table-wrap {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.stats-table th,
.stats-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    text-align: left;
    white-space: nowrap;
}

.stats-table thead th {
    background: #fff;
    color: var(--text);
    font-weight: 800;
    position: sticky;
    top: 0;
    z-index: 1;
}

.stats-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.55);
}

.stats-table tbody tr:hover {
    background: var(--brand-blue-soft);
}

.stats-table th.is-sortable {
    cursor: pointer;
    user-select: none;
}

.stats-table th.is-sortable:hover {
    color: var(--brand-blue);
}

.stats-table th[data-sort-direction="asc"]::after {
    content: " ▲";
    font-size: 0.72rem;
    color: var(--brand-blue);
}

.stats-table th[data-sort-direction="desc"]::after {
    content: " ▼";
    font-size: 0.72rem;
    color: var(--brand-blue);
}

.stats-player-cell {
    width: 62px;
}

.stats-headshot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    background: #fff;
    display: block;
}

.stats-headshot-placeholder {
    background: linear-gradient(180deg, #f3f6fa 0%, #e7edf5 100%);
}

.stats-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.stats-number {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

@media (max-width: 700px) {
    .stats-table {
        min-width: 900px;
    }

    .stats-headshot {
        width: 36px;
        height: 36px;
    }
}

.hero-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hero-card-link-row {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.hero-card-link-row.schedule-link-row {
    margin-top: 20px;
}

.hero-card-link {
    font-weight: 700;
}

.news-list-with-images {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.news-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.news-thumb {
    width: 88px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
    background: var(--panel-soft);
}

.news-text {
    min-width: 0;
}

.news-text a {
    display: block;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.news-text span {
    color: var(--muted);
    font-size: 0.9rem;
}

/* --------------------------------
   Compact recent results
-------------------------------- */

.mini-results-list {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

.mini-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 12px;
    font-size: 0.88rem;
}

.mini-result-matchup {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.mini-result-side {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.mini-result-away {
    justify-content: flex-end;
    text-align: right;
}

.mini-result-home {
    justify-content: flex-start;
    text-align: left;
}

.mini-result-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.mini-result-team {
    font-weight: 700;
    line-height: 1;
}

.mini-result-score {
    font-size: 0.95rem;
    line-height: 1;
}

.mini-result-separator {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.mini-result-status {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: right;
    white-space: nowrap;
}

.mini-result-win {
    border-left: 4px solid #7dbd95;
    background: #fbfefc;
}

.mini-result-loss {
    border-left: 4px solid #d89a9a;
    background: #fffdfd;
}

/* --------------------------------
   Standings Page
-------------------------------- */

.standings-intro {
    margin: 0;
}

.standings-tabs-panel,
.standings-mini-panel {
    overflow: hidden;
}

.buffalo-summary-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.buffalo-summary-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.buffalo-summary-header h3 {
    margin: 4px 0 0;
    font-size: 1.4rem;
}

.buffalo-summary-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.buffalo-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.buffalo-summary-stat {
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
}

.buffalo-summary-stat span {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.buffalo-summary-stat strong {
    display: block;
    margin-top: 6px;
    font-size: 1.15rem;
}

.standings-tabs {
    margin-bottom: 18px;
}

.standings-table-wrap,
.standings-mini-table-wrap {
    overflow-x: auto;
}

.standings-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.standings-table th,
.standings-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    text-align: left;
    vertical-align: middle;
}

.standings-table thead th {
    background: #fff;
    color: var(--text);
    font-weight: 800;
}

.standings-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.standings-mini-table th,
.standings-mini-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    text-align: left;
    vertical-align: middle;
}

.standings-mini-table thead th {
    background: #fff;
    color: var(--text);
    font-weight: 600;
}

.standings-team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.standings-team-cell.compact {
    gap: 8px;
}

.standings-team-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.standings-team-name-wrap span {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1;
}

.standings-team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.standings-team-logo.small {
    width: 20px;
    height: 20px;
}

.is-buf-team {
    background: var(--brand-blue-soft);
}

.four-column-standings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

@media (max-width: 1180px) {
    .four-column-standings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .buffalo-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .four-column-standings-grid,
    .buffalo-summary-grid {
        grid-template-columns: 1fr;
    }

    .standings-table {
        min-width: 860px;
    }

    .buffalo-summary-header {
        align-items: flex-start;
    }
}

.standings-split-even {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.standings-split-even > .panel {
    min-width: 0;
}

.standings-cutoff-row td {
    padding: 8px 10px;
    background: var(--brand-blue-soft);
    border-top: 1px solid var(--brand-blue);
    border-bottom: 1px solid var(--brand-blue);
    text-align: center;
}

.standings-cutoff-label {
    display: inline-block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

@media (max-width: 700px) {
    .standings-split-even {
        grid-template-columns: 1fr;
    }

    .standings-split-even > .panel {
        width: 100%;
    }
}

/* remove the previous row's bottom border so the top cutoff border can show */
.standings-mini-table tbody tr:has(+ .standings-cutoff-row) td {
    border-bottom: 0;
}

.standings-mini-table tbody tr:has(+ .standings-divider-row) td {
    border-bottom: 0;
}

.standings-divider-row td {
    padding: 6px 10px;
    text-align: center;
    background: var(--brand-blue-soft);
    border-top: 1px solid var(--brand-blue);
    border-bottom: 1px solid var(--brand-blue);
}

.standings-divider-label {
    display: inline-block;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.standings-divider-row-subtle td {
    background: var(--brand-blue-soft);
}

/* --------------------------------
   Recent Games schedule tab
-------------------------------- */

.schedule-result-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.schedule-result-pills-left {
    margin-top: 8px;
    justify-content: flex-start;
}

.schedule-score {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

.result-pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.68rem !important;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.result-pill-final {
    background: var(--neutral);
    border: 1px solid var(--neutral-dark);
    color: var(--neutral-text);
}

.result-pill-win {
    background: #edf8f1;
    border: 1px solid #7dbd95;
    color: #2f7a4d;
}

.result-pill-loss {
    background: #fff1f1;
    border: 1px solid #d89a9a;
    color: #a94444;
}

body.theme-dark .result-pill-final {
    background: var(--neutral);
    border: 1px solid var(--neutral-dark);
    color: var(--neutral-text);
}

body.theme-dark .result-pill-win {
    background: #1d2a22;
    border-color: #4e8c67;
    color: #b8e2c7;
}

body.theme-dark .result-pill-loss {
    background: #2b1d1d;
    border-color: #9b5a5a;
    color: #efc1c1;
}

.schedule-page-list {
    margin-top: 0;
}

.schedule-page-list li {
    padding: 14px 0;
}

.schedule-page-list li:first-child {
    padding-top: 0;
}

.schedule-page-list li:last-child {
    padding-bottom: 0;
}

.result-pill-preseason {
    background: #f2f4f7;
    border: 1px solid var(--border-strong);
    color: var(--muted);
}

.result-pill-playoff {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    color: var(--text);
}

body.theme-dark .result-pill-preseason {
    background: #2a2d33;
    border-color: #444952;
    color: #d3d7de;
}

body.theme-dark .result-pill-playoff {
    background: #2c2f36;
    border-color: var(--accent);
    color: #f0f2f5;
}

.schedule-page-list-enhanced li {
    padding: 14px 0;
}

.schedule-matchup-page {
    align-items: center;
    gap: 12px;
}

.schedule-team-page {
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
}

.team-logo-page {
    width: 80px;
    height: 80px;
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}

.schedule-separator-page {
    font-size: 0.95rem;
}

.schedule-right-page {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 6px;
    min-width: 180px;
}

.schedule-result-pills-page {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

@media (max-width: 900px) {
    .schedule-right-page {
        align-items: flex-start;
        text-align: left;
        min-width: 0;
    }

    .schedule-result-pills-page {
        justify-content: flex-start;
    }

    .team-logo-page {
        width: 60px;
        height: 60px;
        max-width: 60px;
        max-height: 60px;
    }
}

.result-pill-playoff-game {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-strong);
    color: var(--text);
}

body.theme-dark .result-pill-playoff-game {
    background: #2a2d33;
    border-color: #444952;
    color: #f0f2f5;
}

.team-snapshot-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 0px;
}

.team-snapshot-heading h1 {
    margin: 0;
}

.team-snapshot-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.stacked-stat-item-ranking {
    justify-content: center;
    text-align: center;
}

.stacked-stat-item-ranking {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rank-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text) !important;
}

.rank-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

.panel-header-row .mini-tabs {
    margin: 0;
    justify-content: flex-end;
}

.panel-header-row .mini-tabs {
    margin: 0;
    justify-content: flex-end;
}

@media (max-width: 700px) {
    .schedule-page .schedule-list li {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .schedule-page .schedule-left,
    .schedule-page .schedule-right {
        width: 100%;
        flex: 0 0 auto;
        align-items: center;
        text-align: center;
    }

    .schedule-page .schedule-matchup {
        justify-content: center;
    }

    .schedule-page .schedule-team {
        justify-content: center;
    }

    .schedule-page .schedule-right {
        margin-top: 8px;
        gap: 6px;
    }

    .schedule-page .schedule-result-pills,
    .schedule-page .schedule-result-pills-page {
        justify-content: center;
    }
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
}

.site-branding {
    min-width: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

/* Mobile: logo + toggle on first row, nav full second row */
@media (max-width: 700px) {
    .header-inner {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "branding toggle"
            "nav nav";
        align-items: center;
        gap: 12px;
    }

    .site-branding {
        grid-area: branding;
    }

    #theme-toggle {
        grid-area: toggle;
        justify-self: end;
    }

    .header-actions {
        grid-area: nav;
        width: 100%;
        justify-content: center;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .site-logo img {
        height: 40px;
        width: auto;
        max-width: 100%;
    }
}

/* --------------------------------
   Live Game Scoreboard
-------------------------------- */

/* --------------------------------
   Live Game Scoreboard
-------------------------------- */

.live-game-panel {
    padding: 24px;
}

.live-scoreboard {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.live-scoreboard-matchup {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
}

.live-scoreboard-meta {
    text-align: center;
}

.live-scoreboard-logo {
    width: 72px;
    height: 72px;
    max-width: 72px;
    max-height: 72px;
    object-fit: contain;
}

.live-scoreboard-team-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

.live-scoreboard-score {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
}

.live-scoreboard-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    min-width: 110px;
}

.live-scoreboard-separator {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.live-game-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.live-game-main,
.live-game-side {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.live-game-side .goalie-game-grid {
    gap: 12px;
}

.live-scoring-list {
    display: grid;
    gap: 10px;
}

.live-scoring-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 14px;
}

.live-scoring-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.live-scoring-text {
    min-width: 0;
}

.live-scoring-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.live-scoring-assists {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.3;
}

.live-scoring-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    flex-shrink: 0;
}

.live-scoring-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
}

.live-game-mobile {
    display: none;
}

.live-game-desktop {
    display: grid;
}

@media (max-width: 700px) {
    .live-game-desktop {
        display: none;
    }

    .live-game-mobile {
        display: block;
    }

    .live-game-panel {
        padding: 18px;
    }

    .live-scoreboard-matchup {
        grid-template-columns: 1fr auto 1fr;
        gap: 12px;
    }

    .live-scoreboard-meta {
        order: 2;
    }

    .live-scoreboard-logo {
        width: 54px;
        height: 54px;
        max-width: 54px;
        max-height: 54px;
    }

    .live-scoreboard-team-name {
        font-size: 0.9rem;
    }

    .live-scoreboard-score {
        font-size: 2rem;
    }

    .live-scoreboard-center {
        min-width: 64px;
    }

    .live-scoring-item {
        padding: 10px;
    }

    .live-scoring-main {
        gap: 10px;
    }

    .live-scoring-meta {
        font-size: 0.78rem;
        gap: 6px;
    }

    .live-scoring-assists {
        font-size: 0.78rem;
    }
}

.live-scoring-list {
    display: grid;
    gap: 10px;
}

.live-scoring-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 14px;
}

.live-scoring-item {
    background: var(--panel-soft);
}

.live-scoring-team {
    color: var(--muted);
    font-size: 0.85em;
    font-weight: 600;
}

.live-scoring-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.live-scoring-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.live-scoring-topline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.live-scoring-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
}

.live-scoring-flags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.live-scoring-assists {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.3;
}

.live-scoring-assists-empty {
    font-style: italic;
}

.live-scoring-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    font-size: 0.82rem;
    flex-shrink: 0;
    text-align: center;
    min-width: 58px;
}

@media (max-width: 700px) {
    .live-scoring-item {
        padding: 10px;
        align-items: center;
        gap: 10px;
    }

    .live-scoring-main {
        gap: 10px;
        align-items: center;
    }

    .live-scoring-name {
        font-size: 0.95rem;
    }

    .live-scoring-assists {
        font-size: 0.76rem;
        line-height: 1.25;
    }

    .live-scoring-meta {
        font-size: 0.78rem;
        min-width: 52px;
    }
}

/* --------------------------------
   Live Game Penalties (Desktop)
-------------------------------- */

.live-penalty-list {
    display: grid;
    gap: 8px;
}

.live-penalty-item {
    padding: 8px 12px;
    border-left: 3px solid var(--border);
    background: transparent;
    font-size: 0.85rem;
    line-height: 1.35;
}

.live-penalty-item-site-team {
    border-left-color: var(--brand-blue);
}

.live-penalty-text strong {
    font-weight: 600;
}

.live-penalty-team {
    color: var(--muted);
    font-size: 0.85em;
    margin-left: 4px;
}

.live-game-heading {
    margin-bottom: 18px;
	text-align: center;
}

.live-game-heading h2 {
    margin: 4px 0 0;
}

.live-scoreboard-team {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.live-scoreboard-team-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.live-scoreboard-team-away {
    justify-content: flex-end;
}

.live-scoreboard-team-home {
    justify-content: flex-start;
}

/* --------------------------------
   Playoff Race
-------------------------------- */

.playoff-race-panel {
    padding: 22px;
}

.playoff-race-header-team {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.playoff-race-grid {
    display: grid;
    grid-template-columns: 0.8fr 1fr 1.2fr;
    gap: 18px;
    align-items: stretch;
}

.playoff-race-card {
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 14px;
    padding: 16px;
    min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.playoff-race-chance {
    text-align: center;
}

.playoff-race-big-number {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin: 10px 0 8px;
    color: var(--brand-blue);
}

.playoff-race-subtle {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.3;
}

.playoff-race-metric-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.playoff-race-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 12px;
    padding: 10px 12px;
}

.playoff-race-metric span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.04em;
}

.playoff-race-metric strong {
    font-size: 1rem;
}

.playoff-race-snapshot .mini-tabs {
    margin-top: 0;
}

.playoff-race-snapshot-list {
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 12px;
    overflow: hidden;
}

.playoff-race-snapshot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.playoff-race-snapshot-row:last-child {
    border-bottom: 0;
}

.playoff-race-snapshot-row-site-team,
.playoff-race-snapshot-row.is-buf-team {
    background: var(--brand-blue-soft);
}

.playoff-race-snapshot-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.playoff-race-snapshot-left strong {
    line-height: 1;
}

.playoff-race-snapshot-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.76rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.playoff-race-rank {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    min-width: 38px;
}

.playoff-race-snapshot-row .standings-team-logo.small {
    width: 18px;
    height: 18px;
}

@media (max-width: 1050px) {
    .playoff-race-grid {
        grid-template-columns: 1fr;
    }
}

.playoff-race-snapshot-row.playoff-cutoff-row {
    border-bottom: 2px solid var(--brand-blue);
}

.playoff-race-subtle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 6px;
	margin-left: auto;
	margin-right: auto;
    letter-spacing: .04em;

    padding: 5px 10px;
    border-radius: 999px;

    background: var(--brand-blue-soft);
    border: 1px solid var(--border);

    width: fit-content;
}

.playoff-race-subtle i {
    font-size: 0.7rem;
}

.playoff-race-subtle i {
    opacity: .85;
    transition: transform .2s ease;
}

.playoff-race-card:hover .playoff-race-subtle i {
    transform: scale(1.1);
}

.confidence-very-strong { color: #22c55e; }
.confidence-strong      { color: #4ade80; }
.confidence-favorable   { color: #60a5fa; }
.confidence-bubble      { color: #facc15; }
.confidence-uncertain   { color: #f97316; }
.confidence-longshot    { color: #ef4444; }
.confidence-unlikely    { color: #9ca3af; }

/* --------------------------------
   Playoff Race Enhancements
-------------------------------- */

.playoff-race-big-number-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.playoff-race-big-number-pulse {
    animation: playoffPulse 0.8s ease-in-out infinite;
}

@keyframes playoffPulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(0,0,0,0);
    }
    50% {
        transform: scale(1.04);
        text-shadow: 0 0 14px rgba(31, 95, 214, 0.18);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(0,0,0,0);
    }
}

body.theme-dark .playoff-race-big-number-pulse {
    animation: playoffPulseDark 1.8s ease-in-out infinite;
}

@keyframes playoffPulseDark {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(0,0,0,0);
    }
    50% {
        transform: scale(1.04);
        text-shadow: 0 0 16px rgba(198, 40, 40, 0.28);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(0,0,0,0);
    }
}

.playoff-race-subtle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: .04em;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--panel-soft);
    border: 1px solid var(--border);
    width: fit-content;
}

.playoff-race-subtle i {
    font-size: 0.7rem;
}

.confidence-very-strong { color: #22c55e; }
.confidence-strong      { color: #4ade80; }
.confidence-favorable   { color: #60a5fa; }
.confidence-bubble      { color: #facc15; }
.confidence-uncertain   { color: #f97316; }
.confidence-longshot    { color: #ef4444; }
.confidence-unlikely    { color: #9ca3af; }
.confidence-neutral     { color: var(--muted); }

.playoff-race-meter {
    width: 100%;
    max-width: 220px;
    height: 10px;
    margin: 12px auto 0;
    border-radius: 999px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    position: relative;
}

.playoff-race-meter-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--accent) 100%);
    transition: width 0.35s ease;
}

body.theme-dark .playoff-race-meter-fill {
    background: linear-gradient(90deg, var(--brand-blue) 0%, #f97316 100%);
}

.playoff-race-meter-fill-hot {
    box-shadow: 0 0 12px rgba(31, 95, 214, 0.25);
}

body.theme-dark .playoff-race-meter-fill-hot {
    box-shadow: 0 0 14px rgba(198, 40, 40, 0.35);
}

.playoff-race-clinched-badge,
.playoff-race-inline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem !important;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    width: fit-content;
	text-transform: upper-alpha;
}

.playoff-race-clinched-badge i,
.playoff-race-inline-badge i {
    font-size: 0.72rem !important;
}

.playoff-race-clinched-badge,
.playoff-race-inline-badge-clinched {
    background: #edf8f1;
    border: 1px solid #7dbd95;
    color: #2f7a4d;
}

body.theme-dark .playoff-race-clinched-badge,
body.theme-dark .playoff-race-inline-badge-clinched {
    background: #1d2a22;
    border-color: #4e8c67;
    color: #b8e2c7;
}

.playoff-race-metric strong .playoff-race-inline-badge {
    vertical-align: middle;
}

@media (max-width: 700px) {
    .playoff-race-big-number {
        font-size: 2.2rem;
    }

    .playoff-race-meter {
        max-width: 100%;
    }
}

.playoff-race-snapshot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.playoff-race-snapshot-header .section-kicker {
    margin-bottom: 0;
    white-space: nowrap;
}

.playoff-race-snapshot-header .mini-tabs {
    margin-top: 0;
}

@media (max-width: 500px) {
    .playoff-race-snapshot-header {
        gap: 6px;
    }

    .playoff-race-snapshot-header .section-kicker {
        font-size: 0.7rem;
    }

    .playoff-race-snapshot-header .mini-tab {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
}

/* Game stats stacked formatting */

.game-stats-val {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-primary {
    font-weight: 600;
    line-height: 1.1;
}

.stat-sub {
    font-size: 10px;
    opacity: 0.6;
    letter-spacing: .03em;
}

.schedule-game-link {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    color: inherit;
    text-decoration: none;
    width: 100%;
}

.schedule-game-link:hover {
    text-decoration: none;
}

.schedule-game-link .schedule-left,
.schedule-game-link .schedule-right {
    min-width: 0;
}

@media (max-width: 900px) {
    .schedule-game-link {
        flex-direction: row;
    }
}

.schedule-game-link-page {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: inherit;
    text-decoration: none;
    width: 100%;
}

.schedule-game-link-page:hover {
    text-decoration: none;
}

@media (max-width: 900px) {
    .schedule-game-link-page {
        flex-direction: column;
        align-items: center;
    }
}

.playoff-race-link-row {
    margin-top: 18px;
}