/* ================== THEME ================== */
:root{
  --th-bg:#0f1116;
  --line:#2a2f3a;
  --bg:#0a0f14;
  --card:#0e1118;
  --text:#e5e7eb;
  --sub:#94a3b8;
  --accent:#1a2a45;
  --chip:#21314d;
  --chipText:#cfe0ff;

  /* schedule drawer */
  --sched-peek: 84px;
  --sched-max: 72dvh;
}

/* ================== BASE ================== */
*{ box-sizing:border-box; }
html,body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:16px/1.45 system-ui,Segoe UI,Roboto,Arial,sans-serif;
}
html{ scrollbar-gutter:stable both-edges; }
@supports not (scrollbar-gutter:stable){ html{ overflow-y:scroll; } }

#content{
  max-width:min(1200px,96vw);
  margin:0 auto;
  padding:0;
}

.muted{ color:var(--sub); }
.small{ font-size:12px; }
.tc{ text-align:center; }
.tr{ text-align:right; }
.pill{
  display:inline-block; padding:2px 8px; border-radius:999px;
  background:var(--chip); color:var(--chipText); font-size:12px;
}
.money{ font-weight:700; }

/* ================== CARDS ================== */
.table-card,.header-card,.sched-drawer{
  background:linear-gradient(180deg,#0e1726,#0e1420);
  border:1px solid #111827;
  border-radius:14px;
  box-shadow:0 8px 30px rgba(0,0,0,.35);
  overflow:hidden;
}

/* ================== HEADER ================== */
.hdr.header-card{
  margin:0;
  border-radius:0;
  border:0;
  border-bottom:1px solid var(--line);
  padding:16px 12px 12px;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:.5rem;
}

.hdr h1{ margin:0 0 8px; font-size:26px; }
.rules-line{ margin-top:6px; font-size:13px; color:var(--sub); font-style:normal; opacity:.95; }

.week-badge{
  position:absolute;
  top:12px;
  right:12px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text);
  padding:6px 10px;
  border-radius:10px;
  font-size:13px;
  backdrop-filter: blur(6px);
}

/* Logo */
#mainLogo{
  max-height:120px;
  width:auto;
  max-width:100%;
  display:block;
  margin:0 auto;
  opacity:.95;
}

/* ================== CONTROLS BAR ================== */
.bar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:10px;
}
.bar select,.bar button{
  height:36px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:0 10px;
  background:#121826;
  color:#cbd5e1;
}
.bar button{
  background:var(--accent);
  color:#fff;
  border-color:#2b3a55;
  cursor:pointer;
}

