:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #f0f2ee;
  --text: #15181a;
  --muted: #646b70;
  --faint: #9aa0a4;
  --line: #e3e6e1;
  --accent: #0b7a4b;
  --win: #128a4f;
  --draw: #8a8f93;
  --loss: #c8372d;
  --ucl: #1f5fd1;
  --europe: #0f9a8a;
  --playoff: #128a4f;
  --releg: #c8372d;
  --wc: #b07d00;
  --shadow: 0 1px 2px rgba(20, 24, 26, .05), 0 4px 16px rgba(20, 24, 26, .05);
  --chip-text: #ffffff;
  /* Daytime pitch */
  --grass-1: #3f8f3a;
  --grass-2: #4a9c42;
  --mow-cross: rgba(255, 255, 255, .045);
  --pitch-line: rgba(255, 255, 255, .78);
  --floodlight: rgba(255, 252, 225, .30);
  --vignette: rgba(8, 40, 12, .38);
  --grain-opacity: .16;
  --on-grass: rgba(255, 255, 255, .88);
  --shirt-edge: rgba(0, 0, 0, .35);
  --col-w: 720px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1112;
    --surface: #171b1d;
    --surface-2: #1f2427;
    --text: #eef1f2;
    --muted: #9aa3a8;
    --faint: #687075;
    --line: #2a3033;
    --accent: #3ccf8a;
    --win: #3ccf8a;
    --draw: #8b9398;
    --loss: #ff6b5e;
    --ucl: #6f9dff;
    --europe: #3cc9b8;
    --playoff: #3ccf8a;
    --releg: #ff6b5e;
    --wc: #e6b93e;
    --shadow: none;
    --chip-text: #0e1112;
    /* Night match under floodlights */
    --grass-1: #123a1b;
    --grass-2: #164421;
    --mow-cross: rgba(255, 255, 255, .03);
    --pitch-line: rgba(255, 255, 255, .32);
    --floodlight: rgba(225, 240, 255, .16);
    --vignette: rgba(0, 0, 0, .62);
    --grain-opacity: .22;
    --on-grass: rgba(255, 255, 255, .75);
    --shirt-edge: rgba(255, 255, 255, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1112;
  --surface: #171b1d;
  --surface-2: #1f2427;
  --text: #eef1f2;
  --muted: #9aa3a8;
  --faint: #687075;
  --line: #2a3033;
  --accent: #3ccf8a;
  --win: #3ccf8a;
  --draw: #8b9398;
  --loss: #ff6b5e;
  --ucl: #6f9dff;
  --europe: #3cc9b8;
  --playoff: #3ccf8a;
  --releg: #ff6b5e;
  --wc: #e6b93e;
  --shadow: none;
  --chip-text: #0e1112;
  --grass-1: #123a1b;
  --grass-2: #164421;
  --mow-cross: rgba(255, 255, 255, .03);
  --pitch-line: rgba(255, 255, 255, .32);
  --floodlight: rgba(225, 240, 255, .16);
  --vignette: rgba(0, 0, 0, .62);
  --grain-opacity: .22;
  --on-grass: rgba(255, 255, 255, .75);
  --shirt-edge: rgba(255, 255, 255, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  /* Mown grass: wide stripes one way, fainter ones across, for the
     checkerboard a groundsman leaves (the lighting and grain sit on top) */
  background-color: var(--grass-1);
  background-image:
    repeating-linear-gradient(0deg, var(--mow-cross) 0 120px, transparent 120px 240px),
    repeating-linear-gradient(90deg, var(--grass-1) 0 120px, var(--grass-2) 120px 240px);
  background-attachment: fixed;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Header */

.pitch {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2; /* under the lighting, so the glow and shadows fall on the lines too */
  pointer-events: none;
}
.pitch g { stroke: var(--pitch-line); }
.pitch .spots { fill: var(--pitch-line); stroke: none; }

/* Stadium light over the pitch: floodlight glow from the top corners and
   a soft darkening towards the edges, plus fine grass texture */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(ellipse 55% 45% at 8% -5%, var(--floodlight), transparent 70%),
    radial-gradient(ellipse 55% 45% at 92% -5%, var(--floodlight), transparent 70%),
    radial-gradient(ellipse 90% 80% at 50% 45%, transparent 55%, var(--vignette) 100%);
}
body::after {
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .35' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 .4 0 0 0 0 0 0 0 0 1.2 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(10px);
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h1 {
  margin: 0;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.status { display: flex; align-items: center; gap: 12px; }

.updated { color: var(--muted); font-size: 13px; }

.refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.refresh:hover { border-color: var(--faint); }
.refresh.spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
}

.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.seg[hidden] { display: none; }

/* Search + my-leagues chips */

.nav-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.finder { position: relative; flex: none; width: 300px; }
.finder > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.finder input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.finder input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.finder-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 340px);
  max-height: 360px;
  overflow-y: auto;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  z-index: 20;
}
.finder-opt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.finder-opt[aria-selected="true"], .finder-opt:hover { background: var(--surface-2); }
.finder-opt small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.finder-empty { padding: 10px; color: var(--muted); font-size: 13px; }

