/* The public player page (player_profile.html), everything but the team colours.
   The page sets those as --team-* variables in an inline <style> just before
   linking this file, so the order of rules is the same as when they were inline. */

.player-header {
    padding: 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.player-header-content {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.player-header-watermark-num {
    position: absolute;
    right: 40px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: stretch;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    overflow: hidden;
}

.player-header-watermark-num span {
    font-size: 380px;
    line-height: 0.85;
    display: block;
    margin-top: -10px;
}

.player-header-watermark-logo {
    position: absolute;
    left: 12.5%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 130%;
    width: auto;
    object-fit: contain;
    opacity: 0.08;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.player-photo-section {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.player-avatar-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
}

.player-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--slms-muted);
    overflow: hidden;
    position: relative;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jersey-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    color: var(--team-on-primary);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 900;
}

.player-info-section {
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.player-meta-top {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.player-meta-top .position-badge {
    font-size: 0.8rem;
}

.player-name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.team-logo-mini {
    object-fit: contain;
    filter: drop-shadow(0 1px 3px color-mix(in srgb, var(--slms-text) 10%, transparent));
}

.team-logo-hero {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--slms-text) 10%, transparent));
    flex-shrink: 0;
}

.team-link {
    text-decoration: none;
}

.team-link:hover {
    color: var(--team-primary);
    text-decoration: none;
}

.player-details-box {
    padding: 1rem 1.25rem;
    font-size: 0.85em;
}

.player-details-title {
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.player-detail-row {
    display: flex;
    justify-content: space-between;
}

.player-detail-row:last-child {
    border-bottom: none;
}

.player-detail-label {
    font-weight: 600;
    text-transform: uppercase;
}

.player-detail-value {
    font-size: 0.85rem;
}

.player-position {
    font-size: 0.875rem;
    color: var(--slms-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.stat-card-label {
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.stat-card-value {
    font-size: 2rem;
}

.stat-card-rank {
    margin-top: auto;
    padding-top: 0.4rem;
}

.stat-card-rank.rank-good {
    color: var(--bs-success);
}

.stat-card-rank.rank-mid {
    color: var(--bs-warning);
}

.stat-card-rank.rank-low {
    color: var(--bs-danger);
}

.stat-card-team-rank {
    margin-top: 0.15rem;
}

/* Inline stat values inside detailed stats card */
.stat-value {
    font-size: 2rem;
}

.stat-label {
    margin-top: 0.35rem;
}

/* Info Card */
.info-card {
    overflow: hidden;
}

.info-card-header {
    padding: 1.25rem 1.5rem;
}

.info-card-header h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card-body {
    padding: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    text-transform: uppercase;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
}

/* Written by the player or their parent in the portal */
.player-hero-hometown {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--slms-text);
}

.player-hero-about {
    max-width: 38rem;
    margin: 0 0 1.25rem;
}

.player-hero-goes-by {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    color: var(--slms-muted);
}

.player-hero-bio {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--slms-text);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.player-hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.player-hero-links a,
.player-hero-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.5rem;
    padding: 0 0.9rem;
    border: 1px solid var(--slms-card-border);
    border-radius: 999px;
    color: var(--slms-heading);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.player-hero-links a:hover,
.player-hero-action:hover {
    border-color: var(--slms-heading);
    color: var(--slms-heading);
}

/* Unclaimed profiles: one muted line at the foot of the page */
.player-claim-prompt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--slms-card-border);
    color: var(--slms-muted);
    font-size: 0.875rem;
}

.player-claim-prompt > .ph {
    font-size: 1.1rem;
}

@media (max-width: 575.98px) {
    .player-claim-prompt > .ph {
        display: none;
    }
}

.player-claim-prompt p {
    margin: 0;
}

.player-claim-prompt strong {
    color: var(--slms-heading);
    font-weight: 600;
}

.player-claim-prompt a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--slms-heading);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.player-claim-prompt a:hover {
    text-decoration-thickness: 2px;
}

.player-hero-report {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.75rem;
    color: var(--slms-muted);
    font-size: 0.8rem;
    text-decoration: none;
}

.player-hero-report:hover {
    color: var(--slms-heading);
    text-decoration: underline;
}

.player-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.player-hero-action {
    background: var(--slms-surface);
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
}

