/* v1.0.3 Phase 1. Load after the legacy page styles. Primary identities never clamp.
  2–3 lines are an expected layout, not a maximum: longer names remain readable. */
:root {
  --sport-font: var(--font-body);
  --sport-name-size: 13px;
  --sport-name-leading: 1.35;
  --sport-logo-size: 38px;
  --sport-portrait-width: 42px;
  --sport-portrait-height: 56px;
  --sport-gap: 8px;
}
/* Phase 5: the native modal keeps background controls inert and traps focus. */
body.dialog-open { overflow: hidden; }
dialog.is-more { padding: 20px; font-family: var(--sport-font); }
dialog.is-more h2 { margin: 0 56px 16px 0; padding: 0; font: 700 20px/48px var(--sport-font); }
dialog.is-more #close-dialog { top: 20px; right: 16px; width: 48px; height: 48px; border-radius: 8px; }
dialog.is-more .menu-link { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 10px 12px; font-size: 14px; line-height: 1.4; border: 0; border-radius: 8px; }
dialog.is-more .menu-link svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
dialog.is-more .menu-link:hover { background: var(--bg-elevated); }
dialog.is-more :focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (max-width: 859px) {
  dialog.is-more { position: fixed; inset: auto 0 var(--bottom-nav-h); margin: 0 auto; width: 100%; max-width: none; height: 60dvh; max-height: calc(100dvh - var(--bottom-nav-h) - 16px); border: 0; border-radius: 22px 22px 0 0; padding: 16px; overflow-y: auto; box-shadow: 0 -8px 32px #08152620; }
  dialog.is-more::backdrop { background: #08152699; }
  dialog.is-more #close-dialog { top: 16px; }
  .page-heading > .eyebrow, .page-heading > p:empty { display: none; }
  .page-heading:not(:has(h1)) { display: none; }
}
.sport-name { min-width: 0; white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: none; line-height: var(--sport-name-leading); }
.sport-team { display: flex; align-items: center; gap: var(--sport-gap); min-width: 0; }
.sport-team > .team-logo { flex: none; }
.sport-team > .sport-name { font-size: var(--sport-name-size); }
.sport-player { display: flex; align-items: center; gap: var(--sport-gap); min-width: 0; font-family: var(--sport-font); }
.sport-player-copy { display: grid; gap: 4px; min-width: 0; flex: 1; }
.sport-player-team { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 11px; }
.sport-portrait { display: grid; place-items: center; flex: 0 0 var(--sport-portrait-width); width: var(--sport-portrait-width); height: var(--sport-portrait-height); background: var(--bg-elevated); border-radius: 5px; overflow: hidden; }
.sport-portrait img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.sport-placeholder { font-weight: 700; color: var(--text-secondary); }
.sport-jersey { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }
.sport-match { display: grid; gap: 12px; padding: 12px; min-width: 0; font-family: var(--sport-font); }
.sport-match-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sport-venue { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.sport-match-teams { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: var(--sport-gap); }
.sport-match-result { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Phase 2: one match face for Weekly Game Center and /matches. Compact changes spacing only. */
.sport-match { padding: 16px 8px 12px; gap: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text-primary); box-shadow: 0 3px 10px #16223505; }
.sport-match:hover { border-color: var(--accent); }
.sport-match:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sport-match-teams { grid-template-columns: minmax(0,1fr) 64px minmax(0,1fr); align-items: start; gap: 4px; }
.sport-match-teams > .sport-team { flex-direction: column; text-align: center; align-self: start; gap: 8px; }
.sport-match-teams .team-logo { width: 48px; height: 48px; border-radius: 10px; background: #f7f8fa; }
.sport-match-teams .sport-name { width: 100%; font-weight: 700; }
.sport-match-center { display: grid; justify-items: center; align-content: center; gap: 7px; min-height: 48px; }
.sport-match-result { font-size: 16px; line-height: 1.2; color: var(--text-primary); }
.sport-match-center .status-badge { font-size: 8px; padding: 3px 5px; letter-spacing: .2px; }
.sport-match-center .status-live { background: #fff0e8; color: #b53d14; }
.sport-match-meta { justify-content: center; flex-wrap: wrap; gap: 4px 8px; padding-top: 8px; border-top: 1px solid #f0f1f4; color: var(--text-secondary); }
.sport-match-meta .sport-venue { max-width: 100%; }
.sport-state-note { font-size: 10px; color: var(--text-secondary); }
.sport-match--compact { padding-block: 12px 10px; }
.sport-match-list { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; min-width: 0; }
.weekly-game-center { padding: 16px; background: var(--bg-elevated); border: 1px solid var(--border); }
.weekly-game-center .gc-title { color: var(--text-primary); text-transform: none; font-size: 17px; letter-spacing: -.2px; }
.weekly-game-center .see-all { color: var(--accent); }
.gc-week-label { font-size: 11px; color: var(--text-secondary); margin: 0 0 16px; }
.gc-week-list { display: grid; gap: 18px; min-width: 0; }
.gc-day > h3 { margin: 0 0 9px; font: 700 12px var(--font-body); color: var(--text-secondary); }
.weekly-game-center .reference-empty--light { color: var(--text-secondary); background: #fff; }
.weekly-game-center .reference-empty--light strong { color: var(--text-primary); }
.matches-page .match-day-heading { margin: 22px 0 10px; padding: 0; }
.matches-page .match-day-heading h3 { font-size: 13px; color: var(--text-secondary); }
.home-group-control { display: grid; gap: 5px; margin: 12px 0; color: var(--text-secondary); font-size: 11px; font-weight: 600; min-width: 0; }
.home-group-control select { min-width: 0; width: 100%; max-width: 100%; min-height: 40px; padding: 7px 28px 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font: 600 12px var(--font-body); color: var(--text-primary); }
@media (min-width: 860px) {
  .sport-match-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .weekly-game-center .sport-match-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 859px) {
  .matches-page .filter-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin-bottom: 20px; }
  .matches-page .filter-tabs button { min-width: 0; min-height: 40px; padding: 8px 3px; font-size: 10px; border-radius: 9px; white-space: normal; }
  .weekly-game-center { padding: 12px; }
}
/* Contain the entire crest inside a padded canvas, including wide/tall logos.
   Rounded backgrounds must not round/crop the image itself. Player photos are separate. */
.team-logo img { width: 78%; height: 78%; object-fit: contain; border-radius: 0; }
/* Phase 3: scoped team directory and reusable player row. */
/* Phase 4: Players reuses the same row; desktop keeps the existing directory cards. */
.players-mobile-list { display: none; }
.players-directory [data-player-name][hidden] { display: none; }
.players-desktop-grid > [data-player-name] { display: flex; min-width: 0; }
.players-desktop-grid .tc-list-card { width: 100%; }
.player-directory-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 8px; }
.player-directory-controls label { display: grid; gap: 6px; min-width: 0; font-size: 12px; font-weight: 600; }
.player-directory-controls input,.player-directory-controls select { width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--border); border-radius: 9px; padding: 10px; font: inherit; background: #fff; }
#player-directory-count { font-size: 11px; color: var(--text-secondary); margin: 8px 0 16px; }
.sport-player--team-right .sport-player-context { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 11px; color: var(--text-secondary); }
.sport-player--team-right .sport-player-context .sport-name { font-size: 11px; font-weight: 400; }
.sport-player--team-right .sport-player-context .sport-jersey--subtle { font-size: 10px; margin-left: 0; font-weight: 600; }
.sport-player--team-right .sport-player-team-logo { width: 32px; height: 32px; flex: none; border-radius: 6px; }
.stats-table .stats-identity .stats-mobile-team { display: none; }
.stats-table--players { --stat-count: 12; }
.stats-table--teams { --stat-count: 10; }
.advanced-table.stats-table--players { --stat-count: 11; }
.advanced-table.stats-table--teams { --stat-count: 9; }
@media (max-width: 859px) {
  .players-directory .players-desktop-grid { display: none; }
  .players-mobile-list { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
  .player-directory-controls { grid-template-columns: minmax(0,1fr); }
  /* Native table rows align their height to full identities. Only data columns move
     under the pinned rank/name panel; team names are part of that same panel. */
  .stats-page { --stats-identity-width: 170px; --stats-rank-width: 28px; --stat-column-width: 56px; }
  .advanced-page { --stat-column-width: 66px; }
  .stats-page .stats-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; width: calc(var(--stats-identity-width) + var(--stats-rank-width) + var(--stat-count)*var(--stat-column-width)); min-width: 0; }
  .stats-page .stats-team-column { display: none; }
  .stats-page .stats-table .stats-rank { position: sticky; left: 0; z-index: 2; width: var(--stats-rank-width); min-width: var(--stats-rank-width); max-width: var(--stats-rank-width); background: #fff; padding: 12px 3px; vertical-align: top; }
  .stats-page .stats-table .stats-identity { position: sticky; left: var(--stats-rank-width); z-index: 2; width: var(--stats-identity-width); min-width: var(--stats-identity-width); max-width: var(--stats-identity-width); padding: 12px 8px; background: #fff; white-space: normal; box-shadow: 3px 0 5px #1622350a; }
  .stats-page .stats-table .stats-identity a { width: 100%; min-width: 0; max-width: none; white-space: normal; text-overflow: clip; overflow: visible; font-size: 12px; }
  .stats-page .stats-table .stats-player-thumb { display: none; }
  .stats-page .stats-table .stats-mobile-team { display: flex; align-items: start; width: 100%; min-width: 0; margin-top: 5px; font-size: 10px; color: var(--text-secondary); font-weight: 400; gap: 5px; }
  .stats-page .stats-mobile-team .stats-table-logo { width: 16px; height: 16px; }
  .stats-page .stats-team-name { min-width: 0; white-space: normal; word-break: normal; overflow-wrap: normal; }
  .stats-page .stats-table td:not(.stats-rank) { padding: 9px 5px; font-size: 11px; }
  .stats-page .stats-table thead th:not(.stats-rank):not(.stats-identity) { padding: 12px 3px; }
  .stats-page .stats-table thead .stats-rank,.stats-page .stats-table thead .stats-identity { z-index: 3; background: #f6f7f8; }
  .stats-page .stats-table tbody tr:nth-child(even) .stats-rank,.stats-page .stats-table tbody tr:nth-child(even) .stats-identity { background: #fbfcfc; }
}
@media (min-width: 601px) and (max-width: 859px) {
  .stats-page { --stats-identity-width: 220px; }
}
.teams-directory .tc-list-card { align-items: center; text-align: center; padding: 14px 10px; gap: 10px; }
.teams-directory .tc-list-card h2 { font-size: 14px; line-height: var(--sport-name-leading); width: 100%; white-space: normal; word-break: normal; overflow-wrap: normal; }
.teams-directory .tc-list-emblem { width: 54px; height: 54px; border-radius: 10px; flex: none; background: #f7f8fa; }
.teams-directory .tc-list-card[hidden] { display: none; }
.team-search { display: grid; gap: 6px; font-size: 12px; font-weight: 600; max-width: 480px; }
.team-search input { width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; font: inherit; }
#team-search-count { color: var(--text-secondary); font-size: 11px; margin: 8px 0 16px; }
.sport-player--row.tc-player-card { display: flex; padding: 10px; min-height: 78px; overflow: visible; gap: 10px; }
.sport-player--row .sport-player-copy { display: grid; padding: 0; min-width: 0; }
.sport-player--row .sport-name { font-size: 13px; white-space: normal; word-break: normal; overflow-wrap: normal; overflow: visible; text-overflow: clip; -webkit-line-clamp: unset; }
.sport-player--row .sport-jersey { margin-left: auto; font-size: 17px; }
.tc-page .detail-games { display: grid; gap: 10px; min-width: 0; }
@media (max-width: 859px) {
  .teams-directory .directory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .teams-directory .tc-list-card h2 { font-size: 13px; letter-spacing: 0; }
  .tc-page .mc-section:has(.detail-games) { padding-inline: 8px; }
}
.tc-list-emblem:not(.tc-list-emblem--player) img { width: 82%; height: 82%; object-fit: contain; object-position: center; border-radius: 0; }
/* The only migrated markup is gameRow: two team zones replace the five loose tracks.
   Desktop retains name/crest/score/crest/name alignment. */
.match-row-matchup { grid-template-columns: minmax(0,1fr) 56px minmax(0,1fr); }
.match-row-matchup > .sport-team:first-child { flex-direction: row-reverse; text-align: right; }
.match-row-matchup .match-team-name { flex: 1; }
@media (min-width: 860px) {
  .match-row-matchup { grid-template-columns: minmax(0,1fr) 78px minmax(0,1fr); }
}
@media (max-width: 859px) {
  /* The homepage already uses bundled Poppins Latin + Latin Extended.
     Legacy global body/control/heading rules otherwise retain Inter/Manrope. */
  body, button, input, select, textarea,
  h1, h2, h3, .game-score, .game-team b, .home-table tbody th {
    font-family: var(--sport-font);
  }
  :is(.sport-name, .gc-team-name, .match-team-name, .upcoming-team-name,
      .game-team b, .home-team-story > span:last-child, .home-leader-info > a,
      .home-leader-team, .standings-table .col-team a span:last-child,
      .home-table tbody th a span:last-child, .st-team a > span:last-child,
      .tc-name, .pc-name, .pc-team-link, .tc-list-card h2, .tc-list-card small,
      .tc-player-first, .tc-player-surname, .roster-name strong,
      .stats-player-name, .stats-team-link, .stats-leader-person > a,
      .stats-leader-team, .stats-leader-list a, .stats-table .stats-identity a,
      .tt-table .tt-name, .tt-table .tt-name a, .table-player,
      .mc-game-team-name, .mc-overview-player, .mc-overview-team-identity,
      .mc-overview-team-head span, .mc-top-player-link, .mc-compare-header strong,
      .pg-roster-team-header h3, .mc-box-team-header h3, .pc-career-table .pc-career-team,
      .mc-oncourt-player, .mc-pbp-actor, .mc-pbp-action, .article-score-name, .article-leader-name) {
    min-width: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    overflow: visible;
    text-overflow: clip;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    line-height: var(--sport-name-leading);
  }
  /* Give words room rather than splitting letters inside desktop-width tracks. */
  .match-row-matchup > .sport-team,
  .match-row-matchup > .sport-team:first-child,
  .sport-match-teams > .sport-team { flex-direction: column; text-align: center; align-self: start; }
  .match-row-matchup { gap: 8px; }
  .match-row-matchup .match-team-name { font-size: var(--sport-name-size); width: 100%; }
  .gc-card { height: auto; min-height: 124px; }
  .gc-team-name { font-size: var(--sport-name-size); }
  .home-leader-team > .team-logo { flex: none; }
  .home-upcoming .upcoming-teams { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 5px; }
  .home-upcoming .upcoming-teams > .team-logo:last-child { grid-column: 1; grid-row: 2; }
  .home-upcoming .upcoming-team-name { grid-column: 2; text-align: left; }
  .home-upcoming .upcoming-team-name:nth-child(2) { grid-row: 1; }
  .home-upcoming .upcoming-team-name:nth-child(4) { grid-row: 2; }
  .home-upcoming .upcoming-score { display: none; }
  .home-upcoming .upcoming-team-name { font-size: var(--sport-name-size); }
  .directory-grid { min-width: 0; }
  .tc-roster-grid { grid-template-columns: minmax(0,1fr); }
  .tc-player-card .tc-player-portrait,
  .tc-player-card:has(.tc-player-portrait img) .tc-player-portrait {
    display: flex; align-self: center; flex: 0 0 var(--sport-portrait-width);
    width: var(--sport-portrait-width); height: var(--sport-portrait-height); padding: 4px 3px 0;
  }
  .tc-player-portrait .tc-player-silhouette { width: 100%; height: 100%; }
  .tc-player-surname { font-size: var(--sport-name-size); }
  .tc-player-first { font-size: var(--sport-name-size); }
  .tc-player-info { gap: var(--sport-gap); }
  .pc-title-line { display: block; }
  .pc-title-line .pc-jersey { display: block; margin-bottom: 4px; }
  .stats-table .stats-identity a { max-width: none; width: 100%; }
  .stats-table .stats-identity { width: 190px; min-width: 190px; max-width: 190px; }
  .stats-team-link { width: 190px; max-width: 190px; }
  .tt-table .tt-name { width: 190px; min-width: 190px; max-width: 190px; }
  .mc-box-table .table-player,
  .mc-box-table th:has(.mc-box-player-thumb) .table-player { max-width: none; }
  .mc-box-table th:nth-child(2), .mc-box-table td:nth-child(2) { width: 230px; min-width: 230px; max-width: 230px; }
  .mc-box-table th:has(.mc-box-player-thumb) .table-player { max-width: calc(100% - 30px); }
  .stats-leader-main { display: grid; grid-template-columns: 62px minmax(0,1fr) auto; }
  .stats-leader-main > strong { margin-left: 0; }
  .stats-leader-list li { padding-block: 8px; }
}
@media (min-width: 601px) and (max-width: 859px) {
  /* Tablet keeps the existing three-zone hero with smaller fixed image canvases. */
  .pc-hero-body { grid-template-columns: 110px minmax(0,1fr) 96px; column-gap: 16px; }
  .pc-emblem { width: 110px; height: 170px; }
  .pc-team-logo { width: 96px; height: 90px; padding: 8px; }
  .pc-portrait .tc-player-silhouette { width: 110px; height: 168px; }
}
@media (max-width: 600px) {
  /* Three-digit scores cannot steal the space required for whole team-name words. */
  .mc-game-body { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .mc-game-team--home { grid-column: 1; grid-row: 1; }
  .mc-game-team--away { grid-column: 2; grid-row: 1; }
  .mc-game-time, .mc-game-score { grid-column: 1/-1; grid-row: 2; }
  .mc-game-status { grid-row: 3; }
  .mc-oncourt-grid { grid-template-columns: minmax(0,1fr); }
  .pc-career-table { width: 688px; min-width: 688px; }
  .pc-career-table col:nth-child(2) { width: 190px; }
}

/* Post-v1.0.3 polish: presentation only; rolling-window selection stays in weekly-games.js. */
.weekly-game-center .gc-week-list { display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; padding: 2px 2px 12px; }
.weekly-game-center .gc-day { display: flex; flex-direction: column; flex: 0 0 320px; min-width: 0; scroll-snap-align: start; }
.weekly-game-center .gc-day > .sport-match { flex: 1; grid-template-rows: 1fr auto; }
.weekly-game-center .sport-match-list { grid-template-columns: minmax(0,1fr); }
.weekly-game-center .sport-match-teams { grid-template-columns: minmax(0,1fr) 78px minmax(0,1fr); }
.weekly-game-center .sport-name { font-size: 12px; }
.weekly-game-center .gc-week-list:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sport-match-teams { grid-template-columns: minmax(0,1fr) 74px minmax(0,1fr); }
.sport-match:has(.status-upcoming) .sport-match-result { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.sport-match:has(.status-finished) .sport-match-result, .sport-match:has(.status-live) .sport-match-result { font-size: 21px; font-weight: 800; letter-spacing: -.04em; color: var(--text-primary); }
.sport-match:has(.status-finished) { border-color: #cbd3db; background: #fff; }
.sport-match:has(.status-finished) .status-finished { background: #eef2f5; color: #344454; font-weight: 700; }
:is(.st-league-block,.home-pulse-panel,.listing-news,.article-detail,.home-news-feature) { font-family: var(--font-body); }
:is(.st-league-block,.home-pulse-panel,.listing-news,.article-detail,.home-news-feature) :is(h1,h2,h3,.section-heading,.page-heading,.home-news-copy strong) { font-family: var(--font-heading); }
.listing-news h3 { font-size: 20px; line-height: 1.35; font-weight: 700; letter-spacing: -.02em; }
.listing-news p { font-size: 13px; line-height: 1.65; }
@media (min-width: 860px) {
  :root { --content-max: 1440px; }
  .app { width: calc(100% - 48px); }
  .app .public-page { width: 100%; max-width: 1360px; }
}
@media (max-width: 859px) {
  .weekly-game-center .gc-day { flex-basis: min(320px,calc(100vw - 64px)); }
  .sport-match .sport-name { font-size: 12px; }
  .mc-overview-heading { align-items: flex-start; flex-wrap: wrap; }
  .mc-overview-heading h2 { flex: 1 1 180px; }
  /* Full names get their own row; avatar and value remain compact below. */
  .mc-overview-leader-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px 14px; padding-block: 12px; align-items: start; }
  .mc-overview-metric { grid-column: 1/-1; grid-row: 1; text-align: left; }
  .mc-overview-side { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 6px; text-align: left; }
  .mc-overview-side--home { grid-column: 1; grid-row: 2; }
  .mc-overview-side--away { grid-column: 2; grid-row: 2; text-align: left; }
  .mc-overview-player { grid-column: 1/-1; grid-row: 1; font-size: 12px; }
  .mc-overview-avatar { grid-column: 1; grid-row: 2; }
  .mc-overview-value { grid-column: 2; grid-row: 2; font-size: 17px; }
  .mc-top-table th:first-child, .mc-top-table td:first-child { width: 24px; }
  .mc-top-table th:nth-child(2) { width: auto; }
  .mc-top-table th:nth-child(n+3) { width: 28px; }
  .mc-top-table td:nth-child(2) { text-align: left; }
  .mc-top-player-link { display: block; }
  /* The identity cell itself must grow too, not just the link inside it. */
  .mc-box-table tbody tr>th:nth-child(2) { height: auto; white-space: normal; overflow: visible; }
  .mc-box-table .table-player { display: block; width: 100%; max-width: none; white-space: normal; overflow: visible; text-overflow: clip; word-break: normal; overflow-wrap: normal; }
  .mc-box-table th:has(.mc-box-player-thumb) .table-player { max-width: none; }
  .mc-box-table .mc-box-player-thumb { float: left; margin-bottom: 4px; }
  .mc-box-table .mc-box-mobile-number { min-width: 0; margin-bottom: 3px; }
}

/* Game Center correction: original accent surface and native carousel at every width. */
.weekly-game-center { background: linear-gradient(115deg,var(--accent-2),var(--accent) 45%,var(--accent-deep) 100%); border-color: transparent; }
.weekly-game-center .gc-title, .weekly-game-center .see-all { color: #fff; }
.weekly-game-center .gc-week-label, .weekly-game-center .gc-day > h3 { color: #fff; }
.weekly-game-center .gc-head-actions { display: flex; align-items: center; gap: 18px; }
.weekly-game-center .gc-controls { display: none; gap: 6px; }
.weekly-game-center .gc-controls[hidden] { display: none; }
.weekly-game-center .gc-controls button { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid #ffffff80; border-radius: 50%; background: #fff; color: var(--accent-deep); font: 700 26px var(--font-body); cursor: pointer; }
.weekly-game-center .gc-controls button:disabled { opacity: .45; cursor: default; }
.weekly-game-center .gc-controls button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.weekly-game-center .gc-day { scroll-snap-align: center; }
.weekly-game-center .gc-week-list { scrollbar-color: #fff #ffffff40; }
.weekly-game-center .gc-week-list:focus-visible { outline-color: #fff; }
@media (min-width: 860px) {
  .weekly-game-center .gc-controls:not([hidden]) { display: flex; }
  .weekly-game-center .gc-day { flex-basis: clamp(360px,31%,420px); }
}

/* Compact Game Center only: intrinsic card height keeps venue next to the identities. */
.weekly-game-center { padding: 14px; }
.weekly-game-center .gc-week-label { margin-bottom: 8px; }
.weekly-game-center .gc-week-list { align-items: flex-start; padding-bottom: 6px; }
.weekly-game-center .gc-day { flex-basis: min(300px,calc(100vw - 80px)); }
.weekly-game-center .gc-day > h3 { margin-bottom: 6px; }
.weekly-game-center .gc-day > .sport-match { flex: none; grid-template-rows: auto auto; padding: 10px 8px 8px; gap: 6px; }
.weekly-game-center .sport-match-teams { position: relative; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.weekly-game-center .sport-match-teams > .sport-team { gap: 8px; }
.weekly-game-center .sport-match-teams .team-logo { width: 40px; height: 40px; border-radius: 8px; }
.weekly-game-center .sport-match-center { position: absolute; top: 0; left: 50%; transform: translateX(-50%); min-height: 36px; gap: 5px; }
.weekly-game-center .sport-name { line-height: 1.25; }
.weekly-game-center .sport-match-meta { padding-top: 6px; }
@media (min-width: 860px) {
  .weekly-game-center .gc-day { flex-basis: clamp(280px,24%,320px); }
}


/* Standings labels + optional desktop form; canonical table values are unchanged. */
.st-table .st-form { width: 126px; }
.st-form-marks { display: inline-flex; gap: 4px; }
.st-form-mark { display: inline-grid; place-items: center; width: 18px; height: 22px; border-radius: 4px; font: 700 10px var(--font-body); }
.st-form-win { background: #e6f3eb; color: #216845; }
.st-form-loss { background: #fae9e7; color: #9f3430; }
.st-form-unknown, .st-form-empty { color: var(--text-secondary); }
.st-table .st-team a > span:last-child { white-space: normal; overflow: visible; text-overflow: clip; word-break: normal; overflow-wrap: normal; }
@media (max-width: 859px) { .st-table .st-form { display: none; } }

/* Mobile match box score: a compact player cell so MIN, TŠK and at least two more statistics fit a ~390px screen before horizontal scrolling.
   Player cell: photo + #number on the first row, given name(s) on the second row, surname on the third (production feedback on very long names); see .mc-bp below.
   Same table, same data, same sticky first column; tablet/desktop are untouched (max-width: 600px only). */
@media (max-width: 600px) {
  .mc-box-score-wrap .mc-box-table { width: 1218px; min-width: 1218px; }
  .mc-box-score-wrap .mc-box-table col:nth-child(2) { width: 124px; }
  .mc-box-score-wrap .mc-box-table col:nth-child(n+3) { width: 48px; }
  .mc-box-score-wrap .mc-box-table col:nth-child(3) { width: 50px; }
  .mc-box-score-wrap .mc-box-table col:nth-child(4) { width: 44px; }
  .mc-box-score-wrap .mc-box-table col:is(:nth-child(5),:nth-child(7),:nth-child(9),:nth-child(11)) { width: 58px; }
  .mc-box-score-wrap .mc-box-table thead tr:not(.mc-box-groups)>th:nth-child(2),
  .mc-box-score-wrap .mc-box-table tbody tr>th:nth-child(2) { width: 124px; min-width: 124px; max-width: 124px; padding-inline: 6px; }
  .mc-box-score-wrap .mc-box-table th, .mc-box-score-wrap .mc-box-table td { padding-inline: 4px; }
  .mc-box-score-wrap .mc-box-table tbody tr>th:nth-child(2) { line-height: 1.2; }
  /* Player cell = a 3-row grid: [photo] [#nr] [S] / given name(s) / surname. The link is one grid item, so the whole name stays one tap target. */
  .mc-box-score-wrap .mc-box-table .mc-bp { display: grid; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 4px; row-gap: 2px; }
  .mc-box-score-wrap .mc-box-table .mc-bp .mc-box-player-thumb { grid-column: 1; grid-row: 1; float: none; width: 18px; height: 21px; margin: 0; }
  .mc-box-score-wrap .mc-box-table .mc-bp .mc-box-mobile-number { grid-column: 2; grid-row: 1; display: block; min-width: 0; margin: 0; font-size: 10.5px; line-height: 1.2; }
  .mc-box-score-wrap .mc-box-table .mc-bp .mc-starter-badge { grid-column: 3; grid-row: 1; justify-self: end; margin: 0; }
  .mc-box-score-wrap .mc-box-table .mc-bp .table-player { grid-column: 1 / -1; grid-row: 2; display: block; width: auto; max-width: none; font-size: 11.5px; line-height: 1.2; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .mc-box-score-wrap .mc-box-table .mc-bp .mc-bp-name, .mc-box-score-wrap .mc-box-table .mc-bp .mc-bp-given, .mc-box-score-wrap .mc-box-table .mc-bp .mc-bp-family { display: block; }
  .mc-box-score-wrap .mc-box-table th:has(.mc-box-player-thumb) .mc-bp .table-player { max-width: none; }
}
/* Player career: the legacy tournament a stint belongs to, shown only when it differs from the group heading (e.g. Didžioji vs Mažoji taurė, Rudens taurė 2023), so two rows of one season/team are self-explanatory. */
.pc-career-table .pc-career-sub { display: block; max-width: 100%; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); font-size: 11px; font-weight: 500; }

/* Mobile match boxscore (<=600px only): compact player cell "#44 M. Trakimavičius", sticky player column, horizontally scrolling statistics, team switcher, starters/bench rows.
   Above 600px .mbox stays hidden and the existing .mc-box-score-wrap tables render exactly as before; at <=600px those tables are hidden and .mbox (details.js mobileBoxScore) takes over.
   No inline styles and no JS: the CSP is strict, so the team switcher is native radios + :checked sibling selectors. */
.mbox { display: none; }

@media (max-width: 600px) {
  .mc-box-score-wrap { display: none; }

  .mbox { display: block; min-width: 0; font-variant-numeric: tabular-nums; }

  /* Team switcher: segmented control above the table, one tap per team. */
  .mbox-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; margin-bottom: 8px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #eceff3; }
  .mbox-tab { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 46px; padding: 5px 9px; border-radius: 7px; color: #536071; font-size: 12.5px; font-weight: 650; line-height: 1.15; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .mbox-tab img { flex: none; width: 24px; height: 24px; object-fit: contain; }
  .mbox-tab-name { flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
  .mbox-tab-score { flex: none; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
  .mbox-radio--0:checked ~ .mbox-switch .mbox-tab--0,
  .mbox-radio--1:checked ~ .mbox-switch .mbox-tab--1 { background: #fff; color: var(--navy); box-shadow: 0 1px 3px #101d3033, inset 0 -3px 0 var(--orange); }
  .mbox-radio--0:focus-visible ~ .mbox-switch .mbox-tab--0,
  .mbox-radio--1:focus-visible ~ .mbox-switch .mbox-tab--1 { outline: 2px solid var(--orange); outline-offset: 1px; }
  .mbox--tabs .mbox-panel { display: none; }
  .mbox--tabs .mbox-radio--0:checked ~ .mbox-panel--0,
  .mbox--tabs .mbox-radio--1:checked ~ .mbox-panel--1 { display: block; }

  .mbox-hint { margin: 0 0 6px; color: var(--muted); font-size: 11px; }

  /* Table: fixed layout, sticky player column, horizontally scrollable statistics. */
  /* Edge-to-edge scroller: the player column plus MIN..BL fit a 360px screen. */
  .mbox-rail { margin-inline: calc(50% - 50vw); max-width: 100vw; overflow-x: auto; overscroll-behavior-x: contain; border-block: 1px solid var(--line); background: #fff; }
  .mbox-table { width: 1002px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 12px; color: var(--ink); }
  .mbox-table col { width: 36px; }
  .mbox-table col:nth-child(1) { width: 142px; }
  .mbox-table col:nth-child(2) { width: 42px; }
  .mbox-table col:is(:nth-child(9), :nth-child(11), :nth-child(13), :nth-child(20)) { width: 44px; }
  .mbox-table col:is(:nth-child(10), :nth-child(12), :nth-child(14), :nth-child(21)) { width: 46px; }
  .mbox-table col:nth-child(16) { width: 40px; }
  .mbox-table col:is(:nth-child(17), :nth-child(18), :nth-child(19)) { width: 34px; }
  .mbox-table col:is(:nth-child(22), :nth-child(23)) { width: 32px; }

  .mbox-table th, .mbox-table td { padding: 0 3px; border-bottom: 1px solid #e9ecef; text-align: center; white-space: nowrap; }
  .mbox-table tbody tr:not(.mbox-sep) > :is(th, td) { height: 38px; }
  .mbox-table .mbox-gs { border-left: 1px solid #dfe5e9; }
  .mbox-table td.key { font-size: 13px; }
  .mbox-table td b { font-weight: 800; }
  .mbox-table abbr { text-decoration: none; cursor: default; }

  .mbox-table thead { background: #f4f5f7; color: #5b6676; text-transform: uppercase; }
  .mbox-table thead tr:not(.mbox-groups) th { height: 30px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
  .mbox-table .mbox-groups th { height: 20px; padding: 0; border-bottom: 1px solid #dce3e8; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-align: left; }
  .mbox-table .mbox-groups th span { position: sticky; left: 148px; display: inline-block; padding-left: 6px; }

  /* Sticky player column. */
  .mbox-table .mbox-player { position: sticky; left: 0; z-index: 2; padding: 0 4px 0 8px; background: #fff; text-align: left; border-right: 1px solid #dce1e4; box-shadow: 4px 0 6px -5px #101d3059; }
  .mbox-table thead :is(th).mbox-player, .mbox-table .mbox-groups th:first-child { z-index: 3; background: #f4f5f7; }
  .mbox-table .mbox-groups th:first-child { position: sticky; left: 0; border-right: 1px solid #dce1e4; }

  .mbox-player .table-player { display: flex; align-items: center; gap: 4px; min-height: 37px; max-width: none; white-space: nowrap; overflow: visible; color: var(--ink); font-size: 11.5px; font-weight: 650; text-decoration: none; }
  .mbox-player .table-player:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; border-radius: 3px; }
  .mbox-no { flex: none; min-width: 22px; color: #6b7684; font-size: 10px; font-weight: 700; }
  .mbox-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }

  /* Starting five: a slim accent bar on the player cell plus a section row — no badge column. */
  .mbox-table .mbox-starter .mbox-player { box-shadow: inset 3px 0 0 var(--orange), 4px 0 6px -5px #101d3059; }
  .mbox-table .mbox-sep th { height: 24px; padding: 0; background: #f1f3f6; color: #4a5563; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
  .mbox-table .mbox-sep th span { position: sticky; left: 0; display: inline-block; padding-left: 8px; }

  .mbox-table .mbox-dnp > :is(th, td) { background: #fafafa; color: #78818a; }
  .mbox-table .mbox-dnp .table-player { color: #65707a; }
  .mbox-table .mbox-dnp-cell { padding-left: 8px; text-align: left; font-size: 11.5px; font-weight: 600; }
  .mbox-table .mbox-dnp-cell span { position: sticky; left: 148px; }

  .mbox-table .mbox-totals > :is(th, td) { background: #eef1f2; border-top: 2px solid #cbd2d7; font-weight: 750; }
}

/* TOP 100 historical records page (/statistics/records): competition + category pills and a compact ranking table. Presentation only. */
.records-page .stats-table-head { margin-top: 4px; }
.records-tabs { display: flex; gap: 8px; margin: 0 0 12px; padding: 2px 0 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.records-tabs a { flex: 0 0 auto; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.records-tabs a:hover { border-color: #f0b99a; background: #fff6f0; }
.records-tabs a.is-selected { border-color: var(--orange); background: var(--orange); color: #fff; }
.records-tabs a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.records-competitions a { font-size: 14px; padding: 8px 16px; }
.records-categories a { font-size: 12.5px; padding: 6px 11px; }
.records-note { margin: 0 0 12px; padding: 9px 12px; border-left: 3px solid var(--orange); background: #fff6f0; color: #4a3b33; font-size: 12.5px; line-height: 1.45; }
.records-table { width: 100%; min-width: 0; }
.records-table .records-total { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: #a8431e; width: 96px; }
.records-table th.records-total { color: inherit; font-weight: 700; }
.records-table .records-player { color: inherit; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
a.records-player { color: var(--ink); text-decoration: underline; text-decoration-color: #d9dee4; text-underline-offset: 3px; }
a.records-player:hover { color: #a8431e; text-decoration-color: currentColor; }
a.records-player:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 2px; }
.records-player--plain { color: var(--ink); }
.records-foot { margin: 10px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
@media (max-width: 600px) {
  .records-table .stats-identity { width: auto; min-width: 0; max-width: none; }
  .records-table .records-total { width: 70px; }
  .records-competitions a { font-size: 13px; padding: 7px 13px; }
}

/* Row-card player photos (team Sudėtis, mobile player directory) in the unchanged 42×56 frame.
   The old inner padding + object-fit: contain shrank the 4:5 cut-out to ~26×33 px at the bottom of the frame.
   The stored 4:5 variant already is the wanted crop: hair from ~2–13%, neck ~45%, shoulders reaching the edges ~65%,
   then the jersey to the bottom. So the figure (from its first opaque row, --tc-photo-top, set by framePlayerPortrait)
   down to the image bottom fills the frame, its crown 4% below the frame top: no zoom beyond removing that transparent
   headroom, never stretched (fixed 4:5), only ~1–4 px trimmed from each side. Initials placeholders are untouched. */
.tc-player-card:has(.tc-player-portrait img) .tc-player-portrait { position: relative; display: block; padding: 0; }
.tc-player-card .tc-player-portrait img {
  --tc-photo-fill: calc(96.5% / (1 - var(--tc-photo-top, .05)));
  position: absolute; left: 50%; top: calc(4% - var(--tc-photo-top, .05) * var(--tc-photo-fill));
  width: auto; max-width: none; height: var(--tc-photo-fill); aspect-ratio: 4 / 5;
  transform: translateX(-50%); object-fit: contain;
}

/* ===== All-leagues home ("/" without a league): league label on Game Center cards + the Turnyro pulsas league selector ================ */
.weekly-game-center .gc-day > .gc-league { margin: -3px 0 8px; font: 700 11px var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.92); }
.home-pulse-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
.home-pulse-league { gap: 8px; max-width: 100%; }
.home-pulse-league[hidden] { display: none; }
.home-pulse-league-label { flex: none; font: 600 12px var(--font-body); color: var(--text-secondary); white-space: nowrap; }
.home-pulse-league select { min-width: 0; max-width: 220px; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .home-pulse-league { width: 100%; }
  .home-pulse-league select { flex: 1; max-width: none; }
}

/* All-leagues Game Center v2: today's cards are marked (the row opens on them) */
.weekly-game-center .gc-day--today > h3 { color: #fff; }
.weekly-game-center .gc-day--today > .sport-match { box-shadow: 0 0 0 2px rgba(255,255,255,.95); }
