/* Football Dashboard styles, shared by index.html and admin.html. */
:root {
  --bg: #0f1115; --panel: #171a21; --panel-2: #1e222b; --line: #2a2f3a;
  --text: #e8eaed; --muted: #9aa0a6; --faint: #6b7280;
  --accent: #7aa2ff; --good: #34c27a; --warn: #f0b429; --bad: #f05252; --mine: #c49bff;
  --chip: #232835;
  --QB: #ff7a90; --RB: #34c2a5; --WR: #6ea8ff; --TE: #f0a35e; --K: #b0b8c4; --DEF: #a78bfa;
  --DL: #e0795a; --LB: #c9a227; --DB: #4fb3c9;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f9; --panel: #ffffff; --panel-2: #f1f3f6; --line: #e2e5ea;
    --text: #15181d; --muted: #5f6672; --faint: #8a919c;
    --accent: #2f5fe0; --good: #16955a; --warn: #b7791f; --bad: #d23434; --mine: #7c4ddb;
    --chip: #eef0f4;
    --QB: #d6365a; --RB: #0f8f78; --WR: #2f6fe0; --TE: #c46a16; --K: #5f6672; --DEF: #6d4ed8;
    --DL: #b4482c; --LB: #8f7208; --DB: #1d7f96;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.hidden { display: none !important; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* Header */
header { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 0 8px; flex-wrap: wrap; }
.top h1 { font-size: 18px; margin: 0; letter-spacing: -.01em; }
.week { color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }
.btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 5px 10px; color: var(--muted); }
.seg button.on { background: var(--panel-2); color: var(--text); }

.leagues { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 8px; }
.lchip { display: inline-flex; align-items: center; gap: 6px; background: var(--chip); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px 3px 8px; font-size: 12px; max-width: 260px; }
.lchip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lchip .warn { color: var(--warn); }
/* Dashboard league chips: "Platform | League" over your team name. */
.lgc { display: inline-flex; align-items: center; gap: 8px; background: var(--chip); border: 1px solid var(--line);
  border-radius: 10px; padding: 5px 11px 5px 9px; font-size: 12px; line-height: 1.3; max-width: 280px; cursor: default; }
.lgc:hover { border-color: var(--faint); }
.lgc .lc { display: flex; flex-direction: column; min-width: 0; }
.lgc .lc1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lgc .lc2 { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lgc .lc2.none { font-style: italic; color: var(--faint); }
.lgc .warn { color: var(--warn); }

/* Dashboard layout: league tabs + the selected roster in a left sidebar that stays in view. */
.wrap.wide { max-width: 1680px; }
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; }
/* z-index 4: its overlays (league settings) stay above the board's sticky table header, below the page header (5) and popups. */
.side { position: sticky; z-index: 4; top: calc(var(--hdr, 100px) + 12px); margin-top: 12px;
  max-height: calc(100vh - var(--hdr, 100px) - 24px); display: flex; flex-direction: column; gap: 10px; }
/* League tabs: compact one-line pills that wrap, so the roster below gets the height. */
.sidetabs { display: flex; flex-wrap: wrap; gap: 4px; flex: none; max-height: 30%; overflow-y: auto; }
.sidetabs .lgc { flex: 1 1 auto; min-width: 0; max-width: 100%; gap: 5px; padding: 3px 7px 3px 8px; border-radius: 999px;
  text-align: left; cursor: pointer; color: inherit; font: inherit; font-size: 12px; line-height: 1.35; }
.sidetabs .lgc .lc1 { min-width: 0; max-width: 150px; }
.sidetabs .lgc.on .lc1 { max-width: 230px; }
.sidetabs .lgc .lp { color: var(--muted); font-weight: 500; font-size: 11px; }
.sidetabs .lgc .lo { color: var(--accent); font-weight: 700; }
.sidetabs .lgc .dot { flex: none; }
.sidetabs .lgc .caret { margin-left: 2px; }
.sidetabs .lgc.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--chip)); }
.sideroster { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; }
.sideroster:empty { display: none; }
main { min-width: 0; }
/* Show / hide roster: phones only. */
.rtoggle { display: none; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rtoggle { display: inline-flex; align-self: flex-start; }
  .side:not(.open) .sideroster { display: none; }
  .side { position: static; max-height: none; }
  .sidetabs { flex-wrap: nowrap; overflow-x: auto; max-height: none; padding-bottom: 2px; }
  .sidetabs .lgc { flex: none; max-width: 230px; }
  .sideroster { max-height: 50vh; }
}
/* Hovering a league chip: your roster in that league. */
.rosterpop { position: fixed; z-index: 15; width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 620px); overflow-y: auto;
  padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.45); }