.player-hero-share,
.player-hero-share:hover {
    border-color: var(--slms-button-bg, var(--slms-primary));
    background: var(--slms-button-bg, var(--slms-primary));
    color: var(--slms-button-color, var(--slms-surface));
}

.player-hero-share:hover {
    border-color: var(--slms-button-hover-bg, var(--slms-heading));
    background: var(--slms-button-hover-bg, var(--slms-heading));
}

.player-hero-share:focus-visible,
.player-hero-action:focus-visible,
.player-hero-award:focus-visible {
    outline: 2px solid var(--slms-accent);
    outline-offset: 2px;
}

/* Awards under the name: accent-tinted pills that lead to the trophy case */
.player-hero-awards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.9rem;
    padding: 0;
    list-style: none;
}

.player-hero-award {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--slms-accent) 14%, var(--slms-surface));
    color: color-mix(in srgb, var(--slms-accent) 72%, var(--slms-heading));
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.player-hero-award:hover {
    background: color-mix(in srgb, var(--slms-accent) 24%, var(--slms-surface));
    color: color-mix(in srgb, var(--slms-accent) 72%, var(--slms-heading));
}

.player-hero-award-count {
    font-weight: 800;
    opacity: 0.8;
}

.player-hero-award--more {
    border: 1px solid var(--slms-card-border);
    background: transparent;
    color: var(--slms-muted);
}

.player-hero-award--more:hover {
    background: transparent;
    color: var(--slms-heading);
}

/* Season menu: the season pill opens a list of links to each season.
   It hangs from the chip row (the hero clips anything past its edge),
   so it stays inside the hero and scrolls when there are many seasons. */
.player-meta-top { position: relative; }
.hero-season-picker { position: static; }
.hero-season-picker > summary {
    list-style: none;
    cursor: pointer;
    min-height: 1.75rem;
    border-color: color-mix(in srgb, var(--slms-heading) 40%, transparent);
    color: var(--slms-heading);
}
.hero-season-picker > summary::-webkit-details-marker { display: none; }
.hero-season-picker > summary:focus-visible {
    outline: 2px solid var(--slms-accent);
    outline-offset: 2px;
}
.hero-season-caret { transition: transform 0.15s ease; }
.hero-season-picker[open] .hero-season-caret { transform: rotate(180deg); }
.hero-season-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.4rem);
    left: 0;
    width: min(20rem, 100%);
    max-height: 12rem;
    overflow-y: auto;
    padding: 0.35rem;
    background: var(--slms-surface);
    border: 1px solid var(--slms-card-border);
    border-radius: var(--radius-sm, 12px);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--slms-heading) 16%, transparent);
    text-align: left;
    /* The chip row's small capitals stop here. */
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    white-space: normal;
}
.hero-season-menu-title {
    margin: 0;
    padding: 0.35rem 0.6rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slms-muted);
}
.hero-season-menu ul { list-style: none; margin: 0; padding: 0; }
.hero-season-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    color: var(--slms-heading);
    text-decoration: none;
}
.hero-season-option:hover,
.hero-season-option:focus-visible {
    background: color-mix(in srgb, var(--slms-heading) 6%, var(--slms-surface));
    color: var(--slms-heading);
}
.hero-season-option.is-selected { background: color-mix(in srgb, var(--slms-heading) 8%, var(--slms-surface)); }
.hero-season-option-text { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.hero-season-option-name { font-size: 0.95rem; font-weight: 700; }
.hero-season-option-detail { font-size: 0.78rem; color: var(--slms-muted); }
.hero-season-option .ph-check { font-size: 1.1rem; color: var(--bs-success); }

/* The player's details, and the team's next game beside them */
.player-hero-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    align-items: inherit;
}
.player-header--panel .player-info-section.has-next-game {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: center;
    justify-content: space-between;
    column-gap: 2rem;
    row-gap: 1.25rem;
}
.player-info-section.has-next-game .player-hero-main { flex: 1 1 22rem; }
.player-hero-next {
    flex: 0 1 17rem;
    min-width: 14rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--slms-card-border);
    border-radius: var(--radius-md, 16px);
    background: var(--slms-surface);
}
.player-hero-next p { margin: 0; }
.player-hero-next-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--slms-accent) 58%, var(--slms-heading));
}
.player-hero-next-date { font-size: 1.35rem; font-weight: 800; color: var(--slms-heading); }
.player-hero-next-meta { font-size: 0.9rem; color: var(--slms-text); }
.player-hero-next .player-hero-next-opponent {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.35rem;
    color: var(--slms-heading);
}
.player-hero-next-logo { width: 1.9rem; height: 1.9rem; object-fit: contain; border-radius: 50%; }
.player-hero-next-link {
    align-self: flex-start;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--slms-heading);
    text-decoration: underline;
    text-underline-offset: 3px;
}
@media (max-width: 575.98px) {
    .player-hero-next { flex-basis: 100%; }
}

