:root {
  --bg:        #080d18;
  --surface:   #0f1628;
  --surface2:  #162040;
  --border:    #1e2d52;
  --accent:    #f5c842;
  --red:       #c8102e;
  --text:      #e8eaf0;
  --muted:     #6b7a9e;
  --green:     #4caf7d;
  --loss:      #e05c5c;
  --radius:    10px;
  --sidebar-w: 76px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: inherit; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 24px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
}
.sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.15);
  display: block;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 10px 6px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.15s, background 0.15s;
  border-left: 3px solid transparent;
  position: relative;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active {
  color: var(--accent);
  background: rgba(245,200,66,0.08);
  border-left-color: var(--accent);
}
.nav-icon { font-size: 1.3rem; line-height: 1; }

/* ── Page content ── */
.page-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}

/* ── Top bar ── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 1.2rem; font-weight: 700; }
.topbar-title span { color: var(--accent); }
.topbar-sub { font-size: 0.78rem; color: var(--muted); }
.search-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  margin-left: auto;
  transition: color 0.15s, background 0.15s;
}
.search-btn:hover { color: var(--text); background: var(--surface2); }

.badge {
  background: var(--accent);
  color: #000;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ── Global Search ── */
.gs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 24, 0.82);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 72px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.gs-hidden { display: none !important; }
.gs-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: min(580px, calc(100vw - 32px));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.gs-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.gs-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  min-width: 0;
}
.gs-input::placeholder { color: var(--muted); }
.gs-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.gs-close:hover { color: var(--text); background: var(--surface2); }
.gs-results { max-height: 400px; overflow-y: auto; }
.gs-group { padding: 6px 0; }
.gs-group + .gs-group { border-top: 1px solid var(--border); }
.gs-group-lbl {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 16px 4px;
}
.gs-result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  transition: background 0.1s;
}
.gs-result:hover { background: var(--surface2); }
.gs-result-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gs-sub { font-size: 0.75rem; color: var(--muted); }
.gs-icon { width: 28px; text-align: center; flex-shrink: 0; font-size: 1rem; }
.gs-empty { padding: 24px 16px; color: var(--muted); font-size: 0.9rem; text-align: center; }

main { max-width: 1100px; margin: 0 auto; padding: 32px 28px; }

section { display: none; }
section.active { display: block; }

