/* Upcoming: ganze Zeile gedämpft (Foto inkl. Defense + Text). */
.player-cell.upcoming .player-shot,
.player-cell.upcoming .pc-name,
.player-cell.upcoming .pc-score,
.player-cell.upcoming .pc-proj,
.player-cell.upcoming .pc-game,
.player-cell.upcoming .pc-stats {
  opacity:.75;
}

/* TV-Zeile als reiner Text — kein Chip/Balken. */
.pc-bug {
  display:inline-flex;align-items:baseline;gap:0;
  width:auto;max-width:100%;min-width:0;
  font:650 12px/1.25 Manrope,sans-serif;letter-spacing:0;
  color:#5c7088;background:none;border:0;padding:0;border-radius:0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.pc-bug.mirror {margin-left:auto}
/* Trenner nur zwischen sichtbaren Segmenten — ausgeblendetes Feld zählt nicht. */
.pc-bug > :not([hidden]) + :not([hidden])::before {
  content:"·";margin:0 5px;color:#9aabbd;font-weight:500;
}
.pc-bug-score,
.pc-bug-clock,
.pc-bug-down {flex:0 0 auto;min-width:0;padding:0}
.pc-bug-score {
  /* inline — nicht flex: sonst wird · (::before beim Mirror) zum Flex-Item + gap. */
  display:inline;font-variant-numeric:tabular-nums;
}
.pc-bug-score>b {font-weight:750;color:#314a66}
.pc-bug-clock {font-weight:700;font-variant-numeric:tabular-nums;color:#5c7088}
.pc-bug.live .pc-bug-clock {color:#ad1e3c}
.pc-bug-down {font-weight:600;color:#5c7088}
/* Feldposition: ganz oder gar nicht — kein Abschneiden mitten im Kürzel. */
.pc-bug-field {
  flex:0 0 auto;min-width:min-content;padding:0;
  overflow:visible;white-space:nowrap;font-weight:600;color:#5c7088;
}
.pc-bug-field[hidden] {display:none!important}
.pc-bug.bye,
.pc-bug.bye .pc-bug-score>b {color:#738298}
.pc-bug.upcoming .pc-bug-score>b {color:#536a83}
.pc-score .pc-score--empty {font-weight:400;color:#c5cad1}
/* Default: children bleiben Grid-Items (Desktop). Mobile-Matchup überschreibt auf Flex-Spalte. */
.pc-side {display:contents}
.player-cell.bye .pc-score.is-bye {visibility:hidden}
.player-cell.bye .pc-stats {visibility:hidden}
.player-cell.bye .pc-game {visibility:hidden;min-height:0;padding:0}
/* Bye: großes, gedämpftes BYE als Hintergrund (kein NFL-Kürzel). */
.player-cell.bye {
  position:relative;
  container-type:inline-size;
}
.pc-bye-mark {
  position:absolute;inset:0;z-index:0;
  display:grid;place-items:center;
  pointer-events:none;user-select:none;
  /* ~60–80 % der Zellenbreite als Glyphenhöhe → flächiges Wasserzeichen. */
  font:800 clamp(1.75rem,22cqi,3.75rem)/.9 Barlow,Manrope,sans-serif;
  letter-spacing:.06em;text-transform:uppercase;
  color:#8a9aab;opacity:.22;
  -webkit-font-smoothing:antialiased;
}
/* Etwas zur Matchup-Mitte (Gegner nach links, eigene Seite nach rechts). */
.player-cell.bye:not(.opp) .pc-bye-mark {transform:translateX(12%)}
.player-cell.opp.bye .pc-bye-mark {transform:translateX(-12%)}
/* Spieler-Inhalte muted — BYE-Wasserzeichen (.pc-bye-mark) bleibt bei opacity .22. */
.player-cell.bye .player-shot,
.player-cell.bye .pc-name,
.player-cell.bye .pc-side,
.player-cell.bye .pc-score,
.player-cell.bye .pc-proj,
.player-cell.bye .pc-stats {
  position:relative;z-index:1;opacity:.55;
}
body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .player-cell.bye .player-shot,
body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .player-cell.bye .pc-name,
body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .player-cell.bye .pc-score,
body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .player-cell.bye .pc-proj {
  z-index:1;opacity:.55;
}
/* Accent flush to the straight panel edge — no radius on the bar side. */
.lineup-list .player-cell {border-radius:0}
/* Akzent-Platz immer reservieren — Possession färbt nur, rückt nicht ein. */
.lineup-list .player-cell {border-left:3px solid transparent;box-sizing:border-box}
.lineup-list .player-cell.opp {border-left:0;border-right:3px solid transparent}
.player-cell.possession-own {box-shadow:none;border-left-color:#3a7ebd}
.player-cell.opp.possession-own {box-shadow:none;border-left:0;border-right-color:#3a7ebd}
/* RZ-Badge neben der Punktzahl — kräftig, kein Cell-Hintergrund. */
.pc-score-row {
  /* flex (nicht inline-flex): sonst verschiebt RZ die Baseline und drückt den Score nach unten. */
  display:flex;align-items:center;gap:4px;min-width:0;max-width:100%;
}
.pc-rz {
  flex:0 0 auto;margin:0;padding:2px 6px;
  font-size:10px;line-height:13px;font-weight:800;letter-spacing:.45px;
  color:#fff;background:#c92142;border:0;border-radius:3px;
}
.lineup-list .pc-name {
  display:flex;align-items:baseline;gap:5px;min-width:0;max-width:100%;
}
.lineup-list .pc-name-main {
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.lineup-list .pc-position {flex:0 0 auto}

/* Mobile Matchup: one spacing and type scale, isolated from desktop and other views.
 * PREMISE: starter stage fits fully above the bottom nav; bench begins at/below that fold.
 * See .cursor/rules/matchup-mobile-viewport.mdc and tests/matchup-stage-viewport.test.mjs.
 */
@media (max-width:650px) {
  html:has(body[data-route="matchup"]) {scrollbar-gutter:auto;scrollbar-width:none}
  html:has(body[data-route="matchup"])::-webkit-scrollbar {display:none}
  body[data-route="matchup"] {
    --matchup-ink:#19344f;
    --matchup-muted:#566b83;
    --matchup-weekbar-h:44px;
    --matchup-nav-h:calc(54px + env(safe-area-inset-bottom));
    /* Stage ends at nav top — not under the nav. */
    --matchup-stage-h:calc(100dvh - env(safe-area-inset-top) - var(--matchup-weekbar-h) - var(--matchup-nav-h));
    --matchup-row-min:0px;
  }
  body[data-route="matchup"] .app-frame {
    height:100svh;height:100dvh;display:flex;flex-direction:column;overflow:hidden;
  }
  body[data-route="matchup"] main {
    flex:1 1 auto;min-width:0;width:100%;max-width:100%;min-height:0;
    overflow-x:hidden;overflow-y:auto;
    display:flex;flex-direction:column;padding-left:0;padding-right:0;
    padding-bottom:0;
  }
  body[data-route="matchup"] .weekbar,
  body[data-route="matchup"] .load-indicator {flex-shrink:0}
  body[data-route="matchup"] .weekbar {height:var(--matchup-weekbar-h);min-height:var(--matchup-weekbar-h)}
  body[data-route="matchup"] #view {flex:0 0 auto;min-width:0;width:100%;max-width:100%}
  body[data-route="matchup"] .workspace,
  body[data-route="matchup"] .primary-column {
    display:block;min-width:0;width:100%;max-width:100%;
  }
  body[data-route="matchup"] .matchup-stage {
    height:var(--matchup-stage-h);max-height:var(--matchup-stage-h);min-height:0;min-width:0;width:100%;
    display:flex;flex-direction:column;overflow:hidden;
  }
  body[data-route="matchup"] .matchup-tabs {
    flex-shrink:0;min-width:0;width:100%;max-width:100%;
    box-sizing:border-box;
  }
  body[data-route="matchup"] .matchup-panel {
    flex:1 1 auto;min-height:0;display:flex;flex-direction:column;overflow:hidden;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard {flex-shrink:0}
  body[data-route="matchup"] .bench-panel {
    display:block;margin-top:0;
    padding-bottom:calc(var(--matchup-nav-h) + 16px);
  }
  body[data-route="matchup"] .weekbar,
  body[data-route="matchup"] .matchup-tabs,
  body[data-route="matchup"] .data-state {margin-left:8px;margin-right:8px}
  body[data-route="matchup"] .weekbar {gap:2px}
  body[data-route="matchup"] .compact-league {width:clamp(88px,28vw,116px);font-size:12px;color:#28435f}
  body[data-route="matchup"] .week-navigation .icon-button {width:32px;height:44px}
  body[data-route="matchup"] .current-week {min-width:73px;height:44px;font-size:12px}
  body[data-route="matchup"] .mobile-refresh {width:34px;height:44px}
  body[data-route="matchup"] .data-state {font-size:9.5px;line-height:14px;min-height:28px;padding:5px 6px;border-radius:4px}

  body[data-route="matchup"] .matchup-tabs {gap:5px;margin-bottom:5px;padding:0}
  /* ≤2: exact halves. ≥3: ~2 full + ¼ peek of the next (scroll + edge fade). */
  body[data-route="matchup"] .matchup-pill {
    container-type:inline-size;container-name:matchup-pill;
    flex:0 0 calc((100% - 5px) / 2);
    width:calc((100% - 5px) / 2);
    max-width:calc((100% - 5px) / 2);
    min-width:0;
    height:42px;min-height:42px;padding:3px 6px;border-radius:5px;
    background:#eef0f3;border:1px solid #d8dce3;box-shadow:none;
    opacity:.72;color:#5b7088;
    box-sizing:border-box;
  }
  body[data-route="matchup"] .matchup-tabs:has(.matchup-pill:nth-child(3)) .matchup-pill {
    flex-basis:calc((100% - 10px) / 2.25);
    width:calc((100% - 10px) / 2.25);
    max-width:calc((100% - 10px) / 2.25);
  }
  body[data-route="matchup"] .matchup-tabs:has(.matchup-pill:nth-child(3)).fade-right {
    --fade-right:28px;
  }
  body[data-route="matchup"] .matchup-tabs:has(.matchup-pill:nth-child(3)).fade-left {
    --fade-left:28px;
  }
  body[data-route="matchup"] .matchup-pill:hover {background:#e8eaed;opacity:.88}
  body[data-route="matchup"] .matchup-pill.active {
    background:#fff;border-color:#c5cad3;border-width:1px;box-shadow:none;
    opacity:1;
  }
  body[data-route="matchup"] .pill-team {
    /* Feste px-Spuren: ch an Manrope war zu schmal für Barlow-Scores → Proj wirkte versetzt. */
    --pill-score-w:34px;--pill-proj-w:34px;
    font-size:10px;line-height:17px;color:#5b7088;gap:3px 4px;font-weight:500;
    grid-template-columns:13px minmax(0,1fr) var(--pill-score-w);
  }
  body[data-route="matchup"] .pill-team.has-proj,
  body[data-route="matchup"] .matchup-tabs:has(.pill-proj) .pill-team {
    grid-template-columns:13px minmax(0,1fr) var(--pill-score-w) var(--pill-proj-w);
  }
  body[data-route="matchup"] .pill-team>img {width:13px;height:13px}
  /* Name und Proj getrennt — früher traf >span auch .pill-proj (ungleiche Kaskade). */
  body[data-route="matchup"] .pill-name,
  body[data-route="matchup"] .pill-team.pill-lead .pill-name,
  body[data-route="matchup"] .pill-own .pill-name,
  body[data-route="matchup"] .pill-own.pill-lead .pill-name {
    min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    font-weight:500;color:#4e647c;
  }
  body[data-route="matchup"] .pill-score {
    display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;
    text-align:right;justify-self:stretch;overflow:hidden;
    font-variant-numeric:tabular-nums;
  }
  body[data-route="matchup"] .pill-score,
  body[data-route="matchup"] .pill-score>.score-value,
  body[data-route="matchup"] .pill-team.pill-lead .pill-score,
  body[data-route="matchup"] .pill-team.pill-lead .pill-score>.score-value,
  body[data-route="matchup"] .pill-own .pill-score,
  body[data-route="matchup"] .pill-own .pill-score>.score-value,
  body[data-route="matchup"] .pill-own.pill-lead .pill-score,
  body[data-route="matchup"] .pill-own.pill-lead .pill-score>.score-value {
    display:block;width:100%;text-align:right;overflow:hidden;
    font:700 12px/15px Barlow,Manrope,sans-serif;
    font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;
    color:#334e6c;letter-spacing:0;white-space:nowrap;
  }
  /* Own matchup only: same pink/blue as scoreboard hero scores. */
  body[data-route="matchup"] .matchup-pill--mine .pill-own .pill-score,
  body[data-route="matchup"] .matchup-pill--mine .pill-own .pill-score>.score-value {
    color:#e23d5c;
  }
  body[data-route="matchup"] .matchup-pill--mine .pill-team:not(.pill-own) .pill-score,
  body[data-route="matchup"] .matchup-pill--mine .pill-team:not(.pill-own) .pill-score>.score-value {
    color:#3d7fd4;
  }
  body[data-route="matchup"] .matchup-tabs .pill-proj {
    display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;
    text-align:right;justify-self:stretch;overflow:hidden;
    font-family:Barlow,Manrope,sans-serif;font-size:11px;font-weight:500;font-style:normal;
    line-height:17px;font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;
    color:#8a9bb0;letter-spacing:0;white-space:nowrap;
  }
  @container matchup-pill (max-width:168px) {
    .pill-proj {display:none}
    .pill-team {grid-template-columns:13px minmax(0,1fr) var(--pill-score-w)}
  }
  body[data-route="matchup"] .primary-column>.dev-preview {display:none}

  body[data-route="matchup"] .matchup-panel,
  body[data-route="matchup"] .bench-panel {
    margin-left:0;margin-right:0;width:100%;max-width:none;
    border-radius:0;border-left:0;border-right:0;
    border-color:#dce3ed;box-shadow:none;
  }

  /* Starter-panel header only: compact scoreboard */
  body[data-route="matchup"] .matchup-panel>.scoreboard {
    --score-center:22px;--score-gap:2px;
    /* Gleicher Außenabstand links/rechts/oben; Logo = 2 Namenszeilen + Record. */
    --hero-pad:8px;
    --hero-name-lh:15px;
    --hero-record-h:13px;
    --hero-logo:calc(var(--hero-name-lh) * 2 + var(--hero-record-h));
    padding:var(--hero-pad) var(--hero-pad) 9px;
    border-radius:var(--radius) var(--radius) 0 0;
    background:radial-gradient(ellipse at 0% 45%,#cf214316,transparent 60%),radial-gradient(ellipse at 100% 45%,#689be51c,transparent 60%),#11253f;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .score-teams {
    align-items:center;grid-template-columns:minmax(0,1fr) var(--score-center) minmax(0,1fr);column-gap:var(--score-gap);
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team {
    grid-template-columns:var(--hero-logo) minmax(0,1fr) auto;grid-template-rows:auto;
    column-gap:var(--hero-pad);row-gap:0;align-items:start;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team.opponent {
    grid-template-columns:auto minmax(0,1fr) var(--hero-logo);
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-logo {
    width:var(--hero-logo);height:var(--hero-logo);padding:0;box-sizing:border-box;
    object-fit:contain;border-radius:5px;grid-column:1;grid-row:1;align-self:start;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-logo--photo {padding:10%}
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team.opponent .hero-logo {grid-column:3;grid-row:1}
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team>div:not(.hero-score) {grid-column:2;grid-row:1;min-width:0}
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team.opponent>div:not(.hero-score) {grid-column:2;grid-row:1}
  body[data-route="matchup"] .matchup-panel>.scoreboard .team-record {
    display:block;font-size:10px;line-height:var(--hero-record-h);margin:0;color:#b7c4d6;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team h2 {
    font-size:12px;line-height:var(--hero-name-lh);font-weight:750;letter-spacing:-.15px;
    min-height:0;max-height:calc(var(--hero-name-lh) * 2);
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
    white-space:normal;overflow:hidden;overflow-wrap:anywhere;text-overflow:ellipsis;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team.opponent h2 {text-align:right}
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-score,
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team.opponent .hero-score {
    grid-column:3;grid-row:1;margin:0 0 0 8px;font-size:30px;line-height:30px;letter-spacing:-.5px;
    width:auto;max-width:none;justify-self:end;text-align:right;align-self:center;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team.opponent .hero-score {
    grid-column:1;margin:0 8px 0 0;justify-self:start;text-align:left;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-score {color:#ff8298}
  body[data-route="matchup"] .matchup-panel>.scoreboard .opponent .hero-score {color:#a2c5ff}
  body[data-route="matchup"] .matchup-stage--foreign .matchup-panel>.scoreboard .hero-score,
  body[data-route="matchup"] .matchup-stage--foreign .matchup-panel>.scoreboard .opponent .hero-score {color:#e8eef8}
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-score .score-pair {position:relative;display:inline-block}
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-score .score-delta {
    position:absolute;top:50%;transform:translateY(-50%);
    left:auto;right:calc(100% + 5px);font-size:9px;line-height:1.2;margin:0;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .opponent .hero-score .score-delta {
    left:calc(100% + 5px);right:auto;
  }
  /* VS between hero scores; Proj/Opt label sits on the projection row. */
  body[data-route="matchup"] .matchup-panel>.scoreboard .versus {
    padding:0;margin:0;width:100%;min-width:0;align-self:center;justify-self:center;
    display:flex;align-items:center;justify-content:center;
    font:800 10px/1 Manrope,sans-serif;letter-spacing:0.04em;color:#8096b8;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .score-metrics {margin-top:2px;gap:1px}
  body[data-route="matchup"] .matchup-panel>.scoreboard .metric-row {font-size:10px;line-height:12px;color:#c4d0e2}
  /* Same 3-col track as score-teams so each half lines up with its hero-team. */
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-track {
    margin-top:6px;column-gap:var(--score-gap);align-items:start;
    grid-template-columns:minmax(0,1fr) var(--score-center) minmax(0,1fr);
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-label {
    grid-column:2;grid-row:1;align-self:start;justify-self:center;
    margin-top:0;padding-top:0;
    font:650 9px/12px Manrope,sans-serif;letter-spacing:0;text-transform:none;
    color:#9eb0c8;text-align:center;white-space:nowrap;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-side {
    grid-column:1;display:flex;flex-direction:column;font-size:9px;line-height:11px;gap:3px;color:#b9c9df;
    align-items:stretch;justify-content:flex-start;width:100%;min-width:0;text-align:left;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-side.opponent {
    grid-column:3;align-items:stretch;text-align:left;
  }
  /* Same tracks as .hero-team → Proj sits under the live score, clock stays outer. */
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-head {
    display:grid;grid-template-columns:var(--hero-logo) minmax(0,1fr) auto;grid-template-rows:auto;
    column-gap:var(--hero-pad);align-items:center;width:100%;min-width:0;min-height:12px;
    justify-content:unset;flex-direction:unset;position:relative;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-side.opponent .minutes-head {
    grid-template-columns:auto minmax(0,1fr) var(--hero-logo);flex-direction:unset;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-proj {
    grid-column:3;grid-row:1;justify-self:end;margin:0 0 0 8px;padding:0;
    font-size:11px;line-height:12px;font-weight:800;color:#f3f6fc;
    text-align:right;font-variant-numeric:tabular-nums;position:static;z-index:auto;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-proj.minutes-opt {
    color:#d7e4f7;font-weight:750;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-side.opponent .minutes-proj {
    grid-column:1;justify-self:start;margin:0 8px 0 0;text-align:left;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-clock {
    grid-column:1 / 3;grid-row:1;justify-self:start;align-self:center;
    position:static;transform:none;left:auto;right:auto;
    font-size:9px;line-height:11px;color:#b9c9df;white-space:nowrap;z-index:auto;
    min-width:0;overflow:hidden;text-overflow:ellipsis;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-side.opponent .minutes-clock {
    grid-column:2 / 4;justify-self:end;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-bar {height:2px;border-radius:2px;width:100%}

  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list {
    /* Score allein; RZ-Zellen überschreiben via .player-cell.redzone. */
    --lineup-score-width:50px;padding:0;flex:1 1 auto;min-height:0;
    display:flex;flex-direction:column;overflow:hidden;
  }
  /* RZ + Score braucht ~22px Badge + Gap — sonst clippt overflow:hidden die Punktzahl. */
  body[data-route="matchup"] .lineup-list .player-cell.redzone {
    --lineup-score-width:82px;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list>.lineup-row {
    flex:1 1 0;min-height:var(--matchup-row-min);height:auto;max-height:none;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px;border-color:#e6ebf2;
    min-width:0;align-items:stretch;
  }
  body[data-route="matchup"] .bench-panel .lineup-list {display:block}
  /* Bench-Zeilen: dieselbe Mindesthöhe / Zellenlayout wie Starter (siehe Desktop :is()). */
  body[data-route="matchup"] .bench-panel .lineup-row {flex:none;height:auto;min-height:var(--matchup-row-min,58px)}
  body[data-route="matchup"] .slot-label {display:none}

  /*
   * Links: Name + Stats eng (Score bläht keine Zeile auf).
   * Rechts: .pc-side absolut — Proj immer gap unter Score, auch mit RZ.
   * Freie Höhe nur zwischen Stats-Cluster und TV.
   */
  body[data-route="matchup"] .lineup-list .player-shot {display:none}
  body[data-route="matchup"] .lineup-list .player-cell {
    display:grid;position:relative;
    grid-template-columns:minmax(0,1fr) var(--lineup-score-width);
    grid-template-rows:auto auto minmax(0,1fr);
    grid-template-areas:"name ." "stats ." "game game";
    row-gap:1px;column-gap:6px;padding:3px 5px 4px;box-sizing:border-box;
    height:100%;min-height:0;min-width:0;max-width:100%;
    align-content:stretch;align-items:start;justify-items:stretch;
    border-radius:0;background:#fff;overflow:hidden;
  }
  body[data-route="matchup"] .lineup-list .player-cell.opp {
    grid-template-columns:var(--lineup-score-width) minmax(0,1fr);
    grid-template-areas:". name" ". stats" "game game";
  }
  body[data-route="matchup"] .lineup-list .pc-name {grid-area:name;align-self:start;min-width:0}
  body[data-route="matchup"] .lineup-list .pc-side {
    position:absolute;top:3px;right:5px;left:auto;z-index:2;
    display:flex;flex-direction:column;align-items:flex-end;gap:2px;
    width:auto;max-width:var(--lineup-score-width);min-width:0;
    pointer-events:none;
  }
  body[data-route="matchup"] .lineup-list .opp .pc-side {
    right:auto;left:5px;align-items:flex-start;
  }
  body[data-route="matchup"] .lineup-list .pc-stats {grid-area:stats;align-self:start;min-width:0}
  body[data-route="matchup"] .lineup-list .pc-score,
  body[data-route="matchup"] .lineup-list .pc-proj {
    grid-area:auto;width:auto;max-width:100%;height:auto;margin:0;overflow:visible;
  }
  body[data-route="matchup"] .lineup-list .pc-proj {text-align:right}
  body[data-route="matchup"] .lineup-list .opp .pc-proj {text-align:left}
  body[data-route="matchup"] .lineup-list .pc-game {grid-area:game;align-self:end;min-width:0;padding-top:6px}
  body[data-route="matchup"] .lineup-list .pc-score.is-bye,
  body[data-route="matchup"] .lineup-list .pc-proj.is-bye {visibility:hidden}

  body[data-route="matchup"] .lineup-list .player-cell:hover,
  body[data-route="matchup"] .lineup-list .player-cell.opp:hover,
  body[data-route="matchup"] .lineup-list .player-cell.possession-own:hover,
  body[data-route="matchup"] .lineup-list .player-cell.possession-other:hover,
  body[data-route="matchup"] .lineup-list .player-cell.live:hover,
  body[data-route="matchup"] .lineup-list .player-cell.opp.live:hover,
  body[data-route="matchup"] .lineup-list .player-cell.live.possession-own:hover,
  body[data-route="matchup"] .lineup-list .player-cell.opp.live.possession-own:hover {background:#f3f4f6}
  body[data-route="matchup"] .lineup-list .player-cell.possession-own {
    background:#edf5ff;box-shadow:none;border-left-color:#3a7ebd;
  }
  body[data-route="matchup"] .lineup-list .player-cell.opp.possession-own {
    box-shadow:none;border-right-color:#3a7ebd;
  }
  /* Live wash after possession so side tint wins while live. */
  body[data-route="matchup"] .lineup-list .player-cell.live {background:var(--accent-soft)}
  body[data-route="matchup"] .lineup-list .player-cell.opp.live {background:var(--opponent-soft)}
  body[data-route="matchup"] .lineup-list .player-cell.live.possession-own {background:#ffe8ee}
  body[data-route="matchup"] .lineup-list .player-cell.opp.live.possession-own {background:#e5f0ff}
  /* Foreign matchup: drop own/opp live washes. */
  body[data-route="matchup"] .matchup-stage--foreign .lineup-list .player-cell.live,
  body[data-route="matchup"] .matchup-stage--foreign .lineup-list .player-cell.opp.live,
  body[data-route="matchup"] .matchup-stage--foreign .lineup-list .player-cell.live.possession-own,
  body[data-route="matchup"] .matchup-stage--foreign .lineup-list .player-cell.opp.live.possession-own,
  body[data-route="matchup"] .matchup-stage--foreign ~ .bench-panel .lineup-list .player-cell.live,
  body[data-route="matchup"] .matchup-stage--foreign ~ .bench-panel .lineup-list .player-cell.opp.live {background:#f0f1f3}
  body[data-route="matchup"] .lineup-list .player-cell:active,
  body[data-route="matchup"] .lineup-list .player-cell.possession-own:active,
  body[data-route="matchup"] .lineup-list .player-cell.possession-other:active {background:#e8edf4}
  body[data-route="matchup"] .lineup-list .player-cell:focus-visible {outline:2px solid #c92142;outline-offset:-2px}

  body[data-route="matchup"] .lineup-list .pc-name {
    display:flex;align-items:baseline;gap:5px;min-width:0;max-width:100%;
    font-size:12.5px;line-height:16px;font-weight:750;letter-spacing:-.2px;color:#1b304a;
  }
  body[data-route="matchup"] .lineup-list .pc-name-main {
    min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  body[data-route="matchup"] .lineup-list .opp .pc-name {
    /* Spiegel: Position innen (zur Mitte), Name am Portrait. */
    flex-direction:row-reverse;justify-content:flex-start;text-align:right;
  }
  body[data-route="matchup"] .lineup-list .pc-position {
    flex:0 0 auto;margin:0;font-size:10px;line-height:16px;font-weight:650;color:#718097;
  }
  body[data-route="matchup"] .lineup-list .desktop-name {display:none}
  body[data-route="matchup"] .lineup-list .mobile-name {display:inline}

  body[data-route="matchup"] .lineup-list .pc-score {
    display:block;font-size:20px;line-height:20px;letter-spacing:-.2px;color:#183654;
  }
  body[data-route="matchup"] .lineup-list .opp .pc-score {text-align:left}
  body[data-route="matchup"] .lineup-list .pc-score .score-value {
    line-height:20px;display:inline-block;width:auto;font-size:20px;
    flex:0 0 auto;white-space:nowrap;
  }
  body[data-route="matchup"] .lineup-list .pc-score-row {
    display:flex;align-items:center;gap:3px;width:100%;max-width:100%;
    justify-content:flex-end;min-width:0;
  }
  body[data-route="matchup"] .lineup-list .opp .pc-score-row {justify-content:flex-start}
  body[data-route="matchup"] .lineup-list .pc-score .pc-score--empty {
    font-size:16px;line-height:18px;font-weight:400;color:#c5cad1;letter-spacing:0;
  }
  body[data-route="matchup"] .lineup-list .pc-proj {
    display:block;font-size:9px;line-height:13px;font-weight:600;color:#536a83;white-space:nowrap;
  }
  body[data-route="matchup"] .lineup-list .upcoming .pc-score,
  body[data-route="matchup"] .lineup-list .bye .pc-score {color:#738298}
  body[data-route="matchup"] .lineup-list .pc-score-row .score-delta {
    position:static;top:auto;left:auto;right:auto;transform:none;
    font-size:9px;line-height:11px;padding:1px 3px;margin:0;align-self:center;
  }

  body[data-route="matchup"] .lineup-list .pc-stats {
    font-size:10.5px;line-height:13px;font-weight:500;color:#3f5672;letter-spacing:0;
    min-height:13px;max-height:26px;min-width:0;max-width:100%;padding:0;margin:0;
    overflow:hidden;white-space:normal;
  }
  body[data-route="matchup"] .lineup-list .pc-stats.no-stats {visibility:hidden}
  body[data-route="matchup"] .lineup-list .opp .pc-stats {text-align:right;padding:0}
  body[data-route="matchup"] .lineup-list .pc-stats .stat-scroll {
    width:100%;max-width:100%;overflow:hidden;white-space:normal;
    mask-image:none;--fade-left:0;--fade-right:0;
  }
  body[data-route="matchup"] .lineup-list .pc-stats .stat-line {
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
    width:100%;max-width:100%;min-width:0;line-height:13px;
    white-space:normal;overflow:hidden;overflow-wrap:normal;word-break:normal;
  }
  body[data-route="matchup"] .lineup-list .pc-stats .mobile-stats {
    white-space:normal;word-spacing:0;
  }
  body[data-route="matchup"] .lineup-list .pc-stats.no-stats {font-size:10px;color:#5c7088}
  body[data-route="matchup"] .lineup-list .pc-game {
    display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;
    gap:0;min-width:0;max-width:100%;width:100%;
    padding:6px 0 0;margin:0;overflow:hidden;
  }
  body[data-route="matchup"] .lineup-list .pc-bug,
  body[data-route="matchup"] .lineup-list .pc-bug-score,
  body[data-route="matchup"] .lineup-list .pc-bug-clock,
  body[data-route="matchup"] .lineup-list .pc-bug-down {
    flex:0 0 auto;min-width:0;
  }
  body[data-route="matchup"] .lineup-list .pc-bug-field {
    flex:0 0 auto;min-width:min-content;
  }
  body[data-route="matchup"] .lineup-list .pc-bug > :not([hidden]) + :not([hidden])::before {margin:0 4px}
  body[data-route="matchup"] .lineup-list .opp .pc-game {justify-content:flex-end}
  body[data-route="matchup"] .lineup-list .pc-game>img {display:none}
  body[data-route="matchup"] .lineup-list .pc-bug {
    font-size:10.5px;line-height:13px;width:auto;max-width:100%;
  }
  body[data-route="matchup"] .bench-disclosure {margin-top:8px;border-color:#dce3ed;border-radius:0;box-shadow:none}
  body[data-route="matchup"] .bench-disclosure .lineup-row {min-height:var(--matchup-row-min,58px)}
  body[data-route="matchup"] .bench-disclosure>summary {min-height:46px;padding:10px 12px;font-size:14px;color:#203d5d}
  body[data-route="matchup"] .bench-disclosure>summary>span {font-size:11px;color:#596f88}
  body[data-route="matchup"] .bench-footer {background:#f5f7fb;border-top:1px solid #e2e8f1;padding:10px 12px}
  body[data-route="matchup"] .bench-footer-mid {color:#61758c}
  body[data-route="matchup"] .live-alerts {top:auto;bottom:calc(66px + env(safe-area-inset-bottom));left:12px;right:12px;width:auto;max-width:none}
  body[data-route="matchup"] .big-play {border-radius:10px;border-top-width:2px;box-shadow:0 8px 30px #0c234a30}
  body[data-route="matchup"] .big-play-open {min-height:78px;padding:11px 36px 11px 10px;gap:9px}
  body[data-route="matchup"] .big-play-open>img {width:38px;height:44px}
  body[data-route="matchup"] .big-play-open strong {font-size:13px;line-height:18px;margin:2px 0}
  body[data-route="matchup"] .big-play-open small {font-size:9px;letter-spacing:.8px}
  body[data-route="matchup"] .big-play-open>b {font-size:29px}
  body[data-route="matchup"] .big-play-close {width:36px;height:36px}
  .utility-content .dev-preview {flex-wrap:wrap;gap:8px;margin-top:16px;padding:12px;background:#f3f6fb;border:1px solid #dce4ef}
  .utility-content .dev-preview>span {flex-basis:100%;font-size:12px;letter-spacing:0;color:#334e6c}
  .utility-content .dev-preview button {min-height:40px;font-size:12px}
}

@media (max-width:370px) {
  body[data-route="matchup"] {--matchup-row-min:0px}
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list {--lineup-score-width:50px}
  body[data-route="matchup"] .compact-league {width:88px;font-size:11px}
  body[data-route="matchup"] .current-week {min-width:65px;font-size:11px}
  body[data-route="matchup"] .week-navigation .icon-button {width:27px}
  body[data-route="matchup"] .mobile-refresh {width:30px}
  body[data-route="matchup"] .lineup-row {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:3px}
  body[data-route="matchup"] .lineup-list .player-cell {padding:2px 4px 4px;row-gap:1px;column-gap:3px}
  body[data-route="matchup"] .lineup-list .pc-name {font-size:11.5px;line-height:15px;letter-spacing:-.25px}
  body[data-route="matchup"] .lineup-list .pc-score {font-size:17px;line-height:17px}
  body[data-route="matchup"] .lineup-list .pc-score .score-value {line-height:17px}
  body[data-route="matchup"] .lineup-list .pc-score .pc-score--empty {font-size:14px;line-height:15px}
  body[data-route="matchup"] .lineup-list .pc-bug {font-size:10px;line-height:12px}
  body[data-route="matchup"] .lineup-list .pc-stats {font-size:10px;line-height:12px}
}

@media (max-width:650px) and (max-height:700px) {
  body[data-route="matchup"] {
    --matchup-weekbar-h:40px;
    --matchup-row-min:0px;
  }
  body[data-route="matchup"] .bench-disclosure .lineup-row {min-height:var(--matchup-row-min,52px)}
  body[data-route="matchup"] .weekbar {height:var(--matchup-weekbar-h);min-height:var(--matchup-weekbar-h)}
  body[data-route="matchup"] .compact-league,
  body[data-route="matchup"] .current-week,
  body[data-route="matchup"] .week-navigation .icon-button,
  body[data-route="matchup"] .mobile-refresh {height:40px}
  body[data-route="matchup"] .matchup-pill {height:38px;min-height:38px;padding:2px 5px}
  body[data-route="matchup"] .pill-team {line-height:15px;font-size:9.5px}
  body[data-route="matchup"] .pill-score>.score-value {font-size:12px;line-height:15px}
  body[data-route="matchup"] .matchup-tabs {margin-bottom:2px}
  /* Keep scoreboard single-row (name+score); only shrink type */
  body[data-route="matchup"] .matchup-panel>.scoreboard {
    --hero-pad:6px;--hero-name-lh:13px;--hero-record-h:11px;
    --hero-logo:calc(var(--hero-name-lh) * 2 + var(--hero-record-h));
    padding:var(--hero-pad) var(--hero-pad) 6px;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .score-metrics {margin-top:1px}
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team {
    grid-template-columns:var(--hero-logo) minmax(0,1fr) auto;grid-template-rows:auto;column-gap:var(--hero-pad);
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team.opponent {
    grid-template-columns:auto minmax(0,1fr) var(--hero-logo);
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team h2 {
    font-size:10px;line-height:var(--hero-name-lh);max-height:calc(var(--hero-name-lh) * 2);-webkit-line-clamp:2;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-logo {
    width:var(--hero-logo);height:var(--hero-logo);
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .team-record {
    font-size:9px;line-height:var(--hero-record-h);
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-score,
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team.opponent .hero-score {
    grid-row:1;font-size:24px;line-height:22px;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .metric-row {font-size:9.5px;line-height:11px}
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-track {margin-top:4px}
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-side {font-size:8px;line-height:10px;gap:1px}
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-proj {font-size:10px;line-height:11px}
  body[data-route="matchup"] .lineup-list .player-cell {padding:2px 4px 4px;row-gap:1px;column-gap:3px}
  body[data-route="matchup"] .lineup-list .pc-name {font-size:12px;line-height:15px}
  body[data-route="matchup"] .lineup-list .pc-score {font-size:17px;line-height:17px}
  body[data-route="matchup"] .lineup-list .pc-score .score-value {line-height:17px}
  body[data-route="matchup"] .lineup-list .pc-score .pc-score--empty {font-size:14px;line-height:15px}
  body[data-route="matchup"] .lineup-list .pc-proj,
  body[data-route="matchup"] .lineup-list .pc-score-row .score-delta {font-size:8.5px;line-height:10px;margin:0;align-self:center}
  body[data-route="matchup"] .lineup-list .pc-bug {font-size:10px;line-height:12px}
  body[data-route="matchup"] .lineup-list .pc-stats,
  body[data-route="matchup"] .lineup-list .pc-stats .stat-line {font-size:10px;line-height:12px;min-height:12px}
}

@media (max-width:650px) and (prefers-reduced-motion:reduce) {
  body[data-route="matchup"] .matchup-pill,
  body[data-route="matchup"] .player-cell {transition:none}
}

/* Desktop: natürliche Zeilenhöhe; bei freiem Platz (Bank zu) kann das Starterpanel den Viewport füllen. */
@media (min-width:651px) {
  body[data-route="matchup"] {
    --starter-row-min:68px;
    --starter-row-max:96px;
    --matchup-photo-w:64px;
    --matchup-fill-chrome:188px;
  }
  body[data-route="matchup"] .lineup-row {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;
  }
  body[data-route="matchup"] .slot-label {display:none}
  body[data-route="matchup"] .lineup-list .pc-position {
    display:inline;margin-left:6px;font-size:11px;line-height:inherit;font-weight:650;color:#718097;
  }
  body[data-route="matchup"] .matchup-tabs {margin-bottom:8px}
  body[data-route="matchup"] .workspace {align-items:stretch}
  body[data-route="matchup"] .primary-column {
    display:flex;flex-direction:column;
    /* Kein starres height — Seite darf scrollen. min-height nur für Fill bei Luft. */
    min-height:calc(100dvh - var(--matchup-fill-chrome));
  }
  body[data-route="matchup"] .matchup-stage {
    display:flex;flex-direction:column;flex:0 1 auto;
  }
  body[data-route="matchup"] .matchup-tabs,
  body[data-route="matchup"] .dev-preview {flex-shrink:0}
  body[data-route="matchup"] .matchup-panel {
    display:flex;flex-direction:column;flex:0 1 auto;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard {
    flex-shrink:0;
    /* Desktop: Logo deckt 2 Namenszeilen + Record; Pad links/rechts/oben gleich. */
    --hero-pad:12px;
    --hero-name-lh:20px;
    --hero-record-h:16px;
    --hero-logo:calc(var(--hero-name-lh) * 2 + var(--hero-record-h));
    padding:var(--hero-pad) var(--hero-pad) 12px;
    border-radius:var(--radius) var(--radius) 0 0;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team {
    grid-template-columns:var(--hero-logo) minmax(0,1fr) auto;
    column-gap:var(--hero-pad);align-items:start;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team.opponent {
    grid-template-columns:auto minmax(0,1fr) var(--hero-logo);
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-logo {
    width:var(--hero-logo);height:var(--hero-logo);padding:0;box-sizing:border-box;
    object-fit:contain;border-radius:6px;align-self:start;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-logo--photo {padding:10%}
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team h2 {
    font-size:15px;line-height:var(--hero-name-lh);font-weight:800;letter-spacing:-.2px;
    max-height:calc(var(--hero-name-lh) * 2);
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
    overflow:hidden;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .team-record {
    display:block;font-size:12px;line-height:var(--hero-record-h);margin:0;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-score,
  body[data-route="matchup"] .matchup-panel>.scoreboard .hero-team.opponent .hero-score {
    align-self:center;
  }
  /* Desktop: same hero-column mirror as mobile (overrides typography flex). */
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-head {
    display:grid;grid-template-columns:var(--hero-logo) minmax(0,1fr) auto;grid-template-rows:auto;
    column-gap:var(--hero-pad);align-items:center;width:100%;min-width:0;
    flex-direction:unset;justify-content:unset;gap:unset;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-side.opponent .minutes-head {
    grid-template-columns:auto minmax(0,1fr) var(--hero-logo);flex-direction:unset;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-proj {
    grid-column:3;grid-row:1;justify-self:end;margin:0 0 0 8px;text-align:right;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-side.opponent .minutes-proj {
    grid-column:1;grid-row:1;justify-self:start;margin:0 8px 0 0;text-align:left;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-clock {
    grid-column:1 / 3;grid-row:1;justify-self:start;min-width:0;overflow:hidden;text-overflow:ellipsis;
  }
  body[data-route="matchup"] .matchup-panel>.scoreboard .minutes-side.opponent .minutes-clock {
    grid-column:2 / 4;grid-row:1;justify-self:end;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list {
    display:flex;flex-direction:column;overflow:visible;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list>.lineup-row {
    flex:0 0 auto;
    min-height:var(--starter-row-min);
    height:auto;
    align-items:stretch;
    min-width:0;
  }
  /* Bank zu + Platz übrig: Starterzeilen wachsen gleichmäßig bis max in den Viewport. */
  body[data-route="matchup"] .primary-column:not(:has(> .bench-panel[open])) .matchup-stage,
  body[data-route="matchup"] .primary-column:not(:has(> .bench-panel[open])) .matchup-panel,
  body[data-route="matchup"] .primary-column:not(:has(> .bench-panel[open])) .matchup-panel>.lineup-list {
    flex:1 1 auto;min-height:0;
  }
  body[data-route="matchup"] .primary-column:not(:has(> .bench-panel[open])) .matchup-panel>.lineup-list>.lineup-row {
    flex:1 1 0;
    max-height:var(--starter-row-max);
  }
  body[data-route="matchup"] .bench-panel {flex-shrink:0;margin-top:12px}
  /*
   * 3-col in-flow grid (shot | copy | score).
   * align-content:stretch + rows auto/1fr/auto so the shot spans the full cell.
   * Reset legacy grid-column 2/4 and overflow:visible that bled into the slot/opp cell.
   */
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list>.lineup-row>.player-cell {
    --matchup-score-w:52px;
    --matchup-cell-pad-x:6px;
    --matchup-cell-pad-y:4px;
    --matchup-stats-h:15px;
    --pc-game-air:6px;
    position:relative;height:100%;min-height:0;min-width:0;
    display:grid;
    grid-template-columns:var(--matchup-photo-w) minmax(0,1fr) var(--matchup-score-w);
    /* Free height only in game row → TV sits below stats with air, not jammed. */
    grid-template-rows:auto minmax(var(--matchup-stats-h),auto) minmax(0,1fr);
    grid-template-areas:none;
    gap:2px 6px;
    align-content:stretch;align-items:start;
    padding:0 var(--matchup-cell-pad-x) 0 0;
    overflow:hidden;
  }
  /* RZ + Score (~26px-Font) passt nicht in 52px — sonst clippt overflow:hidden. */
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list>.lineup-row>.player-cell.redzone {
    --matchup-score-w:86px;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list>.lineup-row>.player-cell.opp {
    grid-template-columns:var(--matchup-score-w) minmax(0,1fr) var(--matchup-photo-w);
    padding:0 0 0 var(--matchup-cell-pad-x);
  }
  /*
   * Score+Proj als .pc-side absolut oben — nicht im Grid (sonst drückt
   * align-content:space-between / RZ die Punkte nach unten).
   */
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list>.lineup-row>.player-cell .pc-side {
    display:flex;flex-direction:column;gap:2px;
    position:absolute;top:var(--matchup-cell-pad-y);right:var(--matchup-cell-pad-x);left:auto;
    z-index:2;align-items:flex-end;
    width:auto;max-width:var(--matchup-score-w);min-width:0;
    pointer-events:none;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list>.lineup-row>.player-cell.opp .pc-side {
    right:auto;left:var(--matchup-cell-pad-x);align-items:flex-start;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .player-shot {
    grid-area:unset;grid-column:1;grid-row:1 / -1;
    position:relative;align-self:stretch;justify-self:stretch;
    width:var(--matchup-photo-w);min-width:var(--matchup-photo-w);
    height:auto;min-height:0;overflow:hidden;border-radius:0;z-index:0;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .opp .player-shot {
    grid-column:3;justify-self:stretch;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .player-shot .player-photo {
    position:absolute;inset:0;width:100%;height:100%;min-height:0;
    object-fit:cover;object-position:center 12%;
  }
  /* Defense: Teamlogo vollständig (contain), kein Crop. */
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .player-shot .player-photo.defense {
    object-fit:contain;object-position:center;padding:7px;box-sizing:border-box;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .player-shot.defense .player-team {display:none}
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .player-shot .player-team {
    width:20px;height:20px;right:3px;bottom:3px;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .opp .player-shot .player-team {
    right:auto;left:3px;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-name,
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-game,
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-stats {
    grid-area:auto;min-width:0;max-width:100%;z-index:1;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-name {
    display:flex;align-items:baseline;gap:5px;
    grid-column:2;grid-row:1;align-self:start;padding-top:var(--matchup-cell-pad-y);
    min-width:0;overflow:hidden;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-name-main {
    min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .opp .pc-name {
    grid-column:2;flex-direction:row-reverse;justify-content:flex-start;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .opp .pc-position {
    margin-left:0;margin-right:6px;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-score,
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-proj {
    grid-column:auto;grid-row:auto;margin:0;padding:0;max-width:100%;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-score {
    display:block;line-height:0; /* kein Inline-Strut — sonst RZ-Baseline-Shift */
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-score .score-value {
    flex:0 0 auto;white-space:nowrap;line-height:1;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-score-row {
    display:flex;align-items:center;gap:3px;max-width:100%;justify-content:flex-end;
    vertical-align:top;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .opp .pc-score-row {
    justify-content:flex-start;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-proj {
    text-align:right;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .opp .pc-proj {
    text-align:left;
  }
  /* Desktop: one-line stats with horizontal scroll — never wrap into the game row. */
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-stats {
    grid-column:2;grid-row:2;align-self:start;
    min-height:var(--matchup-stats-h);box-sizing:border-box;
    padding:0;overflow:hidden;white-space:nowrap;max-height:none;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-stats.no-stats {
    visibility:hidden;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .opp .pc-stats {
    grid-column:2;padding:0;text-align:right;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-stats .stat-scroll {
    overflow-x:auto;overflow-y:hidden;white-space:nowrap;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-stats .stat-line {
    display:block;width:max-content;min-width:100%;max-width:none;line-height:15px;
    white-space:nowrap;overflow:visible;overflow-wrap:normal;word-break:normal;
  }
  /*
   * Score/Proj sitzen absolut — TV-Zeile darf die Score-Spalte mitnutzen
   * (kein 56px-Padding, kein max-width:100% nur auf der Text-Spalte).
   */
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-game {
    grid-column:2 / -1;grid-row:3;align-self:end;
    display:flex;flex-wrap:nowrap;align-items:center;gap:0;
    width:auto;max-width:none;min-width:0;
    padding:var(--pc-game-air, 6px) var(--matchup-cell-pad-x, 6px) 8px 0;overflow:hidden;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .opp .pc-game {
    grid-column:1 / 3;padding:var(--pc-game-air, 6px) 0 8px var(--matchup-cell-pad-x, 6px);
    flex-direction:row;justify-content:flex-end;
  }
  body[data-route="matchup"] :is(.matchup-panel, .bench-panel) .lineup-list .pc-bug {
    font-size:12px;line-height:15px;width:auto;max-width:100%;min-width:0;
  }
}

@media (min-width:651px) and (max-width:1190px) {
  body[data-route="matchup"] {--matchup-photo-w:72px}
}

/* Give the lineup full width until stats fit; NFL-Spiele sidebar only on wide desktops. */
@media (min-width:651px) and (max-width:1399px) {
  body[data-route="matchup"] .workspace {
    display:block;grid-template-columns:minmax(0,1fr);
  }
  body[data-route="matchup"] .sidebar {display:none}
}

@media (min-width:651px) and (min-height:900px) {
  body[data-route="matchup"] {--starter-row-max:100px}
}
