/* Player profiles: a single hero, quiet section headings and readable records. */
#player-profile.profile-refresh {
    --profile-ink: #192b43;
    --profile-muted: #526176;
    --profile-line: #e1e7ef;
    --profile-tint: color-mix(in srgb, var(--player-primary-color) 7%, white);
    gap: var(--home-gap, 20px) !important;
    min-width: 0;
}

#player-profile.profile-refresh [data-testid="player-banner"] {
    height: auto !important;
    min-height: 220px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 18px;
    overflow: hidden !important;
    background: var(--player-primary-color);
}
#player-profile.profile-refresh [data-testid="player-banner"] .hero-content {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 26px !important;
}
#player-profile.profile-refresh [data-testid="player-banner"] .player-header {
    display: grid !important;
    grid-template-columns: clamp(145px, 20vw, 225px) minmax(0, 1fr);
    gap: 24px !important;
    height: auto !important;
    min-height: 220px !important;
    align-items: end !important;
}
#player-profile.profile-refresh [data-testid="player-banner"] .player-image-container {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 220px !important;
    max-width: none !important;
    max-height: none !important;
    align-self: end !important;
    margin: 0 !important;
    display: flex !important;
    align-items: flex-end !important;
}
#player-profile.profile-refresh [data-testid="player-banner"] [data-testid="player-image"] {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: bottom;
    display: block !important;
}
#player-profile.profile-refresh [data-testid="player-banner"] [data-testid="banner-text"] {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    min-width: 0;
    min-height: 220px;
    width: 100% !important;
    padding: 26px 0 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    align-self: stretch !important;
    text-align: left !important;
}
#player-profile.profile-refresh [data-testid="player-banner"] .player-title-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding-right: 32px;
    min-width: 0;
}
#player-profile.profile-refresh .player-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    min-width: 0;
}
#player-profile.profile-refresh [data-testid="player-banner"] [data-testid="player-name"] {
    font-size: clamp(1.55rem, 2.6vw, 2.1rem) !important;
    line-height: 1.16 !important;
    text-align: left !important;
    letter-spacing: -.035em;
    color: #fff;
    text-shadow: none;
    margin: 0 !important;
}
#player-profile.profile-refresh .player-name-row > .meta-item {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--profile-ink);
    line-height: 1.5;
    font-size: .81rem;
    opacity: 1;
}
#player-profile.profile-refresh .player-name-row .team-link {
    color: var(--profile-ink) !important;
    font-size: inherit;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}
#player-profile.profile-refresh .player-name-row .team-link:hover { text-decoration: underline; }
#player-profile.profile-refresh [data-testid="player-banner"] [data-testid="player-meta"] {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px 12px !important;
    overflow: visible !important;
    white-space: normal !important;
    margin: 0 !important;
    opacity: 1;
}
#player-profile.profile-refresh [data-testid="player-banner"] [data-testid="player-meta"] .meta-item {
    color: #fff;
    font-size: .82rem !important;
    display: inline-flex !important;
}
#player-profile.profile-refresh [data-testid="player-meta"] .meta-item + .meta-item::before { content: none !important; }
#player-profile.profile-refresh [data-testid="player-banner"] [data-testid="quick-stats"] {
    display: flex !important;
    gap: 26px !important;
    margin: 4px 0 14px !important;
    padding: 0 !important;
    align-self: flex-start !important;
}
#player-profile.profile-refresh .quick-stats .stat-item { display: flex; flex-direction: column-reverse; text-align: left; }
#player-profile.profile-refresh .quick-stats .stat-value { font-size: 1.45rem !important; line-height: 1.2; text-shadow: none; margin: 0; }
#player-profile.profile-refresh .quick-stats .stat-label { font-size: .68rem !important; letter-spacing: .055em; line-height: 1.4; margin: 3px 0 0; }