h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Championship cards ── */
.champ-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.champ-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.champ-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--red));
}
.champ-year {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.champ-winner { font-size: 1.05rem; font-weight: 700; margin-bottom: 2px; display: flex; align-items: flex-start; gap: 12px; }
.patch-icon { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.champ-mgr    { font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; }
.champ-record { font-size: 0.82rem; color: var(--accent); font-weight: 600; }
.champ-divider { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.runner-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.runner-name  { font-size: 0.9rem; color: var(--text); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:hover { background: var(--surface); }
tbody td { padding: 11px 14px; }

.trophy { color: var(--accent); }
.rank-1 { color: var(--accent); font-weight: 700; }
.rank-2 { color: #bbb; }
.pos-num { display: inline-block; width: 22px; text-align: center; font-weight: 600; font-size: 0.85rem; }

/* ── Season selector ── */
.season-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.season-bar label { color: var(--muted); font-size: 0.85rem; }

/* ── Season Banner ──────────────────────────────────────────────────────────── */
.season-banner {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0d1117 0%, #161b22 35%, #1a2744 65%, #0d1117 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.season-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
  transform: scale(1.4);
  transform-origin: center 65%;
  z-index: 0;
}
@media (max-width: 480px) {
  .season-banner {
    height: 200px;
  }
}
.season-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1;
}
.season-banner-year {
  display: none;
  font-size: 5rem;
  font-weight: 800;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.06em;
  user-select: none;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}

/* ── AI Season Blurb ─────────────────────────────────────────────────────────── */
.season-blurb {
  margin-bottom: 20px;
  min-height: 20px;
}
.blurb-placeholder {
  color: var(--muted);
  font-size: 0.88rem;
}
.blurb-loading {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}
.blurb-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}
select:focus { outline: none; border-color: var(--accent); }

.win  { color: var(--green); font-weight: 600; }
.loss { color: var(--loss); }

/* ── Buttons ── */
.btn-primary {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }

/* ── Head-to-Head selector ── */
.h2h-vs-lbl { color: var(--muted); font-size: 0.85rem; }
.h2h-same-warn {
  display: none;
  color: var(--red);
  font-size: 0.82rem;
  margin: -14px 0 16px;
}
.h2h-same-warn.visible { display: block; }

/* ── H2H Rivalry Card ── */
.rivalry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.rivalry-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.rivalry-lead-text {
  font-size: 1.1rem;
  font-weight: 800;
}
.rivalry-games-badge {
  font-size: 0.74rem;
  color: var(--muted);
  background: var(--surface2);
  padding: 3px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}
.rivalry-stats {
  display: flex;
}
.rivalry-stat {
  flex: 1;
  padding: 14px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.rivalry-stat:last-child { border-right: none; }
.rivalry-stat-lbl {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 5px;
}
.rivalry-stat-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
}
.rivalry-stat-val.slim {
  font-size: 0.82rem;
}
.rivalry-stat-sub {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 3px;
}

/* ── Head-to-Head ── */
.h2h-banner {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.h2h-side { flex: 1; padding: 24px 28px; text-align: center; }
.h2h-side.h2h-winner { background: rgba(245,200,66,0.07); }
.h2h-name  { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.h2h-wins  { font-size: 2.8rem; font-weight: 800; color: var(--accent); line-height: 1; }
.h2h-avg   { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.h2h-vs    { padding: 0 20px; text-align: center; color: var(--muted); font-size: 0.85rem; }
.h2h-total { font-size: 0.75rem; margin-top: 4px; }
.h2h-seasons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.season-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: var(--muted);
}
.season-pill strong { color: var(--text); }

/* ── Trade cards ── */
.trade-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.trade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.trade-date  { font-size: 0.82rem; color: var(--muted); }
.trade-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--red); }
.trade-body  { display: flex; align-items: flex-start; }
.trade-side  { flex: 1; padding: 16px 20px; }
.trade-arrow { padding: 16px 0; color: var(--muted); font-size: 1.4rem; align-self: center; }
.trade-team  { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.trade-mgr   { font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.trade-record { font-size: 0.78rem; color: var(--accent); margin-bottom: 10px; }
.trade-players-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.trade-player { font-size: 0.88rem; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.pos-tag {
  background: var(--border);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* ── Trade Grade ─────────────────────────────────────────────────────────────── */
.tg-section {
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.015);
}
.tg-pending, .tg-warn {
  padding: 10px 20px;
}
.tg-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.tg-note {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.68rem;
}
.tg-state {
  font-size: 0.82rem;
  color: var(--muted);
}
.tg-verdict {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.tg-winner { color: #FFD700; }
.tg-close  { color: var(--muted); font-style: italic; }
.tg-scores {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}
.tg-side {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
}
.tg-side-won {
  border-color: rgba(255, 215, 0, 0.45);
  background: rgba(255, 215, 0, 0.05);
}
.tg-mgr { color: var(--text); }
.tg-side-won .tg-mgr { color: #FFD700; font-weight: 700; }
.tg-pts { font-weight: 700; font-variant-numeric: tabular-nums; }
.tg-side-won .tg-pts { color: #FFD700; }
.tg-margin {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.tg-quip {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--muted);
  border-left: 2px solid var(--border);
  padding-left: 10px;
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Chat ── */
.chat-wrap {
  display: flex;
  flex-direction: column;
  height: 620px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg { display: flex; }
.chat-msg.user      { justify-content: flex-end; }
.chat-msg.assistant { justify-content: flex-start; }
.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
}
.chat-msg.user .chat-bubble {
  background: var(--accent);
  color: #000;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant .chat-bubble {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-msg.oracle .chat-bubble {
  border-left: 2px solid var(--accent);
  max-width: 85%;
}
.chat-msg.oracle .chat-bubble p { margin-bottom: 12px; line-height: 1.65; }
.chat-msg.oracle .chat-bubble p:last-child { margin-bottom: 0; }
.oracle-thinking-label { opacity: 0.6; font-size: 0.85em; }
/* Typing indicator — 3 pulsing dots */
.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}
.typing-dots span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: tdot 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes tdot {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40%            { opacity: 1;    transform: scale(1.1);  }
}

/* Skeleton shimmer */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.skel {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
}
.skel-text  { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skel-title { height: 18px; margin-bottom: 12px; border-radius: 4px; }
.skel-avatar { border-radius: 50% !important; }
.skel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skel-row { display: flex; align-items: center; gap: 10px; }

/* Table skeleton rows */
.skel-td { padding: 10px 12px; }
.skel-td div { height: 13px; border-radius: 4px; }

/* Prompt chips — hidden on desktop, shown on mobile */
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 4px;
  flex-shrink: 0;
}
.chat-chips.chips-used { display: none !important; }
.chat-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.chat-chip:hover { color: var(--accent); border-color: var(--accent); }

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.chat-input {
  flex: 1;
  min-width: 0;
  width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 16px;
  height: 48px;
}
.chat-input:focus { outline: none; border-color: var(--accent); }
#chat-send { flex-shrink: 0; white-space: nowrap; }

/* ── What If ── */
.whatif-wrap {
  max-width: 780px;
  margin: 0 auto;
}
.whatif-hero {
  text-align: center;
  margin-bottom: 36px;
}
.whatif-hero h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.whatif-hero p {
  color: var(--muted);
  font-size: 0.95rem;
}
.whatif-input-wrap {
  position: relative;
  margin-bottom: 20px;
}
.whatif-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 18px 130px 18px 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
  line-height: 1.5;
  min-height: 64px;
}
.whatif-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,200,66,0.12);
}
.whatif-submit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  color: #000;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.whatif-submit:hover { opacity: 0.85; }
.whatif-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.whatif-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  justify-content: center;
}
.whatif-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  text-align: left;
}
.whatif-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(245,200,66,0.06);
}

.whatif-result {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.whatif-result.visible { display: block; }
.whatif-result-header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(245,200,66,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.whatif-question-display {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  flex: 1;
}
.whatif-share {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.whatif-share:hover { color: var(--accent); border-color: var(--accent); }
.whatif-result-body {
  padding: 28px 28px 32px;
  font-size: 0.97rem;
  line-height: 1.85;
  color: var(--text);
}
.whatif-result-body p { margin-bottom: 16px; }
.whatif-result-body p:last-child { margin-bottom: 0; }
.whatif-highlight { color: var(--accent); font-weight: 700; }
.whatif-thinking {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ── Draft ── */
.draft-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.draft-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.draft-tab:hover { color: var(--text); }
.draft-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.draft-panel { display: none; }
.draft-panel.active { display: block; }

#draft-grid-wrap { position: relative; }
.draft-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.draft-grid {
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 800px;
  width: 100%;
}
table.draft-grid thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 10;
  padding: 9px 10px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}
.draft-round-th {
  width: 36px;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.draft-col-th {
  color: var(--text);
  font-weight: 700;
  font-size: 0.8rem;
  min-width: 100px;
}
.draft-round-num {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  background: var(--bg);
  position: sticky;
  left: 0;
  z-index: 5;
  white-space: nowrap;
  padding: 7px 10px;
  border-right: 1px solid var(--border);
}
.draft-cell {
  padding: 7px 9px;
  text-align: center;
  border: 1px solid rgba(30, 45, 82, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  font-size: 0.78rem;
  color: var(--text);
  transition: background 0.1s, color 0.1s;
}
.draft-cell:hover {
  background: var(--surface2);
  color: var(--accent);
  cursor: default;
}
.dc-meta {
  display: block;
  font-size: 0.6rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 1px;
  letter-spacing: 0.02em;
}
.draft-r1 {
  color: var(--accent);
  font-weight: 700;
  background: rgba(245, 200, 66, 0.07);
}
.draft-r1:hover { background: rgba(245, 200, 66, 0.14); }

/* Keeper cells in draft board */
.dk-keeper {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.06);
}
.dk-keeper:hover { background: rgba(255, 215, 0, 0.12); }
.dc-crown {
  display: inline-block;
  font-size: 0.7em;
  margin-right: 2px;
  vertical-align: middle;
  line-height: 1;
}

/* ── Keeper legend bar ───────────────────────────────────────────────────────── */
.keeper-legend {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.keeper-info-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.keeper-info-btn:hover { color: var(--accent); border-color: var(--accent); }
.keeper-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  min-width: 260px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.kt-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #FFD700;
  margin-bottom: 8px;
}
.kt-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.7;
}

/* ── Keeper rows in Team View ────────────────────────────────────────────────── */
.tv-pick-keeper {
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.04);
}
.tv-round-keeper { color: #FFD700; }
.tv-crown { font-size: 0.85em; margin-right: 4px; }
.tv-keeper-detail {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 3px;
}

/* ── Keeper rows in Explorer ─────────────────────────────────────────────────── */
.exp-row-keeper td:nth-child(2) { color: #FFD700; }
.exp-keeper-crown {
  font-size: 0.85em;
  margin-right: 3px;
  cursor: help;
}
.exp-keeper-detail {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
  margin-top: 2px;
}

/* Active keepers-only filter button */
.explorer-preset-active {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.6);
  color: #FFD700;
}

/* Team View */
.tv-header { margin-bottom: 20px; }
.tv-team-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.tv-meta { font-size: 0.85rem; color: var(--muted); }
.tv-picks { display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.tv-player-wrap { flex: 1; min-width: 0; }
.tv-pick-meta { font-size: 0.74rem; color: var(--muted); margin-top: 1px; }
.tv-pick {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background 0.1s;
}
.tv-pick:hover { background: var(--surface2); }
.tv-pick-nums { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; }
.tv-round {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tv-overall { font-size: 0.9rem; font-weight: 800; color: var(--accent); }
.tv-player { font-size: 0.95rem; font-weight: 600; }

/* All-Time Stats */
.alltime-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.alltime-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

/* ── Most Drafted tab ── */
.md-header {
  display: grid;
  grid-template-columns: 36px 1fr 120px 52px;
  align-items: center;
  gap: 0 8px;
  padding: 6px 14px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.md-list { }
.md-row {
  display: grid;
  grid-template-columns: 36px 1fr 120px 52px;
  align-items: center;
  gap: 0 8px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.1s;
}
.md-row:hover { background: var(--surface); }
.md-rank {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.md-rank-top { color: var(--accent); }
.md-player { font-size: 0.92rem; font-weight: 600; }
.md-bar-wrap {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}
.md-bar {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  opacity: 0.7;
}
.md-times { font-size: 0.85rem; font-weight: 700; color: var(--accent); text-align: right; }

/* ── My Guys tab ── */
.myguys-intro {
  padding: 14px 2px 4px;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 600px;
}
/* ── Season Recap inline ─────────────────────────────────────────────────── */
.sr-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.sr-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
}
.sr-hls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.sr-hl {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  flex: 1;
  min-width: 160px;
}
.sr-hl-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.sr-hl-val {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.sr-hl-sub {
  font-size: 0.8rem;
  color: var(--muted);
}
.sr-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.sr-col-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.sr-bracket {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sr-bracket-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.sr-matchup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
}
.sr-team {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 0.88rem;
}
.sr-team:not(:last-child) { border-bottom: 1px solid var(--border); }
.sr-winner { font-weight: 700; }
.sr-loser  { color: var(--muted); }
.sr-score {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sr-loser .sr-score { font-weight: 400; }

/* Championship round — gold label */
.sr-champ-label {
  color: #FFD700;
}
/* Championship matchup card — gold border, slightly larger */
.sr-champ-matchup {
  border-color: rgba(255, 215, 0, 0.45);
  font-size: 0.92rem;
}
/* Winner row inside the championship card */
.sr-champ-winner {
  color: #FFD700;
}
.sr-champ-winner .sr-score {
  color: #FFD700;
}
/* Championship quip below the card */
.sr-champ-quip {
  padding: 7px 12px 2px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
  min-height: 16px;
}

@media (max-width: 640px) {
  .sr-hls { flex-direction: column; }
  .sr-cols { grid-template-columns: 1fr; }
}

/* ── By Team: mobile collapsible cards ─────────────────────────────────────── */
.tvc-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.tvc-header {
  width: 100%;
  background: var(--surface);
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  min-height: 44px;
}
.tvc-info { flex: 1; min-width: 0; }
.tvc-name { font-weight: 700; font-size: 0.95rem; }
.tvc-meta { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvc-chevron {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.18s;
  flex-shrink: 0;
}
.tvc-header[aria-expanded="true"] .tvc-chevron { transform: rotate(90deg); }
.tvc-body { padding: 8px 10px 10px; background: var(--bg); }
.tvc-body .tv-picks { max-width: 100%; }

/* ── My Guys ───────────────────────────────────────────────────────────────── */
.myguys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 16px 0 32px;
}
.myguys-card {
  background: #111827;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
}
.myguys-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.myguys-card-header:hover { background: rgba(255,255,255,0.03); }
/* Override headshotHTML border to gold */
.myguys-card-header span > img,
.myguys-card-header span > div {
  border-color: rgba(245,200,66,0.55) !important;
  object-position: center top !important;
}
.myguys-card-title { flex: 1; min-width: 0; }
.myguys-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.myguys-subtitle {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.myguys-arrow {
  font-size: 1.1rem;
  color: var(--muted);
  flex-shrink: 0;
}
.myguys-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 16px;
}

/* Position table */
.pos-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 12px;
  padding: 10px 12px 8px;
}
.pos-col {
  padding: 0 8px;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.pos-col:nth-child(even) { border-right: none; }
.pos-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.pos-wr  { background: rgba(74,154,245,0.18); color: #7ab8f5; }
.pos-rb  { background: rgba(76,175,125,0.18); color: #7dc9a4; }
.pos-qb  { background: rgba(200,16,46,0.2);   color: #e8637a; }
.pos-te  { background: rgba(232,131,74,0.18); color: #f0a070; }
.pos-k   { background: rgba(107,122,158,0.2); color: #9baabf; }
.pos-def { background: rgba(156,86,194,0.18); color: #c08ae0; }
.pos-entry {
  padding: 3px 2px 5px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pos-entry:last-child { border-bottom: none; }
.pos-entry.pos-top {
  border-left: 2px solid rgba(245,200,66,0.7);
  padding-left: 4px;
  background: rgba(245,200,66,0.04);
  border-radius: 0 3px 3px 0;
}
.pos-pname {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  line-height: 1.3;
}
.pos-pstat {
  font-size: 0.65rem;
  color: var(--muted);
  display: block;
  line-height: 1.2;
}
.pos-pstat strong {
  color: var(--accent);
  font-weight: 700;
}
.myguys-showall {
  display: block;
  width: calc(100% - 32px);
  margin: 4px 16px 12px;
  padding: 7px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.12s, color 0.12s;
}
.myguys-showall:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Draft Explorer tab ── */
.explorer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--border);
  align-items: flex-end;
}
.explorer-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
}
.explorer-field label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.exp-season-group { margin-top: 8px; }
.exp-season-hdr {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0 6px;
  border-top: 1px solid var(--border);
}
.exp-season-hdr:first-child { border-top: none; }
.exp-season-yr { font-size: 0.95rem; font-weight: 700; color: var(--accent); }
.exp-season-ct { font-size: 0.75rem; color: var(--muted); }
.explorer-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  width: 180px;
}
.explorer-input:focus { border-color: var(--accent); }
.explorer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 16px;
  flex-wrap: wrap;
}
.explorer-preset {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.explorer-preset:hover { border-color: var(--accent); color: var(--accent); }
.explorer-reset {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 6px 8px;
  margin-left: 4px;
}
.explorer-reset:hover { color: var(--text); }
.explorer-hint {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 32px 0;
  text-align: center;
}
.explorer-meta {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 10px 0 8px;
}
.explorer-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.explorer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.explorer-table th {
  text-align: left;
  padding: 7px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.explorer-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}
.explorer-table tr:hover td { background: var(--surface); }
.explorer-skel { padding: 16px 0; }

/* ── Loading ── */
.loading { color: var(--muted); padding: 40px 0; text-align: center; font-size: 0.95rem; }

/* ── Mobile card components (hidden on desktop) ── */
.mob-cards { display: none; flex-direction: column; gap: 8px; }
.desktop-only { display: block; }

/* Leaderboard cards */
.mc {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
}
.mc-rank { font-size: 1.1rem; font-weight: 800; min-width: 22px; text-align: center; color: var(--muted); }
.mc-avatar { flex-shrink: 0; }
.mc-info { flex: 1; min-width: 0; }
.mc-name { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-meta { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.mc-pts { font-size: 0.78rem; color: var(--muted); margin-top: 1px; }
.mc-champ { font-size: 0.82rem; color: var(--accent); font-weight: 700; }
.mc-spark-inline { display: none; flex-shrink: 0; align-self: center; }
.mc-expand-details { display: flex; gap: 24px; padding: 10px 2px 2px; }
.mc-detail { text-align: center; }
.mc-detail-lbl { display: block; font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.mc-detail-val { font-size: 0.92rem; font-weight: 700; }

/* H2H matchup cards */
.mm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 15px;
}
.mm-meta { font-size: 0.75rem; color: var(--muted); margin-bottom: 8px; }
.mm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.mm-row:last-child { border-bottom: none; }
.mm-row.mm-w { color: var(--accent); font-weight: 700; }
.mm-team { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.mm-score { font-weight: 700; font-size: 1rem; flex-shrink: 0; }


/* ── Manager Profile Panel ── */
.mgr-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
}
.mgr-backdrop.open { display: block; }

.mgr-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 460px;
  max-width: 100vw;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mgr-panel.open { transform: translateX(0); }

.mgr-panel-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.mgr-panel-hdr-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.mgr-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
  line-height: 1;
  transition: color 0.15s;
}
.mgr-close:hover { color: var(--text); }

.mgr-panel-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Panel sections */
.mp-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 20px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mp-hero-avatar { flex-shrink: 0; }
.mp-hero-avatar span > img,
.mp-hero-avatar span > div {
  border-color: rgba(245,200,66,0.5) !important;
  object-position: center top !important;
}
.mp-hero-info { flex: 1; min-width: 0; }
.mp-name { font-size: 1.3rem; font-weight: 800; line-height: 1.15; margin-bottom: 5px; }
.mp-record { font-size: 0.85rem; color: var(--muted); margin-bottom: 2px; }
.mp-pts { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.mp-titles { font-size: 0.85rem; color: var(--accent); font-weight: 600; margin-bottom: 3px; line-height: 1.4; }
.mp-champ-team { font-weight: 400; opacity: 0.8; }
.mp-runner-line { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

.mp-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.mp-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* Season extremes */
.mp-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mp-highlight {
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.mp-hl-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 5px; }
.mp-hl-year { font-size: 1.5rem; font-weight: 800; line-height: 1; margin-bottom: 2px; }
.mp-best .mp-hl-year { color: var(--green); }
.mp-worst .mp-hl-year { color: var(--loss); }
.mp-hl-pts { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.mp-hl-detail { font-size: 0.75rem; color: var(--muted); margin-bottom: 2px; }
.mp-hl-team { font-size: 0.7rem; color: var(--muted); opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Season history table */
.mp-section-table { padding-bottom: 0; }
.mp-season-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -24px; }
.mp-season-table {
  width: 100%;
  min-width: 340px;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.mp-season-table thead th {
  padding: 6px 10px 6px 0;
  text-align: left;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.mp-season-table thead th:first-child { padding-left: 24px; }
.mp-season-table thead th:last-child  { padding-right: 24px; text-align: center; }
.mp-season-table tbody tr {
  border-bottom: 1px solid rgba(30,45,82,0.5);
  transition: background 0.1s;
}
.mp-season-table tbody tr:hover { background: var(--surface); }
.mp-season-table tbody tr:last-child { border-bottom: none; }
.mp-season-table td {
  padding: 7px 10px 7px 0;
  vertical-align: middle;
}
.mp-season-table td:first-child { padding-left: 24px; }
.mp-season-table td:last-child  { padding-right: 24px; text-align: center; }
.mp-st-yr   { color: var(--muted); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.mp-st-team { max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.mp-st-rec  { white-space: nowrap; font-weight: 600; }
.mp-st-pf   { white-space: nowrap; color: var(--muted); }
.mp-st-ppg  { color: var(--muted); white-space: nowrap; }
.mp-st-fin  { text-align: center; white-space: nowrap; }
.mp-st-finish { color: var(--muted); font-size: 0.75rem; }
.mp-st-champ { background: rgba(245,200,66,0.05); }
.mp-st-champ .mp-st-team { color: var(--accent); font-weight: 600; }
.mp-st-runner { background: rgba(255,255,255,0.02); }

/* PPG chart */
.mp-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 90px;
}
.mp-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
}
.mp-chart-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  opacity: 0.8;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.mp-chart-col:hover .mp-chart-bar { opacity: 1; }
.mp-chart-yr {
  font-size: 0.5rem;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

/* Team names */
.mp-teams { display: flex; flex-direction: column; gap: 0; }
.mp-team-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.87rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(30, 45, 82, 0.5);
}
.mp-team-row:last-child { border-bottom: none; }
.mp-team-year { color: var(--muted); font-size: 0.78rem; min-width: 36px; font-weight: 600; flex-shrink: 0; }
.mp-team-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-team-record { font-size: 0.78rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

/* H2H bar list */
.mp-h2h-list { display: flex; flex-direction: column; gap: 9px; }
.mp-h2h-row { display: flex; align-items: center; gap: 10px; }
.mp-h2h-name { width: 54px; font-size: 0.82rem; flex-shrink: 0; }
.mp-h2h-bar-wrap {
  flex: 1;
  height: 7px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}
.mp-h2h-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.mp-h2h-rec { font-size: 0.8rem; min-width: 34px; text-align: right; flex-shrink: 0; }

/* ── Sparkline column ── */
.spark-col { padding: 6px 10px; vertical-align: middle; }

/* ── Mobile leaderboard card expand — hidden on desktop ── */
.mc-expand-arrow { display: none; }
.mc-spark-expand { display: none; }
.mc-spark-chart {
  padding: 0 4px 8px;
}
.mc-spark-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 4px;
}
.mc-spark-range {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 4px;
}
.mc-profile-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

/* ── Draft Efficiency section ── */
.eff-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.eff-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.eff-table { width: 100%; }
.eff-highlight td { background: rgba(245,200,66,0.06); }

.grade-badge {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.82rem;
}
.grade-a { background: rgba(80,200,100,0.18); color: #50c864; }
.grade-b { background: rgba(245,200,66,0.18); color: var(--accent); }
.grade-c { background: rgba(160,160,160,0.15); color: var(--muted); }
.grade-d { background: rgba(200,16,46,0.15); color: var(--loss); }

/* ── Season Recap Panel ── */
.recap-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 202;
}
.recap-backdrop.open { display: block; }

.recap-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 560px;
  max-width: 100vw;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 203;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.recap-panel.open { transform: translateX(0); }

.recap-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  height: 50px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.recap-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 8px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.15s;
}
.recap-back:hover { color: var(--text); }
.recap-title {
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
  text-align: center;
}
.recap-nav {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.recap-nav-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.recap-nav-btn:hover { background: var(--border); }
.recap-nav-btn:disabled { opacity: 0.35; cursor: default; }

.recap-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.recap-section {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.recap-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* Standings table */
.recap-standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.recap-standings-table th {
  text-align: left;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  padding: 4px 8px 8px;
  border-bottom: 1px solid var(--border);
}
.recap-standings-table td {
  padding: 8px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.recap-standings-table tr.win td { color: var(--accent); }

/* Playoff bracket */
.recap-round-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 14px 0 8px;
}
.recap-round-label:first-child { margin-top: 0; }

.recap-matchup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.recap-mm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
}
.recap-mm-row + .recap-mm-row {
  border-top: 1px solid var(--border);
}
.recap-mm-row span { flex: 1; font-size: 0.88rem; }
.mm-score {
  font-weight: 700;
  font-size: 0.9rem !important;
  text-align: right;
  flex: unset !important;
}
.mm-winner .mm-score { color: var(--accent); }
.mm-loser { opacity: 0.5; }

/* Highlights */
.recap-highlights {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.recap-hl {
  flex: 1;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.recap-hl-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}
.recap-hl-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Weekly leaders */
.recap-week-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.recap-week-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.recap-week-num {
  color: var(--muted);
  font-size: 0.72rem;
  min-width: 36px;
}
.recap-week-mgr { flex: 1; }
.recap-week-score { font-weight: 700; color: var(--accent); }

/* Trades */
.recap-trades {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.recap-trade {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.recap-trade-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  min-width: 0;
}
.recap-trade-side > span { font-weight: 600; }
.recap-trade-gives {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.recap-trade-arrow {
  font-size: 1.3rem;
  color: var(--muted);
  padding-top: 2px;
  flex-shrink: 0;
}

/* ── Lookback tab ── */
.lb-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 2px 4px;
  flex-wrap: wrap;
}
.lb-bar label { font-size: 0.8rem; color: var(--muted); }
.lb-bar select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.lb-alltime-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  margin-left: 4px;
}
.lb-alltime-lbl input { accent-color: var(--accent); cursor: pointer; }

.lb-pills {
  display: flex;
  gap: 8px;
  padding: 10px 0 16px;
  flex-wrap: wrap;
}
.lb-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.lb-pill:hover { border-color: var(--accent); color: var(--text); }
.lb-pill.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }

.lb-section { display: none; }
.lb-section.active { display: block; }

.lb-intro {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.lb-empty {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 24px 0;
  text-align: center;
}

/* Breakout cards */
.lb-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding-bottom: 32px;
}
.lb-breakout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lb-bo-rank {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 2px;
}
.lb-bo-player {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.lb-bo-meta { font-size: 0.8rem; }
.lb-bo-mgr { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

.lb-pos-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid;
  vertical-align: middle;
}

.lb-green { color: var(--green); }
.lb-red   { color: var(--loss); }
.lb-muted { color: var(--muted); }

/* Reaches & Steals */
.lb-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-bottom: 24px;
}
.lb-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.lb-col-hdr {
  padding: 12px 16px 8px;
  font-size: 0.9rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.lb-steal-hdr { color: var(--green); }
.lb-reach-hdr { color: var(--loss); }
.lb-col-sub {
  padding: 6px 16px 10px;
  font-size: 0.75rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }
.lb-row-info { flex: 1; min-width: 0; }
.lb-row-player { font-size: 0.88rem; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.lb-row-meta { font-size: 0.75rem; color: var(--muted); margin-top: 1px; }
.lb-row-pts { font-size: 0.9rem; font-weight: 700; flex-shrink: 0; }
.lb-empty-col { padding: 14px 16px; font-size: 0.82rem; color: var(--muted); }

/* All-time leaderboards */
.lb-leaderboards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
  padding-bottom: 32px;
}
.lb-leaderboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.lb-lb-title {
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.lb-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.lb-lb-row:last-child { border-bottom: none; }
.lb-lb-rank { color: var(--muted); min-width: 16px; }
.lb-lb-name { flex: 1; color: var(--text); }
.lb-lb-count { font-weight: 700; color: var(--accent); }

/* Draft Grades */
.lb-grades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  padding-bottom: 32px;
}
.lb-grade-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.lb-grade-letter {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}
.lb-grade-mgr {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.lb-grade-detail {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── Mobile ── */
@media (max-width: 640px) {
  :root { --sidebar-w: 0px; }

  body { flex-direction: column; overflow-x: hidden; }

  /* Bottom tab bar */
  .sidebar {
    width: 100%;
    height: calc(54px + env(safe-area-inset-bottom));
    flex-direction: row;
    position: fixed;
    top: auto; bottom: 0; left: 0; right: 0;
    border-right: none;
    border-top: 1px solid var(--border);
    padding: 0 0 env(safe-area-inset-bottom);
    justify-content: space-around;
  }
  .sidebar-logo { display: none; }
  .sidebar-nav { flex-direction: row; width: 100%; gap: 0; align-items: center; justify-content: space-around; padding: 8px 0; }
  .nav-icon img { width: 1.25rem !important; height: 1.25rem !important; object-fit: contain; }
  .nav-item {
    padding: 5px 1px;
    border-left: none;
    border-top: 2px solid transparent;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    font-size: 0.5rem;
    letter-spacing: 0.01em;
    overflow: hidden;
  }
  .nav-item span:not(.nav-icon) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    display: block;
  }
  .nav-item.active { border-left-color: transparent; border-top-color: var(--accent); }
  .nav-icon { font-size: 1.25rem; }

  .page-content { margin-left: 0; margin-bottom: calc(54px + env(safe-area-inset-bottom)); }

  /* Topbar */
  .topbar { padding: 11px 14px; }
  .topbar-title { font-size: 1rem; }
  .topbar-sub { display: none; }
  .badge { display: none; }
  .gs-overlay { padding-top: 0; align-items: flex-start; }
  .gs-modal { width: 100%; border-radius: 0 0 14px 14px; border-top: none; border-left: none; border-right: none; }

  main { padding: 16px 12px; }

  h2 { font-size: 0.85rem; margin-bottom: 14px; }

  /* Leaderboard: show cards, hide table */
  .desktop-only { display: none; }
  .mob-cards { display: flex; }

  /* Standings: hide low-priority columns */
  #standings thead th:nth-child(6),
  #standings thead th:nth-child(8),
  #standings tbody td:nth-child(6),
  #standings tbody td:nth-child(8) { display: none; }

  /* Championships */
  .champ-grid { grid-template-columns: 1fr; gap: 10px; }
  .champ-card { padding: 14px 15px; }

  /* H2H selector: stack vertically */
  .h2h-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .h2h-bar label { font-size: 0.8rem; margin-bottom: 0; }
  .h2h-bar select { width: 100%; }
  .h2h-vs-lbl { text-align: center; font-weight: 700; padding: 2px 0; }
  .rivalry-stats { flex-direction: column; }
  .rivalry-stat { border-right: none; border-bottom: 1px solid var(--border); text-align: left; padding: 11px 16px; display: flex; align-items: center; gap: 12px; }
  .rivalry-stat:last-child { border-bottom: none; }
  .rivalry-stat-lbl { margin-bottom: 0; min-width: 90px; flex-shrink: 0; }
  .rivalry-stat-val { font-size: 0.95rem; }
  .rivalry-stat-sub { margin-top: 0; margin-left: 4px; }

  /* H2H banner */
  .h2h-banner { flex-direction: column; }
  .h2h-side { padding: 14px 16px; width: 100%; }
  .h2h-vs { padding: 8px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); width: 100%; }
  .h2h-wins { font-size: 2.2rem; }

  /* Season pills: 44px min touch target */
  .season-pill {
    font-size: 0.78rem;
    padding: 10px 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Leaderboard: hide table spark col; show inline sparkline + expand arrow on mobile cards */
  .spark-col { display: none; }
  .mc { flex-wrap: wrap; }
  .mc-spark-inline { display: block; }
  .mc-expand-arrow {
    display: block;
    font-size: 1.1rem;
    color: var(--muted);
    transition: transform 0.2s ease;
    padding: 0 4px;
    flex-shrink: 0;
    align-self: center;
  }
  .mc-spark-expand { width: 100%; }

  /* Trades — stack season + manager dropdowns vertically */
  .trades-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .trades-bar select { width: 100%; }
  .trade-body { flex-direction: column; }
  .trade-arrow { display: none; }
  .trade-side { padding: 12px 14px; }

  /* Chat: fixed full-height layout so input is always pinned */
  #chat.active {
    position: fixed;
    top: 46px;
    left: 0; right: 0;
    bottom: calc(54px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    padding: 0;
    z-index: 40;
  }
  .chat-heading { display: none; }
  .chat-wrap {
    flex: 1;
    height: auto;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }
  .chat-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chat-chips::-webkit-scrollbar { display: none; }
  .chat-bubble { max-width: 88%; font-size: 0.88rem; }
  .chat-messages { padding: 14px; }
  .chat-input-row { padding: 10px 12px; }

  /* What If */
  .whatif-input { padding: 14px; }
  .whatif-submit { position: static; transform: none; width: 100%; margin-top: 10px; padding: 12px; }
  .whatif-input-wrap { display: flex; flex-direction: column; }
  .whatif-suggestions { gap: 6px; }
  .whatif-chip { font-size: 0.78rem; padding: 6px 12px; }
  .whatif-result-body { padding: 18px 14px; }
  .whatif-hero h2 { font-size: 1.3rem; }

  /* Draft tabs: scrollable so labels never clip */
  .draft-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .draft-tabs::-webkit-scrollbar { display: none; }
  .draft-tab { padding: 0 14px; font-size: 0.82rem; flex-shrink: 0; min-height: 44px; }

  /* Hide the team dropdown on mobile — card view replaces it */
  .tv-team-sel { display: none; }
  .myguys-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Draft Board: horizontal scroll table with sticky RD column */
  .draft-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.draft-grid { font-size: 0.68rem; min-width: 500px; }
  .draft-col-th { min-width: 68px; font-size: 0.7rem; padding: 7px 6px; }
  .draft-round-th { width: 28px; position: sticky; left: 0; z-index: 15; background: var(--surface); }
  .draft-round-num { padding: 6px 8px; font-size: 0.66rem; }
  .draft-cell { padding: 5px 5px; max-width: 80px; font-size: 0.68rem; }

  /* Right-edge gradient scroll hint */
  #draft-grid-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 36px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    z-index: 6;
  }

  /* Team View: tighter but legible */
  .tv-picks { max-width: 100%; }
  .tv-pick { padding: 9px 13px; gap: 12px; }
  .tv-pick-nums { min-width: 44px; }
  .tv-round { font-size: 0.62rem; }
  .tv-overall { font-size: 0.85rem; }
  .tv-player { font-size: 0.9rem; }

  /* All-Time Stats: single column */
  .alltime-grid { grid-template-columns: 1fr; gap: 24px; }
  table.draft-grid { min-width: unset; }

  /* Lookback */
  .lb-2col { grid-template-columns: 1fr; gap: 12px; }
  .lb-leaderboards { grid-template-columns: 1fr; gap: 12px; }
  .lb-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .lb-grades-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

  /* Global table tweaks for tables that stay as tables */
  tbody td { padding: 8px 10px; font-size: 0.82rem; }
  thead th { padding: 7px 10px; font-size: 0.68rem; }

  /* Manager panel: full screen on mobile */
  .mgr-panel { width: 100%; border-left: none; }
  .mp-hero { padding: 16px; gap: 12px; }
  .mp-name { font-size: 1.1rem; }
  .mp-season-scroll { margin: 0 -16px; }
  .mp-season-table thead th:first-child,
  .mp-season-table td:first-child { padding-left: 16px; }
  .mp-season-table thead th:last-child,
  .mp-season-table td:last-child  { padding-right: 16px; }
  .mp-section { padding: 16px; }

  /* Recap panel: full screen on mobile */
  .recap-panel { width: 100%; border-left: none; border-radius: 0; }
  .recap-hdr { padding: 0 12px; }
  .recap-title { font-size: 1rem; }
  .recap-nav-btn { font-size: 0.8rem; padding: 5px 10px; }
  .recap-section { padding: 16px; }
  .recap-standings-table td, .recap-standings-table th { padding: 7px 8px; font-size: 0.78rem; }
  .recap-hl-body { gap: 10px; }
  .recap-highlights { flex-direction: column; gap: 10px; }
  .recap-hl { min-width: unset; }
}
