/* Fantasy Bums — shared styles */

:root {
  --paper: #f3f4f6;
  --surface: #ffffff;
  --sunk: #f5f6f8;
  --head: #eef0f3;
  --ink: #161b26;
  --ink-2: #485263;
  --ink-3: #6c7585;
  --line: #dfe2e8;
  --line-2: #eceef2;
  --brand: #0c2340;
  --brand-2: #16345c;
  --accent: #0b5fd6;
  --accent-ink: #ffffff;
  --win: #0e8048;
  --lose: #c52a30;
  --flag: #c52a30;
  --warn: #a86a00;
  --qb: #7140a8; --qb-bg: #f1eafa;
  --rb: #0e8048; --rb-bg: #e4f4ea;
  --wr: #0b5fd6; --wr-bg: #e5eefc;
  --te: #b75e0c; --te-bg: #fbeedf;
  --focus: #0b5fd6;
  --display: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --text: 'Barlow', system-ui, sans-serif;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1118; --surface: #151b25; --sunk: #19202b; --head: #1c2430; --ink: #e5e9f0; --ink-2: #aab3c2; --ink-3: #7f8a9b;
    --line: #273142; --line-2: #1f2836; --brand: #0a1628; --brand-2: #13243d; --accent: #5b9dff; --accent-ink: #0d1118;
    --win: #3fbf7a; --lose: #f06368; --flag: #f06368; --warn: #e0a640;
    --qb: #c4a6f0; --qb-bg: #2a2140; --rb: #6fd69c; --rb-bg: #16301f; --wr: #8fb8ff; --wr-bg: #17263f; --te: #f2b070; --te-bg: #36271a;
    --focus: #5b9dff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1118; --surface: #151b25; --sunk: #19202b; --head: #1c2430; --ink: #e5e9f0; --ink-2: #aab3c2; --ink-3: #7f8a9b;
  --line: #273142; --line-2: #1f2836; --brand: #0a1628; --brand-2: #13243d; --accent: #5b9dff; --accent-ink: #0d1118;
  --win: #3fbf7a; --lose: #f06368; --flag: #f06368; --warn: #e0a640;
  --qb: #c4a6f0; --qb-bg: #2a2140; --rb: #6fd69c; --rb-bg: #16301f; --wr: #8fb8ff; --wr-bg: #17263f; --te: #f2b070; --te-bg: #36271a;
  --focus: #5b9dff; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.45 var(--text); font-feature-settings: 'tnum' 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }

/* ---------- Header ---------- */
.topbar { background: var(--brand); color: #fff; }
.topbar .in { max-width: 1240px; margin: 0 auto; padding: 0 16px; height: 54px; display: flex; align-items: center; gap: 20px; }
.brand { color: #fff; font: 700 21px/1 var(--display); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { width: 20px; height: 24px; }
.brand b { font-weight: 700; color: #9cc3ff; }
.gsearch { margin-left: auto; width: min(340px, 45vw); }
.gsearch .input { background: var(--brand-2); border-color: #2a4a75; color: #fff; padding: 7px 12px; font-size: 14px; }
.gsearch .input::placeholder { color: #9fb2cc; }
.weekpill { font-size: 13px; color: #b9c8dc; white-space: nowrap; }
.subnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav { max-width: 1240px; margin: 0 auto; padding: 0 8px; display: flex; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 12px 12px 10px; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 720px) {
  .topbar .in { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 12px; }
  .gsearch { order: 3; width: 100%; margin: 0; }
  .weekpill { margin-left: auto; }
}

/* ---------- Page frame ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 20px 16px 56px; }
.pagehead { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; }
h1 { font: 700 28px/1.1 var(--display); margin: 0; letter-spacing: -.2px; }
h2 { font: 700 18px/1.2 var(--display); margin: 0 0 10px; }
h3 { font: 600 15px/1.3 var(--text); margin: 0 0 8px; }
.lede { font-size: 14px; color: var(--ink-3); margin: 4px 0 0; flex: 1 0 100%; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.section { margin-top: 20px; }

/* Modules: a bordered box with a title strip */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.panel > h2:first-child, .panel > .mh:first-child { margin: -14px -14px 12px; padding: 9px 14px; font: 700 15px/1.3 var(--display); background: var(--head); border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mh a { font: 600 13px/1 var(--text); }
.rowhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.rowhead h2 { margin: 0; }
.rowhead a { font-size: 13px; font-weight: 600; }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 12px; border-radius: var(--r); cursor: pointer; font-weight: 600; font-size: 14px; }
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; }
.input, select.input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 14px; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
label.f { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .input { max-width: 260px; }

/* ---------- Player bits ---------- */
.pos { display: inline-block; font: 700 10.5px/1 var(--text); padding: 3px 4px 2px; border-radius: 3px; letter-spacing: .3px; vertical-align: 1px; }
.pos.QB { color: var(--qb); background: var(--qb-bg); }
.pos.RB { color: var(--rb); background: var(--rb-bg); }
.pos.WR { color: var(--wr); background: var(--wr-bg); }
.pos.TE { color: var(--te); background: var(--te-bg); }
.inj { display: inline-block; font: 700 10.5px/1 var(--text); color: #fff; background: var(--flag); padding: 3px 4px 2px; border-radius: 3px; vertical-align: 1px; }
.inj[title^="Questionable"] { background: var(--warn); }
.head { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--sunk); border: 1px solid var(--line-2); flex: none; }
.head.sm { width: 26px; height: 26px; }
.head.lg { width: 104px; height: 104px; }
.who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.who .nm { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who a.nm:hover { color: var(--accent); }
.who .sub { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.logo { width: 16px; height: 16px; object-fit: contain; display: inline-block; vertical-align: -3px; }
.num { font: 700 24px/1 var(--display); }
.up { color: var(--win); } .down { color: var(--lose); }

/* ---------- Search dropdown ---------- */
.search { position: relative; }
.search .menu { position: absolute; left: 0; right: 0; top: calc(100% + 3px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px #00000024; z-index: 40; max-height: 360px; overflow: auto; display: none; min-width: 280px; }
.search .menu.open { display: block; }
.search .opt { display: flex; align-items: center; gap: 10px; padding: 7px 10px; cursor: pointer; font-size: 14px; }
.search .opt[aria-selected="true"], .search .opt:hover { background: var(--sunk); }
.search .opt .v { margin-left: auto; font: 700 16px/1 var(--display); }

/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.panel > .tablewrap { border: 0; margin: 0 -14px -14px; border-radius: 0 0 var(--r) var(--r); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-2); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--head); position: sticky; top: 0; }
.t th.r { text-align: right; }
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable:hover { color: var(--ink); }
.t th[aria-sort] { color: var(--ink); }
.t th[aria-sort="descending"]::after { content: ' \25BE'; } .t th[aria-sort="ascending"]::after { content: ' \25B4'; }
.t td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t .r { text-align: right; }
.t .c, .t th.c { text-align: center; }
.t .rk { color: var(--ink-3); width: 1%; text-align: right; }
.t td.valc { font-weight: 700; text-align: right; font-size: 15px; }
.t tr.tier td { background: var(--sunk); font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 4px 10px; border-bottom: 1px solid var(--line); }
.t tbody tr:not(.tier):hover td { background: var(--sunk); }

/* ---------- News ---------- */
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.news li:first-child { padding-top: 0; }
.news li:last-child { border-bottom: 0; padding-bottom: 0; }
.news .when { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.news .when b { color: var(--ink-2); font-weight: 700; margin-right: 6px; }
.news a.hl { font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--ink); }
.news a.hl:hover { color: var(--accent); }
.news p { margin: 3px 0 0; color: var(--ink-2); font-size: 14px; max-width: 80ch; }
.news .tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.ptag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px 2px 3px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); font-size: 12px; font-weight: 600; }
.ptag:hover { border-color: var(--accent); text-decoration: none; }
.ptag .v { color: var(--ink-3); font-weight: 500; }

/* ---------- Side lists ---------- */
.mini { list-style: none; margin: 0; padding: 0; }
.mini li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.mini li:first-child { padding-top: 0; }
.mini li:last-child { border-bottom: 0; padding-bottom: 0; }
.mini .end { margin-left: auto; text-align: right; font-size: 13px; line-height: 1.3; }

/* ---------- Trade balance meter ---------- */
.meter { display: flex; height: 12px; border-radius: 2px; overflow: hidden; background: var(--line); }
.meter span { display: block; height: 100%; transition: width .3s ease; }
.meter .g { background: var(--ink-3); } .meter .r { background: var(--accent); }
.meterlbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.verdict { font: 700 26px/1.1 var(--display); margin: 0 0 4px; }
.verdict.win { color: var(--win); } .verdict.lose { color: var(--lose); }

/* ---------- Status ---------- */
.notice { padding: 10px 12px; border-radius: var(--r); background: var(--sunk); color: var(--ink-2); font-size: 14px; border: 1px solid var(--line); }
.notice.err { background: color-mix(in srgb, var(--flag) 8%, var(--surface)); color: var(--ink); border-color: color-mix(in srgb, var(--flag) 35%, var(--line)); }
.skel { color: var(--ink-3); padding: 14px 0; }

footer.site { border-top: 1px solid var(--line); background: var(--surface); }
footer.site .in { max-width: 1240px; margin: 0 auto; padding: 18px 16px 32px; font-size: 12px; color: var(--ink-3); display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
footer.site button { background: none; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 9px; cursor: pointer; color: var(--ink-2); font-size: 12px; }

@media (prefers-reduced-motion: reduce) { .meter span { transition: none; } }

/* ---------- Matchup badges (1 = easiest, 32 = toughest) ---------- */
.mu { display: inline-block; min-width: 22px; padding: 2px 4px 1px; border-radius: 3px; font: 700 11px/1.2 var(--text); text-align: center; vertical-align: 1px; }
.mu1, .cell.mu1 { background: color-mix(in srgb, var(--win) 26%, var(--surface)); color: color-mix(in srgb, var(--win) 75%, var(--ink)); }
.mu2, .cell.mu2 { background: color-mix(in srgb, var(--win) 11%, var(--surface)); color: var(--ink-2); }
.mu3, .cell.mu3 { background: color-mix(in srgb, var(--lose) 11%, var(--surface)); color: var(--ink-2); }
.mu4, .cell.mu4 { background: color-mix(in srgb, var(--lose) 24%, var(--surface)); color: color-mix(in srgb, var(--lose) 75%, var(--ink)); }
.mukey { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }

/* ---------- Format switcher ---------- */
.fmtwrap { position: relative; }
.fmtbtn { background: var(--brand-2); color: #fff; border: 1px solid #2a4a75; border-radius: var(--r); padding: 6px 10px; font: 600 13px/1 var(--text); cursor: pointer; white-space: nowrap; }
.fmtbtn::after { content: ' \25BE'; color: #9fb2cc; }
.fmtbtn:hover { border-color: #9cc3ff; }
.fmtpop { position: absolute; right: 0; top: calc(100% + 6px); width: 250px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px #0000002e; padding: 4px 14px 14px; z-index: 60; }
.fmtpop label.f { display: block; }
.fmtpop select { margin-top: 4px; }
@media (max-width: 720px) { .fmtwrap { order: 2; } .fmtpop { right: auto; left: -120px; } .weekpill { display: none; } }

/* ---------- Value change ---------- */
.chg { font-weight: 700; font-size: 12px; }
.chg.up { color: var(--win); } .chg.down { color: var(--lose); } .chg.flat { color: var(--ink-3); font-weight: 500; }
.chg.up::before { content: '\25B2 '; font-size: 9px; } .chg.down::before { content: '\25BC '; font-size: 9px; }
.spark { display: inline-block; vertical-align: middle; }

/* ---------- Phone tab bar ---------- */
.tabbar, .sheet { display: none; }
@media (max-width: 720px) {
  .subnav { display: none; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px #0000000d; }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 9px 0 8px; color: var(--ink-3); font: 600 12px/1 var(--text); background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; position: relative; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar [aria-current="page"], .tabbar button.here, .tabbar button[aria-expanded="true"] { color: var(--accent); }
  .tabbar.more-open [aria-current="page"] { color: var(--ink-3); }
  .sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 49; background: #0007; }
  .sheet-in { position: absolute; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); overflow-y: auto; background: var(--surface); border-radius: 14px 14px 0 0; padding: 8px 0; box-shadow: 0 -6px 24px #0003; }
  .sheet-in a { display: block; padding: 15px 20px; color: var(--ink); font-size: 16px; font-weight: 600; border-bottom: 1px solid var(--line-2); }
  .sheet-in a:hover { text-decoration: none; }
  .sheet-in a[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
  main { padding-top: 14px; }
  h1 { font-size: 24px; }
  .t td, .t th { padding-left: 8px; padding-right: 8px; }
}

/* ---------- Loading placeholders ---------- */
.skel { color: transparent !important; position: relative; min-height: 72px; border-radius: var(--r);
  background: linear-gradient(90deg, var(--sunk) 25%, var(--line-2) 40%, var(--sunk) 55%); background-size: 300% 100%; animation: shimmer 1.3s ease-in-out infinite; }
td.skel { height: 120px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ---------- Stat cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-width: 0; }
.card .k { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.card .v { font: 700 28px/1.1 var(--display); margin-top: 4px; }
.card .s { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.card a.more { font-size: 13px; font-weight: 600; display: inline-block; margin-top: 6px; }

/* ---------- Pro, ads and offers ---------- */
.lockbox { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px dashed var(--line); border-radius: var(--r); background: var(--sunk); font-size: 14px; }
.lockbox svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 1.8; }
.probtn { background: #f5b301; color: #1d1600; font: 700 13px/1 var(--text); padding: 7px 12px; border-radius: var(--r); white-space: nowrap; }
.probtn:hover { text-decoration: none; filter: brightness(1.05); }
.adslot, .offer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.adlbl { font-size: 11px; color: var(--ink-3); margin-bottom: 6px; }
.offer .tiny { font-size: 11px; color: var(--ink-3); margin: 8px 0 0; }
.flinks { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.flinks a { color: var(--ink-3); }

/* ---------- Injury fill-ins ---------- */
.ih-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.ih-row:first-of-type { padding-top: 0; }
.ih-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ih-fill { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.ih-fill .end { margin-left: auto; text-align: right; font-size: 12px; line-height: 1.4; }
@media (max-width: 640px) { .ih-row { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Install button ---------- */
.sheet-in .installbtn { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 14px 20px; font: 600 15px/1 var(--text); color: var(--accent); cursor: pointer; border-top: 1px solid var(--line-2); }
footer.site .installbtn.linkish { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 0 4px; cursor: pointer; font-size: 12px; }

/* ---------- account button ---------- */
.acctbtn { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font: 600 13px/1 var(--text); padding: 6px 10px; border: 1px solid #2a4a75; border-radius: var(--r); white-space: nowrap; }
.acctbtn:hover { background: var(--brand-2); }
.acct-av { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #9cc3ff; color: #0c2340; font-size: 11px; font-weight: 700; }
.acct-ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; display: none; }
@media (max-width: 720px) { .acctbtn { order: 2; padding: 5px 7px; } .acctbtn .acct-tx { display: none; } .acct-ic { display: block; } }

.setbtn { display: inline-grid; place-items: center; width: 32px; height: 30px; border: 1px solid #2a4a75; border-radius: var(--r); color: #c9d6ea; }
.setbtn:hover, .setbtn[aria-current] { background: var(--brand-2); color: #fff; }
.setbtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 720px) { .setbtn { display: none; } }

/* ---------- chart tooltips ---------- */
.ctip { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; background: var(--ink); color: var(--surface); font: 500 12.5px/1.45 var(--text); padding: 7px 10px; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.22); opacity: 0; transition: opacity .12s; max-width: 260px; }
.ctip.on { opacity: 1; }
.ctip b { font-weight: 700; } .ctip .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.ctip .row { display: flex; justify-content: space-between; gap: 14px; }
svg .hcol { cursor: crosshair; }
svg circle.hot { r: 6; stroke-width: 3; }
svg rect.hot { opacity: .8; }
svg circle.hot[style*="opacity:0"] { opacity: 1 !important; }

/* ---------- Live tab: blinks while games are on ---------- */
.ldot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e5383b; margin-left: 6px; vertical-align: 1px; box-shadow: 0 0 0 0 #e5383b99; animation: ldot 1.4s ease-out infinite; }
@keyframes ldot { 0% { box-shadow: 0 0 0 0 #e5383b99; opacity: 1; } 50% { opacity: .45; } 70% { box-shadow: 0 0 0 7px #e5383b00; } 100% { box-shadow: 0 0 0 0 #e5383b00; opacity: 1; } }
.tabbar .ldot { position: absolute; top: 9px; left: calc(50% + 9px); margin: 0; width: 9px; height: 9px; border: 2px solid var(--surface); box-sizing: content-box; }
.tabbar a.islive:not([aria-current="page"]) { color: #e5383b; }
.tabbar a.islive svg { animation: lblink 1.4s ease-in-out infinite; }
@keyframes lblink { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .ldot, .tabbar a.islive svg { animation: none; } }

/* ---------- iPhone home-screen app: keep the page out from under the status bar ---------- */
body { padding-top: env(safe-area-inset-top); }
body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--brand); z-index: 100; pointer-events: none; }

/* ---------- phone alerts control ---------- */
.alrow { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.alrow > span { flex: 1; min-width: 0; }
.alrow .bell { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 480px) { .alrow { flex-wrap: wrap; } .alrow .btn { width: 100%; } }

/* custom icons */
.ic { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; flex: none; }
.rxi { width: 20px; height: 20px; display: block; flex: none; }
/* NFL / NBA switch: big text tabs with drawn ball icons */
.sportsw { display: flex !important; gap: 22px; border: 0 !important; background: none !important; box-shadow: none !important; }
.sportsw a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0 !important; font: 800 22px/1 var(--display); color: var(--ink-3) !important; background: none !important; border: 0 !important; }
.sportsw a .ic { width: 20px; height: 20px; stroke-width: 1.8; }
.sportsw a[aria-pressed="true"] { color: var(--accent) !important; }
.sportsw a:hover { text-decoration: none; }
/* iPhone zooms the whole page into any text box with letters under 16px: keep them at 16px on touch screens */
@media (pointer: coarse) { input, select, textarea, .input { font-size: 16px !important; } }

/* touchdown celebration (FX.td) */
.tdhit { position: relative; animation: tdglow 2.4s ease-out; z-index: 1; }
@keyframes tdglow {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); background-color: transparent; }
  12% { box-shadow: 0 0 0 3px rgba(34, 197, 94, .9), 0 0 34px 6px rgba(34, 197, 94, .45); background-color: color-mix(in srgb, #22c55e 16%, transparent); }
  70% { box-shadow: 0 0 0 2px rgba(34, 197, 94, .5), 0 0 18px 2px rgba(34, 197, 94, .2); background-color: color-mix(in srgb, #22c55e 8%, transparent); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); background-color: transparent; }
}
.tdfx { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 3; container-type: size; }
.tdsweep { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.tdsweep::before { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 60%; background: linear-gradient(100deg, transparent, rgba(74, 222, 128, .55), rgba(255, 255, 255, .5), rgba(74, 222, 128, .55), transparent); animation: tdsweep .9s ease-out .05s both; }
@keyframes tdsweep { to { left: 110%; } }
.tdword { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.tdword span { font: 900 min(38px, 9.5cqw, 55cqh)/1 var(--display); white-space: nowrap; letter-spacing: .08em; color: #fff; background: linear-gradient(135deg, #16a34a, #22c55e 55%, #84cc16); padding: .2em .55em .15em; border-radius: 10px; box-shadow: 0 8px 24px rgba(22, 163, 74, .45); transform: skewX(-8deg); animation: tdword 2.3s cubic-bezier(.2, .9, .2, 1) both; }
.tdbig .tdword span { font-size: min(48px, 10cqw, 60cqh); }
@keyframes tdword {
  0% { opacity: 0; transform: skewX(-8deg) scale(.4); }
  14% { opacity: 1; transform: skewX(-8deg) scale(1.12); }
  22% { transform: skewX(-8deg) scale(1); }
  78% { opacity: 1; transform: skewX(-8deg) scale(1); }
  100% { opacity: 0; transform: skewX(-8deg) scale(.96) translateY(-8px); }
}
.tdbits { position: absolute; left: 50%; top: 50%; }
.tdbits i { position: absolute; width: 7px; height: 11px; border-radius: 2px; opacity: 0; animation: tdbit 1.3s cubic-bezier(.15, .7, .3, 1) var(--d) both; }
@keyframes tdbit {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 40px)) rotate(var(--r)); }
}
@media (prefers-reduced-motion: reduce) { .tdhit { animation: none; background-color: color-mix(in srgb, #22c55e 10%, transparent); } .tdword span { animation: none; } .tdsweep::before { display: none; } }
tr.tdhit { animation: none; }
tr.tdhit > td { animation: tdrow 2.4s ease-out; }
@keyframes tdrow { 12% { background-color: color-mix(in srgb, #22c55e 22%, var(--surface)); } 70% { background-color: color-mix(in srgb, #22c55e 10%, var(--surface)); } }
.backwrap { max-width: 1240px; margin: 0 auto; padding: 12px 16px 0; }
.backwrap + main { padding-top: 6px; }
.backbtn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent); font: 700 15px/1 var(--text); padding: 6px 8px 6px 0; cursor: pointer; }
.backbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* sport tabs on Live: pulse when that sport has a game on */
.sportsw a.islive { position: relative; animation: sportlive 1.6s ease-in-out infinite; }
.sportsw a.islive::after { content: ''; position: absolute; top: 3px; left: 14px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: livedot 1.6s ease-out infinite; }
@keyframes sportlive { 50% { opacity: .45; } }
@keyframes livedot { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .7); } 70%, 100% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } }

@media (prefers-reduced-motion: reduce) { .sportsw a.islive, .sportsw a.islive::after { animation: none; } }

/* app colors (Settings > Appearance). Blue is the default and needs nothing here */
:root[data-color="purple"] { --accent: #7c3aed; --focus: #7c3aed; --brand: #2e1065; --brand-2: #3f1a85; }
@media (prefers-color-scheme: dark) { :root[data-color="purple"]:not([data-theme="light"]) { --accent: #a78bfa; --focus: #a78bfa; --brand: #1c0b3a; --brand-2: #2a1452; --accent-ink: #120726; } }
:root[data-theme="dark"][data-color="purple"] { --accent: #a78bfa; --focus: #a78bfa; --brand: #1c0b3a; --brand-2: #2a1452; --accent-ink: #120726; }
:root[data-color="green"] { --accent: #15803d; --focus: #15803d; --brand: #052e16; --brand-2: #0b4223; }
@media (prefers-color-scheme: dark) { :root[data-color="green"]:not([data-theme="light"]) { --accent: #4ade80; --focus: #4ade80; --brand: #04200f; --brand-2: #08321a; --accent-ink: #03170b; } }
:root[data-theme="dark"][data-color="green"] { --accent: #4ade80; --focus: #4ade80; --brand: #04200f; --brand-2: #08321a; --accent-ink: #03170b; }
:root[data-color="red"] { --accent: #c81e1e; --focus: #c81e1e; --brand: #3b0a0a; --brand-2: #561313; }
@media (prefers-color-scheme: dark) { :root[data-color="red"]:not([data-theme="light"]) { --accent: #f87171; --focus: #f87171; --brand: #2a0707; --brand-2: #3f0d0d; --accent-ink: #1f0505; } }
:root[data-theme="dark"][data-color="red"] { --accent: #f87171; --focus: #f87171; --brand: #2a0707; --brand-2: #3f0d0d; --accent-ink: #1f0505; }
:root[data-color="orange"] { --accent: #c2410c; --focus: #c2410c; --brand: #3a1405; --brand-2: #552009; }
@media (prefers-color-scheme: dark) { :root[data-color="orange"]:not([data-theme="light"]) { --accent: #fb923c; --focus: #fb923c; --brand: #2a0f04; --brand-2: #3e1807; --accent-ink: #1e0b02; } }
:root[data-theme="dark"][data-color="orange"] { --accent: #fb923c; --focus: #fb923c; --brand: #2a0f04; --brand-2: #3e1807; --accent-ink: #1e0b02; }
:root[data-color="teal"] { --accent: #0f766e; --focus: #0f766e; --brand: #042f2e; --brand-2: #074643; }
@media (prefers-color-scheme: dark) { :root[data-color="teal"]:not([data-theme="light"]) { --accent: #2dd4bf; --focus: #2dd4bf; --brand: #032221; --brand-2: #063431; --accent-ink: #021817; } }
:root[data-theme="dark"][data-color="teal"] { --accent: #2dd4bf; --focus: #2dd4bf; --brand: #032221; --brand-2: #063431; --accent-ink: #021817; }
:root[data-color="pink"] { --accent: #be185d; --focus: #be185d; --brand: #3b0a24; --brand-2: #561234; }
@media (prefers-color-scheme: dark) { :root[data-color="pink"]:not([data-theme="light"]) { --accent: #f472b6; --focus: #f472b6; --brand: #2a0619; --brand-2: #3f0b26; --accent-ink: #1f0412; } }
:root[data-theme="dark"][data-color="pink"] { --accent: #f472b6; --focus: #f472b6; --brand: #2a0619; --brand-2: #3f0b26; --accent-ink: #1f0412; }
:root[data-color="gold"] { --accent: #a16207; --focus: #a16207; --brand: #2b2107; --brand-2: #40310b; }
@media (prefers-color-scheme: dark) { :root[data-color="gold"]:not([data-theme="light"]) { --accent: #facc15; --focus: #facc15; --brand: #1f1805; --brand-2: #302508; --accent-ink: #1a1405; } }
:root[data-theme="dark"][data-color="gold"] { --accent: #facc15; --focus: #facc15; --brand: #1f1805; --brand-2: #302508; --accent-ink: #1a1405; }
.pickteam { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.pickteam .btn { justify-content: flex-start; text-align: left; height: auto; padding: 10px 12px; white-space: normal; flex-direction: column; align-items: flex-start; }
/* favorite teams */
:root { --fav: #e0a100; }
.gcard.isfav, .gchip.isfav, .lncard.isfav { position: relative; }
.gcard.isfav::after, .gchip.isfav::after, .lncard.isfav::after { content: '★'; position: absolute; top: 5px; right: 7px; font-size: 13px; line-height: 1; color: var(--fav); pointer-events: none; }
.favbtn { flex: none; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 11px; font: 600 13px var(--text); cursor: pointer; }
.favbtn .ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.favbtn[aria-pressed="true"] { color: var(--fav); border-color: color-mix(in srgb, var(--fav) 50%, var(--line)); background: color-mix(in srgb, var(--fav) 10%, var(--surface)); }
.favbtn[aria-pressed="true"] .ic { fill: currentColor; }
.favbtn.pop .ic { animation: favpop .45s ease-out; }
@keyframes favpop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .favbtn.pop .ic { animation: none; } }
.favgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.favgrid button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; font: 600 11.5px var(--text); color: var(--ink-2); cursor: pointer; position: relative; }
.favgrid button img { width: 30px; height: 30px; object-fit: contain; }
.favgrid button[aria-pressed="true"] { border-color: var(--fav); background: color-mix(in srgb, var(--fav) 10%, var(--surface)); color: var(--ink); }
.favgrid button[aria-pressed="true"]::after { content: '★'; position: absolute; top: 3px; right: 5px; font-size: 11px; color: var(--fav); }

/* ---------- header: follows the app color you picked, in light and dark ---------- */
.topbar {
  --hdr-hi: color-mix(in srgb, var(--accent) 45%, #fff);   /* the bright touches: logo, "Bums", your initial */
  --hdr-line: color-mix(in srgb, #fff 13%, transparent);
  --hdr-fill: color-mix(in srgb, #fff 7%, transparent);
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 82%, var(--accent)));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.brand svg { color: var(--hdr-hi); }
.brand b { color: var(--hdr-hi); }
.fmtbtn, .acctbtn, .setbtn { background: var(--hdr-fill); border: 1px solid var(--hdr-line); color: #fff; border-radius: 999px; height: 34px; transition: background .15s, border-color .15s; }
.fmtbtn { padding: 0 13px; display: inline-flex; align-items: center; gap: 4px; }
.fmtbtn::after { color: color-mix(in srgb, #fff 60%, transparent); font-size: 11px; }
.acctbtn { padding: 0 12px 0 5px; }
.setbtn { width: 34px; }
.fmtbtn:hover, .acctbtn:hover, .setbtn:hover, .setbtn[aria-current], .fmtbtn[aria-expanded="true"] { background: color-mix(in srgb, #fff 13%, transparent); border-color: color-mix(in srgb, var(--hdr-hi) 55%, transparent); }
.acct-av { width: 24px; height: 24px; background: var(--hdr-hi); color: var(--brand); font-size: 12px; }
.gsearch { position: relative; }
.gsearch .gsi { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: color-mix(in srgb, #fff 55%, transparent); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.gsearch .input { background: var(--hdr-fill); border: 1px solid var(--hdr-line); border-radius: 999px; color: #fff; padding: 9px 14px 9px 36px; transition: background .15s, border-color .15s; }
.gsearch .input::placeholder { color: color-mix(in srgb, #fff 55%, transparent); }
.gsearch .input:focus { background: color-mix(in srgb, #fff 12%, transparent); border-color: var(--hdr-hi); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--hdr-hi) 25%, transparent); }
@media (max-width: 720px) {
  .topbar .in { padding: 10px 16px 12px; gap: 10px 8px; }
  .fmtwrap { margin-left: auto; }               /* format and account sit on the right, next to each other */
  .acctbtn { width: 34px; padding: 0; justify-content: center; }
  .acctbtn .acct-av { width: 26px; height: 26px; }
}
.small.warn, p.warn { color: var(--warn); font-weight: 600; } .small.warn a, p.warn a { font-weight: 700; }

.lockbox.pro { flex-wrap: wrap; border-style: solid; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.lockbox.pro svg { stroke: var(--accent); }
.lockbox .lk-body { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.lockbox .lk-body span { color: var(--ink-2); font-size: 13px; }
.lockbox .lk-go { flex: none; }

@media (max-width: 640px) { .probtn { display: none; } } /* phones: Pro is in the More menu */

.livepromo { background: linear-gradient(90deg, color-mix(in srgb, #ef4444 16%, var(--surface)), var(--surface) 70%); border-bottom: 1px solid var(--line); }
.livepromo .in { max-width: 1240px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.livepromo .in > a:first-of-type { color: var(--ink); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.livepromo .lp-sub { color: var(--ink-2); }
.livepromo .lp-dot { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; flex: none; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: lpPulse 1.6s infinite; }
@keyframes lpPulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.55); } 70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.livepromo .lp-go { flex: none; background: #ef4444; color: #fff; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.livepromo .lp-x { flex: none; border: 0; background: none; color: var(--ink-3); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
@media (max-width: 640px) { .livepromo .lp-sub { display: none; } }
@media (prefers-reduced-motion: reduce) { .livepromo .lp-dot { animation: none; } }

/* ---------- social: avatars, shared plays, send sheet ---------- */
.sav { position: relative; display: inline-grid; place-items: center; flex: none; width: var(--sz, 36px); height: var(--sz, 36px); border-radius: 50%; background: var(--c, var(--accent)); color: #fff; overflow: hidden; font: 700 calc(var(--sz, 36px) * .42)/1 var(--display); }
.sav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sav.grp { background: var(--sunk); color: var(--ink-2); border: 1px solid var(--line); }
.playcard { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); color: var(--ink); text-decoration: none; max-width: 440px; }
a.playcard:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); text-decoration: none; }
.playcard .pcph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface); }
.playcard .pcph.none { display: grid; place-items: center; font: 700 10px/1 var(--text); color: var(--ink-3); border: 1px solid var(--line); }
.playcard .pcbody { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.playcard .pcmeta { font-size: 11px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playcard b { font: 700 15px/1.25 var(--display); }
.playcard .pcwho { font-size: 12px; color: var(--ink-2); }
.playcard .pcpts { font: 700 15px/1 var(--display); }
.playcard .pcpts.up { color: var(--win); } .playcard .pcpts.down { color: var(--lose); }
.socmodal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; }
@media (min-width: 640px) { .socmodal { place-items: center; } }
.socmodal .sm-back { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.socmodal .sm-panel { position: relative; width: min(480px, 100%); max-height: 86vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 18px 16px 22px; }
@media (min-width: 640px) { .socmodal .sm-panel { border-radius: 16px; } }
.socmodal h3 { margin: 0 0 12px; font: 700 19px/1.2 var(--display); }
.socmodal .sm-x { position: absolute; right: 10px; top: 8px; border: 0; background: none; color: var(--ink-3); font-size: 26px; cursor: pointer; }
.sm-note { width: 100%; margin-top: 12px; resize: vertical; }
.sm-sec { margin: 14px 0 6px; font: 700 12px/1 var(--text); letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); }
.sm-list { display: flex; flex-direction: column; gap: 2px; }
.sm-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 600 14px/1.2 var(--text); text-align: left; cursor: pointer; }
.sm-item:hover { background: var(--sunk); }
.sm-item:disabled { opacity: .5; }
.msgbtn { position: relative; flex: none; display: grid; place-items: center; width: 34px; height: 30px; border: 1px solid #2a4a75; border-radius: var(--r); color: #c9d6ea; }
.msgbtn:hover { background: var(--brand-2); color: #fff; }
.msgbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.msgbtn i { position: absolute; top: 1px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff; font: 700 10px/16px var(--text); font-style: normal; text-align: center; }

.pedit .pe-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pedit label.f { margin-top: 14px; }
.pedit textarea { width: 100%; resize: vertical; }
.pedit #pe-name { max-width: 280px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 2px var(--surface); }
.swatches button[aria-pressed="true"] { border-color: var(--ink); }
