/* Week leaves match the 38px score strips while retaining square geometry. */
html #league-hq #hq-panel-matchups .schedule-week-btn{
 flex:0 0 38px!important;width:38px!important;min-width:38px!important;max-width:38px!important;
 height:38px!important;min-height:38px!important;max-height:38px!important;aspect-ratio:1!important;
 box-sizing:border-box!important;padding:8px 2px 3px!important;
}
html #league-hq #hq-panel-matchups .schedule-week-btn::before{top:5px!important}
html #league-hq #hq-panel-matchups .schedule-week-n{font-size:17px!important;line-height:1!important}
html #league-hq #hq-panel-matchups .schedule-weeknav{gap:7px!important}

/* Card offsets and snap points use the exact same border-box width. */
html #league-hq #hq-panel-matchups .hq-matchup-list{
 padding:0!important;border:0!important;gap:0!important;scroll-padding:0!important;
 overflow-anchor:none!important;scroll-behavior:auto!important;
}
html #league-hq #hq-panel-matchups .hq-matchup-list>.hq-matchup{
 margin:0!important;scroll-margin:0!important;scroll-snap-align:start!important;scroll-snap-stop:always!important;
}

/* Keep roster and desktop matchup details beside the avatar. */
.hj-player-v3{
 grid-template-areas:"avatar identity score" "avatar game score"!important;row-gap:1px!important;
}
.hj-player-v3.is-right{grid-template-areas:"score identity avatar" "score game avatar"!important}
.hj-player-v3 .hj-v3-avatar{align-self:center!important}
.hj-player-v3 .hj-v3-identity{align-self:end!important}
.hj-player-v3>.hj-game-context{width:auto!important;margin:0!important}

/* Darkness now identifies a live NFL game, never pointer hover. */
.hj-player-v3,.hj-player-v3:hover{background:var(--hq-sheet,#fffdf7)!important;box-shadow:none!important}
.hj-player-v3[data-game-in-progress="true"],
#league-hq #league-sync-content .hj-player-v3[data-game-in-progress="true"],
html #league-hq #hq-panel-matchups .hj-player-v3[data-game-in-progress="true"]{background:#eeede5!important;box-shadow:none!important}

.hq-match-win[hidden]{display:none!important}


/* One opposing pair per row at every width. Never split starters into columns. */
html #league-hq #hq-panel-matchups .hj-lineup-v2 .hj-lineup-v2-starters{
 grid-template-columns:minmax(0,1fr)!important;column-gap:0!important;
}
html #league-hq #hq-panel-matchups .hj-lineup-v2{
 --hj-row-room:1;
 --lp-name:calc(11px + 2px * var(--hj-row-room));
 --lp-text:calc(9px + 1px * var(--hj-row-room));
 --lp-line:calc(10.5px + 1.5px * var(--hj-row-room));
 --lp-score:calc(11px + 4px * var(--hj-row-room));
}
html #league-hq #hq-panel-matchups .hj-lineup-v2 .hj-player-v3{
 --v3-avatar:calc(27px + 13px * var(--hj-row-room));
 --v3-score:calc(45px + 19px * var(--hj-row-room));
 padding:calc(3px + 1px * var(--hj-row-room))!important;
 column-gap:calc(4px + 3px * var(--hj-row-room))!important;
}
@media(max-width:450px){
 html #league-hq #hq-panel-matchups .hj-lineup-v2{--hj-row-room:0}
}

/* Matchup cells share a phone's width; full-width roster rows do not. */
@media(max-width:760px){
 html #hq-panel-matchups .hj-player-v3{
  grid-template-areas:"avatar identity score" "game game score"!important;
 }
 html #hq-panel-matchups .hj-player-v3.is-right{
  grid-template-areas:"score identity avatar" "score game game"!important;
 }
 html #hq-panel-matchups .hj-v3-identity{align-self:center!important}
}
/* Let schedule content determine its height instead of squeezing grid tracks. */
html .profile-schedule-compact .profile-schedule-node{
 flex:0 0 148px!important;width:148px!important;min-width:148px!important;
 height:auto!important;min-height:86px!important;
 grid-template-columns:36px minmax(0,1fr)!important;
 grid-template-rows:auto auto auto auto!important;
 grid-template-areas:"avatar week" "avatar opp" "avatar result" "h2h h2h"!important;
 align-content:start!important;align-items:start!important;
 column-gap:7px!important;row-gap:3px!important;padding:7px!important;
 overflow:visible!important;box-sizing:border-box!important;
}
html .profile-schedule-compact .profile-schedule-node .av{
 width:36px!important;height:36px!important;flex-basis:36px!important;
}
html .profile-schedule-compact .profile-schedule-opp{
 align-self:start!important;overflow:visible!important;
}
html .profile-schedule-compact .profile-schedule-opp-name{
 white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
}
html .profile-schedule-compact .profile-schedule-result{
 position:static!important;margin:0!important;font-size:9px!important;line-height:1.2!important;
 white-space:normal!important;overflow-wrap:normal!important;
}
html .profile-schedule-compact .profile-schedule-h2h{
 font-size:9px!important;line-height:1.2!important;white-space:normal!important;
 overflow:visible!important;text-overflow:clip!important;padding-top:4px!important;
}