/* Highlights on Overview, filled in by js/player-highlights.js */
.player-highlights-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.player-highlights-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slms-heading);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.player-highlights-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    gap: 0.75rem;
}
.player-highlight {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--slms-card-border);
    border-radius: var(--radius-sm, 12px);
    background: var(--slms-surface);
}
.player-highlight-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slms-muted);
}
.player-highlight-value { font-size: 1.5rem; font-weight: 800; line-height: 1.15; color: var(--slms-heading); }
.player-highlight-sub { font-size: 0.85rem; color: var(--slms-text); }
.player-highlight-bar {
    display: block;
    height: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--slms-heading) 8%, var(--slms-surface));
}
.player-highlight-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--slms-accent); }
@media (max-width: 575.98px) {
    /* One row that scrolls sideways on phones */
    .player-highlights-list {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(12.5rem, 80%);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    .player-highlight { scroll-snap-align: start; }
}

/* Games: the season's record, box score links, and "Show all" for long seasons */
.game-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.game-log-record { font-size: 0.85rem; color: var(--slms-muted); }
.game-log-playoff {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.45rem;
    border: 1px solid var(--slms-card-border);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--slms-heading);
    vertical-align: middle;
}
.game-log-table .game-log-box-col { text-align: right; white-space: nowrap; }
.game-log-box-link {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--slms-heading);
    text-decoration: underline;
    text-underline-offset: 3px;
}
[data-game-log].is-collapsed tbody > tr:nth-child(n+11) { display: none; }
.game-log-more {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-top: 1px solid var(--slms-card-border);
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--slms-heading);
    cursor: pointer;
}
[data-game-log].is-collapsed + .game-log-more { border-top: 0; }
.game-log-more:hover { background: color-mix(in srgb, var(--slms-heading) 4%, var(--slms-surface)); }

/* Signed-in league staff only: birthdate, age and email */
.info-staff-only {
    margin-top: 0.75rem;
    padding: 0 1rem;
    border: 1px solid var(--slms-card-border);
    border-radius: var(--radius-sm, 12px);
    background: color-mix(in srgb, var(--slms-surface) 94%, var(--slms-heading) 6%);
}

.info-staff-only-heading {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 0 0.25rem;
    font-family: var(--slms-font-base, system-ui, sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slms-muted);
}

/* Game Log Table */
.game-log-table {
    width: 100%;
    border-spacing: 0;
}

.game-log-table thead th {
    padding: 1rem 0.75rem;
    text-transform: uppercase;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.game-log-table thead th:first-child {
    border-top-left-radius: 12px;
}

.game-log-table thead th:last-child {
    border-top-right-radius: 12px;
}

.game-log-table tbody tr {
    transition: background 0.2s;
}

.game-log-table tbody td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--slms-card-border);
    font-size: 0.875rem;
}

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

.game-result {
    border-radius: 6px;
    display: inline-block;
}

.game-result.win {
    background: color-mix(in srgb, var(--bs-success) 18%, var(--slms-surface));
}

.game-result.loss {
    background: color-mix(in srgb, var(--bs-danger) 16%, var(--slms-surface));
}

/* Career Highs */
.career-high-item {
    padding: 1.25rem;
    transition: all 0.2s;
}

.career-high-value {
    font-size: 2rem;
}

.career-high-label {
    color: var(--slms-muted);
    text-transform: uppercase;
}

.career-high-date {
    font-size: 0.75rem;
    color: var(--slms-muted);
    margin-top: 0.25rem;
}

