:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --border: #d7dce8;
  --text: #101828;
  --text-muted: #5b657c;
  --accent: #2a78d6;
  --accent-rgb: 42,120,214;
  --accent-2: #eb6834;
  --accent-2-rgb: 235,104,52;
  --good: #0ca30c;
  --critical: #d03b3b;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1220; --surface: #121b2e; --surface-2: #1a2740; --border: #26344f;
    --text: #e7ecf5; --text-muted: #8ca0c4;
    --accent: #3987e5; --accent-rgb: 57,135,229;
    --accent-2: #d95926; --accent-2-rgb: 217,89,38;
    --good: #2fbf4f; --critical: #e66767;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220; --surface: #121b2e; --surface-2: #1a2740; --border: #26344f;
  --text: #e7ecf5; --text-muted: #8ca0c4;
  --accent: #3987e5; --accent-rgb: 57,135,229;
  --accent-2: #d95926; --accent-2-rgb: 217,89,38;
  --good: #2fbf4f; --critical: #e66767;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.35);
}
.nav-title { flex: 1 1 40px; font-weight: 700; font-size: 15px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nav-title::before { content: "/"; margin-right: 10px; color: var(--border); }
#acctBox { margin-left: auto; }
@media (max-width: 600px) { .topbar { gap: 10px; } }
.nav-head button { border: 0; background: var(--surface-2); color: var(--text-muted); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 14px; }
[data-g="players"] { --gc: #3b82d6; }
[data-g="props"] { --gc: #2fa26f; }
[data-g="teams"] { --gc: #e8743b; }
[data-g="stats"] { --gc: #14a3b8; }
[data-g="spots"] { --gc: #d6457a; }
[data-g="ask"] { --gc: #8b6bd8; }
[data-g="premium"] { --gc: #c9a227; }
.tab-group-label { margin: 14px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--gc, var(--text-muted)) 72%, var(--text)); display: flex; align-items: center; gap: 8px; }
.tab-group-label::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--gc) 35%, transparent); }
.tab-btn[data-g]::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gc); margin-right: 11px; vertical-align: 1px; }
.nav-title[data-g] { color: color-mix(in srgb, var(--gc) 72%, var(--text)); }
.nav-title[data-g]::before { color: var(--gc); }
.tab-btn {
  display: block; width: 100%; text-align: left;
  border: none; background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: 15px;
  padding: 10px 12px; border-radius: 9px; cursor: pointer;
}
.tab-btn.active { background: color-mix(in srgb, var(--gc, var(--accent)) 13%, var(--surface)); box-shadow: inset 3px 0 0 var(--gc, var(--accent)); color: color-mix(in srgb, var(--gc, var(--accent)) 75%, var(--text)); }
.tab-btn:hover:not(.active) { background: var(--surface-2); }

section[data-view] { display: none; }
section[data-view].active { display: block; }
a.pill.espn-link, button.pill.espn-btn { text-decoration: none; color: var(--accent); border-color: var(--accent); }
button.pill.espn-btn { background: transparent; font: inherit; font-size: inherit; cursor: pointer; }
button.pill.espn-btn.active { background: var(--accent); color: var(--surface, #fff); }
.espn-panel[hidden] { display: none; }
.espn-table td, .espn-table th { padding: 6px 8px; white-space: nowrap; }
.espn-table .team-logo { width: 20px; height: 20px; margin-right: 4px; }
a.pill.espn-link:hover { text-decoration: underline; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-muted);
}
.ask-input-row > .search-input, select.search-input { min-width: 0; max-width: 100%; }
.tbl-wrap { max-width: 100%; }
/* Narratives page: a player on the left, the note beside it (under it on a phone). */
.gn-row { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 5px 0 5px 8px; margin: 3px 0; }
.gn-who { flex: 0 0 230px; }
.gn-what { flex: 1 1 260px; font-size: 13.5px; }
@media (max-width: 600px) {
  .card { padding: 16px; }
  .row > .row { flex: 1 1 100% !important; } /* header filter groups: wrap under the title */
}
button { font: inherit; }
.search-input {
  width: 100%; padding: 13px 16px; border-radius: 11px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.ask-input-row { display: flex; gap: 8px; }
.ask-btn {
  background: var(--accent); color: #fff; border: none; border-radius: 11px; padding: 0 18px;
  font-weight: 700; font-size: 14px; cursor: pointer; flex: none;
}
.ask-btn:disabled { opacity: .55; cursor: default; }
.ask-btn:hover:not(:disabled) { filter: brightness(1.08); }
.sql-readout {
  padding: 9px 12px; background: var(--surface-2); border-radius: 8px; color: var(--text-muted);
  font-size: 12.5px; white-space: pre-wrap; word-break: break-word;
}
.ac-item:hover, .ac-item.hi { background: var(--surface-2); }
.ac-item.hi { box-shadow: inset 3px 0 0 var(--accent); }
.date-step .step-btn { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 8px; width: 34px; height: 36px; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.date-step .step-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.date-step .step-btn:disabled { opacity: .35; cursor: not-allowed; }

.profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px,1fr)); gap: 10px; margin-top: 14px; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:hover:not(.active) { color: var(--text); }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.team-logo { width: 26px; height: 26px; vertical-align: middle; margin-right: 6px; object-fit: contain; }
h1 .team-logo { width: 30px; height: 30px; margin: 0 6px 0 0; }
.team-logo.logo-d { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .team-logo.logo-l { display: none; }
  :root:not([data-theme="light"]) .team-logo.logo-d { display: inline-block; }
}
:root[data-theme="dark"] .team-logo.logo-l { display: none; }
:root[data-theme="dark"] .team-logo.logo-d { display: inline-block; }

.player-link { background: none; border: 0; border-bottom: 1px dotted var(--text-muted); padding: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.player-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.tbl-wrap { overflow-x: auto; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--text-muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--text); }
thead th.sortable::after { content: ""; display: inline-block; width: 0.7em; margin-left: 3px; opacity: 0.35; }
thead th.sort-desc::after { content: "▾"; opacity: 1; }
thead th.sort-asc::after { content: "▴"; opacity: 1; }
tbody tr:last-child td { border-bottom: none; }
td.hit-cell { border-radius: 6px; font-weight: 600; }

/* Player-by-market prop tables (Prop Board + a game's props page):
   sportsbook-slip layout -- names pinned on the left while the price
   columns scroll sideways on narrow screens. */
.prop-table th, .prop-table td { text-align: center; padding: 7px 5px; }
.prop-table th:first-child, .prop-table td.player-cell {
  position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left;
  padding-left: 2px; padding-right: 10px; box-shadow: 1px 0 0 var(--border);
}
.prop-table td.player-cell { white-space: normal; min-width: 116px; max-width: 150px; line-height: 1.25; }
/* Game props tables: pin the whole first column (line / team / players),
   not just its header, so the header can't slide over the others. */
#gameLevelCard .prop-table td:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left;
  padding-left: 2px; padding-right: 10px; box-shadow: 1px 0 0 var(--border);
}
#gameLevelCard .prop-table td.combo-names { white-space: normal; min-width: 116px; max-width: 150px; line-height: 1.25; }
.prop-table .player-link { text-align: left; }
.prop-table .player-team { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.chip-row.scroll-x .chip { flex: none; }
.chip-row.hide-empty .chip[disabled] { display: none; }
.props-table th, .props-table td { text-align: center; padding: 7px 6px; }
.props-table th:first-child, .props-table td:first-child { text-align: left; }
.props-table td.price { white-space: nowrap; }
.props-table .price-box { min-width: 48px; padding: 5px 4px; font-size: 13px; }
/* Phones: the Latest lines table scrolls in its own box so its header row
   can stay stuck to the top while scrolling down to the SOG props (sticky
   only works inside the box that scrolls, and the table already scrolls
   sideways). The prop column stays pinned on the left; the top-left
   header cell sits above both. */
@media (max-width: 600px) {
  /* Sized to fit under the site's sticky top bar (--topbar-h, measured
     in JS), so the stuck header row is never hidden behind it. */
  .latest-lines-wrap {
    overflow: auto;
    max-height: calc(100vh - var(--topbar-h, 200px) - 16px);
    max-height: calc(100dvh - var(--topbar-h, 200px) - 16px);
    scroll-margin-top: calc(var(--topbar-h, 200px) + 8px);
  }
  .latest-lines-wrap thead th {
    position: sticky; top: 0; z-index: 2; background: var(--surface);
    box-shadow: 0 1px 0 var(--border);
  }
  /* (Specific enough to beat .props-table.pin-first's z-index 1.) */
  .latest-lines-wrap .props-table.pin-first thead th:first-child { z-index: 3; top: 0; }
}
/* Click-to-inspect pop-up on the Latest lines cells */
#propsCard td[data-pop], #valueCard td[data-vpop], #analysisCard td[data-apop], #anBestCard td[data-bpop], td[data-gpop], .price-box[data-hist], td[data-bhit] { cursor: pointer; }
td[data-bhit].pop-active { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Today's goalies table: tight cells so goalie + the stats fit a phone screen (team / game / status sit off to the left). */
.gp-table th, .gp-table td { padding: 7px 4px; font-size: 12.5px; }
.gp-table th { white-space: normal; line-height: 1.15; vertical-align: bottom; letter-spacing: 0; }
.gp-table th:nth-child(n+7) { max-width: 54px; }
.gp-table td.gp-goalie { text-align: left; }
.price-box.pop-active { outline: 2px solid var(--accent); outline-offset: 1px; }
.value-table td.vt-player, .value-table th.vt-player {
  position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border);
  min-width: 110px; max-width: 150px; white-space: normal; line-height: 1.25;
}
.value-table td.vt-player .player-link { text-align: left; }
.value-table .vt-edge { font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) {
  .value-table th, .value-table td { padding: 6px 4px; font-size: 12px; }
  .value-table td.vt-player, .value-table th.vt-player { min-width: 96px; max-width: 120px; }
  .value-table .price-box { min-width: 46px; padding: 5px 3px; font-size: 12px; }
  .value-table .rank-badge { transform: scale(.85); }
}
#returnBar { margin-bottom: -4px; }
#returnBar .chip { font-weight: 600; }
#propsCard td.pop-active { outline: 2px solid var(--accent); outline-offset: -2px; }
.cell-pop {
  position: absolute; z-index: 60; width: 260px; max-width: calc(100vw - 16px);
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(16,24,40,.22); padding: 12px 14px; font-size: 13px;
}
.sv-tag { font-size: 11px; color: var(--text-muted); margin-left: 4px; font-weight: 400; }
.cell-pop.wide { width: 380px; }
/* A long list (By The Odds): fixed in the middle of the screen, never past its edges; the table scrolls inside it, both ways, with the header row kept. */
.cell-pop.list { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 16px)); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; box-sizing: border-box; }
.cell-pop.list .pop-head { flex: none; }
.cell-pop.list .pop-body { flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; margin-top: 8px; }
.cell-pop.list .pop-games { margin-top: 0; white-space: nowrap; }
.cell-pop.list .pop-games thead td { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.cell-pop.hist { width: 300px; }
.cell-pop .pop-hist { table-layout: auto; }
.cell-pop .pop-hist td { vertical-align: top; padding: 6px 4px; }
.cell-pop .pop-hist .hist-label { font-weight: 600; }
.cell-pop .pop-hist .hist-odds { font-weight: 700; text-align: right; white-space: nowrap; }
.cell-pop .pop-hist .hist-pct { text-align: right; white-space: nowrap; padding-left: 10px; }
.cell-pop.wide .pop-games td .small { white-space: normal; }
.cell-pop .pop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cell-pop .pop-title { font-weight: 700; }
.cell-pop .pop-x { border: 0; background: var(--surface-2); color: var(--text-muted); width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-size: 12px; flex: none; }
.cell-pop .pop-x:hover { color: var(--text); }
.cell-pop .pop-big { font-size: 17px; font-weight: 700; margin: 8px 0 2px; }
.cell-pop .pop-games { width: 100%; margin-top: 8px; font-size: 12.5px; }
.cell-pop .pop-games td { padding: 4px 4px; text-align: left; border-bottom: 1px solid var(--border); }
.cell-pop .pop-games tr:last-child td { border-bottom: none; }
.cell-pop .pop-mark { text-align: center !important; font-weight: 800; }
.cell-pop .pop-mark.hit { color: var(--good); }
.cell-pop .pop-mark.miss { color: var(--critical); }
.props-table td.spot-cell { line-height: 1.15; min-width: 52px; }
.props-table .spot-edge { font-size: 11px; font-weight: 700; margin-top: 2px; }
.props-table th.spot-head { white-space: normal; min-width: 52px; line-height: 1.2; }
@media (max-width: 600px) { .props-table th, .props-table td { padding: 6px 4px; font-size: 12.5px; } }
.props-table.pin-first th:first-child, .props-table.pin-first td:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border);
}
.prop-table .player-name { font-weight: 600; }
.price-box {
  display: inline-block; min-width: 58px; padding: 7px 6px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--accent); font-weight: 700; font-size: 13.5px; text-align: center;
}
.price-box.empty { border-color: var(--border); color: var(--text-muted); font-weight: 400; opacity: .6; }
.price-box.hit { border-color: var(--good); color: var(--good); }
.price-box.miss { border-color: var(--critical); color: var(--critical); }
/* Starting-goalie status badges */
.gbadge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 1px 6px; border-radius: 999px; border: 1px solid; white-space: nowrap; vertical-align: 1px; }
.gbadge.confirmed { color: var(--good); border-color: var(--good); }
.gbadge.likely { color: #b7791f; border-color: #b7791f; }
.gbadge.unconfirmed { color: var(--text-muted); border-color: var(--border); }
.gbadge.not { color: var(--critical); border-color: var(--critical); }
/* One goalie per line (team, name, status badge kept together). */
.gt-dd { margin-top: 10px; border-top: 1px solid var(--border); }
.gt-det { border-bottom: 1px solid var(--border); }
.gt-det:last-child { border-bottom: 0; }
.gt-det > summary { cursor: pointer; padding: 8px 2px; font-size: 13px; font-weight: 700; color: var(--text-muted); list-style: none; display: flex; align-items: center; gap: 8px; }
.gt-det > summary::-webkit-details-marker { display: none; }
.gt-det > summary::before { content: "▸"; font-size: 11px; width: 10px; }
.gt-det[open] > summary::before { content: "▾"; }
.gt-det[open] > summary { color: var(--text); }
.gt-body { padding: 2px 0 10px; cursor: default; }
.gt-team { margin: 8px 0 4px; font-size: 13px; }
.starter-row { font-size: 12.5px; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.starter-line { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
/* Opposing-goalie line on the Props & Odds card, and tier labels */
.goalie-line { font-size: 13px; margin: 2px 0 10px; line-height: 1.6; }
/* Profile matchup panels (opposing goalie + opposing defense) */
.matchup { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; margin: 10px 0 16px; }
.mu-panel { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.mu-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 20px; color: var(--text-muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.mu-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mu-row { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; }
.mu-big { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 40px; line-height: 1; }
.mu-sub { font-size: 12.5px; line-height: 1.3; }
.mu-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.mu-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 7px 9px; min-width: 0; }
.mu-stat .v { font-size: 16px; font-weight: 700; line-height: 1.1; }
.mu-stat .v small { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.mu-stat .l { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; line-height: 1.2; }
.mu-stat .rk { font-size: 12px; font-weight: 700; margin-top: 2px; color: var(--text-muted); }
.mu-stat .rk.soft { color: var(--good); }
.mu-stat .rk.tough { color: var(--critical); }
.mu-note { color: var(--text-muted); font-size: 11.5px; margin-top: 8px; line-height: 1.45; }
table.pos-mini th, table.pos-mini td { padding: 6px 12px 6px 0; }
table.pos-mini th:first-child, table.pos-mini td:first-child { text-align: left; }
table.pos-mini td.rk.soft { color: var(--good); }
table.pos-mini td.rk.tough { color: var(--critical); }
table.lines-table th, table.lines-table td { padding: 8px 14px 8px 0; vertical-align: top; text-align: left; }
table.lines-table td:first-child, table.lines-table th:first-child { width: 48px; }
.line-player { line-height: 1.3; min-width: 150px; }
/* A phone: a table of rows that carry a long note (injuries, line movement, returning) becomes a card per row: the first cells side by side, the last cell (the note or the move) on its own line, with no sideways scroll. */
@media (max-width: 600px) {
  table.stack-rows, table.stack-rows tbody, table.stack-rows tr, table.stack-rows td { display: block; }
  table.stack-rows thead { display: none; }
  table.stack-rows tr[hidden] { display: none; }      /* (the flex layout would otherwise show the alternate-line rows that are folded away) */
  table.stack-rows tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 9px 0; border-top: 1px solid var(--border); }
  table.stack-rows tr:first-child { border-top: 0; }
  table.stack-rows td { padding: 0; border: 0; white-space: normal; width: auto !important; min-width: 0 !important; max-width: none !important; }
  table.stack-rows td:first-child { flex: 1 1 auto; }
  table.stack-rows td:last-child { flex: 1 0 100%; }
  table.stack-rows td[data-l]::before { content: attr(data-l) " "; font-size: 11.5px; font-weight: 400; color: var(--text-muted); }
  table.stack-rows .line-player { min-width: 0; }
  table.stack-rows td { text-align: left; }
  /* Returning: the team and the player on the first line (the player takes the rest of it), then back on, the game before and games missed side by side. */
  table.ret-rows td:first-child { flex: 0 0 auto; }
  table.ret-rows td:nth-child(2) { flex: 1 1 60%; }
  table.ret-rows td:last-child { flex: 0 0 auto; }
}
/* A phone: the game page's Allowed to each position shows one small table for each team instead of the two-team table, and Faceoffs wraps its cells (the last-ten number goes under the season's). */
.pos-phone { display: none; }
@media (max-width: 600px) {
  .pos-desk { display: none; }
  .pos-phone { display: block; margin-top: 8px; }
  .pos-phone th, .pos-phone td { padding: 6px 5px; }
  .pos-phone th { white-space: normal; font-size: 10.5px; line-height: 1.15; }
  .pos-phone th:first-child { max-width: 72px; }
  .pos-phone td .muted.small { display: block; }
  table.fo-table th, table.fo-table td { padding: 6px 4px 6px 0; white-space: normal; text-align: left; font-size: 12px; }
  table.fo-table th { font-size: 10.5px; line-height: 1.15; }
  table.fo-table td:first-child { white-space: nowrap; }
  table.fo-table td .muted.small { display: block; }
}
/* A phone: the game tile's Team comparison (a label and the two teams' numbers) keeps its three columns but tighter, with long labels wrapping. */
@media (max-width: 600px) {
  table.cmp-table th, table.cmp-table td { padding: 6px 8px 6px 0; }
  table.cmp-table td:first-child, table.cmp-table th:first-child { width: auto; white-space: normal; }
  table.cmp-table td:not(:first-child), table.cmp-table th:not(:first-child) { white-space: nowrap; }
}
/* A phone: a line's players stack (the slot, then the player) instead of three columns that scroll sideways. The forward lines and defense pairs only; the other lines-tables keep their columns. */
@media (max-width: 600px) {
  table.line-grid, table.line-grid tbody, table.line-grid tr, table.line-grid td { display: block; width: auto; }
  table.line-grid thead { display: none; }
  table.line-grid tr { padding: 8px 0 6px; border-top: 1px solid var(--border); }
  table.line-grid tr:first-child { border-top: 0; }
  table.line-grid td { padding: 3px 0; border-bottom: 0; }
  table.line-grid td:first-child, table.line-grid td:first-child { width: auto; padding-bottom: 2px; font-size: 13px; color: var(--text-muted); }
  table.line-grid td[data-pos] { display: flex; gap: 10px; align-items: baseline; }
  table.line-grid td[data-pos]::before { content: attr(data-pos); flex: none; width: 24px; font: 700 11.5px var(--mono, ui-monospace, monospace); color: var(--text-muted); }
  table.line-grid .line-player { min-width: 0; flex: 1; }
}
.report-link { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--critical); text-decoration: none; border: 1px solid color-mix(in srgb, var(--critical) 45%, var(--border)); background: color-mix(in srgb, var(--critical) 7%, transparent); border-radius: 999px; padding: 6px 14px; }
.report-link:hover { background: color-mix(in srgb, var(--critical) 14%, transparent); }
.report-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; margin-top: 16px; padding: 12px 14px; font-size: 14px; border: 1px solid color-mix(in srgb, var(--critical) 45%, var(--border)); background: color-mix(in srgb, var(--critical) 7%, transparent); border-radius: 12px; }
.report-card[hidden] { display: none; }
.report-card { border-color: color-mix(in srgb, var(--critical) 35%, var(--border)); }
button.report-btn { background: var(--critical); padding: 9px 18px; }
.report-row { padding: 10px 0; border-top: 1px solid var(--border); }
.pos-tag { font-family: var(--mono, ui-monospace, monospace); font-size: 10.5px; font-weight: 600; color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; margin-left: 2px; vertical-align: 1px; white-space: nowrap; letter-spacing: .02em; }
.profile-name .pos-tag { font-size: 13px; padding: 1px 6px; margin-left: 8px; vertical-align: 4px; }
.alt-toggle { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted); font: inherit; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 1px 7px; margin-right: 6px; cursor: pointer; white-space: nowrap; }
.alt-toggle:hover { color: var(--accent); border-color: var(--accent); }
tr.alt-row td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
tr.alt-row td:first-child { padding-left: 30px; }
.proj-pop { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.gtier-pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 1px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.gtier-pill.strong { color: var(--critical); border-color: var(--critical); }
.gtier-pill.weak { color: var(--good); border-color: var(--good); }
.gtier-pill.average { color: var(--text-muted); border-color: var(--border); }
.tierbar { display: flex; gap: 4px; margin-top: 10px; }
.tb-seg { flex: 1; text-align: center; padding: 5px 4px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 11px; color: var(--text-muted); line-height: 1.25; }
.tb-seg b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.tb-seg.on { font-weight: 700; color: var(--text); }
.tb-seg.on.weak { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.tb-seg.on.strong { border-color: var(--critical); background: color-mix(in srgb, var(--critical) 14%, var(--surface)); }
.tb-seg.on.average { border-color: var(--text-muted); }
.ll-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 2px; }
.ll-head .ll-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-right: 4px; }
.range-box input { width: 72px; padding: 5px 8px; font-size: 13px; }
.ctx-chip { font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.ctx-chip.date { border-color: var(--accent); color: var(--accent); }
/* Profile prop table: spot columns read as one group; prop + price stay pinned */
.props-table th.spot-head { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.latest-lines-wrap .props-table.pin-first th:first-child, .latest-lines-wrap .props-table.pin-first td:first-child { min-width: 100px; }
.latest-lines-wrap .props-table th:nth-child(2), .latest-lines-wrap .props-table td:nth-child(2) {
  position: sticky; left: 100px; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border);
}
.latest-lines-wrap .props-table thead th:nth-child(2) { z-index: 3; }
/* Filter panels (Best Value) */
.fpanel { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; align-items: stretch; }
.fgrp { border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px 12px; background: var(--surface-2); }
.fgrp-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: 8px; }
.fgrp-body { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.fl { margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; color: var(--text-muted); }
.fsaved { align-self: flex-end; margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
/* Best edges table: compact, text columns left-aligned, spots may wrap */
table.be-table th, table.be-table td { padding: 7px 6px; }
table.be-table th.l, table.be-table td.l { text-align: left; }
table.be-table td.wrap-ok { white-space: normal; min-width: 90px; max-width: 190px; line-height: 1.25; }
a.chip.game-link { text-decoration: none; color: var(--accent); border-color: var(--accent); background: transparent; display: inline-flex; align-items: center; gap: 2px; }
a.chip.game-link:hover { background: var(--surface-2); }
a.chip.game-link .team-logo { width: 18px; height: 18px; margin: 0 2px 0 0; }
.gtier { font-weight: 700; }
.gtier.strong { color: var(--critical); }  /* a strong goalie is bad news for scoring props */
.gtier.weak { color: var(--good); }
.gtier.average { color: var(--text-muted); }
.satier { font-weight: 700; font-size: .85em; }
.satier.soft { color: var(--good); }       /* a team that allows many shots is good news for SOG props */
.satier.tough { color: var(--critical); }
.satier.average { color: var(--text-muted); }
a.rank-link { text-decoration: none; cursor: pointer; }
.be-active.on { color: var(--good); font-weight: 700; }
a.rank-link:hover .rank-badge { outline: 2px solid var(--accent); }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border-radius: 6px; background: var(--surface-2); font-size: 11px; font-weight: 700; color: var(--text-muted);
}
.example-chip { font-size: 12.5px; }
.answer-summary {
  font-size: 14.5px; padding: 10px 14px; background: var(--surface-2); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; margin-bottom: 12px;
}

/* Recent Games chart: a y axis on the left, bars with their value above, and the date and vs / @ opponent under each (plot 110px high + 32px of labels). */
.bars-wrap { display: flex; align-items: stretch; gap: 6px; }
.bars-y { position: relative; flex: 0 0 auto; min-width: 26px; height: 158px; font-size: 10.5px; color: var(--text-muted); }
.bars-y span { position: absolute; right: 0; transform: translateY(50%); line-height: 1; }
.bars { position: relative; flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 3px; height: 158px; padding-top: 16px; overflow-x: auto; overflow-y: hidden; box-sizing: border-box; }
.bars-y { box-sizing: border-box; }
.bar-plot { position: relative; width: 100%; height: 110px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--border); }
.bar-lbl { height: 32px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; line-height: 1.25; color: var(--text-muted); white-space: nowrap; }
.bar-v { position: absolute; bottom: 100%; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 600; padding-bottom: 1px; }
.line-marker { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--critical); z-index: 4; pointer-events: none; }
.bar-col { flex: 1; min-width: 38px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.bar { position: relative; width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; background: var(--accent); }
.bar-col:hover .bar-tip { display: block; }
.bar-tip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); font-size: 11px; padding: 4px 7px; border-radius: 6px; white-space: nowrap; z-index: 5;
}

