/* Five live research workspaces. Shared controls and data keep their existing IDs. */
body[data-layout] {
  color:var(--ink); color-scheme:dark; font-size:0.8125rem;
  background:var(--bg); min-width:0; min-height:100vh;
}

/* UI-259: before layouts.js sets body[data-layout] (slow first load, scripts off) show only the
   brand and a neutral loading line, not the pre-shell page and its old 12-tab nav. The hidden
   markup stays in the DOM: players.js wires its IDs and layouts.js moves it into the shell. */
body:not([data-layout]) #mainContent > :not(.shell-loading),
body:not([data-layout]) .app-topbar > :not(.app-brand),
body:not([data-layout]) .app-topbar > #userGuideButton { display:none; }
body:not([data-layout]) #mainContent { margin:0; }
body[data-layout] .shell-loading { display:none; }
.shell-loading { max-width:32rem; margin:3rem auto; padding:0 1rem; text-align:center; color:var(--muted); font-size:0.9375rem; line-height:1.5; }
.shell-loading p { margin:0 0 0.75rem; }
.shell-loading-slow { visibility:hidden; font-size:0.8125rem; animation:shell-loading-slow 1ms 12s forwards; }
@keyframes shell-loading-slow { to { visibility:visible; } }
.shell-noscript { color:var(--ink); }
.shell-loading:has(.shell-noscript) > :not(noscript) { display:none; }
body[data-layout] :is(.notebook-main,section,.bet-market-list,.bet-picker-layout,.layout-panel,.studio-content) { min-width:0; }
body[data-layout] .app-topbar { height:var(--header-height); padding:0 1.5rem; gap:1.625rem; background:var(--surface); color:var(--ink); border-bottom:1px solid var(--line); box-shadow:none; }
body[data-layout] .app-brand { width:auto; gap:0.625rem; font-size:1.0625rem; letter-spacing:.1px; }
body[data-layout] .brand-lab { color:var(--accent); display:inline; font-size:inherit; letter-spacing:inherit; margin-left:0.3125rem; }
.app-topbar .notebook-tabs { height:100%; flex:1; min-width:0; flex-wrap:nowrap; align-items:stretch; gap:0.625rem; overflow-x:auto; scrollbar-width:none; }
.app-topbar .notebook-tabs button { flex:0 0 auto; border:0; border-bottom:0.1875rem solid transparent; border-radius:0; padding:0.1875rem 0.625rem 0; background:none; color:var(--muted); font-size:0.75rem; font-weight:650; white-space:nowrap; box-shadow:none; }
.app-topbar .notebook-tabs button:hover { color:var(--ink); }
.app-topbar .notebook-tabs button[aria-current=page] { color:var(--accent); border-bottom-color:var(--accent); }
body[data-layout] .betslip-toggle { flex:0 0 auto; margin-left:auto; color:var(--ink); border-color:var(--line); box-shadow:none; }
body[data-layout] .betslip-toggle span,body[data-layout] #betslipCount { color:var(--accent-ink); background:var(--accent); border-radius:var(--r-data); min-width:1.375rem; height:1.375rem; display:inline-grid; place-items:center; padding:2px 0.3125rem; }
body[data-layout] .notebook-main { margin:0; max-width:none; padding:1.625rem 1.75rem 1.875rem; }
body[data-layout] #defenseNav button { color:var(--muted); padding:0.375rem 0.5625rem; font-size:0.75rem; }
body[data-layout] #defenseNav button[aria-pressed=true] { color:var(--accent); background:var(--accent-soft); }
body[data-layout] #defenseNav button:hover { background:var(--surface-raised); color:var(--ink); }
body[data-layout] .nav-team.team-logo-badge { width:2.125rem; height:2.125rem; }

