:root {
  --bg: #0a0e15; --panel: #111827; --panel2: #172033; --line: #233047; --line2: #2d3c58;
  --text: #e7ecf5; --muted: #8a96ab; --faint: #5c6880;
  --accent: #5b8cff; --accent2: #3a6ae8; --good: #22c55e; --bad: #f05252; --warn: #f5a524; --violet: #a78bfa;
  --good-bg: rgba(34,197,94,.14); --bad-bg: rgba(240,82,82,.14); --accent-bg: rgba(91,140,255,.14); --warn-bg: rgba(245,165,36,.14);
  --r: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { 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, Inter, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; } h3 { font-size: .9rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.grow { flex: 1; }

/* ---------- header ---------- */
header.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 18px; padding-top: calc(env(safe-area-inset-top) + 10px); background: rgba(10,14,21,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
body.anon header.top { display: none; }
.brand { font-weight: 750; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand.big { font-size: 1.5rem; justify-content: center; margin-bottom: 8px; }
.brand .mark { width: 24px; height: 24px; flex: 0 0 auto; }
.brand.big .mark { width: 34px; height: 34px; }
nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
nav::-webkit-scrollbar { display: none; }
nav a { color: var(--muted); padding: 6px 10px; border-radius: 7px; white-space: nowrap; font-weight: 550; }
nav a:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
nav a.on { color: var(--text); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--accent); }
.count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; text-align: center; }
.count:empty { display: none; }
.tools { display: flex; align-items: center; gap: 8px; }
.pill { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px; white-space: nowrap; }
.pill.demo { color: var(--warn); border-color: rgba(245,165,36,.4); }
.chip-user { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; background: var(--panel2); color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap; }
.chip-user:hover { text-decoration: none; background: var(--line); }
.jobbar { position: absolute; left: 0; right: 0; bottom: -1px; height: 22px; transform: translateY(100%); background: var(--panel); border-bottom: 1px solid var(--line); }
.jobbar .fill { height: 3px; background: var(--accent); width: 0; transition: width .4s; }
.jobbar .msg { font-size: 12px; color: var(--muted); padding: 0 18px; }
.jobbar.err .fill { background: var(--bad); }

main { padding: 18px; max-width: 1400px; margin: 0 auto; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
header.top:has(.jobbar:not(.hidden)) + main { padding-top: 40px; }

/* ---------- controls ---------- */
input, select, button, textarea { font: inherit; color: var(--text); }
input:not([type]), input[type=text], input[type=number], input[type=date], input[type=time], input[type=password], input[type=search], select, textarea {
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 7px; padding: 6px 9px; outline: none; min-width: 0; }
textarea { width: 100%; resize: vertical; margin-bottom: 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
input[type=date], input[type=time] { color-scheme: dark; }
.btn { background: var(--accent2); border: 0; color: #fff; border-radius: 7px; padding: 7px 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent); }
.btn.ghost { background: transparent; border: 1px solid var(--line2); color: var(--text); }
.btn.ghost:hover { background: var(--panel2); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.good { background: #16a34a; } .btn.bad { background: #c63b3b; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 5px 11px; color: var(--muted); cursor: pointer; font-weight: 550; }
.seg button.on { background: var(--accent-bg); color: var(--text); }
.seg button + button { border-left: 1px solid var(--line2); }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
label.f .lbl { display: flex; align-items: center; gap: 6px; min-height: 17px; }
label.chk { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; margin: 4px 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
select.booksel { padding: 5px 7px; }
select.mini, .mini { font-size: 12px; padding: 3px 5px; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.gp { grid-template-columns: minmax(0, 360px) minmax(0,1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card > h3 { margin-bottom: 10px; }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cardhead h3 { margin: 0; }
.cardpad { padding: 14px 14px 4px; }
.pagehead { margin-bottom: 14px; } .pagehead h2 { margin-bottom: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--panel2); border-radius: 8px; padding: 10px 12px; }
.stat .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .s { font-size: 12px; color: var(--muted); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; text-align: left;
  position: sticky; top: 0; background: var(--panel); cursor: default; }
th.sort { cursor: pointer; user-select: none; } th.sort:hover { color: var(--text); }
th.sorted::after { content: " ▾"; } th.sorted.asc::after { content: " ▴"; }
tbody tr:hover { background: rgba(255,255,255,.025); }
tr.value { background: linear-gradient(90deg, rgba(34,197,94,.10), transparent 60%); }
tr.dim { opacity: .5; }
td.pl a { color: var(--text); font-weight: 600; } td.pl .sub, td .sub { display: block; font-size: 11px; color: var(--muted); }
input.cell { width: 62px; padding: 4px 6px; text-align: right; font-variant-numeric: tabular-nums; }
input.cell.wide { width: 150px; text-align: left; }
input.cell.code { width: 140px; text-align: left; font-family: var(--mono); letter-spacing: .04em; }
input.cell.book { border-color: rgba(91,140,255,.45); }
input.cell.mine { border-color: rgba(245,165,36,.55); }
.price { display: inline-flex; align-items: center; gap: 5px; justify-content: flex-end; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; vertical-align: 1px; white-space: nowrap; }
.tag.o { background: var(--good-bg); color: var(--good); } .tag.u { background: var(--bad-bg); color: var(--bad); }
.tag.n { background: var(--panel2); color: var(--muted); }
.tag.lu { background: var(--accent-bg); color: var(--accent); }
.tag.inf { background: var(--warn-bg); color: var(--warn); }
.tag.new { background: rgba(167,139,250,.16); color: var(--violet); }
.tag.low, .tag.inf.low { background: var(--bad-bg); color: var(--bad); }
pre.raw { max-height: 320px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: 11px/1.45 var(--mono); color: var(--muted); white-space: pre-wrap; word-break: break-all; }
.tag.adm { background: rgba(167,139,250,.16); color: var(--violet); }
.tag.you { background: var(--panel2); color: var(--text); }
.iconbtn { background: var(--panel2); border: 1px solid var(--line2); color: var(--text); border-radius: 6px; width: 30px; height: 28px; cursor: pointer; flex: 0 0 auto; }
.iconbtn:hover { border-color: var(--accent); }
.iconbtn.on { background: var(--accent); border-color: var(--accent); }
.iconbtn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- sportsbook badges ---------- */
.bk { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 17px; padding: 0 5px; border-radius: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: .02em; line-height: 1; vertical-align: middle; flex: 0 0 auto; }
.bk.big { height: 22px; min-width: 34px; font-size: 12px; }
.bk-logo { height: 17px; width: auto; border-radius: 3px; vertical-align: middle; }
.bk-logo.big { height: 22px; }

/* ---------- slate ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.toolbar #fq { width: 170px; }
.metaline { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.games { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: thin; }
.game { flex: 0 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; cursor: pointer; min-width: 110px; }
.game:hover { border-color: var(--line2); } .game.on { border-color: var(--accent); background: var(--accent-bg); }
.game .t { font-weight: 700; } .game .s { font-size: 11px; color: var(--muted); }
.legendbox { margin-top: 14px; } .legendbox summary { font-size: 13px; }
.mobsort { margin-bottom: 10px; } .mobsort select { width: 100%; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; }
.pcard.value { border-color: rgba(34,197,94,.45); background: linear-gradient(160deg, rgba(34,197,94,.08), var(--panel) 50%); }
.pc-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pc-name { color: var(--text); font-weight: 700; font-size: 15px; }
.pc-top .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pc-proj { display: flex; align-items: baseline; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.pc-proj .big { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pc-proj .pp { margin-left: auto; font-size: 12px; }
.pc-line { display: grid; grid-template-columns: 0.8fr 1fr 1fr; gap: 8px; }
.pc-line label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.pc-line .price { justify-content: flex-start; } .pc-line input.cell { width: 100%; min-width: 0; font-size: 16px; padding: 6px; }
.pc-eval { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.pc-eval b { color: var(--text); }

/* ---------- top plays ---------- */
.toplist { display: grid; gap: 10px; }
.topcard { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.topcard .rank { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.tc-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tc-head .sub { font-size: 12px; color: var(--muted); }
.tc-bet { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-size: 15px; flex-wrap: wrap; }
.tc-stats { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tc-stats b { color: var(--text); } .tc-stats .good b { color: var(--good); }

/* ---------- player ---------- */
.pick { position: relative; flex: 1; max-width: 380px; } .pick input { width: 100%; }
.ac { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.ac div { padding: 9px 10px; cursor: pointer; } .ac div:hover { background: var(--accent-bg); }
.ac .sub { color: var(--muted); font-size: 12px; margin-left: 6px; }
.phead { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.phead h2 { margin: 0; }
.pcontrols { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.pcontrols input[type=number] { width: 84px; }
.srcline { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero .big { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--panel2); border-radius: 7px; padding: 5px 9px; font-size: 12px; }
.chip b { font-variant-numeric: tabular-nums; }
.verdict { border-radius: 9px; padding: 10px 12px; margin-top: 10px; font-weight: 600; }
.verdict.o { background: var(--good-bg); color: var(--good); } .verdict.u { background: var(--bad-bg); color: var(--bad); }
.verdict.n { background: var(--panel2); color: var(--muted); }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; align-items: center; margin-top: 6px; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
svg text { font-family: inherit; }
.rinkwrap { max-width: 420px; margin: 0 auto; }
table.kv td { white-space: normal; padding: 6px 4px; } table.kv td.num { white-space: nowrap; }

/* ---------- bet slip ---------- */
.leg { display: flex; justify-content: space-between; gap: 10px 14px; align-items: flex-end; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.leg:last-of-type { border-bottom: 0; }
.leg-info { min-width: 200px; flex: 1; }
.leg-ctl { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.leg-ctl input.cell { width: 72px; }
.towin { font-size: 12px; color: var(--good); min-width: 80px; align-self: center; }
.leg-act { display: flex; gap: 8px; align-items: center; }

/* ---------- tracker ---------- */
table.picks input.cell { width: 64px; }

/* ---------- help ---------- */
.faq { display: grid; gap: 16px; max-width: 820px; }
.faq section h3 { margin: 6px 0 8px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; }
.faq summary { color: var(--text); font-weight: 600; padding: 12px 14px; list-style: none; position: relative; padding-right: 36px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 14px; top: 10px; color: var(--muted); font-size: 18px; }
.faq details[open] summary::after { content: "–"; }
.faq .ans { padding: 0 14px 14px; color: var(--muted); line-height: 1.55; }
.faq .ans b { color: var(--text); }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 14px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 12px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); } .tabs a:hover { text-decoration: none; color: var(--text); }
.codebox { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--good-bg); border: 1px solid rgba(34,197,94,.4); border-radius: var(--r); padding: 14px; margin-bottom: 14px; }
.codebox .k { font-size: 12px; color: var(--good); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.codebox .code { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; letter-spacing: .08em; margin: 4px 0; user-select: all; }
td .actions { display: flex; gap: 6px; flex-wrap: nowrap; }
.lugrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
table.lu td, table.lu th { padding: 5px 6px; font-size: 13px; }
table.lu td { white-space: normal; }
table.lu tr.chg { background: var(--accent-bg); }
table.lu td .note { font-size: 11.5px; }
.unmatched { margin-top: 10px; padding: 10px; border-radius: 8px; background: var(--warn-bg); }
.unmatched b { color: var(--warn); display: block; margin-bottom: 6px; }
.unmatched .row { align-items: center; justify-content: space-between; margin-bottom: 6px; }

/* ---------- login ---------- */
.login { max-width: 420px; margin: 12vh auto 0; text-align: center; padding: 28px 24px; }
.login form { display: flex; gap: 8px; margin: 18px 0 10px; }
.login input { flex: 1; font-family: var(--mono); font-size: 18px; letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: 10px; }
.login .btn { padding: 10px 16px; }
.loginerr { color: var(--bad); min-height: 20px; font-size: 13px; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.welcome { max-width: 640px; margin: 30px auto; }
.note { font-size: 12.5px; color: var(--muted); }
.warnbox { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 9px 12px; font-size: 13px; }
.toast { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line2);
  padding: 9px 16px; border-radius: 9px; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.4); max-width: calc(100vw - 32px); }
.toast.err { border-color: var(--bad); color: #ffd1d1; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: s 0.8s linear infinite; vertical-align: -2px; }
@keyframes s { to { transform: rotate(360deg); } }
.heat td.h { text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; }
.heat tbody tr { cursor: pointer; } .heat tbody tr.on { outline: 1px solid var(--accent); }
details summary { cursor: pointer; color: var(--muted); }
.sec { margin-top: 18px; }

@media (max-width: 1000px) { .gp { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  main { padding: 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); } header.top { padding: 8px 12px; gap: 8px; padding-top: calc(env(safe-area-inset-top) + 8px); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .brand { order: 1; } .tools { order: 2; flex: 1; justify-content: flex-end; min-width: 0; }
  nav { order: 3; flex-basis: 100%; margin: 0 -4px; }
  .tools #date { width: 132px; } .pill { display: none; }
  .g2 { grid-template-columns: 1fr; }
  .toolbar #fq { flex: 1; width: auto; min-width: 120px; }
  .hero .big { font-size: 2.1rem; }
  .topcard { grid-template-columns: 1fr auto; } .topcard .rank { display: none; }
  .pcontrols { width: 100%; } .pcontrols label.f { flex: 1; min-width: 100px; } .pcontrols select, .pcontrols input[type=number] { width: 100%; }
  .leg-ctl { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
  .leg-ctl .seg { width: 100%; } .leg-ctl .seg button { flex: 1; }
  .leg-ctl select, .leg-ctl input.cell { width: 100%; font-size: 16px; }
  .leg-act { justify-content: flex-end; }
  #updateBtn, .chip-user .tag { display: none; }
  .login { margin-top: 8vh; } .login form { flex-direction: column; }
  input, select { font-size: 16px; } /* stops iOS zooming into inputs */
  .lugrid { grid-template-columns: 1fr; }
}

td.why { white-space: normal; min-width: 180px; font-size: 12px; }

.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.testing { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 14px; border: 1px solid rgba(245,165,36,.35); background: var(--warn-bg); border-radius: var(--r); font-size: 13.5px; color: var(--text); }
.testing .tag { background: var(--warn); color: #111; flex: none; }
details.archived > summary { cursor: pointer; list-style: none; }
details.archived > summary::-webkit-details-marker { display: none; }
details.archived > summary::before { content: '▸ '; color: var(--muted); }
details.archived[open] > summary::before { content: '▾ '; }
.bookpick { position: relative; }
.bookmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; max-height: 360px; overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r); padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 7px; }
.bookmenu .chk { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.bookmenu .note { margin: 4px 0 0; white-space: normal; }
@media (max-width: 720px) { .bookmenu { right: auto; left: 0; } }
.bks { display: inline-flex; gap: 2px; align-items: center; vertical-align: middle; }
.bks .more { font-size: 10px; font-weight: 700; color: var(--muted); padding: 1px 4px; border: 1px solid var(--line2); border-radius: 4px; margin-left: 1px; }

/* ---------- Long shots ---------- */
.lsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-top: 12px; }
.lscard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.ls-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 14px 10px; }
.ls-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ls-odds { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.ls-odds b { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.ls-odds s { font-size: .8rem; }
.boost { color: var(--violet); }
.small { font-size: .78rem; }
.ls-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.ls-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; background: var(--panel); }
.ls-stats span { font-size: .72rem; color: var(--muted); }
.ls-stats b { font-variant-numeric: tabular-nums; }
.ls-legs { list-style: none; margin: 0; padding: 2px 0; }
.ls-legs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--panel2); }
.ls-legs li > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ls-legs .sub { font-size: .75rem; color: var(--muted); }
.ls-form { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.ls-form span { width: 21px; height: 21px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 600; background: var(--panel2); color: var(--muted); font-variant-numeric: tabular-nums; }
.ls-form span.hit { background: rgba(34,197,94,.22); color: #6ee7a0; }
.ls-form em { font-style: normal; font-size: .75rem; font-weight: 600; margin-left: 4px; }
.ls-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px 14px; margin-top: auto; }
#lsCtl { align-items: flex-end; gap: 14px; flex-wrap: wrap; }
#lsCtl .f > span { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.lsseg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.lsseg button { min-height: 36px; min-width: 52px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; font-weight: 600; }
.lsseg button.on { border-color: var(--violet); background: rgba(167,139,250,.18); color: #d6c8ff; }
.warn { color: var(--warn); }

/* ---------- Bets menu + game lines ---------- */
.subtabs { display: flex; gap: 2px; margin: -4px 0 14px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.subtabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.subtabs a.on { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.tag.gm { background: rgba(167,139,250,.18); color: #d6c8ff; }
.topctl { align-items: center; gap: 10px; flex-wrap: wrap; }
.chk.big { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel2); }
.gl-sec { padding: 14px; border: 1px dashed #4b3f7a; border-radius: 12px; background: rgba(167,139,250,.05); display: flex; flex-direction: column; gap: 10px; }
.topcard.gl .btn { align-self: center; }
.gl-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: .75rem; }
.gl-chip.ok { background: var(--good-bg); color: #8ff0b5; }
.gl-chip.warn { background: var(--warn-bg); color: #f5c46a; }
.gl-game { padding: 0; overflow: hidden; }
.gl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.gl-title { font-size: 1.05rem; }
.gl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.gl-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 16px; background: var(--panel); }
.gl-stats span { font-size: .72rem; color: var(--muted); }
.gl-game .tablewrap { margin: 0; }
.gl-game table td, .gl-game table th { white-space: nowrap; }
.gl-tiles { display: inline-flex; gap: 2px; vertical-align: middle; }
.gl-tiles i { display: inline-block; width: 8px; height: 15px; border-radius: 2px; background: var(--line2); }
.gl-tiles i.h { background: var(--good); }
.gl-tiles.sm i { width: 6px; height: 13px; }
@media (max-width: 700px) { .gl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gl-list { list-style: none; margin: 0; padding: 0; }
.gl-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--panel2); }
.gl-list li.value { background: var(--good-bg); }
.gl-list li > div:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gl-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
@media (max-width: 760px) { .subtabs a { padding: 10px 9px; font-size: .92rem; } }
.ls-form .gl-tiles { width: auto; height: auto; background: none; border-radius: 0; display: inline-flex; gap: 2px; }
.tag.strong { background: rgba(245,165,36,.18); color: #f7c25e; letter-spacing: .04em; }

/* ---------- ladders ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tag.lad { background: rgba(91,140,255,.18); color: #a9c1ff; letter-spacing: .04em; }
.lad-sec { padding: 14px; border: 1px dashed #3d5a8f; border-radius: 12px; background: rgba(91,140,255,.05); display: flex; flex-direction: column; gap: 10px; }
.lad-card { padding: 0; overflow: hidden; margin-bottom: 12px; }
.lad-card .tablewrap { margin: 0; }
.lad-card table td, .lad-card table th { white-space: nowrap; }
.lad-card sup { font-size: .65em; color: var(--faint); }
.lad-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.lad-head .sub { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.lad-dist { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lad-dist .note { margin: 0; font-size: .7rem; }
.lad-bars { display: flex; align-items: flex-end; gap: 4px; height: 62px; }
.lad-bars > div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.lad-bars span { display: block; width: 16px; border-radius: 3px 3px 0 0; background: var(--accent); }
.lad-bars span.hi { background: var(--violet); }
.lad-bars i { font-style: normal; font-size: .66rem; color: var(--muted); }
.lad-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.lad-chips > div { flex: 0 0 auto; scroll-snap-align: start; }
.lad-chip { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 96px; padding: 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.lad-chip.g { border-color: rgba(34,197,94,.55); background: rgba(34,197,94,.09); }
.lad-chip.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.lad-chip .lc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 1rem; }
.lad-chip .lc-px { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.lad-chip small { font-size: .72rem; color: var(--muted); }
.lad-chip small.good { color: var(--good); font-weight: 600; }
.lad-swipe { padding: 0 14px 12px; margin: 4px 0 0; font-size: .72rem; }
.ladleg { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }

/* ---------- what's new popup ---------- */
.wn-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(4,7,12,.72); }
.wn { width: min(560px, 100%); max-height: min(80vh, 720px); overflow-y: auto; padding: 20px; border: 1px solid var(--line2); border-radius: 14px; background: var(--panel); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.wn h2 { margin-bottom: 12px; }
.wn-e { padding: 12px 0; border-top: 1px solid var(--line); }
.wn-e p { margin: 0 0 8px; }
.wn-e h4 { margin: 10px 0 4px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.wn-e ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; line-height: 1.45; }
.wn-v { font-size: .78rem; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.wn-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.wn-foot .note { margin: 0; }
.wn-foot .btn { min-height: 44px; min-width: 110px; }
@media (max-width: 760px) { .wn-back { align-items: end; padding: 0; } .wn { border-radius: 14px 14px 0 0; max-height: 85vh; padding-bottom: calc(env(safe-area-inset-bottom) + 16px); } }
.lad-chips > div { display: flex; }
.glkinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 10px; }
.glkinds legend { padding: 0 6px; font-size: .78rem; color: var(--muted); }
.glkinds .note { grid-column: 1 / -1; }
.gl-list li.dim { opacity: .55; }
@media (max-width: 520px) { .glkinds { grid-template-columns: 1fr; } }

/* ---------- player props, cover bets, sportsbook limits ---------- */
.tag.pr { background: rgba(56,189,248,.16); color: #8fd8fb; }
.tag.cv { background: rgba(148,163,184,.18); color: #cbd5e1; }
table.props td.pv { background: var(--good-bg); }
.pcell { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; min-height: 40px; padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.pcell:hover { background: var(--panel2); }
.pcell .small { font-size: .74rem; color: var(--muted); }
.prop-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 2px; }
.topcard.cover .btn { align-self: center; }
#limT input.cell { width: 80px; }
.topctl .bookmenu, .pagehead .bookmenu { right: auto; left: 0; }
#limT .chk { white-space: nowrap; }

/* ---------- bet panel ---------- */
.pricebtn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font: inherit; cursor: pointer; }
.pricebtn:hover { border-color: var(--accent); }
.sheet-back { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(4,7,12,.7); }
.sheet { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line2); border-radius: 14px; background: var(--panel); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-head h2 { margin: 0 0 2px; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sheet-grid .f, .sheet-grid label.f { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); }
.sheet-grid input, .sheet-grid select { min-height: 44px; width: 100%; box-sizing: border-box; font-size: 16px; }
.stepper { display: flex; gap: 6px; align-items: center; }
.stepper .iconbtn { width: 44px; height: 44px; flex: 0 0 auto; font-size: 18px; }
.stepper input { text-align: center; }
.sheet-info { margin: 0; padding: 10px 12px; list-style: none; display: flex; flex-direction: column; gap: 6px; border-radius: 10px; background: var(--bg); font-size: .88rem; }
.sheet-info .boost, .boost { color: #c9b8ff; }
.sheet-btns { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.sheet-btns .btn { min-height: 48px; font-size: 15px; }
@media (max-width: 760px) { .sheet-back { align-items: end; padding: 0; } .sheet { border-radius: 16px 16px 0 0; max-height: 88vh; padding-bottom: calc(env(safe-area-inset-bottom) + 18px); } }
.nightbar { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; padding: 10px 14px; margin-bottom: 12px; }
.nightbar > div { display: flex; flex-direction: column; gap: 2px; }
.boostcard { border-color: #4b3f7a; display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.boostrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.boostrow > div:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.boostform { flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.small { font-size: .8rem; }

/* ---------- new layout ---------- */
.tabbar { display: none; }
.railwrap { display: flex; gap: 18px; align-items: flex-start; }
.railwrap > #mainCol { flex: 1 1 auto; min-width: 0; }
.sliprail { flex: 0 0 320px; position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; }
.railcard { display: flex; flex-direction: column; gap: 10px; }
.railleg { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: 10px; background: var(--bg); }
.railleg .iconbtn { width: 30px; height: 30px; flex: 0 0 auto; }
.capmeter .bar { height: 8px; margin-top: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.capmeter .bar i { display: block; height: 100%; border-radius: 999px; }
.betfilters { gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chipbtn { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: #c3cad8; font: inherit; font-size: 13px; cursor: pointer; }
.chipbtn.on { border-color: var(--accent); background: var(--accent-bg); color: var(--text); font-weight: 600; }
.morelist { display: flex; flex-direction: column; }
.morerow { display: flex; justify-content: space-between; align-items: center; min-height: 60px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.morerow:last-child { border-bottom: 0; }
.morerow > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.morerow:hover { background: var(--panel2); text-decoration: none; }
.teasers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.teaser { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; color: var(--text); text-decoration: none; }
.teaser:hover { border-color: var(--accent); text-decoration: none; }
.teaser > span:first-child { display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 760px) {
  header.top #nav { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 4px 4px calc(env(safe-area-inset-bottom) + 6px); background: rgba(14,20,32,.97); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; color: var(--muted); font-size: 11px; text-decoration: none; }
  .tabbar a.on { color: #8fb0ff; }
  .tabbar .ti { position: relative; display: inline-flex; }
  .tabbar .badge:empty { display: none; }
  .tabbar .badge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--accent2); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
  main#view { padding-bottom: calc(env(safe-area-inset-bottom) + 84px); }
  .toast { bottom: calc(env(safe-area-inset-bottom) + 76px) !important; }
}

/* "Fairline was updated" bar for a tab that was open across an update */
.reloadbar { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 120;
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border-radius: 12px; background: var(--panel2);
  border: 1px solid var(--accent, #5b8cff); box-shadow: 0 8px 24px rgba(0,0,0,.45); font-size: 14px; max-width: calc(100vw - 32px); }
