/* FPL HQ v0.86: SAFE shared pitch colours + badges.
   Deliberately NO sizing, aspect ratio, grid, formation, card width, bench
   or player strip layout rules. Each mode uses its working v0.79 geometry. */
:root{
 --hq-field:#208f76;--hq-field-light:#289b7c;
 --hq-lines:rgba(192,238,214,.37);
 --hq-auto:#04d5f4;--hq-match-on:#0ca970;
 --hq-match-off:#d23f5c;--hq-ink:#37003c;
}
/* Align colours and field marking colours only. */
.pitch-panel .football-field,
body.fpl-theme .draft-pl-pitch .pitch-grass,
body.fpl-theme .pl-pitch {
 background:linear-gradient(170deg,var(--hq-field),var(--hq-field-light))!important;
}
.pitch-panel .field-markings,
body.fpl-theme .draft-pl-pitch .pl-field-lines,
body.fpl-theme .pl-pitch .pl-field-lines {
 border-color:var(--hq-lines)!important;
}
.pitch-panel .field-markings::before,
.pitch-panel .field-markings::after,
body.fpl-theme .draft-pl-pitch .pl-field-lines::before,
body.fpl-theme .draft-pl-pitch .pl-field-lines::after,
body.fpl-theme .pl-pitch .pl-field-lines::before,
body.fpl-theme .pl-pitch .pl-field-lines::after {
 border-color:var(--hq-lines)!important;
}
/* Badge contract used by Classic and Draft:
   top-left = captain/VC (Classic); top-right = minutes;
   centre = NEW; bottom-left = match and fantasy substitutes.
   The group is positioned WITHIN existing kit height, so a badge
   never increases formation row or bench dimensions. */
.pitch-panel .kit-card .kit-image,
body.fpl-theme .draft-pl-pitch .kit-player .kit-wrap.pl-kit {position:relative!important}
.pitch-panel .kit-card .kit-image > .classic-sub-icon-rail,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left {
 position:absolute!important;
 top:auto!important;bottom:0!important;left:0!important;right:auto!important;
 inset-block:auto 0!important;
 display:flex!important;flex-flow:row nowrap!important;
 justify-content:flex-start!important;align-items:flex-end!important;
 gap:2px!important;padding:0!important;margin:0!important;
 max-width:100%!important;min-width:0!important;
 height:16px!important;min-height:16px!important;
 z-index:22!important;pointer-events:none!important;
 transform:none!important;filter:none!important;opacity:1!important;
}
.pitch-panel .kit-card .kit-image > .classic-sub-icon-rail:empty {display:none!important}
.pitch-panel .kit-card .kit-image > .classic-sub-icon-rail > *,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left > * {
 position:static!important;inset:auto!important;transform:none!important;
 box-sizing:border-box!important;display:inline-flex!important;
 align-items:center!important;justify-content:center!important;
 flex:0 0 15px!important;width:15px!important;min-width:15px!important;
 max-width:15px!important;height:15px!important;min-height:15px!important;
 padding:0!important;margin:0!important;
 border:1px solid #fff!important;border-radius:3px!important;
 box-shadow:0 1px 3px #0007!important;
 font:900 12px/1 Arial,Helvetica,sans-serif!important;
 color:#fff!important;visibility:visible!important;opacity:1!important;
 filter:none!important;white-space:nowrap!important;
}
.pitch-panel .kit-card .kit-image > .classic-sub-icon-rail > .classic-auto-sub,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left > .kit-auto-swap{
 background:var(--hq-auto)!important;color:var(--hq-ink)!important;
}
.pitch-panel .kit-card .kit-image > .classic-sub-icon-rail > .classic-match-sub.on,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left > .pl-sub-arrow.on{
 background:var(--hq-match-on)!important;color:#fff!important;
}
.pitch-panel .kit-card .kit-image > .classic-sub-icon-rail > .classic-match-sub.off,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left > .pl-sub-arrow.off{
 background:var(--hq-match-off)!important;color:#fff!important;
}
/* Protect the four non-overlapping lanes. */
.pitch-panel .kit-card .kit-image > .armband{
 top:0!important;left:0!important;bottom:auto!important;right:auto!important;z-index:24!important;
}
.pitch-panel .kit-card .kit-image > .minutes {
 top:0!important;right:0!important;bottom:auto!important;left:auto!important;z-index:24!important;
}
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-right{
 top:0!important;right:0!important;left:auto!important;bottom:auto!important;
 height:auto!important;inset-block:auto!important;z-index:24!important;
}
.pitch-panel .kit-card .kit-image > .new-player-badge,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-new-tag{
 top:44%!important;bottom:auto!important;left:50%!important;
 transform:translate(-50%,-50%)!important;z-index:23!important;
}
@media(max-width:390px){
 .pitch-panel .kit-card .kit-image > .classic-sub-icon-rail,
 body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left{gap:1px!important}
 .pitch-panel .kit-card .kit-image > .classic-sub-icon-rail > *,
 body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left > *{
  flex-basis:14px!important;min-width:14px!important;width:14px!important;
  height:14px!important;min-height:14px!important;font-size:11px!important
 }
}