/* Badges */
.status-badge {
    padding: 0.5rem 1rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge.active {
    background: var(--bs-success);
    color: var(--slms-surface);
}

.status-badge.suspended {
    background: var(--bs-danger);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Responsive */
@media (max-width: 768px) {
    .player-header {
        margin-bottom: 1rem;
    }

    /* Stack header columns vertically */
    .player-header-content .row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .player-avatar-wrapper {
        width: 130px;
        height: 130px;
    }

    .jersey-badge {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .player-name {
        font-size: 1.75rem;
    }

    .player-header-watermark-num span {
        font-size: 200px;
    }

    .player-header-watermark-num {
        right: 5px;
    }

    .player-header-watermark-logo {
        left: 50%;
        height: 70%;
        opacity: 0.05;
    }

    .team-logo-hero {
        width: 60px;
        height: 60px;
    }

    /* Details box full width on mobile */
    .player-details-box {
        padding: 1rem 1.25rem;
        margin: 0 1rem 1rem;
    }

    /* Stat cards */

    .stat-card-value {
        font-size: 1.6rem;
    }

    /* Game log table - horizontal scroll */

    .game-log-table {
        font-size: 0.75rem;
        min-width: 500px;
    }

    .game-log-table thead th,
    .game-log-table tbody td {
        padding: 0.5rem 0.35rem;
        white-space: nowrap;
    }

    /* Info card */
    .info-card-header {
        padding: 1rem 1.25rem;
    }

    .info-card-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.75rem 1rem;
    }

    .info-item {
        padding: 0.75rem 0;
    }

    /* Career highs */
    .career-high-item {
        padding: 1rem;
    }

    .career-high-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .player-name {
        font-size: 1.4rem;
    }

    .player-avatar-wrapper {
        width: 110px;
        height: 140px;
    }

    .player-header-watermark-num span {
        font-size: 150px;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .game-log-table {
        min-width: 450px;
    }
}

/* ============================================================
   EDITORIAL OVERRIDE — cascade wins against the rules above.
   Reversible: delete this block to restore prior design.
   ============================================================ */
:root {
    --ed-bg:       color-mix(in srgb, var(--slms-surface) 94%, var(--slms-heading) 6%);
    --ed-surface:  var(--slms-surface);
    --ed-border:   var(--slms-card-border);
    --ed-text:     var(--slms-heading);
    --ed-muted:    var(--slms-muted);
    --ed-radius:   14px;
}

/* Kill every shadow, blur, and inner gradient on this page */
.player-header,
.player-avatar,
.jersey-badge,
.player-details-box,
.stat-card,
.info-card,
.career-high-item,
.career-high-item:hover,
.status-badge {
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-image: none !important;
    transform: none !important;
}

/* Hero: flat surface, keep both watermarks (team logo left, jersey number right) */
.player-header {
    background: var(--ed-surface);
    border-bottom: 1px solid var(--ed-border);
    border-radius: 0;
    /* Breathing room below the navbar (esp. the floating stadium pill) */
    margin-top: clamp(1rem, 3vw, 2.5rem);
}
.player-header-content { padding: 2rem 0 1.25rem; }
.player-photo-section,
.player-info-section { min-height: 200px !important; padding: 1.25rem 2rem !important; }
.player-header-watermark-num {
    color: var(--slms-text);
    opacity: 0.05;
}
.player-header-watermark-num span {
    font-size: clamp(180px, 26vw, 320px);
    letter-spacing: -0.05em;
}

/* Avatar: flat, bordered, no shadow */
.player-avatar {
    background: var(--ed-bg);
    border: 1px solid var(--ed-border);
}
.jersey-badge {
    background: var(--team-primary);
    border: 2px solid var(--ed-surface);
}

/* Name: editorial display — uppercase, tight, compact */
.player-name {
    font-weight: 900;
    line-height: 1;
    color: var(--slms-heading, var(--ed-text));
    text-transform: uppercase;
    margin: 0 0 1rem;
}

.player-meta-top {
    gap: 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ed-muted);
}
.player-meta-top .position-badge {
    background: transparent;
    color: var(--team-primary);
    padding: 0;
    border-radius: 0;
    font-weight: 900;
    letter-spacing: 0.12em;
}

/* Team link — visibly clickable, editorial scale */
.player-team-info {
    display: inline-flex !important;
    align-items: center;
    gap: 0.75rem !important;
    margin-top: 0.5rem !important;
    padding: 0.35rem 0.85rem 0.35rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.player-team-info:hover {
    border-color: var(--ed-border);
    background: var(--ed-bg);
}
.team-logo-mini {
    width: 40px !important;
    height: 40px !important;
}
.team-link {
    color: var(--ed-text);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.15s ease;
}
.team-link::after {
    content: '›';
    font-size: 1.35rem;
    opacity: 0.35;
    transform: translateX(0);
    transition: transform 0.15s ease, opacity 0.15s ease;
    font-weight: 400;
}
.player-team-info:hover .team-link { color: var(--team-primary); }
.player-team-info:hover .team-link::after {
    transform: translateX(4px);
    opacity: 1;
}

/* Details box: flat card, no glass */
.player-details-box {
    background: var(--ed-bg);
    border: 1px solid var(--ed-border);
    border-radius: var(--ed-radius);
}
.player-details-title {
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    color: var(--ed-muted);
}
.player-detail-row {
    border-bottom: 1px solid var(--ed-border);
    font-variant-numeric: tabular-nums;
    padding: 0.5rem 0;
}
.player-detail-label {
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--ed-muted);
}
.player-detail-value { color: var(--ed-text); font-weight: 700; }

/* Stat cards: flat, left-aligned, giant number */
.stat-card {
    background: var(--ed-surface);
    border: 1px solid var(--ed-border);
    border-radius: var(--ed-radius);
    padding: 1.75rem 1.5rem;
    text-align: left;
    align-items: flex-start;
    gap: 0.5rem;
}
.stat-card-label {
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--ed-muted);
    margin: 0;
}
.stat-card-value {
    font-weight: 900;
    line-height: 1;
    color: var(--ed-text);
    font-variant-numeric: tabular-nums;
}
.stat-card-rank {
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}
.stat-card-team-rank {
    letter-spacing: 0.08em;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ed-muted);
}