.jump {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.jump::-webkit-scrollbar { display: none; }
.jump button {
  flex: none;
  font: inherit;
  cursor: pointer;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.jump button:hover { color: var(--text); border-color: var(--faint); }
.jump button[aria-current="true"] { color: var(--surface); background: var(--text); border-color: var(--text); }

/* Icon of the day section */

.icons-wrap { width: min(var(--col-w), 100%); }
.icons-page { display: grid; gap: 16px; }
.icons-head {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.icons-head h2 {
  margin: 0;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.icons-head p { margin: 2px 0 0; color: var(--muted); }
.icon-card {
  padding: 18px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.icon-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 10px;
}
.icon-top { display: flex; gap: 18px; align-items: flex-start; }
.icon-id { min-width: 0; }
.icon-photo {
  flex: none;
  width: 120px;
  height: 150px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}
.icon-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.icon-photo span { font-family: "Inter Tight", Inter, sans-serif; font-size: 36px; font-weight: 800; color: var(--muted); }
.icon-kit .shirt { width: 96px; height: 96px; }
.icon-id h3 {
  margin: 0;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.icon-meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.icon-id h3 .flag { width: 30px; height: 20px; margin-right: 10px; vertical-align: 1px; border-radius: 3px; }
.icon-id h3 .flag + .flag { margin-left: -4px; }
.icon-story { margin: 14px 0 12px; }
.icon-story p { margin: 0 0 10px; line-height: 1.6; }
.icon-teams { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.icon-teams .label { font-size: 11px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.chip-team {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.chip-team.national { border-color: var(--accent); color: var(--accent); }
.icon-more {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.icon-more:hover { text-decoration: underline; }
.icons-next {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--muted);
  font-size: 13px;
}

/* Fantasy football */

.fantasy { display: grid; gap: 14px; }
.fhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fleague { display: grid; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
.fantasy select {
  font: inherit;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
.fsummary { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 10px; align-items: start; }
.fstat { display: grid; gap: 2px; min-width: 0; }
.fstat > span { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fstat b { font-family: "Inter Tight", Inter, sans-serif; font-size: 22px; font-variant-numeric: tabular-nums; }
.fstat.big b { font-size: 34px; line-height: 1; }
.fstat b.neg { color: var(--loss); }
.fstat small { font-size: 11px; color: var(--faint); }
.fstat small.fgain { color: var(--accent); font-weight: 600; }
.fstatus.warn { color: var(--loss); font-weight: 600; }
.fstatus {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  font-size: 13px;
}

/* The pitch: forwards at the top, keeper at the bottom */
.fpitch {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 26px 10px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, .55);
  background:
    linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .5)) center / 100% 2px no-repeat,
    radial-gradient(circle at center, transparent 58px, rgba(255, 255, 255, .5) 59px 61px, transparent 62px),
    repeating-linear-gradient(0deg, #3d8b37 0 60px, #47973f 60px 120px);
  overflow: hidden;
}
.frow { display: flex; justify-content: center; gap: 8px; }
.fslot {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 92px;
  padding: 4px 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.fslot:hover { background: rgba(255, 255, 255, .12); }
.fslot:focus-visible { outline: 2px solid #fff; }
.fkit { position: relative; display: block; width: 48px; height: 48px; }
.fkit .shirt { width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.fslot.empty .fkit { border: 2px dashed rgba(255, 255, 255, .7); border-radius: 10px; }
.fname {
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fff;
  color: #15181a;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fslot.empty .fname { background: rgba(255, 255, 255, .2); color: #fff; }
.fpts {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .45);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fcap, .finj {
  position: absolute;
  top: -4px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  border: 2px solid #fff;
}
.fcap { right: -6px; background: #15181a; color: #fff; }
.finj { left: -6px; background: var(--loss); color: #fff; }
.finj-text { font-style: normal; font-size: 11px; font-weight: 600; color: var(--loss); }

/* Friends */
.ffriends h3 { margin: 0 0 4px; font-family: "Inter Tight", Inter, sans-serif; font-size: 18px; }
.fhint { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.fhint.fpad { padding: 10px 16px 14px; margin: 0; }
.fname-row { display: grid; gap: 4px; margin-bottom: 12px; font-size: 11px; font-weight: 600; color: var(--muted); max-width: 280px; }
.ffriends input[type="text"], .fshare-out textarea {
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}
.ftable { margin-bottom: 12px; }
.ftable td { height: 40px; }
.ftable td.team { width: 100%; max-width: none; }
.ftable tr.me td { background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
.ftable small { color: var(--muted); font-weight: 400; }
.ftable .fshared { display: block; font-size: 11px; color: var(--faint); }
.factions { white-space: nowrap; }
.factions .link-btn { margin-left: 8px; }
.link-btn.danger { color: var(--loss); font-size: 16px; }
.fshare { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fadd-friend { display: flex; gap: 6px; flex: 1; min-width: 240px; }
.fadd-friend input { flex: 1; }
.fshare-out { margin-top: 12px; display: grid; gap: 8px; }
.fshare-out textarea { width: 100%; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 11px; word-break: break-all; }
.fshare-btns { display: flex; gap: 8px; }

.fimport summary { cursor: pointer; font-weight: 700; }
.fimport-body { display: grid; gap: 10px; margin-top: 10px; }
.fimport-body .fhint { margin: 0; }
.fimport-body textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: 11px/1.4 ui-monospace, Menlo, monospace;
  word-break: break-all;
  resize: vertical;
}
.fimport-body .refresh { justify-self: start; }

.frules summary { cursor: pointer; font-weight: 700; }
.frules ul { margin: 10px 0; padding-left: 18px; line-height: 1.7; }
.frules p { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Picking a player */
.fdialog { width: min(560px, calc(100vw - 32px)); }
.fpick-tools { display: flex; gap: 8px; margin: 4px 16px 8px; }
.fpick-tools .picker-search { flex: 1; margin: 0; }
.fpick-list { display: grid; align-content: start; }
.fpick {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fpick:hover:not([disabled]) { background: var(--surface-2); }
.fpick[disabled] { opacity: .45; cursor: not-allowed; }
.fkit.small { width: 30px; height: 30px; }
.fwho { display: grid; min-width: 0; }
.fwho b, .fwho small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fwho small { color: var(--muted); font-size: 11px; }
.fnum { display: grid; justify-items: end; min-width: 40px; }
.fnum b { font-variant-numeric: tabular-nums; }
.fnum small { font-size: 10px; color: var(--faint); }

.fsheet { padding: 0 16px 16px; overflow-y: auto; }
.fsheet-sub { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.fsheet .facts { grid-template-columns: 1fr 1fr; }
.fbreak { margin-bottom: 14px; }
.fbreak th, .fbreak td { text-align: left; height: 30px; }
.fbreak td:not(:first-child), .fbreak th:not(:first-child) { text-align: right; }
.fsheet-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.refresh.danger { color: var(--loss); }

/* Board of league columns */

.board {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: flex-start;
  overflow-x: auto;
  padding: 20px 24px 28px;
  scroll-snap-type: x proximity;
  scroll-padding-left: 24px;
}

.league {
  flex: none;
  width: min(var(--col-w), 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  overflow: hidden;
}

.league-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.league-head img { width: 28px; height: 28px; object-fit: contain; }
.league-head h2 {
  margin: 0;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.league-head .season { color: var(--muted); font-size: 12px; }

.col-add {
  margin-left: auto;
  align-self: flex-start;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.col-add:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

.col-remove {
  margin-left: auto;
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 20px;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
}
.col-remove:hover { background: var(--surface-2); color: var(--text); }

/* League picker */

.picker {
  width: min(520px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .25);
}
.picker[open] { display: flex; flex-direction: column; }
.picker::backdrop { background: rgba(0, 0, 0, .4); }
.picker-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px; }
.picker-head h2 { margin: 0; font-family: "Inter Tight", Inter, sans-serif; font-size: 18px; }
.picker-count { color: var(--muted); font-size: 12px; }
.picker-x {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.picker-search {
  margin: 4px 16px 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.picker-search:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.picker-list {
  overflow-y: auto;
  padding: 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 120px;
}
.pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}
.pick:hover { background: var(--surface-2); }
.pick input { accent-color: var(--accent); width: 16px; height: 16px; }
.picker-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.picker-foot .refresh { margin-left: auto; }
.link-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

/* Divisions stacked under a league (the English pyramid) */

.division { border-top: 6px solid var(--surface-2); scroll-margin-top: 150px; }
.division-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.division-head img { width: 22px; height: 22px; object-fit: contain; }
.division-head h3 {
  margin: 0;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.match .score small.fin { color: var(--faint); }
.match small.when { font-size: 10px; font-weight: 500; color: var(--faint); display: block; }
.match .tie-note {
  grid-column: 1 / -1;
  margin-top: -2px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

.stale-note {
  margin: 10px 16px 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.group-title {
  padding: 10px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th {
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  text-align: right;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
}
th.team-h { text-align: left; }

td {
  padding: 0 4px;
  height: 34px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th:first-child, td:first-child { padding-left: 12px; }
th:last-child, td:last-child { padding-right: 14px; }

tr.row { cursor: pointer; }
tr.row:hover td { background: var(--surface-2); }
tr.row.open td { background: var(--surface-2); }
tr.row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

td.pos {
  width: 30px;
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  position: relative;
}
td.pos::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--zone, transparent);
}

td.team {
  text-align: left;
  max-width: 1px;
  width: 100%;
}
.team-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team-cell img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.team-cell span { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }

td.num { width: 26px; color: var(--muted); }
td.gd { width: 32px; }
td.pts { width: 32px; font-weight: 700; color: var(--text); }
td.odds {
  width: 50px;
  font-size: 12px;
  color: var(--muted);
  background-image: linear-gradient(to left, color-mix(in srgb, var(--accent) 18%, transparent) calc(var(--p, 0) * 100%), transparent 0);
  background-repeat: no-repeat;
}
td.odds.hot { color: var(--text); font-weight: 600; }
td.odds .pending { color: var(--faint); }
th.odds-h { white-space: nowrap; }
.odds-note {
  padding: 0 16px 14px;
  font-size: 11px;
  color: var(--faint);
}

.z-ucl { --zone: var(--ucl); }
.z-europe { --zone: var(--europe); }
.z-playoff { --zone: var(--playoff); }
.z-releg { --zone: var(--releg); }
.z-wc { --zone: var(--wc); }
.z-r16 { --zone: var(--ucl); }
.z-out { --zone: var(--releg); }

/* Expanded team detail */

tr.detail td {
  height: auto;
  padding: 0;
  text-align: left;
  white-space: normal;
  background: var(--surface-2);
}
.detail-inner { padding: 10px 14px 14px 14px; }

/* Kits (drawn from team colors) */

.kit-mini { margin-left: auto; padding-left: 6px; display: inline-flex; flex: none; }
.kit-mini .shirt { width: 16px; height: 16px; }
.kits { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 12px; }
.kits figure { margin: 0; display: grid; justify-items: center; gap: 2px; }
.kits .shirt { width: 44px; height: 44px; }
.kits figcaption { font-size: 11px; color: var(--muted); }
.kits p { margin: 0 0 4px; font-size: 11px; color: var(--faint); }

.stages {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}
.stage {
  display: grid;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 6px;
  text-align: center;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--accent) 22%, transparent) calc(var(--p, 0) * 100%), transparent 0),
    var(--surface);
  border: 1px solid var(--line);
}
.stage span { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage b { font-size: 13px; font-variant-numeric: tabular-nums; }

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.summary b { color: var(--text); font-weight: 600; }

.lost-to {
  font-size: 12px;
  margin-bottom: 10px;
}
.lost-to .label {
  font-weight: 600;
  color: var(--loss);
  margin-right: 4px;
}
.lost-to.none .label { color: var(--win); }

.results { display: grid; gap: 2px; }
.result {
  display: grid;
  grid-template-columns: 22px 46px 18px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 3px 0;
}
.result img { width: 16px; height: 16px; object-fit: contain; }
.result .date { color: var(--faint); }
.result .opp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result .opp small { color: var(--faint); margin-right: 4px; }
.result .score { font-weight: 600; font-variant-numeric: tabular-nums; }

.chip {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--chip-text);
}
.chip.W { background: var(--win); }
.chip.D { background: var(--draw); }
.chip.L { background: var(--loss); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 10px 16px 14px;
  font-size: 11px;
  color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--zone); }

.collapsible:not(.expanded) .extra { display: none; }

/* Tournaments */

.champion {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--wc) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--wc) 35%, transparent);
}
.champion img { width: 28px; height: 28px; object-fit: contain; }
.champion small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.champion b { font-size: 15px; }

/* Friendlies */

.col-tabs { margin: 12px 16px 4px; max-width: calc(100% - 32px); overflow-x: auto; scrollbar-width: none; }
.col-tabs button { padding: 4px 12px; font-size: 12px; }

.day {
  padding: 12px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.day.live-head { color: var(--loss); }

.match {
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 14px;
  border-bottom: 1px solid var(--line);
}
.match .side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match .side.home { flex-direction: row-reverse; text-align: right; }
.match .side img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.match .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.match .won .nm { color: var(--text); font-weight: 600; }
.match .mid { text-align: center; font-variant-numeric: tabular-nums; }
.match .score { font-weight: 700; display: grid; line-height: 1.15; }
.match .score small { font-size: 10px; font-weight: 600; color: var(--loss); }
.match .score.live { color: var(--loss); }
.match .time { font-size: 12px; color: var(--muted); }
.match .note { font-size: 11px; color: var(--faint); }

/* Players view */

tr.player td { height: 42px; cursor: default; }
.player-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.player-cell img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.player-cell .who { display: grid; min-width: 0; line-height: 1.2; }
.player-cell .who b, .player-cell .who small {
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-cell .who b { font-weight: 600; }
.flag {
  display: inline-block;
  width: 18px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -1px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--line);
}
.flag.pending { background: var(--surface-2); box-shadow: none; }
.player-cell .who small { color: var(--faint); font-size: 11px; }
.ptable { table-layout: fixed; }
.ptable th:nth-child(1) { width: 40px; }
.ptable th:nth-child(3) { width: 46px; }
.ptable th:nth-child(4), .ptable th:nth-child(5) { width: 34px; }
.ptable th:nth-child(6) { width: 50px; }
.ptable td.team { max-width: none; width: auto; }
td.stat { color: var(--muted); }
tr.player { cursor: pointer; }
tr.player:hover td, tr.player.open td { background: var(--surface-2); }
tr.player:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
tr.pdetail td { padding: 0; background: var(--surface-2); text-align: left; white-space: normal; height: auto; }

.profile { padding: 12px 16px 16px; }
.profile-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.headshot { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--surface); flex: none; }
.profile-name { font-family: "Inter Tight", Inter, sans-serif; font-weight: 800; font-size: 18px; }
.profile-sub { color: var(--muted); font-size: 12px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.fact {
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
}
.fact span { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fact b { font-size: 14px; font-variant-numeric: tabular-nums; }
.fact small { font-size: 10px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-about { margin: 0; font-size: 13px; line-height: 1.55; }
.profile-about a { color: var(--accent); font-size: 12px; font-weight: 600; margin-left: 4px; }
td.stat.sorted, th.sorted { color: var(--text); font-weight: 700; }

.more {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin-top: -1px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
}
.more:hover { background: var(--surface-2); }

.msg { padding: 16px; color: var(--muted); font-size: 13px; }
.msg.err { color: var(--loss); }
.board-msg { background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }

.skeleton td { color: transparent; }
.skeleton .bar {
  height: 10px;
  border-radius: 4px;
  background: var(--surface-2);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .5; } }

.foot {
  padding: 0 24px 32px;
  color: var(--on-grass);
  font-size: 12px;
}

@media (max-width: 640px) {
  :root { --col-w: calc(100vw - 32px); }
  .top { padding: 14px 16px 10px; }
  h1 { font-size: 22px; }
  .updated { display: none; }
  .status { gap: 8px; }
  .board { padding: 14px 16px 24px; gap: 12px; scroll-padding-left: 16px; scroll-snap-type: x mandatory; }
  .foot { padding: 0 16px 24px; }
  .nav-row { flex-direction: column; align-items: stretch; }
  .finder { width: 100%; }
  .finder-list { width: 100%; }
  /* Team names need the room more than the mini kits on a phone */
  .kit-mini { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fsummary { grid-template-columns: 1fr 1fr; }
  .fslot { width: 64px; }
  .fkit { width: 40px; height: 40px; }
  .frow { gap: 2px; }
  .icon-card { padding: 14px; }
  .icon-top { flex-direction: column; gap: 12px; }
  .icon-photo { width: 96px; height: 120px; }
  .icon-id h3 { font-size: 22px; }
  th, td { padding-left: 3px; padding-right: 3px; }
  td.num { width: 22px; }
  .hide-sm { display: none; }
  .col-tabs button { padding: 4px 8px; font-size: 11px; }
}

/* Lineups */

/* minmax(0, 1fr) so long names and wide tables can't push the page past a phone's width */
.lineups, .lgrid, .lview, .women { grid-template-columns: minmax(0, 1fr); }
.fleague, .fleague select { max-width: 100%; }
.lgrid { display: grid; gap: 14px; }
.lmatches { position: relative; padding: 0 0 8px; max-height: 420px; overflow-y: auto; }
.lm-tools {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.lm-tools select { min-width: 0; max-width: 60%; }
.lm-count { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.lround {
  padding: 14px 16px 2px;
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.lmatches > .fhint, .lmatches > .msg { padding: 14px 16px 4px; margin: 0; }
.lgroup .day { position: sticky; top: 52px; background: var(--surface); z-index: 1; }
.lmatch {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.lmatch:hover { background: var(--surface-2); }
.lmatch.on { background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 600; }
.lm-t { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-t.away { justify-content: flex-end; text-align: right; }
.lm-t img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.lm-s { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; color: var(--muted); font-size: 12px; }
.lm-s.live { color: var(--loss); }

.lview { display: grid; gap: 12px; }
.lhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.lteam { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.lteam img { width: 44px; height: 44px; object-fit: contain; }
.lteam b { font-size: 15px; }
.lteam small { color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lscore {
  display: grid;
  justify-items: center;
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.lscore small { font-family: Inter, sans-serif; font-size: 11px; font-weight: 600; color: var(--muted); }
.lscore.live small { color: var(--loss); }
.lscore.time { font-size: 15px; text-align: center; line-height: 1.3; }

/* One pitch, home attacking up from the bottom, away attacking down from the top */
.lpitch { gap: 0; padding: 14px 6px; }
.lhalf { display: grid; gap: 10px; padding: 8px 0; }
.lhalf.away { padding-bottom: 22px; }
.lhalf.home { padding-top: 22px; }
.lhalf-label {
  justify-self: start;
  margin: 0 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.lslot {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 88px;
  padding: 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.lslot:hover { background: rgba(255, 255, 255, .12); }
.lslot:focus-visible { outline: 2px solid #fff; }
.lnum {
  position: absolute;
  inset: 22% 0 auto;
  text-align: center;
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: 15px;
  font-weight: 800;
  pointer-events: none;
}
.lmarks { position: absolute; right: -10px; top: -4px; display: flex; gap: 1px; align-items: center; }
.lm-goal { font-size: 12px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.lm-goal.og { filter: grayscale(1) drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.lm-card {
  display: inline-block;
  width: 9px;
  height: 12px;
  border-radius: 2px;
  background: #f5c400;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
  vertical-align: -1px;
}
.lm-card.red { background: #d62828; }
.lsub {
  position: absolute;
  left: -12px;
  bottom: -2px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.lkey { margin: 0; padding: 0 4px; color: var(--on-grass); }

.lbenches h3 { margin: 0 0 10px; font-family: "Inter Tight", Inter, sans-serif; font-size: 18px; }
.lbench-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lbench h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; }
.lbench h4 img { width: 18px; height: 18px; object-fit: contain; }
.lbench ul { list-style: none; margin: 0; padding: 0; }
.lbench-p {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 6px;
  width: 100%;
  padding: 5px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.lbench-p:hover { background: var(--surface-2); }
.lbench-num { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.lbench-in { grid-column: 2; color: var(--accent); font-size: 11px; font-weight: 600; }
.lprofile { overflow-y: auto; }

.lstats h3 { margin: 0 0 10px; font-family: "Inter Tight", Inter, sans-serif; font-size: 18px; }
.lst-teams { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.lst-teams span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.lst-teams img { width: 18px; height: 18px; object-fit: contain; }
.lst-row {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  row-gap: 4px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.lst-row:last-child { border-bottom: 0; }
.lst-row > span { text-align: center; color: var(--muted); }
.lst-row > b { font-weight: 500; font-variant-numeric: tabular-nums; }
.lst-row > b:last-of-type { text-align: right; }
.lst-row > b.lead { font-weight: 800; }
.lst-bar {
  grid-column: 1 / -1;
  display: flex;
  gap: 3px;
  height: 6px;
}
.lst-bar i {
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px var(--shirt-edge);
  min-width: 3px;
}
.lst-bar i:last-child { flex: 1; }

.ltimeline h3 { margin: 0 0 10px; font-family: "Inter Tight", Inter, sans-serif; font-size: 18px; }
.ltl {
  position: relative;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
/* The centre line the minutes sit on */
.ltl::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--line);
}
.ltl-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr); align-items: center; }
.ltl-side { min-width: 0; }
.ltl-min {
  justify-self: center;
  z-index: 1;
  min-width: 40px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ltl-body {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 10px;
}
.ltl-row.home .ltl-body { flex-direction: row-reverse; text-align: right; }
.ltl-body.goal { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ltl-icon { flex: none; display: grid; place-items: center; width: 18px; font-size: 14px; }
.ltl-text { display: grid; min-width: 0; font-size: 13px; line-height: 1.25; }
.ltl-text b, .ltl-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltl-text b { font-weight: 600; }
.ltl-text small { color: var(--muted); font-size: 11px; }
.ltl-on { color: var(--accent); }
.ltl-off { color: var(--loss) !important; }
.ltl-sub { color: var(--muted); font-weight: 700; }
.ltl-miss { color: var(--loss); font-weight: 800; }
.ltl-score {
  flex: none;
  margin-left: auto;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ltl-row.home .ltl-score { margin-left: 0; margin-right: auto; }
.ltl-mark { position: relative; z-index: 1; display: flex; justify-content: center; margin: 4px 0; }
.ltl-mark span {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.lh2h h3 { margin: 0 0 2px; font-family: "Inter Tight", Inter, sans-serif; font-size: 18px; }
.lh2h > .fhint { margin-bottom: 12px; }
.lh2h-sum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: end;
  margin-bottom: 8px;
}
.lh2h-sum > div:not(.lst-bar) { display: grid; min-width: 0; }
.lh2h-sum > div:nth-child(2) { justify-items: center; text-align: center; }
.lh2h-sum > div:nth-child(3) { justify-items: end; text-align: right; }
.lh2h-sum b { font-family: "Inter Tight", Inter, sans-serif; font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lh2h-sum span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh2h-sum .lst-bar { margin-top: 4px; }
.lh2h-sum .lst-bar i:last-child { flex: unset; }
.lh2h-list { list-style: none; margin: 0; padding: 0; }
.lh2h-game {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.lh2h-when { display: grid; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 0; }
.lh2h-when small { color: var(--faint); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh2h-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.lh2h-t { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); }
.lh2h-t:first-child { flex-direction: row-reverse; text-align: right; }
.lh2h-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh2h-t img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.lh2h-t.won { color: var(--text); font-weight: 700; }
.lh2h-score { text-align: center; font-family: "Inter Tight", Inter, sans-serif; font-weight: 800; font-variant-numeric: tabular-nums; }
.lh2h-note { grid-column: 2; text-align: center; color: var(--muted); font-size: 11px; }

.lpstats { padding-left: 0; padding-right: 0; }
.lps-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 0 20px 8px; }
.lps-head h3 { margin: 0; font-family: "Inter Tight", Inter, sans-serif; font-size: 18px; }
.lps-head .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.lps-table { table-layout: fixed; }
.lps-table th:nth-child(1) { width: 34px; }
.lps-table th:nth-child(n+3) { width: 38px; }
.lps-table th:last-child { width: 26px; }
.lps-table td { height: 42px; }
.lps-table td.team { max-width: none; width: auto; }
.lps-num { color: var(--muted); font-weight: 600; text-align: left; }
.lps-who { display: grid; min-width: 0; line-height: 1.2; }
.lps-who b, .lps-who small { overflow: hidden; text-overflow: ellipsis; }
.lps-who b { font-weight: 600; }
.lps-who small { color: var(--faint); font-size: 11px; }
.lps-row { cursor: pointer; }
.lps-row:hover td { background: var(--surface-2); }
.lps-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lps-sort {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.lps-sort:hover { color: var(--text); }
th.sorted .lps-sort, .lps-sort.on { color: var(--text); font-weight: 700; }
.lps-note { padding: 10px 20px 0; margin: 0; }
.lps-table td.stat { color: var(--text); font-weight: 600; }
.lps-table td.stat.zero { color: var(--faint); font-weight: 400; }

@media (max-width: 640px) {
  .lslot { width: 62px; }
  .lnum { font-size: 13px; }
  .lteam img { width: 34px; height: 34px; }
  .lteam b { font-size: 13px; }
  .lscore { font-size: 24px; }
  .lbench-cols { grid-template-columns: 1fr; }
  .lh2h-game { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .lh2h-when { grid-auto-flow: column; justify-content: center; gap: 6px; }
  .lh2h-note { grid-column: 1; }
  .lh2h-row { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); }
  .ltl-row { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); }
  .ltl-body { padding: 5px 6px; gap: 6px; }
  .ltl-text b, .ltl-text small { white-space: normal; overflow-wrap: anywhere; }
  /* Five view tabs don't fit a phone: scroll them sideways */
  .controls > .seg[role="tablist"] { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .controls > .seg[role="tablist"] button { padding: 5px 10px; }
}

/* Hall of Fame */

.hof-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.hof-tools .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.hof-search { flex: 1; min-width: 200px; margin: 0; background: var(--surface); }
.hof-card { padding: 6px 0; }
.hof-list { list-style: none; margin: 0; padding: 0; }
.hof-row { border-bottom: 1px solid var(--line); }
.hof-row:last-child { border-bottom: 0; }
.hof-head {
  display: grid;
  grid-template-columns: 40px 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hof-head:hover, .hof-row.open .hof-head { background: var(--surface-2); }
.hof-rank {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hof-row.top1 .hof-rank { color: #c9a227; }
.hof-row.top2 .hof-rank { color: #9aa4ab; }
.hof-row.top3 .hof-rank { color: #b07a4a; }
.hof-photo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.hof-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hof-who { display: grid; min-width: 0; }
.hof-who b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hof-who small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hof-detail { padding: 4px 16px 16px 76px; background: var(--surface-2); display: grid; gap: 10px; }
.hof-detail > p { margin: 0; font-weight: 600; line-height: 1.5; }
.hof-detail .icon-story { margin: 0; }
.hof-detail .chip-team { background: var(--surface); }
.hof-honours { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 640px) {
  .hof-head { grid-template-columns: 30px 40px minmax(0, 1fr); gap: 10px; padding: 8px 12px; }
  .hof-rank { font-size: 18px; }
  .hof-photo { width: 40px; height: 40px; }
  .hof-detail { padding: 4px 12px 14px; }
}

/* Women's football: competition chips (styled like My leagues) and a More list */

.wm-comps { flex-wrap: wrap; overflow: visible; align-items: center; }
.women .wm-comps select {
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
}
.women .wm-comps select.on { color: var(--surface); background: var(--text); border-color: var(--text); }
.wm-views { justify-self: start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.wm-col .league { width: 100%; }

/* Where to watch */

.wt-days { justify-self: start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.wt-filter:empty { display: none; }
.wt-services { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.wt-chip.stream { color: var(--ucl); }
.wt-chip.mine { border-color: var(--accent); color: var(--text); }
.wt-services .wt-chip { padding: 5px 12px; background: var(--surface); font-size: 13px; cursor: pointer; }
.wt-services .wt-chip:hover { border-color: var(--faint); }
.wt-services .wt-chip small { color: var(--faint); font-weight: 600; }
.wt-services .wt-chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--surface); }
.wt-services .wt-chip[aria-pressed="true"] small { color: inherit; opacity: .7; }
.wt-services .link-btn { color: var(--on-grass); margin-left: 4px; }
.wt-tv { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; }
.wt-foot { margin-top: 0; text-transform: none; letter-spacing: 0; font-weight: 500; }

.watch .fhead .seg { flex: none; }

/* Watch: videos */
.vd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.vd-tools select {
  max-width: 100%;
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
.vd-tools .lv-only { color: var(--on-grass); }
.vd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.vd-card {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.vd-card:hover { border-color: var(--faint); }
.vd-card:hover .vd-play { transform: translate(-50%, -50%) scale(1.08); }
.vd-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-2); }
.vd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vd-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding-left: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 16px;
  transition: transform .15s;
}
.vd-tag {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.vd-dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.vd-more-row { display: flex; justify-content: center; margin-top: 14px; }
.vd-title { padding: 0 12px; font-size: 13px; font-weight: 700; line-height: 1.3; }
.vd-meta { padding: 0 12px; color: var(--muted); font-size: 11px; }
.vd-dialog { width: min(880px, calc(100vw - 32px)); }
.vd-dialog .picker-head h2 { font-size: 16px; line-height: 1.3; }
.vd-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 0; }
.vd-about { padding: 10px 16px 14px; }
.vd-about p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.vd-about .vd-meta { padding: 0; }
.vd-about a { color: var(--accent); font-weight: 600; }
.vd-dialog .msg.err a { color: inherit; text-decoration: underline; }

/* Live scores */

.live-dot {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--loss);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}
.lv-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lv-only { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.lv-only input { accent-color: var(--accent); }
.lv-now { color: var(--loss); }
.lv-list { display: grid; gap: 12px; }
.lv-heading {
  margin: 6px 4px -4px;
  color: var(--on-grass);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.lv-group { padding: 0; overflow: hidden; }
.lv-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.lv-head img { width: 22px; height: 22px; object-fit: contain; }
.lv-badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--loss) 14%, transparent);
  color: var(--loss);
  font-size: 11px;
  font-weight: 700;
}
.lv-open { margin-left: auto; font-size: 12px; }
.lv-match {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lv-match:last-child { border-bottom: 0; }
.lv-match:hover { background: var(--surface-2); }
.lv-match.is-live { box-shadow: inset 3px 0 0 var(--loss); }
.lv-row { display: grid; grid-template-columns: 1fr 76px 1fr; align-items: center; gap: 8px; }
.lv-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lv-team:first-child { flex-direction: row-reverse; text-align: right; }
.lv-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-team img { width: 20px; height: 20px; object-fit: contain; flex: none; }
/* Once there's a winner, the loser fades */
.lv-match:has(.won) .lv-team:not(.won) { color: var(--muted); }
.lv-team.won span { font-weight: 700; }
.lv-mid { display: grid; justify-items: center; text-align: center; font-variant-numeric: tabular-nums; }
.lv-mid.score { font-family: "Inter Tight", Inter, sans-serif; font-size: 17px; font-weight: 800; line-height: 1.1; }
.lv-mid.score small { font-family: Inter, sans-serif; font-size: 10px; font-weight: 600; color: var(--faint); }
.lv-mid.live { color: var(--loss); }
.lv-mid.live small { color: var(--loss); animation: pulse 1.6s ease-in-out infinite; }
.lv-mid.time { font-size: 13px; font-weight: 600; color: var(--muted); }
.lv-mid.note { font-size: 11px; color: var(--faint); }
.lv-events { display: grid; grid-template-columns: 1fr 76px 1fr; gap: 8px; margin-top: 3px; font-size: 11px; color: var(--muted); }
.lv-events > div { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.lv-events > div.away { grid-column: 3; align-items: flex-start; text-align: left; }
.lv-events .lm-card { width: 7px; height: 10px; }

@media (max-width: 640px) {
  .lv-row, .lv-events { grid-template-columns: 1fr 58px 1fr; }
  .lv-match { padding: 8px 10px; }
  .lv-team { gap: 5px; font-size: 13px; }
}