/* ================== TABLES (GLOBAL) ================== */
.table-wrap{ overflow:auto; }
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  font-size:14px;
}
thead th{
  position:sticky;
  top:0;
  z-index:3;
  background:var(--th-bg);
  color:#fff;
  font-weight:600;
  border-bottom:1px solid var(--line);
}
th,td{
  padding:12px 12px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
tr:nth-child(even) td{ background:rgba(255,255,255,.02); }
tr:hover td{ background:rgba(255,255,255,.05); }

/* ================== STANDINGS WIDTHS ================== */
#standings thead th:nth-child(1){ width:56px; }
#standings thead th:nth-child(2){ width:42%; }
#standings thead th:nth-child(3){ width:110px; text-align:center; }
#standings thead th:nth-child(4){ width:140px; text-align:right; }
#standings thead th:nth-child(5){ width:150px; text-align:right; }

tr.stand-row{ cursor:pointer; }
tr.stand-row:hover{ background: rgba(255,255,255,0.04); }

/* Expandable rows */
.toggle{ cursor:pointer; display:flex; align-items:center; gap:10px; }
.chev{
  display:inline-block;
  transition:transform 240ms cubic-bezier(.2,.9,.2,1), opacity 160ms ease;
  transform-origin:50% 50%;
  opacity:.65;
}
.chev.open{ transform: rotate(90deg) translateX(1px); opacity:1; }

tr.detail-row td{ background:transparent; border:0; }

/* ================== DRAWER ================== */
.drawer{ padding:12px; overflow-x:auto; -webkit-overflow-scrolling:touch; }

/* week bar */
.weekbar{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:6px 2px 8px;
  margin-bottom:10px;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  scroll-behavior:smooth;
}
.weekbar::-webkit-scrollbar{ display:none; }
.weekbox{
  flex:0 0 auto;
  min-width:64px;
  height:56px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#0e1420;
  color:#e5e7eb;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  user-select:none;
  scroll-snap-align:center;
}
.weekbox .wlab{ font-size:11px; color:#8aa0bf; line-height:1; }
.weekbox .wval{ font-weight:800; margin-top:4px; }
.weekbox.active{
  outline:none;
  border-color:rgba(255,255,255,.20);
  box-shadow:0 0 0 2px rgba(255,255,255,.10) inset;
}

/* ================== WK BREAKDOWN (ONE SOURCE OF TRUTH) ================== */
/* expects colgroup with: col-player, col-r x4, col-total, col-earn */
.wk-breakdown{
  width:100%;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
}

.wk-breakdown col.col-player{ width:auto; }
.wk-breakdown col.col-r{ width:64px; }
.wk-breakdown col.col-total{ width:64px; }
.wk-breakdown col.col-earn{ width:140px; }

.wk-breakdown thead th{
  background:var(--th-bg);
  color:#cbd5e1;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.06em;
  text-align:center;
}
.wk-breakdown thead th:first-child{ text-align:left; padding-left:10px; }
.wk-breakdown thead th:last-child{ text-align:right; padding-right:10px; }

.wk-breakdown th,.wk-breakdown td{
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
}

.wk-breakdown td:first-child{
  text-align:left;
  overflow:hidden;
  text-overflow:ellipsis;
}
.wk-breakdown td:not(:first-child):not(:last-child){ text-align:center; }
.wk-breakdown td:last-child{ text-align:right; }

.wk-breakdown tr.dnp td{ opacity:.7; }

/* hide not-playing if you want players not in field gone */
.wk-breakdown tr.not-playing{ display:none; }

/* ================== SCHEDULE LIST ================== */
#schedBox, #schedBoxMobile{
  max-height:550px;
  overflow-y:auto;
  padding-right:4px;
  scrollbar-width:thin;
  scroll-snap-type:y proximity;
  overscroll-behavior:contain;
}
#schedBox.no-snap, #schedBoxMobile.no-snap{ scroll-snap-type:none !important; }

.sched-group{ margin-bottom:14px; scroll-snap-align:start; }
.sched-group h4{
  margin:4px 0 6px;
  font-size:13px;
  color:#9ca3af;
  text-transform:uppercase;
  letter-spacing:.04em;
  border-bottom:1px solid rgba(255,255,255,.08);
  padding-bottom:3px;
}
.sched-item{
  display:block;
  padding:10px 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  border-radius:10px;
  font-size:13px;
  line-height:1.15;
}
.sched-item:hover{ background:rgba(255,255,255,.04); }
.sched-item.major{ background:linear-gradient(90deg,rgba(255,230,120,.15),transparent 70%); border-left:3px solid #f5c451; }
.sched-item.current{ background:linear-gradient(90deg,rgba(34,197,94,.18),transparent 70%); border-left:3px solid #22c55e; }
.sched-item.offevent{ opacity:.8; font-style:italic; }
.sched-main b{ display:flex; align-items:center; gap:6px; font-weight:600; line-height:1.3; }
.trophy{ font-size:14px; line-height:1; filter:drop-shadow(0 0 1px rgba(0,0,0,.5)); }

.sched-body{ overflow:auto; }

/* ================== GRID LAYOUT ================== */
.grid{ display:grid; gap:14px; padding:14px 12px 24px; }

@media (min-width:641px){
  .grid{
    grid-template-columns: 1fr 380px;
    align-items:start;
  }
  .sched-drawer{
    position:sticky;
    top:18px;
    transform:none !important;
    max-height:calc(100vh - 36px);
    border-radius:14px;
  }
  .sched-body{
    max-height:calc(100vh - 110px);
    overflow:auto;
  }
}

/* ================== HOME BUTTON ================== */
.home-btn{
  position:fixed;
  top:calc(14px + env(safe-area-inset-top, 0px));
  left:calc(14px + env(safe-area-inset-left, 0px));
  z-index:2147483647;

  pointer-events:auto;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;

  display:inline-flex;
  align-items:center;
  gap:6px;

  padding:8px 12px;
  border-radius:999px;

  font-size:14px;
  font-weight:600;
  text-decoration:none;

  background:rgba(18, 24, 38, 0.9);
  color:#e5e7eb;
  border:1px solid #2a2f3a;
  backdrop-filter:blur(8px);

  box-shadow:0 6px 20px rgba(0,0,0,.35);
  transition:transform .15s ease, background .15s ease;
}
.home-btn:hover{ background:#1a2a45; transform:translateY(-1px); }
.home-btn:active{ transform:translateY(0); }

@media (max-width:520px){
  .home-btn{ padding:8px 10px; }
  .home-btn span{ display:none; }
}

/* ================== MOBILE ================== */
@media (max-width:640px){

  /* shrink header */
  .hdr h1{ font-size:20px; }
  #mainLogo{ max-height:90px; }

  /* standings compact */
  #standings{ font-size:13px; }
  #standings th,#standings td{ padding:8px 6px; }
  #standings thead{ position:static; z-index:1; }

  /* hide roster column on mobile (keep your behavior) */
  #standings table:not(.wk-breakdown) thead th:nth-child(3),
  #standings table:not(.wk-breakdown) tbody td:nth-child(3){
    display:none;
  }
  #standings thead th:nth-child(4){ width:90px; }
  #standings thead th:nth-child(5){ width:100px; }

  /* card rows */
  #standings .card-row td{ padding:0; border:none; background:transparent; }
  .card-head{
    display:flex; align-items:center; gap:12px;
    padding:12px 14px;
    border-radius:12px;
    background:linear-gradient(180deg,#0e1726,#0e1420);
    border:1px solid #111827;
    box-shadow:0 6px 18px rgba(0,0,0,.28);
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }

  /* dropdowns should never clip */
  #standings, #standings .card-row, #standings .drawer-row{ overflow:visible; }
  .dropdown-menu,.select-list,.chooser-menu{
    position:fixed !important;
    z-index:9999 !important;
    max-height:60vh;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
  }

  /* schedule drawer = bottom sheet */
    /* schedule drawer = bottom sheet (clean + stable) */
  .sched-card-desktop{ display:none; }

  .sched-drawer{
    position:fixed;
    left:0; right:0; bottom:0;
    z-index:40;

    border-radius:18px 18px 0 0;
    max-height:var(--sched-max);

    /* Always visible pulltab; overlays content (no layout pushing) */
    transform:translate3d(0, calc(100% - var(--sched-peek)), 0);
    transition:transform .26s cubic-bezier(.2,.9,.2,1);
    will-change:transform;

    /* keep your premium panel look */
    overflow:hidden;
    box-shadow:0 -18px 36px rgba(0,0,0,.55), 0 8px 30px rgba(0,0,0,.35);
  }
  .sched-drawer.open{ transform:translate3d(0,0,0); }

  .sched-head{
    min-height:var(--sched-peek);
    padding:14px 16px;
    border-bottom:1px solid #1a2434;
    display:flex;
    align-items:center;
    gap:8px;
    cursor:pointer;

    /* important: don’t let mobile Safari treat this like scroll space */
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }

  .sched-dot{
    width:46px;
    height:6px;
    border-radius:999px;
    background:#1f2937;
    margin-right:8px;
    opacity:.9;
  }

  /* “sticky grab” vibe when CLOSED only */
  .sched-drawer:not(.open) .sched-dot{
    animation:grabPulse 1.7s ease-in-out infinite;
  }
  @keyframes grabPulse{
    0%,100%{ transform:translateY(0); opacity:.85; }
    50%{ transform:translateY(-3px); opacity:1; }
  }

  .sched-head h3{
    margin:0;
    font-size:15px;
    flex:1;
    text-align:left;
  }

  .sched-body{
    max-height:calc(var(--sched-max) - var(--sched-peek));
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    padding:8px 10px calc(14px + env(safe-area-inset-bottom, 0px));
    scrollbar-width:none;
  }
  .sched-body::-webkit-scrollbar{ width:0; height:0; }

  /* ✅ THIS is the “no split” rule:
     Don’t reserve a giant space for the drawer, but leave a tiny comfort pad
     so bottom content isn’t awkward under the pulltab. */
  .grid{
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* dim background when schedule open (your existing vibe) */
  body.sched-open::before{
    content:'';
    position:fixed;
    inset:0;
    background:linear-gradient(to top, rgba(0,0,0,0.7), transparent 40%);
    z-index:35;
    pointer-events:none;
  }
}
/* ===== wk-breakdown: desktop sizing + alignment (FINAL) ===== */
.drawer .wk-breakdown{
  width:100% !important;
  table-layout:fixed !important;
}

/* Column widths (matches: Players | Score | Earnings | R1 | R2 | R3 | R4) */
.drawer .wk-breakdown col.col-score{ width:72px !important; }
.drawer .wk-breakdown col.col-earn { width:96px !important; }   /* tighter earnings */
.drawer .wk-breakdown col.col-r    { width:56px !important; }   /* compact rounds */
.drawer .wk-breakdown col.col-player{ width:auto !important; }  /* give names the rest */

/* Players: allow wrapping (or keep single line with ellipsis—pick one) */
.drawer .wk-breakdown td:first-child{
  white-space:normal !important;     /* ✅ gives names room */
  overflow:visible !important;
  text-overflow:clip !important;
  line-height:1.2;
}

/* If you prefer single line with ellipsis instead, use this instead:
.drawer .wk-breakdown td:first-child{
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
*/

/* Score centered */
.drawer .wk-breakdown th:nth-child(2),
.drawer .wk-breakdown td:nth-child(2){
  text-align:center !important;
}

/* ✅ Earnings centered (header + cells) */
.drawer .wk-breakdown th:nth-child(3),
.drawer .wk-breakdown td:nth-child(3){
  text-align:center !important;
  font-variant-numeric: tabular-nums;
}

/* R1–R4 centered */
.drawer .wk-breakdown th:nth-child(n+4),
.drawer .wk-breakdown td:nth-child(n+4){
  text-align:center !important;
  padding-left:0 !important;
  padding-right:0 !important;
}
/* =========================
   VIBE PACK (paste at VERY END)
   ========================= */

/* 1) Add subtle ambient glow behind cards */
.table-card, .sched-drawer{
  position: relative;
}
.table-card::before, .sched-drawer::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: inherit;
  pointer-events:none;
  background:
    radial-gradient(900px 220px at 20% 0%, rgba(34,211,238,.10), transparent 55%),
    radial-gradient(700px 200px at 90% 15%, rgba(245,196,81,.10), transparent 60%);
  opacity:.9;
  filter: blur(0px);
}

/* 2) Give tables a “panel” surface again */
#standings, .drawer .wk-breakdown{
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border-radius: 14px;
}

/* 3) Make header row richer (less flat) */
#standings thead th,
.drawer .wk-breakdown thead th{
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)),
    var(--th-bg);
  border-bottom:1px solid rgba(255,255,255,.10) !important;
}

/* 4) Better row rhythm: alternating + hover “lift” */
#standings tbody tr td{
  transition: background .15s ease, transform .12s ease;
}
#standings tbody tr:nth-child(odd) td{
  background: rgba(255,255,255,.012);
}
#standings tbody tr:hover td{
  background: rgba(255,255,255,.055) !important;
}
#standings tbody tr:hover{
  transform: translateY(-1px);
}