/* Inline detail stats */
.stat-value {
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--ed-text);
}
.stat-label {
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ed-muted);
}

/* Info cards: flat */
.info-card {
    background: var(--ed-surface);
    border: 1px solid var(--ed-border);
    border-radius: var(--ed-radius);
}
.info-card-header {
    background: transparent;
    border-bottom: 1px solid var(--ed-border);
}
.info-card-header h5 {
    font-family: var(--slms-font-heading, system-ui);
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--slms-heading, var(--ed-text));
}
.info-item {
    border-bottom: 1px solid var(--ed-border);
    font-variant-numeric: tabular-nums;
}
.info-label {
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--ed-muted);
}
.info-value { color: var(--ed-text); }

/* Game log: minimal, generous whitespace */
.game-log-table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.game-log-table thead th {
    background: transparent;
    color: var(--ed-muted);
    border-bottom: 1px solid var(--ed-border);
    border-radius: 0 !important;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    font-weight: 700;
}
.game-log-table tbody tr { border-bottom: 1px solid var(--ed-border); }
.game-log-table tbody tr:hover { background: var(--ed-bg); }
.game-log-table tbody td { color: var(--ed-text); }

.game-result {
    background: transparent !important;
    border: 1px solid currentColor;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    text-transform: uppercase;
}
.game-result.win { color: var(--bs-success); }
.game-result.loss { color: var(--bs-danger); }