:is(.rosterpop, .sideroster) h4 { margin: 0 0 4px; font-size: 14px; }
:is(.rosterpop, .sideroster) h4 .rp-n { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
:is(.rosterpop, .sideroster) .rp-sub { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
:is(.rosterpop, .sideroster) .rp-pos { font-size: 11px; font-weight: 700; letter-spacing: .05em; color: var(--muted); margin: 10px 0 4px; }
:is(.rosterpop, .sideroster) .rp-pos[style] { color: var(--pc, var(--muted)); }
:is(.rosterpop, .sideroster) .rp-row { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 6px; cursor: pointer; font-size: 13px; }
:is(.rosterpop, .sideroster) .rp-row:hover { background: var(--panel-2); }
:is(.rosterpop, .sideroster) .rp-row .sub { margin-left: 2px; }
/* One line per player: everything else keeps its size, the name gives way (see fitNames). */
:is(.rosterpop, .sideroster) .rp-row > * { flex: none; white-space: nowrap; }
:is(.rosterpop, .sideroster) .rp-row > .rp-name { flex: 0 1 auto; min-width: 0; overflow: hidden; }
:is(.rosterpop, .sideroster) .rp-row .ppg { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
:is(.rosterpop, .sideroster) .rp-pos.rp-slot { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 12px; color: var(--warn); }
:is(.rosterpop, .sideroster) .rp-pos .rp-n { font-weight: 400; color: var(--muted); }
:is(.rosterpop, .sideroster) .rp-note { color: var(--faint); font-size: 12px; margin-top: 8px; }
/* From the player popup: your roster beside the team(s) that have the player. */
.rosterpop.wide { width: min(780px, calc(100vw - 24px)); }
:is(.rosterpop, .sideroster) .rp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 18px; }
:is(.rosterpop, .sideroster) .rp-col + .rp-col { border-left: 1px solid var(--line); padding-left: 18px; }
:is(.rosterpop, .sideroster) .rp-tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  border-radius: 999px; padding: 1px 8px; margin-bottom: 4px; }
:is(.rosterpop, .sideroster) .rp-tag.mine { background: #2f6fe0; color: #fff; }
:is(.rosterpop, .sideroster) .rp-tag.has { background: #5b616e; color: #fff; }
:is(.rosterpop, .sideroster) .rp-row.hl { background: color-mix(in srgb, var(--accent) 22%, transparent); }
:is(.rosterpop, .sideroster) .rp-msg { color: var(--muted); font-size: 13px; }
.lgchips .lg { cursor: pointer; }
/* The league chip whose scoring the player popup uses. */
.lgchips .lg.sel { outline: 2px solid var(--text); outline-offset: 2px; }
.scoring-note { color: var(--muted); font-size: 12px; }
/* Free in leagues / IDP, stacked. */
.stack { display: inline-flex; flex-direction: column; gap: 3px; font-size: 12.5px; line-height: 1.25; }
.stack .chiptog { padding: 2px 9px; font-size: 11.5px; justify-content: center; }
.stack .toggle input { margin: 0; }
/* Search players, at the right end of the tabs row. */
nav.tabs { align-items: center; }
@media (max-width: 640px) { nav.tabs { flex-wrap: wrap; } }
/* Board search: in the table's top row, above Player. */
th.qcell { text-align: left; padding-top: 4px; padding-bottom: 4px; }
.th-search { width: 100%; min-width: 160px; max-width: 260px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px;
  font: inherit; font-size: 12.5px; font-weight: 400; color: var(--text); text-transform: none; letter-spacing: 0; }
.board-subs { margin: 10px 0 2px; }
.nw-topn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.nw-topn input { width: 56px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; color: var(--text); font: inherit; }
/* League settings overlay */
/* Phones: the player name stays in view while the board scrolls sideways. */
@media (max-width: 900px) {
  #thead th[data-col="name"], #thead th.qcell, #tbody td.name { position: sticky; left: 0; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
  #thead th[data-col="name"], #thead th.qcell { z-index: 3; background: var(--panel-2); }
  #tbody td.name { z-index: 1; }
  .th-search { min-width: 120px; }
}
/* Touch screens (html.touch: set on the first touch, or when the device reports a coarse pointer): bigger tap targets, no text under ~11px. */
html.touch .btn, html.touch .chiptog, html.touch select { min-height: 36px; }
html.touch .pos button { padding: 7px 11px; }
html.touch .nw-sub { padding: 8px 14px; }
html.touch .sidetabs .lgc { padding: 7px 11px; }
html.touch :is(.rosterpop, .sideroster) .rp-row { min-height: 40px; }
html.touch .avail { padding: 8px 4px; gap: 4px; }
html.touch .avail i { width: 13px; height: 13px; }
html.touch .props .pchip { padding: 7px 12px; font-size: 13px; }
html.touch .props .pbtn { width: 36px; height: 36px; }
html.touch .nw-name { display: inline-block; padding: 6px 0; }
html.touch .nw-link { display: inline-block; padding: 8px 0; }
html.touch .mu-link { padding: 6px 0; }
html.touch th { font-size: 11.5px; }
html.touch .mu-table .gline, html.touch .mu-table .gs, html.touch .props .ticks, html.touch .nw-src, html.touch .ls-sub, html.touch .ls-pos, html.touch .tmsnp { font-size: 11.5px; }
html.touch svg text { font-size: 11px; }
html.touch :is(.mu-table, .sg-table, .dgroup) button.link { padding: 8px 0; }
html.touch :is(.ptag, .tag, .inj, .act, .bk-new) { font-size: 11px; }
/* A tapped explanation (title text) on touch screens. */
.ttip { position: fixed; z-index: 60; max-width: min(320px, calc(100vw - 16px)); padding: 8px 11px; border-radius: 9px; background: var(--panel);
  border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0,0,0,.45); color: var(--text); font-size: 13px; line-height: 1.4; white-space: pre-line; }
nav.tabs button { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
nav.tabs.reordering { touch-action: none; }
/* Suggestions: a card's comparison table scrolls inside the card on narrow screens. */
.sg-card { max-width: 100%; overflow-x: auto; }
/* A bye week repeated within a roster position group (rosterHtml). */
.bye { border: 1px solid var(--line); border-radius: 4px; padding: 0 3px; font-weight: 700; cursor: help; }
.bye.byedup { color: var(--bc); background: color-mix(in srgb, var(--bc) 18%, transparent); border-color: color-mix(in srgb, var(--bc) 55%, transparent); }
.lgc .infotip.lsettings { display: inline; white-space: nowrap; }   /* stays inside the chip's "…" truncation */
.infotip.lsettings { color: inherit; font-weight: inherit; white-space: normal; text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }
.ls-table { border-collapse: collapse; width: 100%; margin: 4px 0; font-size: 12px; }
.ls-table td { padding: 2px 6px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: top; }
.ls-table td.ls-v { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ls-table td.ls-h { padding-top: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); }
.ls-table td.ls-bh { padding-top: 6px; font-weight: 600; }
.ls-pos { color: var(--muted); font-size: 11px; }
.ls-sub { color: var(--muted); font-size: 11px; }
@media (max-width: 640px) { .rosterpop .rp-col + .rp-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 8px; } }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--good); } .dot.stale { background: var(--warn); }
.dot.needs_auth, .dot.error { background: var(--bad); }
.dot.loading { background: var(--accent); animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }
.plat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