.error-box { color: var(--critical); font-size: 13.5px; padding: 10px 14px; background: color-mix(in srgb, var(--critical) 12%, var(--surface)); border-radius: 8px; }
footer { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; line-height: 1.6; }

/* ---------- save/share-query account UI ---------- */
.modal-overlay {
  /* display:none as the base and :not([hidden]) to turn it on -- an
     author-stylesheet "display" rule on the element itself beats the
     browser's own [hidden]{display:none} UA rule (author origin always
     wins over UA origin in the cascade, regardless of specificity), so
     just setting display:flex here made the hidden attribute a no-op
     and left this overlay permanently covering the page, eating every
     click on both mobile and desktop. */
  position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, #000 45%, transparent);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay:not([hidden]) { display: flex; }
.modal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 20px; width: 100%; max-width: 420px;
}
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100vw - 32px);
}
.shot-panel { margin: 0; }
.rink-svg { width: 100%; height: auto; display: block; }
.rink-svg .rk-ice { fill: var(--surface); stroke: var(--text-muted); stroke-width: .5; }
.rink-svg .rk-red { stroke: var(--critical); stroke-width: .5; opacity: .7; }
.rink-svg .rk-blue { stroke: var(--accent); stroke-width: .8; opacity: .7; }
.rink-svg .rk-line { fill: none; stroke: var(--text-muted); stroke-width: .35; }
.rink-svg .rk-dot { fill: var(--critical); opacity: .7; }
.rink-svg .rk-crease { fill: rgba(var(--accent-rgb), .18); stroke: var(--accent); stroke-width: .3; }
.rink-svg .rk-zone { fill: none; stroke: var(--text-muted); stroke-width: .25; stroke-dasharray: 1.5 1.5; opacity: .8; }
.rink-svg .rk-goal, .rk-key i.rk-goal { fill: var(--good); stroke: var(--text); stroke-width: .25; }
.rink-svg .rk-sog, .rk-key i.rk-sog { fill: var(--accent); opacity: .75; }
.rink-svg .rk-miss, .rk-key i.rk-miss { fill: none; stroke: var(--text-muted); stroke-width: .35; }
.rink-svg .rk-block { fill: none; stroke: var(--accent-2); stroke-width: .4; }
.rink-svg .rk-heat { fill: var(--accent-2); }
.rk-key { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; }
.rk-key i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; font-style: normal; line-height: 9px; text-align: center; }
.rk-key i.rk-goal { background: var(--good); } .rk-key i.rk-sog { background: var(--accent); }
.rk-key i.rk-miss { border: 1.5px solid var(--text-muted); } .rk-key i.rk-blockk { color: var(--accent-2); font-weight: 700; }
.search-input.shot-sel { width: auto; min-width: 0; }