/* Career highs: left team-color stripe, otherwise flat */
.career-high-item {
    background: var(--ed-surface);
    border: 1px solid var(--ed-border);
    border-left: 3px solid var(--team-primary);
    border-radius: var(--ed-radius);
}
.career-high-value {
    font-weight: 900;
    line-height: 1;
    color: var(--ed-text);
    font-variant-numeric: tabular-nums;
}
.career-high-label {
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Status badge: outline only */
.status-badge {
    background: transparent !important;
    border: 1px solid currentColor;
    color: var(--bs-success);
    border-radius: 4px;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    animation: none !important;
}
.status-badge.suspended { color: var(--bs-danger); }

/* Section rhythm */
.container.pb-5 { padding-top: 3rem; padding-bottom: 6rem; }

/* === Display typeface: Bebas Neue for display-role elements only ===
   Rule: only apply to headline moments (hero name, huge stat numbers).
   NOT watermarks (want chunky mass, not condensed), NOT UI badges
   (need normal-width for readability at small sizes). */
.player-name,
.stat-card-value,
.stat-value,
.career-high-value {
    font-family: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
    letter-spacing: 0.01em;
}
.player-name { font-size: clamp(2.5rem, 4.5vw, 4rem); letter-spacing: 0.005em; }
.stat-card-value { font-size: clamp(3rem, 4.5vw, 4rem); }
.stat-value { font-size: clamp(2.5rem, 4vw, 3.25rem); }
.career-high-value { font-size: clamp(2.25rem, 3.5vw, 3rem); }

/* Explicitly lock small UI elements to the body font so display font
   can't bleed in via inheritance. */
.position-badge,
.stat-card-label,
.stat-label,
.stat-card-rank,
.stat-card-team-rank,
.career-high-label,
.career-high-date,
.player-detail-label,
.player-detail-value,
.info-label,
.info-value,
.game-result,
.status-badge,
.hero-chip {
    font-family: var(--slms-font-base, system-ui, sans-serif);
}

/* Hero chips (status + season) — small pills, outline style */
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--ed-border);
    border-radius: 999px;
    background: var(--ed-bg);
    color: var(--ed-muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
}
.hero-chip i {
    font-size: 0.8rem;
    opacity: 0.7;
}
.hero-chip-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.status-chip.is-active {
    color: var(--bs-success);
    border-color: color-mix(in srgb, var(--bs-success) 35%, transparent);
}
.status-chip.is-suspended {
    color: var(--bs-danger);
    border-color: color-mix(in srgb, var(--bs-danger) 35%, transparent);
}

/* Watermark stays in heading font — chunky, not condensed */
.player-header-watermark-num {
    font-family: var(--slms-font-heading, system-ui, sans-serif);
}

/* === Mobile overrides (< 768px) ===
   The !important rules earlier in this block fight the original mobile
   media queries above. These overrides reassert mobile sizing. */
@media (max-width: 768px) {
    .player-photo-section,
    .player-info-section {
        min-height: auto !important;
        padding: 1rem 1.25rem !important;
        align-items: center !important;
    }
    .player-header-content { padding: 1rem 0 !important; }

    .player-name {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        text-align: center;
    }
    .stat-card-value { font-size: clamp(2rem, 10vw, 2.75rem); }
    .stat-value { font-size: clamp(1.75rem, 8vw, 2.25rem); }
    .career-high-value { font-size: clamp(1.75rem, 8vw, 2.25rem); }

    .player-header-watermark-num span {
        font-size: clamp(120px, 42vw, 200px);
    }

    .stat-card {
        text-align: center !important;
        align-items: center !important;
        padding: 1.25rem 1rem !important;
    }

    .player-meta-top {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem !important;
    }
    .hero-chip {
        font-size: 0.6rem;
        padding: 0.25rem 0.55rem;
    }

    .player-team-info {
        justify-content: center;
        margin-top: 0.75rem !important;
    }
    .team-logo-mini {
        width: 32px !important;
        height: 32px !important;
    }
    .team-link { font-size: 1.05rem; }

    .container.pb-5 {
        padding-top: 1.5rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 480px) {
    .player-name { font-size: clamp(1.5rem, 9vw, 2rem); }
    .stat-card-value { font-size: clamp(1.75rem, 11vw, 2.25rem); }
    .player-header-watermark-num span {
        font-size: clamp(100px, 45vw, 160px);
    }
    .hero-chip {
        font-size: 0.58rem;
        letter-spacing: 0.08em;
    }
}

/* ── Clickable career rows ─────────────────────────────────── */
.career-season-table .career-season-row {
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.career-summary-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.career-team-inline { display: none; }

.career-season-table .career-season-row:hover {
    background: color-mix(in srgb, var(--slms-primary) 5%, transparent);
}
.career-season-table .career-season-row:focus-visible {
    outline: none;
    box-shadow: inset 3px 0 0 var(--slms-accent);
    background: color-mix(in srgb, var(--slms-primary) 5%, transparent);
}
.career-season-table .career-season-row.is-active {
    background: color-mix(in srgb, var(--slms-accent) 9%, transparent);
    box-shadow: inset 3px 0 0 var(--slms-accent);
}
.career-season-table .career-season-row.is-active:hover {
    background: color-mix(in srgb, var(--slms-accent) 13%, transparent);
}

.career-season-link {
    color: inherit;
    text-decoration: none;
    display: block;
}
.career-season-link:hover,
.career-season-row:hover .career-season-link {
    color: var(--slms-primary, var(--slms-heading));
}
.career-season-row.is-active .career-season-link {
    color: var(--slms-heading);
}

.career-season-chev-col,
.career-season-chev-cell {
    width: 36px;
    text-align: right;
    padding-right: 14px !important;
}
.career-season-chev {
    font-size: 1rem;
    color: var(--slms-muted);
    transition: transform 0.15s ease, color 0.15s ease;
    display: inline-block;
}
.career-season-row:hover .career-season-chev {
    color: var(--slms-primary);
    transform: translateX(2px);
}
.career-season-row.is-active .career-season-chev {
    color: var(--slms-accent);
    transform: none;
}

/* Selected-season label in the Season Statistics header */
.season-stats-selected {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    padding: 3px 4px 3px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--slms-accent) 14%, transparent);
    color: color-mix(in srgb, var(--slms-accent) 70%, var(--slms-text));
}
.season-stats-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s ease;
}
.season-stats-clear:hover {
    background: color-mix(in srgb, var(--slms-accent) 22%, transparent);
    color: inherit;
}
.season-stats-clear i { font-size: 0.85rem; }