/* 5) Make the expanded drawer feel like a premium inset */
.drawer{
  background: radial-gradient(900px 320px at 35% 0%, rgba(26,42,69,.55), transparent 55%);
  border-radius: 14px;
}
.drawer .wk-breakdown{
  border:1px solid rgba(255,255,255,.10) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

/* 6) Make wk-breakdown rows easier to scan */
.drawer .wk-breakdown tbody tr td{
  border-bottom: 1px solid rgba(255,255,255,.06) !important;
}
.drawer .wk-breakdown tbody tr:nth-child(even) td{
  background: rgba(255,255,255,.015);
}
.drawer .wk-breakdown tbody tr:hover td{
  background: rgba(255,255,255,.045);
}

/* 7) “This Week / Season YTD” numbers pop a bit */
#standings td:nth-child(4), #standings td:nth-child(5){
  font-variant-numeric: tabular-nums;
  letter-spacing:.2px;
}

/* 8) Week chips: add depth + active glow */
.weekbox{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}
.weekbox.active{
  border-color: rgba(245,196,81,.45) !important;
  box-shadow:
    0 0 0 2px rgba(245,196,81,.18),
    0 10px 22px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.08);
}

/* 9) Make Earnings less “sterile”: centered + slightly tinted */
.drawer .wk-breakdown td:nth-child(3){
  color: rgba(203,213,225,.92);
}
.drawer .wk-breakdown td:nth-child(3):not(:empty){
  text-shadow: 0 0 10px rgba(34,211,238,.10);
}