#player-profile.profile-refresh [data-testid="tabs-menu"] {
    width: 100%;
    position: relative;
    margin: auto 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-width: 0;
    overflow: hidden;
}
#player-profile.profile-refresh [data-testid="tabs-menu"]::before,
#player-profile.profile-refresh [data-testid="player-tabs"]::before { content: none !important; }
#player-profile.profile-refresh [data-testid="player-tabs"] {
    display: flex !important;
    align-items: stretch !important;
    gap: 2px !important;
    min-height: 46px !important;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #ffffff80 transparent;
    scroll-padding-inline: 8px;
}
#player-profile.profile-refresh [data-testid="player-tabs"] .nav-tab {
    text-decoration: none;
    text-align: center;
    flex: 0 0 auto;
    width: auto !important;
    min-height: 46px !important;
    padding: 12px 15px !important;
    border: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    color: #fff !important;
    background: transparent !important;
    font-size: .84rem !important;
    font-weight: 650;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: none !important;
    text-overflow: clip;
    overflow: visible;
    transform: none !important;
}
#player-profile.profile-refresh [data-testid="player-tabs"] .nav-tab:hover { background: #ffffff20 !important; }
#player-profile.profile-refresh [data-testid="player-tabs"] .nav-tab.active { color: var(--profile-ink) !important; background: #fff !important; }
#player-profile.profile-refresh [data-testid="player-tabs"] .nav-tab::after { content: none !important; }
#player-profile.profile-refresh [data-testid="tabs-more-indicator"] { display: none !important; }
#player-profile.profile-refresh .profile-tab-mobile { display: none; }
#player-profile.profile-refresh [data-testid="bookmark-btn"] { min-width: 44px !important; min-height: 44px !important; top: 10px !important; right: 10px !important; }
#player-profile.profile-refresh :is(button, a, summary, select, input):focus-visible { outline: 3px solid #2975c5 !important; outline-offset: 3px; }
#player-profile.profile-refresh [data-testid="player-banner"] :is(button,a):focus-visible { outline: 2px solid #fff !important; outline-offset: -4px; }
#player-profile.profile-refresh [data-testid="player-banner"] .nav-tab.active:focus-visible { outline-color: var(--profile-ink) !important; }

#player-profile.profile-refresh .tab-content {
    min-width: 0;
    width: 100%;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
}
#player-profile.profile-refresh .content-card { border: 1px solid var(--profile-line); border-radius: 16px; box-shadow: 0 2px 7px #192b4305; min-width: 0; }
#player-profile.profile-refresh .content-card:hover { transform: none; box-shadow: 0 2px 7px #192b4305; }
#player-profile.profile-refresh .content-card::before { content: none !important; }
#player-profile.profile-refresh .content-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 0 15px;
    margin: 0 0 18px;
    border-bottom: 1px solid var(--profile-line);
    background: transparent;
}
#player-profile.profile-refresh .content-card .card-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -.018em; color: var(--profile-ink); gap: 10px; line-height: 1.35; }
#player-profile.profile-refresh .content-card .card-icon { display: inline-grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; color: var(--profile-ink); background: var(--profile-tint); font-size: .87rem; }
#player-profile.profile-refresh .profile-section-note { font-size: .79rem; line-height: 1.5; color: var(--profile-muted); margin: 0; }
#player-profile.profile-refresh .profile-recording-note { margin-bottom: 12px; }
#player-profile.profile-refresh .profile-empty-note { color: var(--profile-muted); font-size: .9rem; line-height: 1.6; margin: 0; }
#player-profile.profile-refresh .bio-text { max-width: 86ch; font-size: .95rem; line-height: 1.85; color: var(--profile-ink); }
#player-profile.profile-refresh .bio-text p { margin: 0; }
#player-profile.profile-refresh [data-testid="player-info-stats"] { grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 18px; }
#player-profile.profile-refresh .view-all-container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--profile-line); margin-top: 16px; padding-top: 12px; }
#player-profile.profile-refresh .profile-text-action { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 9px 14px; border: 1px solid var(--profile-line); border-radius: 10px; background: #fff; color: var(--profile-ink); font: inherit; font-size: .85rem; font-weight: 650; text-decoration: none; cursor: pointer; }
#player-profile.profile-refresh .profile-text-action:hover { border-color: var(--profile-ink); background: #f4f7fb; }
#player-profile.profile-refresh tr.player-game-latest > td { background: color-mix(in srgb,var(--latest-game-team-color,var(--player-primary-color)) 9%,white) !important; }
#player-profile.profile-refresh .profile-table-sticky :is(#recentGamesTable, #gameLogTable).unified-stats-table tbody tr.player-game-latest > td:not(.profile-filtered):not(.profile-stat-filtered):not(.stat-highlight):not(.highlighted-cell):not(.sorted-col) { background: color-mix(in srgb,var(--latest-game-team-color,var(--player-primary-color)) 9%,white) !important; }
#player-profile.profile-refresh tr.player-game-latest > td:first-child { box-shadow: inset 3px 0 0 var(--latest-game-team-color,var(--player-primary-color)); }
#player-profile.profile-refresh .stats-table-scroll-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
#player-profile.profile-refresh .stat-filter-help-popup { display: none; left: auto; right: 0; }
#player-profile.profile-refresh .stat-filter-help-popup.is-open { display: block; }
#player-profile.profile-refresh .stat-filter-help-close { min-width: 44px; min-height: 44px; }
#player-profile.profile-refresh :is(#statistics, #trends) .toggle-switch { appearance: none; width: 50px; height: 44px; border-radius: 8px; background: transparent !important; --toggle-knob-size: 20px; flex: 0 0 50px; }
#player-profile.profile-refresh :is(#statistics, #trends) .toggle-switch::before { content: ''; display: block !important; position: absolute; inset: 10px 0; border-radius: 14px; background: #dbe2ea; }
#player-profile.profile-refresh :is(#statistics, #trends) .toggle-switch.active::before { background: var(--player-primary-color); }