@media (max-width: 600px) {
    .career-season-chev-col,
    .career-season-chev-cell { display: none; }
}

/* ── Panel hero: full-height left panel showing the player photo,
   else the team logo on team colour, else the player's initials. */
.player-header--panel {
    --hero-photo-height: 320px;
}
.player-header--panel .player-header-content { padding: 0 !important; }
.player-hero-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: var(--hero-photo-height);
}
.player-hero-panel {
    position: relative;
    overflow: hidden;
    background: var(--ed-bg);
    border-right: 5px solid var(--slms-accent);
}
.player-hero-panel-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Keep faces in frame on action shots */
    object-position: 50% 30%;
}
.player-hero-panel--logo,
.player-hero-panel--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--team-primary);
}
/* Uploaded logos usually carry transparent padding, so fill most of the panel */
.player-hero-panel-logo {
    width: 88%;
    height: 88%;
    object-fit: contain;
}
.player-hero-panel-initials {
    font-family: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 7rem;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--team-on-primary);
}
/* No team colour chosen: the card colour (white on light sites) so any logo reads cleanly */
.player-hero-panel--neutral { background: var(--slms-surface); }
.player-hero-panel--neutral .player-hero-panel-initials { color: var(--slms-heading); }
.player-hero-panel-tab {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 0.55rem 1rem 0.3rem;
    border-top-right-radius: 12px;
    background: var(--team-primary);
    color: var(--team-on-primary);
    font-family: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 2.2rem;
    line-height: 1;
    letter-spacing: 0.01em;
}
.player-header--panel .player-info-section {
    min-height: 0 !important;
    padding: 1.75rem 2.5rem !important;
    gap: 0.75rem;
}
.player-header--panel .player-meta-top { margin-bottom: 0; }
.player-header--panel .player-name { margin: 0; }
/* Jersey number spans most of the hero height, centred. Sized with
   headroom because digit height varies by the org's heading font. */
