/* SleeperTool: Sleeper-inspired dark theme, laid out as a full-width web app.
   Contrast: all text colors are >= 4.5:1 against the surfaces they sit on. */

:root {
  --bg: #11161f;
  --bg-deep: #0b0f16;
  --surface: #1b2230;
  --surface-2: #252e3f;
  --surface-3: #2f394d;
  --line: #2a3344;
  --text: #f4f6fa;
  --text-2: #c3cad8;
  --muted: #8f9ab0;
  --accent: #00ceb8;
  --accent-ink: #032a25;
  --accent-soft: rgba(0, 206, 184, .12);
  --danger: #ff5c8a;
  --warn: #ffb547;
  --ink: #0d1118;

  --qb: #ff6b93; --rb: #1fd9c3; --wr: #63adff; --te: #ffb65c;
  --k: #c792ff; --def: #c99a7a; --flex: #aab6cc; --sflex: #8fd18a;

  --radius: 14px;
  --header-h: 60px;
  --sidebar-w: 264px;
  --content-max: 1440px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  /* Dash 4 component theme (dropdowns, radio items) */
  --Dash-Fill-Inverse-Strong: var(--surface);
  --Dash-Fill-Interactive-Strong: var(--accent);
  --Dash-Fill-Interactive-Weak: var(--surface-2);
  --Dash-Fill-Primary-Hover: var(--surface-2);
  --Dash-Fill-Primary-Active: var(--surface-3);
  --Dash-Fill-Disabled: var(--surface-2);
  --Dash-Stroke-Strong: var(--surface-3);
  --Dash-Stroke-Weak: var(--line);
  --Dash-Text-Primary: var(--text);
  --Dash-Text-Strong: var(--text);
  --Dash-Text-Weak: var(--muted);
  --Dash-Text-Disabled: var(--muted);
  --Dash-Shading-Strong: rgba(0, 0, 0, .55);
  --Dash-Shading-Weak: rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 14px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2 { margin: 0; }

.muted { color: var(--muted); }
.strong { font-weight: 700; }
.ellipsis { display: block; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }

/* ============ app shell ============ */
.app-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--bg-deep);
  border-bottom: 1px solid var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.brand-dot { color: var(--accent); font-size: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-name { font-weight: 600; color: var(--text-2); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text-2); border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-ghost:hover { border-color: var(--danger); color: var(--danger); }

.app-body { display: flex; min-height: calc(100vh - var(--header-h)); }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--bg-deep); border-right: 1px solid var(--line);
  position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 14px 10px; }
.sidebar.hidden { display: none; }
.side-all { display: block; padding: 9px 12px; border-radius: 10px; font-weight: 700; color: var(--text-2); }
.side-all:hover, .side-all.active { background: var(--surface); color: var(--text); }
.side-title { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px;
  padding: 16px 12px 8px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; margin-bottom: 2px; }
.side-item:hover { background: var(--surface); }
.side-item.active { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.side-text { min-width: 0; flex: 1; }
.side-name { font-weight: 600; font-size: 13px; }
.side-sub { color: var(--muted); font-size: 11.5px; }
.side-empty { color: var(--muted); padding: 8px 12px; font-size: 12px; }

.main { flex: 1; min-width: 0; }
.page { max-width: var(--content-max); margin: 0 auto; padding: 24px 28px 56px; }
@media (max-width: 1000px) {
  .sidebar { display: none; }
  .page { padding: 16px 14px 48px; }
  .header-inner { padding: 0 14px; }
  .user-name { display: none; }
}

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.4px; }

/* ============ league page header & tabs ============ */
.league-page { padding-top: 18px; }
.league-top { position: sticky; top: var(--header-h); z-index: 20; background: var(--bg); margin: 0 -28px;
  padding: 0 28px; }
@media (max-width: 1000px) { .league-top { margin: 0 -14px; padding: 0 14px; } }
.league-bar { display: flex; align-items: center; gap: 14px; padding: 4px 0 12px; }
.league-title-wrap { min-width: 0; flex: 1; }
.league-title { font-weight: 800; font-size: 22px; letter-spacing: -.3px; }
.league-subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ltab { flex: none; padding: 11px 18px 12px; color: var(--muted); font-weight: 700; font-size: 14px;
  border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s; }
.ltab:hover { color: var(--text-2); }
.ltab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-content { padding-top: 18px; }

/* ============ avatars ============ */
.avatar { border-radius: 50%; object-fit: cover; background: var(--surface-2); flex-shrink: 0; display: block; }
.avatar-square { border-radius: 10px; }
.avatar-xs { width: 24px; height: 24px; }
.avatar-sm { width: 34px; height: 34px; }
.avatar-md { width: 46px; height: 46px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 76px; height: 76px; }
.avatar-fallback { display: flex; align-items: center; justify-content: center; font-weight: 700;
  color: var(--text-2); font-size: 12px; background: var(--surface-3); }
.avatar-empty { border: 1px dashed var(--surface-3); background: transparent; }
.headshot { object-position: center top; }