#player-profile.profile-refresh .next-fixture-round { color: var(--profile-muted); font-size: .78rem; margin: 0 0 8px; }
#player-profile.profile-refresh .next-fixture-matchup { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; color: var(--profile-ink); font-size: 1.18rem; }
#player-profile.profile-refresh .next-fixture-vs { color: var(--profile-muted); font-size: .82rem; }
#player-profile.profile-refresh .next-fixture-details { color: var(--profile-muted); font-size: .85rem; margin: 12px 0 16px; line-height: 1.6; }
#player-profile.profile-refresh .next-fixture-footer { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
#player-profile.profile-refresh .career-highs-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; }
#player-profile.profile-refresh .career-high { min-width: 0; padding: 18px 20px; border-bottom: 1px solid var(--profile-line); border-right: 1px solid var(--profile-line); }
#player-profile.profile-refresh .career-high:nth-child(3n) { border-right: 0; }
#player-profile.profile-refresh .career-high h3 { font-size: .86rem; font-weight: 600; color: var(--profile-muted); margin: 0 0 6px; }
#player-profile.profile-refresh .career-high-value { font-size: 2.3rem; font-weight: 730; letter-spacing: -.04em; line-height: 1.1; color: var(--profile-ink); margin: 0 0 12px; font-variant-numeric: tabular-nums; }
#player-profile.profile-refresh .career-high-date { font-size: .83rem; font-weight: 600; margin: 0 0 4px; color: var(--profile-ink); }
#player-profile.profile-refresh .career-high a { color: inherit; text-underline-offset: 3px; }
#player-profile.profile-refresh .career-high-opponent, #player-profile.profile-refresh .career-high-coverage { margin: 0; font-size: .75rem; line-height: 1.55; color: var(--profile-muted); }
#player-profile.profile-refresh .career-high-coverage { margin-top: 10px; font-size: .68rem; }
#player-profile.profile-refresh .career-high-unrecorded { color: var(--profile-muted); font-weight: 600; font-size: 1rem; min-height: 40px; }
#player-profile.profile-refresh .career-high-ties { margin-top: 8px; font-size: .78rem; color: var(--profile-ink); }
#player-profile.profile-refresh .career-high-ties summary { cursor: pointer; padding-block: 10px; min-height: 44px; box-sizing: border-box; }
#player-profile.profile-refresh .career-high-ties ul { padding-left: 16px; max-height: 180px; overflow: auto; line-height: 1.8; }

#player-profile.profile-refresh .timeline-viewport::before { background: var(--profile-line); width: 1px; left: 13px; }
#player-profile.profile-refresh .timeline-events { gap: 16px; }
#player-profile.profile-refresh .timeline-event { margin-left: 30px; padding: 18px 20px; border: 1px solid var(--profile-line); border-radius: 12px; box-shadow: none; background: #fff; gap: 9px; }
#player-profile.profile-refresh .timeline-event::before { left: -23px; top: 23px; bottom: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--player-primary-color); opacity: 1; outline: 5px solid #fff; }
#player-profile.profile-refresh .timeline-event-date { color: var(--profile-muted); font-size: .78rem; font-weight: 550; }
#player-profile.profile-refresh .timeline-event-title { margin: 0; color: var(--profile-ink); font-size: 1rem; font-weight: 700; letter-spacing: -.015em; }
#player-profile.profile-refresh .timeline-event-category, #player-profile.profile-refresh .timeline-event-badge { color: var(--profile-ink); background: var(--profile-tint); padding: 4px 8px; border: 0; border-radius: 6px; font-size: .69rem; font-weight: 600; }
#player-profile.profile-refresh .timeline-chip { background: #f5f7fa; border: 0; border-radius: 5px; color: var(--profile-ink); padding: 4px 8px; font-size: .77rem; }
#player-profile.profile-refresh .timeline-event-meta { font-size: .78rem; line-height: 1.5; color: var(--profile-muted); margin: 0; }
#player-profile.profile-refresh .timeline-event-actions { margin-top: 3px; }
#player-profile.profile-refresh .timeline-match-centre-link { background: transparent; color: var(--profile-ink); border: 1px solid var(--profile-line); border-radius: 8px; min-height: 44px; padding: 9px 12px; font-size: .78rem; text-decoration: none; }