.player-header--panel .player-header-watermark-num {
    top: 0;
    bottom: auto;
    right: 28px;
    height: var(--hero-photo-height);
    align-items: center;
}
.player-header--panel .player-header-watermark-num span {
    font-size: calc(var(--hero-photo-height) * 1.2);
    line-height: 1;
    margin-top: 0;
}
.position-chip {
    background: var(--team-primary);
    border-color: var(--team-primary);
    color: var(--team-on-primary);
}
.player-hero-team {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
    align-self: flex-start;
    text-decoration: none;
}
.player-hero-team-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
}
.player-hero-team-text {
    display: grid;
    gap: 0.15rem;
}
.player-hero-team-kicker {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ed-muted);
}
.player-hero-team .team-link { font-size: 1.45rem; font-weight: 800; }
.player-hero-team:hover .team-link { color: var(--team-primary); }
.player-hero-team:hover .team-link::after {
    transform: translateX(4px);
    opacity: 1;
}
.player-hero-team:focus-visible {
    outline: 2px solid var(--slms-accent);
    outline-offset: 4px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .player-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }
    .player-hero-panel {
        height: 300px;
        border-right: 0;
        border-bottom: 5px solid var(--slms-accent);
    }
    /* Wide banner shows less height; bias toward the head */
    .player-hero-panel-photo { object-position: 50% 15%; }
    /* Logo / initials stand-ins don't need a full photo-height banner */
    .player-hero-panel--logo { height: 200px; }
    .player-header--panel .player-info-section {
        padding: 1.25rem 1.25rem 1.5rem !important;
        align-items: flex-start !important;
    }
    /* Initials repeat the name just below, so on phones they shrink to a
       small tile beside the jersey number instead of a full banner. */
    .player-hero-panel--initials,
    .player-hero-panel--initials.player-hero-panel--neutral {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.85rem;
        height: auto;
        padding: 1.25rem 1.25rem 0;
        background: transparent;
        border-bottom: 0;
    }
    .player-hero-panel--initials .player-hero-panel-initials {
        display: grid;
        place-items: center;
        width: 64px;
        height: 64px;
        /* Bebas sits high in its line box; nudge it to the optical centre */
        padding-top: 0.15rem;
        border-radius: 14px;
        background: var(--team-primary);
        font-size: 2.1rem;
    }
    .player-hero-panel--neutral .player-hero-panel-initials {
        background: var(--ed-bg);
        border: 1px solid var(--ed-border);
    }
    .player-hero-panel--initials .player-hero-panel-tab {
        position: static;
        padding: 0;
        border-radius: 0;
        background: none;
        color: var(--slms-heading);
        font-size: 2rem;
    }
    .player-header--panel .player-hero-panel--initials + div .player-info-section {
        padding-top: 0.9rem !important;
    }
    .player-header--panel .player-meta-top { justify-content: flex-start; }
    .player-header--panel .player-name { text-align: left; }
    .player-header--panel .player-header-watermark-num {
        top: auto;
        bottom: 0;
        right: 14px;
        height: auto;
    }
    /* Fits the details area under the photo banner */
    .player-header--panel .player-header-watermark-num span {
        font-size: clamp(120px, 38vw, 180px);
    }
    .player-hero-team-logo { width: 76px; height: 76px; }
    .player-hero-team .team-link { font-size: 1.15rem; }
}

/* ---------- Phones: tables fit the screen ----------
   The career table moves the team under the season name and the game log
   moves the date under the opponent. The first column stays put while any
   further stat columns scroll beside it. */
.game-log-date-inline,
.game-log-group-narrow { display: none; }
@media (max-width: 575.98px) {
    .career-season-table .career-team-col,
    .game-log-table .game-log-date-col,
    .game-log-table .game-log-group-wide { display: none; }
    .career-team-inline,
    .game-log-date-inline { display: block; }
    .game-log-table .game-log-group-narrow { display: table-cell; }
    .game-log-date-inline {
        font-size: 0.7rem;
        color: var(--slms-muted);
    }
    /* Baseball keeps its width: it has over thirty columns. */
    .game-log-table:not(.game-log-table--wide) { min-width: 0; }
    .game-log-table thead th,
    .game-log-table tbody td { padding: 0.55rem 0.3rem; }
    .game-log-table thead th { letter-spacing: 0.04em; }
    .game-log-table .game-result { padding: 0.2rem 0.4rem; }
    .career-season-table { border-collapse: separate; border-spacing: 0; }
    .career-season-table th:first-child,
    .career-season-table td:first-child,
    .game-log-table .game-log-pin {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--slms-surface);
        white-space: normal;
        min-width: 8.5rem;
    }
    .game-log-table .game-log-pin { min-width: 5.75rem; padding-left: 0.6rem; }
    .career-season-table .career-season-row.is-active td:first-child {
        background: color-mix(in srgb, var(--slms-accent) 9%, var(--slms-surface));
    }
    .career-season-table th,
    .career-season-table td { padding: 0.6rem 0.45rem; }
}
