/* P44: the squad editor (squad.js), shared by the Dugout and the fan page /my-team. The editor sits under .sq; the page parts
   around it (the club band, the tabs, the ready line) are the Dugout's, used by both pages. */
/* ---------- club band */
.dhead { padding: var(--s5) 0 var(--s4); background: linear-gradient(180deg, color-mix(in srgb, var(--kit) 22%, transparent), transparent 90%); border-bottom: 1px solid var(--line-soft); }
.dhead .in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s4); align-items: center; }
.crest.xl { width: 80px; height: 92px; } .crest.xl b { font-size: 25px; }
.crest.logo.xl { width: 128px; height: 128px; }
.dhead h1 { margin: 0; }
.dhead .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s2); }
/* ---------- P44: the ready line: next match, then prompts → fitness → practice (a real sequence, so numbered), and How the Dugout works */
.ready { display: grid; gap: var(--s3); margin: var(--s4) 0 var(--s5); padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); }
.nextm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--t-sm); color: var(--ink-2); }
.nextm .kick { font: 700 var(--t-xs)/1 var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.nextm b { font: 800 var(--t-md)/1.1 var(--display); color: var(--ink); }
.ready .checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.step { flex: 1 1 240px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-soft); min-width: 0; }
.step .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 var(--t-sm)/1 var(--display); background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.step.done .n { background: var(--win); color: #062012; border-color: transparent; }
.step.bad .n { background: var(--loss); color: #2a0703; border-color: transparent; }
.step.now { border-color: var(--flood); box-shadow: 0 0 0 1px var(--flood) inset; }
.step .what { flex: 1; min-width: 0; display: grid; }
.step .what b { font: 700 var(--t-md)/1.1 var(--display); }
.step .what small { font-size: var(--t-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ready details.how summary { cursor: pointer; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.ready details.how ol { margin: 8px 0 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: var(--t-sm); color: var(--ink-2); }
/* ---------- views: the tabs are the page's main navigation */
.views { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.views #tabs button { padding: 9px 18px; min-height: 40px; font-size: var(--t-md); }
.viewtools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 719px) {
  .dhead .in { grid-template-columns: auto minmax(0, 1fr); }
  .dhead .in > :last-child { grid-column: 1 / -1; }
  .crest.xl { width: 56px; height: 64px; } .crest.xl b { font-size: 18px; }
  .crest.logo.xl { width: 88px; height: 88px; }
  .viewtools { margin-left: 0; }
  .views #tabs button { padding: 8px 12px; font-size: var(--t-sm); }
  .step .what small { white-space: normal; }
}
/* ---------- the editor */
.sq .squadhint { margin: 0 0 8px; }
.sq .squadgrid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr); gap: var(--s5); align-items: start; }
.sq .squadgrid > * { min-width: 0; }
/* formation picker: every shape as a mini pitch */
.sq .shapes { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 2px; padding: 2px 2px 10px; scrollbar-width: thin; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.sq .shape { flex: none; scroll-snap-align: start; display: grid; justify-items: center; gap: 4px; padding: 8px 10px 6px; border-radius: var(--r-md); border: 1px solid var(--line-soft); background: var(--surface); cursor: pointer; color: var(--ink-2); min-width: 92px; }
.sq .shape:hover { border-color: var(--line); }
.sq .shape[aria-pressed="true"] { border-color: var(--flood); color: var(--ink); box-shadow: 0 0 0 1px var(--flood) inset; }
.sq .shape svg { width: 64px; height: 40px; }
.sq .shape b { font: 800 var(--t-md)/1 var(--display); }
.sq .shape small { font-size: 10.5px; white-space: nowrap; }

/* the pitch */
.sq .pitch { position: relative; aspect-ratio: 110 / 70; border-radius: var(--r-lg); overflow: hidden; background: repeating-linear-gradient(90deg, var(--turf-a) 0 8.33%, var(--turf-b) 8.33% 16.66%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 20px 40px -24px rgba(0,0,0,.6); }
.sq .pitch svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sq .pshirt { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 3px; width: 128px; border: 0; background: none; padding: 4px; cursor: pointer; color: #fff; border-radius: 12px; transition: left .35s var(--ease), top .35s var(--ease); }
.sq .pshirt i { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 800 15px/1 var(--display); font-style: normal; background: var(--kit); color: var(--kit-ink); border: 3px solid rgba(255,255,255,.95); box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.sq .pshirt[aria-pressed="true"] i { outline: 3px solid var(--flood); outline-offset: 3px; }
.sq .pshirt.ok i { border-color: #4ade80; } .sq .pshirt.late i { border-color: #ff6b5b; }
.sq .pshirt .tip { position: absolute; top: -6px; right: -8px; width: 18px; height: 18px; border-radius: 50%; background: var(--flood); color: var(--flood-ink); font: 800 11px/18px var(--text); }
.sq .pshirt b, .sq .pshirt small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.sq .pshirt b { font: 700 12.5px/1.2 var(--text); }
.sq .pshirt small { font: 600 10.5px/1.2 var(--text); }
.sq .pshirt:hover i { transform: scale(1.05); }
.sq .pshirt:focus-visible { outline: 3px solid var(--flood); }
.sq .attack { position: absolute; right: 12px; bottom: 8px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
/* bench tray */
.sq .bench { margin-top: var(--s4); display: grid; gap: var(--s3); }
.sq .bench h3 { margin: 0 0 6px; font: 700 var(--t-sm)/1 var(--text); color: var(--ink-3); }
.sq .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sq .bline { display: grid; gap: 6px; }
.sq .lhead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.sq .lhead h3 { margin: 0; }
.sq .lhead .btn { margin-left: auto; }
.sq .pchip { display: inline-flex; align-items: center; border-radius: 999px; border: 2px solid var(--line-soft); background: var(--surface); font-size: var(--t-sm); color: var(--ink); transition: opacity .15s, box-shadow .15s, border-color .15s; }
.sq .pchip .pbody { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; min-height: 38px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-radius: 999px; text-align: left; }
.sq .pchip .pbody:disabled { cursor: not-allowed; }
.sq .pchip .pbody:focus-visible, .sq .swapbtn:focus-visible { outline: 3px solid var(--flood); outline-offset: 2px; }
.sq .pchip .lb { min-width: 40px; padding: 4px 6px; border-radius: 999px; font: 800 12px/1 var(--display); text-align: center; background: var(--kit); color: var(--kit-ink); }
.sq .pchip small { color: var(--ink-3); font-size: var(--t-xs); }
/* starting: solid, kit-tinted; bench: dashed and faded */
.sq .pchip.on { background: color-mix(in srgb, var(--kit) 16%, var(--surface)); border-color: color-mix(in srgb, var(--kit) 70%, var(--line)); }
.sq .pchip.off { border-style: dashed; border-color: var(--line); background: transparent; }
.sq .pchip.off .pbody { color: var(--ink-2); }
.sq .pchip.off .lb { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 2px var(--kit); }
.sq .pchip:has(.pbody[aria-pressed="true"]) { box-shadow: 0 0 0 2px var(--flood); }
.sq .swapbtn { flex: none; width: 32px; height: 32px; margin-right: 4px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); cursor: pointer; font: 700 15px/1 var(--text); display: grid; place-items: center; }
.sq .swapbtn:hover { color: var(--ink); border-color: var(--flood); }
.sq .pchip.from { box-shadow: 0 0 0 2px var(--flood); }
.sq .pchip.from .swapbtn { background: var(--flood); color: var(--flood-ink); border-color: var(--flood); }
.sq .pchip.target { border-style: solid; border-color: var(--flood); animation: swapPulse 1.2s ease-in-out infinite; }
.sq .pchip.target .pbody { opacity: 1; padding-right: 5px; }
.sq .swapbadge { padding: 4px 9px; border-radius: 999px; background: var(--flood); color: var(--flood-ink); font: 700 11px/1 var(--text); white-space: nowrap; }
.sq .pchip.dim { opacity: .38; }
.sq .pchip .tick { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; font: 800 12px/1 var(--text); }
.sq .pchip.on .tick { background: var(--flood); border-color: var(--flood); color: var(--flood-ink); }
.sq .swaphint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--flood); background: color-mix(in srgb, var(--flood) 14%, var(--surface)); font-size: var(--t-sm); }
.sq .swaphint .btn, .sq .picker .row .btn-quiet { margin-left: auto; }
.sq .picker { display: grid; gap: 8px; padding: var(--s3); border-radius: var(--r-md); border: 1px solid var(--flood); background: var(--surface-2); }
.sq .picker p { margin: 0; font-size: var(--t-sm); }
.sq .picker .row { display: flex; gap: 8px; align-items: center; }
.sq .pshirt.dim { opacity: .4; }
.sq .pshirt.from i { outline: 3px solid var(--flood); outline-offset: 3px; }
.sq .pshirt.target i { outline: 3px solid var(--flood); outline-offset: 3px; animation: swapShirt 1.2s ease-in-out infinite; }
.sq .pshirt .swapflag { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); padding: 3px 8px; border-radius: 999px; background: var(--flood); color: var(--flood-ink); font: 700 11px/1 var(--text); white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
@keyframes swapPulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--flood) 35%, transparent); } }
@keyframes swapShirt { 50% { outline-offset: 7px; } }
@media (prefers-reduced-motion: reduce) { .sq .pchip.target, .sq .pshirt.target i { animation: none; } }
/* player panel */
.sq .panel-player { padding: var(--s4); display: grid; gap: var(--s4); }   /* no scroll of its own and not sticky: the page scrolls it (cs) */
.sq .pp-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: center; }
.sq .pp-head .lb { min-width: 52px; padding: 8px 6px; border-radius: 10px; font: 800 var(--t-lg)/1 var(--display); text-align: center; background: var(--kit); color: var(--kit-ink); }
.sq .pp-head input { width: 100%; font: 700 var(--t-xl)/1.1 var(--display); background: transparent; border: 0; border-bottom: 2px dashed var(--line); color: var(--ink); padding: 2px 0; min-width: 0; }
.sq .pp-head input:focus { outline: none; border-bottom-color: var(--flood); }
.sq .pp-head .num-lb { padding: 0; display: grid; place-items: center; cursor: text; }
.sq .pp-head .num-in { width: 56px; padding: 8px 4px; border: 0; border-radius: 10px; background: transparent; color: var(--kit-ink); font: 800 var(--t-lg)/1 var(--display); text-align: center; -moz-appearance: textfield; appearance: textfield; }
.sq .pp-head .num-in::-webkit-outer-spin-button, .sq .pp-head .num-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sq .pp-head .num-in:focus { outline: 2px solid var(--flood); outline-offset: 1px; }
.sq .num-note { margin: 6px 0 0; } .sq .num-msg { margin: 4px 0 0; }
/* P27: the position panel's header (a position label, not an editable number) and its inline links */
.sq .pp-head span.num-lb { padding: 8px 8px; font-size: var(--t-md); }
.sq .pp-head .pos-title { font: 700 var(--t-xl)/1.1 var(--display); color: var(--ink); min-width: 0; }
.sq .link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--flood); text-underline-offset: 3px; cursor: pointer; }
.sq .link-btn:focus-visible { outline: 3px solid var(--flood); outline-offset: 2px; }
.sq .pp-close { display: none; }
.sq .field > .lab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sq .field > .lab b { font: 700 var(--t-md)/1 var(--display); letter-spacing: .01em; }
.sq .field > .lab span { font-size: var(--t-xs); color: var(--ink-3); }
.sq .models { display: grid; gap: 6px; }
.sq .mcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line-soft); background: var(--surface-2); cursor: pointer; text-align: left; color: var(--ink); width: 100%; }
.sq .mcard .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-3); }
.sq .mcard[aria-checked="true"] { border-color: var(--flood); box-shadow: 0 0 0 1px var(--flood) inset; }
.sq .mcard[aria-checked="true"] .dot { border: 5px solid var(--flood); }
.sq .mcard b { display: block; font-weight: 700; font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq .mcard small { display: block; color: var(--ink-3); font-size: var(--t-xs); }
.sq .mcard .cost { font: 800 var(--t-md)/1 var(--display); color: var(--ink-2); text-align: right; }
.sq .mcard .cost small { font: 600 10px/1.2 var(--text); }
.sq .mcard[disabled] { opacity: .55; cursor: not-allowed; }
.sq .presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sq .preset { display: grid; gap: 2px; padding: 7px 10px; border-radius: var(--r-md); border: 1px solid var(--line-soft); background: var(--surface-2); cursor: pointer; text-align: left; color: var(--ink); }
.sq .preset b { font-size: var(--t-xs); color: var(--ink-3); font-weight: 700; }
.sq .preset span { font-size: var(--t-sm); font-weight: 600; }
.sq .preset[aria-pressed="true"] { border-color: var(--flood); box-shadow: 0 0 0 1px var(--flood) inset; }
.sq .brief { width: 100%; min-height: 220px; resize: vertical; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 400 var(--t-sm)/1.55 var(--text); }
.sq .brief:focus { outline: none; border-color: var(--flood); }
.sq .brief-foot { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 6px; font-size: var(--t-xs); color: var(--ink-3); }
.sq .brief-foot .over { color: var(--loss); font-weight: 700; }
.sq .swap { display: grid; gap: 8px; padding: var(--s3); border-radius: var(--r-md); background: var(--surface-2); }
.sq .swap p { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.sq details.adv summary { cursor: pointer; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.sq details.adv[open] summary { margin-bottom: 8px; }
.sq .adv p { margin: 0 0 8px; font-size: var(--t-xs); color: var(--ink-3); }
.sq .shapebar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.sq .shapebar > .icon-btn { width: 32px; height: 32px; }
.sq .gloss { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; font-size: var(--t-xs); }
.sq .gloss dt { font-weight: 700; color: var(--ink); font-family: ui-monospace, Menlo, monospace; }
.sq .gloss dd { margin: 0; color: var(--ink-2); }
.sq .pshirt i { font-size: 13px; letter-spacing: -.01em; }
.sq .warn-text { color: var(--loss) !important; }
.sq .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sq .lhead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.sq .lhead h3 { margin: 0; font: 700 var(--t-sm)/1 var(--text); color: var(--ink-3); }
.sq .celebs { flex-wrap: wrap; border-radius: 19px; }   /* a full pill clipped the end buttons once they wrapped onto more rows */
.sq .celeb-preview { display: grid; gap: var(--s2); margin-top: var(--s2); }
.sq .celeb-preview video { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-md); background: #0b241b; object-fit: cover; }
.sq .celeb-preview p { margin: 0; font-size: var(--t-sm); }
.sq .below:empty { display: none; }
.sq .below { margin-top: var(--s4); display: grid; gap: var(--s3); }
.sq .scrim { display: none; }
@media (max-width: 1060px) {
  .sq .squadgrid { grid-template-columns: 1fr; }
  .sq .panel-player { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; top: auto; max-height: 86vh; overflow: auto; overscroll-behavior: contain; border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.5); transform: translateY(105%); transition: transform .28s var(--ease); padding-bottom: calc(var(--s5) + env(safe-area-inset-bottom)); }
  .sq .panel-player.open { transform: none; }
  .sq .pp-close { display: inline-grid; }
  .sq .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(3, 12, 8, .5); }
  .sq .scrim[hidden] { display: none; }
}
@media (max-width: 719px) {
  .sq .pshirt { width: 76px; } .sq .pshirt i { width: 36px; height: 36px; font-size: 12px; border-width: 2px; } .sq .pshirt small { display: none; } .sq .pshirt b { font-size: 10px; }
  .sq .shapebar > .icon-btn { display: none; }
  .sq .shapebar { grid-template-columns: minmax(0, 1fr); }
  .sq .gloss { grid-template-columns: 1fr; } .sq .gloss dd { margin-bottom: 6px; }
  .sq .pshirt i { font-size: 10px; }
  .sq .pchip .pbody { min-height: 44px; }
  .sq .swapbtn { width: 44px; height: 44px; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .sq .pshirt { transition: none; } .sq .panel-player { transition: none; } }

/* phone pass (cs, 2026-11-25): on a phone the pitch shirt's label was cut ("DEF1 · Saoir…", the keeper's ran off the pitch); the position
   goes on its own line and the name under it, up to two lines */
@media (max-width: 719px) {
  .sq .pshirt b { white-space: normal; overflow: visible; text-overflow: clip; font-size: 10.5px; line-height: 1.15; text-align: center; }
  .sq .pshirt b .plab { display: block; opacity: .85; }
  .sq .pshirt b .psep { display: none; }
  .sq .pshirt b .pname { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}

