/* Hoop Lab. Dark theme; phones first (bottom nav under 760px), wider layouts above. */
:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --card: #15181d;
  --card2: #1d2128;
  --line: #272c35;
  --text: #f1f3f6;
  --muted: #8d95a3;
  --faint: #5d6573;
  --accent: #ff8a3d;
  --accent2: #2bc4b4;
  --hit: #2ad38b;
  --miss: #ff5c6c;
  --push: #6d7684;
  --warm: #f2c14e;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); padding-bottom: 84px; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
small, .muted { color: var(--muted); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
img.logo { object-fit: contain; flex: none; }

/* ---------- header and nav */
#top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 16px;
  background: rgba(11, 13, 16, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; }
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; }
.topnav a.on, .topnav a:hover { color: var(--text); background: var(--card2); }
.topnav svg, .bottomnav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottomnav { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); display: flex;
  justify-content: space-around; padding: 6px; border-radius: 22px; background: rgba(24, 27, 33, .92); backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.bottomnav a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 16px;
  color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.bottomnav a.on { color: var(--accent); background: var(--card2); }
.bottomnav svg { width: 22px; height: 22px; }
@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .topnav { display: flex; }
  .bottomnav { display: none; }
}

/* ---------- layout */
main { max-width: 1100px; margin: 0 auto; padding: 14px 12px 24px; }
.grid2 { display: grid; gap: 12px; }
.grid2 > * { min-width: 0; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.card { background: linear-gradient(180deg, #181b21 0, var(--card) 40px); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; min-width: 0; }
.card > h2, .card > h3 { margin-bottom: 10px; }
.card.flush { padding: 0; overflow: hidden; }
.empty { color: var(--muted); text-align: center; padding: 28px 16px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; text-align: right; }
.sep { height: 1px; background: var(--line); margin: 10px 0; }
#foot { max-width: 1100px; margin: 0 auto; padding: 8px 16px 24px; color: var(--faint); font-size: 12px; }
#foot p { margin: 4px 0; }
.note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* ---------- hero (game and player pages) */
.hero { position: relative; margin: -14px -12px 12px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--c1, #1d5c57) 0%, rgba(11, 13, 16, .2) 55%, var(--c2, #7a3b17) 100%); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 13, 16, .15), rgba(11, 13, 16, .85)); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.back { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .12); font-size: 20px; }
.matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 10px; }
.matchup .team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.matchup .team.home { flex-direction: row-reverse; text-align: right; }
.matchup .team b { display: block; font-size: 20px; line-height: 1.1; }
.matchup .team small { font-size: 13px; }
.matchup .mid { text-align: center; font-size: 13px; color: var(--muted); }
.matchup .score { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.matchup .score .lose { color: var(--muted); }
@media (max-width: 420px) { .matchup .team b { font-size: 16px; } .matchup .score { font-size: 24px; } }
.live { color: var(--miss); font-weight: 700; }

/* ---------- tabs, pills, inputs */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 12px; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 14px;
  font-weight: 650; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs .on { color: var(--text); background: var(--card2); border-color: #3a414c; }
.tabs.under { gap: 18px; border-bottom: 1px solid var(--line); }
.tabs.under button { border: 0; background: none; border-radius: 0; padding: 8px 0 10px; border-bottom: 3px solid transparent; }
.tabs.under .on { border-bottom-color: var(--text); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: var(--card2); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.pill.on { background: var(--text); color: #111; border-color: var(--text); }
.search { width: 100%; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); outline: none; }
.search:focus { border-color: #3d4552; }
select, .field input { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; width: 100%; }
label.field { display: block; font-size: 12px; color: var(--muted); }
label.field > span { display: block; margin-bottom: 4px; }

/* ---------- hit-rate bits */
.strip { display: flex; gap: 3px; margin: 8px 0 6px; }
.strip i { flex: 1; height: 4px; border-radius: 2px; background: var(--push); }
.strip i.hit { background: var(--hit); }
.strip i.miss { background: var(--miss); }
.rate { font-weight: 700; font-variant-numeric: tabular-nums; }
.rate.hot { color: var(--hit); }
.rate.warm { color: #9fe0bd; }
.rate.cold { color: var(--miss); }
.rate.none { color: var(--faint); }
.rate small { font-weight: 500; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.price { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #343a45; border-radius: 10px; padding: 4px 10px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { font-size: 10px; font-weight: 700; color: var(--accent2); }
.inj { display: inline-block; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 5px; margin-left: 4px; vertical-align: 2px; background: #4a3b12; color: var(--warm); }
.inj-o { background: #4a1a20; color: var(--miss); }
.hs { display: inline-block; flex: none; border-radius: 50%; overflow: hidden; background: var(--card2); border: 1px solid var(--line); }
.hs img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- games list */
.days { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 12px; padding: 0 12px; }
.days::-webkit-scrollbar { display: none; }
.days button { flex: none; background: none; border: 0; padding: 6px 10px 8px; color: var(--muted); cursor: pointer; text-align: center; border-bottom: 3px solid transparent; }
.days button b { display: block; font-size: 15px; }
.days button small { font-size: 12px; }
.days button.on { color: var(--text); border-bottom-color: var(--accent); }
.days button.on small { color: var(--text); }
.gamecard { display: block; padding: 0; overflow: hidden; }
.gamehead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 12px 14px; }
.gamehead .t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gamehead .t.home { flex-direction: row-reverse; text-align: right; }
.gamehead .t b { display: block; font-size: 16px; }
.gamehead .mid { text-align: center; color: var(--muted); font-size: 13px; }
.gamehead .mid b { color: var(--text); font-size: 18px; }
.mkt { padding: 0 14px 12px; }
.mkt h4 { margin: 4px 0 6px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 650; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair > div { min-width: 0; }
.pair .side { display: flex; align-items: center; gap: 8px; }
.pair > div:last-child .side { flex-direction: row-reverse; }
.pair > div:last-child { text-align: right; }
.trend { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); }
.trend .tag { font-size: 10px; padding: 1px 5px; }

/* ---------- prop rows */
.proprow { border-top: 1px solid var(--line); }
.proprow:first-child { border-top: 0; }
.proprow > .head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.proprow .name { font-weight: 650; overflow-wrap: anywhere; }
.proprow .sub { font-size: 13px; color: var(--muted); }
.rates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 14px 12px; }
.rates > div { background: var(--card2); border-radius: 10px; padding: 6px 4px; text-align: center; font-size: 13px; }
.rates > div small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.ladder { padding: 0 14px 12px; }
.ladder table { width: 100%; }
.chev { color: var(--muted); transition: transform .15s; }
.open .chev { transform: rotate(180deg); }

/* ---------- tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--muted); font-weight: 650; font-size: 12px; }
th:first-child, td:first-child { text-align: left; }
.data { width: 100%; }
.data td.l, .data th.l { text-align: left; }
.sticky th:first-child, .sticky td:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }
td.hit { color: var(--hit); font-weight: 700; }
td.miss { color: var(--miss); font-weight: 700; }
.vs { width: 100%; }
.vs td { font-size: 15px; font-weight: 700; padding: 10px 4px; }
.vs td:nth-child(2) { text-align: center; color: var(--muted); font-weight: 500; font-size: 14px; }
.vs td:last-child { text-align: right; }
.vs td.better { color: var(--hit); }

/* ---------- player page */
.phead { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.phead h1 { font-size: 26px; letter-spacing: -.01em; }
.windows { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 12px; }
.windows button { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 2px; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 650; }
.windows button .rate { display: block; font-size: 16px; margin-top: 2px; }
.windows button.on { border-color: var(--text); color: var(--text); background: var(--card2); }
@media (max-width: 420px) { .windows button { font-size: 11px; } .windows button .rate { font-size: 14px; } }
.linectl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.linectl button.step { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); font-size: 18px; cursor: pointer; }
.linectl .val { font-size: 22px; font-weight: 800; min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--card2); padding: 7px 12px; cursor: pointer; color: var(--muted); font-weight: 650; }
.seg button.on { background: var(--text); color: #111; }
.summary { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
.summary b { color: var(--text); }

/* bar charts */
.chart { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-top: 6px; }
.bars { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 220px; min-width: 100%; padding: 18px 40px 0 0; border-bottom: 1px solid var(--line); }
.bars.small { height: 140px; }
.bar { position: relative; flex: 1 0 26px; height: var(--h); min-height: 3px; border-radius: 6px 6px 2px 2px; background: var(--push); }
.bar.hit { background: var(--hit); }
.bar.miss { background: var(--miss); }
.bar.neutral { background: #3a404b; }
.bar > span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 700; color: var(--text); }
.bar.hit > span { color: var(--hit); }
.bar.miss > span { color: var(--miss); }
.lineat { position: absolute; left: 0; right: 0; border-top: 2px dashed rgba(255, 255, 255, .75); pointer-events: none; z-index: 2; }
.lineat span { position: absolute; right: 0; top: -10px; width: 38px; text-align: center; font-size: 11px; font-weight: 700; background: var(--card); padding: 0 4px; border-radius: 4px; }
.xlabels { display: flex; gap: 6px; min-width: 100%; padding-right: 40px; }
.xlabels span { flex: 1 0 26px; text-align: center; font-size: 10px; color: var(--muted); line-height: 1.25; padding-top: 4px; }

details.filters > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 700; }
details.filters > summary::-webkit-details-marker { display: none; }
.fgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.fgrid > * { min-width: 0; }
@media (min-width: 760px) { .fgrid { grid-template-columns: repeat(4, 1fr); } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12px; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 6px; font-size: 14px; }
.btn { border: 1px solid var(--line); background: var(--card2); border-radius: 10px; padding: 7px 12px; cursor: pointer; font-weight: 650; }

/* players list */
.plist a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.plist a:first-child { border-top: 0; }
.plist a:hover { background: var(--card2); }

/* ---------- teams, standings and polish */
a.card { transition: border-color .15s, transform .15s; }
a.card:hover { border-color: #39404b; }
a.card:active { transform: scale(.995); }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.status.live { color: var(--miss); border-color: #5a2129; background: #2a1216; }
.status.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--miss); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* page heading with a soft brand glow */
.pagehead { margin: -14px -12px 12px; padding: 18px 16px 14px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(43, 196, 180, .22), transparent 55%),
              radial-gradient(120% 140% at 100% 0%, rgba(255, 138, 61, .22), transparent 55%); border-bottom: 1px solid var(--line); }
.pagehead h1 { font-size: 28px; letter-spacing: -.02em; }
.pagehead p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* game cards: a wash of each team's color behind its side */
.gamecard { position: relative; }
.gamecard .gamehead { background: linear-gradient(90deg, var(--ca, transparent) 0%, transparent 38%, transparent 62%, var(--ch, transparent) 100%);
  border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.gamecard .gamehead small { color: var(--muted); }
.gamecard .resultline { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 2px 14px 12px; font-size: 12px; }
.gamecard .resultline span { background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); }
.gamehead .mid b.score { font-size: 22px; letter-spacing: -.02em; }
.gamehead .t b.lose { color: var(--muted); }

/* loading and empty states */
.skel-card { padding: 16px; }
.skel { height: 12px; border-radius: 6px; margin: 10px 0; background: linear-gradient(90deg, #1c2027 0%, #262b34 50%, #1c2027 100%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skel:first-child { height: 18px; margin-top: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-ic { font-size: 28px; opacity: .8; }
.empty small { max-width: 420px; }

/* team page */
.teamhead { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.teamhead h1 { font-size: 26px; letter-spacing: -.01em; }
.teamhead .meta { color: var(--muted); font-size: 14px; }
.statline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.statline > div { background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 8px 6px; text-align: center; }
.statline b { display: block; font-size: 18px; }
.statline small { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.nextgame { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .1); }
.nextgame .lbl { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--accent); text-transform: uppercase; }
td.res-w { color: var(--hit); font-weight: 700; }
td.res-l { color: var(--miss); font-weight: 700; }
td .logo { vertical-align: middle; margin-right: 4px; }
.sectiontitle { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 4px 2px 8px; }

/* standings */
.standings td, .standings th { padding: 8px 7px; }
.standings tr.cut td { border-bottom: 2px dashed #3d4552; }
.standings tr.cut-hard td { border-bottom: 2px solid var(--accent); }
.standings .rk { color: var(--muted); width: 22px; display: inline-block; }
.standings td.l a { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 18px; border-top: 2px solid var(--accent); vertical-align: middle; margin-right: 6px; }
.legend i.dash { border-top: 2px dashed #3d4552; }

/* players list */
.plist .tm { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- defense vs position */
.rates.r5 { grid-template-columns: 1.25fr repeat(4, 1fr); }
.opprank b { font-variant-numeric: tabular-nums; }
.opprank.soft b, .dvp .soft { color: var(--hit); }
.opprank.tough b, .dvp .tough { color: var(--miss); }
.opprank.mid b, .dvp .mid { color: var(--warm); }
.dvp .big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dvp .big small { font-size: 15px; font-weight: 600; }
.dvp .heads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.dvp .heads > div { background: var(--card2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.dvp tr.me td { background: var(--card2); }
@media (max-width: 420px) { .rates.r5 > div { font-size: 12px; } .rates.r5 small { font-size: 9px; letter-spacing: .02em; } }

/* ---------- teammate boost and confidence */
.rate em.adj { display: block; font-style: normal; font-size: 10px; font-weight: 600; color: var(--muted); line-height: 1.2; margin-top: 1px; cursor: help; }
.rate em.adj.small { color: var(--warm); }
.windows button .rate em.adj { font-size: 11px; }
.confnote { font-size: 12px; color: var(--muted); margin: -4px 2px 12px; }
.confnote b { color: var(--text); font-weight: 650; }
.confnote .amber { color: var(--warm); font-weight: 650; }
.adjline { font-size: 13px; color: var(--muted); }
.adjline b { color: var(--text); }
.adjline .amber { color: var(--warm); font-weight: 650; }
.boost table { width: 100%; }
.boost td.up { color: var(--hit); font-weight: 700; }
.boost td.down { color: var(--miss); font-weight: 700; }
.boost .row { flex-wrap: wrap; }
.boost:not(:empty) { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.matesplit summary { cursor: pointer; font-size: 13px; padding: 6px 0; color: var(--muted); }
.matesplit summary b { color: var(--text); }
.matesplit[open] summary { margin-bottom: 6px; }

/* ---------- pace, totals and prices */
.ctxline { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.ctxline b { color: var(--text); font-weight: 650; }
.ctxline i { font-style: normal; color: var(--faint); }
.implied { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: -4px 14px 10px; padding: 6px 10px;
  border-radius: 10px; background: rgba(255, 255, 255, .04); font-size: 13px; font-variant-numeric: tabular-nums; }
.implied > span:nth-child(2) { font-size: 11px; text-align: center; }
.implied > span:last-child { text-align: right; }
.implied small { color: var(--muted); }
.hero .implied { margin: 12px 0 0; background: rgba(0, 0, 0, .3); }
.evtag { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .03em; padding: 3px 6px; border-radius: 6px; margin-right: 6px;
  color: #062b1c; background: var(--hit); white-space: nowrap; }
.fairbox { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.fairbox > div { background: var(--card2); border-radius: 10px; padding: 8px 10px; font-size: 13px; min-width: 0; }
.fairbox small { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.evpos { color: var(--hit); font-weight: 700; }
.evneg { color: var(--miss); }

/* ---------- insights and trends */
.insights { display: grid; gap: 12px; }
.insights > * { min-width: 0; }
@media (min-width: 900px) { .insights { grid-template-columns: 1fr 1fr; } }
.card.insight { display: block; margin: 0; }
.card.insight:hover { border-color: #3a414c; }
.insight .row b { overflow-wrap: anywhere; }
.itext { margin: 12px 0; font-size: 17px; font-weight: 700; line-height: 1.35; }
.ibet { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 650; }
.irate { font-size: 14px; color: var(--muted); }
.irate .rate { font-size: 15px; }

/* ---------- play-by-play */
.shotwrap { max-width: 420px; margin: 8px auto 0; }
.court { display: block; width: 100%; height: auto; border-radius: 10px; background: #12151a; cursor: pointer; }
.court text { font-family: var(--font); }
.zonecard { margin-top: 12px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.zgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.zgrid > div { min-width: 0; font-size: 13px; }
.zgrid .big { font-size: 24px; font-weight: 800; margin: 2px 0 6px; }
.zgrid .big small { font-size: 13px; font-weight: 600; color: var(--muted); }
.zgrid .kv { display: flex; justify-content: space-between; gap: 6px; padding: 4px 0; border-top: 1px solid var(--line); }
.zgrid .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.zrank.hit { color: var(--hit); }
.zrank.miss { color: var(--miss); }
.zrank.mid { color: var(--warm); }
.wp { position: relative; padding-left: 36px; }
.wp svg { display: block; width: 100%; height: 120px; background: var(--card2); border-radius: 8px; }
.wpteam { position: absolute; left: 0; font-size: 11px; font-weight: 700; color: var(--muted); }
.wpteam.top { top: 2px; }
.wpteam.bot { bottom: 2px; }

/* ---------- line movement */
.move { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700;
  white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: 1px; }
.move.up { color: var(--accent2); background: rgba(43, 196, 180, .12); }
.move.down { color: var(--accent); background: rgba(255, 138, 61, .12); }
.movenote { padding: 0 14px 12px; margin: 0; }

/* ---------- picks */
.hdricon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: auto;
  border-radius: 50%; color: var(--muted); background: var(--card2); border: 1px solid var(--line); }
.hdricon.on { color: var(--accent); }
.hdricon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 760px) { .hdricon { display: none; } }
.pickbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: 6px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card2); color: var(--muted); cursor: pointer; padding: 0; }
.pickbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pickbtn.on { color: var(--accent); border-color: rgba(255, 138, 61, .5); }
.pickbtn.on svg { fill: currentColor; }
#picktoast { position: fixed; left: 50%; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 76px); z-index: 40; transform: translate(-50%, 20px);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; background: #2a2f38; border: 1px solid #3a414c;
  padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
#picktoast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#picktoast a { color: var(--accent); }
@media (min-width: 760px) { #picktoast { bottom: 24px; } }
.precord .pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.precord .pstats > div { background: var(--card2); border-radius: 10px; padding: 8px 4px; text-align: center; min-width: 0; }
.precord .pstats small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.precord .pstats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.up { color: var(--hit); }
.down { color: var(--miss); }
.psec { margin: 16px 2px 8px; }
.psec small { color: var(--muted); font-weight: 600; }
.pickcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.pickcard > a.row { padding: 12px 14px 8px; align-items: flex-start; }
.pickcard .name { font-weight: 650; overflow-wrap: anywhere; }
.pickcard .sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.pickcard .sub b { color: var(--text); }
.pickcard.win { border-left: 3px solid var(--hit); }
.pickcard.loss { border-left: 3px solid var(--miss); }
.pfoot { display: flex; align-items: center; gap: 8px; padding: 0 10px 10px 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pres b { color: var(--text); }
.pres b.up { color: var(--hit); }
.pres b.down { color: var(--miss); }
.punits select { width: auto; padding: 4px 8px; margin-left: 4px; }
.pclv { font-weight: 700; font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--card2); }
.pstatus { flex: none; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.pstatus.live { color: var(--miss); }
.pstatus.win { background: rgba(42, 211, 139, .15); color: var(--hit); }
.pstatus.loss { background: rgba(255, 92, 108, .15); color: var(--miss); }
.iconbtn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px; padding: 0; }
.iconbtn svg, .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.btn.danger { color: var(--miss); }
.pastebox { width: 100%; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 12px/1.4 ui-monospace, monospace; resize: vertical; }

/* ---------- app shell */
/* Installed on iOS the page runs under the status bar (black-translucent), so the header pads for it. */
#top { padding-top: max(10px, env(safe-area-inset-top)); }
.offline { position: sticky; top: calc(50px + env(safe-area-inset-top)); z-index: 19; padding: 6px 16px; text-align: center;
  font-size: 12px; font-weight: 650; color: #1a1205; background: var(--warm); }
.installchip { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 76px);
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 16px; font-size: 13px;
  background: var(--card2); border: 1px solid #3a414c; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.installchip > svg { width: 22px; height: 22px; flex: none; }
.installchip > span { flex: 1; min-width: 0; }
.installchip .btn { flex: none; background: var(--accent); color: #1a0f05; border-color: var(--accent); }
.installchip .x { flex: none; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 4px 6px; cursor: pointer; }
@media (min-width: 760px) { .installchip { left: auto; right: 16px; bottom: 16px; max-width: 380px; } }

/* ---------- projections */
.projtag { display: inline-flex; align-items: center; gap: 4px; margin: 6px 0 0; padding: 3px 8px; border-radius: 8px; font-size: 12px;
  color: var(--muted); background: var(--card2); border: 1px solid var(--line); }
.projtag b { color: var(--text); }
.projtag small { color: var(--faint); }
.projtag.lean { color: var(--hit); border-color: rgba(42, 211, 139, .35); }
.projtag.against { color: var(--miss); border-color: rgba(255, 92, 108, .3); }
.projbox { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.projbox > div { background: var(--card2); border-radius: 10px; padding: 8px 10px; min-width: 0; display: flex; flex-direction: column; }
.projbox small { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.projbox b { font-size: 22px; font-variant-numeric: tabular-nums; }
.projbox span { font-size: 12px; }
.projbox .note { grid-column: 1 / -1; margin: 0; }
.calib { width: 100%; height: auto; display: block; }
.calib text { fill: var(--muted); font-size: 11px; }
.metric { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.metric > div { background: var(--card2); border-radius: 10px; padding: 10px; }
.metric b { display: block; font-size: 22px; }
.metric small { color: var(--muted); }

/* ---------- layered props and props sorting (Updates 2 and 3) */
.proprow.compact > .head { padding: 10px 14px; }
.proprow .plink { display: inline-flex; flex: none; }
.proprow a.name { color: var(--text); }
.proprow a.name:hover { text-decoration: underline; }
.linepill { flex: none; display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 9px; border-radius: 9px; font-weight: 700;
  font-size: 13px; background: var(--card2); border: 1px solid #343a45; white-space: nowrap; font-variant-numeric: tabular-nums; }
.linepill small { font-size: 11px; color: var(--muted); font-weight: 600; }
.linepill.typical { border-style: dashed; }
.ladderwrap { padding: 0 14px 12px; }
.ladderctx { margin-bottom: 8px; }
.rates.r1 { grid-template-columns: 1fr; padding: 0 0 8px; }
.lrow { border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px 8px; margin-top: 8px; background: rgba(255, 255, 255, .015); }
.lrow.main { border-color: #3a414c; background: var(--card2); }
.lhead { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.lhead > b { font-size: 15px; }
.lfoot { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.lfoot .tag { font-size: 10px; padding: 1px 5px; }
a.brk { flex: none; font-size: 12px; font-weight: 750; color: var(--accent); padding: 5px 9px; border-radius: 999px;
  border: 1px solid rgba(255, 138, 61, .45); white-space: nowrap; }
a.brk:hover { background: rgba(255, 138, 61, .12); }
.rates.r1 > div { display: flex; justify-content: center; align-items: baseline; gap: 8px; padding: 5px 8px; }
.rates.r1 > div small { display: inline; }
/* player page: section jump bar, opponent list, starters */
.secbar { position: sticky; top: 52px; z-index: 15; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 12px;
  padding: 8px 12px; background: rgba(11, 13, 16, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.secbar::-webkit-scrollbar { display: none; }
.secbar a { flex: none; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--muted); background: var(--card); border: 1px solid var(--line); }
.secbar a.on { color: var(--text); border-color: #3a414c; background: var(--card2); }
[data-sec] { scroll-margin-top: 110px; }
.vslist td { font-size: 13px; }
.vslist td.res { font-weight: 800; font-size: 15px; }
.starters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.starters > div { min-width: 0; }
.starters a { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); min-width: 0; font-weight: 600; font-size: 14px; }
.starters a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projlabel { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin-top: 10px; padding: 8px 10px; border-radius: 10px;
  background: rgba(43, 196, 180, .08); border: 1px solid rgba(43, 196, 180, .3); }
.projlabel b { color: var(--text); }
/* props page: sort bar, filters sheet, teammate-out note */
.sortbar { position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 74px); display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none; padding: 6px; border-radius: 16px; background: rgba(24, 27, 33, .94); backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.sortbar::-webkit-scrollbar { display: none; }
.sortbar button { flex: none; border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 11px; cursor: pointer; }
.sortbar button.on { background: var(--text); color: #111; }
@media (min-width: 760px) { .sortbar { bottom: 16px; left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); } }
body:has(.sortbar) #foot { padding-bottom: 150px; }
#list { padding-bottom: 60px; }
.filterbtn { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 11px 16px; font-weight: 700; cursor: pointer; }
.filterbtn b { background: var(--accent); color: #111; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.propcard { display: block; }
.rates > div.sorted { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheetbody { width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.fsec { padding: 12px 0; border-top: 1px solid var(--line); }
.fsec h3 { margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.fsec h3 .muted { font-weight: 600; font-size: 13px; }
.fsec input[type=range] { width: 100%; accent-color: var(--accent); }
.toggles .toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-weight: 600; }
.toggles input { width: 22px; height: 22px; accent-color: var(--accent); }
.sheetfoot { position: sticky; bottom: -16px; display: flex; gap: 8px; padding: 12px 0 4px; background: var(--card); border-top: 1px solid var(--line); }
.sheetfoot .primary { margin-left: auto; background: var(--accent2); color: #062b28; border-color: var(--accent2); }
.linkish { border: 0; background: none; color: var(--text); font-weight: 650; cursor: pointer; padding: 0; }
body.noscroll { overflow: hidden; }

/* ---------- phone fit and tap behavior */
/* Fast taps on buttons (e.g. the line + / -) shouldn't trigger iPhone's double-tap zoom. */
a, button, input, select, label, summary, .proprow > .head, [data-step] { touch-action: manipulation; }
@media (max-width: 520px) {
  body { font-size: 14px; padding-bottom: 76px; }
  main { padding: 10px 10px 20px; }
  #top { padding: 6px 12px; padding-top: max(6px, env(safe-area-inset-top)); gap: 10px; }
  .brand { font-size: 16px; }
  .brand svg { width: 22px; height: 22px; }
  .hero { margin: -10px -10px 10px; padding: 10px 12px 10px; }
  .pagehead { margin: -10px -10px 10px; padding: 14px 12px 10px; }
  .days { margin: 0 -10px 10px; padding: 0 10px; }
  .back { width: 32px; height: 32px; font-size: 17px; }
  .phead { gap: 10px; margin-top: 6px; }
  .phead h1 { font-size: 21px; }
  .phead .hs { width: 52px !important; height: 52px !important; }
  .pagehead h1 { font-size: 24px; }
  .matchup .team b { font-size: 16px; }
  .card { padding: 11px; margin-bottom: 10px; border-radius: 12px; }
  .card.flush { padding: 0; }
  h2 { font-size: 16px; }
  .tabs { gap: 5px; margin-bottom: 10px; }
  .tabs button, .tabs a { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
  .tabs.under button { padding: 6px 0 8px; }
  .secbar { top: 44px; margin: 0 -10px 10px; padding: 6px 10px; }
  .secbar a { padding: 5px 10px; font-size: 12px; }
  .pill { padding: 5px 10px; font-size: 12px; }
  .search { padding: 10px 14px; }
  .linectl { gap: 6px; }
  .linectl button.step { width: 32px; height: 32px; font-size: 16px; }
  .linectl .val { font-size: 19px; min-width: 52px; }
  .seg button { padding: 6px 10px; font-size: 13px; }
  .windows { gap: 4px; margin-bottom: 10px; }
  .windows button { padding: 6px 1px; font-size: 10px; border-radius: 10px; }
  .windows button .rate { font-size: 14px; }
  .projlabel { font-size: 12px; padding: 7px 9px; }
  .note, .confnote { font-size: 11.5px; }
  .bars { height: 190px; }
  .bottomnav { padding: 4px; border-radius: 18px; left: 8px; right: 8px; }
  .bottomnav a { padding: 5px 2px; font-size: 11px; }
  .bottomnav svg { width: 20px; height: 20px; }
  .sortbar { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 62px); left: 8px; right: 8px; padding: 4px; }
  .sortbar button { padding: 7px 10px; font-size: 12px; }
  .proprow > .head { padding: 10px 12px; }
  .rates { gap: 4px; padding: 0 12px 10px; }
  .gamehead { padding: 10px 12px; }
  .mkt { padding: 0 12px 10px; }
  .price { padding: 3px 8px; font-size: 13px; }
}

/* ---------- line breakdown (Update 1) */
.golink { cursor: pointer; border-radius: 10px; }
.golink:hover .side b { text-decoration: underline; }
.gochev { color: var(--muted); font-weight: 800; margin-left: 4px; }
.lbhead { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.lbhead h1 { font-size: 22px; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; }
.estscore { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; margin: 4px 0 8px; }
.estbig { font-size: 15px; margin: 0; }
.estbig b { font-size: 18px; }
@media (max-width: 520px) { .lbhead h1 { font-size: 18px; } .estscore { font-size: 16px; } }