nav.tabs { display: flex; gap: 4px; }
nav.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--muted); }
nav.tabs button.on { color: var(--text); border-color: var(--accent); }
nav.tabs button[draggable="true"] { cursor: pointer; }
nav.tabs button.dragging { opacity: .4; }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 0; }
.pos { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pos button { background: var(--chip); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; font-size: 12px; font-weight: 600; }
.pos button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Excluded position: struck through, red. */
.pos button.ex { background: color-mix(in srgb, var(--bad) 14%, var(--chip)); border-color: var(--bad); color: var(--bad); text-decoration: line-through; text-decoration-thickness: 2px; }
.filters input[type=search], .filters select { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.filters input[type=search] { width: 180px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); user-select: none; cursor: pointer; }
/* On/off chips (instead of checkboxes): teal when on. The checkbox stays for keyboard and screen readers. */
:root { --tog: #14b8a6; }
.chiptog { position: relative; display: inline-flex; align-items: center; gap: 4px; background: var(--chip); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; }
.chiptog:hover { border-color: var(--faint); color: var(--text); }
.chiptog input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.chiptog:has(input:checked) { background: var(--tog); border-color: var(--tog); color: #fff; }
.chiptog:has(input:focus-visible) { outline: 2px solid var(--tog); outline-offset: 2px; }
.chiptog:has(input:disabled) { opacity: .45; cursor: default; }
.chiptog .sg-lw { text-decoration-color: currentColor; }
/* Matchup tab */
.mu-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; }
.mu-bar h2 { font-size: 16px; margin: 0 6px 0 0; }
.mu-bar select { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.mu-bar .mu-status { color: var(--muted); font-size: 12px; margin-left: auto; }
.mu-msg { color: var(--muted); padding: 30px 4px; }
.mu-links { display: inline-flex; gap: 14px; }
.mu-link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; }
.mu-link:hover { text-decoration: underline; }
.mu-link.on { color: var(--text); cursor: default; text-decoration: none; }
.mu-head { display: grid; grid-template-columns: 1fr 56px 1fr; gap: 0; align-items: stretch; margin-bottom: 10px; }
.mu-vs { text-align: center; }
.mu-team { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.mu-team { text-align: right; }
.mu-team.right { text-align: left; }
.mu-team.win { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); }
.mu-team .tn { font-weight: 700; font-size: 15px; }
.mu-team .tm { color: var(--muted); font-size: 12px; font-weight: 400; margin-right: 8px; }
.mu-team.right .tm { margin-right: 0; margin-left: 8px; }
/* Left team: "manager · record  Team name" so the name sits by the middle; right team mirrors it. */
.mu-team .tn { display: flex; flex-direction: row-reverse; justify-content: flex-start; align-items: baseline; }
.mu-team.right .tn { flex-direction: row; }
.mu-team .est { color: var(--warn); margin-right: 3px; cursor: help; }
.mu-table b.est { color: var(--warn); }
.livedot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 5px; animation: pulse 1s infinite alternate; }
.noproj { color: var(--warn); font-size: 11px; font-weight: 600; cursor: help; }
.mu-team .ts { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 6px; line-height: 1.1; }
.mu-team .tp { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
/* Live projections: green when above the pregame projection, red when below. */
.lv { font-weight: 700; color: var(--muted); }
.lv.up { color: var(--good); } .lv.down { color: var(--bad); }
.mu-team .tp .lv { font-size: 13px; }
.mu-team .tp .sep, .mu-table .sep { color: var(--faint); margin: 0 5px; }
.mu-table td.pp .pj.lv { font-size: 12px; color: var(--muted); }
.mu-table td.pp .pj.lv.up { color: var(--good); } .mu-table td.pp .pj.lv.down { color: var(--bad); }
/* A player's game this week: playing now (green), final, or kickoff time. */
.mu-table .gs { font-size: 10.5px; color: var(--faint); margin: 0 4px; white-space: nowrap; cursor: help; }
.mu-table .gs-in { color: var(--accent); font-weight: 700; }   /* blue: green and red mean winning / losing */
.mu-table .gs-in::before { content: "● "; }
/* The game's score, under the player's name. */
/* Kept quiet (faded, not bold) so the fantasy points stand out. */
.mu-table .gline { font-size: 11px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; opacity: .55; }
.mu-table .gline b { font-weight: 500; color: var(--muted); }
.mu-table .gline .gs-in { font-weight: 500; }
.mu-table .gline .gs { margin: 0 6px 0 0; font-size: 11px; }
.mu-table .gline b.up { color: var(--good); } .mu-table .gline b.down { color: var(--bad); }
.mu-vs { align-self: center; color: var(--faint); font-weight: 700; }
.mu-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
/* Symmetric columns, so POS sits right under the "vs" between the two teams. */
.mu-table col.c-pts { width: 112px; } .mu-table col.c-pos { width: 56px; } .mu-table col.c-side { width: calc(50% - 140px); }
.mu-table td.pl, .mu-table td.pr { overflow: hidden; text-overflow: ellipsis; }
/* The legend: an ⓘ under "vs", shown on hover / focus. */
.mu-vs { position: relative; }
/* A hover/focus explainer: "ⓘ How scores work" (Suggestions). */
.infotip { position: relative; display: inline-block; color: var(--accent); font-weight: 600; cursor: help; outline: none; white-space: nowrap; }
.infopop { display: none; position: fixed; z-index: 40; width: min(560px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto;   /* placed by placeInfoPop() */
  white-space: normal; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); color: var(--text); font-weight: 400; font-size: 12.5px; line-height: 1.45; cursor: auto; }
.infotip:hover .infopop, .infotip:focus .infopop, .infotip:focus-within .infopop { display: block; }
.infopop .it-h { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.infopop p { margin: 6px 0; }
.infopop ul { margin: 4px 0; padding-left: 16px; }
.infopop li { margin-bottom: 3px; }
.infopop .it-w { color: var(--muted); font-size: 11px; white-space: nowrap; }
.infopop .it-note { color: var(--muted); }
.mu-ltip { display: block; margin-top: 4px; font-weight: 400; font-size: 14px; color: var(--muted); cursor: help; outline: none; }
.mu-ltip:hover, .mu-ltip:focus { color: var(--text); }
.mu-lpop { display: none; position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 20; width: min(560px, 92vw); max-height: 70vh; overflow-y: auto;
  text-align: left; font-size: 12.5px; font-weight: 400; color: var(--text); background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.45); padding: 10px 14px; line-height: 1.5; }
.mu-ltip:hover .mu-lpop, .mu-ltip:focus .mu-lpop { display: block; }
.mu-lpop ul { margin: 4px 0 0; padding-left: 16px; }
.mu-lpop ul ul { margin: 4px 0 2px; }
.mu-lpop li { margin-bottom: 3px; }
.mu-lpop .mu-lh { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mu-lpop .lg-gray { color: var(--muted); } .mu-lpop .lg-est { color: var(--warn); }
.mu-table td.mpos .ptag { margin: 0; }
.mu-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
/* Names hug the middle: mine right-aligned, theirs left-aligned. */
.mu-table td.pl { text-align: right; } .mu-table td.pr { text-align: left; }
.mu-table td.pp { font-variant-numeric: tabular-nums; text-align: right; }
.mu-table td.pp.l { text-align: left; }
.mu-table td.pp .pj { color: var(--muted); font-size: 12px; }
.mu-table td.mpos { text-align: center; padding-left: 0; padding-right: 0; background: var(--panel-2); }
.mu-table tr.grp td { border-top: 2px solid var(--line); }
.mu-table tr.tot td { font-weight: 700; background: var(--panel-2); }
/* The lineup is marked in green so starters stand out. */
.mu-table tr.st td.pl.has { box-shadow: inset 3px 0 0 var(--good); }   /* green; blue (pulsing) while his game is on */
.mu-table tr.st td.pr.has { box-shadow: inset -3px 0 0 var(--good); }
/* A starter whose game is in progress: the edge turns blue and slowly pulses. */
.mu-table tr.st td.pl.has.ingame { animation: edgepulse-l 2.4s ease-in-out infinite; }
.mu-table tr.st td.pr.has.ingame { animation: edgepulse-r 2.4s ease-in-out infinite; }
.mu-table tr.st td.pl.has.ingame { box-shadow: inset 3px 0 0 var(--accent); }
.mu-table tr.st td.pr.has.ingame { box-shadow: inset -3px 0 0 var(--accent); }
@keyframes edgepulse-l { 50% { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 20%, transparent); } }
@keyframes edgepulse-r { 50% { box-shadow: inset -3px 0 0 color-mix(in srgb, var(--accent) 20%, transparent); } }
@media (prefers-reduced-motion: reduce) { .mu-table tr.st td.has.ingame { animation: none; } }
/* The totals row, and IR / taxi, start their own groups. */
.mu-table tr.tot td { border-bottom: 2px solid var(--line); }
.mu-table tr.res.grp td { border-top: 2px dashed var(--line); }
.mu-lpop .lgd-st { color: var(--good); font-weight: 700; border-left: 3px solid var(--good); padding-left: 5px; }
.mu-lpop .lgd-live { color: var(--accent); font-weight: 700; border-left: 3px solid var(--accent); padding-left: 5px; }
.mu-table tr.bench td.pl, .mu-table tr.bench td.pr { opacity: .55; }
.mu-table .bn { opacity: .55; }
/* The opponent picker, inside the opponent's card. */
.mu-team select.mu-teamsel { font: inherit; font-weight: 700; font-size: 15px; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; max-width: 100%; cursor: pointer; }
.mu-team select.mu-teamsel:hover { border-color: var(--accent); }
.mu-table .tag { font-size: 10px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin: 0 4px; }
.mu-table .tag.ir, .mu-table .tag.taxi { color: var(--warn); border-color: var(--warn); }
.mu-table button.link { background: none; border: 0; padding: 0; color: inherit; font-weight: 600; }
.mu-table button.link:hover { text-decoration: underline; }
.mu-table .nfl { color: var(--faint); font-size: 11.5px; margin: 0 4px; }
.mu-table td .better { color: var(--good); }
.mu-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.mu-card { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; }
.mu-card:hover { border-color: var(--faint); }
.mu-card.mine { border-color: var(--accent); }
.mu-card .row { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
.mu-card .row .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-card .row .s { font-weight: 700; font-variant-numeric: tabular-nums; }
.mu-card .row .p { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; width: 64px; text-align: right; }
.mu-card .row.win .s { color: var(--good); }
@media (max-width: 640px) { .mu-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .mu-team { min-width: 0; } .mu-teamsel { max-width: 100%; min-width: 0; } .mu-vs { display: none; } .mu-table .nfl { display: none; } }
/* Suggestions tab */
.sg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0 4px; }
.sg-bar h2 { font-size: 16px; margin: 0 6px 0 0; }
.sg-how { color: var(--muted); font-size: 12.5px; margin: 4px 0 12px; }
.sg-how .sg-green { color: var(--good); font-weight: 700; }   /* same as a winning cell (.sg-table td.better) */
.sg-table th[title] { cursor: help; text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }
.tmsnp { color: var(--muted); font-size: 11px; }
.sg-msg { color: var(--muted); padding: 24px 4px; }
.sg-pos { margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sg-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.sg-table { width: 100%; border-collapse: collapse; }
.sg-table th, .sg-table td { padding: 4px 8px; font-size: 12.5px; text-align: right; white-space: nowrap; border-bottom: 0; }
.sg-table th { position: static; background: none; color: var(--faint); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; cursor: default; }
.sg-table td.who, .sg-table th.who { text-align: left; width: 99%; }
.sg-table tr.add td.who b { color: var(--good); }
.sg-table tr.drop td.who b { color: var(--bad); }
.sg-table .act { display: inline-block; min-width: 40px; font-size: 10px; font-weight: 800; letter-spacing: .05em; border-radius: 4px; padding: 1px 5px; margin-right: 6px; text-align: center; }
.sg-table tr.add .act { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.sg-table tr.drop .act { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.sg-table td.better { color: var(--good); font-weight: 700; }
.sg-table .score { font-weight: 800; }
.sg-table button.link { background: none; border: 0; padding: 0; color: inherit; font: inherit; }
.sg-table button.link:hover { text-decoration: underline; }
.sg-why { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sg-why span { font-size: 11.5px; background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--muted); }
.sg-why span.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
/* Chips that are part of the score explain how on hover. */
.sg-why span.sf { cursor: help; text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }
.sg-none { color: var(--faint); font-size: 12.5px; padding: 2px 2px 8px; }
.sg-warn { color: var(--warn); font-size: 12px; }
/* Hover "lineup": the best lineup by score. */
.sg-lw { position: relative; text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.sg-linepop { display: none; position: absolute; top: calc(100% + 8px); left: -20px; z-index: 25; width: 320px; max-height: 70vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.45); padding: 10px 12px; cursor: default; }
.sg-lw:hover .sg-linepop { display: block; }
.sg-linepop table { width: 100%; border-collapse: collapse; }
.sg-linepop td { padding: 3px 4px; font-size: 12.5px; color: var(--text); border: 0; text-align: left; white-space: nowrap; }
.sg-linepop td.sl { color: var(--muted); font-size: 11px; font-weight: 700; width: 1%; }
.sg-linepop td.sc { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.sg-lp-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; display: flex; justify-content: space-between; }
.sg-lp-h.b { margin-top: 8px; }
.sg-lp-h span { text-transform: none; letter-spacing: 0; color: var(--text); }
.sg-lp-n { color: var(--faint); font-size: 11.5px; margin-top: 6px; white-space: normal; }
.sg-head { font-size: 12.5px; color: var(--good); margin: 0 0 4px 2px; }
.sg-head b { color: var(--text); }
.sg-bar .toggle select { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; color: var(--text); }
details.sg-cfg { margin: 6px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
details.sg-cfg > summary { cursor: pointer; padding: 8px 12px; font-weight: 700; color: var(--muted); }
.sg-cfg-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 6px 24px; padding: 2px 14px 12px; }
.sg-w { display: grid; grid-template-columns: 1fr 140px 28px; align-items: center; gap: 10px; font-size: 13px; }
.sg-w input { accent-color: var(--accent); width: 100%; }
.sg-w b { text-align: right; font-variant-numeric: tabular-nums; }
.sg-w.off span { color: var(--faint); }
.sg-cfg-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 12px; margin-top: 4px; }

/* NFL tab (ported from the Colab notebook) */
/* News tab */
.nw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; }
.nw-subs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--panel); }
.nw-sub { background: none; border: 0; border-radius: 999px; padding: 5px 14px; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.nw-sub.on { background: var(--accent); color: #fff; }
.nw-meta { color: var(--muted); font-size: 12px; margin-left: auto; }
.nw-msg { color: var(--muted); padding: 24px 4px; }
#nw { max-width: 900px; }
.nw-day { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 6px; }
.nw-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.nw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; }
.nw-name { cursor: pointer; } .nw-name:hover { color: var(--accent); }
.nw-head .sub { color: var(--muted); font-size: 12px; }
.nw-lg { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.nw-src { margin-left: auto; color: var(--faint); font-size: 11px; white-space: nowrap; }
.nw-title { font-weight: 700; margin: 6px 0 2px; }
.nw-desc, .nw-an { margin: 4px 0; font-size: 13px; line-height: 1.45; color: var(--text); }
.nw-an { color: var(--muted); }
.nw-an b { color: var(--text); font-weight: 600; }
.nw-link { font-size: 12px; }
/* Breaking news */
.nbadge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.bk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 10px; }
.bk-item.new { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.bk-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 8px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); }
.bk-kind.k-signing, .bk-kind.k-claim, .bk-kind.k-starter { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.bk-kind.k-injury, .bk-kind.k-release { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.bk-kind.k-trade, .bk-kind.k-spike { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.bk-new { font-size: 10px; font-weight: 800; color: var(--accent); }
.bk-pls { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 4px; }
.bk-pl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; }
.bk-pl .sub { color: var(--muted); font-size: 12px; }
.bk-role { color: var(--muted); font-style: italic; font-size: 12px; }
.bk-free, .bk-mine, .bk-none { font-size: 11.5px; border-radius: 999px; padding: 0 8px; border: 1px solid var(--line); }
.bk-free { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); font-weight: 600; }
.bk-mine { color: var(--mine); border-color: color-mix(in srgb, var(--mine) 45%, var(--line)); }
.bk-none { color: var(--faint); }
/* Player popup news */
.pnews h3 .pn-count { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; text-transform: none; letter-spacing: 0; }
.pn-item { padding: 8px 12px; }
.pn-item .nw-head .nw-src { margin-left: 0; }
.pn-item .nw-title { margin-top: 2px; }
.nfl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; }
.nfl-bar label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.nfl-bar select { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--text); }
.nfl-bar .nfl-src { color: var(--faint); font-size: 12px; margin-left: auto; }
.nfl-msg { color: var(--muted); padding: 30px 4px; }
.nfl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.nfl-panel h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 6px; }
.hslider { margin: 0 0 10px; }
.hslider input { width: 100%; margin: 0; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: var(--line); }
.hslider input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 0; cursor: pointer; }
.hslider input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 0; cursor: pointer; }
.hslider .ticks { position: relative; height: 18px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.hslider .ticks span { position: absolute; left: calc(8px + (100% - 16px) * var(--i) / var(--n)); transform: translateX(-50%); white-space: nowrap; cursor: pointer; }
.hslider .ticks span.on { color: var(--text); font-weight: 700; }
.nfl-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.nfl-table th, .nfl-table td { text-align: center !important; vertical-align: middle; padding: 7px 8px; white-space: normal; font-size: 12.5px; line-height: 1.45; border-bottom: 1px solid var(--line); }
.nfl-table th { position: static; background: var(--panel-2); color: var(--text); font-size: 14px; font-weight: 700; text-transform: none; letter-spacing: 0; cursor: default; }
.nfl-table th small { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.nfl-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--text) 5%, transparent); }
.nfl-table td.epa { font-size: 11.5px; color: var(--muted); padding: 4px; }
/* The EPA grid inside a matchup cell. */
.epag { width: 100%; border-collapse: collapse; table-layout: fixed; }
.nfl-table .epag col.lbl { width: 30px; }
.nfl-table .epag th, .nfl-table .epag td { padding: 1px 3px; border: 0; background: none !important; font-size: 11.5px; white-space: nowrap; line-height: 1.4; }
.nfl-table .epag thead th { color: var(--faint); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
.nfl-table .epag tbody th { color: var(--muted); font-weight: 700; text-align: left !important; }
.nfl-table .epag td { color: var(--text); font-variant-numeric: tabular-nums; }
.nfl-table .epag .rk { display: block; color: var(--faint); font-size: 10px; line-height: 1.1; }
.nfl-table td.sum { color: var(--muted); }
.nfl-table col.c-sum { width: 17%; }
.nfl-table .w { color: var(--good); } .nfl-table .l { color: var(--bad); }
/* Against the spread: a lighter shade of the win/loss colors. */
.nfl-table .cv { color: color-mix(in srgb, var(--good) 55%, #fff); }
.nfl-table .nc { color: color-mix(in srgb, var(--bad) 55%, #fff); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .nfl-table .cv { color: color-mix(in srgb, var(--good) 70%, #fff); }
  :root:not([data-theme="dark"]) .nfl-table .nc { color: color-mix(in srgb, var(--bad) 70%, #fff); }
}
.nfl-table .nogame { color: var(--faint); }
/* Betting notes */
details.nfl-notes { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
details.nfl-notes > summary { cursor: pointer; padding: 8px 12px; font-weight: 700; color: var(--muted); }
.nfl-notes-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 24px; padding: 0 14px 10px; font-size: 13px; }
.nfl-notes-col > section + section { margin-top: 10px; }
.nfl-notes-body h4 { margin: 4px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.nfl-notes-body ul, .nfl-notes-body ol { margin: 0; padding-left: 18px; line-height: 1.55; }
.bt-public { color: #60a5fa; } .bt-vegas { color: #c084fc; } .bt-london { color: var(--warn); }
.bt { cursor: help; }
details.nfl-game { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
details.nfl-game > summary { cursor: pointer; padding: 10px 12px; font-weight: 700; }
details.nfl-game > .nfl-cols { padding: 0 10px 10px; }
.nfl-expand { display: flex; gap: 8px; margin-bottom: 10px; }
@media (max-width: 1100px) { .nfl-cols { grid-template-columns: 1fr; } }
.count { color: var(--faint); font-size: 12px; margin-left: auto; }

/* Table */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
th { position: sticky; top: 0; background: var(--panel-2); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 600; cursor: pointer; user-select: none; }
th.sorted { color: var(--text); }
th.sorted::after { content: " ▾"; } th.sorted.asc::after { content: " ▴"; }
th:first-child, td:first-child { text-align: left; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--panel-2); }
td.name b { font-weight: 600; }
.sub { color: var(--muted); font-size: 12px; }
.ptag { display: inline-block; min-width: 30px; text-align: center; font-size: 10px; font-weight: 700; border-radius: 4px;
  padding: 1px 4px; color: #fff; margin-right: 6px; vertical-align: 1px; }
.ptag:has(+ .ptag) { margin-right: 2px; }
.inj { display: inline-block; font-size: 10px; font-weight: 700; color: var(--bad); margin-left: 6px; }
.inj.Q { color: var(--warn); }
.up { color: var(--good); } .down { color: var(--bad); } .muted { color: var(--faint); }
.snaps span { display: inline-block; min-width: 24px; }
.snaps span:last-child { font-weight: 600; }
.avail { display: inline-flex; gap: 3px; align-items: center; }
.avail i { width: 10px; height: 10px; border-radius: 3px; background: var(--line); display: inline-block; }
.avail i.free { background: var(--good); }
.avail i.mine { background: #2f6fe0; }
.avail i.unknown { background: transparent; border: 1px dashed var(--faint); }
.avail { cursor: default; padding: 4px 2px; }
td.freein, th[data-col="avail"] { text-align: left; width: 1%; white-space: nowrap; padding-right: 4px; }
td.name, th[data-col="name"] { text-align: left; }
/* Hovering a row's Free-in dots: the same league chips as the player popup. */
.availpop { position: fixed; z-index: 15; display: flex; flex-wrap: wrap; gap: 6px; max-width: min(560px, calc(100vw - 24px));
  padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.45); pointer-events: none; }
.more { display: block; margin: 12px auto 24px; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* Drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9; }
/* The player popup: a centered dialog. Full screen on phones. */
aside.drawer { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border-radius: 14px;
  border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0,0,0,.5); background: var(--panel); z-index: 10;
  border-left: 1px solid var(--line); overflow-y: auto; box-shadow: -10px 0 40px rgba(0,0,0,.35); }
.dhead { position: sticky; top: 0; background: var(--panel); padding: 16px 16px 12px; border-bottom: 1px solid var(--line); z-index: 1; }
.dhead { padding-right: 150px !important; }
/* Back / forward through the players opened from this popup. */
.dhead .dnav { position: absolute; top: 12px; right: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dhead .dnav .cmpbtn { grid-column: 1 / -1; font-size: 12px; padding: 4px 8px; }
.dhead .dnav .cmpbtn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Compare: two panels side by side. */
body.comparing aside#drawer { left: calc(50% - 6px); transform: translate(-100%, -50%); width: min(860px, calc(50vw - 22px)); }
aside#drawer2 { left: calc(50% + 6px); transform: translate(0, -50%); width: min(860px, calc(50vw - 22px)); z-index: 10; }
aside#drawer2 .dhead { padding-right: 60px !important; }
.c-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.c-search { position: relative; flex: 1; min-width: 160px; max-width: 360px; }
.c-search input { width: 100%; font-size: 18px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; }
.c-sugg { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 6; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.45); max-height: 320px; overflow-y: auto; padding: 4px; }
.c-hit { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; border-radius: 6px; padding: 6px 8px; text-align: left; font-size: 13px; }
.c-hit:hover, .c-hit.on { background: var(--panel-2); }
.c-none { color: var(--muted); font-size: 13px; padding: 6px 8px; }
@media (max-width: 900px) {
  body.comparing aside#drawer { left: 0; transform: none; width: 100vw; }
  aside#drawer2 { left: 0; top: 0; transform: none; width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; z-index: 12; }
}
.dhead .dnav .btn { padding: 6px 10px; }
.dhead h2 { margin: 0; font-size: 20px; }
.dname { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.lgchips { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; justify-content: flex-end; }
/* League availability: free = green on green tint, taken = gray, yours = blue. */
/* League chip: row 1 "Platform | League", then one row per team holding him
   (two in an MFL two-copy league), or "Available". */
.lg { display: inline-flex; flex-direction: column; gap: 1px; font-size: 12px; font-weight: 600; border-radius: 10px;
  padding: 4px 10px; white-space: nowrap; border: 1px solid transparent; line-height: 1.3; }
.lg .lg2 { font-weight: 500; font-size: 11.5px; opacity: .92; }
/* ▾ on a league chip: pick any team in that league. */
.caret { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; cursor: pointer;
  font-size: 12px; line-height: 1; color: inherit; opacity: .75; flex: none; }
.caret:hover { opacity: 1; background: color-mix(in srgb, currentColor 18%, transparent); }
.lgc .caret { margin-left: auto; }
.lg.pick { position: relative; padding-right: 28px; }
.lg.pick .caret { position: absolute; top: 3px; right: 4px; }
.lgc .lc2.other { color: var(--accent); font-style: italic; }
.teammenu { position: fixed; z-index: 30; min-width: 220px; max-width: min(320px, calc(100vw - 24px)); max-height: min(60vh, 460px);
  overflow-y: auto; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.teammenu .tm-h { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 4px 8px 6px; }
.teammenu .tm-i { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0;
  border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.teammenu .tm-i:hover { background: var(--panel-2); }
.teammenu .tm-i.on { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.teammenu .tm-i .rp-n { margin-left: auto; color: var(--muted); font-size: 12px; }
.teammenu .tm-msg { color: var(--muted); font-size: 13px; padding: 6px 8px; }
.sideroster .rp-back { background: none; border: 0; padding: 0; color: var(--accent); font-size: 12px; margin-left: 8px; }
/* Opponent and BYE centered in the player popup's weekly table. */
.stats td:nth-child(2), .stats th:nth-child(2) { text-align: center; }
/* The board's pick-a-number column: data type + timeframe in its header. */
th.mhead { padding-top: 4px; padding-bottom: 4px; }
th.mhead select { display: block; width: 100%; }
th.mhead select + select { margin: 3px 0 0 !important; }
:is(th[data-col="metric"], th.mhead) select { font: inherit; font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; }
th[data-col="metric"] select + select { margin-left: 4px; }
th[data-col="metric"] { cursor: default; }
th[data-col="metric"].sorted::after { content: ""; }
.lg.free { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.lg.taken { background: #5b616e; color: #fff; }
.lg.mine { background: #2f6fe0; color: #fff; }
.lg.unknown { color: var(--muted); border: 1px dashed var(--faint); }
.bioline { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.6; }
.bioline .sep { color: var(--faint); margin: 0 2px; }
.bioline .bit { white-space: nowrap; }
.dhead .x { position: absolute; top: 12px; right: 12px; }
.dbody { padding: 16px; }
.dbody h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 20px 0 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.tilegroup { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.tilegroup .tg { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tilegroup .tiles { grid-template-columns: repeat(3, 1fr); }
.tile .l small { color: var(--faint); }
/* Ownership row: Redraft (3) | Dynasty (3) | Adds (1), side by side. */
.ownrow { display: grid; grid-template-columns: 3fr 3fr 1fr; gap: 12px; margin-bottom: 12px; }
.ownrow.scoring { grid-template-columns: 2fr 5fr; }
.og .tg { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  margin: 0 0 6px 2px; }
.og .tiles { display: grid; gap: 6px; }
.og .tiles.n3 { grid-template-columns: repeat(3, 1fr); }
.og .tiles.n2 { grid-template-columns: repeat(2, 1fr); }
.og .tiles.n1 { grid-template-columns: 1fr; }
.og .tile { padding: 7px 9px; }
.og .tile .v { font-size: 17px; }
/* Games table: alternate row shading so a row is easy to follow across. */
.stats tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--text) 9%, transparent); }
.stats tbody tr.tot td { background: var(--panel-2); }
.stats tr.future td { color: var(--muted); }
.stats td.pp { font-variant-numeric: tabular-nums; }
th.grp { text-align: center !important; cursor: default; border-bottom: 1px solid var(--line); }
th.ctr, td.ctr { text-align: center; }
.admin h3 { margin-top: 0; }
.admin section + section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.admin .row input[type=text], .admin .row input[type=password], .admin .row select { min-width: 0; }
.admin .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin input[type=text], .admin input[type=password], .admin select {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; }
/* The help box floats (position: absolute) instead of opening inline. Inline,
   it pushed the page down, which moved the ? out from under the mouse, which
   closed it, which moved the ? back under the mouse: an open/close loop. */
details.tip { display: inline-block; position: relative; vertical-align: middle; }
details.tip > summary { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px;
  border-radius: 50%; border: 1px solid var(--faint); color: var(--muted); font-size: 11px; font-weight: 700;
  cursor: pointer; list-style: none; vertical-align: 1px; margin-left: 4px; user-select: none; }
details.tip > summary::-webkit-details-marker { display: none; }
details.tip[open] > summary { background: var(--accent); border-color: var(--accent); color: #fff; }
.tipbox { position: absolute; top: calc(100% + 4px); left: -8px; z-index: 30; width: min(440px, calc(100vw - 24px));
  box-shadow: 0 12px 34px rgba(0,0,0,.45); text-transform: none; letter-spacing: normal; white-space: normal;
  display: block; margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--text); font-size: 12.5px; line-height: 1.5; font-weight: 400; }
.tipbox ol { margin: 4px 0; padding-left: 18px; }
.tipbox .note { color: var(--muted); margin-top: 6px; }
.tipbox code { font-size: 11.5px; }
.field .flabel { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.banner { background: color-mix(in srgb, var(--warn) 15%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  color: var(--text); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
/* A divider before each ownership group. */
th.grp.redraft, th.grp.dynasty, .gl { border-left: 1px solid var(--line); }
.tile { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; }
.tile .v { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 11px; color: var(--muted); }
.lrow { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.lrow:last-child { border-bottom: 0; }
.lcard { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 0; }
.lcard select, .lcard input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.tag { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 1px 8px; }
.tag.free { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.tag.mine { background: color-mix(in srgb, var(--mine) 20%, transparent); color: var(--mine); }
.tag.taken { color: var(--muted); }
.tag.unknown { color: var(--faint); }
.stats { font-size: 13px; }
.stats td, .stats th { padding: 5px 7px; }
.stats tr.tot td { font-weight: 650; background: var(--panel-2); }
.stats tr.dim td { color: var(--faint); }
.stats th { cursor: default; position: static; }
.depth { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dgroup { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; }
.dgroup b { font-size: 12px; color: var(--muted); }
.dgroup ol { margin: 4px 0 0; padding-left: 20px; }
.dgroup li { padding: 1px 0; }
.dgroup li.me { color: var(--accent); font-weight: 650; }
.dgroup button.link { background: none; border: 0; padding: 0; color: inherit; text-align: left; }
.dgroup button.link:hover { text-decoration: underline; }
.rankline { font-size: 15px; margin: 4px 0 10px; }
/* "Depth Chart" in the header line, and the chart it opens on hover or tap. */
.dclink { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px; }
.dclink:hover, .dclink[aria-expanded="true"] { text-decoration-style: solid; }
.depthpop { position: fixed; z-index: 12; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.5); padding: 12px 14px 14px; overflow-y: auto; }
.depthpop h3 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
svg.spark { width: 100%; height: auto; display: block; margin-bottom: 8px; }
/* The weekly table's column for the stat picked in Props. */
.stats th.hl, .stats td.hl { background: color-mix(in srgb, var(--accent) 22%, transparent) !important; }
.stats th.hl { color: var(--text); }
/* Props: pick a stat, a timeframe and a line; bars over / under the line. */
.props { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.props .pctl { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
/* Row 1: a chip per stat. Row 2: the stat amount and the average / total / over summary. */
.props .pstats { display: flex; flex-wrap: wrap; gap: 5px; }
.props .pchip { background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.props .pchip:hover { color: var(--text); border-color: var(--faint); }
.props .pchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.props .prow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.props label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.props select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; }
.props .pbtn { width: 28px; height: 28px; border-radius: 7px; border: 0; color: #fff; font-weight: 700; font-size: 15px; line-height: 1; }
.props .pbtn.minus { background: var(--bad); } .props .pbtn.plus { background: var(--good); }
.props .psum { font-size: 13px; color: var(--muted); }
.props .psum b { color: var(--text); font-weight: 600; }
.props .ptf { margin: 12px 0 4px; }
/* A fixed 16px thumb, so the labels below can sit exactly under each stop. */
.props .ptf input { width: 100%; margin: 0; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: var(--line); }
.props .ptf input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 0; cursor: pointer; }
.props .ptf input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 0; cursor: pointer; }
.props .ticks { position: relative; height: 18px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.props .ticks span { position: absolute; left: calc(8px + (100% - 16px) * var(--i) / 9); transform: translateX(-50%); white-space: nowrap; cursor: pointer; }
.props .ticks span.on { color: var(--text); font-weight: 700; }
.props svg.pchart { display: block; width: 100%; height: auto; margin: 8px auto 0; }
.props .pmsg { color: var(--muted); font-size: 13px; padding: 16px 0 6px; }

/* Settings */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 16px 0; }
.card h2 { font-size: 15px; margin: 0 0 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row input[type=text], .row input[type=password], .row select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.row input[type=text] { flex: 1; min-width: 220px; }
.status-ok { color: var(--good); } .status-bad { color: var(--bad); } .status-warn { color: var(--warn); }
.teams label { display: flex; gap: 8px; align-items: center; padding: 5px 0; }
.err { color: var(--bad); margin-top: 8px; }
.help { color: var(--muted); font-size: 13px; }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; width: min(340px, 100%); }
.login input { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; margin: 12px 0; }

@media (max-width: 640px) {
  .hide-sm { display: none; }
  /* Header: icon-only buttons on the title row. */
  .top { flex-wrap: nowrap; gap: 8px; }
  .top .btn .bl { display: none; }
  .top .btn { padding: 6px 10px; }
  .top .week { white-space: nowrap; font-size: 12px; }
  .top h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .admin .grid2 { grid-template-columns: 1fr; }
  aside.drawer { left: 0; top: 0; transform: none; width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; border: 0; }
  .tilegroup { grid-template-columns: 1fr; }
  .ownrow, .ownrow.scoring { grid-template-columns: 1fr; }
  .filters input[type=search] { width: 100%; }
  .filters select { flex: 1 1 40%; min-width: 0; }
  .top h1 { font-size: 16px; }
  .top .spacer { display: none; }
  th, td { padding: 7px 7px; }
}

/* Links styled as buttons (⚙ Admin, ← Dashboard) look like the other buttons. */
a.btn { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; }
.admin input[type=email] { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; }
.helprow { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: flex-start; }
.mu-lpop .lg-clock { color: var(--accent); font-weight: 700; }