.page-heading { margin-bottom:0.875rem; align-items:center; }
body[data-layout] .eyebrow { display:none; color:var(--accent); font-size:0.625rem; letter-spacing:1.65px; }
body[data-layout] h1 { font-size:clamp(1.4375rem,2vw,1.8125rem); letter-spacing:-.7px; line-height:1.2; }
.page-heading p:last-child { color:var(--muted); font-size:0.75rem; max-width:53.125rem; }
.season-badge { background:var(--surface-raised); border-color:var(--line); color:var(--muted); }
body[data-layout] .pd-button { background:var(--surface-raised); color:var(--ink); border:1px solid var(--line); border-radius:var(--r-control); box-shadow:none; padding:0.5625rem 0.75rem; }
body[data-layout] .pd-button:hover { border-color:var(--accent); background:var(--accent-soft); }
body[data-layout] .pd-button.primary { background:var(--accent); color:var(--accent-ink); border:1px solid var(--accent); box-shadow:none; }
body[data-layout] .text-button { color:var(--accent); }
body[data-layout] label { color:var(--muted); }
body[data-layout] :is(input:not([type=checkbox]),select) { background:var(--surface-subtle); color:var(--ink); border:1px solid var(--line); border-radius:var(--r-control); min-height:2.25rem; }
body[data-layout] input::placeholder { color:var(--muted); opacity:.8; }
.notebook-controls { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-control); padding:0.75rem 0.875rem 0; margin-bottom:0.5625rem; }
.filter-row { grid-template-columns:6.25rem 9.0625rem minmax(9.375rem,1fr) minmax(10.625rem,1fr); }
.week-heading { color:var(--muted); }
.week-picker { gap:0.375rem; }
body[data-layout] .week-picker button { background:var(--surface-subtle); border-color:var(--line); color:var(--muted); border-radius:var(--r-control); }
body[data-layout] .week-picker button[aria-pressed=true] { color:var(--ink); background:var(--selected-bg); border-color:var(--accent); box-shadow:none; }
.coverage-row { border-color:var(--line); padding:0.5625rem 0; }
:is(.coverage-row p,.section-heading p,.count-label,.notebook-footer,.auto-pick-help,.bet-picker-note) { color:var(--muted); }
.view-toolbar { justify-content:flex-end; margin:0 0 0.625rem; border:0; padding:0; }
.section-heading h2 { font-size:1.0625rem; }
.section-heading p { font-size:0.6875rem; line-height:1.65; }
.board-heading-tools { min-width:0; gap:0.4375rem; }
.empty-state { background:var(--surface-subtle); border-color:var(--line); color:var(--muted); border-radius:var(--r-card); }

/* Matchup cards retain all existing data and actions. */
.defense-board { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-card); box-shadow:none; margin-bottom:1.25rem; }
.board-heading { background:var(--surface); border-bottom:1px solid var(--line); padding:1rem 1.125rem; gap:0.8125rem; }
.board-heading h3 { font-size:1.3125rem; }
.board-heading p { color:var(--muted); font-size:0.625rem; }
.defense-board-body { grid-template-columns:minmax(0,1fr) 18.75rem; }
body[data-layout] :is(.matchup-column,.upcoming-column) { background:var(--surface-subtle); border-color:var(--line); }
body[data-layout] .matchup-column { flex-basis:19.6875rem; min-width:19.6875rem; }
body[data-layout] :is(.matchup-column-heading,.matchup-link,.upcoming-link) { background:var(--surface-raised); border-color:var(--line); color:var(--ink); }
:is(.matchup-link,.upcoming-link) { font-size:0.9375rem; }
body[data-layout] :is(.matchup-link small,.picks-caption,.upcoming-intro,.upcoming-empty,.upcoming-pool-note,.upcoming-reasons,.no-upcoming-line) { color:var(--muted); }
.upcoming-link small { color:var(--accent); }
body[data-layout] :is(.matchup-link:hover,.upcoming-link:hover) { background:var(--accent-soft); }
.player-card { background:var(--surface); border-color:var(--line); border-top-color:var(--position-color); box-shadow:none; border-radius:var(--r-card); }
.player-card-heading { background:var(--surface); }
body[data-layout] :is(.player-props th,.player-props td) { border-bottom-color:var(--line); }
.player-props thead th { background:var(--surface-subtle); color:var(--muted); }
.player-props tbody th { color:var(--muted); }
body[data-layout] :is(.line-detail,.player-card .player-subtitle,.player-subtitle,.board-empty) { color:var(--muted); }
body[data-layout] .board-empty { border-color:var(--line); }
.board-empty span { color:var(--ink); }
body[data-layout] :is(.auto-pick-toggle[aria-pressed=true],.matchup-done-toggle[aria-pressed=true]) { background:var(--positive-bg); color:var(--positive); border-color:var(--green); }
body[data-layout] .auto-pick-side .pd-button[aria-pressed=true] { position:relative; background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
body[data-layout] .bet-side { min-height:2.75rem; background:var(--surface-raised); border-color:var(--line); color:var(--ink); border-radius:var(--r-control); }
body[data-layout] .bet-side strong { color:var(--accent); }
body[data-layout] .bet-side:hover:not(:disabled) { background:var(--accent-soft); border-color:var(--accent); }
body[data-layout] .bet-side[aria-pressed=true] { background:var(--accent-soft); border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); color:var(--ink); }
body[data-layout] .bet-side[aria-pressed=true] strong { color:var(--accent); }