@media (max-width: 820px) {
    #player-profile.profile-refresh [data-testid="player-banner"] .share-btn { left: 10px !important; right: auto !important; top: 10px !important; width: 44px !important; height: 44px !important; }
    #player-profile.profile-refresh [data-testid="player-banner"] [data-testid="bookmark-btn"] { left: 54px !important; right: auto !important; }
    #player-profile.profile-refresh [data-testid="player-banner"] { min-height: 0 !important; background: color-mix(in srgb, var(--player-primary-color) 55%, #000); }
    #player-profile.profile-refresh [data-testid="banner-bg"] { display: none; }
    #player-profile.profile-refresh [data-testid="player-banner"] [data-testid="quick-stats"] { display: none !important; }
    #player-profile.profile-refresh .player-name-row .profile-team-full { display: none; }
    #player-profile.profile-refresh .player-name-row .team-link::after { content: attr(data-mobile-label); }
    #player-profile.profile-refresh [data-testid="player-banner"] .hero-content { padding: 0 12px !important; }
    #player-profile.profile-refresh [data-testid="player-banner"] .player-header { grid-template-columns: 100px minmax(0,1fr); grid-template-rows: auto auto; gap: 0 14px !important; min-height: 0 !important; }
    #player-profile.profile-refresh [data-testid="player-banner"] .player-image-container { grid-column: 1; grid-row: 1; height: 152px !important; }
    #player-profile.profile-refresh [data-testid="player-banner"] [data-testid="banner-text"] { display: contents !important; }
    #player-profile.profile-refresh [data-testid="player-banner"] .player-title-row { grid-column: 2; grid-row: 1; align-self: center; padding: 24px 0 18px; min-width: 0; }
    #player-profile.profile-refresh [data-testid="player-banner"] [data-testid="player-name"] { font-size: 1.5rem !important; white-space: normal !important; overflow-wrap: anywhere; }
    #player-profile.profile-refresh .player-name-row { gap: 8px; }
    #player-profile.profile-refresh .player-name-row > .meta-item { font-size: .73rem; padding: 5px 9px; }
    #player-profile.profile-refresh [data-testid="tabs-menu"] { grid-column: 1 / -1; grid-row: 2; width: calc(100% + 24px); margin: 0 -12px !important; overflow: visible; }
    #player-profile.profile-refresh [data-testid="player-tabs"] { display: grid !important; grid-template-columns: repeat(5,minmax(0,1fr)); overflow: visible !important; gap: 0 !important; background: color-mix(in srgb, var(--player-primary-color) 45%, #000) !important; }
    #player-profile.profile-refresh [data-testid="player-tabs"] .nav-tab { width: 100% !important; min-width: 0 !important; padding: 12px 2px !important; font-size: .76rem !important; }
    #player-profile.profile-refresh .profile-tab-full { display: none; }
    #player-profile.profile-refresh .profile-tab-mobile { display: inline; }
    #player-profile.profile-refresh .stat-filter-header { position: relative; }
    #player-profile.profile-refresh .stat-filter-help { position: static; }
    #player-profile.profile-refresh .stat-filter-help-popup { left: 0; right: 0; width: auto; max-width: 100%; }
    #player-profile.profile-refresh .content-card { padding: 18px 16px; }
    #player-profile.profile-refresh .content-card .card-title { font-size: .98rem; }
    #player-profile.profile-refresh .career-highs-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #player-profile.profile-refresh .career-high { padding: 16px 10px; }
    #player-profile.profile-refresh .career-high:nth-child(3n) { border-right: 1px solid var(--profile-line); }
    #player-profile.profile-refresh .career-high:nth-child(2n) { border-right: 0; }
    #player-profile.profile-refresh .career-high-value { font-size: 2rem; }
    #player-profile.profile-refresh .timeline-event { margin-left: 21px; padding: 14px; }
    #player-profile.profile-refresh .timeline-event::before { left: -17px; }
    #player-profile.profile-refresh .timeline-viewport::before { left: 9px; }
    #player-profile.profile-refresh .timeline-event-header { gap: 7px; }
    #player-profile.profile-refresh .timeline-event-match-row { gap: 6px; flex-wrap: wrap; }
}
@media (max-width: 400px) {
    #player-profile.profile-refresh [data-testid="player-banner"] .player-header { grid-template-columns: 86px minmax(0,1fr); gap: 0 12px !important; }
    #player-profile.profile-refresh [data-testid="player-banner"] [data-testid="player-name"] { font-size: 1.28rem !important; }
    #player-profile.profile-refresh [data-testid="player-banner"] [data-testid="quick-stats"] { gap: 15px !important; }
    #player-profile.profile-refresh [data-testid="player-info-stats"] { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
    #player-profile.profile-refresh .view-all-container .profile-text-action { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    #player-profile.profile-refresh *, #player-profile.profile-refresh *::before, #player-profile.profile-refresh *::after { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
}