/* ============ links ============ */
.player-link { cursor: pointer; display: inline-flex; min-width: 0; max-width: 100%; }
.name-link:hover .ellipsis { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.player-link:hover > .headshot { box-shadow: 0 0 0 2px var(--accent); }
.team-link { display: block; min-width: 0; }
.team-link:hover .player-name, .team-link:hover .sb-name, .team-link:hover .br-team { color: var(--accent); }
.card-link { color: var(--accent); font-weight: 700; font-size: 12px; white-space: nowrap; }
.card-link:hover { text-decoration: underline; }

/* ============ inputs, dropdowns, controls ============ */
.text-input { width: 100%; border-radius: 10px !important; border: 1px solid var(--line) !important;
  background: var(--surface) !important; padding: 0 !important; height: auto !important; overflow: hidden; }
.text-input:focus-within { border-color: var(--accent) !important; }
.text-input input { width: 100%; height: auto !important; padding: 10px 14px !important; border: 0 !important;
  background: transparent !important; color: var(--text) !important; font: 500 14px/20px var(--font);
  outline: none; box-shadow: none !important; }
.text-input input::placeholder { color: var(--muted); opacity: 1; }

.btn-primary { padding: 12px; border: 0; border-radius: 10px; background: var(--accent);
  color: var(--accent-ink); font-weight: 800; font-size: 15px; cursor: pointer; }
.btn-primary:hover { filter: brightness(1.08); }
.fine-print { color: var(--muted); font-size: 11.5px; text-align: center; margin-top: 12px; }
.fine-print.left { text-align: left; margin: 12px 4px 0; }

.dd { font-size: 13px; }
.dd .dash-dropdown, .dd.dash-dropdown, .dd .dash-dropdown-trigger {
  background: var(--surface) !important; border-color: var(--line) !important;
  border-radius: 10px !important; color: var(--text) !important; }
.dd .dash-dropdown-value, .dd .dash-dropdown-value-item, .dd .dash-dropdown-placeholder {
  color: var(--text) !important; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd .dash-dropdown-trigger-icon { color: var(--muted) !important; }
.dash-dropdown-content { background: var(--surface-2) !important; border: 1px solid var(--surface-3) !important;
  border-radius: 10px !important; box-shadow: 0 12px 32px rgba(0, 0, 0, .5) !important; }
.dash-dropdown-content .dash-options-list-option { color: var(--text) !important; font-size: 13px; }
.dash-dropdown-content .dash-options-list-option:hover { background: var(--surface-3) !important; }
.dash-dropdown-content .dash-options-list-option.selected { color: var(--accent) !important; font-weight: 700; }
.dash-dropdown-search-container input { color: var(--text) !important; background: transparent !important; }

.controls-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.controls-row > .segmented { margin: 0; }
.controls-row .dash-options-list.segmented { margin: 0; }
.week-dd { width: 130px; flex-shrink: 0; }
.week-dd.wide { width: 140px; }
.team-dd { width: 280px; max-width: 100%; }
.sort-dd { width: 150px; }
.season-dd { width: 160px; }

.dash-options-list.segmented { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px;
  padding: 0; margin: 0 0 16px; background: transparent !important; border: 0 !important; }
.segmented .dash-options-list-option { display: inline-flex; align-items: center; flex-shrink: 0;
  white-space: nowrap; cursor: pointer; padding: 7px 14px; margin: 0; border-radius: 999px;
  background: var(--surface) !important; color: var(--text-2) !important; font-weight: 600;
  font-size: 12.5px; border: 1px solid var(--line); box-shadow: none; transition: background .15s; }
.segmented .dash-options-list-option:hover { background: var(--surface-2) !important; }
.segmented .dash-options-list-option.selected { background: var(--text) !important; color: var(--ink) !important;
  border-color: var(--text); }
.segmented .dash-options-list-option-wrapper { display: none; }
.segmented .dash-options-list-option-text { padding: 0; color: inherit !important; background: none; }
.dash-options-list.segmented.compact { display: inline-flex; }

.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.filter-row .text-input { width: 340px; max-width: 100%; }
.filter-row .segmented { margin: 0; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px;
  margin-bottom: 16px; max-width: 1000px; }
.f-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.f-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }

/* ============ link screen & league grid ============ */
.link-page { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 75vh; }
.link-hero { text-align: center; margin-bottom: 28px; }
.brand-title { font-size: 40px; font-weight: 900; letter-spacing: -.8px; }
.brand-sub { color: var(--text-2); margin-top: 8px; font-size: 15px; }
.link-form { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 420px; }

.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.league-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface);
  border-radius: var(--radius); border: 1px solid transparent; transition: background .15s, border-color .15s; }
.league-card:hover { background: var(--surface-2); border-color: var(--surface-3); }
.card-text { flex: 1; min-width: 0; }
.card-title { font-weight: 700; font-size: 15px; }
.card-sub { color: var(--muted); font-size: 12px; margin-top: 3px; white-space: nowrap; }
.card-right { text-align: right; flex-shrink: 0; }
.card-record { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }

/* ============ generic blocks ============ */
.section-header { display: flex; justify-content: space-between; align-items: center; color: var(--text-2);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; margin: 22px 2px 10px; }
.section-header:first-child { margin-top: 0; }
.count { background: var(--surface-2); color: var(--text-2); border-radius: 10px; padding: 2px 8px; font-size: 11px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.card-empty { color: var(--muted); padding: 16px; font-size: 13px; text-align: center; }
.empty-state { text-align: center; padding: 56px 20px; background: var(--surface); border-radius: var(--radius); }
.empty-title { font-weight: 700; font-size: 16px; }
.empty-sub { color: var(--muted); margin-top: 6px; }
.error-banner { background: rgba(255, 92, 138, .12); color: #ff9ab6; border: 1px solid rgba(255, 92, 138, .35);
  border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.col-side { position: sticky; top: calc(var(--header-h) + 110px); }
@media (max-width: 1200px) { .two-col { grid-template-columns: 1fr; } .col-side { position: static; } }

/* ============ pills & badges ============ */
.pos-pill { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 22px;
  border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .2px; color: var(--ink);
  background: var(--flex); flex-shrink: 0; }
.pos-qb { background: var(--qb); } .pos-rb { background: var(--rb); } .pos-wr { background: var(--wr); }
.pos-te { background: var(--te); } .pos-k { background: var(--k); } .pos-def { background: var(--def); }
.pos-flex { background: var(--flex); } .pos-sflex { background: var(--sflex); }
.pos-bn, .pos-none { background: var(--surface-3); color: var(--text-2); }
.pos-ir { background: rgba(255, 92, 138, .18); color: var(--danger); }
.pos-taxi { background: rgba(255, 181, 71, .16); color: var(--warn); }
.pos-pick { background: var(--surface-3); color: var(--text-2); }
.inj-badge { flex-shrink: 0; font-size: 9.5px; font-weight: 800; padding: 1px 4px; border-radius: 4px; line-height: 13px;
  background: rgba(255, 181, 71, .16); color: var(--warn); }
.inj-o, .inj-ir, .inj-sus, .inj-pup, .inj-d, .inj-na, .inj-dnr { background: rgba(255, 92, 138, .16); color: var(--danger); }
.owner-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); max-width: 140px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: middle; }
.team-link:hover .owner-tag { color: var(--accent); }
.owner-tag.fa { color: var(--accent); background: var(--accent-soft); }
.owner-tag.me { color: var(--accent-ink); background: var(--accent); }
.rank-badge { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center;
  border-radius: 6px; font-weight: 800; font-size: 12px; color: var(--text-2); background: var(--surface-2); }
.rank-badge.in { color: var(--accent-ink); background: var(--accent); }
.streak.w { color: var(--accent); font-weight: 700; } .streak.l { color: var(--danger); font-weight: 700; }
.trend-add { color: var(--accent); font-weight: 700; } .trend-drop { color: var(--danger); font-weight: 700; }

/* ============ player/team cells & rows ============ */
.player-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; min-height: 54px;
  border-bottom: 1px solid var(--line); }
.player-row:last-child { border-bottom: 0; }
.player-text { flex: 1; min-width: 0; }
.player-name { display: flex; align-items: center; gap: 5px; min-width: 0; font-weight: 600; font-size: 13.5px; }
.player-meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.player-text.align-right { text-align: right; }
.player-text.align-right .player-name { flex-direction: row-reverse; }
.player-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.team-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-cell .player-text { min-width: 0; }
.team-cell.me .player-name { color: var(--accent); }