/* 02: a schedule rail and a spacious selected matchup. */

/* 03: position table and the selected cell's evidence stay side by side. */
.matrix-workspace { display:grid; grid-template-columns:minmax(0,1fr); gap:1.125rem; align-items:start; }
#overview { border:1px solid var(--line); border-radius:var(--r-control); box-shadow:none; }
.overview-table :is(.row-label,thead th) { background:var(--surface-raised); color:var(--ink); }
body[data-layout] .overview-table :is(th,td) { border-color:var(--line); }
.overview-table .row-label small { color:var(--muted); }
body[data-layout] .tone-neutral { background:var(--surface); }
.overview-cell:hover,.overview-cell[aria-pressed=true] { box-shadow:inset 0 0 0 2px var(--accent); }

/* 04: focused review, with progress and next actions kept in the left rail. */

/* 05: player list, research canvas, and the shared betslip. */
body[data-layout] .notebook-main { padding-top:0.875rem; }
.page-heading { margin-bottom:0.625rem; }
body[data-active-view=bets] .page-heading p:last-child { display:none; }
body[data-active-view=bets] #betsPanel>.section-heading { display:none; }
.notebook-controls.bet-filters { padding:0.625rem 0.75rem; }
.notebook-controls.bet-filters .filter-row { grid-template-columns:6.5625rem 9.375rem minmax(9.375rem,1fr) minmax(10.625rem,1fr); }
.bet-picker-filters { grid-template-columns:8.4375rem minmax(6.25rem,1fr) 9.0625rem; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-control); padding:0.8125rem 0.9375rem; }
.bet-picker-note { margin:0 2px 0.5rem; font-size:0.5625rem; }
.studio-layout { display:grid; grid-template-columns:minmax(14.6875rem,29%) minmax(0,1fr); gap:1rem; align-items:start; }
.studio-roster-toggle { display:flex; align-items:center; gap:0.4375rem; margin:0 0.375rem 0.75rem; font-size:0.625rem; font-weight:400; }
.studio-roster-toggle input { flex-shrink:0; width:0.8125rem; height:0.8125rem; }
.studio-list { display:grid; align-content:start; max-height:calc(100dvh - var(--header-height) - 7.875rem); overflow-y:auto; padding:0; scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
.studio-avatar { display:grid; place-items:center; position:relative; overflow:hidden; flex-shrink:0; width:2.5rem; height:2.9375rem; border-radius:var(--r-control); background:var(--surface-raised); color:var(--accent); font-size:0.8125rem; font-weight:750; }
.studio-avatar img { width:100%; height:100%; object-fit:cover; object-position:top; }
.studio-avatar .player-avatar { width:100%; height:100%; position:relative; overflow:hidden; border:0; background:var(--surface-raised); color:var(--accent); }
.studio-quote { display:flex; align-items:center; gap:1.375rem; padding:0.75rem 1rem; margin:0 1.0625rem 0.75rem; background:var(--surface-subtle); border:1px solid var(--line); border-radius:var(--r-control); }
.studio-quote>div:first-child { flex:0 0 auto; min-width:5.9375rem; }
.studio-quote>div:first-child>strong,.studio-quote>.studio-line-value,.studio-quote .studio-line-value { display:block; color:var(--ink); font-size:2rem; font-weight:750; letter-spacing:-.6px; margin-top:0.3125rem; line-height:1.1; }
.studio-quote>div:not(.bet-price-pair)>small { color:var(--muted); font-size:0.5625rem; letter-spacing:.5px; }
.studio-quote>div:not(.bet-price-pair)>strong { display:block; font-size:1.9375rem; margin-top:0.25rem; font-variant-numeric:tabular-nums; }
.studio-quote .bet-price-pair { flex:1; min-width:0; }
.studio-quote .bet-side { min-height:2.8125rem; flex-direction:row; gap:0.5rem; font-size:0.75rem; }
.studio-quote .bet-side strong { font-size:0.75rem; }
:is(.player-profile,.profile-log-guide,.profile-caveat,.profile-cutoff,.profile-line,.profile-cell-note) { color:var(--muted); }
.profile-log-scroll { border-color:var(--line); scrollbar-color:var(--line) var(--bg); max-height:27.5rem; }
body[data-layout] .profile-log thead th { background:#231b2f; color:var(--muted); }
.profile-log .profile-groups th:nth-child(even) { background:#2c2239; }
body[data-layout] .profile-log tbody tr { --profile-row:#1c1625; }
body[data-layout] .profile-log tbody tr:nth-child(even) { --profile-row:#221b2d; }
body[data-layout] .profile-log :is(th,td) { border-color:var(--line); }
body[data-layout] .profile-log .profile-matchup { color:var(--ink); }
body[data-layout] .profile-log :is(.profile-stat,.profile-prop,.profile-actual) { color:var(--ink); }
body[data-layout] .profile-season-pills button { background:var(--surface-raised); color:var(--muted); border:1px solid var(--line); border-radius:var(--r-control); }
body[data-layout] .profile-season-pills button[aria-pressed=true] { color:var(--ink); background:var(--accent-soft); border-color:var(--accent); }

/* Shared drawer matches each workspace and preserves independent scrolling. */
body[data-layout] .betslip-drawer { top:var(--header-height); height:calc(100dvh - var(--header-height)); width:20.625rem; background:var(--surface); border-left:1px solid var(--line); box-shadow:-0.625rem 0 2.1875rem #00000020; }
.betslip-drawer .betslip-heading { background:var(--surface); padding-bottom:0.875rem; }
.betslip h3 { font-size:1.125rem; }
body[data-layout] .betslip-item { border:1px solid var(--line); border-radius:var(--r-control); margin-bottom:0.6875rem; background:var(--surface-subtle); }
.betslip-item .betslip-prop { color:var(--muted); }
.betslip-item .betslip-line { background:var(--surface); border-color:var(--line); }
:is(.betslip-odds,#betslipProfit) { color:var(--accent); }
body[data-layout] .betslip :is(.text-button,.close-button) { color:var(--accent); }
body[data-layout] dialog { background:var(--surface); border-color:var(--line); border-radius:var(--r-card); box-shadow:0 1.5rem 5.625rem #0007; }

/* Light workspaces also theme legacy cards, dialogs, and result tables. */
@media(min-width:66.06875em) {
  body[data-active-view=bets] .notebook-main { position:relative; }
  body[data-active-view=bets] .view-toolbar { position:absolute; right:9.125rem; top:1.25rem; margin:0; }
  body[data-active-view=bets] .page-heading>div { max-width:calc(100% - 19.375rem); }
}
@media(max-width:81.8125em) {
  body[data-layout] .app-topbar { gap:1.125rem; padding:0 1.1875rem; }
  .app-topbar .notebook-tabs { gap:0.1875rem; }
  .app-topbar .notebook-tabs button { padding-left:0.5625rem; padding-right:0.5625rem; font-size:0.6875rem; }
  body[data-layout] .notebook-main { padding:1.4375rem 1.25rem; }
  .defense-board-body { grid-template-columns:minmax(0,1fr); }
  body[data-layout] .upcoming-column { border-left:0; border-top:1px solid var(--line); }
  .matrix-workspace { gap:0.875rem; }
  
  .studio-layout { grid-template-columns:14.6875rem minmax(0,1fr); gap:0.75rem; }
  .studio-quote { margin-left:0.8125rem; margin-right:0.8125rem; padding:0.9375rem; gap:0.75rem; }
  .studio-quote { flex-wrap:wrap; }
  
  
  
}
@media(max-width:66em) {
  body[data-layout] .app-topbar { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:3.5rem 3.25rem; gap:0 0.875rem; height:var(--header-height); }
  body[data-layout] .app-brand { grid-column:1; grid-row:1; font-size:1rem; }
  .betslip-toggle { grid-column:2; grid-row:1; }
  .app-topbar .notebook-tabs { grid-column:1/-1; grid-row:2; width:100%; gap:0.75rem; }
  .app-topbar .notebook-tabs button { font-size:0.75rem; padding-left:0.75rem; padding-right:0.75rem; }
  
  
  .filter-row,.notebook-controls.bet-filters .filter-row { grid-template-columns:6.25rem 8.75rem minmax(0,1fr); }
  .filter-row>label:last-child { grid-column:1/-1; }
  
  
  
  .section-heading { flex-wrap:wrap; }
  .studio-layout { grid-template-columns:13.75rem minmax(0,1fr); }
  .studio-quote { flex-wrap:wrap; }
  .studio-quote>div:first-child { min-width:4.6875rem; }
  .studio-quote .bet-price-pair { min-width:10rem; }
  body[data-layout] .betslip-drawer { top:0; height:100dvh; width:min(23.75rem,100%); }
}
@media(max-width:48.125em) {
  body[data-layout] .notebook-main { padding:1.25rem 0.875rem 1.75rem; }
  .page-heading { gap:0.75rem; }
  body[data-layout] .page-heading h1 { font-size:1.625rem; }
  .page-heading p:last-child { font-size:0.6875rem; }
  .week-picker { grid-template-columns:repeat(9,minmax(0,1fr)); }
  .filter-row,.notebook-controls.bet-filters .filter-row { grid-template-columns:1fr 1fr; gap:0.6875rem; }
  .filter-row>label:last-child { grid-column:auto; }
  .notebook-controls { padding:0.8125rem 0.75rem 0; }
  .section-heading h2 { font-size:1rem; }
  .section-heading p { font-size:0.625rem; }
  .board-heading { padding:0.8125rem; }
  .board-heading h3 { font-size:1.25rem; }
  body[data-layout] .matchup-column { min-width:17.5rem; flex-basis:17.5rem; }
  body[data-layout] .single-week .matchup-column { min-width:0; flex-basis:100%; }
  .board-heading-tools { justify-content:flex-start; }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  .studio-layout { grid-template-columns:minmax(0,1fr); }
  .studio-list { position:static; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:16.75rem; padding:0.5rem; }
  .studio-quote { margin-left:0.875rem; margin-right:0.875rem; }
  .bet-picker-filters { grid-template-columns:1fr 1fr; gap:0.625rem; }
  .bet-picker-filters label:nth-child(2) { grid-column:1/-1; grid-row:2; }
  
  
  
  
}
@media(max-width:28.875em) {
  body[data-layout] .app-topbar { padding:0 0.75rem; }
  body[data-layout] .app-brand { font-size:0.875rem; gap:0.3125rem; }
  body[data-layout] .betslip-toggle { font-size:0.625rem; padding:0.4375rem 0.5rem; }
  .app-topbar .notebook-tabs { gap:0; }
  .app-topbar .notebook-tabs button { font-size:0.6875rem; padding-left:0.5625rem; padding-right:0.5625rem; }
  body[data-layout] .notebook-main { padding-left:0.625rem; padding-right:0.625rem; }
  body[data-layout] .page-heading h1 { font-size:1.5rem; }
  .season-badge { font-size:0.5625rem; margin-left:0.4375rem; }
  body[data-layout] .board-heading-tools .pd-button { white-space:normal; }
  .studio-quote { padding:0.75rem; margin-left:0.625rem; margin-right:0.625rem; }
  .studio-quote>div:first-child { min-width:4.25rem; }
  .studio-quote .bet-price-pair { min-width:8.125rem; }
  .studio-quote .bet-side { flex-direction:column; gap:0.25rem; font-size:0.625rem; }
}

/* Research uses the compact player-list offer controls from Studio. */
#boards .defense-board-body { grid-template-columns:minmax(0,1fr) clamp(31.25rem,30vw,35rem); }
#boards .upcoming-column { width:100%; border-left:1px solid var(--line); border-top:0; }
#boards .upcoming-column .upcoming-content { display:block; max-height:none; overflow:visible; padding:0.75rem; }
#boards .upcoming-link { padding:0.875rem 1rem; }
/* Opponent lines use the same compact price controls as the Studio list. */
#matchupDialog { width:min(82.5rem,calc(100% - 2rem)); max-height:92dvh; overscroll-behavior:contain; background:var(--bg); }
#matchupDialog .boxscore-sticky { background:var(--surface); box-shadow:none; }
#matchupDialog .boxscore-heading { background:var(--surface); padding-top:1.125rem; padding-bottom:0.9375rem; }
#matchupDialog .boxscore-toolbar { gap:0.625rem 0.875rem; padding-bottom:0.9375rem; }
#matchupDialog .position-filters { gap:0; border:1px solid var(--line); border-radius:var(--r-control); overflow:hidden; }
#matchupDialog .position-filters button { height:2.25rem; min-width:2.6875rem; border:0; border-right:1px solid var(--line); border-radius:0; background:var(--surface); }
#matchupDialog .position-filters button:last-child { border:0; }
#matchupDialog .position-filters button[aria-pressed=true] { background:var(--selected-bg); color:var(--ink); box-shadow:inset 0 0 0 1px var(--accent); }
#matchupDialog .boxscore-position>h3 { color:var(--ink); font-size:0.9375rem; border:0; margin-bottom:0.75rem; padding:0; }
#matchupDialog .boxscore-tools { margin:1.25rem 0 0.75rem; }
#matchupDialog .boxscore-tools>.selection-panel { flex:0 1 auto; }
#matchupDialog .boxscore-tools>.selection-panel[open] { flex-basis:100%; }
#matchupDialog .upcoming-notice { border:0; padding:0; margin:0.875rem 0; background:none; color:var(--muted); font-size:0.6875rem; line-height:1.6; }
#matchupGameContext { padding:0.9375rem 0; border-bottom:1px solid var(--line); }
#matchupGameContext .studio-game-context { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:1.125rem; min-width:0; }
#matchupGameContext .studio-game-lines { flex:0 1 25.625rem; margin:0 auto 0 0; }
#matchupGameContext .studio-weather { display:flex; align-items:center; gap:0.625rem; }
#matchupDialog .opponent-player-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:0.875rem; }
#matchupDialog .opponent-player-card { min-width:0; border:1px solid var(--line); border-radius:var(--r-card); overflow:hidden; background:var(--surface); }
#matchupDialog .opponent-player-heading { display:flex; align-items:center; justify-content:space-between; gap:0.875rem; min-height:4.125rem; padding:0.625rem 0.875rem; }
#matchupDialog .opponent-prop-count { flex-shrink:0; color:var(--muted); font-size:0.625rem; }
#matchupDialog .opponent-prop-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
#matchupDialog .opponent-market-row { display:grid; grid-template-columns:minmax(0,1fr) 13.75rem; align-items:center; gap:0.75rem; min-width:0; padding:0.625rem 0.875rem; border-top:1px solid var(--line); }
#matchupDialog .opponent-market-row:nth-child(even) { border-left:1px solid var(--line); }
#matchupDialog .opponent-market-row.selected-line { box-shadow:none; }
#matchupDialog .opponent-prop-label { display:flex; align-items:center; gap:0.5rem; min-width:0; }
#matchupDialog .opponent-prop-label>strong { color:var(--ink); font-size:0.75rem; line-height:1.5; overflow-wrap:break-word; }
#matchupDialog .opponent-player { display:flex; align-items:center; gap:0.625rem; min-width:0; }
#matchupDialog .opponent-player>div { min-width:0; }
#matchupDialog .opponent-player .profile-name-button { font-size:0.9375rem; line-height:1.4; text-align:left; overflow-wrap:break-word; }
#matchupDialog .opponent-player .player-subtitle { display:block; margin-top:0.25rem; color:var(--muted); font-size:0.625rem; line-height:1.5; }
#matchupDialog .opponent-watch-button { flex-shrink:0; margin-left:auto; width:2rem; height:2rem; padding:0; background:transparent; border-color:var(--line); color:var(--muted); }
#matchupDialog .opponent-watch-button[aria-pressed=true] { color:var(--cyan); border-color:var(--cyan); }
#matchupDialog :is(.opponent-player,.player-card) .player-avatar { display:block; position:relative; width:3rem; height:3.625rem; flex:0 0 3rem; overflow:hidden; border:0; border-radius:0; background:transparent; color:var(--cyan); font-size:1rem; }
#matchupDialog .opponent-player .player-avatar { width:2.5rem; height:2.75rem; flex-basis:2.5rem; }
#matchupDialog :is(.opponent-player,.player-card) .player-avatar:not(.has-photo) { background:var(--surface-raised); border-radius:var(--r-control); }
#matchupDialog .player-headshot { object-fit:contain; object-position:center bottom; }
#matchupDialog .research-line-picker .bet-side { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0.25rem; min-width:0; min-height:3.25rem; padding:0.375rem 0.25rem; border-radius:var(--r-control); font-size:0.75rem; }
#matchupDialog .research-line-picker .bet-side strong { font-size:0.8125rem; }
#matchupDialog .research-line-picker .bet-side[aria-pressed=true] { background:#175139; border-color:var(--green); color:#dff5ec; }
#matchupDialog .research-line-picker .studio-line-step { color:var(--cream); background:transparent; border:0; border-radius:var(--r-control); font-size:1.5rem; }
#matchupDialog .research-line-picker .studio-line-step:hover:not(:disabled) { background:var(--surface-raised); }
@media(max-width:68.75em) {
  #matchupDialog .opponent-prop-grid { grid-template-columns:minmax(0,1fr); }
  #matchupDialog .opponent-market-row:nth-child(even) { border-left:0; }
}
@media(max-width:48.125em) {
  #matchupDialog { --boxscore-inset:0.75rem; width:calc(100% - 1rem); padding:0.75rem; }
  #matchupDialog .boxscore-heading { padding-top:0.75rem; padding-bottom:0.75rem; }
  #matchupDialog .boxscore-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:0.5rem; }
  #matchupDialog .boxscore-toolbar .player-search { grid-column:1/-1; max-width:none; }
  #matchupDialog .position-filters { grid-column:1/-1; }
  #matchupDialog .position-filters button { flex:1; min-width:0; }
  #matchupDialog .upcoming-roster-toggle { grid-column:1/-1; font-size:0.6875rem; }
  #matchupDialog .boxscore-toolbar #matchupPlayerCount { margin-left:0; }
  #matchupGameContext .studio-game-context { justify-content:space-between; gap:0.75rem; }
  #matchupGameContext .studio-game-lines { flex-basis:100%; }
  #matchupGameContext .studio-weather { gap:0.4375rem; }
  #matchupGameContext .studio-weather-icon { width:1.8125rem; height:1.8125rem; }
  #matchupGameContext .studio-weather-copy>strong { font-size:1.3125rem; }
  #matchupGameContext .studio-weather-wind { padding-left:0.4375rem; font-size:0.6875rem; }
  #matchupGameContext [data-game-injuries] { padding:0.5625rem 0.5rem; font-size:0.6875rem; }
}
@media(max-width:37.125em) {
  #matchupDialog .opponent-player-heading { gap:0.5rem; padding:0.625rem; }
  #matchupDialog .opponent-market-row { grid-template-columns:minmax(0,1fr); gap:0.5rem; padding:0.625rem; }
  #matchupDialog .opponent-market-row .research-line-picker { width:13.75rem; justify-self:end; }
  #matchupDialog .opponent-watch-button { width:2.75rem; height:2.75rem; }
  #matchupDialog .boxscore-heading .team-badge { width:2.25rem; height:2.25rem; }
  #matchupDialog .boxscore-heading h2 { font-size:1rem; }
  #matchupDialog .boxscore-heading .close-button { width:2.25rem; height:2.25rem; }
}
#boards .research-picks { min-width:0; margin:0; padding:0; list-style:none; border:1px solid var(--line); border-radius:var(--r-control); overflow:hidden; }
#boards .research-pick { display:grid; grid-template-columns:minmax(0,1fr) 13.75rem; gap:0.625rem; align-items:center; min-width:0; margin:0; padding:0.625rem 0.75rem; background:var(--surface); border-bottom:1px solid var(--line); }
#boards .research-pick:last-child { border-bottom:0; }
#boards .research-player { display:flex; align-items:center; gap:0.625rem; min-width:0; }
#boards .research-player>div,#boards .research-player>span { min-width:0; }
#boards .research-player .profile-name-button { font-size:0.875rem; line-height:1.4; overflow-wrap:break-word; }
#boards .research-player .player-avatar { position:relative; display:block; width:2.75rem; height:3.25rem; flex:0 0 2.75rem; border:0; border-radius:0; overflow:hidden; background:transparent; color:var(--cyan); font-size:1rem; }
#boards .research-player .player-avatar:not(.has-photo) { background:var(--surface-raised); border-radius:var(--r-control); }
#boards .research-player .player-headshot { object-fit:contain; object-position:center bottom; }
#boards .research-player small { display:block; margin-top:0.1875rem; font-size:0.625rem; color:var(--muted); }
:is(#boards,#matchupDialog) .research-line-picker { min-width:0; width:100%; max-width:100%; }
:is(#boards,#matchupDialog) .research-line-picker .studio-line-slider { display:grid; grid-template-columns:1.5rem minmax(0,1fr) 1.5rem; align-items:stretch; gap:0.1875rem; }
:is(#boards,#matchupDialog) .research-line-picker .studio-market-prices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0.25rem; }
:is(#boards,#matchupDialog) .research-line-picker .studio-line-slider.is-alternate .studio-market-prices,:is(#boards,#matchupDialog) .research-line-picker .scorer-prices { grid-template-columns:minmax(0,1fr); }
:is(#boards,#matchupDialog) .research-line-picker .studio-line-step { align-self:stretch; min-height:0; }
:is(#boards,#matchupDialog) .research-line-picker .studio-line-step:disabled { visibility:hidden; }
:is(#boards,#matchupDialog) .research-line-picker .studio-line-caption { display:grid; grid-template-columns:2rem minmax(0,1fr) 2rem; align-items:center; gap:0.1875rem; min-height:1.3125rem; margin-top:0.1875rem; color:var(--muted); font-size:0.5625rem; text-align:center; }
:is(#boards,#matchupDialog) .research-line-picker .studio-line-caption>span:first-child { text-align:left; }
:is(#boards,#matchupDialog) .research-line-picker .studio-line-caption>span:last-child { text-align:right; }
:is(#boards,#matchupDialog) .research-line-picker .studio-line-reset { padding:0.25rem 0.375rem; font-size:0.5625rem; }
:is(#boards,#matchupDialog) .research-line-picker .bet-quote-freshness { display:block; margin:0.1875rem 0 0; color:var(--muted); font-size:0.5625rem; line-height:1.4; text-align:center; }
:is(#boards,#matchupDialog) .research-line-picker .saved-pick-note { margin-top:0.375rem; padding:0.375rem 0.5rem; font-size:0.625rem; }
:is(#boards,#matchupDialog) .research-line-picker .no-upcoming-line { display:block; font-size:0.6875rem; text-align:center; }
:is(#boards,#matchupDialog) .research-line-picker>.line-detail { display:block; margin:0.375rem auto 0; font-size:0.625rem; }
#boards .research-player [data-unwatch] { display:inline-block; margin-top:0.3125rem; padding:0.25rem 0; color:var(--muted); font-size:0.625rem; }
#boards .upcoming-watchlist { margin-top:0.875rem; padding-top:0.75rem; }
#boards .upcoming-watchlist h4 { font-size:0.8125rem; }
@media(max-width:96.25em) {
  #boards .defense-board-body { grid-template-columns:minmax(0,1fr); }
  #boards .upcoming-column { border-left:0; border-top:1px solid var(--line); }
}
@media(max-width:37.125em) {
  #boards .upcoming-column .upcoming-content { padding:0.625rem; }
  #boards .upcoming-link { padding:0.75rem; }
  #boards .research-pick { grid-template-columns:minmax(0,1fr); gap:0.375rem; padding:0.625rem; }
  :is(#boards,#matchupDialog) .research-line-picker { width:13.75rem; max-width:100%; justify-self:end; }
  #boards .research-pick:has(.no-upcoming-line) { grid-template-columns:minmax(0,1fr) 6.875rem; gap:0.5rem; }
  #boards .research-pick:has(.no-upcoming-line) .research-line-picker { width:100%; }
}

/* ---- Page width (UI-R14) ------------------------------------------------------------------
   One content column, at most --content-max wide and centred. The header and footer keep
   their full-width backgrounds; their contents line up with the same column, because the
   header and main both pad by (100% - column) / 2 once the screen is wider than the column
   plus its gutters (about 1660px). With My Picks docked (22.5rem on the right, my-picks.css) the
   page keeps the header's left edge and stops at the dock or the column's right edge,
   whichever comes first. The padding change rides my-picks.css's margin/padding transition,
   so the page narrows with the panel's slide (UI-166). */
/* --content-max is set with the other geometry tokens in arcade.css. */
@media (min-width:100em) {
  html body[data-layout][data-layout-mode] .app-topbar { padding-left:max(1.5rem, calc((100% - var(--content-max)) / 2)); padding-right:max(1.5rem, calc((100% - var(--content-max)) / 2)); }
  html body[data-layout][data-layout-mode] .notebook-main { --main-pad-x:max(1.75rem, calc((100% - var(--content-max)) / 2)); --slate-pad-x:var(--main-pad-x); padding-left:var(--main-pad-x); padding-right:var(--main-pad-x); }
  html body.players-page.slip-docked .notebook-main { padding-right:max(1.75rem, calc(100% - 22.5rem - var(--content-max) - max(1.75rem, (100% - var(--content-max)) / 2))); }
}

/* ---- One-row header (75em+) ----------------------------------------------------------------
   The six destinations never shrink (the strip used to scroll and cut off Play at 1300-1360px
   once search, the lines-freshness chip and the week chip all showed); the search box gives
   way instead. From 75em to 85em (small laptops) the freshness chip still shows: the search
   box drops its Ctrl K hint and shrinks further (its placeholder ends in an ellipsis at the
   narrowest), and the Wk chip and the gaps tighten (UI-76). */
@media (min-width:75.0625em) {
  html body[data-layout][data-layout-mode] .app-topbar > .notebook-tabs { flex:none; }
  .app-topbar > .app-search { min-width:9rem; }
  /* Large text (UI-261): when the row can't hold everything (200% text at 1440), the
     controls wrap onto more rows and the header grows, instead of running 900px off the
     screen. The search box starts from its minimum and grows to 15rem, so at the default
     size the row lays out as before (the box shrinks before anything wraps). */
  html body[data-layout][data-layout-mode] .app-topbar { flex-wrap:wrap; height:auto; min-height:var(--topbar-height); row-gap:0.5rem; padding-block:0.5rem; }
  .app-topbar > .app-search { flex:1 1 0; max-width:15rem; }
}
@media (min-width:75.0625em) and (max-width:85em) {
  html body[data-layout][data-layout-mode] .app-topbar { gap:0.5rem; }
  .app-topbar > .app-week { padding:0 0.625rem; }
  .app-topbar > .app-search { min-width:6rem; }
  html body[data-layout][data-layout-mode] .app-topbar > .app-search kbd { display:none; }
}

#matchupGameContext .matchup-weather { min-width:0; max-width:100%; }