/* 10) Chevron feels more interactive */
.chev{
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
}
.toggle:hover .chev{ opacity:1; }

/* 11) Schedule list: more card-like rows */
.sched-item{
  background: rgba(255,255,255,.01);
  border: 1px solid rgba(255,255,255,.05);
}
.sched-item:hover{
  border-color: rgba(255,255,255,.10);
}

/* 12) Optional: add a soft separator between main table and week bar */
.drawer-row{
  border-top: 1px solid rgba(255,255,255,.06);
}
/* =========================
   MOBILE: wk-breakdown = Players | Score | Earnings ONLY
   ========================= */
/* =========================
   MOBILE wk-breakdown: FULL-WIDTH 3-COLUMN UI
   Players | Score | Earnings
   ========================= */
@media (max-width:640px){

  /* 1) Hide rounds (4–7) */
  .drawer .wk-breakdown thead th:nth-child(n+4),
  .drawer .wk-breakdown tbody td:nth-child(n+4),
  .drawer .wk-breakdown tfoot td:nth-child(n+4){
    display:none !important;
  }

  /* 2) IMPORTANT: Neutralize colgroup so hidden cols don't reserve space */
  .drawer .wk-breakdown colgroup{ display:none !important; }

  /* 3) Table fills drawer and never leaves dead space */
  .drawer .wk-breakdown{
    width:100% !important;
    min-width:0 !important;
    table-layout:fixed !important;
  }

  /* 4) Clean, readable sizing */
  .drawer .wk-breakdown th,
  .drawer .wk-breakdown td{
    padding:10px 10px !important;
    font-size:14px !important;
  }

  /* 5) Column widths (sum to 100%) */
  .drawer .wk-breakdown th:nth-child(1),
  .drawer .wk-breakdown td:nth-child(1){
    width:56% !important;
    text-align:left !important;
    white-space:normal !important;     /* allow wrap */
    line-height:1.15;
  }

  .drawer .wk-breakdown th:nth-child(2),
  .drawer .wk-breakdown td:nth-child(2){
    width:18% !important;
    text-align:center !important;
    font-variant-numeric: tabular-nums;
  }

  .drawer .wk-breakdown th:nth-child(3),
  .drawer .wk-breakdown td:nth-child(3){
    width:26% !important;
    text-align:right !important;
    font-variant-numeric: tabular-nums;
  }

  /* 6) Make the header shorter and less cramped */
  .drawer .wk-breakdown thead th{
    font-size:11px !important;
    letter-spacing:.06em;
    padding-top:9px !important;
    padding-bottom:9px !important;
  }

  /* 7) Make the whole drawer feel like a mobile card */
  .drawer{
    padding:10px !important;
  }
  .drawer .wk-breakdown{
    border-radius:14px;
    overflow:hidden;
  }
}
@media (max-width:640px){
  .drawer .wk-breakdown thead th:first-child{
    max-width: 1px; /* forces ellipsis behavior */
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}
/* =========================
   MOBILE FIX: remove old header strip + clean team row + SCORE fits
   ========================= */
@media (max-width:640px){

  /* 1) KILL the old standings header strip (# / Roster / This Week / Season YTD) */
  #standings thead{ display:none !important; }

  /* 2) Team row (Lenny) — make it a clean grid, no awkward stacking */
  .card-head{
    display:grid !important;
    grid-template-columns: 28px 1fr auto !important; /* caret | name | stats */
    align-items:center !important;
    gap:10px !important;
    padding:12px 12px !important;
  }

  /* left caret area stays tight */
  .card-head .rank{ min-width:0 !important; }

  /* team name stronger */
  .card-head .team .name{
    font-size:16px !important;
    font-weight:800 !important;
    line-height:1.1 !important;
  }

  /* keep the little “9 Roster” pill inline and not stacked */
  .card-head .team{
    display:flex !important;
    flex-direction:column !important;
    gap:6px !important;
    min-width:0 !important;
  }

  /* the right-side totals: show as TWO small numbers, not stacked labels */
  .card-head .totals{
    display:flex !important;
    gap:14px !important;
    align-items:center !important;
    justify-content:flex-end !important;
    min-width:120px !important;
  }
  .card-head .pair .lbl{ display:none !important; } /* hides “YTD / This wk” labels */
  .card-head .pair .val{
    font-size:16px !important;
    font-weight:800 !important;
    font-variant-numeric: tabular-nums;
  }

  /* 3) wk-breakdown: ensure SCORE header is not truncated */
  .drawer .wk-breakdown thead th{
    overflow:visible !important;
    text-overflow:clip !important;
  }
  .drawer .wk-breakdown thead th:nth-child(2){
    width:72px !important;            /* enough to show SCORE */
    min-width:72px !important;
    letter-spacing:.04em !important;
  }

  /* Rebalance the 3 columns slightly so SCORE has room */
  .drawer .wk-breakdown th:nth-child(1),
  .drawer .wk-breakdown td:nth-child(1){ width:54% !important; }

  .drawer .wk-breakdown th:nth-child(2),
  .drawer .wk-breakdown td:nth-child(2){ width:20% !important; }

  .drawer .wk-breakdown th:nth-child(3),
  .drawer .wk-breakdown td:nth-child(3){ width:26% !important; }

  /* 4) Remove excess dead air between team row and week chips */
  .drawer-row{ padding-top:6px !important; }
}

@media (max-width:640px){
  .wk-breakdown-mobile col.col-total{ width:78px !important; } /* fits “Score” */
  .wk-breakdown-mobile col.col-earn { width:110px !important; }
  .wk-breakdown-mobile thead th:nth-child(2){ text-overflow:clip !important; }
}
/* =========================
   MOBILE: remove TOP standings header
   keep drawer header
   ========================= */
@media (max-width: 640px){

  /* Hide ALL table headers inside standings */
  #standings table thead{
    display: none !important;
  }

  /* Re-enable ONLY the drawer table header */
  #standings .wk-breakdown thead{
    display: table-header-group !important;
  }
}
/* =========================
   MOBILE (<=640): hide TOP standings header only
   keep drawer wk-breakdown header
   ========================= */
@media (max-width:640px){

  /* Top standings table header row (the one you circled) */
  body #standings > thead{
    display:none !important;
  }

  /* Keep the dropdown table header (Players | Score | Earnings) */
  body .drawer .wk-breakdown > thead{
    display: table-header-group !important;
  }
}
/* =========================
   MOBILE: remove "split" look by blending drawer into page
   (pull-tab overlap + sticky grab)
   ========================= */
/* =========================
   MOBILE: make main content fill screen (kills the giant dead gap)
   keeps tray as fixed pull-tab overlay
   ========================= */
@media (max-width:640px){

  /* Let the page have a real full-height column layout */
  #content{
    min-height: 100svh;
    display: flex;
    flex-direction: column;
  }

  /* Grid becomes the "fill remaining space" area */
  .grid{
    flex: 1;
    min-height: 0;                 /* important for overflow children */
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 12px 24px;
  }

  /* Make the standings card stretch to fill available space */
  .table-card{
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  /* The table area scrolls inside the card instead of leaving blank space */
  .table-wrap{
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Keep the bottom sheet overlay; don’t reserve huge space for it */
  .grid{
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