/* Account email notice: shown under the top bar until the account has an email. No dismiss button on purpose. */
.email-banner { gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; padding: 10px 14px; border-radius: 8px; font-size: 13.5px;
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.email-banner[hidden] { display: none; }

/* Pro-only Analysis (account.js ANALYSIS_PRO_ONLY; off for now, so none of this shows): a PRO tag on the nav button, and the tab
   shows an upgrade card instead of its content for free and signed-out visitors. */
body.analysis-pro-only .tab-btn[data-view="analysis"]::after { content: "PRO"; margin-left: 8px; padding: 1px 6px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: .06em; border: 1px solid var(--accent); color: var(--accent); }
.paywall { display: none; }
body.analysis-locked section[data-view="analysis"] > .paywall { display: block; }
body.analysis-locked section[data-view="analysis"] > .grid { display: none; }
.lh-dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); padding: 16px 18px; width: 100%; max-width: 980px; max-height: 88vh; display: flex; flex-direction: column; min-width: 0; }
.lh-dialog .pop-x { border: 0; background: var(--surface-2); color: var(--text-muted); width: 28px; height: 28px; border-radius: 7px; cursor: pointer; font-size: 13px; flex: none; }
.lh-dialog .pop-x:hover { color: var(--text); }
.lh-table th, .lh-table td { padding: 6px 8px; text-align: center; }
.lh-table th:first-child, .lh-table td:first-child { text-align: left; }
.lh-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; box-shadow: 0 1px 0 var(--border); }
.lh-menu[hidden], .lh-sub[hidden] { display: none; }
.lh-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.lh-menu button:hover { background: var(--surface-2); }
.lh-menu .lh-grp-head { font-weight: 800; letter-spacing: .01em; }
.lh-grp-head .tg { display: inline-block; width: 1em; color: var(--text-muted); }
.lh-sub { padding-left: 16px; }
.lh-pick.active { color: var(--accent); font-weight: 700; }
body.lh-open { overflow: hidden; }
.odds-step:focus-within { border-color: var(--accent); }
.odds-step input.search-input { border: 0 !important; border-radius: 0 !important; width: 68px !important; padding: 8px 2px !important; text-align: center; background: transparent; box-shadow: none; }
.odds-step input.search-input:focus { outline: none; }
.odds-step button { border: 0; background: var(--surface-2); color: var(--text); width: 26px; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.odds-step button:hover { color: var(--accent); }
.odds-step button.odds-x { width: 22px; font-size: 14px; color: var(--text-muted); background: transparent; }
.odds-step input:placeholder-shown ~ .odds-x { visibility: hidden; }
.help-btn:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 560px) { .help-txt { display: none; } .help-btn { padding: 0 6px; } }
.lh-dialog.tut-dialog { max-width: 640px; }
.tut-steps li::before { content: counter(tut); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tut-tips li { margin-bottom: 4px; }
body.tut-open { overflow: hidden; }

/* A phone: the profile's Droughts & streaks table becomes a card per row: the stat and line first (on Blueline the stat and line controls take the whole first line), then right now, longest drought, longest streak and hit rate under their labels. */
@media (max-width: 600px) {
  table.strk-rows td:last-child { flex: 0 0 auto; }
  table.strk-ctl td:first-child { flex: 1 0 100%; }
  table.strk-ctl td:last-child { margin-left: auto; }
}

.spots-toggle-row { display: none; }
/* A phone: the player profile's Props & Odds tables become cards (the numbers carry their column's heading as data-l: /shared/js/table-labels.js). The prop ladder is one card per prop:
   the prop on the first line, then its price(s), implied chance and result, then each spot / split hit rate as a small tile, two to a line (a split with no games is left out).
   The other three tables (situations, record by prop, line history) are plain stacked rows. */
@media (max-width: 600px) {
  table.lbl-rows td:last-child { flex: 0 0 auto; }
  table.lbl-rows.pin-first td:first-child, table.lbl-rows.pin-first td:nth-child(2) { position: static; box-shadow: none; min-width: 0; background: transparent; }
  table.lbl-rows td[data-empty] { display: none; }
  .latest-lines-wrap { overflow: visible; max-height: none; }
  table.prop-cards tr { gap: 6px 8px; padding: 10px 0; }
  table.prop-cards td:first-child { flex: 1 0 60%; font-size: 14px; font-weight: 700; order: 1; }
  table.prop-cards td.price { order: 2; flex: 0 0 auto; text-align: left; display: flex; align-items: center; gap: 6px; }
  table.prop-cards td[data-l="Implied"] { order: 3; flex: 0 0 auto; }
  table.prop-cards td[data-l="Result"] { order: 1; flex: 0 0 auto; margin-left: auto; font-weight: 700; }
  table.prop-cards td.hit-cell { order: 5; flex: 1 1 calc(33% - 6px); min-width: 0; padding: 3px 8px; text-align: left; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; line-height: 1.2; }
  /* the spot / split tiles stay folded until "Show spot splits" is on: the price and the L10 / season / all rates are what a card shows by default */
  table.prop-cards td.spot-cell { display: none; order: 6; flex: 1 1 calc(50% - 6px); }
  .spots-open table.prop-cards td.spot-cell { display: flex; }
  .spots-toggle-row { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; }
  .spots-toggle-row .chip { flex: none; white-space: nowrap; }
  table.prop-cards td.hit-cell::before { flex: 1 0 100%; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
  table.prop-cards td.hit-cell .spot-edge { margin-top: 0; }
  table.prop-cards tr.alt-row td:first-child { padding-left: 14px; }
}

/* A phone: the notes under a player's name (injured / back from injury, line change) sit on their own line, each one a whole box that wraps inside itself instead of splitting its border across lines. */
@media (max-width: 600px) {
  #playerStatus { display: block; margin-top: 6px; }
  #playerStatus .pos-tag { display: inline-block; max-width: 100%; white-space: normal; vertical-align: top; margin: 0 6px 6px 0; padding: 2px 8px; line-height: 1.35; font-size: 12px; }
}

/* the note that holds the standard / main line's place in an opened ladder */
tr.alt-std td { font-size: 12px; font-style: italic; padding: 4px 8px 4px 30px; }
@media (max-width: 600px) {
  table.prop-cards tr.alt-std { padding: 2px 0; border-top: 0; }
  table.prop-cards tr.alt-std td:first-child { flex: 1 0 100%; font-size: 12px; font-weight: 400; font-style: italic; padding-left: 14px; }
}

/* A phone: the team profile's market chips (Moneyline / Puck line / Game total / Team total) wrap instead of scrolling sideways, and the shot-map side tables get tighter cells. */
@media (max-width: 600px) {
  .chip-row.scroll-x:has(> [data-market]) { flex-wrap: wrap; overflow: visible; }
  table.pos-mini th, table.pos-mini td { padding: 6px 8px 6px 0; }
}

/* A phone: the Prop Board is a card per player. The player and result on the first line, then the price of the line the hit rates measure (every line's price after "Show all lines"), then L10 hit v opp,
   L10 hit and L10 avg as tiles. The header controls and sorting move to the row above (board-phone-ctl). */
.board-phone-ctl, .board-phone-note { display: none; }
@media (max-width: 600px) {
  .board-phone-ctl { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 0 0 10px; }
  .board-phone-ctl label { display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
  .board-phone-ctl input { display: block; width: 62px; margin-top: 3px; padding: 6px 8px; font-size: 13.5px; }
  .board-phone-ctl select { display: block; margin-top: 3px; padding: 6px 8px; font-size: 13px; width: auto; max-width: 200px; }
  .board-phone-ctl .chip { flex: none; white-space: nowrap; }
  .board-phone-note { display: block; margin: -2px 0 10px; }
  table.board-cards th:first-child, table.board-cards td.player-cell { position: static; box-shadow: none; min-width: 0; max-width: none; background: transparent; }
  table.board-cards tr { gap: 6px 8px; padding: 10px 0; }
  table.board-cards td.player-cell { flex: 1 1 0; order: 1; font-size: 14px; }
  table.board-cards td.player-cell .player-team { display: inline; margin-left: 6px; }
  table.board-cards td[data-l="Result"] { order: 1; flex: 0 0 auto; font-weight: 700; }
  table.board-cards td.price { display: none; order: 2; flex: 0 0 auto; text-align: left; }
  table.board-cards td.price[data-main], .lines-open table.board-cards td.price { display: flex; align-items: center; gap: 6px; }
  table.board-cards td.price[data-main] { order: 1; margin-left: auto; }
  /* with every line shown, the prices take their own line under the player, three to a line */
  .lines-open table.board-cards td.player-cell { flex: 1 0 100%; }
  .lines-open table.board-cards td.price, .lines-open table.board-cards td.price[data-main] { order: 2; margin-left: 0; flex: 1 1 calc(33% - 8px); flex-direction: column; align-items: stretch; gap: 2px; min-width: 0; }
  .lines-open table.board-cards td.price::before { font-size: 10.5px; }
  table.board-cards td[data-empty] { display: none !important; }
  table.board-cards td.hit-cell[data-l$="v opp"] { flex: 1.5 1 36%; }
  table.board-cards td.price[data-main]::before { display: none; }
  .lines-open table.board-cards td.price[data-main]::before { display: inline; font-size: 11.5px; }
  table.board-cards tr::after { content: ""; flex: 0 0 100%; order: 4; height: 0; }      /* the tiles start a new line under the player and price */
  table.board-cards td.hit-cell, table.board-cards td[data-l$=" avg"] { order: 5; flex: 1 1 26%; min-width: 0; padding: 3px 8px; text-align: left; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; line-height: 1.2; border-radius: 6px; }
  table.board-cards td[data-l$=" avg"] { background: var(--surface-2); }
  table.board-cards td.hit-cell::before, table.board-cards td[data-l$=" avg"]::before { flex: 1 0 100%; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
  table.board-cards td.hit-cell .spot-edge { margin-top: 0; }
}

/* A phone: Biggest Movers is a card per move. Rank, selection and the probability shift on the first line, the prop and matchup under it,
   then the opening / baseline price, the latest price and the result. */
@media (max-width: 600px) {
  table.mov-rows tr { gap: 3px 10px; padding: 10px 0; }
  table.mov-rows td { order: 3; }
  table.mov-rows td:first-child { order: 1; flex: 0 0 auto; }
  table.mov-rows td:nth-child(2) { order: 1; flex: 1 1 calc(100% - 120px); font-weight: 600; }
  table.mov-rows td:nth-last-child(2) { order: 1; flex: 0 0 auto; margin-left: auto; font-size: 14px; }
  table.mov-rows tr::after { content: ""; order: 2; flex: 1 0 100%; height: 0; }
  table.mov-rows td[data-l="Prop"], table.mov-rows td[data-l="Line"], table.mov-rows td[data-l="Matchup"] { order: 2; flex: 0 0 auto; font-size: 12px; }
  table.mov-rows td:last-child { order: 2; flex: 0 0 auto; margin-left: auto; font-weight: 700; font-size: 12px; }      /* the result rides the prop / matchup line */
  table.mov-rows td:last-child::before { display: none; }
  table.mov-rows td[data-l="Selection"]::before, table.mov-rows td[data-l="Prop"]::before, table.mov-rows td[data-l="Line"]::before, table.mov-rows td[data-l="Matchup"]::before,
  table.mov-rows td[data-l="Prob Shift"]::before, table.mov-rows td[data-l="Prob shift"]::before, table.mov-rows td[data-l="Move"]::before { display: none; }
  table.mov-rows td[data-empty] { display: none; }
}

/* A phone: the referee tables are cards (stack-rows). A table with sort-heads keeps its sortable headings as a row of small buttons above the cards. */
@media (max-width: 600px) {
  table.sort-heads thead { display: block; }
  table.sort-heads thead tr { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; border: 0; }
  table.sort-heads thead th { display: block; width: auto; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; white-space: nowrap; position: static; }
  table.sort-heads thead th:not([data-k]):not([data-sk]) { display: none; }
  table.ref-crew td:nth-child(2) { flex: 1 0 100%; }
  table.ref-crew td:last-child, table.ref-all td:last-child { flex: 0 0 auto; }
  table.ref-all td:first-child { font-weight: 700; }
  table.stack-rows td[colspan]::before { display: none; }
  table.ref-crew td[colspan] { flex: 1 1 100%; }
}

/* A phone: Points Combos is a card per combo: rank, players and team on the first line, then the labelled counts. */
@media (max-width: 600px) {
  table.pc-rows td:first-child { flex: 0 0 auto; }
  table.pc-rows td:nth-child(2) { flex: 1 1 calc(100% - 110px); font-weight: 600; }
  table.pc-rows td:nth-child(3) { flex: 0 0 auto; margin-left: auto; }
  table.pc-rows td:last-child { flex: 0 0 auto; }
  table.pc-rows td[data-l="Players"]::before, table.pc-rows td[data-l="Team"]::before { display: none; }
  table.pc-rows tr:has(td:nth-child(3))::after { content: ""; order: 1; flex: 1 0 100%; height: 0; }
  table.pc-rows td:nth-child(4), table.pc-rows td:nth-child(6) { order: 2; }      /* shared goals and games together share a line */
  table.pc-rows td:nth-child(5), table.pc-rows td:nth-child(7) { order: 3; }
}

/* The Games screen's Line movement dropdown, at any width (a tile is narrow even on a desktop): the player and the kind of move on the first line, the change and its injury note wrapping under it. */
table.mv-rows tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
table.mv-rows td { white-space: normal; padding: 0; width: auto; }
table.mv-rows td:first-child { flex: 1 1 auto; width: auto; }
table.mv-rows td:last-child { flex: 1 0 100%; }
table.mv-rows tbody, table.mv-rows { display: block; }
table.mv-rows tr { padding: 8px 0; border-top: 1px solid var(--border); }
table.mv-rows tr:first-child { border-top: 0; }
.lg-snap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.lg-snap-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 3px 0; }
.lg-snap-row > div:first-child { min-width: 0; }
.lg-snap-col .line-odds { background: var(--surface); }
.lg-snap-col { min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
/* The price beside a name on the Lines page: in the space to his right, and pushed to the edge on a phone, where a line's players are stacked. */
.line-player.has-odds { display: flex; align-items: flex-start; gap: 14px; }
.line-odds { flex: none; white-space: nowrap; padding: 2px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 13px; }
@media (max-width: 600px) { .line-player.has-odds { justify-content: space-between; } }
/* A middle-sized window: no room beside the name in a three-column line, so the price sits under it. */
@media (min-width: 601px) and (max-width: 1100px) { table.line-grid .line-player.has-odds { display: block; } table.line-grid .line-odds { display: inline-block; margin-top: 4px; } }
.line-player.has-odds > div:first-child { min-width: 0; }
@media (max-width: 600px) { .line-player.has-odds { gap: 8px; } .line-odds { font-size: 12px; padding: 1px 6px; } }
.goalie-note { font-size: 10.5px; font-weight: 400; line-height: 1.2; }
/* Games by line: a row opens the games behind it. */
.lg-table tr.lg-row { cursor: pointer; }
.lg-table tr.lg-row:hover td, .lg-table tr.lg-row:focus-visible td, .lg-table tr.lg-row.pop-active td { background: var(--surface-2); }
.cell-pop.list .pop-games.lg-pop td { padding-right: 10px; }
.cell-pop.list .pop-games.lg-pop tr.lg-total td { border-top: 2px solid var(--border); }
.lg-snap-row button, .line-player.has-odds button { text-align: left; }

/* By The Odds' example pop-up on a phone: each example is two lines (player and result; date, game, price, rank) instead of a seven-column row that scrolled sideways.
   Cells in order: 1 date, 2 player, 3 team, 4 opponent, 5 price, 6 rank, 7 result. */
@media (max-width: 600px) {
  .cell-pop.list.bo-pop .pop-games, .cell-pop.list.bo-pop .pop-games tbody { display: block; white-space: normal; }
  .cell-pop.list.bo-pop .pop-games thead { display: none; }
  .cell-pop.list.bo-pop .pop-body { padding-right: 8px; }                  /* room for the scroll bar */
  .cell-pop.list.bo-pop .pop-games tr { display: grid; grid-template-columns: auto auto auto 1fr auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); }
  .cell-pop.list.bo-pop .pop-games tr:last-child { border-bottom: none; }
  .cell-pop.list.bo-pop .pop-games td { padding: 0; border: 0; white-space: nowrap; min-width: 0; }
  .cell-pop.list.bo-pop .pop-games td:nth-child(2) { grid-area: 1 / 1 / 2 / 4; white-space: normal; font-weight: 600; }
  .cell-pop.list.bo-pop .pop-games td:nth-child(7) { grid-area: 1 / 4 / 2 / 6; justify-self: end; }
  .cell-pop.list.bo-pop .pop-games td:nth-child(1) { grid-area: 2 / 1; color: var(--text-muted); }
  .cell-pop.list.bo-pop .pop-games td:nth-child(3) { grid-area: 2 / 2; }
  .cell-pop.list.bo-pop .pop-games td:nth-child(4) { grid-area: 2 / 3; }
  .cell-pop.list.bo-pop .pop-games td:nth-child(4)::before { content: "vs "; color: var(--text-muted); }
  .cell-pop.list.bo-pop .pop-games td:nth-child(5) { grid-area: 2 / 4; justify-self: end; font-weight: 700; }
  .cell-pop.list.bo-pop .pop-games td:nth-child(6) { grid-area: 2 / 5; justify-self: end; color: var(--text-muted); }
}