/* Use one portrait size, including shorter BYE rows. The grid reserves its space. */
.hj-player-v3.hj-roster-player{position:relative;--v3-avatar:48px!important}
.hj-player-v3.hj-roster-player>.hj-v3-avatar{
 position:static;transform:none;justify-self:center;
 width:var(--v3-avatar)!important;height:var(--v3-avatar)!important;
 aspect-ratio:1;max-width:none;margin:0;
}
@media(min-width:761px){
 html #league-hq #hq-panel-matchups .hj-lineup-v2 .hj-player-v3{
  position:relative;--v3-avatar:calc(43px + 7px * var(--hj-row-room))!important;
 }
 html #league-hq #hq-panel-matchups .hj-lineup-v2 .hj-player-v3>.hj-v3-avatar{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:auto!important;height:min(100%,var(--v3-avatar))!important;
  aspect-ratio:1;max-width:100%;margin:0;
 }
}

/* Preview rails retain horizontal gestures at their boundaries. */
#hq-panel-matchups :is(.hq-edge-grid,.hq-swing-rail){overscroll-behavior-x:contain}

/* Hide only the pictured rail tracks; retain native overflow and all gestures. */
html body .week1-scroll,
html body .ffn-scroll,
html body #league-hq #league-sync-content .league-team-rail,
html body .mvp-week .mvp-cards{
 scrollbar-width:none!important;
 -ms-overflow-style:none!important;
}
html body .week1-scroll::-webkit-scrollbar,
html body .ffn-scroll::-webkit-scrollbar,
html body #league-hq #league-sync-content .league-team-rail::-webkit-scrollbar,
html body .mvp-week .mvp-cards::-webkit-scrollbar{
 display:none!important;width:0!important;height:0!important;
}
/* Tighten the news-to-HQ gap; keep section contents and sticky behavior intact. */
html body #league-hq{padding-top:24px!important}


/* A BYE is short enough to stay with the name/team column on phones. */
@media(max-width:760px){
 html #league-hq #hq-panel-matchups .hj-player-v3:has(>.hj-game-context[title="Bye week"]){
  grid-template-areas:"avatar identity score" "avatar game score"!important;
 }
 html #league-hq #hq-panel-matchups .hj-player-v3.is-right:has(>.hj-game-context[title="Bye week"]){
  grid-template-areas:"score identity avatar" "score game avatar"!important;
 }
}

/* IR uses the space beneath starters while the desktop bench continues beside it. */
#league-hq .league-team-view .league-roster-groups > .league-ir-wrap{
 margin-top:-2px;
}
@media(min-width:761px){
 #league-hq .league-team-view .league-roster-groups:has(> .league-ir-wrap){
  grid-template-rows:min-content 1fr;
 }
 #league-hq .league-team-view .league-roster-groups:has(> .league-ir-wrap) > .league-roster-group:not(.is-bench){
  grid-column:1;
  grid-row:1;
 }
 #league-hq .league-team-view .league-roster-groups:has(> .league-ir-wrap) > .is-bench{
  grid-column:2;
  grid-row:1 / span 2;
 }
 #league-hq .league-team-view .league-roster-groups > .league-ir-wrap{
  grid-column:1;
  grid-row:2;
  margin-top:0;
 }
}

/* Roster totals share the matchup score typography and live projection treatment. */
html body .league-roster-group-head .league-roster-lineup-head-total{
 display:inline-flex!important;align-items:center!important;gap:5px!important;
 letter-spacing:0!important;flex-shrink:0;
}
html body .league-roster-lineup-head-total .hq-live-score-pair{
 display:inline-flex!important;align-items:baseline!important;gap:6px!important;
 white-space:nowrap;min-width:0;
}
html body .league-roster-lineup-head-total .hq-match-team-score{
 font:700 16px/1.05 var(--sans)!important;
 font-variant-numeric:tabular-nums!important;letter-spacing:0!important;
 margin:0!important;
}
html body .league-roster-lineup-head-total .hq-adjusted-projection{
 font:550 11px/1.1 var(--sans)!important;color:#728396!important;
 letter-spacing:0!important;margin:0!important;
}
@media(max-width:450px){
 html body .league-roster-lineup-head-total .hq-match-team-score{font-size:14px!important}
}
