:root {
  --bg: #eef1f5; --card: #fff; --ink: #1b2330; --muted: #6b7686; --line: #dfe4ea;
  --brand: #0f2a44; --brand2: #163b5f; --accent: #e8a317; --danger: #c8372d; --ok: #1f8a4c;
  --qb: #d9534f; --rb: #2e8b57; --wr: #2f6fd0; --te: #c77d12; --k: #7a5cc7; --dst: #4f5b66;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand2); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 6px 12px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--brand2); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--brand2); color: #fff; border-color: var(--brand2); }
button.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
input, select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; }
.pad { padding: 16px; } .muted { color: var(--muted); } .small { font-size: 12px; } .r, .tbl th.r, .tbl td.r { text-align: right; } .b { font-weight: 700; }
.danger { color: var(--danger); }

.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 5; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.topin { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.top .brand { color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .3px; }
.top .lgname { background: rgba(255,255,255,.12); padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.top .muted { color: #b9c6d4; } .spacer { flex: 1; }
.tabs { max-width: 1180px; margin: 0 auto; display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; }
.tabs a { color: #cfdbe7; padding: 9px 14px; border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs a.on { color: #fff; border-color: var(--accent); } .tabs a:hover { color: #fff; text-decoration: none; }
main { max-width: 1180px; margin: 0 auto; padding: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.card h2 { margin: 0 0 4px; font-size: 20px; } .card h3 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .5px; color: var(--brand2); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { padding: 4px 10px; border-radius: 14px; font-size: 12px; font-weight: 600; }
.chip.on { background: var(--brand2); color: #fff; border-color: var(--brand2); }

.tbl { width: 100%; border-collapse: collapse; margin-top: 8px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--line); padding: 6px 8px; }
.tbl td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: middle; }
.tbl tr.me td { background: #fff8e6; }
.tbl tr.danger-row td { background: #fdecea; }
.tbl tr.divider td { background: #f5f7fa; font-weight: 700; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.tbl tr.emptyslot td { color: var(--muted); font-style: italic; }
.tbl td.slot { font-weight: 700; color: var(--muted); width: 54px; }
.pos { display: inline-block; min-width: 34px; text-align: center; font-size: 10px; font-weight: 800; color: #fff; border-radius: 4px; padding: 1px 4px; background: var(--dst); }
.pos-QB { background: var(--qb); } .pos-RB { background: var(--rb); } .pos-WR { background: var(--wr); } .pos-TE { background: var(--te); } .pos-K { background: var(--k); } .pos-DST { background: var(--dst); }
.inj { color: var(--danger); font-size: 11px; font-weight: 700; }
.axe { color: var(--danger); font-weight: 700; font-size: 12px; }
.bigscore { text-align: right; } .bigscore > div:first-child { font-size: 32px; font-weight: 800; color: var(--brand); }

.lot { border-top: 4px solid var(--accent); }
.lot-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lot h2 { font-size: 24px; }
.clock { font-size: 44px; font-weight: 800; min-width: 84px; text-align: center; border-radius: 12px; background: var(--brand); color: #fff; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.clock.hot { background: var(--danger); }
.highbid { font-size: 18px; margin: 12px 0; }
.bidbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bidbar .bid { font-weight: 700; } .bidbar input { width: 110px; }
.scroll { max-height: 260px; overflow-y: auto; }
.scroll.tall { max-height: 520px; }
.draftgrid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; } @media (max-width: 900px) { .draftgrid { grid-template-columns: 1fr; } }
.logline { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.board-col { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.board-head { background: var(--brand2); color: #fff; font-weight: 700; padding: 6px 8px; font-size: 12px; }
.board-cell { padding: 4px 8px; font-size: 12px; border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-cell.empty { color: var(--line); }
input.open { width: 64px; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.game { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.game.in { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.gteam { display: flex; justify-content: space-between; font-weight: 600; }

.picks { display: grid; gap: 6px; margin: 10px 0; }
.pickrow { display: flex; gap: 8px; align-items: center; }
.pk { min-width: 90px; font-weight: 700; } .pk.on { background: var(--brand2); color: #fff; }
.pk.right { background: var(--ok); border-color: var(--ok); } .pk.wrong { background: var(--danger); border-color: var(--danger); }
.tb input { width: 80px; }

.login { max-width: 420px; margin: 60px auto; }
.login .brand { color: var(--brand); margin: 0 0 6px; }
.login label, .claimform label { display: block; margin: 10px 0; font-weight: 600; }
.login input, .claimform input, .claimform select { display: block; width: 100%; margin-top: 4px; }
.leaguelink { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; font-weight: 700; }
dialog { border: none; border-radius: 12px; padding: 20px; width: min(420px, 92vw); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); padding: 10px 16px; border-radius: 8px; color: #fff; background: var(--ok); z-index: 50; box-shadow: 0 4px 14px rgba(0,0,0,.2); max-width: 90vw; }
.toast.err { background: var(--danger); }
@media (max-width: 640px) { .clock { font-size: 32px; min-width: 60px; } .lot h2 { font-size: 18px; } .tbl td, .tbl th { padding: 5px 4px; } }

/* Scoreboard */
.ticker { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scrollbar-width: thin; }
.tk { flex: 0 0 auto; width: 128px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 13px; }
.tk.in { border-color: var(--ok); box-shadow: inset 0 3px 0 var(--ok); }
.tk-status { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 2px; white-space: nowrap; }
.tk.in .tk-status { color: var(--ok); }
.tk-team { display: flex; justify-content: space-between; font-weight: 600; color: var(--muted); }
.tk.in .tk-team, .tk.pre .tk-team, .tk-team.won { color: var(--ink); } .tk-team.won { font-weight: 800; }
.tk-score { font-variant-numeric: tabular-nums; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 5px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.board-sum .sumrow { cursor: pointer; } .board-sum .sumrow:hover td { background: #f3f6fa; }
.board-sum .sumrow td { padding: 10px 8px; font-size: 15px; }
.board-sum .caret { width: 18px; color: var(--muted); } .board-sum .rank { width: 28px; color: var(--muted); font-weight: 700; }
.board-sum .tname { font-weight: 700; } .board-sum .score b { font-size: 17px; }
.board-sum .sumrow.below td { background: #fdf1f0; }
.cutline td { padding: 0 !important; border: none !important; }
.cutline span { display: block; border-top: 2px dashed var(--danger); color: var(--danger); font-size: 11px; font-weight: 800; letter-spacing: .6px; padding: 4px 8px 3px; background: #fff; }
.detail > td { background: #f8fafc; padding: 4px 8px 12px !important; }
.tbl.inner { margin-top: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.tbl.inner td { font-size: 13px; padding: 6px 8px; }
.tbl.inner tr.benchrow td { color: var(--muted); } .tbl.inner tr.benchrow .statline b { color: var(--muted); }
.tbl.inner tr.playing td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.statline { line-height: 1.6; } .sc { display: inline-block; white-space: nowrap; }
@media (max-width: 700px) { .tbl.inner th:nth-child(3), .tbl.inner td:nth-child(3) { display: none; } .board-sum .sumrow td { font-size: 13px; } }
@media (max-width: 640px) {
  .top .lgname, .top .topin > .muted { display: none; }
  .top .brand { font-size: 16px; white-space: nowrap; }
  .board-sum th:nth-child(7), .board-sum .sumrow td:nth-child(7) { display: none; }
  main { padding: 10px; } .card { padding: 12px; }
}
@media (max-width: 640px) {
  .board-sum th, .board-sum .sumrow td { padding: 8px 3px; }
  .board-sum .score b { font-size: 15px; } .board-sum .score .muted { display: block; font-size: 11px; }
  .board-sum .caret { width: 12px; } .board-sum .rank { width: 18px; }
}

.logo { width: 30px; height: 30px; vertical-align: middle; margin-right: 4px; background: #fff; border-radius: 7px; padding: 1px; }
.logo.lg { width: 56px; height: 56px; border-radius: 12px; display: block; margin: 0 0 8px; background: none; }
.top .brand { display: inline-flex; align-items: center; }
