/* ---------- WC26 Draft League ---------- */
:root {
  --bg: #0b0f1a;
  --bg2: #111726;
  --card: #161e30;
  --card2: #1c2640;
  --line: #263250;
  --text: #eef2fb;
  --muted: #8b97b3;
  --accent: #2dd4a7;       /* pitch green */
  --accent-dim: #1b8f72;
  --gold: #e9c46a;
  --red: #ef6461;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(45,212,167,.07), transparent 60%),
    radial-gradient(900px 400px at 10% -10%, rgba(233,196,106,.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  min-height: 100vh;
  font-size: 15px;
}

/* ---------- header ---------- */
.topbar {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,15,26,.85);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; }
/* the black-and-gold crest, masked round — gold glow instead of pitch green */
.brand-crest { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; filter: drop-shadow(0 0 10px rgba(233,196,106,.35)); }
.brand h1 { font-size: 20px; letter-spacing: .5px; }
.brand h1 span { color: var(--accent); font-weight: 600; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .4px; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav button {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 14px; font-weight: 600; padding: 9px 14px; border-radius: 9px;
  transition: all .15s;
}
.nav button:hover { color: var(--text); background: var(--card); }
.nav button.active { color: #07120e; background: var(--accent); }
.nav button:disabled { opacity: .3; cursor: default; background: none; color: var(--muted); }
/* icons + short labels only surface on the phone tab bar */
.nav-ico { display: none; width: 22px; height: 22px; }
.nav-lbl-short { display: none; }
.nav-more { position: relative; }
.nav-more summary {
  list-style: none; color: var(--muted); cursor: pointer; font-size: 14px;
  font-weight: 600; padding: 9px 14px; border-radius: 9px; user-select: none;
  position: relative;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: ' ▾'; font-size: 10px; }
.nav-more summary:hover { color: var(--text); background: var(--card); }
.nav-more.active summary { color: #07120e; background: var(--accent); }
.nav-more-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 80;
  min-width: 190px; padding: 8px; display: grid; gap: 3px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
}
.nav-more-menu button { width: 100%; text-align: left; }
.sync-area { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }

main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }
.footer { text-align: center; color: #515d77; font-size: 11px; padding: 20px; border-top: 1px solid var(--line); }

/* ---------- shared ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
h2 { font-size: 17px; margin-bottom: 14px; letter-spacing: .3px; }
h3 { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin: 14px 0 8px; }
.btn {
  background: var(--accent); color: #07120e; border: none; border-radius: 9px;
  font-weight: 700; font-size: 14px; padding: 10px 18px; cursor: pointer;
  transition: transform .1s, filter .15s;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--red); color: #fff; }
.btn.small { padding: 6px 12px; font-size: 12px; }
.btn.icon-btn {
  width: 32px; height: 32px; min-width: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; flex: none;
}
.header-icon-btn {
  width: 30px; height: 30px; padding: 0; display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer;
}
.home-btn {
  min-height: 36px; padding: 8px 14px; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; font-size: 13px;
  white-space: nowrap;
}
.home-btn svg { width: 15px; height: 15px; flex: none; }
/* It remains an obvious escape hatch without competing with the active
   navigation tab when the manager is already on the Dashboard. */
.home-btn.is-current {
  color: var(--accent); background: rgba(45,212,167,.10);
  border: 1px solid rgba(45,212,167,.45);
}
input[type=text], input[type=number], select {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 9px 12px; font-size: 14px; outline: none;
}
input:focus, select:focus { border-color: var(--accent-dim); }
.flag { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.12); flex: none; }
.flag.big { width: 34px; height: 25px; }
.pos-badge {
  font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 5px; letter-spacing: .5px; flex: none;
}
.pos-GK { background: #3a2f5b; color: #c4b5fd; }
.pos-DF { background: #173a5e; color: #7dd3fc; }
.pos-MF { background: #14452f; color: #86efac; }
.pos-FW { background: #4a2333; color: #fda4af; }
.muted { color: var(--muted); }
.gold { color: var(--gold); font-weight: 700; }
.tag { font-size: 11px; background: var(--card2); border: 1px solid var(--line); padding: 3px 9px; border-radius: 99px; color: var(--muted); }

/* ---------- setup ---------- */
.setup-wrap { max-width: 640px; margin: 30px auto; display: flex; flex-direction: column; gap: 18px; }
.setup-hero { text-align: center; padding: 10px 0 6px; }
.setup-hero h2 { font-size: 26px; }
.setup-hero p { color: var(--muted); margin-top: 6px; }
.mgr-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.mgr-row input { flex: 1; min-width: 0; }
.mgr-num { width: 26px; height: 26px; border-radius: 50%; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted); flex: none; }
.quota-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quota-grid > div { min-width: 0; }
.quota-grid label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 5px; font-weight: 700; }
.quota-grid input { width: 100%; min-width: 0; }
@media (max-width: 480px) { .quota-grid { grid-template-columns: repeat(2, 1fr); } }
.setup-total { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- draft ---------- */
.draft-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
/* grid children default to min-width:auto, so one unwrappable squad row can
   push the whole document wider than a small phone — never let it */
.draft-layout > * { min-width: 0; }
@media (max-width: 980px) {
  .draft-layout { grid-template-columns: 1fr; }
  /* The same prep queue already lives in the thumb drawer at this width. */
  .draft-prep-layout .draft-side { display: none; }
}

.draft-intro { margin-bottom: 14px; padding: 0; overflow: hidden; }
.draft-intro > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px;
}
.draft-intro > summary::-webkit-details-marker { display: none; }
.draft-intro > summary::after { content: '＋'; color: var(--muted); font-size: 16px; }
.draft-intro[open] > summary::after { content: '−'; }
.draft-intro > summary b { font-size: 15px; }
.draft-intro > summary span { margin-left: auto; color: var(--muted); font-size: 11px; }
.draft-intro-body { padding: 0 18px 14px; border-top: 1px solid rgba(38,50,80,.55); }
.draft-intro-body .rules-p { margin: 12px 0 0; }
.draft-intro-body > .muted { margin-top: 7px; font-size: 12px; }

.on-clock {
  display: grid; grid-template-columns: 1fr auto auto; gap: 3px 14px; align-items: center;
  grid-template-areas: "who clock btns" "meta clock btns";
  background: linear-gradient(100deg, rgba(45,212,167,.16), rgba(45,212,167,.03));
  border: 1px solid rgba(45,212,167,.4);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px;
}
.on-clock .who { grid-area: who; display: flex; flex-direction: column; gap: 1px; }
.on-clock .oc-label { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--muted); }
.on-clock .oc-name { font-size: 32px; font-weight: 800; line-height: 1.1; }
.on-clock .oc-sub { font-size: 13px; color: var(--text); font-weight: 600; margin-top: 2px; }
.on-clock > .pick-clock { grid-area: clock; }
.on-clock .pick-meta { grid-area: meta; color: var(--muted); font-size: 13px; }
.on-clock .oc-btns { grid-area: btns; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.rec {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none;
  animation: rec-blink 1.2s infinite;
}
@keyframes rec-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }
.investigation {
  display: flex; align-items: center; gap: 10px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 12.5px;
  color: var(--muted); margin-bottom: 16px; padding: 13px 18px;
  border-color: rgba(239,100,97,.35);
}
.investigation > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.investigation b { color: var(--red); letter-spacing: 1px; flex: none; }

.order-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.order-chip {
  font-size: 12px; padding: 5px 11px; border-radius: 99px;
  background: var(--card2); border: 1px solid var(--line); color: var(--muted);
}
.order-chip.now { background: var(--accent); color: #07120e; font-weight: 800; border-color: var(--accent); }
.order-chip.done { opacity: .35; text-decoration: line-through; }

.pool-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pool-controls input[type=text] { flex: 1; min-width: 180px; }
.row-actions { display: flex; gap: 5px; align-items: center; justify-content: flex-end; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.pool-table { width: 100%; border-collapse: collapse; }
.pool-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); padding: 7px 8px; border-bottom: 1px solid var(--line);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.pool-table th:hover { color: var(--text); }
/* .pool-table th's text-align:left outranks .num on specificity, so numeric
   headers sat left over right-aligned figures. Invisible on one-letter headers
   like P/W/D, obvious the moment a column is wide (Marc, 10 Aug) */
.pool-table th.num { text-align: right; }
.pool-table td { padding: 6px 8px; border-bottom: 1px solid rgba(38,50,80,.5); font-size: 13.5px; }
.pool-table tr:hover td { background: rgba(45,212,167,.05); }
/* action column pinned to the right edge so Sign/Claim/Draft never scrolls out of view on phones */
.pool-table th.act, .pool-table td.act {
  position: sticky; right: 0; z-index: 1;
  background: var(--card);
  box-shadow: -10px 0 10px -8px rgba(0,0,0,.55);
}
.pool-table tr:hover td.act { background: var(--card2); }
.pcell { display: flex; align-items: center; gap: 8px; }
.pcell > div:last-child { min-width: 0; }
/* the NAME ellipsizes in its own span; the flag sits outside the clip so it
   can never render half-Italy-as-Algeria (Marc, 2 Aug) */
.pcell .pname { font-weight: 600; display: flex; align-items: center; gap: 4px; min-width: 0; }
.player-name-btn { appearance: none; border: 0; background: none; color: inherit; font: inherit; padding: 0; text-align: left; }
.pcell .pname .pn-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcell .pname .nat-flag { flex: none; }
.pcell .pclub { font-size: 11.5px; color: var(--muted); }
.player-copy { min-width: 0; }
.player-mobile-meta { display: none; color: var(--muted); font-size: 10px; line-height: 1.2; margin-top: 2px; }
/* phones: cap the player cell so name + flag stop short of the sticky
   action column instead of sliding underneath it (Marc's screenshot — a
   display-zoomed iPhone put the Sign overlay on top of Tonali's flag), and
   compare goes icon-only so the action column stops being a third of the
   screen. max-width must sit on .pcell — table auto-layout ignores it on td */
@media (max-width: 700px) {
  /* Player, Rate and the action remain together; club/position move beneath
     the name instead of forcing a sideways scroll (Ben, 5 Aug). */
  .draft-pool .col-club, .draft-pool .col-pos, .draft-pool .col-status { display: none; }
  .draft-pool td.pcol .pcell { width: clamp(112px, 37vw, 150px); max-width: calc(100vw - 188px); }
  .draft-pool .player-mobile-meta { display: block; }
  .draft-pool th.act, .draft-pool td.act { width: 77px; min-width: 77px; padding-left: 4px; padding-right: 4px; }
  .draft-pool .act [data-compare], .draft-pool .act .icon-btn { width: 34px; height: 34px; min-width: 34px; padding: 0; }
  .draft-pool.is-live .act [data-compare] { display: none; }
  .pool-table .act .cmp-txt { display: none; }
  .pool-table .act [data-compare]::before { content: '\2942'; font-size: 14px; }
}
.num { text-align: right; font-variant-numeric: tabular-nums; }
.show-more { text-align: center; padding: 14px; }

.draft-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; }
/* drag & drop into the autopick list (laptop path; buttons cover phones) */
tr[data-drag], .qrow[draggable] { cursor: grab; }
.queue-card.drop-hot { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 12px; }
.act .star-on { color: var(--accent) !important; border-color: var(--accent) !important; }
.side-squad { font-size: 13px; }
.side-squad .srow { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.quota-bar { display: flex; gap: 6px; margin: 8px 0 4px; flex-wrap: wrap; }
.quota-pill { font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.quota-pill.full { background: rgba(45,212,167,.15); color: var(--accent); border-color: var(--accent-dim); }
.pick-log { max-height: 300px; overflow-y: auto; font-size: 12.5px; }
.pick-log .lrow { display: flex; gap: 8px; align-items: center; padding: 4px 0; color: var(--muted); }
.pick-log .lrow b { color: var(--text); }

/* ---------- squads view ---------- */
.squads-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.squad-card .mgr-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.squad-card .mgr-head .pts { font-size: 22px; font-weight: 800; color: var(--gold); }
.squad-row { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13.5px; border-bottom: 1px solid rgba(38,50,80,.4); }
.squad-row:last-child { border: none; }
/* phones: rows stay one line and shed width from the name, never the page */
@media (max-width: 700px) {
  .squad-row { gap: 7px; }
  .squad-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .squad-row .sp-pts, .squad-row .xi-chip, .squad-row .pos-badge, .squad-row .shirt-no { flex: none; overflow: visible; }
}
.squad-row .sp-pts { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- league table ---------- */
.league-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 10px;
}
.league-row.leader { border-color: rgba(233,196,106,.55); background: linear-gradient(100deg, rgba(233,196,106,.09), var(--card)); }
.league-row .rank { font-size: 24px; font-weight: 800; width: 34px; color: var(--muted); }
.league-row.leader .rank { color: var(--gold); }
.league-row .lname { font-size: 17px; font-weight: 700; flex: 1; }
.league-row .lpts { font-size: 26px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.breakdown { margin: -4px 0 14px; padding: 14px 20px; background: var(--bg2); border: 1px solid var(--line); border-top: none; border-radius: 0 0 var(--radius) var(--radius); }
.toplist .squad-row { font-size: 14px; }

/* ---------- fixtures ---------- */
.fx-day { margin-bottom: 22px; }
.fx-day h3 { margin-top: 0; }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); gap: 12px; }
.fx {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px;
}
.fx .fx-team { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.fx .fx-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx .fx-team.right { justify-content: flex-end; }
.fx .fx-score { font-weight: 800; font-variant-numeric: tabular-nums; padding: 2px 10px; background: var(--card2); border-radius: 7px; white-space: nowrap; }
.fx.live .fx-score { background: var(--red); color: #fff; }
.fx .fx-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.fx { flex-wrap: wrap; }
.fx .fx-yt {
  flex-basis: 100%; text-align: center; font-size: 11.5px; color: var(--muted);
  text-decoration: none; padding-top: 4px; border-top: 1px dashed var(--line); margin-top: 4px;
}
.fx .fx-yt:hover { color: var(--accent); }

/* ---------- settings ---------- */
/* min(320px, 100%): a 320px phone (272px content box) must collapse the column, not overflow it */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 18px; align-items: start; }
.settings-grid > * { min-width: 0; }
.score-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13.5px; border-bottom: 1px solid rgba(38,50,80,.4); }
.score-row input { width: 70px; text-align: right; }
.unmatched-row { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 13px; flex-wrap: wrap; }

/* ---------- my team / lineups ---------- */
.team-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; padding: 14px 18px; }
.team-controls select { min-width: 160px; }
.lineup-row { user-select: none; }
.lineup-row.benched { opacity: .45; }
.lineup-row.benched:hover, .lineup-row.starting:hover { background: rgba(45,212,167,.06); opacity: 1; }
.xi-chip { font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 2px 8px; border-radius: 5px; background: var(--card2); color: var(--muted); margin-left: 6px; flex: none; }
.lineup-row.starting .xi-chip { background: rgba(45,212,167,.18); color: var(--accent); }
.quota-pill.bad { background: rgba(239,100,97,.14); color: var(--red); border-color: rgba(239,100,97,.4); }
.warn { color: var(--red); font-size: 12.5px; margin: 8px 0; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--red); letter-spacing: 1px; }
.live-tag { color: var(--red); display: inline-flex; align-items: center; gap: 5px; }

/* ---------- head-to-head ---------- */
.h2h-fx { display: flex; align-items: center; gap: 14px; padding: 9px 0; font-size: 14.5px; border-bottom: 1px solid rgba(38,50,80,.4); }
.h2h-fx:last-child { border: none; }
.h2h-win { font-weight: 800; color: var(--accent); }

/* ---------- multiplayer ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(7, 10, 18, .82); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; padding: 16px; /* tall cards (12-manager sign-in) must scroll, not clip */
}
.overlay > .card { max-height: 92vh; overflow-y: auto; }

/* the club office: essentials up top, extras behind a drawer, Save always in
   reach — 2,000px of scroll must never hide the only button that matters */
.club-office { padding-bottom: 0; }
.club-extras { margin: 2px 0 6px; }
.club-extras > summary { cursor: pointer; font-size: 12px; font-weight: 800; letter-spacing: .4px; color: var(--muted); padding: 9px 0; user-select: none; }
.club-extras > summary:hover { color: var(--text); }
.club-actions { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0 14px; background: var(--card); box-shadow: 0 -10px 14px -10px rgba(0,0,0,.6); }

/* the confirm sheet: one last look before a deal commits */
.deal { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.deal-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 14px; background: var(--card2); }
.deal-row + .deal-row { border-top: 1px solid var(--line); }
.deal-tag { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; padding: 2px 8px; border-radius: 999px; }
.deal-tag.out { background: rgba(239, 100, 97, .16); color: var(--red); }
.deal-tag.in { background: rgba(45, 212, 167, .16); color: var(--accent); }
.conn { color: var(--red); font-size: 13px; transition: color .3s; }
.conn.up { color: var(--accent); }

/* the autopick queue drawer: sidebar content, reachable by thumb mid-draft */
.queue-fab { display: none; }
.warn-tag { background: rgba(212,160,23,.18); color: #ffd76e; border: none; }
tr.gone-row td { opacity: .45; }
tr.gone-row td.act { opacity: .8; }
.gone-tag { background: rgba(224,85,85,.16); color: #ff9c9c; border: none; white-space: nowrap; }
.qrow { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; padding: 5px 0; min-width: 0; }
.ready-row { border-bottom: 1px solid rgba(38,50,80,.5); padding: 8px 0; }
.ready-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.ready-row.is-ready .ready-dot { background: var(--accent); color: #07120e; border-color: var(--accent); }
.qrow b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the rank doubles as the way to move a player: type a number, he goes there.
   Sized for a thumb and for three digits, since a long list runs past 99. */
.auto-rank {
  width: 44px; min-width: 44px; flex: none; padding: 3px 4px; text-align: center;
  font-size: 12px; font-variant-numeric: tabular-nums; cursor: text;
}
.auto-rank::-webkit-outer-spin-button, .auto-rank::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.auto-rank { -moz-appearance: textfield; appearance: textfield; }
@media (max-width: 700px) { .auto-rank { width: 46px; min-width: 46px; padding: 6px 4px; font-size: 13px; } }
.warn-tag { flex: none; }
.squad-fab { display: none; }
@media (max-width: 980px) {
  .queue-fab {
    display: inline-flex; align-items: center; gap: 6px;
    position: fixed; right: 14px; bottom: 16px; z-index: 65; box-shadow: var(--shadow);
  }
  .squad-fab {
    display: inline-flex; align-items: center; gap: 6px;
    position: fixed; left: 14px; bottom: 16px; z-index: 65; box-shadow: var(--shadow);
    background: var(--card);
  }
  .queue-drawer {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 66;
    background: var(--card); border-top: 1px solid var(--line);
    border-radius: 14px 14px 0 0; max-height: 60vh; overflow-y: auto;
    padding: 16px; transform: translateY(105%); transition: transform .25s;
    box-shadow: 0 -12px 30px rgba(0,0,0,.5);
  }
  .queue-drawer.open { transform: translateY(0); }
}
@media (max-width: 700px) {
  .queue-fab { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .squad-fab { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .queue-drawer { bottom: calc(48px + env(safe-area-inset-bottom)); }
}
@media (min-width: 981px) { .queue-drawer { display: none; } .squad-fab { display: none; } }

/* The Matchday Programme — set like a newspaper (Ben, UAT night) */
.prog-mast { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin: -2px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.prog-card, .prog-card p, .prog-card .prog-head,
.gazette-room, .gazette-room p, .gazette-room .prog-head { font-family: Georgia, 'Times New Roman', serif; }
.prog-card { position: relative; overflow: hidden; border-color: rgba(226,190,86,.3); }
.prog-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--accent), #e2be56 50%, var(--accent)); }
.prog-plate { text-align: center; border-bottom: 3px double var(--text); margin-bottom: 14px; padding: 2px 0 8px; }
.prog-nameplate { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; max-width: 430px; margin: 0 auto; }
.prog-seal { display: block; width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0,0,0,.3)); }
.prog-seal-spacer { width: 34px; }
.prog-flag { color: var(--accent); font-family: Inter, system-ui, sans-serif; font-size: 9px; font-weight: 900; letter-spacing: .32em; line-height: 1; }
.prog-title { font-size: 30px; font-weight: 900; letter-spacing: .1em; line-height: 1.05; margin: 2px 0 5px; }
.prog-date { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-family: Inter, system-ui, sans-serif; font-size: 9px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; border-top: 1px solid var(--line); padding-top: 5px; }
.prog-date span:first-child { text-align: left; }
.prog-date span:last-child { text-align: right; }
.prog-front { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; }
.prog-front-label { color: var(--accent); font-family: Inter, system-ui, sans-serif; font-size: 9px; font-weight: 900; letter-spacing: .16em; margin-bottom: 5px; }
.prog-front-by { color: var(--muted); font-family: Inter, system-ui, sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 8px; }
.prog-read { align-self: end; min-width: 190px; justify-content: space-between; font-family: Inter, system-ui, sans-serif; font-size: 10.5px; letter-spacing: .06em; }
/* readability pass (Ben: "formatting is unreadable"): ragged right, roomy
   line-height, one column at normal widths, clear headline hierarchy, and a
   book-like measure inside the reading room */
.prog-art { max-width: 72ch; margin-inline: auto; }
.prog-art p { font-size: 15px; line-height: 1.75; margin: 0 0 14px; }
.prog-art p:last-child { margin-bottom: 0; }
.prog-art .prog-lead { font-size: 15px; }
.prog-art .prog-lead::first-letter { font-size: 30px; font-weight: 800; color: var(--accent); float: left; line-height: 1; padding: 2px 6px 0 0; }
.prog-cols { margin: 2px 0 4px; }
.prog-story { break-inside: avoid; margin-bottom: 20px; }
.prog-head { font-size: 16px; font-weight: 800; line-height: 1.3; margin-bottom: 2px; }
.prog-story + .prog-story { border-top: 1px solid var(--line); padding-top: 14px; }
.prog-story:first-child .prog-head { font-size: 19px; }
.prog-story-kicker { color: var(--accent); font-family: Inter, system-ui, sans-serif; font-size: 9px; font-weight: 900; letter-spacing: .18em; margin-bottom: 5px; }
.prog-lead-story .prog-head { font-size: 30px; line-height: 1.02; letter-spacing: -.015em; text-transform: uppercase; max-width: 18ch; margin-bottom: 7px; }
.prog-scoreline { font-family: Inter, system-ui, sans-serif; font-size: 12px; font-weight: 900; letter-spacing: .035em; border-left: 3px solid var(--accent); padding-left: 8px; margin: 2px 0 5px; }
.prog-head-lead { font-size: 26px; font-weight: 800; line-height: 1.12; font-family: Georgia, 'Times New Roman', serif; margin-top: 2px; max-width: 28ch; }
.prog-standfirst { font-family: Georgia, 'Times New Roman', serif; font-size: 13.5px; line-height: 1.6; color: var(--muted); margin-top: 4px; }
.prog-by { font-size: 11px; font-style: italic; color: var(--muted); margin: 1px 0 8px; }
.prog-match-detail { color: var(--muted); font-size: 12.5px !important; line-height: 1.55 !important; }
.prog-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); border-top: 2px solid var(--line); padding-top: 8px; margin: 18px 0 8px; }
.prog-deck { color: var(--muted); font-size: 11.5px !important; line-height: 1.45 !important; margin: -2px 0 8px !important; }
.prog-nibs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.prog-nib { display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 12.5px; }
.prog-nib span { color: var(--muted); font-size: 11.5px; }
.prog-awards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.prog-award { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: rgba(255,255,255,.02); }
.prog-award span { display: block; color: var(--accent); font-family: Inter, system-ui, sans-serif; font-size: 8px; font-weight: 900; letter-spacing: .13em; margin-bottom: 3px; }
.prog-award b { display: block; font-size: 14px; line-height: 1.2; }
.prog-award p { color: var(--muted); font-size: 11.5px; line-height: 1.45; margin: 3px 0 0; }
.prog-team-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; border-top: 1px solid var(--line); }
.prog-sheet-row { display: grid; gap: 3px; align-content: start; border-bottom: 1px solid var(--line); padding: 9px 0; min-width: 0; }
.prog-sheet-row > b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-sheet-row span { color: var(--muted); font-size: 11px; line-height: 1.35; }
.prog-sheet-row em { color: var(--accent); font-family: Inter, system-ui, sans-serif; font-size: 7.5px; font-style: normal; font-weight: 900; letter-spacing: .1em; margin-right: 3px; }
.prog-sheet-row .prog-bench-hit { color: #efc36b; }
.prog-draft-receipts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.prog-receipt { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 9px; min-width: 0; background: rgba(255,255,255,.02); }
.prog-receipt strong { display: flex; justify-content: space-between; gap: 5px; font-size: 12.5px; }
.prog-receipt strong span { color: #efc36b; }
.prog-receipt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.prog-receipt small { color: var(--accent); font-family: Inter, system-ui, sans-serif; font-size: 7.5px; font-weight: 900; letter-spacing: .06em; }
.prog-deals { border-top: 1px solid var(--line); }
.prog-deal { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1.5fr); gap: 3px 12px; border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 12px; }
.prog-deal span { font-weight: 700; }
.prog-deal small { grid-column: 2; color: var(--muted); font-size: 10.5px; }
.prog-arch { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
/* the reading room */
.gazette-room { position: relative; max-width: 760px; width: 94%; max-height: 90vh; overflow-y: auto; padding: 26px 34px 32px; border-color: rgba(226,190,86,.3); }
.gazette-room::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--accent), #e2be56 50%, var(--accent)); }
@media (max-width: 700px) {
  .gazette-room { width: 100%; max-height: 100dvh; border-radius: 0; padding: 18px 16px; }
  .prog-title { font-size: 25px; }
  .prog-date { gap: 6px; font-size: 8px; letter-spacing: .06em; }
  .prog-front { grid-template-columns: 1fr; gap: 12px; }
  .prog-head-lead { font-size: 20px; }
  .prog-read { width: 100%; min-width: 0; }
  .prog-lead-story .prog-head { font-size: 25px; }
  .prog-nibs, .prog-awards, .prog-team-sheet { grid-template-columns: 1fr; }
  .prog-draft-receipts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prog-deal { grid-template-columns: 1fr; }
  .prog-deal small { grid-column: 1; }
}
@media (max-width: 350px) { .prog-draft-receipts { grid-template-columns: 1fr; } }
.gz-close { position: sticky; top: 0; float: right; z-index: 2; margin-left: 8px; }

/* the playoff bracket (Data Room) */
.bracket { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.br-col { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; min-width: 0; }
.br-stage { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 2px; }
.br-tie { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.02); }
.br-side { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: 12.5px; min-width: 0; }
.br-side + .br-side { border-top: 1px solid var(--line); }
.br-seed { font-weight: 800; color: var(--muted); font-size: 11px; width: 14px; flex: none; }
.br-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-hcap { flex: none; font-size: 11px; }
.br-pts { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.br-won { background: rgba(45,212,167,.10); }
.br-out { opacity: .55; }
.br-tbd { font-size: 11.5px; padding: 9px 8px; }
@media (max-width: 700px) { .bracket { grid-template-columns: 1fr; } }

/* draft-night alerts: picks keep the top billboard; optional noise moves low */
.heckle-flash {
  position: fixed; left: 50%; transform: translateX(-50%);
  z-index: 80; max-width: min(480px, 92vw);
  background: var(--card); border: 1px solid var(--accent); border-radius: 12px;
  padding: 10px 16px; font-size: 14px; box-shadow: var(--shadow);
  animation: heckleIn .25s ease-out;
}
.heckle-flash.draft-shout { top: auto; bottom: 78px; }
.heckle-flash .hk-who { color: var(--accent); font-weight: 800; margin-right: 6px; }
.heckle-flash.heckle-you {
  bottom: 86px; font-size: 19px; font-weight: 700; padding: 16px 22px;
  border-width: 2px; animation: heckleIn .25s ease-out, heckleShake .5s ease-in-out .25s 2;
}
.heckle-flash.klaxon-flash { border-color: #e0a83c; }
.heckle-flash.klaxon-flash .hk-who { color: #ffd76e; }
.heckle-flash.pick-flash { top: 74px; bottom: auto; border-color: #e0a83c; font-size: 15px; border-width: 2px; }
.heckle-flash.pick-flash .hk-who { color: #ffd76e; }
@keyframes heckleIn { from { opacity: 0; transform: translateX(-50%) translateY(-14px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes heckleShake { 0%, 100% { transform: translateX(-50%); } 25% { transform: translateX(calc(-50% - 6px)); } 75% { transform: translateX(calc(-50% + 6px)); } }

.ceremony-wait {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0 0 10px; padding: 10px 14px; border: 1px solid #e0a83c;
  border-radius: 10px; background: rgba(224,168,60,.10); font-size: 12.5px;
}
.ceremony-wait b { color: #ffd76e; white-space: nowrap; }
@media (max-width: 700px) {
  .ceremony-wait { align-items: flex-start; flex-direction: column; gap: 3px; }
  .heckle-flash.draft-shout { bottom: 72px; max-width: calc(100vw - 24px); }
  .heckle-flash.heckle-you { bottom: 72px; font-size: 16px; padding: 12px 15px; }
}

/* stale-save recovery bar */
.stale-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 75;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  background: #3a2e14; border-bottom: 1px solid #d4a017; color: #ffd76e;
  font-size: 13px; font-weight: 600; padding: 9px 14px;
}

/* ---------- demo / rules ---------- */
/* demo & sandbox announce themselves as a small header chip, not a banner
   over the app — tap it for the explanation and the way out */
.mode-chip {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  font-size: 10.5px; font-weight: 800; letter-spacing: .5px;
  background: #3a1f24; border: 1px solid var(--red); color: #ffb4b2;
}
.sandbox-chip { background: #3a2e14; border-color: #d4a017; color: #ffd76e; }
.sandbox-chip .rec { background: #d4a017; }
/* club kits ride inline with team names everywhere */
.club-kit { vertical-align: -3px; flex-shrink: 0; }
.derby-tag { background: #3a1f24; border: 1px solid var(--red); color: #ffb4b2; }
#kitPreview svg { filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
[data-pat].active { color: #07120e; background: var(--accent); border-color: var(--accent); }
[data-board].active { color: #07120e; background: var(--accent); border-color: var(--accent); }
[data-hampos].active { color: #07120e; background: var(--accent); border-color: var(--accent); }
[data-trmpos].active { color: #07120e; background: var(--accent); border-color: var(--accent); }
/* FM-style gaffer cards in the club office */
.gaffer-card { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; padding: 9px 10px; }
.gaffer-card b { font-size: 12px; }
.gaffer-card .muted { font-size: 10.5px; line-height: 1.35; white-space: normal; }
.gaffer-card.active { border-color: var(--accent); background: rgba(45,212,167,.12); }
.rules-p { font-size: 13.5px; line-height: 1.55; margin-bottom: 10px; color: var(--text); }
.pundit-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pundit-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  color: var(--muted); background: var(--card2); border: 1px solid var(--line);
  padding: 3px 10px 3px 4px; border-radius: 99px;
}
.pundit-ava {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg2);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 2px 6px rgba(0,0,0,.4);
}
.pa-dp { background: linear-gradient(135deg, #28509e, #12275c); }   /* Sky studio blue */
.pa-al { background: linear-gradient(135deg, #2d1c0e, #6b3d12); }   /* Guinness */
.pa-jr { background: linear-gradient(135deg, #d9608c, #8c2f55); }   /* salmon shirt */
.pa-am { background: linear-gradient(135deg, #1d6fb8, #123e6b); }   /* tartan-adjacent */
.pundit-line { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(38,50,80,.4); font-size: 12.5px; }
.pundit-line:last-child { border: none; }
.pundit-line b { font-size: 11px; color: var(--accent); display: block; margin-bottom: 2px; }
.pundit-line p { color: var(--text); line-height: 1.45; }

.shirt-no {
  width: 24px; text-align: center; font-size: 11px; font-weight: 800; flex: none;
  color: var(--gold); font-variant-numeric: tabular-nums;
}
.parade-slot { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.parade-flag { width: 96px !important; height: 68px !important; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.5); animation: cer-pop .35s ease; }
.parade-team { font-size: 19px; font-weight: 800; }
.parade-bearer { font-size: 12.5px; color: var(--muted); font-style: italic; }

.ceremony-name {
  font-size: 34px; font-weight: 800; color: var(--gold); padding: 14px 0;
  animation: cer-pop .4s ease;
}
@keyframes cer-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rules-p b { color: var(--accent); }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--card2); border: 1px solid var(--accent-dim); color: var(--text);
  padding: 12px 22px; border-radius: 12px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 99; box-shadow: var(--shadow);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--card2); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- pick clock ---------- */
.pick-clock {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px;
  color: var(--accent); min-width: 58px; text-align: center;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 5px 8px;
}
.pick-clock.urgent { color: #fff; background: var(--red); border-color: var(--red); animation: rec-blink .5s infinite; }
.country-fact { font-size: 11px; color: var(--muted); font-style: italic; margin-top: 4px; }

/* --- The League 26/27 additions --- */
.status-chip { font-size: 12px; margin-left: 2px; }
/* the playoff cutoff: dashed so it reads as a line in the sand, not a border */
.playoff-line td { border-bottom: 2px dashed var(--accent); }
.headshot { width: 28px; height: 36px; border-radius: 5px; object-fit: cover; object-position: top; background: var(--bg2); flex-shrink: 0; }
.pool-table .headshot { width: 30px; height: 38px; }
.kit { width: 22px; height: 28px; object-fit: contain; flex-shrink: 0; }
[data-pcard] { cursor: pointer; }
.pcard { max-width: 480px; width: 94%; }
.pcard-head { display: flex; gap: 14px; align-items: flex-start; }
.pcard-photo { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; object-position: top; background: var(--bg2); }
.preview-fx { padding: 8px 0; border-bottom: 1px solid var(--line); }
.preview-fx:last-of-type { border-bottom: none; }
.preview-fx.motw { background: var(--bg2); border-radius: 10px; padding: 10px; margin-bottom: 6px; border: 1px solid var(--accent); }
.motw-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--accent); text-align: center; margin-bottom: 4px; }
.pct { font-size: 11px; color: var(--muted); }
.preview-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 3px; }
.plink { cursor: pointer; }
.plink:hover { text-decoration: underline; text-underline-offset: 2px; }
.pitch { background: linear-gradient(180deg, #14532daa, #166534aa), repeating-linear-gradient(180deg, #ffffff08 0 40px, transparent 40px 80px); border: 1px solid var(--line); border-radius: 14px; padding: 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.pitch-row { display: flex; justify-content: space-evenly; gap: 6px; flex-wrap: wrap; }
.pitch-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; min-width: 64px; }
.pitch-chip:hover { background: #ffffff14; }
.pitch-chip.sel { border-color: var(--accent); background: #ffffff1c; }
.pitch-chip .kit { width: 30px; height: 38px; }
.pitch-name { font-size: 10.5px; font-weight: 700; text-shadow: 0 1px 2px #000a; text-align: center; }
.venue-line { font-size: 10px; color: var(--muted); text-align: center; margin: -2px 0 6px; font-style: italic; }
.preview-note.chant { font-style: italic; opacity: .85; }

/* pitch v2 — big enough to read a formation off it */
.pitch {
  min-height: 480px;
  justify-content: space-between;
  padding: 26px 10px;
  background:
    radial-gradient(circle at 50% 50%, transparent 56px, #ffffff22 57px, #ffffff22 59px, transparent 60px),
    linear-gradient(180deg, transparent calc(50% - 1px), #ffffff22 calc(50% - 1px), #ffffff22 calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(180deg, #14532d, #166534),
    repeating-linear-gradient(180deg, #ffffff08 0 48px, transparent 48px 96px);
}
.pitch-row { flex: 1; align-items: center; }
.pitch-chip { min-width: 84px; padding: 8px 10px; }
.pitch-chip .kit { width: 44px; height: 56px; }
.pitch-name { font-size: 12px; }
.bench-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding: 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; }
.bench-strip .pitch-chip { min-width: 64px; padding: 4px 6px; opacity: .75; }
.bench-strip .pitch-chip .kit { width: 30px; height: 38px; }
.bench-strip .pitch-name { text-shadow: none; }
.pitch-chip.dragover { outline: 2px dashed var(--accent); outline-offset: 2px; }
.mu-card { max-width: 560px; width: 96%; max-height: 92vh; overflow-y: auto; }
.mu-pitch { min-height: 0; padding: 14px 6px; gap: 8px; }
/* formations must READ as formations at any width: rows never wrap, chips
   shrink to fit (the 390px main-pitch lesson — a wrapped back four looks
   like an illegal shape) */
.mu-pitch .pitch-row { flex: none; flex-wrap: nowrap; }
.mu-pitch .pitch-chip { flex: 1 1 0; min-width: 0; max-width: 64px; padding: 3px 4px; }
.mu-pitch .pitch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mu-pitch .pitch-chip .kit { width: 28px; height: 35px; }
.mu-pitch .pitch-name { font-size: 9.5px; }
.mu-pts { font-size: 10px; font-weight: 800; color: #ffd75e; text-shadow: 0 1px 2px #000; }
.mu-pts.xp { color: #cfe3d4; opacity: .8; }
.mu-divider { border-top: 2px solid #ffffff33; margin: 4px 10px; text-align: center; }
.mu-divider span { font-size: 10px; color: #ffffffb0; font-style: italic; }
/* the fixture chip under each player — Lee: too thin, blends with the pitch */
.pitch-vs { font-size: 10px; font-weight: 800; color: #f2fbf5; letter-spacing: .03em; text-shadow: 0 1px 3px #000d, 0 0 6px #0008; }
.mu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mu-grid > * { min-width: 0; }
/* the dashboard's lineup shot stacks: the matchup column is too narrow for
   two readable pitches side by side */
.dash-mu { grid-template-columns: 1fr; }
.dash-side-stack {
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
/* Latest Business: a small transfer wire, not another undifferentiated lrow
   ledger. Deals scan club -> arrivals/departures -> effective gameweek; full
   audit detail stays in Transfers. */
.business-card { margin-top: 14px; overflow: hidden; }
.business-head {
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  padding-bottom: 10px;
}
.business-head h2 { margin: 1px 0 0; }
.business-head > .muted { font-size: 10.5px; text-align: right; }
.business-kicker {
  display: block; color: var(--accent); font-size: 9.5px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
}
.business-run {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px;
  align-items: center; padding: 8px 10px; margin-bottom: 8px; border-radius: 8px;
  background: rgba(107,147,255,.09); border: 1px solid rgba(107,147,255,.22);
  font-size: 9.5px; letter-spacing: .06em;
}
.business-run b { color: #adc5ff; }
.business-run span { color: var(--text); font-weight: 800; }
.business-run small { color: var(--muted); font-size: 8.5px; }
.business-feed { border-top: 1px solid var(--line); }
.business-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px; align-items: center; padding: 11px 0;
  border-bottom: 1px solid rgba(38,50,80,.62);
}
.business-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 31px; height: 31px; border-radius: 9px;
  background: rgba(45,212,167,.1); border: 1px solid rgba(45,212,167,.25);
  color: var(--accent); font-size: 17px; font-weight: 900;
}
.business-trade { color: #ffd75e; background: rgba(255,215,94,.08); border-color: rgba(255,215,94,.24); }
.business-waiver { color: #9cbcff; background: rgba(107,147,255,.09); border-color: rgba(107,147,255,.25); font-size: 12px; }
.business-window { color: #cdb4f6; background: rgba(160,120,240,.09); border-color: rgba(160,120,240,.25); font-size: 13px; }
.business-main { min-width: 0; }
.business-who { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 12.5px; }
.business-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.business-who .tag { margin-left: 2px; flex: none; font-size: 8.5px; }
.business-flow {
  display: grid; grid-template-columns: 42px minmax(0, 1fr);
  align-items: baseline; column-gap: 6px; row-gap: 3px;
  margin-top: 6px; font-size: 12px; line-height: 1.35;
}
.business-label { font-size: 8.5px; font-weight: 900; letter-spacing: .08em; }
.business-label-in { color: var(--accent); }
.business-label-out { color: #e88b8b; }
.business-players { min-width: 0; font-weight: 700; }
.business-players-in .plink { color: var(--text); }
.business-players-out { color: var(--muted); font-weight: 500; }
.business-players-out .plink { color: var(--muted); text-decoration-color: rgba(155,164,184,.35); }
.business-plus { color: var(--muted); font-weight: 400; }
.business-gw { display: grid; justify-items: end; flex: none; font-variant-numeric: tabular-nums; }
.business-gw small { color: var(--muted); font-size: 7.5px; font-weight: 800; letter-spacing: .08em; }
.business-gw b { color: var(--text); font-size: 11.5px; }
.business-history { width: 100%; justify-content: space-between; margin-top: 10px; }
.business-compact { margin-top: 0; padding: 15px 16px; }
.business-compact .business-head { padding-bottom: 7px; }
.business-compact .business-head h2 { font-size: 15px; margin-bottom: 0; }
.business-compact .business-run { padding: 6px 8px; margin-bottom: 6px; }
.business-compact .business-row { padding: 8px 0; gap: 8px; }
.business-compact .business-mark { width: 27px; height: 27px; font-size: 15px; }
.business-compact .business-waiver { font-size: 11px; }
.business-compact .business-who { font-size: 11.5px; }
.business-compact .business-flow { margin-top: 4px; font-size: 11.5px; row-gap: 2px; }
.business-compact .business-history { margin-top: 7px; padding: 5px 10px; }
@media (max-width: 390px) {
  .dash-side-stack { gap: 12px; }
  .business-compact { padding: 13px 14px; }
  .business-head > .muted { display: none; }
  .business-run { grid-template-columns: auto 1fr; }
  .business-run small { grid-column: 2; }
  .business-row { grid-template-columns: 31px minmax(0, 1fr); gap: 8px; }
  .business-mark { width: 29px; height: 29px; }
  .business-gw { grid-column: 2; grid-row: 2; display: flex; justify-content: flex-start; gap: 4px; margin-top: -5px; }
  .business-gw small { align-self: center; }
}

/* ---------- transfer history: the full ledger (Ben, 10 Aug) ----------
   same visual language as the Dashboard's Transfer Wire card */
.hist-card { max-width: 860px; }
.hist-filters { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.hist-count { opacity: .55; font-weight: 600; margin-left: 2px; font-variant-numeric: tabular-nums; }
.hist-gw {
  display: flex; align-items: baseline; gap: 8px; margin-top: 16px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.hist-gw b { color: var(--gold); font-size: 10.5px; letter-spacing: .12em; }
.hist-gw::after { content: ''; flex: 1; height: 1px; background: var(--line); align-self: center; }
.hist-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px; align-items: center; padding: 10px 0;
  border-bottom: 1px solid rgba(38,50,80,.62);
}
.hist-row:last-of-type { border-bottom: none; }
.hist-main { min-width: 0; }
.hist-flow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 5px; font-size: 12.5px; line-height: 1.4;
}
.hist-p { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.hist-team {
  display: inline-flex; align-items: center; gap: 5px; min-width: 0;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text); font: inherit; font-size: 12.5px;
}
.hist-team:hover b { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.hist-flow .business-label { flex: none; }
.hist-flow .business-label-out { margin-left: 10px; }
.hist-out, .hist-out .plink { color: var(--muted); font-weight: 500; }
.hist-out .plink { text-decoration-color: rgba(155,164,184,.35); }
.hist-in { font-weight: 700; }
.hist-club { color: var(--muted); font-size: 10.5px; font-weight: 500; }
.hist-rcbtn { flex: none; font-size: 10.5px; padding: 4px 10px; white-space: nowrap; }
.hist-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.hist-pager-label {
  color: var(--muted); font-size: 10px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; text-align: center;
  font-variant-numeric: tabular-nums;
}
.hist-rc { border-left: 2px solid var(--accent-dim); margin: 4px 0 10px 44px; padding: 2px 0 2px 10px; }
@media (max-width: 640px) {
  .hist-row { grid-template-columns: 31px minmax(0, 1fr); gap: 8px; }
  .hist-rcbtn { grid-column: 2; justify-self: start; margin-top: 2px; }
  .hist-rc { margin-left: 12px; }
}

/* The No. 2 actually enters the conversation: his club-selected character
   pops into the briefing instead of another apologetic product disclaimer. */
.assistant-card {
  position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px; align-items: start; margin-top: 12px; overflow: hidden;
}
.assistant-copy { min-width: 0; }
.assistant-copy h2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.assistant-pop {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50% 50% 50% 12px; background: rgba(45,212,167,.11);
  border: 1px solid rgba(45,212,167,.28); box-shadow: 0 7px 18px rgba(0,0,0,.22);
  animation: assistant-arrives .42s cubic-bezier(.2,.9,.25,1.25) both;
}
.assistant-person { font-size: 27px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.assistant-pop small {
  position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center;
  width: 19px; height: 19px; border-radius: 50%; background: var(--card2);
  border: 1px solid rgba(45,212,167,.4); font-size: 11px; line-height: 1;
}
@keyframes assistant-arrives {
  from { opacity: 0; transform: translate(-10px, 8px) rotate(-8deg) scale(.55); }
  to { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .assistant-pop { animation: none; } }
@media (max-width: 360px) {
  .assistant-card { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
  .assistant-pop { width: 39px; height: 39px; }
  .assistant-person { font-size: 23px; }
  .assistant-pop small { width: 17px; height: 17px; font-size: 10px; }
}
/* Lee's scoreboard: the score up top where you look first, not buried in the side headings */
.mu-scoreline { border-bottom: none; margin: 0 0 4px; font-size: 15px; }
.mu-scoreline .fx-score { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 3px 14px; background: var(--card2); border-radius: 7px; white-space: nowrap; }
.mu-card { max-width: 760px; }
@media (max-width: 700px) { .mu-grid { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .mu-pitch .pitch-chip { min-width: 50px; } .mu-pitch { padding: 10px 3px; gap: 6px; } }
.form-pill { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; font-size: 11px; font-weight: 800; margin-right: 3px; color: #fff; }
.form-W { background: #2e9e5b; }
.form-L { background: #d64545; }
.form-D { background: #8a8f98; }

/* injury / suspension flags: red = out (injured, suspended, unavailable), amber = doubt */
.pitch-chip.st-red { box-shadow: 0 0 0 2px #e05555; }
.pitch-chip.st-amber { box-shadow: 0 0 0 2px #e0a83c; }
.pitch-chip.st-red .pitch-name, .squad-row.st-red .pname { color: #ff9c9c; }
tr.st-red td { background: rgba(224, 85, 85, .08); }
tr.st-amber td { background: rgba(224, 168, 60, .06); }
tr.st-red .pname { color: #ff9c9c; }
.squad-row.st-red { box-shadow: inset 3px 0 0 #e05555; background: rgba(224, 85, 85, .06); }
.squad-row.st-amber { box-shadow: inset 3px 0 0 #e0a83c; background: rgba(224, 168, 60, .05); }
.mu-bench { margin-top: 4px; padding-top: 6px; border-top: 1px dashed rgba(38,50,80,.7); }
.sub-arrow { font-size: 10px; font-weight: 800; }
.sub-arrow.in { color: #3fb96d; }
.sub-arrow.out { color: #e05555; }

/* phones: stable app-style bottom navigation; secondary pages live under More */
@media (max-width: 700px) {
  body { padding-bottom: 66px; }
  main { padding: 16px 10px 80px; }
  .card { padding: 14px; }
  /* the pitch must read as a formation: rows NEVER wrap — a back four
     spilling onto two lines made every shape look illegal. Five across
     fits a 390px screen with slimmer chips and smaller shirts. */
  .pitch-row { flex-wrap: nowrap; gap: 2px; }
  .pitch-row .pitch-chip { min-width: 0; flex: 1 1 0; max-width: 76px; padding: 6px 2px; }
  .pitch-row .pitch-chip .kit { width: 36px; height: 46px; }
  .pitch-row .pitch-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .pitch { min-height: 420px; padding: 18px 6px; }
  /* compact header: one line of brand, icon-only refresh — content starts a
     full card sooner */
  /* on the clock, rebuilt for thumbs: manager, then a big timer, then the
     details, then a 2-by-2 grid of controls that can never leave the screen */
  .on-clock {
    grid-template-columns: 1fr; gap: 8px;
    grid-template-areas: "who" "clock" "meta" "btns";
  }
  .on-clock .oc-name { font-size: 26px; }
  .on-clock > .pick-clock { font-size: 34px; padding: 10px; width: 100%; box-sizing: border-box; }
  .on-clock .oc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .on-clock .oc-btns .btn { width: 100%; padding: 11px 8px; }
  .brand { gap: 7px; min-width: 0; flex: 1; }
  .brand-crest { width: 28px; height: 28px; border-radius: 7px; }
  .brand h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
  .brand-sub { display: none; }
  .sync-txt { display: none; }
  .pitch-hint { display: none; }
  /* no backdrop-filter here or on .nav: a filtered ancestor becomes the
     containing block for position:fixed descendants, pinning the bottom nav
     (and the More menu) to the header instead of the viewport */
  .topbar { gap: 8px; padding: 8px 10px; flex-wrap: nowrap; position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
  /* the phone tab bar — icons over labels, like a proper app */
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0;
    padding: 5px max(6px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: rgba(11,15,26,.97); border-top: 1px solid var(--line);
  }
  .nav:empty { display: none; }
  .nav > button, .nav-more > summary {
    width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 2px 6px; text-align: center; white-space: nowrap; border-radius: 10px;
  }
  .nav .nav-ico { display: block; }
  .nav > button .nav-lbl-full, .nav-more > summary .nav-lbl-full { display: none; }
  .nav > button .nav-lbl-short, .nav-more > summary .nav-lbl-short {
    display: block; font-size: 10px; font-weight: 700; letter-spacing: .2px;
  }
  /* active tab = coloured icon + label, no chunky pill */
  .nav > button.active, .nav-more.active summary { color: var(--accent); background: none; }
  .nav > button:hover, .nav-more summary:hover { background: none; }
  .nav-more summary::after { content: none; }
  .nav-dot { top: 2px; right: calc(50% - 20px); }
  /* More opens as a bottom sheet: big labelled icon tiles */
  .nav-more-menu {
    position: fixed; left: 0; right: 0; top: auto;
    bottom: calc(64px + env(safe-area-inset-bottom)); min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
    padding: 14px 12px; border-radius: 18px 18px 0 0; border-bottom: none;
    box-shadow: 0 -12px 40px rgba(0,0,0,.55);
  }
  .nav-more-menu button {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 13px 4px; font-size: 11.5px; font-weight: 700; text-align: center;
    background: var(--card2, rgba(255,255,255,.04)); border-radius: 12px;
  }
  .nav-more-menu button .nav-ico { display: block; width: 24px; height: 24px; }
  .nav-more-menu button .nav-lbl-full { display: block; }
  .nav-more-menu button .nav-lbl-short { display: none; }
  .nav-more-menu button.active { color: var(--accent); background: var(--card2, rgba(255,255,255,.04)); }
  .nav-more-menu .nav-dot { position: static; margin-top: -2px; }
  .nav.draft-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav.setup-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sync-area { order: 2; margin-left: auto; gap: 6px; flex: none; flex-wrap: nowrap; justify-content: flex-end; }
  .sync-area #whoBtn { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-btn {
    width: 36px; min-width: 36px; height: 36px; min-height: 36px;
    padding: 0; border-radius: 10px;
  }
  .home-btn svg { width: 17px; height: 17px; }
  .home-btn .sync-txt { display: none; }
  .header-icon-btn { width: 34px; height: 34px; }
  .sync-area #muteBtn { display: none; }
  .home-btn.is-current {
    color: #07120e; background: var(--accent); border-color: var(--accent);
  }
  .sync-updated { display: none; }
}

/* pitch-side advertising boards — Lee: "took me a minute to realise they were
   hoardings". Framed like the physical thing: one continuous strip sat on a
   baseboard, wordmarks big enough to read from the stands. */
.ad-strip { display: flex; gap: 0; margin-bottom: 0; border-radius: 6px 6px 0 0; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-bottom: 4px solid #0a0d14; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.ad-strip + .pitch { border-top-left-radius: 0; border-top-right-radius: 0; }
.ad-board {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 8px 10px 7px;
  border-right: 1px solid rgba(255,255,255,.12);
}
.ad-board:last-child { border-right: none; }
.ad-board b { font-size: 13px; font-weight: 900; letter-spacing: .14em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ad-board i { font-size: 9.5px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; margin-top: 1px; }
@media (max-width: 700px) { .ad-board i { display: none; } .ad-board b { font-size: 11px; } }
/* small phones: two readable hoardings beat three ellipsized ones */
@media (max-width: 480px) { .ad-strip .ad-board:nth-child(3) { display: none; } }

/* desktop: the pitch reads as a pitch, not a letterbox — capped width,
   centred, taller (Lee: "squashed together, super wide") */
@media (min-width: 701px) {
  .ad-strip, .pitch:not(.mu-pitch), .bench-strip { max-width: 660px; margin-left: auto; margin-right: auto; }
  .pitch:not(.mu-pitch) { min-height: 580px; }
}

/* the Opta bar: live win chance, swinging as the gameweek plays out */
.prob-wrap { margin: 10px auto; max-width: 560px; }
.prob-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.prob-mid { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.prob-mid .rec { display: inline-block; }
.prob-sub { font-size: 11px; color: var(--muted); }
.prob-sub .prob-mid { font-weight: 400; letter-spacing: 0; text-transform: none; }
.prob-bar { height: 9px; border-radius: 5px; background: #5a2530; overflow: hidden; margin: 5px 0 3px; border: 1px solid rgba(255,255,255,.08); }
.prob-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); transition: width .8s ease; }

/* Show Opponent: two pitches side by side at the SAME scale (Lee) —
   stacks on narrow screens, never a mini pitch in a corner */
.duel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.duel-side { min-width: 0; }
.duel-side h3 { margin-bottom: 8px; }
@media (max-width: 980px) { .duel-grid { grid-template-columns: 1fr; } }

/* the Vidiprinter tape */
.vidi-tape {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px;
  max-height: 240px; overflow-y: auto; background: #0a0e18;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
.vidi-line { padding: 3px 0; border-bottom: 1px dashed rgba(255,255,255,.06); color: #ffd98a; line-height: 1.5; }
.vidi-line:last-child { border-bottom: none; }
.vidi-when { color: var(--muted); font-size: 10px; margin-right: 4px; }

/* Committee awards: labels and results are deliberately separate columns.
   The old generic lrow class had no dashboard-wide layout, which made
   "Manager of the WeekGeldog FC" read as one accidental word on phones. */
.awards-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 8px;
}
.awards-head h2 { margin-bottom: 3px; }
.awards-head p { color: var(--muted); font-size: 12px; }
.awards-head .btn { flex: none; }
.awards-list { border-top: 1px solid rgba(38,50,80,.65); }
.award-row {
  display: grid; grid-template-columns: 26px minmax(145px, auto) minmax(0, 1fr);
  gap: 8px; align-items: start; padding: 9px 0;
  border-bottom: 1px solid rgba(38,50,80,.5); font-size: 12.5px;
}
.award-row:last-child { border-bottom: none; }
.award-icon { font-size: 17px; line-height: 1.25; text-align: center; }
.award-label { line-height: 1.4; }
.award-value { min-width: 0; color: var(--muted); line-height: 1.45; }
.award-value b { color: var(--text); }

/* Treatment Room: status is a readable band, not an emoji buried in prose. */
.treatment-row {
  --trm-colour: var(--red);
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 9px;
  padding: 10px 11px; margin-bottom: 7px;
  border: 1px solid color-mix(in srgb, var(--trm-colour) 30%, var(--line));
  border-left: 4px solid var(--trm-colour); border-radius: 10px;
  background: color-mix(in srgb, var(--trm-colour) 7%, var(--bg2));
}
.treatment-icon { padding-top: 1px; text-align: center; }
.treatment-icon .status-chip { margin: 0; font-size: 15px; }
.treatment-body { min-width: 0; }
.treatment-head {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  min-width: 0; margin-bottom: 3px;
}
.treatment-player { min-width: 0; font-size: 13.5px; font-weight: 700; }
.treatment-club { color: var(--muted); font-size: 11px; font-weight: 500; }
.treatment-severity {
  margin-left: auto; padding: 2px 7px; border-radius: 99px; flex: none;
  border: 1px solid color-mix(in srgb, var(--trm-colour) 55%, transparent);
  background: color-mix(in srgb, var(--trm-colour) 16%, transparent);
  color: color-mix(in srgb, var(--trm-colour) 65%, white);
  font-size: 9.5px; font-weight: 800; letter-spacing: .05em;
}
.treatment-owner { min-height: 18px; color: var(--muted); font-size: 10.5px; margin-bottom: 3px; }
.treatment-owner .tag { display: inline-block; padding: 2px 7px; }
.treatment-news { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.treatment-updated { opacity: .65; white-space: nowrap; }
.treatment-doubt { --trm-colour: #e0a83c; }
.treatment-major-doubt, .treatment-medium { --trm-colour: #e8843a; }
.treatment-out, .treatment-suspended { --trm-colour: #e05555; }
.treatment-long, .treatment-unknown { --trm-colour: #c04468; }

@media (max-width: 560px) {
  .awards-head { flex-direction: column; align-items: stretch; }
  .awards-head .btn { align-self: flex-start; }
  .award-row { grid-template-columns: 26px minmax(0, 1fr); gap: 2px 9px; padding: 10px 0; }
  .award-icon { grid-row: 1 / span 2; }
  .award-label, .award-value { grid-column: 2; }
  .award-value { font-size: 12.5px; }
  .treatment-row { padding: 9px; }
  .treatment-severity { margin-left: 0; }
}

/* attention dots on the nav */
.nav button { position: relative; }
.nav-dot {
  position: absolute; top: 1px; right: 1px; background: var(--red, #e05555); color: #fff;
  font-size: 9.5px; font-weight: 800; min-width: 14px; height: 14px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* fixture difficulty tints */
.fdr-easy { color: #3fb96d; }
.fdr-hard { color: #e05555; }

/* draft: slim pinned clock once the big board scrolls away */
.clock-strip {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; gap: 10px; align-items: center; justify-content: center;
  padding: 9px 12px; background: rgba(19, 28, 49, .96); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px); font-size: 13.5px;
}
.clock-strip .pick-clock { font-size: 15px; }

/* phones: thumb-sized tap targets */
@media (max-width: 700px) {
  .btn.small { padding: 9px 14px; font-size: 12.5px; }
  .btn.small.icon-btn { width: 36px; height: 36px; min-width: 36px; padding: 0; }
  .lrow input[type=checkbox] { width: 20px; height: 20px; }
  /* waiver claim up/down: proper thumb targets (Marc's ask — no drag-drop) */
  .claim-btns .btn.small { min-width: 42px; padding: 10px 0; text-align: center; }
}

/* a button that looks unavailable but still taps to explain why (mobile has no tooltips) */
.btn.dim { opacity: .4; }
.btn.dim:hover { filter: none; transform: none; }
/* your turn to pick — make the whole banner unmistakable */
.on-clock.me-up { box-shadow: inset 0 0 0 2px var(--accent); }

/* projected (pre-kickoff) scores must not read as real results */
.fx-score.projected { opacity: .72; font-weight: 600; }
.proj-tag { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; vertical-align: middle; }

/* the ⓘ info affordance on your own pitch chips (tap = stats; the chip = swap) */
.pitch-chip { position: relative; }
.pitch-info {
  position: absolute; top: 2px; right: 3px; z-index: 2;
  font-size: 13px; line-height: 1; color: var(--muted); cursor: pointer;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.pitch-info:hover { color: var(--text); background: rgba(255,255,255,.08); }
.pitch-chip.sel { border-color: var(--accent); background: rgba(45,212,167,.12); }

/* ----- club directory ----- */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 8px; }
.dir-card {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card2); color: var(--text); cursor: pointer; font: inherit;
  min-width: 0;
}
.dir-card:hover { border-color: var(--accent); }
.dir-kit { flex-shrink: 0; }
.dir-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dir-team { font-size: 13.5px; }
.dir-line { font-size: 11px; overflow-wrap: anywhere; }
.club-profile-ov { max-width: 560px; width: 94%; max-height: 92vh; overflow-y: auto; }
@media (max-width: 480px) { .dir-grid { grid-template-columns: 1fr; } }

/* ----- global player search ----- */
.search-pal { max-width: 520px; width: 94%; max-height: 86vh; display: flex; flex-direction: column; }
.gs-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.gs-head input { flex: 1; min-width: 0; font-size: 15px; }
#gsResults { overflow-y: auto; min-height: 120px; }
.gs-row {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  padding: 8px 6px; border: none; border-bottom: 1px solid rgba(38,50,80,.4);
  background: none; color: var(--text); cursor: pointer; font: inherit; min-width: 0;
}
.gs-row:hover, .gs-row:focus-visible { background: rgba(255,255,255,.05); }
.gs-row .headshot { width: 34px; height: 44px; flex-shrink: 0; object-fit: cover; }
.gs-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
/* the NAME ellipsizes; the flag + status chip sit outside the clip. An
   overflow:hidden across a composed flag emoji slices it mid-glyph — half of
   Italy reads as Algeria (Marc, 2 Aug) */
.gs-name { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 4px; min-width: 0; }
.gs-name .gs-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-name .nat-flag, .gs-name .tag { flex: none; }
.gs-sub { font-size: 11px; }
.gs-stats { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; flex-shrink: 0; font-size: 11px; }
.gs-act { flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; }
.gs-act .btn.small { font-size: 10.5px; padding: 5px 8px; }
.gs-hint { font-size: 12px; padding: 14px 4px; }
@media (max-width: 480px) {
  .gs-row { flex-wrap: wrap; }
  .gs-act { flex-direction: row; width: 100%; }
}

/* ----- private Scouting Desk ----- */
.scout-desk {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.scout-tools { position: relative; width: max-content; max-width: 100%; margin: 0 0 8px auto; z-index: 5; }
.scout-tools > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.scout-tools > summary::-webkit-details-marker { display: none; }
.scout-tools-panel {
  position: absolute; top: calc(100% + 7px); right: 0; z-index: 7;
  width: min(680px, calc(100vw - 44px)); max-height: min(620px, 72vh); overflow-y: auto;
  display: grid; gap: 12px; padding: 13px;
  background: #131c31; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 12px 28px rgba(0,0,0,.5);
}
.scout-title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.scout-desk select { min-width: 150px; padding: 7px 9px; font-size: 12px; }
.scout-columns { border-top: 1px solid var(--line); padding-top: 11px; }
.scout-column-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; margin-top: 8px; }
.scout-col-option {
  display: grid; grid-template-columns: 18px 38px minmax(0, 1fr); gap: 6px;
  align-items: start; min-width: 0; cursor: pointer; font-size: 11px; line-height: 1.3;
}
/* Column reordering (Marc, 10 Aug): drag the table's own headers, the way a
   spreadsheet does. The menu strip survives as the PHONE path only — HTML5
   drag is a laptop luxury and a header is far too small a target on a phone. */
.pool-table th[draggable="true"] { cursor: grab; }
.pool-table th[draggable="true"]:active { cursor: grabbing; }
.pool-table th.col-drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.scout-order-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.scout-col-order {
  display: flex; align-items: center; gap: 5px; font-size: 11.5px;
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--card2); user-select: none;
}
.scout-col-order b { color: var(--text); }
@media (min-width: 701px) { .scout-columns.order-only { display: none; } }
.scout-col-option input { margin-top: 1px; }
.scout-col-option b { color: var(--text); }
.scout-col-option span { min-width: 0; }
.compare-on { border-color: var(--accent) !important; color: var(--accent) !important; }
.compare-fab {
  position: fixed; left: 18px; bottom: 18px; z-index: 55;
  box-shadow: 0 8px 26px rgba(0,0,0,.45);
}
.compare-card { width: min(94%, 920px); max-height: 91vh; overflow-y: auto; }
.compare-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.compare-head h2 { margin-bottom: 2px; }
.compare-head p { font-size: 11.5px; }
.compare-grid {
  display: grid; grid-template-columns: repeat(var(--compare-count), minmax(0, 1fr));
  gap: 10px;
}
.compare-player {
  min-width: 0; padding: 11px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card2);
}
.compare-player-head { display: flex; gap: 8px; align-items: flex-start; min-height: 64px; margin-bottom: 8px; }
.compare-player-head .headshot { width: 44px; height: 56px; flex: none; object-fit: cover; }
.compare-player-head h3 { font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.compare-player-head p { font-size: 10.5px; margin-top: 2px; }
.compare-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid rgba(38,50,80,.45); font-size: 11.5px; }
.compare-row > span:first-child { color: var(--muted); }
.compare-runway { display: grid; gap: 4px; margin: 8px 0; }
.compare-runway > span { display: flex; justify-content: space-between; gap: 6px; font-size: 10.5px; }
.compare-runway small { color: var(--muted); }
.compare-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
@media (max-width: 700px) {
  .scout-tools-panel { width: calc(100vw - 40px); }
  .scout-desk { align-items: stretch; }
  .scout-desk .scout-title { width: 100%; }
  .scout-desk select { flex: 1; min-width: 0; }
  .scout-column-grid { grid-template-columns: 1fr; }
  .compare-fab { bottom: calc(62px + env(safe-area-inset-bottom)); left: 10px; }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-player { display: grid; grid-template-columns: minmax(0, 1fr); }
}

/* the Opta desk's requirement line + full-time result */
.need-line { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 5px; }
.need-line b { color: var(--text); }
.prob-final { padding: 6px 0 2px; }
.prob-final .need-line { margin-top: 0; font-size: 12.5px; color: var(--text); font-weight: 600; }

/* form-table movement vs overall */
.form-move { font-size: 10px; font-weight: 800; }
.form-move.up { color: #3fb96d; }
.form-move.down { color: #e05555; }
.form-move.flat { color: var(--muted); }

/* ----- Next Six fixture runway ----- */
.n6-summary { cursor: pointer; user-select: none; list-style: none; }
.n6-summary::-webkit-details-marker { display: none; }
.n6-summary::after { content: ' ▾'; font-size: 11px; color: var(--muted); }
details[open] > .n6-summary::after { content: ' ▴'; }
.n6-table { margin-top: 10px; }
.n6-table .n6-name {
  position: sticky; left: 0; background: var(--card); z-index: 1;
  box-shadow: 6px 0 8px -6px rgba(0,0,0,.6); white-space: nowrap;
}
.n6-fx { display: block; font-size: 11px; white-space: nowrap; }
.n6-blank { color: var(--muted); opacity: .5; }
.n6-double .n6-fx:first-child { margin-bottom: 2px; }

/* the draft-room personal strip (sol UX #4) — pinned low, never over the board */
.draft-strip {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 8px;
  z-index: 62; max-width: min(560px, 96vw); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 6px 14px; font-size: 12px; box-shadow: var(--shadow);
  cursor: pointer;
}
@media (max-width: 700px) { .draft-strip { bottom: 56px; font-size: 11px; max-width: 96vw; } }