/* ============ data tables ============ */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.data-table th { position: sticky; top: 0; background: var(--surface); z-index: 1; text-align: left;
  color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  padding: 10px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th.num, .data-table td.num { text-align: right; }
.data-table td { padding: 8px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.data-table td.c-player, .data-table td.c-team { max-width: 260px; min-width: 170px; white-space: normal; }
.data-table td.c-rank { width: 44px; }
.data-table td.c-slot { width: 56px; }
.data-table td.c-opp { color: var(--muted); }
.data-table td.c-stat { color: var(--text-2); }
.data-table tr.empty-row td { color: var(--muted); }
.data-table tr.playoff-cut td { border-bottom: 2px solid var(--accent); }
.data-table tr.bye td, .data-table tr.future td { color: var(--muted); }
.data-table tfoot td { border-top: 1px solid var(--surface-3); border-bottom: 0; font-weight: 700; }
.data-table.compact td { padding: 6px 10px; }
.group-row { background: var(--surface-2); color: var(--text-2); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; padding: 8px 12px !important; }
.sort-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0;
  color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.sort-btn:hover { color: var(--text); }
.sort-btn.active { color: var(--accent); }
.sort-arrow { font-size: 8px; min-width: 8px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 8px 4px 0; }
.legend-line { width: 18px; height: 2px; background: var(--accent); border-radius: 2px; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.pager-info { color: var(--muted); font-size: 12.5px; }
.pager-btn { background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 8px;
  padding: 7px 14px; font-weight: 600; cursor: pointer; }
.pager-btn:hover:not(:disabled) { background: var(--surface-2); }
.pager-btn:disabled { opacity: .4; cursor: default; }

/* ============ win probability ============ */
.win-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.wp-side { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.wp-side.right { justify-content: flex-end; }
.wp-num { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.wp-lbl { color: var(--muted); font-size: 11px; }
.wp-track { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; }
.wp-seg { height: 100%; transition: width .3s; min-width: 0; }
.wp-seg.fav { background: var(--accent); }
.wp-seg.dog { background: var(--danger); }
.wp-seg.even { background: var(--flex); }
.wp-num.fav { color: var(--accent); } .wp-num.dog { color: var(--danger); } .wp-num.even { color: var(--text-2); }

/* ============ matchup ============ */
.matchup-page { max-width: 1180px; }
.scoreboard { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-radius: var(--radius);
  padding: 20px 22px 18px; }
.sb-teams { display: grid; grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr); align-items: center;
  margin-bottom: 18px; }
.sb-side { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sb-side.right { flex-direction: row-reverse; text-align: right; }
.sb-text { min-width: 0; flex: 1; }
.sb-name { font-weight: 800; font-size: 18px; }
.sb-record { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.sb-score { flex-shrink: 0; }
.sb-side.left .sb-score { text-align: right; }
.sb-total { font-size: 34px; font-weight: 800; letter-spacing: -.6px; font-variant-numeric: tabular-nums; color: var(--text-2); line-height: 1.05; }
.sb-total.leading { color: var(--accent); }
.sb-proj { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.sb-mid { text-align: center; }
.sb-vs { color: var(--muted); font-weight: 800; font-size: 12px; }
.sb-week { color: var(--muted); font-size: 11px; margin-top: 2px; }

.mu-row { display: grid; grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr); align-items: center;
  padding: 7px 14px; min-height: 56px; border-bottom: 1px solid var(--line); }
.mu-row:last-child { border-bottom: 0; }
.mu-head { min-height: 0; padding-top: 9px; padding-bottom: 9px; }
.mu-colhead { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px; }
.mu-slot { display: flex; justify-content: center; }
.mu-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mu-cell .player-text { flex: 1; }
.mu-cell.empty .player-name { color: var(--muted); font-weight: 500; }
.mu-score { flex-shrink: 0; min-width: 58px; text-align: right; }
.mu-cell.right .mu-score { text-align: left; }
.mu-pts { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; }
.mu-pts.live { color: var(--warn); }
.mu-pts.pending { color: var(--muted); font-weight: 600; }
.mu-proj { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.mu-cell.empty .mu-pts { color: var(--muted); }

.matchup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.mini-matchup { margin: 0; }
.mini-side { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.mini-side .team-link { flex: 1; }
.mini-side + .mini-side { border-top: 1px solid var(--line); }
.mini-score { text-align: right; flex-shrink: 0; }
.mini-pts { font-weight: 800; font-size: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.mini-pts.leading { color: var(--accent); }
.mini-proj { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.mini-foot { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 10px 16px 12px;
  border-top: 1px solid var(--line); background: rgba(0, 0, 0, .12); }

/* ============ team ============ */
.team-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.team-head-text { min-width: 0; flex: 1; }
.team-name { font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.team-owner { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.stat { text-align: center; padding: 12px 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat:nth-child(3n) { border-right: 0; }
.stat:nth-last-child(-n+3) { border-bottom: 0; }
.stat-value { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-label { color: var(--muted); font-size: 10.5px; font-weight: 600; margin-top: 3px; text-transform: uppercase;
  letter-spacing: .4px; white-space: nowrap; }
.col-side .section-header { margin-top: 18px; }
.picks { display: block; }
.pick-block { padding: 12px 14px 8px; border-bottom: 1px solid var(--line); min-width: 0; }
.pick-block:last-child { border-bottom: 0; }
.pick-season { font-weight: 800; font-size: 13px; margin-bottom: 2px; }
.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.pick-left { display: flex; flex-direction: column; min-width: 0; }
.pick-right { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.pick-season + .pick-row { border-top: 0; }
.pick-round { font-weight: 600; font-size: 13px; white-space: nowrap; }
.pick-via { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-via.acquired { color: var(--accent); }

/* ============ league: bracket & transactions ============ */
.bracket { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.br-round { display: flex; flex-direction: column; width: 220px; flex-shrink: 0; }
.br-round-title { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; color: var(--text-2);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 0 2px 8px; }
.br-week { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.br-matches { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.br-match { background: var(--surface); border-radius: 10px; overflow: hidden; }
.br-label { font-size: 11px; font-weight: 600; color: var(--text-2); padding: 6px 10px; background: var(--surface-2); }
.br-label.placed { color: var(--accent); }
.br-team { display: flex; align-items: center; gap: 8px; padding: 9px 10px; font-size: 13px; font-weight: 600; min-width: 0; }
.br-match > * + * .br-team, .br-match > * + .br-team { border-top: 1px solid var(--line); }
.br-match > .br-label + * .br-team, .br-match > .br-label + .br-team { border-top: 0; }
.br-team.won { color: var(--accent); }
.br-team.lost { color: var(--muted); }
.br-team.tbd { color: var(--muted); font-style: italic; font-weight: 500; }

.tx-summary { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; margin: 0 2px 12px; }
.tx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 12px; align-items: start; }
.tx-card { padding: 12px 14px; margin: 0; }
.tx-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tx-type { font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.tx-type-trade { color: var(--wr); } .tx-type-waiver { color: var(--te); }
.tx-type-free_agent { color: var(--accent); } .tx-type-commissioner { color: var(--k); }
.tx-block { display: flex; flex-direction: column; gap: 7px; padding: 8px 0; }
.tx-block + .tx-block { border-top: 1px solid var(--line); }
.tx-player { display: flex; align-items: center; gap: 8px; padding-left: 44px; min-width: 0; }
.tx-sign { font-weight: 900; width: 10px; text-align: center; flex-shrink: 0; }
.tx-add { color: var(--accent); } .tx-drop { color: var(--danger); }
.tx-name { font-weight: 600; font-size: 13px; min-width: 0; width: auto; }
.tx-player .player-meta { flex-shrink: 0; margin: 0; }

/* ============ draft ============ */
.dr-scroll { overflow-x: auto; padding-bottom: 12px; }
.dr-board { display: flex; flex-direction: column; gap: 5px; width: max-content; min-width: 100%; }
.dr-row { display: grid; grid-template-columns: repeat(var(--cols), minmax(104px, 1fr)); gap: 5px; }
.dr-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px 6px; min-width: 0; }
.dr-team-name { font-size: 11px; font-weight: 600; color: var(--text-2); max-width: 100px; text-align: center; }
.dr-link { display: block; }
.dr-cell { display: flex; flex-direction: column; height: 84px; border-radius: 8px; padding: 7px 8px; color: var(--ink);
  overflow: hidden; background: var(--surface-2); min-width: 0; transition: transform .1s; }
.dr-link:hover .dr-cell { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.dr-cell.empty { color: var(--muted); border: 1px dashed var(--surface-3); background: transparent; }
.dr-cell.mine { box-shadow: inset 0 0 0 2px var(--text); }
.dr-label { font-size: 10px; font-weight: 800; opacity: .7; }
.dr-first { font-size: 11px; font-weight: 500; margin-top: 2px; }
.dr-last { font-size: 13.5px; font-weight: 800; line-height: 1.15; }
.dr-meta { font-size: 10px; font-weight: 700; opacity: .75; margin-top: auto; }
.dr-traded { font-size: 9.5px; font-weight: 800; }
.dr-cell.empty .dr-traded { color: var(--accent); margin-top: auto; }
.pos-bg-qb { background: var(--qb); } .pos-bg-rb { background: var(--rb); } .pos-bg-wr { background: var(--wr); }
.pos-bg-te { background: var(--te); } .pos-bg-k { background: var(--k); } .pos-bg-def { background: var(--def); }

/* ============ player card modal ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 10, .72); backdrop-filter: blur(2px); }
.modal-card { position: relative; width: 100%; max-width: 880px; max-height: 88vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--surface-3); border-radius: 18px; box-shadow: 0 24px 80px rgba(0, 0, 0, .6); }
.loading-wrap { min-height: 120px; }
.modal-close { position: absolute; top: 12px; right: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--surface-2); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.modal-close:hover { background: var(--surface-3); }
.pc { padding: 22px 24px 20px; }
.pc-head { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; padding-right: 40px; }
.pc-photo .avatar-xl { width: 96px; height: 96px; background: var(--surface-2); }
.pc-head-text { min-width: 0; flex: 1; }
.pc-tags { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.pc-number { color: var(--muted); }
.pc-name { font-size: 28px; font-weight: 800; letter-spacing: -.4px; margin: 6px 0 4px; }
.pc-injury-row { display: flex; align-items: center; gap: 6px; color: var(--warn); font-size: 12.5px; margin-bottom: 4px; }
.pc-owner { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-top: 6px; }
.owner-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 700; }
.team-link:hover .owner-inline { color: var(--accent); }
.pc-bio { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.bio-item { display: flex; flex-direction: column; }
.bio-label { color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.bio-val { font-weight: 600; font-size: 13.5px; }
.pc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
@media (max-width: 640px) { .pc-tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--surface); border-radius: 12px; padding: 12px 14px; }
.tile-value { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile-value.accent { color: var(--accent); }
.tile-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }
.tile-sub { color: var(--text-2); font-size: 11.5px; margin-top: 4px; }
.pc-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
/* contract & draft (player card) */
.pc-cd-wrap { margin-bottom: 18px; }
.pc-cd { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cd-card { background: var(--surface); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.cd-top { display: flex; align-items: center; gap: 8px; }
.cd-title { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.cd-chip { font-size: 10.5px; font-weight: 700; color: var(--text-2); background: var(--surface-3); border-radius: 999px;
  padding: 2px 8px; }
.cd-head { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.cd-line { color: var(--text-2); font-size: 12.5px; margin-top: 4px; }
.cd-team { display: flex; align-items: center; gap: 6px; }
.cd-logo { width: 18px; height: 18px; object-fit: contain; }
.pc-section-head .segmented { margin: 0; }
.pc-section-title { font-weight: 800; font-size: 15px; }
#pc-log, #pc-career { background: var(--surface); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.pc-section-head .season-dd { width: 150px; }

/* clickable fantasy points -> scoring breakdown */
.pts-btn { background: none; border: 0; padding: 2px 6px; margin: -2px -6px; border-radius: 6px; cursor: pointer;
  font: inherit; font-variant-numeric: tabular-nums; color: var(--text); border-bottom: 1px dashed var(--surface-3); }
.pts-btn.strong { font-weight: 700; }
.pts-btn.muted { color: var(--muted); }
.pts-btn:hover { background: var(--surface-3); color: var(--accent); }
.pts-btn.active { background: var(--accent-soft); color: var(--accent); border-bottom-color: var(--accent); }
.data-table tr.bd-row:hover td { background: transparent; }
.data-table td.bd-cell { padding: 0 !important; white-space: normal; background: var(--bg-deep); border-top: 0; font-weight: 500; }
.bd { padding: 12px 16px 14px; border-left: 3px solid var(--accent); }
.bd-title { font-weight: 700; font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 8px; }
.bd-table { width: 100%; max-width: 520px; border-collapse: collapse; font-size: 12.5px; }
.bd-table th { text-align: left; color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.data-table .bd-table td { padding: 5px 8px; border-top: 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.bd-table th.num, .bd-table td.num { text-align: right; }
.data-table .bd-table tfoot td { font-weight: 800; border-bottom: 0; border-top: 1px solid var(--surface-3); }
.data-table .bd-table .pos { color: var(--accent); font-weight: 700; }
.data-table .bd-table .neg { color: var(--danger); font-weight: 700; }

/* final result instead of win probability */
.win-bar.final { display: flex; justify-content: space-between; align-items: center; }
.final-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.final-tag { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.final-tag.won { color: var(--accent); } .final-tag.lost { color: var(--danger); } .final-tag.tie { color: var(--text-2); }

/* ============ small screens ============ */
@media (max-width: 760px) {
  .sb-teams { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); }
  .sb-side, .sb-side.right { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
  .sb-side.left .sb-score { text-align: center; }
  .sb-total { font-size: 26px; }
  .sb-name { font-size: 14px; }
  .mu-row { padding: 7px 8px; grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); }
  .mu-cell > .player-link { display: none; }
  .mu-slot .pos-pill { width: 36px; }
  .tx-grid, .matchup-grid, .league-grid { grid-template-columns: 1fr; }
  .ltab { padding: 10px 12px 11px; }
  .page-title { font-size: 22px; }
}

/* players table is wide: tighten so the stat columns fit beside the sidebar */
.players-table { font-size: 12.5px; }
.players-table th, .players-table td { padding-left: 7px; padding-right: 7px; }
.players-table td.c-player { min-width: 160px; max-width: 220px; }
.players-table .owner-tag { max-width: 104px; }
.players-table th:last-child, .players-table td:last-child { padding-right: 14px; }

.tx-team { display: flex; align-items: center; gap: 10px; }
.tx-team > .team-link { min-width: 0; }
.tx-receives { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }

/* playoff status badges (standings) */
.po-badge { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.po-badge.seed { color: var(--accent-ink); background: var(--accent); }
.po-badge.bye { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.po-badge.in { color: var(--accent); background: var(--accent-soft); }
.po-badge.elim { color: var(--danger); background: rgba(255, 92, 138, .12); }

/* dynasty value (player card) */
.dv-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  background: var(--surface); border-radius: 12px; padding: 14px 16px; margin-bottom: 6px; }
.dv-main { min-width: 0; }
.dv-picks { font-size: 18px; font-weight: 800; color: var(--accent); }
.dv-sub { color: var(--text-2); font-size: 12.5px; margin-top: 4px; }
.dv-sources { display: flex; flex-wrap: wrap; gap: 8px; }
.dv-src { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; min-width: 130px; }
.dv-src-name { color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.dv-src-val { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.dv-src-rank { color: var(--text-2); font-size: 11.5px; }
.dv-credit { color: var(--muted); font-size: 11px; margin: 0 2px 18px; }
.dv-credit a { color: var(--text-2); }
.dv-credit a:hover { color: var(--accent); }

/* ============ trade tool ============ */
.trade-page { max-width: 1180px; }
.tt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tt-head .segmented { margin: 0; }

/* analyzer: two team panels with a swap button between them */
.tr-panels { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); gap: 0; align-items: start; }
.tr-mid { display: flex; justify-content: center; padding-top: 74px; }
@media (max-width: 900px) { .tr-panels { grid-template-columns: 1fr; gap: 8px; } .tr-mid { padding-top: 0; } }
.tr-swap { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--surface-3); background: var(--surface);
  color: var(--text-2); font-size: 16px; cursor: pointer; }
.tr-swap:hover { border-color: var(--accent); color: var(--accent); }
.tr-panel { margin: 0; padding: 0; border: 1px solid var(--line); overflow: visible; display: flex; flex-direction: column; }
.tr-pad { padding: 0 14px 10px; }
.tr-pad .dd, .tr-pad .team-dd { width: 100%; }
.tr-panel-bar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.tr-badge { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--accent); }
.tr-sends { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.tr-team-head { padding: 14px 14px 12px; }
.tr-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tr-head-row .team-link { flex: 1; min-width: 0; }
.tr-head-right { text-align: right; flex-shrink: 0; }
.tr-count { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tr-total-picks { font-weight: 800; font-size: 13px; color: var(--accent); }
.tr-assets .dash-dropdown-value-item { background: var(--surface-3) !important; border-radius: 6px; }
.tr-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); min-height: 64px; }
.tr-list .card-empty { padding: 22px 14px; }
.tr-asset { display: grid; grid-template-columns: minmax(0, 1fr) auto 26px; align-items: center; gap: 10px;
  padding: 9px 12px 9px 14px; border-bottom: 1px solid var(--line); }
.tr-asset:last-child { border-bottom: 0; }
.tr-asset:hover { background: rgba(255, 255, 255, .02); }
.tr-pick { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tr-pick-label { font-weight: 600; font-size: 13px; min-width: 0; }
.tr-asset-val { text-align: right; }
.tr-asset-picks { font-weight: 700; font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.tr-asset-num { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.tr-remove { width: 24px; height: 24px; border-radius: 6px; border: 0; background: transparent; color: var(--muted);
  font-size: 12px; cursor: pointer; }
.tr-remove:hover { background: rgba(255, 92, 138, .14); color: var(--danger); }

/* summary ledger */
.tr-summary { margin: 14px 0 0; padding: 0; border: 1px solid var(--line); }
.tr-sum-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tr-sum-title { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--text-2); }
.tr-toggle { display: flex; align-items: center; gap: 10px; }
.tr-toggle .segmented { margin: 0; }
.tr-toggle .segmented .dash-options-list-option { padding: 4px 12px; font-size: 11.5px; }
.tr-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); }
.tr-cell { padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; min-width: 0; }
.tr-cell:nth-child(3n + 2), .tr-cell:nth-child(3n) { border-left: 1px solid var(--line); }
.tr-cell.colhead { padding-top: 14px; padding-bottom: 14px; }
.tr-cell.rowlabel { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.tr-cell.adj { color: var(--accent); font-weight: 700; }
.tr-cell.total { font-size: 20px; font-weight: 800; letter-spacing: -.3px; background: rgba(255, 255, 255, .02); }
.tr-cell.rowlabel.total { font-size: 11.5px; letter-spacing: .5px; }
.tr-info { margin-left: 5px; color: var(--muted); font-size: 12px; cursor: help; text-transform: none; }
.tr-gauge { padding: 16px 16px 6px; }
.tr-verdict-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px 14px; flex-wrap: wrap; }
.tr-verdict-icon { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; }
.tr-verdict-icon.fair { background: var(--accent-soft); color: var(--accent); }
.tr-verdict-icon.slight { background: rgba(255, 181, 71, .16); color: var(--warn); }
.tr-verdict-icon.favors { background: rgba(255, 92, 138, .14); color: var(--danger); }
.tr-verdict { font-size: 17px; font-weight: 800; }
.tr-verdict.fair { color: var(--accent); }
.tr-verdict.slight { color: var(--warn); }
.tr-verdict.favors { color: var(--danger); }
.tr-gap { color: var(--muted); font-size: 12px; margin-left: auto; }
.tr-balance { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 16px 16px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.tr-bal-label { font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.tr-bal-eg { color: var(--muted); font-size: 12.5px; }
.tr-summary .win-bar { margin: 0; }

/* ============ draft order settings ============ */
.gear-btn { background: var(--surface); border: 1px solid var(--line); color: var(--text-2); border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.gear-btn:hover { border-color: var(--accent); color: var(--accent); }
.ps-card { max-width: 560px; padding: 24px; }
.ps-title { font-size: 20px; font-weight: 800; }
.ps-sub { color: var(--muted); font-size: 12px; margin: 2px 0 16px; }
.ps-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ps-field .dd { width: 100%; }
.ps-hint { color: var(--muted); font-size: 11.5px; }
.ps-flips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.ps-num { width: 64px; }
.ps-num input { text-align: center; }
.ps-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.ps-done { padding: 9px 22px; font-size: 14px; }

.sh-right { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; }
.pick-proj { font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--accent); }
.pick-proj.tier { color: var(--text-2); font-weight: 700; font-size: 12px; }
.pick-proj-note { color: var(--muted); font-size: 10px; }

/* draft order view */
.do-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.do-summary { color: var(--text-2); font-size: 12.5px; }
.do-pick-cell { display: flex; align-items: baseline; gap: 6px; }
.do-pick { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--accent); white-space: nowrap; }
.draft-order-table td { padding-top: 10px; padding-bottom: 10px; }
.odds { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.odds-num { width: 38px; text-align: right; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.odds-bar { flex: 1; height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.odds-fill { height: 100%; background: var(--accent); }
.odds-chip { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 3px 8px; border-radius: 999px; }
.odds-chip.in { color: var(--accent); background: var(--accent-soft); }
.odds-chip.out { color: var(--muted); background: var(--surface-2); }

/* ============ trade finder ============ */
.tf-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.tf-top .segmented { margin: 0; }
.tf-hint { color: var(--muted); font-size: 12.5px; }
.tf-panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .tf-panels { grid-template-columns: 1fr; } }
.tf-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.tf-block { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tf-block .dd, .tf-block .team-dd { width: 100%; }
.tf-block .dash-options-list.segmented { margin: 0; }
.tf-row { display: flex; gap: 18px; flex-wrap: wrap; }
.tf-run { align-self: flex-start; padding: 10px 28px; font-size: 14px; }
.tf-results { margin-top: 18px; }
.tf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 560px) { .tf-cards { grid-template-columns: 1fr; } }
.tf-card { margin: 0; padding: 0; border: 1px solid var(--line); }
.tf-card-head { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tf-card-head .team-link { flex: 1; min-width: 140px; }
.tf-chip-wrap { display: flex; align-items: center; gap: 8px; }
.tf-chip { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 3px 9px; border-radius: 999px; }
.tf-chip.fair { color: var(--accent); background: var(--accent-soft); }
.tf-chip.slight { color: var(--warn); background: rgba(255, 181, 71, .14); }
.tf-card-body { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); }
.tf-col { padding: 6px 0; min-width: 0; }
.tf-col-title { padding: 6px 14px; color: var(--muted); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.tf-arrow { align-self: center; text-align: center; color: var(--muted); }
.tf-asset { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px; min-width: 0; }
.tf-asset .player-cell { flex: 1; min-width: 0; }
.tf-asset .avatar-sm { width: 30px; height: 30px; }
.tf-foot { padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }

/* ============ Team export image (components/team_export.py) ============ */
.controls-end { margin-left: auto; }
.te-card-modal { max-width: 520px; padding: 24px; }
.te-opts { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.te-opts label:has(input[value="nextonly"]) { margin-left: 24px; }
.te-preview-box { max-height: 58vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-deep); padding: 14px; display: flex; justify-content: center; }
.te-status { color: var(--muted); font-size: 12.5px; }

.ex-card { width: 420px; box-sizing: border-box; padding: 18px 16px 14px; background: #151c2b; color: #f4f6fa;
  font-family: var(--font); border-radius: 0; }
.ex-top { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 4px;
  border-bottom: 1px solid #252f43; }
.ex-team-text { min-width: 0; }
.ex-team { font-size: 18px; font-weight: 800; line-height: 1.2; }
.ex-meta { font-size: 12px; color: #9aa6bd; margin-top: 2px; }
.ex-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; font-weight: 800;
  margin: 18px 0 6px; }
.ex-card.no-banner > .ex-h:first-child { margin-top: 2px; }
.ex-week { color: var(--accent); font-size: 14px; font-weight: 700; }
.ex-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.ex-row.bye, .ex-row.empty { opacity: .55; }
.ex-pill { flex: 0 0 44px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; color: #0d1118; }
.ex-qb { background: var(--qb); } .ex-rb { background: var(--rb); } .ex-wr { background: var(--wr); }
.ex-te { background: var(--te); } .ex-k { background: var(--k); } .ex-def { background: var(--def); }
.ex-flex { background: linear-gradient(90deg, var(--wr) 0%, var(--rb) 50%, var(--te) 100%); }
.ex-sflex { background: linear-gradient(90deg, var(--qb) 0%, var(--wr) 50%, var(--rb) 100%); }
.ex-bn { background: #b8c3d6; } .ex-ir, .ex-taxi, .ex-none { background: #0b0f16; color: #f4f6fa; }
.ex-pic { position: relative; flex: 0 0 46px; height: 46px; }
.ex-head { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #232c3e; }
.ex-pic-empty { border-radius: 50%; background: #232c3e; }
.ex-logo { position: absolute; left: -6px; bottom: -3px; width: 20px; height: 20px; object-fit: contain; }
.ex-txt { flex: 1; min-width: 0; }
.ex-line1 { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.ex-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-pos { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ex-c-qb { color: var(--qb); } .ex-c-rb { color: var(--rb); } .ex-c-wr { color: var(--wr); }
.ex-c-te { color: var(--te); } .ex-c-k { color: var(--k); } .ex-c-def { color: var(--def); }
.ex-line2 { font-size: 12px; color: #c3cad8; margin-top: 2px; }
.ex-line3 { font-size: 12px; color: #9aa6bd; margin-top: 1px; display: flex; gap: 8px; }
.ex-inj { color: var(--danger); font-weight: 700; }
.ex-right { flex: 0 0 56px; text-align: right; font-variant-numeric: tabular-nums; }
.ex-pts { font-size: 15px; font-weight: 800; }
.ex-proj { font-size: 12px; color: #9aa6bd; margin-top: 3px; }
.ex-bye { font-size: 13px; font-weight: 700; color: #c3cad8; }
.ex-pick-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 6px; }
.ex-pick { font-size: 15px; font-weight: 700; line-height: 1.35; }
.ex-nowrap { white-space: nowrap; }
.ex-foot { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 18px; padding-top: 12px;
  border-top: 1px solid #252f43; font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.ex-mark { color: var(--accent); }
.te-opts label:has(input:disabled) { opacity: .45; cursor: not-allowed; }


/* ============ phones (components use .m-hide / .m-only / .m-inline; tables use the mhide column flag) ============ */
.m-only, .m-inline, .ltab-ico, .ltab-short { display: none; }
.i-matchup { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M12 5v14M7 10v4M17 10v4'/%3E%3C/svg%3E"); }
.i-team { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3 3 6l2 5 2-1v11h10V10l2 1 2-5-5-3a4 4 0 0 1-8 0z'/%3E%3C/svg%3E"); }
.i-league { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4h8v5a4 4 0 0 1-8 0zM8 6H5a3 3 0 0 0 3 4M16 6h3a3 3 0 0 1-3 4M12 13v4M8 20h8M10 17h4'/%3E%3C/svg%3E"); }
.i-players { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.i-draft { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6' rx='1'/%3E%3Crect x='14' y='4' width='6' height='6' rx='1'/%3E%3Crect x='4' y='14' width='6' height='6' rx='1'/%3E%3Crect x='14' y='14' width='6' height='6' rx='1'/%3E%3C/svg%3E"); }
.i-trade { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h15l-4-4M20 16H5l4 4'/%3E%3C/svg%3E"); }

/* ============ home switch, This Week, help, donate, install banner ============ */
.home-nav { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; background: var(--surface);
  border-radius: 999px; }
.hn-item { padding: 7px 16px; border-radius: 999px; color: var(--text-2); font-weight: 700; font-size: 13px; }
.hn-item:hover { color: var(--text); }
.hn-item.active { background: var(--text); color: var(--ink); }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

.wk-controls .dash-options-list.segmented { margin: 0; }
.wk-row { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.wk-row:last-child { border-bottom: 0; }
.wk-row.wk-live { box-shadow: inset 3px 0 0 var(--accent); }
.wk-main { display: flex; align-items: center; gap: 12px; }
.wk-main > .player-cell { flex: 1; min-width: 0; }
.wk-right { flex-shrink: 0; text-align: right; }
.wk-pts { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; min-height: 20px; }
.wk-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.wk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; padding-left: 46px; }
.wk-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px;
  border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; }
.wk-chip:hover { color: var(--text); background: var(--surface-3); }
.wk-chip-name { overflow-wrap: anywhere; }
.wk-chip-pts { color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }

.page-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px;
  margin-top: 32px; font-size: 13px; }
.foot-link { color: var(--text-2); font-weight: 600; }
.foot-link:hover { color: var(--text); }
.donate-link { color: var(--text-2); font-weight: 600; }
.donate-link:hover { color: var(--accent); }
.hdr-donate { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 12px; }
.hdr-donate:hover { border-color: var(--accent); }

.help-head { flex-direction: column; align-items: flex-start; gap: 0; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.help-card { display: block; padding: 18px; background: var(--surface); border-radius: var(--radius);
  border: 1px solid transparent; transition: background .15s, border-color .15s; }
.help-card:hover { background: var(--surface-2); border-color: var(--surface-3); }
.help-title { font-weight: 800; font-size: 15px; }
.help-desc { color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.4; }
.help-foot { color: var(--muted); font-size: 13px; margin-top: 18px; }
.help-mail { color: var(--accent); font-weight: 600; overflow-wrap: anywhere; }
.help-back { display: inline-block; margin-top: 22px; }

.install-banner { position: fixed; left: 10px; right: 10px; z-index: 70;
  bottom: calc(env(safe-area-inset-bottom) + 12px); display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 14px; background: var(--surface-2); border: 1px solid var(--surface-3);
  border-radius: 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
  transform: translateY(calc(100% + 40px)); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.install-banner.show { transform: none; opacity: 1; }
body:has(.tab-bar) .install-banner { bottom: calc(var(--tabbar-h, 58px) + env(safe-area-inset-bottom) + 10px); }
.ib-icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px;
  color: var(--text-2); line-height: 1.35; }
.ib-text b { color: var(--text); }
.ib-share { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; background: var(--accent);
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M8 7l4-4 4 4'/%3E%3Cpath d='M6 11H5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-8a1 1 0 0 0-1-1h-1'/%3E%3C/svg%3E");
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.ib-install { flex-shrink: 0; background: var(--accent); color: var(--ink); border: 0; border-radius: 999px;
  padding: 9px 16px; font-weight: 800; font-size: 14px; cursor: pointer; }
.ib-close { flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); font-size: 15px; cursor: pointer; }

@media (max-width: 640px) {
  :root { --header-h: 52px; --tabbar-h: 58px; }
  .m-hide { display: none !important; }
  .m-only { display: inline-flex; }
  .m-inline { display: inline; }
  .m-fa { color: var(--accent); font-weight: 700; }
  .player-text > .m-only { margin-top: 3px; align-self: flex-start; }

  /* shell: compact header that clears the iPhone status bar when opened from the home screen */
  .app-header { height: calc(var(--header-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .brand { font-size: 17px; }
  .user-chip .btn-ghost { padding: 5px 10px; }
  .page { padding: 12px 12px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); }
  .league-page { padding-top: 10px; }
  .league-top { position: static; margin: 0; padding: 0; }
  .league-bar { padding: 0 0 6px; gap: 10px; }
  .league-bar .avatar { width: 34px; height: 34px; }
  .league-title { font-size: 17px; }
  .league-subtitle { font-size: 12px; margin-top: 0; }

  /* league tabs become a bottom tab bar */
  .tab-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; gap: 0; overflow: visible;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(11, 15, 22, .97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); border-bottom: 0; }
  .ltab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 6px 0 4px; margin: 0; border-bottom: 0; font-size: 10.5px; font-weight: 700; }
  .ltab.active { color: var(--accent); border-bottom: 0; }
  .ltab-lbl { display: none; }
  .ltab-short { display: block; }
  .ltab-ico { display: block; width: 22px; height: 22px; background: currentColor;
    -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
  .tab-content { padding-top: 8px; }

  /* 16px inputs stop iOS from zooming in when a field is tapped */
  input, select, textarea { font-size: 16px !important; }
  .dash-dropdown, .dash-dropdown-trigger, .dash-dropdown-value { font-size: 16px !important; }

  /* controls stack full width */
  .controls-row { gap: 8px; }
  /* dropdowns are wrapped in .dash-dropdown-wrapper, which is the flex item */
  .controls-row > .dash-dropdown-wrapper:has(.team-dd) { flex: 1 1 100%; min-width: 0; }
  .controls-row > .dash-dropdown-wrapper:has(.week-dd) { flex: 0 0 116px; }
  .controls-row > .dash-dropdown-wrapper:has(.week-dd.wide) { flex-basis: 140px; }
  .controls-row > .dash-dropdown-wrapper:has(.sort-dd) { flex: 1 1 100%; }
  .controls-row .sort-dd { width: 100%; }
  .controls-row:has(.week-dd) > .dash-dropdown-wrapper:has(.team-dd) { flex: 1 1 0; }
  .controls-row .team-dd, .controls-row .week-dd { width: 100%; max-width: none; }
  .controls-end { margin-left: 0; }
  .filter-row .text-input { width: 100%; }
  .filter-grid:not(.open) { display: none; }
  .filter-grid.open { grid-template-columns: 1fr 1fr; }

  /* names take the leftover width and truncate, so number columns stay on screen */
  .data-table td.c-team, .data-table td.c-player { width: 100%; max-width: 0; }
  .data-table .player-name { font-size: 13.5px; }

  /* scroll-x tables (standings, draft pick list, players): every column at its natural width, names in
     full, and the table scrolls sideways inside its card */
  .table-scroll { -webkit-overflow-scrolling: touch; }
  .data-table.scroll-x td.c-team, .data-table.scroll-x td.c-player { width: auto; max-width: none; min-width: 0; }
  .data-table.scroll-x .ellipsis, .data-table.scroll-x .player-meta { overflow: visible; text-overflow: clip; }

  .data-table.scroll-x .owner-tag { max-width: none; }
  /* the Team page's grid must not stretch to the table's width, so the table scrolls inside its card */
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .col-main, .col-side { min-width: 0; }

  /* names and sub-lines wrap instead of being cut off with "…" */
  .data-table:not(.scroll-x) .ellipsis, .data-table:not(.scroll-x) .player-meta,
  .mu-cell .ellipsis, .mu-cell .player-meta, .br-team .ellipsis,
  .tr-panel .ellipsis, .tr-grid .ellipsis, .tf-card .ellipsis, .tf-card .player-meta {
    white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }

  /* matchup rows: a little smaller so both sides fit */
  .mu-row { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); padding: 8px 8px; }
  .mu-cell { gap: 6px; }
  .mu-cell .player-name { font-size: 13px; }
  .mu-cell .player-meta { font-size: 10.5px; }
  .mu-score { min-width: 38px; }
  .mu-pts { font-size: 14px; }
  .mu-proj { font-size: 10.5px; }
  .mu-slot .pos-pill { width: 34px; font-size: 10.5px; }
  .br-team { font-size: 12.5px; }
  /* bracket: rounds stacked top to bottom instead of side by side */
  .bracket { flex-direction: column; gap: 18px; overflow-x: visible; }
  .br-round { width: 100%; }
  .br-matches { justify-content: flex-start; gap: 10px; }

  /* trade analyzer: totals and values move under the name instead of squeezing it */
  .tr-head-row { flex-wrap: wrap; row-gap: 6px; }
  .tr-head-right { flex-basis: 100%; text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .tr-asset { grid-template-columns: minmax(0, 1fr) 26px; row-gap: 2px; }
  .tr-asset > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .tr-asset > .tr-asset-val { grid-column: 1; grid-row: 2; text-align: left; padding-left: 44px;
    display: flex; gap: 8px; align-items: baseline; }
  .tr-asset > :last-child { grid-column: 2; grid-row: 1 / span 2; }
  .tr-asset-picks { white-space: normal; }
  .tr-grid { grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr); }
  .tr-cell { padding: 10px 10px; font-size: 13px; }
  .tr-cell.total { font-size: 17px; }
  .tr-cell.colhead .avatar { display: none; }
  .tr-cell.rowlabel, .tr-cell.rowlabel.total { font-size: 10px; letter-spacing: .3px; }
  .tr-cell.colhead .player-name { font-size: 12.5px; }

  /* trade finder cards: "You send" above "You receive" */
  .tf-card-body { grid-template-columns: 1fr; }
  .tf-arrow { padding: 2px 0; transform: rotate(90deg); }
  .tf-card-head { flex-wrap: wrap; }
  .tf-card-head .team-link { min-width: 0; flex: 1 1 100%; }

  /* multi-selects: the analyzer lists picks below its box, so the box just shows "N selected";
     elsewhere the selected names wrap onto extra lines */
  .tr-assets .dash-dropdown-value:has(+ .dash-dropdown-value-count) { display: none; }
  .tr-assets .dash-dropdown-value-count { margin-left: 0; }
  .dash-dropdown-value:has(+ .dash-dropdown-value-count) { flex-wrap: wrap; white-space: normal; height: auto; row-gap: 4px; }
  .dash-dropdown-value:has(+ .dash-dropdown-value-count) .dash-dropdown-value-item { white-space: normal; max-width: 100%; }

  /* long dropdown choices (e.g. draft order settings) wrap */
  .ps-dd .dash-dropdown-value, .ps-dd .dash-dropdown-value-item { white-space: normal; text-overflow: clip; }

  /* tables: tighter cells */
  .data-table th, .data-table td { padding-left: 8px; padding-right: 8px; }
  .data-table td:first-child, .data-table th:first-child { padding-left: 10px; }
  .data-table td:last-child, .data-table th:last-child { padding-right: 10px; }

  /* team */
  .team-head { gap: 12px; margin-bottom: 12px; }
  .team-head .avatar-xl { width: 52px; height: 52px; }
  .team-name { font-size: 20px; }

  /* popups fill the screen */
  .modal { padding: 0; }
  .modal-card { max-width: none; max-height: none; height: 100%; border-radius: 0; border: 0;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .modal-card.ps-card, .modal-card.te-card-modal {
    padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom)); }
  .modal-close { top: calc(10px + env(safe-area-inset-top)); right: 12px; }
  .pc { padding: 16px 14px; }
  .pc-cd { grid-template-columns: 1fr; }
  .cd-head { font-size: 17px; }
  /* export popup: Save image sits under the options, above the long preview */
  .modal-card.te-card-modal { display: flex; flex-direction: column; }
  .te-card-modal > .ps-actions { order: 1; margin: 0 0 14px; flex-direction: column; align-items: stretch; gap: 6px; }
  .te-card-modal > .ps-actions .btn-primary { width: 100%; padding: 12px; font-size: 15px; }
  .te-card-modal > .ps-actions .te-status { order: 2; text-align: center; }
  .te-card-modal > .te-preview-box { order: 2; flex-shrink: 0; }
  .te-preview-box { max-height: none; padding: 8px; justify-content: flex-start; overflow: hidden; }
  #te-preview { transform: scale(.82); transform-origin: top left; margin-bottom: -18%; }

  /* home switch, This Week, help, donate */
  .brand { white-space: nowrap; }
  .user-chip { gap: 8px; }
  .user-chip:has(.hdr-donate) > .avatar { display: none; }
  .hdr-donate { padding: 5px 10px; font-size: 11.5px; white-space: nowrap; }
  .home-nav { display: flex; margin-bottom: 12px; }
  .hn-item { flex: 1; text-align: center; padding: 8px 0; }
  .page-head:has(.page-sub) { margin-bottom: 12px; }
  .wk-controls { flex-direction: column; align-items: stretch; }
  .wk-controls .dash-options-list.segmented { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .wk-controls .dash-options-list.segmented::-webkit-scrollbar { display: none; }
  #wk-side .dash-options-list-option { flex: 1; justify-content: center; }
  .wk-row { padding: 10px 12px; }
  .wk-main { gap: 10px; }
  .wk-main .player-name .ellipsis, .wk-main .player-meta {
    white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
  .wk-chips { padding-left: 0; }
  .wk-chip { font-size: 12px; padding: 4px 10px; }
  .help-grid { grid-template-columns: 1fr; }
  .help-card { padding: 16px; }
  .page-foot { margin-top: 24px; }
}