/* v0.84: Captain/vice-captain occupy the left end of the points strip,
   instead of sharing shirt space with NEW or the minutes badge. */
.pitch-panel .kit-card .kit-points{position:relative!important}
.pitch-panel .kit-card .kit-points > .armband,
.pitch-panel .kit-card .kit-points > .armband.vice{
 position:absolute!important;top:1px!important;bottom:auto!important;
 left:2px!important;right:auto!important;
 box-sizing:border-box!important;min-width:14px!important;width:14px!important;
 height:16px!important;min-height:16px!important;
 padding:0!important;margin:0!important;border-radius:3px!important;
 font-size:9px!important;line-height:14px!important;z-index:5!important;
 display:grid!important;place-items:center!important;
 opacity:1!important;filter:none!important;
}
.pitch-panel .kit-card .kit-points > .armband {background:#00ff87!important;color:#37003c!important}
.pitch-panel .kit-card .kit-points > .armband.vice {background:#00a866!important;color:#fff!important}
.pitch-panel .kit-card .kit-image > .new-player-badge,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-new-tag{
 top:43%!important;
}

/* v0.85 — targeted corrections, no change to the proven v0.79 geometry. */

/* Let the existing field boundary reach the full lower edge. Do not change
   field height, aspect ratio, formation or number of player rows. */
.pitch-panel .football-field > .field-markings{
 top:9px!important;right:9px!important;bottom:9px!important;left:9px!important;
 box-sizing:border-box!important;
}
body.fpl-theme .draft-pl-pitch .pitch-grass > .pl-field-lines {
 top:7px!important;right:7px!important;bottom:7px!important;left:7px!important;
 box-sizing:border-box!important;
}
/* C / VC and points get their own grid cells, so the badges never cover a
   number. Use a balanced empty cell at right to centre the score. */
.pitch-panel .kit-card .kit-points:has(> .armband){
 display:grid!important;
 grid-template-columns:21px minmax(0,1fr) 21px!important;
 align-items:center!important;
 justify-items:center!important;
 column-gap:0!important;
 padding:0 1px!important;
}
.pitch-panel .kit-card .kit-points > .armband,
.pitch-panel .kit-card .kit-points > .armband.vice {
 position:static!important;inset:auto!important;
 grid-column:1!important;grid-row:1!important;
 box-sizing:border-box!important;
 width:20px!important;min-width:20px!important;max-width:20px!important;
 height:18px!important;min-height:18px!important;
 padding:0!important;margin:0!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 font:900 10px/1 Arial,Helvetica,sans-serif!important;
 border:1px solid white!important;border-radius:4px!important;
 transform:none!important;letter-spacing:0!important;white-space:nowrap!important;
}
.pitch-panel .kit-card .kit-points:has(> .armband) .classic-point-number{
 grid-column:2!important;grid-row:1!important;
 width:100%!important;min-width:0!important;
 text-align:center!important;line-height:19px!important;
}
.pitch-panel .kit-card .kit-points:not(:has(> .armband)) .classic-point-number{
 display:block!important;text-align:center!important;
}
/* Five-player rows get the same available width, without expanding tiles. */
@media(max-width:390px){
 .pitch-panel .kit-card .kit-points:has(> .armband){
  grid-template-columns:18px minmax(0,1fr) 18px!important;
 }
 .pitch-panel .kit-card .kit-points > .armband,
 .pitch-panel .kit-card .kit-points > .armband.vice{
  width:17px!important;min-width:17px!important;height:17px!important;min-height:17px!important;font-size:9px!important;
 }
}

/* v0.86: small badge and bottom-line clearances only.
   Keep the v0.79 pitch dimensions, formation rows and bench untouched. */
.pitch-panel .kit-card .kit-points:has(> .armband) {
 grid-template-columns:18px minmax(0,1fr) 18px!important;
}
.pitch-panel .kit-card .kit-points > .armband,
.pitch-panel .kit-card .kit-points > .armband.vice {
 width:17px!important;min-width:17px!important;max-width:17px!important;
 height:16px!important;min-height:16px!important;
 font:900 9px/1 Arial,Helvetica,sans-serif!important;
}
.pitch-panel .formation > .formation-row:last-child {
 position:relative!important;top:-5px!important;
}
body.fpl-theme .draft-pl-pitch .pitch-formation > .pitch-line:last-child {
 position:relative!important;top:-5px!important;
}

/* v0.89: final shared flat substitution icon treatment.
   SVG paths avoid platform-specific emoji / glossy symbol rendering.
   Geometry (field height, player card width and formation) is unchanged. */
.pitch-panel .kit-card .kit-image > .classic-sub-icon-rail > :is(.classic-match-sub,.classic-auto-sub),
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left > :is(.pl-sub-arrow,.kit-auto-swap) {
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 border:0!important;border-radius:4px!important;box-shadow:none!important;
 text-shadow:none!important;background-image:none!important;
 width:17px!important;min-width:17px!important;max-width:17px!important;
 height:17px!important;min-height:17px!important;flex:0 0 17px!important;
 padding:1px!important;box-sizing:border-box!important;
}
/* Match ON is green, Match OFF red, both with white arrows. */
.pitch-panel .kit-card .kit-image > .classic-sub-icon-rail > .classic-match-sub.on,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left > .pl-sub-arrow.on {
 background:#08a66d!important;color:#ffffff!important;
}
.pitch-panel .kit-card .kit-image > .classic-sub-icon-rail > .classic-match-sub.off,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left > .pl-sub-arrow.off {
 background:#ce3957!important;color:#ffffff!important;
}
/* Fantasy auto-sub arrows are cyan with dark-purple strokes. */
.pitch-panel .kit-card .kit-image > .classic-sub-icon-rail > .classic-auto-sub,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left > .kit-auto-swap {
 background:#12cce9!important;color:#37003c!important;
}
/* Consistent shape and centre point for all four symbols. */
.pitch-panel .kit-card .kit-image .hq-sub-arrow,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit .hq-sub-arrow {
 display:block!important;position:static!important;inset:auto!important;
 width:13px!important;height:13px!important;min-width:13px!important;
 min-height:13px!important;flex:0 0 13px!important;
 fill:none!important;stroke:none!important;transform:none!important;
 opacity:1!important;filter:none!important;pointer-events:none!important;
}
.pitch-panel .kit-card .kit-image .hq-sub-arrow path,
body.fpl-theme .draft-pl-pitch .kit-player .pl-kit .hq-sub-arrow path {
 stroke:currentColor!important;stroke-width:3.2!important;
 stroke-linecap:round!important;stroke-linejoin:round!important;
}
/* In narrow five-player formations keep the same badge footprint,
   without touching positions, player tile sizes or vertical row heights. */
@media(max-width:390px){
 .pitch-panel .kit-card .kit-image > .classic-sub-icon-rail > :is(.classic-match-sub,.classic-auto-sub),
 body.fpl-theme .draft-pl-pitch .kit-player .pl-kit > .kit-icon-rail-left > :is(.pl-sub-arrow,.kit-auto-swap){
 width:15px!important;min-width:15px!important;max-width:15px!important;
 height:15px!important;min-height:15px!important;flex-basis:15px!important;
 }
 .pitch-panel .kit-card .kit-image .hq-sub-arrow,
 body.fpl-theme .draft-pl-pitch .kit-player .pl-kit .hq-sub-arrow {
 width:12px!important;height:12px!important;min-width:12px!important;min-height:12px!important;flex-basis:12px!important;
 }
}

/* v0.90 — unified player name and opponent/points strips, no geometry changes. */
.pitch-panel .kit-card .kit-name,body.fpl-theme .draft-pl-pitch .kit-player .pl-player-name{
 background:#fff!important;color:#37003c!important;border:0!important;border-radius:0!important;
 box-shadow:0 1px 2px #0034214d!important;font-family:'Arial Narrow','Roboto Condensed',Arial,sans-serif!important;
 font-weight:900!important;letter-spacing:-.045em!important;text-align:center!important;
}
.pitch-panel .kit-card .kit-points,body.fpl-theme .draft-pl-pitch .kit-player .pl-player-points{
 background:#37003c!important;color:#fff!important;border:0!important;border-radius:0!important;
 box-shadow:0 1px 2px #0034214d!important;font-family:'Arial Narrow','Roboto Condensed',Arial,sans-serif!important;
 font-weight:900!important;letter-spacing:-.045em!important;text-align:center!important;
}
.pitch-panel .kit-card .kit-points.kit-fixture-strip{font-size:clamp(7px,1.9vw,10px)!important;letter-spacing:-.035em!important;}
.pitch-panel .kit-card .kit-points.kit-fixture-strip .classic-point-number{
 width:100%!important;min-width:0!important;display:block!important;overflow:hidden!important;
 text-overflow:ellipsis!important;white-space:nowrap!important;line-height:inherit!important;
}

/* v0.92 shared icon presentation: does not change pitch geometry. */
.hq-icon{display:block;vertical-align:middle;flex:none}
.week-nav button .hq-icon,.weekly-gw-arrow .hq-icon{width:16px;height:16px;margin:auto}
.refresh .hq-icon,.icon-btn .hq-icon{width:20px;height:20px;margin:auto}
.refresh-wrap .refresh:has(.hq-icon){display:flex;align-items:center;justify-content:center}
.hq-card{display:inline-block;width:8px;height:13px;border-radius:1px;vertical-align:middle;flex:none}
.hq-card-yellow{background:#ffda30;border:1px solid #d1aa24}
.hq-card-red{background:#e52440;border:1px solid #af1731}

/* v0.93: Classic C/VC centred above NEW on the shirt. Draft remains unchanged.
   No card sizing, formation, pitch geometry or substitution changes. */
.pitch-panel .kit-card .kit-image > .armband.hq-shirt-role,
.pitch-panel .kit-card .kit-image > .armband.hq-shirt-role.vice{
  box-sizing:border-box!important;
  position:absolute!important;
  left:50%!important;right:auto!important;
  top:1px!important;bottom:auto!important;
  transform:translateX(-50%)!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:17px!important;min-width:17px!important;max-width:17px!important;
  height:14px!important;min-height:14px!important;
  padding:0!important;margin:0!important;
  border:1px solid #fff!important;border-radius:3px!important;
  font:900 9px/1 Arial,Helvetica,sans-serif!important;
  white-space:nowrap!important;letter-spacing:0!important;
  opacity:1!important;filter:none!important;z-index:26!important;
  pointer-events:none!important;
}
.pitch-panel .kit-card .kit-image > .armband.hq-shirt-role{
  background:#00ff87!important;color:#37003c!important;
}
.pitch-panel .kit-card .kit-image > .armband.hq-shirt-role.vice{
  background:#8050be!important;color:#fff!important;
}
/* Only shift NEW when a C/VC badge is also present. */
.pitch-panel .kit-card .kit-image:has(> .hq-shirt-role) > .new-player-badge{
  top:67%!important;left:50%!important;bottom:auto!important;
  transform:translate(-50%,-50%)!important;
}
/* Small phone/compact tiles: create a clear 1px+ gap between stacked badges. */
@media(max-width:390px){
  .pitch-panel .kit-card .kit-image > .armband.hq-shirt-role,
  .pitch-panel .kit-card .kit-image > .armband.hq-shirt-role.vice{
    top:0!important;height:12px!important;min-height:12px!important;
    width:16px!important;min-width:16px!important;max-width:16px!important;
    font-size:8px!important;
  }
  .pitch-panel .kit-card .kit-image:has(> .hq-shirt-role) > .new-player-badge{
    top:70%!important;height:13px!important;min-height:13px!important;
    padding:0 2px!important;font-size:8px!important;
  }
}

/* v0.94 Classic-only adaptive captain/vice and NEW badge positioning.
   The existing v0.93 stack remains the safe default when space is tight.
   No pitch, shirt, score-strip, or Draft geometry changes. */

/* Allow decisions based on the real shirt tile width, rather than screen
   width (five-player rows and compact panels can be much narrower). */
.pitch-panel .kit-card .kit-image {container-type:inline-size}

/* An isolated captain/vice occupies exactly the normal NEW centre position.
   Keep the previous high placement if minutes or PL/fantasy sub icons exist. */
.pitch-panel .kit-card .kit-image:not(:has(> .new-player-badge)):not(:has(> .minutes)):not(:has(> .classic-sub-icon-rail:not(:empty))) > .armband.hq-shirt-role,
.pitch-panel .kit-card .kit-image:not(:has(> .new-player-badge)):not(:has(> .minutes)):not(:has(> .classic-sub-icon-rail:not(:empty))) > .armband.hq-shirt-role.vice {
 top:43%!important;
 left:50%!important;
 transform:translate(-50%,-50%)!important;
}

/* Side-by-side requires room for a 17px role, a 4px gap and 29px NEW.
   64px shirt width allows a safe margin on both sides.
   Preserve v0.93 vertical stacking when match icons occupy a shirt corner. */
@container (min-width:64px) {
 .kit-image:has(> .hq-shirt-role):has(> .new-player-badge):not(:has(> .minutes)):not(:has(> .classic-sub-icon-rail:not(:empty))) > .armband.hq-shirt-role,
 .kit-image:has(> .hq-shirt-role):has(> .new-player-badge):not(:has(> .minutes)):not(:has(> .classic-sub-icon-rail:not(:empty))) > .armband.hq-shirt-role.vice {
  top:43%!important;
  left:calc(50% - 17px)!important;
  transform:translate(-50%,-50%)!important;
 }
 .kit-image:has(> .hq-shirt-role):has(> .new-player-badge):not(:has(> .minutes)):not(:has(> .classic-sub-icon-rail:not(:empty))) > .new-player-badge {
  top:43%!important;
  left:calc(50% + 10px)!important;
  transform:translate(-50%,-50%)!important;
 }
}

/* v0.96 — bring Classic shirt scale closer to Draft while preserving the
   tested pitch dimensions, player/card boxes and independent badge positions.
   Classic and Draft already use the same 110px official shirt source.
   Only the shirt artwork grows: no transformation of .kit-image or badges. */
.pitch-panel .kit-card .kit-image > .shirt{
  transform:scale(1.18);
  transform-origin:50% 53%;
  overflow:visible;
}
/* Compact five-across matchups have less room; protect neighbouring cards. */
.pitch-panel.compact-pitch .kit-card .kit-image > .shirt{
  transform:scale(1.10);
}
@media(max-width:390px){
  .pitch-panel:not(.compact-pitch) .kit-card .kit-image > .shirt{
    transform:scale(1.15);
  }
  .pitch-panel.compact-pitch .kit-card .kit-image > .shirt{
    transform:scale(1.07);
  }
}

/* v0.97: Classic jersey artwork scale correction.
   The 110px source images include transparent space; simply sizing the
   existing image slot does not give jerseys the same visual weight as Draft.
   Scale ONLY the shirt element, never the pitch, player tile or icon layers.
   Compact five-across formations use gentler settings for safe separation. */
.pitch-panel:not(.compact-pitch) .kit-card .kit-image > .shirt{
 transform:scale(1.39)!important;
 transform-origin:50% 51%!important;
}
.pitch-panel.compact-pitch .kit-card .kit-image > .shirt{
 transform:scale(1.20)!important;
 transform-origin:50% 51%!important;
}
@media(max-width:390px){
 .pitch-panel:not(.compact-pitch) .kit-card .kit-image > .shirt{
  transform:scale(1.31)!important;
 }
 .pitch-panel.compact-pitch .kit-card .kit-image > .shirt{
  transform:scale(1.13)!important;
 }
}
/* Keep every control/status indicator above the enlarged shirt artwork. */
.pitch-panel .kit-card .kit-image > :is(.hq-shirt-role,.new-player-badge,.classic-sub-icon-rail,.minutes){
 isolation:isolate;
}

/* v0.98 — Classic Table's expanded squad uses the same shirt-artwork
   enlargement as My Squad. Table passes small:true (compact-pitch),
   previously triggering the smaller 1.20 / 1.13 scale.
   Keep formation, player tile widths, pitch dimensions, badges and
   visibility logic unchanged; affect only the shirt image artwork. */
.pitch-panel.compact-pitch .kit-card .kit-image > .shirt{
 transform:scale(1.39)!important;
 transform-origin:50% 51%!important;
}
@media(max-width:390px){
 .pitch-panel.compact-pitch .kit-card .kit-image > .shirt{
  transform:scale(1.31)!important;
 }
}

/* v0.98.2 — shared Classic/Draft Best Bench statistics. Compact 1-row tabs. */
body.fpl-theme .what-if-switch.stats-section-switch{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:3px;
}
body.fpl-theme .stats-section-switch button{
  font-size:clamp(11px,2.8vw,13px);
  padding:11px 3px;
  white-space:nowrap;
}
.pill-tabs:has([data-stat="bench"]) .pill{
  font-size:clamp(10px,2.65vw,12px);
  padding:11px 2px;
}
.bench-stats-card{padding:12px 10px!important;overflow:hidden}
.bench-stats-card h3{font-size:17px;margin:0 0 7px;font-weight:850;color:#37003c}
.bench-stats-card>p{margin:7px 0 12px;line-height:1.45}
.bench-stats-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.bench-stats-table{width:100%;border-collapse:collapse;table-layout:fixed;font-variant-numeric:tabular-nums}
.bench-stats-table th{background:#37003c;color:#fff;padding:11px 3px;font-size:clamp(9px,2.4vw,11px);font-weight:800;line-height:1.2;text-align:center}
.bench-stats-table td{padding:12px 3px;font-size:clamp(10px,2.65vw,12px);border-bottom:1px solid #e9e1ec;text-align:center;color:#37003c;vertical-align:middle;background:#fff}
.bench-stats-table tbody tr:nth-child(4n + 3) td{background:#fcf9fd}
.bench-stats-table th:nth-child(1),.bench-stats-table td:nth-child(1){width:27px}
.bench-stats-table th:nth-child(2),.bench-stats-table td:nth-child(2){width:auto;text-align:left}
.bench-stats-table th:nth-child(3),.bench-stats-table td:nth-child(3){width:55px}
.bench-stats-table th:nth-child(4),.bench-stats-table td:nth-child(4){width:61px;font-weight:900}
.bench-stats-table th:nth-child(5),.bench-stats-table td:nth-child(5){width:74px}
.bench-stats-name{min-width:0;overflow:hidden}
.bench-stats-name strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bench-stats-name small{display:block;color:#756b7a;font-size:9px;margin-top:4px}
.bench-stats-details td{padding:0 7px 9px!important;text-align:left!important;background:#f8f5f9!important}
.bench-stats-details summary{padding:7px 0;font-weight:750;font-size:11px;cursor:pointer;color:#65426d}
.bench-week-details{padding:7px 4px;border-top:1px solid #e6dce8;font-size:11px;line-height:1.5}
.bench-week-details strong{display:block;margin-bottom:2px}
.bench-week-details span{color:#65546a;overflow-wrap:anywhere}
@media(max-width:390px){
 .bench-stats-table th:nth-child(3),.bench-stats-table td:nth-child(3){width:45px}
 .bench-stats-table th:nth-child(4),.bench-stats-table td:nth-child(4){width:54px}
 .bench-stats-table th:nth-child(5),.bench-stats-table td:nth-child(5){width:62px}
 .bench-stats-table th,.bench-stats-table td{padding-left:2px;padding-right:2px}
}

/* v0.98.3 — compact sortable historical Bench tables, no secondary tabs. */
.bench-stats-table .bench-sort{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
 border:0;background:transparent;color:inherit;font:inherit;font-weight:800;
 width:100%;min-width:0;line-height:1.12;padding:1px 0;cursor:pointer;
}
.bench-stats-table .bench-sort span{font-size:10px;line-height:1;color:#00ff87}
.bench-stats-table th[aria-sort="descending"] .bench-sort,
.bench-stats-table th[aria-sort="ascending"] .bench-sort{color:#00ff87}
.bench-stats-table.bench-stats-classic th:nth-child(2),
.bench-stats-table.bench-stats-classic td:nth-child(2){width:auto}
.bench-stats-table.bench-stats-classic th:nth-child(3),
.bench-stats-table.bench-stats-classic td:nth-child(3),
.bench-stats-table.bench-stats-classic th:nth-child(4),
.bench-stats-table.bench-stats-classic td:nth-child(4){width:61px}
.bench-stats-table.bench-stats-classic th:nth-child(5),
.bench-stats-table.bench-stats-classic td:nth-child(5){width:68px}
.bench-stats-table.bench-stats-classic th:nth-child(6),
.bench-stats-table.bench-stats-classic td:nth-child(6){width:39px}
.bench-stats-table.bench-stats-classic th:nth-child(7),
.bench-stats-table.bench-stats-classic td:nth-child(7){width:41px}
.bench-stats-table.bench-stats-classic td:nth-child(3),
.bench-stats-table.bench-stats-classic td:nth-child(4),
.bench-stats-table.bench-stats-classic td:nth-child(5){font-size:clamp(8px,1.95vw,10px)}
.bench-stats-table.bench-stats-classic th{font-size:clamp(8px,2vw,10px)}
@media(max-width:390px){
 .bench-stats-table.bench-stats-classic th:nth-child(3),
 .bench-stats-table.bench-stats-classic td:nth-child(3),
 .bench-stats-table.bench-stats-classic th:nth-child(4),
 .bench-stats-table.bench-stats-classic td:nth-child(4){width:53px}
 .bench-stats-table.bench-stats-classic th:nth-child(5),
 .bench-stats-table.bench-stats-classic td:nth-child(5){width:59px}
 .bench-stats-table.bench-stats-classic th:nth-child(6),
 .bench-stats-table.bench-stats-classic td:nth-child(6){width:34px}
 .bench-stats-table.bench-stats-classic th:nth-child(7),
 .bench-stats-table.bench-stats-classic td:nth-child(7){width:38px}
}

/* v0.98.4 — show full bench table team and manager names, without ellipses.
   Keep the same single-row stat tabs and compact sortable numeric columns. */
.bench-stats-table .bench-stats-name{overflow:visible!important;overflow-wrap:anywhere;word-break:normal}
.bench-stats-table .bench-stats-name strong{
 display:block!important;white-space:normal!important;overflow:visible!important;
 text-overflow:clip!important;overflow-wrap:anywhere!important;
 font-size:clamp(10px,2.5vw,12px);line-height:1.18;
}
.bench-stats-table .bench-stats-name small{
 display:block;white-space:normal;overflow-wrap:anywhere;
 font-size:clamp(8px,2vw,10px);line-height:1.2;
 margin-top:3px;font-weight:500;
}
.bench-stats-table td{line-height:1.18}
.bench-stats-table .bench-sort{font-size:clamp(8px,2.1vw,11px)}
.bench-stats-table .bench-stats-name{padding-left:4px!important;padding-right:1px!important}
.bench-stats-table.bench-stats-classic th:first-child,
.bench-stats-table.bench-stats-classic td:first-child{width:20px}
.bench-stats-table.bench-stats-classic th:nth-child(3),
.bench-stats-table.bench-stats-classic td:nth-child(3),
.bench-stats-table.bench-stats-classic th:nth-child(4),
.bench-stats-table.bench-stats-classic td:nth-child(4){width:52px}
.bench-stats-table.bench-stats-classic th:nth-child(5),
.bench-stats-table.bench-stats-classic td:nth-child(5){width:58px}
.bench-stats-table.bench-stats-classic th:nth-child(6),
.bench-stats-table.bench-stats-classic td:nth-child(6){width:37px}
.bench-stats-table.bench-stats-classic th:nth-child(7),
.bench-stats-table.bench-stats-classic td:nth-child(7){width:38px}
@media(max-width:390px){
 .bench-stats-table.bench-stats-classic th:nth-child(3),
 .bench-stats-table.bench-stats-classic td:nth-child(3),
 .bench-stats-table.bench-stats-classic th:nth-child(4),
 .bench-stats-table.bench-stats-classic td:nth-child(4){width:47px}
 .bench-stats-table.bench-stats-classic th:nth-child(5),
 .bench-stats-table.bench-stats-classic td:nth-child(5){width:54px}
 .bench-stats-table.bench-stats-classic th:nth-child(6),
 .bench-stats-table.bench-stats-classic td:nth-child(6){width:32px}
 .bench-stats-table.bench-stats-classic th:nth-child(7),
 .bench-stats-table.bench-stats-classic td:nth-child(7){width:35px}
}

/* v0.98.5 — three Draft Stats controls on one row. The embedded
   Draft stylesheet previously forced a two-column grid with !important. */
body.fpl-theme .what-if-switch.stats-section-switch{
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:4px!important;
}
body.fpl-theme .what-if-switch.stats-section-switch>button{
 min-width:0!important;
 width:100%;
 white-space:nowrap;
 font-size:clamp(10px,2.8vw,13px)!important;
 padding:10px 2px!important;
}

/* v0.98.8 — Draft Stats and Rivalry fill equal halves of one row. */
body.fpl-theme .what-if-switch.stats-section-switch{grid-template-columns:repeat(2,minmax(0,1fr))!important;}

/* v0.98.9 — all four Draft What-if options stay in ONE equal-width row. */
body.fpl-theme .what-if-switch.simulator-mode-switch{
 display:grid!important;
 grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:3px!important;
 padding:4px!important;
}
body.fpl-theme .what-if-switch.simulator-mode-switch>button{
 min-width:0!important;width:100%!important;
 font-size:clamp(9px,2.5vw,12px)!important;
 padding:11px 1px!important;
 white-space:nowrap!important;
 letter-spacing:-.01em;
}

/* v0.98.10 — verified Free Hit selection in Classic player Season Stats. */
.season-line .season-owned-freehit{
 display:flex;flex-direction:column;align-items:center;justify-self:center;gap:2px;
 min-width:0;line-height:1;
}
.season-line .season-owned-freehit .owned-yes{flex:none}
.season-line .season-fh-label{
 display:block;border-radius:3px;background:#37003c;color:#fff;
 font-size:8px;font-weight:900;padding:2px 3px;letter-spacing:.01em;
}
.season-line:has(.season-owned-freehit){min-height:51px}

/* v0.98.12 — compact full-width Classic league history manager selector. */
.classic-history-team-selector{display:flex;flex-direction:column;gap:7px;padding:12px 14px;margin-bottom:12px;}
.classic-history-team-selector label{font-size:10px;font-weight:800;letter-spacing:.05em;color:var(--muted,#746a78);}
.classic-history-team-selector select{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;font-size:13px;padding:10px 11px;}

/* v0.98.53 — two small keeper-end boards left and right of goalkeeper.
   Visual only: existing formation geometry and scoring remain unchanged. */
.pitch-panel .football-field,
body.fpl-theme .draft-pl-pitch .pitch-grass,
body.fpl-theme .pl-pitch{position:relative}
.hq-creator-goalboard{
 position:absolute!important;inset:auto!important;top:3px!important;bottom:auto!important;
 box-sizing:border-box!important;width:25%!important;height:clamp(19px,4.5vw,26px)!important;
 min-height:0!important;max-height:26px!important;padding:2px 3px!important;margin:0!important;
 display:flex!important;flex-direction:row!important;align-items:center!important;
 justify-content:center!important;gap:3px!important;overflow:hidden!important;
 background:linear-gradient(105deg,#29002d,#4d0756 50%,#29002d)!important;
 border:1px solid #00ff87!important;border-radius:3px!important;
 box-shadow:0 1px 3px #0004!important;color:#fff!important;
 z-index:1!important;pointer-events:none!important;transform:none!important;
}
.hq-creator-goalboard-left{left:3%!important;right:auto!important}
.hq-creator-goalboard-right{right:3%!important;left:auto!important}
.hq-creator-goalboard img{
 display:block!important;width:clamp(13px,3vw,18px)!important;
 height:clamp(13px,3vw,18px)!important;object-fit:contain!important;flex:none!important;
 border-radius:2px!important;
}
.hq-creator-goalboard-text{
 display:flex!important;flex-direction:column!important;min-width:0!important;
 align-items:center!important;justify-content:center!important;gap:1px!important;
 line-height:1.05!important;text-align:center!important;
}
.hq-creator-goalboard-text b{
 color:#fff!important;font:900 clamp(7px,1.75vw,10px)/1 Arial,sans-serif!important;
 letter-spacing:.01em!important;white-space:nowrap!important;
}
.hq-creator-goalboard-text small{
 color:#00ff87!important;font:700 clamp(5px,1.25vw,7px)/1 Arial,sans-serif!important;
 letter-spacing:0!important;white-space:nowrap!important;
}
.pitch-panel .football-field>.formation,
body.fpl-theme .draft-pl-pitch .pitch-grass>.pitch-formation,
body.fpl-theme .pl-pitch>.pl-formation{position:relative;z-index:2}
@media(max-width:390px){
 .hq-creator-goalboard{width:27%!important;gap:2px!important;padding:2px!important}
 .hq-creator-goalboard-left{left:1.5%!important}
 .hq-creator-goalboard-right{right:1.5%!important}
}

/* v0.98.54 — one promotional board between the two GKs on Draft roster pitches.
   Other single-GK pitch views keep their existing two flanking boards. */
body.fpl-theme .roster-pitch .pitch-grass>.hq-creator-goalboard-center{
 top:3px!important;left:50%!important;right:auto!important;bottom:auto!important;
 transform:translateX(-50%)!important;width:clamp(130px,38%,225px)!important;
 height:clamp(22px,5vw,29px)!important;max-height:29px!important;
 gap:5px!important;padding:2px 5px!important;
 z-index:1!important;pointer-events:none!important;
}
body.fpl-theme .roster-pitch .hq-creator-goalboard-center .hq-creator-goalboard-text b{
 font-size:clamp(8px,2vw,11px)!important;
}
body.fpl-theme .roster-pitch .hq-creator-goalboard-center .hq-creator-goalboard-text small{
 font-size:clamp(6px,1.5vw,8px)!important;
}

/* v0.98.60: independent FPL HQ 2026/27-inspired REAR shirts.
   Fit existing Classic/Draft pitch geometry without resizing player cards. */
.hq-rear-kit{display:block;position:relative;width:100%;height:100%;min-width:0;min-height:0;
 overflow:visible;pointer-events:none;line-height:0!important}
.hq-rear-kit .hq-rear-shirt{display:block;width:100%;height:100%;object-fit:contain;
 overflow:visible;filter:drop-shadow(0 1px 1px #160d2438)}
.pitch-panel .kit-card .kit-image>.hq-rear-kit{
 width:100%;height:100%;transform:scale(1.10);transform-origin:50% 55%
}
.pitch-panel.compact-pitch .kit-card .kit-image>.hq-rear-kit{transform:scale(1.04)}
body.fpl-theme .kit-wrap.pl-kit>.hq-rear-kit,
body.fpl-theme .player-photo-wrap>.hq-rear-kit{
 display:inline-block;width:clamp(37px,5.5vw,65px);height:clamp(36px,5.5vw,65px);
 max-width:100%;flex:none;vertical-align:bottom;
}
body.fpl-theme .kit-player.is-dnp .hq-rear-kit,
body.fpl-theme .kit-player.is-benched .hq-rear-kit{filter:grayscale(.85)}
.pitch-panel .kit-card.classic-no-appearance .hq-rear-kit{filter:grayscale(1);opacity:.8}
@media(max-width:390px){
 .pitch-panel .kit-card .kit-image>.hq-rear-kit{transform:scale(1.06)}
 body.fpl-theme .kit-wrap.pl-kit>.hq-rear-kit{width:clamp(32px,8vw,52px);height:clamp(31px,8vw,52px)}
}

/* iPhone readability: show the large shirt number; keep the player's existing
   readable name strip immediately underneath. Reveal shirt lettering on larger
   screens where it fits rather than shrinking the name to illegibility. */
@media(max-width:600px){
 .hq-rear-shirt .hq-rear-name{display:none}
}

