/* ============================================
   BR FANTASY DASHBOARD - CLEANED & ORGANIZED CSS
   ============================================
   Duplicate selectors merged: 36
   Duplicate properties removed: 122
   Auto-cleaned: 2026-03-25
   ============================================ */

/* ============================================
   ANIMATIONS & KEYFRAMES
   ============================================ */
@keyframes spin {
  0% {
    transform: rotate(0deg);
    border-top-color: #3498db;
    border-right-color: transparent;
  }
  50% {
    transform: rotate(180deg);
    border-top-color: #3498db;
    border-right-color: transparent;
  }
  100% {
    transform: rotate(360deg);
    border-top-color: #3498db;
    border-right-color: transparent;
  }
}

@keyframes firePulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(249,115,22,.45), 0 0 24px rgba(251,146,60,.25), inset 0 0 12px rgba(251,146,60,.4);
  }
  50% {
    box-shadow: 0 0 16px rgba(249,115,22,.6), 0 0 32px rgba(251,146,60,.35), inset 0 0 14px rgba(251,146,60,.5);
  }
}

@keyframes icePulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(56,189,248,.35), 0 0 24px rgba(147,197,253,.2), inset 0 0 12px rgba(147,197,253,.3);
  }
  50% {
    box-shadow: 0 0 18px rgba(56,189,248,.5), 0 0 36px rgba(147,197,253,.35), inset 0 0 14px rgba(147,197,253,.4);
  }
}

@keyframes tick-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes matchups-spin {
  to { transform: rotate(360deg); }
}

@keyframes refresh-spin {
  from { transform: rotate(90deg); }
  to { transform: rotate(450deg); }
}

@keyframes liveBlink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* ============================================
   ROOT VARIABLES & THEME
   ============================================ */
:root {
  --page-scale: 1;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --card: #ffffff;
  --card-soft: #f8fafc;
  --row: #f8fafc;
  --text: #122d4b;
  --text-muted: #6b7280;
  --text-subtle: #94a3b8;
  --border: #dbe2ea;
  --grid: #e5e7eb;
  --accent: #122d4b;
  --accent-color: #122d4b;
  --accent-soft: #e9eef5;
  --accent-soft-2: #eef4fb;
  --accent-strong: #0f2747;
  --spinner: #38bdf8;
  --win: #16a34a;
  --loss: #ef4444;
  --warning: #f59e0b;
  --info: #38bdf8;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
  --max-content: 1400px;
  --weakest: #fef2f2;
  --strongest: #ecfdf3;
}

:root[data-theme="dark"] {
  --bg: #020617;
  --bg-alt: #020617;
  --card: #0f172a;
  --card-soft: #111827;
  --row: #0b1220;
  --text: #e5e7eb;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;
  --border: #1f2937;
  --grid: #1f2937;
  --accent: #38bdf8;
  --accent-color: #38bdf8;
  --accent-soft: #162032;
  --accent-soft-2: #152235;
  --accent-strong: #0b1220;
  --win: #4ade80;
  --loss: #f87171;
  --weakest: #703a3a;
  --strongest: #2d4a39;
}

/* ============================================
   RESET & BASE
   ============================================ */
#app-scale {
  width: 100%;
  max-width: 100%;
  flex: 1 0 auto;
  min-height: 0;
  transform: none;
  transform-origin: initial;
}

#page-root {
  flex: 1 0 auto;
  min-height: 0;
}

#page-root, .page-shell {
  min-width: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.os-sidebar-shell > * {
  width: 100%;
  opacity: 0.96;
}

.page-shell {
  width: 100%;
}

a {
  color: inherit;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: var(--bg-alt);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html {
  scroll-behavior: auto;
  overflow-y: scroll;
  overflow-x: hidden;
}

html, body {
  height: 100%;
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 1180px) {
  html, body {
    scroll-padding-top: 0;
    scroll-margin-top: 0;
  }

  * {
    scroll-margin-top: 0 !important;
    scroll-padding-top: 0 !important;
  }
}

img {
  max-width: 100%;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.card h2 {
  font-size: 18px;
}

.card h3 {
  font-size: 16px;
}

.home-card .hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
}

.inj-row .muted {
  color: var(--text-subtle);
  font-size: 12px;
}

.meta, .muted, .hint {
  color: var(--text-muted);
}

.meta-badge {
  background: #1f2937;
}

.meta-badge, .age-badge {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  margin-left: 6px;
}

.mini-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.mu-head .muted {
  color: var(--text-subtle);
  font-size: 12px;
}

.p .meta {
  color: var(--text-muted);
  font-size: 12px;
}

.player-row .meta {
  font-size: 12px;
  color: var(--text-muted);
}

.tx .meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 8px;
}

h1 {
  text-align: center;
  font-size: 40px;
  font-weight: 900;
  margin: 20px 0 30px;
  letter-spacing: -0.5px;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--accent);
  line-height: 1.2;
}

h1::after {
  content: "";
  display: block;
  width: 300px;
  max-width: 100%;
  height: 4px;
  background: var(--spinner);
  border-radius: 999px;
  margin: 10px auto 0;
}

ul {
  padding-inline-start: 20px;
}

/* ============================================
   LAYOUT & GRID
   ============================================ */
.central {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

.grid > .central {
  grid-column: 1 / -1;
}

.left-col, .right-col, .standings-col, .col-left, .col-right {
  min-width: 0;
}

.m-score, .m-vs-col, .m-margin {
  font-size: 12px;
}

.m-team-col {
  display: flex;
  flex-direction: column;
}

.m-vs-col {
  text-align: center;
  color: var(--text-subtle);
}

.os-layout {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: stretch;
  overflow-x: hidden;
}

.os-left-col, .os-main-col, .os-right-col {
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.os-col-fill {
  flex-grow: 1;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.os-right-col > .os-sidebar-shell {
  margin-bottom: 18px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.os-sidebar-shell > .card {
  flex-grow: 1;
  margin-bottom: 0;
}

.otc-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 360px !important;
  gap: 18px;
  align-items: start;
  width: 100%;
}

.overview-layout {
  display: flex;
  gap: 16px;
  margin: 10px;
  align-items: stretch;
}

.overview-main {
  flex: 1 1 auto;
  min-width: 0;
}

.overview-main.overview-main-two-col {
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr);
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

.page-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.power-two-col {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.recap-grid, .sidebar {
  display: grid;
  gap: 12px;
  align-content: start;
}

.sidebar-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-items: stretch;
}

.streak-cold .chip-streak {
  background: linear-gradient(180deg, #f0f9ff, #e0f2fe);
  border: 1px solid #38bdf8;
  color: #2563eb;
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.4),
    0 0 24px rgba(147, 197, 253, 0.25),
    inset 0 0 12px rgba(147, 197, 253, 0.35);
  animation: icePulse 3s ease-in-out infinite;
}

.team-col {
  background: rgba(18, 45, 75, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  color: var(--accent);
}

.team-col header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.nav-pill.active {
  background: var(--accent);
  color: #ffffff;
}

.nav-pill.logout-pill {
  background: #dc2626;
  color: #ffffff !important;
}

.nav-pill.logout-pill:hover {
  background: #b91c1c;
}

.nav-pill:hover {
  transform: translateY(-1px);
}

/* ---- Players nav dropdown ---- */
.nav-pill-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.nav-pill-dropdown-wrapper .nav-pill {
  cursor: pointer;
  border: none;
  gap: 4px;
  user-select: none;
}

.nav-pill-chevron {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.15s ease;
  display: inline-block;
}

.nav-pill-dropdown-wrapper.open .nav-pill-chevron {
  transform: rotate(180deg);
}

.nav-pill-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 160px;
  z-index: 9999;
  overflow: hidden;
  display: none;
}

.nav-pill-dropdown-wrapper.open .nav-pill-dropdown-menu {
  display: block;
}

/* Show dropdown on hover (desktop only) */
@media (min-width: 769px) {
  .nav-pill-dropdown-wrapper:hover .nav-pill-dropdown-menu {
    display: block;
  }
  .nav-pill-dropdown-wrapper:hover .nav-pill-chevron {
    transform: rotate(180deg);
  }
}

.nav-pill-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s ease;
  white-space: nowrap;
}

.nav-pill-dropdown-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-pill-dropdown-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-pill-dropdown-item.disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.nav-pro-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  vertical-align: middle;
  line-height: 14px;
}

.nav-pill-dropdown-item + .nav-pill-dropdown-item {
  border-top: 1px solid var(--border);
}

/* Mobile: dropdown appears inline in expanded menu */
@media (max-width: 768px) {
  .nav-pill-dropdown-wrapper {
    width: 100%;
    flex-direction: column;
  }

  .nav-pill-dropdown-wrapper .nav-pill {
    width: 100%;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    justify-content: center;
  }

  .nav-pill-dropdown-menu {
    position: static;
    transform: none;
    left: auto;
    top: auto;
    box-shadow: none;
    border-radius: 8px;
    margin-top: 4px;
    border: 1px solid var(--border);
  }

  .nav-pill-dropdown-wrapper.open .nav-pill-dropdown-menu {
    display: block;
  }
}


/* When #weeklyLeftTabs is moved into the sidebar, prevent overflow */
@media (max-width: 1180px) {
  .week-side-panels #weeklyLeftTabs,
  .page-sidebar-body #weeklyLeftTabs {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .week-side-panels #weeklyLeftTabs .tab-bar,
  .page-sidebar-body #weeklyLeftTabs .tab-bar {
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    gap: 2px;
  }
  .week-side-panels #weeklyLeftTabs .tab-btn,
  .page-sidebar-body #weeklyLeftTabs .tab-btn {
    padding: 6px 10px;
    font-size: 12px;
    flex: 1 1 0;
    text-align: center;
  }
  .week-side-panels .week-main-panels,
  .week-side-panels .week-main-panel,
  .page-sidebar-body .week-main-panels,
  .page-sidebar-body .week-main-panel {
    max-width: 100%;
    overflow-x: hidden;
  }
}


.refresh-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: var(--card) !important;
  color: var(--accent) !important;
  font-size: 20px !important;
  transform: rotate(90deg);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   CHANGELOG BELL
   ============================================ */

.changelog-bell-wrapper {
  position: relative;
  display: inline-flex;
}

.changelog-bell-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: var(--card) !important;
  color: var(--accent) !important;
  font-size: 18px !important;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.changelog-bell-btn:hover {
  background: var(--accent-soft) !important;
  border-color: var(--accent) !important;
}

.changelog-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #E24B4A;
  border: 1.5px solid var(--card);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.changelog-dot-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Notification dot for gear button (mirrors changelog-dot style) */
.nav-notif-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #E24B4A;
  border: 1.5px solid var(--card);
  pointer-events: none;
}

/* Notification dot for settings menu items */
.settings-notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E24B4A;
  border: 1px solid var(--card-bg);
  pointer-events: none;
}

/* Dark mode toggle */
#darkModeToggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: var(--card) !important;
  color: var(--accent) !important;
  font-size: 18px !important;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  padding: 0;
}

#darkModeToggle:hover {
  background: var(--accent-soft) !important;
  border-color: var(--accent) !important;
  transform: scale(1.05);
}

.theme-icon {
  display: inline-block;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.changelog-dropdown {
  position: absolute;
  top: calc(0% + 8px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  z-index: 200;
  display: none;
  max-height: 415px;
  overflow-y: auto;
}

.changelog-dropdown-header {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 0.5px solid var(--border);
  background: var(--bg-alt);
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.changelog-dropdown-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.changelog-dropdown-close:hover { color: var(--text); }

.changelog-entry {
  padding: 12px 14px;
  border-bottom: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.changelog-entry:hover {
  background: var(--bg-alt);
}

.changelog-entry:last-child {
  border-bottom: none;
}

/* Breakout Candidates Page */
.breakout-filter-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

@media (max-width: 768px) {
  .breakout-filter-btn {
    padding: 10px 16px;
    flex: 1;
    min-width: 60px;
    text-align: center;
  }
}

/* Settings Gear Dropdown */
.settings-gear-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Keep changelog bell hidden but functional */
.changelog-bell-wrapper {
  position: fixed !important;
  top: 60px;
  right: 20px;
  visibility: hidden;
  pointer-events: none;
  z-index: 1000;
}

/* But make the dropdown and notification dot visible when shown */
.changelog-bell-wrapper .changelog-dropdown,
.changelog-bell-wrapper .changelog-dot {
  visibility: visible;
  pointer-events: all;
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  z-index: 200;
  display: none;
  overflow: visible; /* allow the CSD league-switcher list to escape the panel */
}

.settings-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 0.5px solid var(--border);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  border-radius: 0px;
}

.settings-menu-item:first-child { border-radius: 10px 10px 0 0; }
.settings-menu-item:last-child  { border-bottom: none; border-radius: 0 0 10px 10px; }

.settings-menu-item:hover {
  background: var(--bg-alt);
}

.settings-menu-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 20px;
  display: inline-flex;
  justify-content: center;
}

/* Make PNG icons match theme colors */
img[src*="gear.png"],
img[src*="moon.png"],
img[src*="refresh.png"],
img[src*="bell.png"],
img[src*="logout.png"],
img[src*="sun-solid.png"],
img[src*="magnifying-glass-solid.png"],
img[src*="bars-solid.png"],
img[src*="xmark-solid.png"] {
  filter: brightness(0) saturate(100%) invert(15%) sepia(45%) saturate(625%) hue-rotate(200deg) brightness(95%) contrast(90%) !important;
}

/* Star icon always gold (premium indicator) */
img[src*="star-solid.png"] {
  filter: brightness(0) saturate(100%) invert(72%) sepia(95%) saturate(600%) hue-rotate(5deg) brightness(105%) contrast(95%) !important;
}

/* Dark mode icon colors */
html[data-theme="dark"] img[src*="gear.png"],
html[data-theme="dark"] img[src*="moon.png"],
html[data-theme="dark"] img[src*="refresh.png"],
html[data-theme="dark"] img[src*="bell.png"],
html[data-theme="dark"] img[src*="logout.png"],
html[data-theme="dark"] img[src*="sun-solid.png"],
html[data-theme="dark"] img[src*="magnifying-glass-solid.png"],
html[data-theme="dark"] img[src*="bars-solid.png"],
html[data-theme="dark"] img[src*="xmark-solid.png"] {
  filter: brightness(0) saturate(100%) invert(82%) sepia(23%) saturate(1585%) hue-rotate(178deg) brightness(103%) contrast(88%) !important;
}

.settings-menu-label {
  flex: 1;
}

.settings-menu-logout {
  color: #dc2626;
}

.settings-menu-logout:hover {
  background: rgba(220, 38, 38, 0.05);
}

.settings-dropdown .league-switcher-wrapper {
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border);
  display: block;
  position: relative;
  z-index: 201;
}

/* Constrain the CSD list to the panel width so it doesn't overflow horizontally */
.settings-dropdown .csd-list {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.settings-dropdown .csd-list .csd-option {
  white-space: normal;
  word-break: break-word;
}

.settings-dropdown .league-switcher {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.settings-menu-item.refresh-spinner .settings-menu-icon {
  animation: spin 1s linear infinite;
}

.breakout-filter-btn:hover {
  background: var(--bg-alt);
  border-color: var(--accent);
}

.breakout-filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.breakout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.breakout-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.breakout-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.breakout-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.breakout-player-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.breakout-player-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.breakout-score-badge {
  background: #10b981;
  color: white;
  font-size: 18px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  min-width: 50px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.breakout-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bo-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.bo-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.bo-page-btn:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.bo-page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.bo-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.bo-page-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.breakout-context {
  font-size: 14px;
  color: var(--text);
  font-style: italic;
  padding: 8px 12px;
  background: var(--bg-alt);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.breakout-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.breakout-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.breakout-departed {
  font-size: 13px;
  color: var(--text);
}

.breakout-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.breakout-stat {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
}

.breakout-youth-bonus {
  font-size: 13px;
  color: #f59e0b;
  padding: 8px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 6px;
  text-align: center;
}

:root[data-theme="dark"] .breakout-youth-bonus {
  background: rgba(245, 158, 11, 0.15);
}

@media (max-width: 768px) {
  .breakout-grid {
    grid-template-columns: 1fr;
  }
}

.changelog-entry-top {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}

.changelog-entry-top::after {
  content: "→";
  color: var(--text-muted);
  font-size: 14px;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
}

.changelog-entry:hover .changelog-entry-top::after {
  opacity: 1;
  transform: translateX(0);
}

.changelog-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.changelog-tag-feature {
  background: rgba(16,185,129,.12);
  color: #10b981;
}

.changelog-tag-fix {
  background: #fef3c7;
  color: #b45309;
}

.changelog-tag-new {
  background: rgba(59,130,246,.12);
  color: #3b82f6;
}

.changelog-entry-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  font-weight: 500;
}

.changelog-entry-date {
  font-size: 11px;
  color: var(--text-muted);
}

.site-logo {
  width: 225px;
  height: auto;
}

[data-theme="dark"] .site-logo {
  content: url('/static/Website_Logo_dark.png');
}

.top-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-left .site-logo {
  width: 180px;
  height: auto;
}

.nav-left > a {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  line-height: 0;
}

.nav-left > a:hover {
  opacity: 0.85;
}

.nav-center {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-hamburger {
  display: none !important;
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex !important;
  }
}

.nav-pills-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-end;
}

.nav-pills-bottom {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-utility-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.utility-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 18px;
}

.utility-icon-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: scale(1.05);
}

/* ── Nav player search ─────────────────────────────────────────────────── */
.nav-search-wrapper {
  position: relative;
  z-index: 200;
}

.nav-search-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  overflow: hidden;
  cursor: pointer;
  transition: width 0.22s ease, border-radius 0.22s ease, padding 0.22s ease,
              background 0.18s, border-color 0.18s, box-shadow 0.18s, gap 0.22s,
              transform 0.2s ease, justify-content 0s;
}

.nav-search-inner:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: scale(1.05);
}

.nav-search-wrapper:focus-within .nav-search-inner {
  width: 240px;
  height: auto;
  border-radius: 20px;
  padding: 5px 10px;
  gap: 6px;
  justify-content: flex-start;
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  cursor: default;
  transform: none;
}

.nav-search-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
}

.nav-search-wrapper:focus-within .nav-search-icon {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  flex-shrink: 0;
}

.nav-search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  width: 0;
  min-width: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.nav-search-wrapper:focus-within .nav-search-input {
  width: 100%;
  opacity: 1;
  pointer-events: auto;
}

.nav-search-input::placeholder {
  color: var(--text-muted);
}

.nav-search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  display: none;
  flex-shrink: 0;
}

.nav-search-clear:hover { color: var(--text); }

.nav-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  overflow: hidden;
  display: none;
  max-height: 400px;
  overflow-y: auto;
}

.nav-search-dropdown.open { display: block; }

.nav-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--grid);
}

.nav-search-result:last-child { border-bottom: none; }

.nav-search-result:hover,
.nav-search-result.focused {
  background: var(--accent-soft);
}

.nav-search-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--grid);
}

.nav-search-info {
  flex: 1;
  min-width: 0;
}

.nav-search-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-search-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.nav-search-pos {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.nav-search-pos-qb  { background: #3b82f6; color: #fff; }
.nav-search-pos-rb  { background: #22c55e; color: #fff; }
.nav-search-pos-wr  { background: #f59e0b; color: #fff; }
.nav-search-pos-te  { background: #8b5cf6; color: #fff; }
.nav-search-pos-k   { background: #c92c68; color: #fff; }
.nav-search-pos-def { background: #475569; color: #fff; }

.nav-search-empty {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 768px) {
  .nav-search-wrapper:focus-within .nav-search-inner {
    width: 200px;
  }
  .nav-search-dropdown {
    width: 280px;
    right: -10px;
  }
  .nav-search-icon {
    width: 16px;
    height: 16px;
  }
  .nav-search-inner {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .nav-search-wrapper:focus-within .nav-search-inner {
    width: 170px;
  }
  .nav-search-dropdown {
    width: 260px;
    right: -20px;
  }
}

.logout-btn {
  padding: 8px 16px;
  background: #dc2626;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.logout-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.league-switcher-wrapper {
  position: relative;
}

.league-switcher {
  padding: 6px 32px 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.league-switcher:hover {
  border-color: var(--accent);
}

.league-switcher:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Header structure for mobile */
.nav-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.nav-header-main .site-logo {
  width: 180px;
  height: auto;
}

.nav-header-main > a {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  line-height: 0;
}

.nav-header-main > a:hover {
  opacity: 0.85;
}

.nav-header-main .nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.nav-header-secondary {
  display: flex;
  align-items: center;
  width: 100%;
}

.league-switcher {
  display: flex;
  align-items: center;
  flex: 1;
}

.league-switcher-dropdown {
  padding: 6px 12px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: var(--card);
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-switcher-dropdown:hover {
  border-color: #a8b3c1;
}

.league-switcher-dropdown:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.nav-links-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */
.activity-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.activity-card h2 {
  margin: 0 0 10px;
}

.activity-list .pill, .card.activity-card .activity-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-soft);
  color: var(--text-muted);
}

.award-card {
  padding: 12px;
}

.award-card h3 {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 16px;
}

.card {
  padding: 12px;
  margin-bottom: 12px;
  width: 100%;
}

.card .card-tabs {
  display: flex;
  flex-direction: column;
}

.card .tab-btn {
  position: relative;
  border: none;
  background: transparent;
  color: var(--accent);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  margin: 0;
}

.card .tab-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.card .tab-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

.card .tab-panel {
  display: none;
}

.card .tab-panel.active {
  display: block;
}

.card .tab-panels {
  margin-top: 4px;
  width: 100%;
}

.card .tab-strip {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 4px 4px 8px;
  margin-bottom: 12px;
}

.card, .side-card, .award-card, .trade-calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-footer {
  display: flex;
  justify-content: center;
}

.card-header {
  padding-right: inherit;
}

.card-header, .card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  flex-wrap: wrap;
}

.card.activity-card .scroll-box {
  flex: 1;
  min-height: 600px;
  -webkit-overflow-scrolling: touch;
}

.card.central, .card.power, .trends-card {
  overflow: hidden;
}

.card.mini-card {
  border-radius: var(--radius-lg);
  padding: 12px 14px 10px;
  box-shadow: var(--shadow-sm);
}

.card.small {
  padding: 12px;
}

.card.stats {
  grid-column: 1 / 1;
}

.card.teams-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 320px;
  width: 320px !important;
  max-height: 800px;
  min-height: 400px;
  max-height: 1225px;
}

.gm-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(18,45,75,.04), rgba(255,255,255,1));
  margin-bottom: 16px;
}

.gm-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.gm-card, .fo-brief-card, .ai-trade-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(18,45,75,.04), rgba(255,255,255,1));
}

.main-two-col, .graphs-page, .standings-main.two-col-standings, .activity-page .activity-main, .card.recap-equal {
  grid-template-columns: 1fr 1fr;
}

.main-two-col, .graphs-page, .standings-main.two-col-standings, .power-two-col, .overview-main.overview-main-two-col, .sidebar-grid, .card.recap-equal, .activity-page .activity-main {
  display: grid;
  gap: 16px;
  align-items: flex-start;
}

.overview-layout, .overview-main, .overview-sidebar, .overview-sidebar-left, .card, .matchup-carousel, .m-carousel, .tab-panels, .tab-panel {
  min-width: 0;
}

.trends-card {
  padding: 18px;
}

.trends-card-header h2 {
  margin: 0 0 4px;
}

[data-page="graphs"], [data-page="graphs"] .page-main, [data-page="graphs"] .page-layout, [data-page="graphs"] .card, [data-page="graphs"] .plotly-graph-div, [data-page="graphs"] .js-plotly-plot {
  zoom: 1 !important;
  transform: none !important;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */
.dropdown {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  display: none;
  z-index: 100;
}

.dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--grid);
}

.dropdown-item:hover {
  background: var(--bg-alt);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.home-card input[type="text"], .home-card input[type="number"] , .home-card input[type="email"], .home-card select {
  width: 100%;
}

.otc-setup-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.platform-btn {
  flex: 1;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(180deg, rgba(22,22,22,1), rgba(12,12,12,1));
  border: 1px solid rgba(255,255,255,0.06);
  color: #a7b0bd;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow:
    0 10px 18px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}

.platform-btn img {
  width: auto;
  opacity: 0.95;
  filter: none;
}

.platform-btn.espn img {
  height: 115px;
  margin-right: 2px;
}

.platform-btn.sleeper img {
  height: 139px;
}

.platform-btn:active {
  transform: translateY(0) scale(0.99);
}

.platform-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(28,28,28,1), rgba(14,14,14,1));
}

.platform-toggle {
  display: flex;
  gap: 14px;
  margin: 6px 0 18px;
}

.platform-toggle input:checked + .platform-btn {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(30,41,59,1), rgba(15,23,42,1));
  border-color: rgba(77, 163, 255, 0.85);
  box-shadow:
    0 0 0 2px rgba(77, 163, 255, 0.35),
    0 14px 26px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.platform-toggle input[type="radio"] {
  display: none;
}

.search {
  width: 100px;
}

.search, select, input[type="text"], input[type="number"], input[type="email"] {
  padding: 8px 10px;
  border: 1px solid var(--grid);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.search-input {
  width: 100%;
  border-radius: 15px;
  padding: 7px 12px 7px 16px;
  font-size: 16px;
  background: var(--card-soft);
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-wrapper.dropdown-open .dropdown {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.search-wrapper.dropdown-open .search-input {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.search:focus, select:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus {
  border-color: #8eb2e3;
  box-shadow: 0 0 0 4px rgba(56, 132, 255, 0.1);
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0 16px;
}

label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--text-muted);
}

/* ============================================
   BUTTONS & ACTIONS
   ============================================ */
.badge, .chip, .trade-player-chip, .pill-toggle, .manager-pill, .link-pill {
  border-radius: 999px;
}

.otc-btn {
  border-radius: 10px;
  border: none;
  background: #38bdf8;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.otc-btn:active {
  transform: translateY(1px);
}

.otc-btn:hover {
  background: #0ea5e9;
}

.chip button {
  margin-left: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 13px;
  color: #9ca3af;
}

.chip button, .chip-remove {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}

.chip button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
}

.otc-btn-disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  position: relative;
}

.otc-btn-disabled:hover {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  transform: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.pill-toggle {
  border: 1px solid var(--border);
  padding: 5px 10px;
  font-size: 13px;
  background: var(--bg-alt);
  color: var(--accent);
  cursor: pointer;
}

.pill-toggle.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

button {
  border-radius: 10px;
  border: none;
  background: #38bdf8;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  margin-top: 4px;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

button:active {
  transform: translateY(1px);
}
/*
button:hover {
  background: #0ea5e9;
} */

/* ============================================
   TABLES & ROSTERS
   ============================================ */
.history-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.history-table tbody td {
  padding: 11px 12px;
  font-size: 0.94rem;
  color: var(--text);
  border-bottom: 1px solid #edf2f7;
  background: var(--card);
}

.history-table tbody tr.is-top-seed td {
  background: #f5f9ff;
  font-weight: 700;
}

.history-table tbody tr:hover td {
  background: #f8fbff;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-table td.rank-cell {
  width: 52px;
  font-weight: 800;
  color: var(--text);
}

.history-table td.record-cell, .history-table td.num-cell {
  white-space: nowrap;
}

.history-table th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #6b7280);
}

.history-table th, .history-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.history-table thead th {
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7b8798;
  text-align: left;
  padding: 10px 12px 12px;
  border-bottom: 1px solid #e8eef6;
  background: transparent;
}

.history-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 0;
  padding-bottom: 0;
}

.team-value-chart {
  width: 100%;
  margin-bottom: 12px;
}

.team-chart-skeleton {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  background: linear-gradient(90deg,
    var(--bg-alt, #1e293b) 25%,
    var(--border, #334155) 50%,
    var(--bg-alt, #1e293b) 75%);
  background-size: 200% 100%;
  animation: chartShimmer 1.4s ease-in-out infinite;
}

@keyframes chartShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.pos-strength-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pos-strength-table th, .pos-strength-table td {
  padding: 5px;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.standings-table td {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  padding: 8px 6px;
  border-top: 1px solid var(--grid);
}

.standings-table td.team {
  text-align: left;
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 38%;
}

.standings-table td.team img {
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  vertical-align: middle;
  margin-right: 6px;
}

.standings-table th {
  text-align: center;
  padding: 8px 6px;
  color: var(--accent);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card);
}

.standings-table tr {
  min-height: 46px;
}

@media (max-width: 640px) {
  .standings-table {
    font-size: 12px;
  }
  .standings-table td,
  .standings-table th {
    padding: 6px 4px;
  }
  .standings-table tr {
    height: auto;
  }
  .standings-table td.team {
    width: 45%;
  }
  /* Hide SOS columns on main standings */
  .standings-table[data-page="standings"] th:nth-child(n+7),
  .standings-table[data-page="standings"] td:nth-child(n+7) {
    display: none;
  }
  /* Hide Best/Worst Week on detailed stats */
  #stats.standings-table th:nth-child(n+7),
  #stats.standings-table td:nth-child(n+7) {
    display: none;
  }
  /* Playoff odds: hide Proj W-L on mobile */
  .po-proj { display: none; }
  .po-odds { min-width: 90px; }
  .po-team { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Playoff odds table: horizontal scroll on mobile */
  .po-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .po-table { min-width: 420px; }
}

@media (max-width: 480px) {
  .standings-table {
    font-size: 11px;
  }
  .standings-table td.team {
    width: 50%;
  }
  /* Also hide PA on main standings */
  .standings-table[data-page="standings"] th:nth-child(5),
  .standings-table[data-page="standings"] td:nth-child(5) {
    display: none;
  }
  /* Hide Players (col 4) on dynasty table - too many columns at this width */
  .standings-table.dynasty-table th:nth-child(4),
  .standings-table.dynasty-table td:nth-child(4) {
    display: none;
  }
  /* Hide Draft Capital on value rankings dynasty table */
  .standings-table.dynasty-table th:nth-child(5),
  .standings-table.dynasty-table td:nth-child(5) {
    display: none;
  }
}

/* Value Rankings strip: stack button above table on mobile so table gets full card width */
@media (max-width: 640px) {
  .dynasty-value-strip {
    flex-direction: column;
    gap: 0;
  }
  .dynasty-value-strip .tab-btn {
    align-self: flex-start;
    margin-bottom: 4px;
  }
  .dynasty-value-strip .tab-panels {
    width: 100%;
    margin-top: 0;
  }
  /* Hide Players col on the full-width dynasty table too */
  .standings-table.dynasty-table th:nth-child(4),
  .standings-table.dynasty-table td:nth-child(4) {
    display: none;
  }
}

.table-stats {
  min-height: 695px;
}

.table-wrap {
  border: 1px solid var(--grid);
  border-radius: 12px;
  overflow: auto;
}

.table-wrap, .standings-wrap, .rank-grid, .trade-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--grid);
  text-align: center;
}

tbody tr:nth-child(even) {
  background: var(--row);
}

thead th {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
  font-weight: 700;
  text-align: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--grid);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

/* ============================================
   PLAYER CARDS & STATS
   ============================================ */
.all-players-list {
  margin-top: 6px;
  max-height: 600px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 14px;
}

.all-players-meta {
  grid-column: 1 / 2;
  opacity: 0.75;
}

.all-players-name {
  font-weight: 600;
}

.all-players-row {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 0.1rem;
  font-size: 16px;
}

.all-players-value {
  font-weight: 700;
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--row);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--text);
}

.player-row .pname {
  font-weight: 600;
  color: var(--text);
}

.player-row.empty {
  color: var(--text-subtle);
}

/* ============================================
   TRADE CALCULATOR
   ============================================ */
.bar-a {
  background: #ef4444;
}

.bar-b {
  background: #22c55e;
}

.bar-fair {
  background: #475569;
}

.bar-segment {
  height: 100%;
}

.chip {
  background: var(--row);
  border: 1px solid var(--grid);
  padding: 2px 6px;
  color: var(--text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

.chip-value {
  font-weight: 700;
  opacity: 0.9;
}

.chip.diff-neg {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.chip.diff-pos {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.chips {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}


.otc-add-pick-btn {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #3b82f6;
  cursor: pointer;
  transition: all 0.2s ease;
}

.otc-add-pick-btn, .otc-clear-btn {
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.otc-add-pick-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
}

.otc-clear-btn {
  background: #1e3a5f;
  color: #e8f0fe;
  border: 1px solid #2d5494;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.otc-clear-btn:hover:not(:disabled) {
  background: #264a7a;
  border-color: #3b6cb7;
}
.otc-clear-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #374151;
  border-color: #4b5563;
}

.otc-share-btn {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.otc-share-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.otc-share-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.otc-share-btn-success {
  background: rgba(34, 197, 94, 0.1) !important;
  border-color: #16a34a !important;
  color: #16a34a !important;
}

.otc-summary-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.otc-summary-team-select {
  display: flex;
  align-items: center;
}

.otc-summary-team-select .otc-team-select-dropdown {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--row);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
}

.otc-summary-team-select .otc-team-select-dropdown:focus {
  outline: none;
  border-color: var(--accent);
}

.otc-summary-team-select.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
  20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.otc-ai-badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.otc-ai-card {
  padding: 16px;
}

.otc-ai-empty-sub {
  color: var(--muted);
  line-height: 1.5;
}

.otc-ai-empty-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.otc-ai-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.otc-ai-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.otc-ai-team-select {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 200px;
}

.otc-ai-title {
  margin: 0;
}

.otc-balance-bar {
  position: relative;
  height: 22px;
  border-radius: 999px;
  background: var(--row);
  overflow: hidden;
  border: 1px solid var(--border);
}

.otc-balance-fair {
  left: 50%;
  transform: translateX(-50%);
  /* Default; JS sets the exact width from fair_threshold on each eval.
     The band is a pure visual marker - the label lives below the bar so it
     never clips when the fair range is narrow on big trades. */
  width: 7%;
  min-width: 6px;
  background: rgba(14, 40, 71, 0.92);
}

.otc-balance-fair-label {
  color: #16365d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.otc-balance-labels {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #8591a3;
  font-weight: 700;
}

.otc-balance-left {
  left: 0;
  background: linear-gradient(90deg, #6cb7ff 0%, #2d8cff 100%);
}

.otc-balance-left, .otc-balance-right, .otc-balance-fair {
  position: absolute;
  top: 0;
  bottom: 0;
}

.otc-balance-right {
  right: 0;
  background: linear-gradient(90deg, #16365d 0%, #244f82 100%);
}

.otc-balance-wrap {
  margin-top: 6px;
}

.otc-builder-grid {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.otc-builder-grid, .otc-summary-stats {
  display: grid;
  gap: 12px;
}

.otc-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--row);
  max-width: 100%;
}

.otc-chip-meta {
  color: #72829b;
  font-size: 14px;
  white-space: nowrap;
}

.otc-chip-name {
  font-weight: 700;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otc-chip-remove {
  border: 0;
  background: transparent;
  color: #8b95a7;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.otc-chip-value {
  font-weight: 700;
  color: var(--text);
}

.otc-chip-value-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.otc-chip-delta {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}

.otc-chip-delta-positive {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.otc-chip-delta-negative {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.player-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.player-badge-rookie {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.player-badge-breakout {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.player-badge-elite {
  background: rgba(234, 179, 8, 0.15);
  color: #b45309;
}

.player-badge-prospect {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.otc-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  transition: background 140ms ease;
}

.otc-dropdown-item + .otc-dropdown-item {
  margin-top: 4px;
}

.otc-dropdown-item:hover {
  background: var(--bg-alt);
}

.otc-dropdown-item[data-position="PICK"] {
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
  border-left: 3px solid #4a90e2;
}

.otc-dropdown-item[data-position="PICK"]:hover {
  background: linear-gradient(135deg, #e8f0ff 0%, #d4e4ff 100%);
}

.otc-dropdown-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.otc-dropdown-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otc-dropdown-rank-inline {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: #5b6b81;
  background: #e9eef5;
  border-radius: 999px;
  padding: 2px 7px;
  line-height: 1.4;
}

.otc-dropdown-sub {
  margin-top: 3px;
  font-size: 11px;
  color: #738198;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otc-dropdown-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.otc-dropdown-value {
  flex-shrink: 0;
  min-width: 48px;
  text-align: right;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.otc-filter-chip {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--row);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.otc-filter-chip.is-active {
  background: #16365d;
  color: #ffffff;
  border-color: #16365d;
}

.otc-day-filter {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.otc-day-filter:hover {
  background: var(--bg-alt);
  border-color: var(--accent);
}

.otc-day-filter.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.otc-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.otc-help-copy {
  color: var(--muted);
  line-height: 1.45;
}

.otc-help-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.otc-help-list {
  display: grid;
  gap: 10px;
}

.otc-help-step {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
}

.otc-insight-banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.otc-insight-banner, .otc-ai-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--row);
}

.otc-insight-banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.otc-insight-banner-sub {
  color: var(--muted);
  font-size: 0.95rem;
}

.otc-insight-banner-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.otc-lower-grid {
  display: grid;
  gap: 16px;
}

.otc-main, .otc-side {
  min-width: 0;
}

.otc-mini-delta {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.otc-mini-head {
  margin-bottom: 10px;
}

.otc-mini-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}

.otc-mini-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  justify-content: space-between;
}

.otc-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.otc-mini-row.down .otc-mini-delta {
  color: #ef4444;
}

.otc-mini-row.up .otc-mini-delta {
  color: #1faa3e;
}

.otc-breakout-row {
  opacity: 0;
  animation: fadeInSlide 0.4s ease forwards;
  position: relative;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.otc-breakout-row:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.04) 0%, transparent 100%);
  border-radius: 4px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
}

.otc-breakout-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
  transition: all 0.2s ease;
}

.otc-breakout-row:hover .otc-breakout-badge {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.otc-breakout-row .otc-player-name {
  cursor: pointer;
  transition: color 0.2s ease;
}

.otc-breakout-row .otc-player-name:hover {
  color: #3b82f6;
  text-decoration: underline;
}

/* Global player clickable styling */
.player-clickable {
  cursor: pointer;
  transition: color 0.2s ease;
}

.player-clickable:hover {
  color: #3b82f6;
  text-decoration: underline;
}

/* Breakout player names specific styling */
.breakout-player-name.player-clickable {
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s ease;
}

.breakout-player-name.player-clickable:hover {
  color: #3b82f6;
  text-decoration: underline;
  transform: translateY(-1px);
}

/* View All link styling */
.otc-view-all-link:hover {
  color: #2563eb !important;
  text-decoration: underline !important;
}

/* Guest link styling (slightly different to indicate it's not a real link) */
.otc-guest-link {
  color: #64748b !important;
  cursor: pointer;
}

.otc-guest-link:hover {
  color: #475569 !important;
  text-decoration: underline !important;
}

.otc-mini-section + .otc-mini-section {
  margin-top: 14px;
}

.otc-mini-section-title {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.otc-mini-sub {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b95a7;
  line-height: 1.3;
}

.otc-mini-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
}

.otc-mini-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.otc-mini-tabs {
  display: flex;
  gap: 4px;
  background: var(--row);
  padding: 2px;
  border-radius: 6px;
}

.otc-mini-tab {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.otc-mini-tab:hover {
  color: var(--text);
  background: #e2e8f0;
}

.otc-mini-tab.is-active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Teams Analytics Tabs - styled like Player Insights */
#teamsAnalyticsTabs {
  display: flex;
  gap: 4px;
  background: var(--row);
  padding: 2px;
  border-radius: 6px;
}

#teamsAnalyticsTabs .tab-btn {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#teamsAnalyticsTabs .tab-btn:hover {
  color: var(--text);
  background: #e2e8f0;
}

#teamsAnalyticsTabs .tab-btn.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.otc-tab-content {
  display: none;
}

.otc-tab-content.is-active {
  display: block;
}

.otc-movers-empty {
  padding: 8px 0;
  font-size: 12px;
  color: #8c98aa;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.otc-movers-panel {
  padding: 12px 14px;
  transition: all 0.3s ease;
}

.otc-movers-loading {
  opacity: 0.6;
}

.otc-movers-updated {
  animation: pulse-highlight 0.6s ease;
}

@keyframes pulse-highlight {
  0%, 100% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(59, 130, 246, 0.05);
  }
}

.loading-spinner {
  margin: 10px auto;
  width: 24px;
  height: 24px;
  border: 3px solid #f3f4f6;
  border-radius: 50%;
  border-top-color: #3498db;
  border-right-color: transparent;
  animation: spin 1s linear infinite;
}

/* Page-level navigation progress bar */
#page-load-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent, #38bdf8), #818cf8, #60a5fa);
  z-index: 999999;
  transition: width 0.25s ease, opacity 0.3s ease 0.1s;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}
#page-load-bar.plb-active { width: 75%; transition: width 8s cubic-bezier(0.1, 0.05, 0, 1); }
#page-load-bar.plb-done   { width: 100%; opacity: 0; transition: width 0.15s ease, opacity 0.3s ease 0.15s; }

.fullscreen-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  backdrop-filter: blur(6px);
  gap: 0;
}

.flo-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 12px;
  opacity: 0.92;
}

.fullscreen-loading-overlay .loading-spinner {
  width: 40px;
  height: 40px;
  border-width: 3px;
  border-top-color: #38bdf8;
  margin: 0 0 14px 0;
}

.fullscreen-loading-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1e293b);
  margin-top: 0;
}

.fullscreen-loading-subtext {
  font-size: 13px;
  color: var(--text-muted, #64748b);
  margin-top: 5px;
}

.flo-progress-track {
  width: 160px;
  height: 3px;
  background: rgba(0,0,0,0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 20px;
}

.flo-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  animation: floProgressAnim 8s cubic-bezier(0.1, 0.05, 0, 1) forwards;
}

@keyframes floProgressAnim {
  0%   { width: 0%; }
  30%  { width: 45%; }
  60%  { width: 70%; }
  85%  { width: 88%; }
  100% { width: 95%; }
}

[data-theme="dark"] .fullscreen-loading-overlay {
  background: rgba(15, 23, 42, 0.97);
}

[data-theme="dark"] .flo-progress-track {
  background: rgba(255,255,255,0.1);
}

.otc-page-badge {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef4fb;
  color: #274a73;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid #d8e3f2;
}

.otc-page-head {
  margin-bottom: 14px;
}

.otc-page-head, .otc-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.otc-page-head-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.otc-page-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
}

.otc-settings-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.otc-settings-row .csd-trigger,
.otc-settings-row .otc-restrict-toggle {
  height: 30px;
  box-sizing: border-box;
}

.otc-viewer-toggles {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.otc-info-tooltip-wrapper {
  position: relative;
  display: inline-flex;
}

.otc-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.otc-info-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.otc-info-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  z-index: 200;
  display: none;
}

.otc-info-tooltip-header {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 0.5px solid var(--border);
  background: var(--bg-alt);
  border-radius: 10px 10px 0 0;
}

.otc-info-tooltip-body {
  padding: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.otc-info-tooltip-body p {
  margin: 0 0 10px 0;
}

.otc-info-tooltip-body p:last-child {
  margin-bottom: 0;
}

.otc-page-kicker {
  color: #8a96a8;
  margin-bottom: 4px;
}

.otc-page-kicker, .otc-side-sub, .otc-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.otc-page-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.otc-page-title, .otc-side-title, .otc-summary-title {
  font-weight: 800;
  color: var(--text);
}

.otc-pick-actions {
  margin-top: 8px;
  margin-bottom: 8px;
}

.otc-picks-help {
  font-size: 12px;
  color: var(--muted);
}

.otc-picks-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.otc-popup-arrow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

.otc-popup-body {
  padding: 16px;
  position: relative;
}

.otc-popup-body p {
  margin: 0;
  font-size: 13px;
  color: #495057;
  line-height: 1.4;
}

.otc-popup-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.otc-popup-close:hover {
  background: #e9ecef;
  color: #495057;
}

.otc-popup-content {
  padding: 0;
}

.otc-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.otc-popup-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
}

.otc-search-dropdown {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d8dee8;
  border-top: none;
  border-radius: 0 0 14px 14px;
  background: var(--card);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.otc-search-input {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #c8d2df;
  background: var(--card);
  padding: 0 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}

.otc-search-wrap {
  margin-top: 12px;
}

.otc-setup-btn {
  width: 100%;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.otc-setup-btn:hover {
  background: #0056b3;
}

.otc-setup-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}

.otc-setup-fields .row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.otc-setup-fields button {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.otc-setup-fields button:hover {
  background: #0056b3;
}

.otc-setup-fields input {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.15s ease-in-out;
}

.otc-setup-fields input:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.otc-setup-fields label {
  font-size: 14px;
  font-weight: 500;
  color: #495057;
}

.otc-setup-header {
  text-align: center;
  margin-bottom: 24px;
}

.otc-setup-sub {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  line-height: 1.4;
}

.otc-setup-title {
  font-size: 20px;
  font-weight: 600;
  color: #212529;
  margin: 0 0 8px 0;
}

.otc-shell {
  padding: 18px;
}

/* ── Trade calc main tabs ───────────────────────────────────── */
.otc-main-tabs {
  display: flex;
  gap: 4px;
  background: var(--row);
  padding: 3px;
  border-radius: 10px;
  margin-bottom: 18px;
  width: fit-content;
}

.otc-main-tab {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  margin-top: 0;
}

.otc-main-tab:hover {
  color: var(--text);
  background: var(--border);
}

.otc-main-tab.is-active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}


/* ── Suggestions tab layout ─────────────────────────────────── */
.otc-sugg-tab-layout {
  padding-top: 5px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 860px) {
  .otc-sugg-tab-layout {
    grid-template-columns: 1fr;
  }
}

/* Build-around search */
.otc-sugg-build-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.otc-sugg-build-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.otc-sugg-build-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.otc-sugg-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.otc-sugg-player-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--row);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.otc-sugg-player-input:focus {
  border-color: var(--accent);
}

.otc-sugg-player-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
}

.otc-sugg-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}

.otc-sugg-dropdown-item:hover {
  background: var(--bg-alt);
}

.otc-sugg-dropdown-pos {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.otc-sugg-dropdown-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otc-sugg-dropdown-val {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Meta line */
.otc-sugg-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Package cards */
.otc-sugg-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.otc-sugg-package {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 10px 12px;
  transition: border-color 0.14s, box-shadow 0.14s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.otc-sugg-package:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Left meta column */
.otc-sugg-pkg-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
  min-width: 64px;
}

.otc-sugg-pkg-value {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.otc-sugg-pkg-value.fair    { background: rgba(34, 197, 94, 0.12);  color: #16a34a; }
.otc-sugg-pkg-value.great   { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.otc-sugg-pkg-value.overpay { background: rgba(239, 68, 68, 0.10);  color: #dc2626; }

.otc-sugg-pkg-freq {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Center sides row */
.otc-sugg-pkg-sides {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.otc-sugg-pkg-side {
  flex: 1;
  min-width: 0;
}

.otc-sugg-pkg-side-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.otc-sugg-pkg-assets {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.otc-sugg-pkg-asset {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.otc-sugg-pkg-asset-pos {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
  min-width: 24px;
  text-align: center;
}

.otc-sugg-pkg-divider {
  display: none;
}

/* Right load button */
.otc-sugg-pkg-load-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(99,102,241,.25);
  background: rgba(99,102,241,.07);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.otc-sugg-pkg-load-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Real-trade example cards */
.otc-real-trade-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 6px;
  transition: box-shadow .15s, border-color .15s;
}
.otc-real-trade-card:hover {
  border-color: rgba(167,139,250,.4);
  box-shadow: 0 4px 18px rgba(0,0,0,.07);
}
.otc-rt-body {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
}
.otc-rt-side {
  padding: 12px 14px;
  min-width: 0;
}
.otc-rt-divider {
  background: var(--border);
  align-self: stretch;
}
.otc-rt-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.otc-rt-asset {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  min-width: 0;
}
.otc-rt-pos {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
  min-width: 26px;
  text-align: center;
}
.otc-rt-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.otc-rt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--row);
}
.otc-rt-count {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(167,139,250,.08);
  color: #a78bfa;
  border: 1px solid rgba(167,139,250,.18);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  /* Real-trade cards */
  .otc-real-trade-card {
    margin-bottom: 8px;
  }
  .otc-rt-side {
    padding: 8px 10px;
  }
  .otc-rt-label {
    font-size: 8px;
    margin-bottom: 4px;
  }
  .otc-rt-pos {
    min-width: 22px;
    font-size: 9px;
    padding: 1px 4px;
  }
  .otc-rt-name {
    font-size: 12px;
  }
  .otc-rt-footer {
    flex-wrap: wrap;
    padding: 7px 10px;
    gap: 6px;
  }
  .otc-rt-footer .otc-sugg-pkg-load-btn {
    width: 100%;
    text-align: center;
    padding: 7px 0;
  }
  /* Strategy chips: 4 across is too tight at 600px - keep 4 but shrink */
  .otc-arch-chip {
    font-size: 11px;
    padding: 6px 6px;
  }
  /* Impact table: shrink badges so name has room */
  .otc-strategy-impact-badge {
    font-size: 9px;
    padding: 2px 5px;
  }
  /* Footer badges wrap earlier */
  .otc-rt-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .otc-rt-footer > div:first-child {
    justify-content: flex-start;
  }

  /* ML suggestion packages */
  .otc-sugg-package {
    flex-wrap: wrap;
    gap: 8px;
  }
  .otc-sugg-pkg-sides {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    flex: 1 1 100%;
    order: 2;
  }
  .otc-sugg-pkg-side {
    width: 100%;
  }
  .otc-sugg-pkg-meta {
    order: 1;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .otc-sugg-pkg-load-btn {
    order: 3;
    width: 100%;
    text-align: center;
  }
  .otc-sugg-pkg-asset {
    white-space: normal;
  }
  .otc-sugg-pkg-divider {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--border);
    margin: 2px 0;
  }

}

/* ── Strategy cards: phone layout (≤ 480px) ──────────────────────────────── */
@media (max-width: 480px) {
  /* Chips scroll horizontally as pills - no grid override needed */

  /* Trade card: stack YOU GET / YOU GIVE vertically */
  .otc-rt-body {
    grid-template-columns: 1fr;
  }
  .otc-rt-divider {
    height: 1px;
    width: 100%;
    align-self: unset;
  }
  .otc-rt-side {
    padding: 8px 12px;
  }

  /* Footer: column stack, full-width Analyze already covered by 600px rule */
  .otc-rt-footer {
    padding: 8px 12px;
    gap: 8px;
  }

  /* Cards container: tighter padding */
  #otcStrategyCards {
    padding: 8px 10px;
  }

  /* Impact rows: reduce gap so badges don't crowd the name */
  .otc-strategy-impact-row {
    padding: 7px 10px;
    gap: 6px;
  }
  .otc-strategy-impact-stats {
    gap: 4px;
  }
  .otc-strategy-impact-badge {
    font-size: 9px;
    padding: 2px 4px;
  }
  .otc-strategy-impact-name {
    font-size: 12px;
  }

  /* Pagination: stack and centre */
  .pagination.pagination--center {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
  }
  .pagination-btn {
    padding: 7px 18px;
    font-size: 13px;
  }
  .pagination-label {
    font-size: 12px;
  }
}

/* Loading skeleton */
.otc-sugg-loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.otc-sugg-skeleton {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--card);
}

.otc-sugg-skeleton-line {
  border-radius: 6px;
  background: var(--row);
  animation: otcSuggShimmer 1.4s ease-in-out infinite;
}

@keyframes otcSuggShimmer {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1;   }
}

/* Archetype pattern grid */
.otc-arch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--surface-2, rgba(0,0,0,.04));
  border-bottom: 1px solid var(--border);
  gap: 6px;
}

.otc-arch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.otc-arch-cell {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.otc-arch-cell:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.otc-arch-cell:last-child,
.otc-arch-cell:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}

@media (max-width: 600px) {
  .otc-arch-header {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
  }
  .otc-arch-header span {
    font-size: 9px !important;
  }
  .otc-arch-grid {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 4px;
    background: transparent;
  }
  .otc-arch-cell {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
  }
  .otc-arch-cell:last-child,
  .otc-arch-cell:nth-last-child(2):nth-child(odd) {
    border-bottom: 1px solid var(--border);
  }
}

/* Compact tab variant for inline use (e.g. archetype toggle) */
.otc-main-tabs.compact {
  padding: 2px;
  border-radius: 7px;
}
.otc-main-tabs.compact .otc-main-tab {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 5px;
}

/* Targets side column */
.otc-sugg-targets-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 0;
  overflow: hidden;
}

.otc-sugg-section-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--row);
}

.otc-sugg-section-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  display: block;
  margin-bottom: 1px;
}

.otc-sugg-section-sub {
  font-size: 11px;
  color: var(--text-muted);
}

#otcSuggTargetsBody {
  padding: 6px 0;
}

/* Target rows inside suggestions tab */
.otc-sugg-target-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.otc-sugg-target-row:last-child { border-bottom: none; }
.otc-sugg-target-row:hover { background: var(--row); }

.otc-sugg-target-pos {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  min-width: 24px;
  text-align: center;
}

.otc-sugg-target-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otc-sugg-target-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--row);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.otc-sugg-target-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Paywall/empty state for suggestions tab */
/* ── Universal pagination ─────────────────────────────────────────────────────
   One component used by every paginated list (players, rookies, trade intel…).
   Default layout: info text on the left, controls on the right.
   Add .pagination--center for the centered prev / label / next variant. */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.pagination--center {
  justify-content: center;
  border-top: none;
  margin-top: 0;
  padding: 12px 0 4px;
}
.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.pagination-btn:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pagination-pages {
  display: flex;
  gap: 4px;
}
.pagination-page {
  min-width: 32px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.pagination-page:hover:not(.active) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.pagination-page.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
  font-weight: 700;
  cursor: default;
}
.pagination-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 44px;
  text-align: center;
}
@media (max-width: 540px) {
  .pagination {
    flex-direction: column;
    align-items: stretch;
  }
  .pagination-info { text-align: center; }
  .pagination-controls { justify-content: center; }
}

.otc-sugg-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.otc-sugg-empty-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.otc-sugg-empty-sub {
  font-size: 13px;
  line-height: 1.5;
}

.otc-shell, .otc-side-panel {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.otc-side-head {
  margin-bottom: 12px;
}

.otc-side-panel {
  padding: 16px;
  position: static !important;
  top: auto !important;
}

.otc-side-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.otc-view-all-link {
  font-size: 12px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.otc-view-all-link:hover {
  text-decoration: underline;
}

.otc-side-sub {
  margin-top: 4px;
  color: #8c98aa;
}

.otc-side-title {
  margin: 0;
  font-size: 17px;
}

.otc-slot {
  padding: 16px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.otc-slot-empty {
  text-align: center;
  color: #718096;
}

.otc-slot-empty-sub {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: #7c8798;
}

.otc-slot-empty-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.otc-stat-box {
  border-radius: 16px;
  background: var(--row);
  border: 1px solid var(--border);
  padding: 14px;
  text-align: center;
  margin-top: 5px;
}

.otc-stat-label {
  color: #96a1b2;
}

.otc-stat-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.otc-summary-card {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  padding: 18px;
}

.otc-summary-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.otc-summary-sub {
  font-size: 12px;
  color: #8894a7;
  font-weight: 700;
}

.otc-team-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}

.otc-team-dropdown {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  font-size: 14px;
  color: var(--text);
}

.otc-team-dropdown:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.otc-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.otc-team-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Title + opponent dropdown share one line in the Team 2 header. */
.otc-team-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.otc-team-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: var(--card);
  font-size: 14px;
  color: #495057;
}

.otc-team-input:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.otc-team-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 6px;
}

.otc-team-owner-tag {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59,130,246,.12);
  color: #1d4ed8;
  font-weight: 600;
}

.otc-team-owner-tag-muted {
  background: rgba(148,163,184,.12);
  color: #64748b;
}

.otc-team-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf2f7;
  color: #52637a;
  font-size: 12px;
  font-weight: 700;
}

.otc-team-popup {
  position: fixed;
  background: var(--card);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-width: 280px;
}

.otc-team-select-dropdown {
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background-color: var(--card-bg, #fff);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 200px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.otc-team-select-dropdown option {
  padding: 8px 12px;
  font-weight: 400;
}

.otc-team-select-dropdown:focus {
  outline: none;
  border-color: var(--primary, #007bff);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.otc-team-select-dropdown:hover {
  border-color: var(--primary, #007bff);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* ── Roster filter controls (restrict toggle + opponent picker) ── */
.otc-roster-filter-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 4px 0 14px;
}

.otc-restrict-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg, var(--card));
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.otc-restrict-toggle:hover {
  border-color: var(--primary, #2563eb);
}

.otc-restrict-toggle input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--primary, #2563eb);
  cursor: pointer;
}

/* Compact opponent dropdown that fits in the Team 2 header without truncating. */
.otc-team-select-dropdown.otc-opponent-select {
  min-width: 150px;
  max-width: 220px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
}

.otc-team-select-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.otc-team-selector {
  padding: 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.otc-team-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2px;
}

.otc-team-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

/* Opponent dropdown styled to read as the team-name part of the Team 2 title. */
.otc-team-select-dropdown.otc-inline-team-select {
  min-width: 0;
  max-width: 240px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  padding: 2px 24px 2px 8px;
  border-width: 1px;
  border-radius: 8px;
  box-shadow: none;
  vertical-align: baseline;
}

.otc-value-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.otc-value-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Name rendered as an <a> to the player page: keep the plain look */
a.otc-value-name { text-decoration: none; }
a.otc-value-name:hover { text-decoration: underline; }

.otc-value-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--row);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  min-height: 100%;
}

.otc-value-row {
  display: grid;
  justify-content: space-between;
  align-items: stretch;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  padding: 10px;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
  grid-template-columns: 42px minmax(0, 1fr);
}

.otc-value-row:hover {
  transform: translateY(-1px);
}

.otc-value-score {
  flex-shrink: 0;
  min-width: 56px;
  text-align: right;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.otc-value-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #738198;
  font-weight: 600;
}

.otc-value-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.otc-values-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}
.otc-tier-divider {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0 0;
  pointer-events: none;
  flex-shrink: 0;
}
.otc-tier-divider-line {
  flex: 1;
  height: 1px;
  opacity: 0.45;
}
.otc-tier-divider-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  opacity: 0.7;
  white-space: nowrap;
}

.otc-verdict {
  margin-top: 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #2e9fff;
}

.otc-viewer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 11.5px;
  white-space: nowrap;
}

.otc-viewer-toggle:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.05);
}

.otc-viewer-toggle input[type="radio"] {
  margin: 0;
  width: 13px;
  height: 13px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.otc-viewer-toggle:has(input:checked) {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.otc-viewer-toggle span {
  user-select: none;
}

.otc-toggle-divider {
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

/* Pill toggle switch (1QB/SF) */
.otc-ctrl-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.otc-toggle-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
}

.otc-pill-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.otc-pill-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.otc-pill-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 20px;
  transition: background 0.2s;
}

.otc-pill-track::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: var(--card);
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.otc-pill-switch input:checked + .otc-pill-track {
  background: var(--accent);
}

.otc-pill-switch input:checked + .otc-pill-track::before {
  transform: translateX(16px);
}

/* ── Site-wide custom dropdown styling for native <select> ──────────────────
   Gives every native select a consistent custom look (custom caret, border,
   radius). Component-specific select classes have higher specificity and keep
   their own sizing/tweaks on top of this base. Note: the OPEN option list is
   rendered by the OS and can't be fully styled cross-browser. */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--card-bg, var(--card, #fff));
  border: 1px solid var(--border, #d1d5db);
  border-radius: 8px;
  padding: 6px 30px 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select:hover {
  border-color: var(--accent, #2563eb);
}

select:focus {
  outline: none;
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ── Custom Select Dropdown (CSD) ───────────────────────────────────────────── */

/* Keep the original <select> hidden inside its wrapper regardless of inline style */
.csd-wrap > select {
  display: none !important;
  position: absolute;
  pointer-events: none;
}

.csd-wrap {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

/* Full-width form contexts: the original <select> was width:100%, but it sits
   in a display:none row at init so JS can't measure it. Force the wrapper to
   fill the row to match the native layout. */
.home-card .csd-wrap,
.trade-login-row .csd-wrap,
.otc-setup-form .csd-wrap {
  display: block;
  width: 100%;
}

.csd-trigger {
  display: inline-flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
  /* Base look - overridden by inline styles copied from the original select */
  background-color: var(--card-bg, var(--card, #fff));
  color: var(--text);
  border: 1px solid var(--border, #dbe2ea);
  border-radius: 8px;
  padding: 6px 10px 6px 12px;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.csd-trigger:hover {
  border-color: var(--accent);
}

.csd-trigger:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.csd-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.csd-arrow {
  flex-shrink: 0;
  margin-left: 8px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.csd-wrap.is-open .csd-arrow {
  transform: rotate(180deg);
}

.csd-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
  z-index: 9999;
  overflow: hidden;
  overflow-y: auto;
  max-height: 280px;
  scrollbar-width: thin;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.csd-list.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.csd-option {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.08s;
}

.csd-option:hover,
.csd-option.is-focused {
  background: var(--bg-alt, #f4f6f8);
}

.csd-option.is-selected {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft, #e9eef5);
}

.csd-option.is-selected.is-focused,
.csd-option.is-selected:hover {
  background: var(--accent-soft-2, #eef4fb);
}

.csd-option.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.csd-group-label {
  padding: 8px 14px 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.csd-option + .csd-group-label,
.csd-group-label + .csd-group-label {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 10px;
}

/* Control select dropdowns (team size, scoring format) */
.otc-ctrl-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 22px 4px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  white-space: nowrap;
  transition: border-color 0.15s;
}

.otc-ctrl-select:hover,
.otc-ctrl-select:focus {
  border-color: var(--accent);
  outline: none;
}

.player-chip-list, .otc-selected-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-trade-value {
  margin-right: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.rank-item .chips {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  padding-left: 0;
  white-space: nowrap;
  font-size: 11.5px;
}

.rank-item .chips .chip {
  background: transparent;
  border: none;
  padding: 0;
  margin-right: 10px;
  color: var(--text-muted);
  box-shadow: none;
  font-weight: 500;
  border-radius: 0;
  font-size: 11.5px;
}

.rank-item .chips .chip:last-child { margin-right: 0; }

.rank-item .chips .chip + .chip { position: relative; }
.rank-item .chips .chip + .chip::before {
  content: '·';
  position: absolute;
  left: -7px;
  color: var(--border);
}

.rank-item .chips .chip.diff-pos { color: #16a34a; font-weight: 700; }
.rank-item .chips .chip.diff-neg { color: #dc2626; font-weight: 700; }

.rank-item .chips .chip-streak {
  background: transparent;
  border: none;
  padding: 0;
  margin-right: 10px;
  font-size: 11.5px;
}

.side-body .chips {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
  flex-direction: column;
}

.streak-hot .chip-streak {
  background: linear-gradient(180deg, #fff8e7, #ffe5b4);
  border: 1px solid #f97316;
  color: #dc2626;
  box-shadow:
    0 0 12px rgba(249, 115, 22, 0.5),
    0 0 24px rgba(251, 146, 60, 0.3),
    inset 0 0 12px rgba(251, 146, 60, 0.4);
  animation: firePulse 3s ease-in-out infinite;
}

.trade-ai-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--card);
}

.trade-ai-copy-line {
  line-height: 1.5;
}

.trade-ai-grid {
  grid-template-columns: 1fr 1fr;
}

.trade-ai-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .7;
  margin-bottom: 6px;
  color: var(--accent);
}

.trade-ai-list {
  margin: 0;
  padding-left: 18px;
}

.trade-ai-score {
  font-size: 13px;
  opacity: .75;
}

.trade-ai-top, .trade-ai-grid {
  display: grid;
  gap: 12px;
}

.trade-ai-verdict {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
}

.trade-ai-verdict-accept {
  background: rgba(34,197,94,.14);
}

.trade-ai-verdict-counter {
  background: rgba(245,158,11,.14);
}

.trade-ai-verdict-decline {
  background: rgba(239,68,68,.14);
}

.trade-ai-wrap {
  display: grid;
  gap: 12px;
}

.trade-bar {
  margin-top: 4px;
  margin-bottom: 12px;
}

.trade-bar-fair-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 46.5%;
  right: 46.5%;
  background: var(--accent);
}

.trade-bar-indicator {
  position: absolute;
  top: -3px;
  width: 12px;
  height: 28px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8, 0 0 10px rgba(56, 189, 248, 0.8);
  transform: translateX(-50%);
  transition: left 0.22s ease-out;
}

.trade-bar-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-subtle);
  margin-top: 4px;
}

.trade-bar-track {
  position: relative;
  height: 22px;
  border-radius: 999px;
  background: rgb(230 231 235);
  overflow: hidden;
}

.trade-card .teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.trade-eval-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.trade-eval-btn:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
  background: #9ca3af;
}

.trade-eval-btn:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.trade-player-chip {
  background: var(--card-soft);
  border: 1px solid var(--border);
  padding: 10px 12px;
  color: var(--accent);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  margin-top: 2px;
  justify-content: space-between;
}

.trade-player-chip span {
  font-weight: 700;
  font-size: 17px;
}

.trade-summary-card .trade-total {
  flex: 1 1 0;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trade-summary-card .trade-total .label {
  font-size: 12px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trade-summary-card .trade-total .value {
  font-size: 20px;
  font-weight: 700;
}

.trade-summary-card .trade-totals-row {
  text-align: center;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.trade-verdict {
  font-size: 14px;
  margin-top: 8px;
  text-align: center;
  color: #39bef8;
}

.trade-verdict.verdict-fair {
  color: #22c55e;
}

.trade-verdict.verdict-side-a {
  color: #38bdf8;
}

.trade-verdict.verdict-side-b {
  color: #fb923c;
}

/* ============================================
   HISTORY & RECAP
   ============================================ */
.ai-copy, .os-ai-copy {
  line-height: 1.55;
  font-size: 0.96rem;
}

.ai-error-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: color-mix(in srgb, var(--warning, #f59e0b) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 35%, transparent);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.ai-error-icon { font-size: 1rem; flex-shrink: 0; }

.history-awards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.history-awards-panel {
  padding: 20px;
}

.history-card {
  padding: 10px 12px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  line-height: 1.2;
}

.history-cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  display: grid;
  gap: 5px;
}

.history-card .history-card-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.history-card .history-card-sub {
  font-size: 11px;
  opacity: 0.75;
}

.history-card .history-card-value {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.history-card, .history-section-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card, #fff);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.history-card-label {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 10px;
}

.history-card-sub {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  padding-left: 10px;
}

.history-card-value {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  padding-left: 10px;
}

.history-card.is-featured {
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.08);
  grid-column: span 2;
  padding: 10px 12px;
}

.history-card.is-featured .history-card-value {
  font-size: 1.08rem;
}

.history-card.is-featured::before {
  width: 5px;
  background: linear-gradient(180deg, #1d4ed8 0%, #60a5fa 100%);
}

.history-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%);
  opacity: 0.95;
  left: 0;
  top: 10px;
  bottom: 10px;
  border-radius: 999px;
}

/* Champion card - gold treatment */
.history-card.is-champion {
  background: linear-gradient(135deg, rgba(251,191,36,0.13) 0%, var(--card) 55%);
  border-color: rgba(245,158,11,0.45);
  box-shadow: 0 4px 20px rgba(245,158,11,0.14);
}
.history-card.is-champion::before {
  background: linear-gradient(180deg, #f59e0b 0%, #fbbf24 100%);
}
.history-card.is-champion .history-card-label {
  color: #b45309;
}
.history-card.is-champion .history-card-value {
  font-size: 1.15rem;
  color: var(--text);
}

/* Runner-up card - silver treatment */
.history-card.is-runner-up {
  background: linear-gradient(135deg, rgba(148,163,184,0.11) 0%, var(--card) 55%);
  border-color: rgba(148,163,184,0.4);
  box-shadow: 0 4px 16px rgba(100,116,139,0.1);
}
.history-card.is-runner-up::before {
  background: linear-gradient(180deg, #94a3b8 0%, #cbd5e1 100%);
}
.history-card.is-runner-up .history-card-label {
  color: #64748b;
}
.history-card.is-runner-up .history-card-value {
  font-size: 1.1rem;
  color: var(--text);
}

/* Dark mode overrides */
.dark .history-card.is-champion {
  background: linear-gradient(135deg, rgba(251,191,36,0.1) 0%, var(--card) 60%);
  border-color: rgba(245,158,11,0.35);
}
.dark .history-card.is-champion .history-card-label { color: #fbbf24; }
.dark .history-card.is-runner-up {
  background: linear-gradient(135deg, rgba(148,163,184,0.09) 0%, var(--card) 60%);
  border-color: rgba(148,163,184,0.3);
}
.dark .history-card.is-runner-up .history-card-label { color: #94a3b8; }

.history-chart-panel {
  padding: 18px;
}

.history-chart-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  padding: 6px;
}

.history-empty {
  color: var(--muted, #6b7280);
  padding: 8px 0;
}

.history-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 20px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 26px 26px 22px;
  border: 1px solid rgba(205, 214, 226, 0.9);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  position: relative;
}

.history-kicker {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 12px;
  color: #6b7280;
}

.history-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.history-season-picker {
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-season-picker label {
  font-size: 0.76rem;
  font-weight: 900;
  color: #6b7280;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.history-season-picker select {
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid #d6dfeb;
  background: rgba(255,255,255,0.95);
  font: inherit;
  height: 52px;
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.history-section-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card-soft);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.history-recap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.history-recap-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recap-team-dropdown {
  min-width: 200px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.recap-team-dropdown:hover {
  border-color: var(--accent);
}

.recap-team-dropdown:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.recap-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
  white-space: nowrap;
}

.recap-generate-btn:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}

.recap-generate-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.recap-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.recap-generate-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.history-recap-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.recap-result {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  line-height: 1.7;
  font-size: 14px;
  color: var(--text);
}

.recap-result h3 {
  margin: 20px 0 10px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.recap-result h3:first-child {
  margin-top: 0;
}

.recap-result p {
  margin: 0 0 12px 0;
}

.recap-result p:last-child {
  margin-bottom: 0;
}

.recap-result strong {
  color: var(--accent);
  font-weight: 600;
}

.recap-empty {
  padding: 32px 20px;
  text-align: center;
  background: var(--bg-alt);
  border-radius: 12px;
}

.recap-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.recap-empty-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto;
}

.history-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  letter-spacing: -0.01em;
}

.history-standings-panel {
  padding: 18px;
  align-self: start;
  height: auto;
}

.history-standings-shell {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  padding: 12px 12px 8px;
}

.history-standings-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 12px;
}

.history-subtitle {
  margin: 16px 0 0;
  color: #667085;
  max-width: 900px;
  font-size: 1.03rem;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.history-title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.02;
  font-weight: 900;
  color: #0f2747;
  letter-spacing: -0.03em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.history-title-accent {
  display: inline-block;
  position: relative;
}

.history-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items: start;
}

.os-card, .os-card-soft {
  padding: 18px;
}

/* ── Rookie Draft Assistant ─────────────────────────────────────────────── */
.da-toolbar {
  display: flex;
  gap: 6px;
  padding: 14px 0 0;
  flex-wrap: wrap;
}
.da-filter {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.da-filter.active,
.da-filter:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.da-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-top: 14px;
}
.da-board { flex: 1; min-width: 0; }
.da-board-header {
  display: grid;
  grid-template-columns: 32px 1fr 48px 56px 52px 76px;
  gap: 8px;
  padding: 4px 10px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.da-board-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 520px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.da-row {
  display: grid;
  grid-template-columns: 32px 1fr 48px 56px 52px 76px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  transition: background 0.1s;
}
.da-row:hover { background: var(--card-soft); }
.da-row.da-recommended {
  background: rgba(16,185,129,.06);
  border-left: 2px solid #10b981;
  padding-left: 8px;
}
.da-row.da-drafted { opacity: 0.38; }
.da-rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}
.da-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.da-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.da-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.da-rec-badge {
  font-size: 10px;
  font-weight: 800;
  color: #10b981;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: 4px;
  padding: 2px 5px;
  text-align: center;
  white-space: nowrap;
}
.da-col-right { text-align: right; }
.da-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.da-draft-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
}
.da-draft-btn:hover { opacity: 0.82; }
.da-undraft-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  width: 100%;
}
.da-undraft-btn:hover { border-color: var(--accent); color: var(--accent); }
.da-mine-label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
  white-space: nowrap;
}
.da-mine-label:hover { color: var(--text); }
.da-mine-cb {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.da-my-pick .da-mine-label { color: var(--accent); }
.da-my-pick { background: rgba(16,185,129,.05); }
.da-end-draft-btn {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.da-end-draft-btn:hover { opacity: 0.85; }
.da-drafted-sep {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: 10px 10px 4px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.da-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.da-needs {
  flex: 0 0 210px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.da-needs-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.da-needs-chevron { display: none; }
.da-needs-body { display: block; }
.da-need-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.da-need-row:last-child { border-bottom: none; }
.da-need-pos { flex-shrink: 0; border-radius: 5px; font-weight: 800; }
.da-need-info { display: flex; flex-direction: column; gap: 2px; }
.da-need-label { font-size: 12px; font-weight: 700; }
.da-need-meta { font-size: 11px; color: var(--text-muted); }
.da-reset-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  margin-left: auto;
}
.da-reset-btn:hover { border-color: var(--accent); color: var(--accent); }
.da-info-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.da-info-btn:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 720px) {
  .da-layout { flex-direction: column; }
  .da-needs { flex: 1 1 auto; width: 100%; box-sizing: border-box; order: -1; }
  .da-needs-title { cursor: pointer; user-select: none; }
  .da-needs-chevron { display: inline; }
  .da-needs-collapsed .da-needs-body { display: none; }
  .da-needs-collapsed .da-needs-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
  .da-board-list { max-height: none; overflow-y: visible; }
  .da-rec-badge { display: none; }

  /* Available: rank | name | pos | draft-btn  (hide badge col 4 + value col 5) */
  .da-board[data-view="available"] .da-board-header,
  .da-board[data-view="available"] .da-row {
    grid-template-columns: 28px 1fr 40px 64px; gap: 4px;
  }
  .da-board[data-view="available"] .da-row > :nth-child(4),
  .da-board[data-view="available"] .da-row > :nth-child(5) { display: none; }

  /* Drafted: rank | name | pos | mine-label | ×  (hide value col 5) */
  .da-board[data-view="drafted"] .da-board-header,
  .da-board[data-view="drafted"] .da-row {
    grid-template-columns: 28px 1fr 40px 60px 28px; gap: 4px;
  }
  .da-board[data-view="drafted"] .da-row > :nth-child(5) { display: none; }
}
@media (max-width: 400px) {
  .da-board[data-view="available"] .da-board-header,
  .da-board[data-view="available"] .da-row { grid-template-columns: 24px 1fr 36px 58px; }
  .da-board[data-view="drafted"] .da-board-header,
  .da-board[data-view="drafted"] .da-row { grid-template-columns: 24px 1fr 36px 54px 24px; }
  .da-draft-btn { font-size: 11px; padding: 5px 6px; }
  .da-name { font-size: 12px; }
}

/* Value Rankings card header - sits above the table on all screen sizes */
.os-vr-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  padding: 14px 16px 4px;
}

.os-card, .os-card-soft, .os-hero-card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 18px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  max-height: 1225px;
}

.os-card-soft {
  background: var(--card);
}

.os-hero-badge {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.18);
}

.os-hero-card {
  padding: 22px;
  background: linear-gradient(135deg, #0f2747 0%, #183a63 100%);
  color: #ffffff;
  margin-bottom: 18px;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.os-hero-copy {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255,255,255,0.92);
  max-width: 760px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.os-hero-footer {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.76);
}

.os-hero-kicker {
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.72);
  font-weight: 700;
  margin-bottom: 6px;
}

.os-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.os-hero-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
  color: #ffffff;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.os-hero-top {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
}

.os-section-head {
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.os-section-head-content {
  flex: 1;
}

.card-collapse-toggle {
  display: none;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.card-collapse-toggle:hover {
  color: #374151;
}

.card-collapse-toggle.collapsed {
  transform: rotate(-90deg);
}

.card-collapsible-body {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.card-collapsible-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.os-section-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #7b8798;
}

.os-section-title {
  margin: 0;
  font-size: 17px;
  color: var(--text);
  font-weight: 800;
}

.os-snapshot-bottom {
  margin-top: 10px;
}

.os-snapshot-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--row);
  padding: 14px 14px 12px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.os-snapshot-card:hover, .os-waiver-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.os-snapshot-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--row);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--accent);
}

.os-snapshot-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.os-snapshot-list, .os-waiver-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.os-snapshot-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.os-snapshot-meta {
  margin-top: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a0b2;
  font-weight: 700;
}

.os-snapshot-rank {
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--row);
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
}

.os-snapshot-rank-wrap {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.os-snapshot-team {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-subhead {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.os-snapshot-top, .os-waiver-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.os-snapshot-value {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.os-stat-card {
  border-radius: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(2px);
}

.os-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
  font-weight: 700;
}

.os-stat-sub {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.82);
  line-height: 1.35;
}

.os-stat-value {
  margin-top: 8px;
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
  color: #ffffff;
}

.os-waiver-main {
  min-width: 0;
  flex: 1 1 auto;
}

.os-waiver-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.os-waiver-row {
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--row);
  color: var(--text);
}

.os-waiver-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #728198;
  font-weight: 600;
}

.os-waiver-value {
  flex-shrink: 0;
  min-width: 56px;
  text-align: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--row);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  border: 1px solid var(--accent);
}

.os-waiver-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.os-waiver-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.waiver-signal {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.signal-breakout { background: #fef3c7; color: #92400e; }
.signal-rising    { background: #dcfce7; color: #166534; }
.signal-value     { background: #dbeafe; color: #1e40af; }
.signal-aging     { background: #fee2e2; color: #991b1b; }
.signal-hold      { background: var(--row); color: var(--text-muted); border: 1px solid var(--border); }

.waiver-arrow-up   { font-size: 10px; font-weight: 700; color: #22c55e; }
.waiver-arrow-down { font-size: 10px; font-weight: 700; color: #ef4444; }


/* ============================================
   STANDINGS & RANKINGS
   ============================================ */
.award-body {
  font-size: 14px;
}

.award-desc {
  font-size: 13px;
  color: var(--text-subtle);
}

.award-icon {
  font-size: 36px;
  margin-bottom: 8px;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.3);
}

.award-item {
  color: var(--accent);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: var(--card);
}

.award-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(250, 204, 21, 0.25);
}

.award-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 6px;
}

.award-winner {
  margin-top: 10px;
  font-weight: 800;
  color: #38bdf8;
  font-size: 14px;
}

.awards-card {
  border-radius: 18px;
  color: #f1f5f9;
  position: relative;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  justify-content: center;
  align-items: stretch;
}

.awards-title {
  font-size: 30px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 22px;
  color: #facc15;
  letter-spacing: 0.5px;
}

.rank {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  background: transparent;
  flex-shrink: 0;
}

.rank-first {
  color: #f59e0b;
}

.rank-second {
  color: var(--text-muted);
}

.rank-third {
  color: #92400e;
}

/* ---- Playoff Odds tab ---- */
.playoff-odds-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.loading-spinner-sm {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.po-wrap { padding: 4px 0 8px; }
.po-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  padding: 0 4px;
}
.po-error {
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px 4px;
}
.po-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.po-table th {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  padding: 0 6px 6px;
  border-bottom: 1px solid var(--border);
}
.po-table td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--border-subtle, var(--border));
  vertical-align: middle;
}
.po-table tr:last-child td { border-bottom: none; }
.po-team { font-weight: 500; max-width: 140px; }
.po-rec  { color: var(--text-muted); white-space: nowrap; }
.po-odds { min-width: 120px; }
.po-bye  { text-align: center; color: var(--text-muted); white-space: nowrap; }
.po-proj { color: var(--text-muted); white-space: nowrap; font-size: 12px; }
.po-bar-wrap {
  background: var(--border);
  border-radius: 3px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 3px;
}
.po-bar {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}
.po-bar-green  { background: #22c55e; }
.po-bar-yellow { background: #eab308; }
.po-bar-red    { background: #ef4444; }
.po-label { font-size: 12px; font-weight: 600; }
.po-pct-sym { font-size: 10px; font-weight: 400; color: var(--text-muted); }
.po-made   { color: #22c55e; font-weight: 600; font-size: 12px; }
.po-missed { color: var(--text-muted); font-size: 12px; }

[data-theme="dark"] .po-bar-green  { background: #16a34a; }
[data-theme="dark"] .po-bar-yellow { background: #ca8a04; }
[data-theme="dark"] .po-bar-red    { background: #dc2626; }

/* ---- Power rankings grid ---- */
.rank-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  transition: background 0.12s, border-color 0.12s;
}

.rank-item:hover {
  background: var(--row, #f8fafc);
  border-color: var(--accent-soft, #c7d2fe);
}

.rank-item .pos {
  flex: 0 0 26px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: -0.3px;
}

/* Player compare: collapsible sections + weekly trends columns */
.pm-section-collapsible {
  cursor: pointer; user-select: none;
  justify-content: flex-start; gap: 8px;
  padding: 5px 10px; margin-left: -10px; border-radius: 7px;
  transition: background 0.12s;
}
.pm-section-collapsible:hover { background: var(--row, rgba(127, 127, 127, 0.08)); }
.pm-collapse-chevron {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 5px;
  font-size: 10px; color: var(--text-muted); line-height: 1;
  transition: transform 0.15s;
}
.pm-section-collapsible:hover .pm-collapse-chevron { color: var(--text); border-color: var(--text-muted); }
.pm-collapse-hint {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  opacity: 0; transition: opacity 0.12s; text-transform: none; letter-spacing: 0;
}
.pm-section-collapsible:hover .pm-collapse-hint { opacity: 0.8; }
.compare-weekly-section {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 6px;
}
.compare-weekly-name {
  font-size: 12px; font-weight: 800; color: var(--text); margin-bottom: 6px;
}
@media (max-width: 600px) {
  .compare-weekly-section { grid-template-columns: 1fr; }
}

/* Player modal weekly trends */
#pmWeeklyTrendsWrap { margin-top: 14px; }
.pm-weekly-toggle {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card); color: var(--text-muted);
  font-size: 12px; font-weight: 700; cursor: pointer; text-align: left;
  transition: background 0.12s;
}
.pm-weekly-toggle:hover { background: var(--row, #f8fafc); color: var(--text); }
.pm-wt-grid { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.pm-wt-row { display: flex; align-items: center; gap: 12px; }
.pm-wt-label { flex: 0 0 64px; font-size: 11px; font-weight: 700; color: var(--text-muted); }
.pm-wt-stats { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pm-wt-last { font-size: 13px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.pm-wt-avg { font-size: 10px; color: var(--text-muted); }
.pm-wt-delta { font-size: 10px; font-weight: 700; }

/* ── Rivalry Tracker ─────────────────────────────────────────────────────── */
.rivalry-card { margin-top: 20px; }

.rivalry-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.rivalry-select {
  flex: 1; min-width: 160px; max-width: 240px;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); font-size: 13px; cursor: pointer;
}
.rivalry-vs {
  font-size: 11px; font-weight: 800; color: var(--text-muted);
  letter-spacing: 0.1em; flex-shrink: 0;
}
.rivalry-go-btn {
  padding: 8px 20px; border: none; border-radius: 8px; cursor: pointer;
  background: #1e293b; color: #fff;
  font-size: 13px; font-weight: 700;
  transition: background 0.15s;
}
.rivalry-go-btn:hover:not(:disabled) { background: #334155; }
.rivalry-go-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.rivalry-empty {
  text-align: center; padding: 32px 24px; color: var(--text-muted); font-size: 13px;
}

/* Score banner - 3-column grid: side A | divider | side B */
.rivalry-banner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  background: var(--bg, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
}
.rivalry-side {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 22px 16px; gap: 6px;
  min-width: 0;
}
.rivalry-side--leader { background: rgba(16,185,129,.07); }
.rivalry-name {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.rivalry-wins {
  font-size: 44px; font-weight: 900; line-height: 1;
  color: var(--text);
}
.rivalry-wins--lead { color: #10b981; }
.rivalry-divider {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px 18px; gap: 4px; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}
.rivalry-divider-label {
  font-size: 9px; font-weight: 800; color: var(--text-muted);
  letter-spacing: .14em; text-transform: uppercase;
}
.rivalry-divider-dash {
  font-size: 20px; font-weight: 300; color: var(--border); line-height: 1;
}

/* Win-rate bar */
.rivalry-bar-wrap {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}
.rivalry-bar-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap;
  min-width: 36px;
}
.rivalry-bar-label--right { text-align: right; }
.rivalry-bar-track {
  flex: 1; height: 6px; background: var(--border);
  border-radius: 99px; overflow: hidden;
}
.rivalry-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.5s ease;
}

/* Stat chips */
.rivalry-chips {
  display: flex; flex-wrap: wrap; gap: 7px; justify-content: center;
  margin-bottom: 20px;
}
.rivalry-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px;
  background: var(--bg, #f8fafc);
  white-space: nowrap;
}
/* Neutral chip icons - desaturate to match muted text tone */
.rivalry-chip i { flex-shrink: 0; width: 11px; height: 11px; }
.rivalry-chip-icon {
  filter: brightness(0) invert(0.5) !important;
}
.rivalry-chip-streak {
  color: #d97706; border-color: rgba(217,119,6,.3);
  background: rgba(245,158,11,.07);
}
.rivalry-chip-blowout {
  color: #6366f1; border-color: rgba(99,102,241,.3);
  background: rgba(99,102,241,.05);
}

.rivalry-ties {
  text-align: center; font-size: 11px; color: var(--text-muted);
  margin: -10px 0 14px;
}

/* Matchup table */
.rivalry-table-wrap {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.rivalry-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.rivalry-table thead { background: var(--bg, #f8fafc); }
.rivalry-table th {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); text-align: left; padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}
.rivalry-table td {
  padding: 9px 14px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.rivalry-table tbody tr:last-child td { border-bottom: none; }
.rivalry-table tbody tr:hover { background: var(--hover-bg, rgba(0,0,0,.025)); }
.rivalry-table .rivalry-w {
  font-weight: 800; color: #10b981;
}
.rivalry-table-footer {
  text-align: center; font-size: 11px; color: var(--text-muted);
  padding: 8px 0 2px;
}

@media (max-width: 600px) {
  .rivalry-controls { flex-direction: column; align-items: stretch; }
  .rivalry-select { max-width: none; }
  .rivalry-wins { font-size: 34px; }
  .rivalry-side { padding: 16px 10px; }
}

/* Weekly movement arrows (power rankings) */
.pr-move {
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.2px;
}
.pr-move-up   { color: #10b981; }
.pr-move-down { color: #ef4444; }
.pr-move-flat { color: var(--text-muted); opacity: 0.6; }
.podium .podium-header h3 .pr-move { font-size: 11px; vertical-align: 2px; margin-left: 2px; }

.rank-item > .avatar {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.rank-item .name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-item .bar {
  flex: 0 0 84px;
  height: 3px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
}

.rank-item .bar > div {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  opacity: 0.75;
}

.rank-item .rec {
  flex: 0 0 auto;
  min-width: 32px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
}


/* ============================================
   MATCHUPS & SCHEDULE
   ============================================ */
#mTrack, .matchup-carousel .m-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 16px;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  scroll-snap-type: x mandatory;
  flex-wrap: nowrap;
}

.bracket {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 100%;
  overflow-x: auto;
  color: var(--accent);
  background-color: var(--card);
  border-radius: 14px;
  padding: 12px 14px 14px;
}


.bracket-match {
  position: relative;
  width: 210px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  padding: 10px 12px;
  margin: 5px 0;
  transition: border-color .15s;
}
.bracket-match:hover { border-color: var(--accent-soft, #94a3b8); }

.bracket-match .match-id {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.bracket-round {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bracket-round .round-title {
  padding-right: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.m-slide, .matchup-carousel .m-slide {
  flex: 0 0 100%;
  box-sizing: border-box;
  scroll-snap-align: start;
  margin: 0;
}

.matchup-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--card);
  width: 822px;
  max-width: 100%;
  height: 480px;
}

.matchup-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.matchup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matchup-row {
  display: grid;
  grid-template-columns: 1.5fr auto 1.5fr auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.matchups-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(2px);
  z-index: 5;
  pointer-events: none;
}

.matchups-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.matchups-loading-text {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e5e7eb;
}

.matchups-loading.hidden {
  display: none;
}

.matchups-shell {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.matchups-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.3);
  border-top-color: var(--spinner);
  animation: matchups-spin 0.8s linear infinite;
}

.round-1 .bracket-body, .round-2 .bracket-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 420px;
}

.round-3 .bracket-body {
  display: flex;
  justify-content: center;
}

/* ============================================
   GRAPHS & VISUALIZATIONS
   ============================================ */
.graph-body {
  padding: 0.75rem 0.75rem 0.5rem;
  overflow: visible;
}

.graph-body .js-plotly-plot {
  width: 100% !important;
  max-width: 100%;
}

/* ============================================
   ACTIVITY FEED
   ============================================ */
.activity-empty {
  color: var(--text-muted);
  font-size: 14px;
}

.activity-filter {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 10px;
  flex-wrap: wrap;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-list .time {
  color: var(--text-muted);
  font-size: 12px;
  min-width: 100px;
}

.activity-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.activity-list li:last-child {
  border-bottom: none;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

/* ============================================
   UTILITIES & HELPERS
   ============================================ */
.age-badge {
  background: #334155;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 1px 6px rgba(0, 0, 0, 0.15);
}

.avatar.sm {
  width: 24px;
  height: 24px;
}

.badge {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid var(--grid);
  padding: 2px 8px;
  font-size: 11px;
}

.delta-down {
  color: #e05656;
}

.delta-flat {
  color: #9ca3af;
}

.delta-up {
  color: #31c36b;
}

.error-message {
  margin-top: 8px;
  font-size: 13px;
  color: #fecaca;
}

.home-card .error-message {
  margin-top: 8px;
  font-size: 13px;
  color: #fecaca;
}

.m-av { box-shadow: none; }

.podium .podium-header .avatar {
  width: 32px;
  height: 32px;
}

/* ============================================
   MISC COMPONENTS
   ============================================ */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 0;
}

.faq-item p {
  margin-top: 6px;
  font-size: 14px;
  color: #555;
}

.faq-item summary {
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.filter-pill:hover {
  background: #eff6ff;
}

.footer {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.footer-brand, .footer-tagline, .site-footer-note {
  color: #ffffff;
}

.gm-memo-text {
  line-height: 1.55;
  font-size: 0.97rem;
}

.injury-overview .scroll-box {
  flex: 1;
  min-height: 605px;
  overflow-y: auto;
  padding-right: 6px;
}

.scroll-box {
  max-height: 420px;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.scroll-box::-webkit-scrollbar {
  width: 8px;
}

.scroll-box::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 999px;
}

.scroll-box::-webkit-scrollbar-track {
  background-color: var(--card-soft);
}

/* ============================================
   OTHER STYLES
   ============================================ */
.stats-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#stats {
  min-width: 720px;
}

.adsbygoogle {
  margin: 20px auto;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.adsbygoogle responsive {
  display: block;
  margin: 10px auto;
  max-width: 728px;
  height: 90px;
}

.ai {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--card);
}

.ai-player {
  font-weight: 700;
}

.ai-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ai-team {
  color: var(--text-muted);
}

.fair-bar {
  margin-top: 14px;
  height: 16px;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  background: #1e293b;
}

.hg-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.hg-name {
  font-size: 14px;
  font-weight: 600;
}

.hg-score {
  font-size: 15px;
  font-weight: 700;
}

.hg-team {
  display: flex;
  align-items: center;
  gap: 8px;
}

.highlight-box {
  margin-top: 20px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid #d8e0ea;
  font-size: 14px;
  color: var(--text);
}

.highlight-game-card {
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.highlight-game-card .hg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hg-margin {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

/* Weekly highlights sidebar cards */
.whl-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.whl-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.whl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 0;
}

.whl-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  min-width: 0;
}

.whl-name:hover { color: var(--accent); }

.whl-pts {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.whl-winner .whl-pts { color: var(--accent); }

.whl-loser .whl-name,
.whl-loser .whl-pts {
  color: var(--text-muted);
  font-weight: 500;
}

.whl-margin {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}

.home-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}

.home-bullets li::before {
  content: "•";
  color: #38bdf8;
  font-weight: 700;
  margin-right: 6px;
}

.home-card {
  background: #122d4b;
  padding: 22px 24px 20px;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
  min-width: 320px;
  max-width: 380px;
  color: #e5e7eb;
}

/* "Continue as X" returning-user CTA banner */
.saved-viewer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.saved-viewer-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.saved-viewer-label {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.saved-viewer-btn {
  display: inline-block;
  background: #38bdf8;
  color: #0f172a !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  border-radius: 6px;
  padding: 6px 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
}

.saved-viewer-btn:hover {
  background: #7dd3fc;
}

/* dismiss button - must override .home-card button { width: 100% } */
.saved-viewer-cta .saved-viewer-dismiss {
  width: auto !important;
  padding: 0 4px !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: #9ca3af;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.saved-viewer-cta .saved-viewer-dismiss:hover {
  color: #e5e7eb;
}

.home-card button {
  width: 100%;
  padding: 9px 10px;
}

.home-card label {
  display: flex;
  font-size: 13px;
  margin-bottom: 4px;
  color: #9ca3af;
}

.home-card-title {
  font-size: 18px;
  margin: 0 0 12px;
  color: #f9fafb;
}

.platform-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.home-card .platform-btn {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: auto;
  flex: none;
}

.home-card .platform-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #d1d5db;
}

.home-card .platform-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.home-card .platform-btn img {
  display: none;
}

.espn-divider {
  text-align: center;
  margin: 12px 0;
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
}

.espn-divider::before,
.espn-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.espn-divider::before {
  left: 0;
}

.espn-divider::after {
  right: 0;
}

.home-feature-card {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.3);
  transition: all 0.2s ease;
}

.home-feature-card:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.home-feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
  line-height: 1;
}

.home-feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.home-feature-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-feature-list-card {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.home-features-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}

.home-features-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-features-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
}

.home-feature-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(99,102,241,.15);
  color: #6366f1;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.home-feature-badge-pro {
  background: linear-gradient(135deg, rgba(245,158,11,.2), rgba(234,88,12,.2));
  color: #f59e0b;
}

.home-feature-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.hfp-chip {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 20px;
  border: 1px solid transparent;
}

.hfp-sleeper {
  background: rgba(99,102,241,.1);
  color: #818cf8;
  border-color: rgba(99,102,241,.2);
}

.hfp-espn {
  background: rgba(239,68,68,.1);
  color: #f87171;
  border-color: rgba(239,68,68,.2);
}

.hfp-yahoo {
  background: rgba(139,92,246,.1);
  color: #a78bfa;
  border-color: rgba(139,92,246,.2);
}

.home-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.home-feature-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.home-feature-row:hover {
  background: var(--card-soft);
}

.home-feature-row-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-feature-row-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-feature-row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.home-feature-row-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.home-updates {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.home-updates-header {
  text-align: center;
}

.home-updates-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px 0;
}

.home-updates-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

.home-updates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-update-card {
  background: var(--card-soft);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.home-update-card:hover {
  background: var(--card);
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.home-update-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.home-update-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px 0;
}

.home-update-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.home-hero-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-hero-right {
  display: flex;
  justify-content: flex-end;
}

.home-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.home-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
}

/* Home content wrapper: main content + sidebar */
.home-content-wrapper {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.home-feature-grid {
  flex: 1;
  min-width: 0;
}

/* Updates sidebar */
.home-updates-sidebar {
  flex: 0 0 300px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  max-height: 608px;
  display: flex;
  flex-direction: column;
}

.home-updates-sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px 0;
  flex-shrink: 0;
}

.home-updates-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
}

.home-update-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  transition: all 0.15s ease;
}

.home-update-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.home-update-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.home-update-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.home-update-tag.update-tag-feature {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.home-update-tag.update-tag-improvement {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.home-update-tag.update-tag-new {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}

.home-update-date {
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 500;
}

.home-update-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.home-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-bullets li {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.home-bullets strong {
  color: var(--text);
  font-weight: 600;
}

.home-title {
  font-size: 32px;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.03em;
  text-align: left;
  margin: 0;
}

.home-title::after {
  display: none;
}

/* ── Injury accordion ──────────────────────────────────────────────────── */
.injury-overview {
  display: flex;
  flex-direction: column;
}

.inj-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inj-acc {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
}

.inj-acc summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.inj-acc summary::-webkit-details-marker { display: none; }
.inj-acc[open] summary {
  border-bottom: 1px solid var(--border);
}

.inj-team {
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
}

.inj-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
}
.inj-badge-ir   { background:#fee2e2; color:#991b1b; }
.inj-badge-out  { background:#fecaca; color:#b91c1c; }
.inj-badge-dbt  { background:#ffedd5; color:#c2410c; }
.inj-badge-q    { background:#fef9c3; color:#854d0e; }
.inj-badge-note { background:#f1f5f9; color:#64748b; }

.inj-body {
  padding: 4px 14px 10px;
}

.inj-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.inj-row:first-child { border-top: none; }

.inj-left { flex: 1; min-width: 0; }

.inj-pname {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.inj-pname:hover { text-decoration: underline; }

.inj-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.inj-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.inj-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.inj-chip-ir           { background:#fee2e2; color:#991b1b; }
.inj-chip-out          { background:#fecaca; color:#b91c1c; }
.inj-chip-doubtful     { background:#ffedd5; color:#c2410c; }
.inj-chip-questionable { background:#fef9c3; color:#854d0e; }
.inj-chip-note         { background:#f1f5f9; color:#64748b; }

.inj-upd {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.io {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.io.add {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.io.drop {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.left.loss {
  background: linear-gradient(90deg, #ef4444, #f472b6);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.legend-label {
  font-size: 13px;
  color: #374151;
}

.legend-row {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #eef2f7;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid #d4dce3;
}

.link-pill:hover {
  background: #e2e8f0;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 999px;
  background: #ef4444;
  animation: liveBlink 1.5s infinite;
}

.m-body {
  display: grid;
  gap: 12px;
  padding: 6px 0 4px;
}

.m-btn {
  border: 1px solid var(--border);
  background: var(--card-soft);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.m-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.m-carousel {
  position: relative;
  overflow: hidden;
}

.m-combo {
  display: grid;
  grid-auto-rows: minmax(30px, auto);
  row-gap: 6px;
}

.m-head {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: var(--card-soft);
  border-radius: 10px;
  margin-bottom: 12px;
}

.m-margin {
  text-align: right;
  font-weight: 700;
}

.m-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.m-row {
  display: grid;
  grid-template-columns: 1.1fr .5fr 60px 60px .5fr 1.1fr;
  align-items: center;
  column-gap: 10px;
  padding: 0 6px;
  border-bottom: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-soft);
  margin-bottom: 2px;
  transition: background 0.2s ease;
}

.m-score {
  color: var(--text-muted);
}

/* ── Matchup header ──────────────────────────────────────── */

/* Three-column row: [team col] [scoreboard] [team col] */
.m-head-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Left and right team columns */
.m-team-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.m-col-right {
  align-items: flex-end;
  text-align: right;
}

.m-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-bottom: 2px;
}

/* Central scoreboard */
.m-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
}

.m-scoreboard.has-proj {
  align-items: flex-start;
}

.m-score-val {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.m-scoreboard .num {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.m-scoreboard .proj {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.5;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.m-scoreboard .m-proj-only {
  opacity: 0.55;
}

.m-team-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: break-word;
}

.m-team-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-team-name.loser { color: var(--text-muted); }

/* Legacy selectors kept for other pages */
.m-team { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.m-team-right { justify-content: flex-end; }
.m-team-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.m-right { text-align: right; }

.m-team-name.winner {
  font-weight: 700;
}

.m-vs {
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.m-scoreboard.has-proj .m-vs {
  margin-top: 6px;
}

.m-win-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 10px;
}
.m-wp-pct {
  font-size: 11px;
  font-weight: 800;
  min-width: 30px;
  letter-spacing: 0.02em;
}
.m-wp-track {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.m-wp-fill {
  height: 5px;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.manager-pill {
  padding: 6px 10px;
  background: var(--row);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.manager-pill.active {
  background: var(--accent);
  color: #ffffff;
}

.manager-pill:hover {
  background: var(--accent);
  color: white;
}

.manager-pills-carousel {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.manager-pills-row {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
}

.manager-pills-row::-webkit-scrollbar {
  display: none;
}

.mini-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
}

.mini-stat {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.mini-team {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.mini-value {
  text-align: right;
}

.more {
  color: #22c55e;
}

.mu-bar {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}

.mu-bar .left, .left.win {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.mu-bar .right, .right.win {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.mu-card {
  border-radius: 16px;
  padding: 9px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  background: var(--card);
}

.mu-chip {
  display: inline-grid;
  place-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #0b1220;
  border: 1px solid var(--grid);
  color: #93c5fd;
}

.mu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mu-head .title {
  font-weight: 800;
}

.mu-name {
  font-weight: 700;
  white-space: nowrap;
  max-width: 70%;
  color: var(--accent);
}

.mu-row {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: center;
  gap: 10px;
}

.mu-score {
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 800;
}

.mu-sub {
  color: var(--text-subtle);
  font-size: 12px;
  margin-top: 2px;
}

.mu-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
}

.mu-team.loss .mu-score {
  color: var(--loss);
}

.mu-team.win .mu-score {
  color: var(--win);
}

.mu-vs {
  justify-self: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--text-subtle);
}

.mu-wrap {
  display: grid;
  gap: 14px;
}

.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.num-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.num.mid {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 68px;
  white-space: nowrap;
}

.num.proj, .proj {
  opacity: 0.45;
}

.overview-sidebar {
  flex: 0 0 280px;
}

.standings-shares-card {
  margin-top: 20px;
}
.standings-shares-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.overview-sidebar, .overview-sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.overview-sidebar-left {
  flex: 0 0 280px;
  align-self: flex-start;
}

.overview-sidebar > .card:last-child,
.overview-sidebar-left > .card:last-child {
  flex: 1;
  overflow-y: auto;
}

.p {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  min-width: 0;
  overflow: hidden;
}

.p .pname {
  font-weight: 600;
  color: var(--accent);
}

.p .slot {
  font-weight: 700;
  color: var(--accent);
  min-width: 28px;
  text-align: center;
}

.p.left {
  text-align: left;
}

.p.right {
  text-align: right;
}

git ad.page-sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 95px;
  height: fit-content;
}


.picks-list .pick-row {
  background: var(--row);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.pill-arrow {
  border: none;
  background: var(--bg-alt);
  color: var(--text);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding: 0;
}

.pill-arrow:hover {
  background: var(--accent);
}

.pill-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.player, .player-activity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.player-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0e1629;
  border: 1px solid #1f2937;
  padding: 10px 14px;
  border-radius: 10px;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-value {
  font-weight: 700;
  color: #ffffff;
  margin-left: 20px;
  min-width: 60px;
  text-align: right;
}

.plist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pname {
  font-weight: 700;
  font-size: 15px;
}

.empty {
    display: flex;
    text-align: center;
    justify-content: center;
    color: var(--text-subtle) !important;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.podium .slot {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: unset;
}

/* Top medal accent bar */
.podium .slot::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.podium .slot.first  { border-color: rgba(245, 194, 0, 0.45); box-shadow: 0 4px 18px rgba(245,194,0,0.10); }
.podium .slot.second { border-color: var(--border); }
.podium .slot.third  { border-color: rgba(234, 88, 12, 0.3);  box-shadow: 0 4px 18px rgba(234,88,12,0.08); }

.podium .slot.first::before  { background: #f5c200; }
.podium .slot.second::before { background: #9ca3af; }
.podium .slot.third::before  { background: #f97316; }

.podium .slot .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 16px 14px 13px;
}

.podium .podium-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.podium .podium-header h3 {
  font-size: 26px !important;
  margin: 0;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}
.podium .slot.first  .podium-header h3 { color: #c89b00; }
.podium .slot.second .podium-header h3 { color: #8b96a4; }
.podium .slot.third  .podium-header h3 { color: #e06630; }

.podium .podium-header .avatar {
  flex-shrink: 0;
}

.podium .slot .name {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
  overflow-wrap: anywhere;
  margin-top: 0;
  line-height: 1.3;
}

.podium .slot .rec {
  color: var(--text-muted);
  margin-top: 2px;
  font-size: 12px;
}

.podium .bar {
  height: 4px;
  margin: 10px 0 8px;
  background: var(--bg-alt);
  border: none;
  border-radius: 999px;
  overflow: hidden;
}

.podium .bar > div {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.podium .chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 2px;
}

.podium .chips .chip {
  background: transparent;
  border: none;
  padding: 0;
  margin-right: 10px;
  font-size: 12px;
  color: var(--text-muted);
  box-shadow: none;
  font-weight: 500;
  border-radius: 0;
}

.podium .chips .chip:last-child { margin-right: 0; }
.podium .chips .chip + .chip { position: relative; }
.podium .chips .chip + .chip::before {
  content: '·';
  position: absolute;
  left: -7px;
  color: var(--border);
}

.podium .chips .chip.diff-pos { color: #16a34a; font-weight: 700; }
.podium .chips .chip.diff-neg { color: #dc2626; font-weight: 700; }

/* Dark mode */
html[data-theme="dark"] .podium .slot.first {
  border-color: rgba(202, 154, 0, 0.35);
  box-shadow: 0 4px 18px rgba(202,154,0,0.10);
}
html[data-theme="dark"] .podium .slot.third {
  border-color: rgba(180, 83, 9, 0.3);
  box-shadow: 0 4px 18px rgba(180,83,9,0.10);
}
html[data-theme="dark"] .podium .bar {
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .podium .chips .chip.diff-pos { color: #4ade80; }
html[data-theme="dark"] .podium .chips .chip.diff-neg { color: #f87171; }
html[data-theme="dark"] .rank-item .chips .chip.diff-pos { color: #4ade80; }
html[data-theme="dark"] .rank-item .chips .chip.diff-neg { color: #f87171; }

@media (max-width: 768px) {
  .podium .slot .wrap { padding: 12px 10px 10px; }
  .podium .podium-header h3 { font-size: 18px !important; }
  .podium .slot .name { font-size: 13px; }
}

.pos-badge {
  height: 25px;
  width: 36px;
  padding: 1px 6px;
  text-align: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  align-content: center;
}

.pos-badge.IDP, .pos-badge.DEF {
  background: #475569;
}

.pos-badge.K {
  background: #c92c68;
}

.pos-badge.QB {
  background: #3b82f6;
}

.pos-badge.RB {
  background: #22c55e;
}

.pos-badge.TE {
  background: #8b5cf6;
}

.pos-badge.WR {
  background: #f59e0b;
}

.pos-bar-inner {
  height: 100%;
  border-radius: 999px;
  background: #22c55e;
}

.pos-bar-outer {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.pos-detail-inner {
  display: flex;
  flex-direction: column;
  row-gap: 5px;
}

.pos-name {
  text-align: left;
}

.pos-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.pos-row-toggle {
  display: inline-block;
  transition: transform 0.15s ease;
}

.pos-row.pos-strongest {
  background: var(--strongest);
}

.pos-row.pos-weakest {
  background: var(--weakest);
}

.pos-row.pos-weakest .pos-bar-inner {
  background: #f97373;
}

.pos-row:hover {
  background: rgba(18, 45, 75, 0.04);
}

.proj {
  font-family: 'Varsity Team', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pts {
  justify-self: end;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 14px;
  color: var(--accent);
  white-space: nowrap;
  padding-left: 4px;
}

.radar-selectors {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.radar-selectors label {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
}

.radar-selectors select {
  margin-top: 2px;
  min-width: 120px;
}

.refresh-spinner {
  display: inline-block;
  animation: refresh-spin 0.9s linear infinite;
}

.remove-btn {
  background: #475569;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 12px;
}

.right.loss {
  background: linear-gradient(90deg, #f472b6, #ef4444);
}

.round-2 .round-body {
  display: flex;
  flex-direction: column;
  row-gap: 105px;
}

.row {
  margin-bottom: 12px;
}

.side-card {
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  background: var(--card-soft);
  border-radius: 10px;
  border: 1px solid var(--border);
  min-width: 0;
}

.side-card h2, .side-card h3, .side-header, .side-body {
  text-align: left;
}

.side-card h3 {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 2px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.side-header {
  display: grid;
  gap: 14px;
  background: var(--card-soft);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.side-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  border-top: 1px solid var(--border);
}

.side-row:first-child {
  border-top: none;
  padding-top: 6px;
}

.side-card h3 + .side-row {
  border-top: none;
  padding-top: 6px;
}

.site-footer {
  margin-top: 24px;
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(15, 23, 42, 0.6);
  background: #122d4b;
  color: #ffffff;
  font-size: 12px;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 2fr);
  gap: 8px 24px;
  align-items: flex-start;
}

.site-footer-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}

.site-footer-links a {
  color: #38bdf8;
  text-decoration: none;
}

.site-footer-links a:hover {
  text-decoration: underline;
}

.site-footer-note {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.sorted-asc::after {
  content: " ▲";
  color: var(--accent);
}

.sorted-desc::after {
  content: "▼";
  color: var(--accent);
}

.sorted-secondary {
  color: var(--accent);
  opacity: 0.6;
}

.starters h4 {
  margin: 6px 0;
  font-size: 13px;
  color: var(--text);
}

.contact-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.contact-social-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.contact-social-pill img {
  filter: brightness(0) saturate(100%) invert(15%) sepia(45%) saturate(625%) hue-rotate(200deg) brightness(95%) contrast(90%);
}
html[data-theme="dark"] .contact-social-pill img {
  filter: brightness(0) saturate(100%) invert(82%) sepia(23%) saturate(1585%) hue-rotate(178deg) brightness(103%) contrast(88%);
}

.static-card-page {
  background: var(--card);
  border-radius: 16px;
  padding: 32px 36px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.static-hero-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.static-hero-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.static-page {
  max-width: 960px;
  margin: 32px auto;
  padding: 0 16px;
}

.static-section {
  margin: 24px 0;
  padding: 20px;
  border-radius: 14px;
  background: var(--card-soft);
  border: 1px solid #e5e7eb;
}

.static-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.streak-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

.streak-pill.l {
  background: rgba(44, 166, 173, 0.12);
  color: #2563eb;
}

.streak-pill.w {
  background: rgba(248, 113, 113, 0.12);
  color: #dc2626;
}

.subtle-label {
  font-size: 12px;
  opacity: .75;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}

.team-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--accent);
  flex-shrink: 0;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.team-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.team-name {
  font-weight: 800;
}

.team-panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  visibility: hidden;
  pointer-events: none;
}

.team-panel.active {
  visibility: visible;
  pointer-events: auto;
}

.team-panels {
  display: grid;
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scrollbar-width: thin;
  padding-right: 2px;
}

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 0;
}

.team-row .team-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.team-row .team-text {
  min-width: 0;
  flex: 1;
}

.team-row .team-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.team-row.bye .team-name {
  text-transform: uppercase;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

.team-row.top {
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 1px;
}

.team-score {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  flex-shrink: 0;
}

.bracket-match .team-avatar {
  width: 22px;
  height: 22px;
  background: var(--card-soft);
}

.team-section {
  margin-bottom: 16px;
}

.team-section-title {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.team-text {
  display: flex;
  flex-direction: column;
}

.teams-sort-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.teams-sort-btn {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.teams-sort-btn:hover { background: var(--surface2); color: var(--text); }
.teams-sort-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
}

.team-strength-card {
  min-width: 0;
  overflow: hidden;
}

.team-strength-card .card-header-row {
  flex-wrap: nowrap;
}

.team-strength-card .card-header-row > div:first-child {
  min-width: 0;
  flex: 1;
}

.team-strength-card .card-header-row h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.team-strength-card .card-body {
  min-width: 0;
}

.team-strength-card .pos-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pos-bar-cell {
  width: 100px;
  min-width: 60px;
}

.pos-rank {
  white-space: nowrap;
  text-align: right;
}

.pos-age {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.tick-head {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #ffffff;
  padding: 4px 8px;
  border: 1px solid var(--grid);
  border-radius: 8px;
  white-space: nowrap;
  background: var(--accent);
}

.tick-item {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  padding: 4px 0;
  color: var(--accent);
}

.tick-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tick-track {
  display: flex;
  gap: 22px;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: tick-scroll 28s linear infinite;
}

.tick-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tick-viewport {
  overflow: hidden;
  position: relative;
  height: 28px;
}

.tick-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--grid);
  border-radius: 12px;
  padding: 6px 10px;
  margin-bottom: 12px;
}

.ticker {
  overflow: hidden;
  white-space: nowrap;
  grid-column: 1 / -1;
  display: flex;
}

.ticker-list li {
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.ticker-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.ticker:hover .tick-track {
  animation-play-state: paused;
}

.total-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
}

.trend-delta {
  margin-top: 2px;
  font-size: 0.84rem;
}

.trend-empty {
  opacity: 0.7;
  font-size: 0.92rem;
}

.trend-meta {
  margin-top: 2px;
  font-size: 0.82rem;
  opacity: 0.7;
}

.trend-name {
  font-weight: 600;
  line-height: 1.2;
}

.trend-new {
  font-weight: 700;
}

.trend-panel {
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
  min-width: 0;
}

.trend-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.trend-panel-header h3 {
  margin: 0;
  font-size: 1rem;
}

.trend-panel-header span {
  font-size: 0.8rem;
  opacity: 0.65;
  text-align: right;
}

.trend-player {
  flex: 1 1 auto;
}

.trend-player, .trend-values {
  min-width: 0;
}

.trend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.trend-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.trend-values {
  flex: 0 0 auto;
  text-align: right;
}

.trends-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.trends-subtitle {
  font-size: 0.92rem;
  opacity: 0.72;
}

/* ─── Transaction cards (trades + waivers) ───────────────────────────────── */
.tx {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-soft);
  padding: 10px;
}


.verdict-text {
  text-align: center;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
}

.viewer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.week-main-panel, .week-side-panel {
  display: none;
}

.week-main-panel.active, .week-side-panel.active {
  display: block;
}

.who {
  min-width: 0;
  overflow: hidden;
}

.who .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who .sub {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  margin-bottom: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
  z-index: 1000;
  pointer-events: none;
  margin-bottom: -1px;
}

/* Trend pill tooltip - appears below, styled to match modal */
.pm-trend-pill {
  position: relative;
}
.pm-trend-pill::after {
  content: attr(data-trend-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 2000;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.pm-trend-pill:hover::after {
  opacity: 1;
}
.pm-trend-pill::before {
  content: '';
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--border);
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.pm-trend-pill:hover::before {
  opacity: 1;
}

img, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* ============================================
   MEDIA QUERIES & RESPONSIVE
   ============================================ */
@media (max-width: 1600px) {
  :root { --page-scale: 0.94; }
}

@media (max-width: 1400px) {
  :root { --page-scale: 0.88; }
}

@media (max-width: 1200px) {
  :root { --page-scale: 0.82; }
}

@media (max-width: 1000px) {
  :root { --page-scale: 0.76; }
}

@media (max-width: 860px) {
  :root { --page-scale: 1; }
}

@media (min-width: 1400px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1180px) {
  .page-layout,
  .overview-layout,
  .overview-main.overview-main-two-col {
    grid-template-columns: 1fr;
    display: grid;
  }

  .overview-layout {
    gap: 12px;
  }

  .overview-sidebar,
  .overview-sidebar-left,
  .page-sidebar {
    position: static;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Mobile sidebar: float above main content as a collapsible drawer */
  .page-layout .page-sidebar {
    order: -1;
  }

}

/* Shared mobile sidebar toggle styles - active at both breakpoints */
@media (max-width: 1200px) {
  .otc-layout .otc-side {
    order: -1;
  }
}
@media (max-width: 1200px) {
  .page-sidebar-toggle,
  .otc-side-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    user-select: none;
    width: 100%;
    background: var(--bg);
  }
  .page-sidebar-toggle .sidebar-toggle-icon,
  .otc-side-toggle .sidebar-toggle-icon {
    transition: transform 0.2s;
    font-size: 11px;
    color: var(--text-muted);
  }
  .page-sidebar-toggle.open .sidebar-toggle-icon,
  .otc-side-toggle.open .sidebar-toggle-icon {
    transform: rotate(180deg);
  }
  .page-sidebar-body,
  .otc-side-body {
    overflow: hidden;
    overflow-x: hidden;
    max-width: 100%;
    transition: max-height 0.3s ease;
    max-height: 0;
  }
  .page-sidebar-body.open,
  .otc-side-body.open {
    max-height: 4000px;
  }
}

@media (max-width: 960px) {
  .main-two-col,
  .graphs-page,
  .standings-main.two-col-standings,
  .power-two-col,
  .activity-page .activity-main,
  .card.recap-equal,
  .sidebar-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .podium {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .teams-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tick-track {
    animation: none;
  }
}

@media (max-width: 900px) {
  .m-row {
    grid-template-columns: 1fr 44px 44px 1fr;
    column-gap: 6px;
  }
  /* collapse the stat-stack children so they don't wrap to a second row;
     !important overrides any inline style="display:grid" on stat-stack divs */
  .m-row > :nth-child(2),
  .m-row > :nth-child(5) {
    display: none !important;
  }
}

/* Stats injected inline into player cells - only shown on mobile where
   the stat-stack columns are hidden. */
.m-cell-stats { display: none; }
@media (max-width: 900px) {
  .m-cell-stats {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
  }
}

/* Weekly hub desktop: give the matchup column 2/3 of page-main so the full
   6-column stat-stack layout fits. Scoped to min-width:961px so the normal
   960px two-col collapse still fires on tablet/mobile. */
@media (min-width: 961px) {
  .weekly-hub .standings-main.two-col-standings {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
  .weekly-hub .matchups-shell .m-row { column-gap: 6px; }
  .weekly-hub .matchups-shell .p .meta { font-size: 11px; }
}

@media (max-width: 640px) {
  /* ── Matchup carousel header ─────────────────────────── */
  .m-nav h2 { font-size: 15px; }
  .m-btn { padding: 4px 8px; font-size: 12px; }

  /* Wider card on mobile */
  .card.matchup-carousel { padding: 8px; }
  .m-head { padding: 8px 10px; }
  .m-head-row { gap: 8px; }
  .m-av { width: 28px; height: 28px; margin-bottom: 1px; }
  .m-scoreboard { gap: 6px; }
  .m-scoreboard .num { font-size: 22px; }
  .m-scoreboard .proj { font-size: 10px; }
  .m-scoreboard.has-proj .m-vs { margin-top: 3px; }
  .m-vs { font-size: 10px; letter-spacing: 0; }
  .m-team-name { font-size: 12px; }
  .m-team-meta { font-size: 10px; }

  /* ── Player rows ─────────────────────────────────────── */
  .m-row {
    grid-template-columns: 1fr 30px 30px 1fr;
    column-gap: 2px;
    padding: 0 2px;
  }
  .num.mid { min-width: 26px; font-size: 11px; }

  .m-combo .p { gap: 4px; padding: 3px 0; }
  .m-combo .pos-badge { font-size: 9px; padding: 1px 2px; flex-shrink: 0; width: 26px; height: 20px; }
  .m-combo .meta { font-size: 10px; line-height: 1.25; }
  .m-combo .pname { font-size: 12px; }
}

@media (max-width: 400px) {
  .m-av { width: 24px; height: 24px; }
  .m-head { padding: 8px 6px; }
  .m-head-row { gap: 6px; }
  .m-scoreboard .num { font-size: 20px; }
}

@media (max-width: 720px) {
  .mu-row {
    grid-template-columns: 1fr 44px 1fr;
  }

  .mu-vs {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .mu-score {
    font-size: 18px;
  }
}

@media (max-width: 1200px) {
  .otc-layout {
    grid-template-columns: 1fr !important;
  }

  .otc-side-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .otc-builder-grid,
  .otc-summary-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero-right {
    justify-content: flex-start;
  }

  .home-content-wrapper {
    flex-direction: column;
  }

  .home-updates-sidebar {
    flex: 1 1 auto;
    max-width: 100%;
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .home-page {
    padding: 20px 16px 64px;
  }

  .home-feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .home-feature-list {
    grid-template-columns: 1fr;
  }

  .home-updates-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-card {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .home-feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-updates-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .card-collapse-toggle {
    display: block;
  }

  .otc-shell {
    padding: 14px;
  }

  .otc-page-head-controls {
    gap: 8px;
  }

  .otc-side-panel {
    padding: 14px;
  }

  .otc-side-title-row {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .otc-view-all-link {
    align-self: flex-end;
    font-size: 11px;
  }

  .otc-movers-panel .otc-mini-section {
    margin-bottom: 12px;
  }
}

@media (max-width: 1450px) {
  .os-layout {
    grid-template-columns: 300px minmax(0, 1fr) 300px;
  }
}

@media (min-width: 601px) and (max-width: 1180px) {
  .os-layout {
    grid-template-columns: 1fr 1fr;
  }

  .os-main-col {
    grid-column: 1 / -1;
    order: 1;
  }

  .os-left-col {
    order: 2;
  }

  .os-right-col {
    order: 3;
  }
}

@media (max-width: 600px) {
  .os-layout {
    grid-template-columns: 1fr;
  }

  .os-main-col {
    grid-column: 1;
    order: 1;
  }

  .os-left-col {
    order: 2;
  }

  .os-right-col {
    order: 3;
  }
}

@media (max-width: 1180px) {
  .os-layout {
    scroll-margin: 0;
    scroll-padding: 0;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .os-left-col {
    scroll-margin: 0;
    max-width: 100%;
  }

  .os-main-col {
    scroll-margin: 0;
    max-width: 100%;
  }

  .os-right-col {
    order: 3;
    scroll-margin: 0;
    max-width: 100%;
  }

  .os-hero-stats {
    grid-template-columns: 1fr;
  }

  .os-hero-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .os-hero-badge {
    align-self: flex-start;
  }

  .os-hero-card {
    scroll-margin: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }

  .os-hero-card * {
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 900px) {
  .trade-card .teams {
    grid-template-columns: 1fr;
  }

  .matchup-card {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .site-footer-links {
    justify-content: flex-start;
  }

  .top-nav {
    grid-template-columns: auto 1fr auto;
    padding: 8px 16px;
  }

  .nav-center {
    justify-content: flex-end;
  }

  .nav-pills-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding: 8px;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  }

  .nav-pills-container.nav-open {
    max-height: 70vh;
    opacity: 1;
    padding: 12px;
    overflow-y: auto;
  }

  .nav-pill {
    width: 100%;
    padding: 6px 12px;
    border-radius: 8px;
    text-align: center;
    justify-content: center;
    font-size: 14px;
  }

  .nav-pills-bottom {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border);
  }

  .nav-pills-bottom .league-switcher-wrapper {
    width: 100%;
  }

  .nav-pills-bottom .league-switcher {
    width: 100%;
  }

  .nav-pills-bottom .logout-btn {
    width: 100%;
    text-align: center;
  }

  /* Hide desktop utility icons except changelog and dark mode */
  .nav-utility-bar .logout-btn {
    display: none;
  }

  .utility-icon-btn {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 700px) {
  h1 {
    font-size: 30px;
    margin: 16px 0 24px;
  }

  .site-logo {
    width: 180px;
  }

  .static-card-page {
    padding: 22px 20px;
  }

  .tick-viewport {
    height: 32px;
  }
}

@media (max-width: 728px) {
  .ad-container {
    max-width: 100%;
    min-height: 70px;
    max-height: 80px;
  }

  .ad-container ins {
    max-width: 100%;
  }

  .adsbygoogle {
    margin: 10px auto;
  }
}

@media (max-width: 640px) {
  .adsbygoogle {
    margin: 15px auto;
  }
}

@media (max-width: 480px) {
  .overview-layout { margin: 4px; }

  .ad-container {
    min-height: 60px;
    max-height: 70px;
    margin: 8px auto;
    padding: 4px;
  }
  
  .adsbygoogle {
    margin: 10px auto;
  }

  .otc-shell {
    padding: 10px;
    border-radius: 14px;
  }

  .otc-page-title {
    font-size: 20px;
  }


  .otc-viewer-toggle {
    font-size: 12px;
    padding: 7px 10px;
  }

  .otc-info-btn {
    font-size: 16px;
    width: 28px;
    height: 28px;
  }

  .otc-team-card {
    padding: 10px;
  }

  .otc-team-title {
    font-size: 15px;
  }

  .otc-search-input {
    font-size: 13px;
    padding: 7px 9px;
  }

  .otc-side-panel {
    padding: 10px;
  }

  .otc-side-title {
    font-size: 14px;
  }

  .otc-mini-title {
    font-size: 13px;
  }

  .otc-values-item {
    padding: 7px 9px;
    font-size: 12px;
  }

  .otc-summary-card, .otc-ai-card {
    padding: 10px;
  }

  .otc-summary-title, .otc-ai-title {
    font-size: 15px;
  }

  .otc-stat-label {
    font-size: 10px;
  }

  .otc-stat-value {
    font-size: 16px;
  }

  .chip {
    padding: 3px 7px;
    font-size: 11px;
  }

  .chip-remove {
    width: 14px;
    height: 14px;
    font-size: 11px;
  }

  .otc-filter-chip {
    font-size: 11px;
    padding: 5px 10px;
  }

  .otc-search-dropdown {
    max-height: 280px;
    font-size: 13px;
  }

  .otc-dropdown-item {
    padding: 8px 10px;
  }

  .otc-balance-bar {
    height: 8px;
  }

  .trade-bar-indicator {
    width: 8px;
    height: 20px;
  }

  .otc-ai-empty-title {
    font-size: 14px;
  }

  .otc-ai-empty-sub {
    font-size: 12px;
  }

  /* Trade calc: tighten slot area and player chips */
  .otc-slot {
    padding: 10px 10px 12px;
    min-height: 0;
  }

  /* Restructure chip: name + [value ×] on top row, meta on bottom row */
  .otc-chip {
    padding: 7px 10px;
    column-gap: 0;
    row-gap: 2px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    align-items: start;
  }

  .otc-chip-main {
    grid-column: 1;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .otc-chip-value-wrap {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    gap: 4px;
    padding-left: 8px;
  }

  .otc-chip-remove {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    font-size: 17px;
    padding-left: 6px;
  }

  .otc-chip-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .otc-chip-meta {
    font-size: 11px;
    white-space: normal;
    line-height: 1.4;
  }

  .otc-chip-team {
    display: none;
  }

  .otc-tier-badge {
    font-size: 9px;
    padding: 1px 4px;
    vertical-align: middle;
  }

  .otc-chip-value {
    font-size: 13px;
  }

  .otc-chip-delta {
    font-size: 10px;
    padding: 2px 4px;
  }

  .player-chip-list,
  .otc-selected-list {
    margin-top: 8px;
    gap: 6px;
  }

  /* Dashboard team pills: show only active pill on mobile, centered */
  .manager-pills-row .manager-pill:not(.active) {
    display: none;
  }

  .manager-pills-row {
    justify-content: center;
  }
}

@media (max-width: 1180px) {
  .overview-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .overview-sidebar-left,
  .overview-main,
  .overview-sidebar {
    width: 100%;
    max-width: 100%;
  }

  .trends-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .top-nav {
    padding: 12px 14px;
  }

  .site-logo {
    max-height: 42px;
  }

  #page-root {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Player rankings page: use minimal side padding for max content width */
  #page-root:has([data-page="players"]) {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  [data-page="players"] .card.central {
    border-radius: 10px;
  }
  [data-page="players"] .overview-layout {
    margin-left: 0;
    margin-right: 0;
  }

  .card {
    padding: 14px;
    border-radius: 16px;
  }

  .podium {
    grid-template-columns: 1fr !important;
  }

  .podium .podium-header h3 {
    font-size: 20px;
  }

  .rank-item {
    padding: 8px 10px;
    gap: 7px;
  }
  .rank-item .bar { flex-basis: 48px; }
  .rank-item .chips .chip { font-size: 10.5px; margin-right: 7px; }

  .m-slide,
  .matchup-card,
  .matchup-carousel,
  .m-carousel {
    width: 100%;
    min-width: 0;
  }

  .tab-strip {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    padding-left: 0;
  }

  .tab-strip .tab-btn {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    text-align: center;
    padding-left: 6px;
    padding-right: 6px;
    font-size: 0.75rem;
  }

  #teamsAnalyticsTabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
    /* Fade right edge to hint at scrollable overflow */
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    padding-right: 20px;
  }
  #teamsAnalyticsTabs::-webkit-scrollbar {
    display: none;
  }
  #teamsAnalyticsTabs .tab-btn {
    flex: 0 0 auto;
    padding: 4px 8px;
    letter-spacing: 0;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .nav-pill {
    font-size: 0.8rem;
    padding: 6px 8px;
    min-height: 32px;
  }

  .refresh-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .changelog-bell-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
  }

  .changelog-dropdown {
    position: fixed;
    top: auto;
    bottom: 16px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    width: 300px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  }

  .changelog-bell-wrapper {
    position: static;
  }

  .otc-info-tooltip {
    left: auto;
    right: 0;
    max-width: calc(100vw - 32px);
    width: 300px;
  }

  .card {
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 8px;
  }

  .card h2 {
    font-size: 1rem;
  }

  .card h3 {
    font-size: 0.9rem;
  }

  .trend-panel {
    padding: 8px;
  }

  .trend-name {
    font-size: 0.85rem;
  }

  .trend-meta,
  .trend-delta,
  .trend-panel-header span {
    font-size: 0.75rem;
  }

  .site-footer-inner {
    display: grid;
    gap: 8px;
  }

  .site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mini-card {
    padding: 8px 10px 6px;
  }

  .chip {
    font-size: 10px;
    padding: 1px 4px;
  }

  .badge {
    font-size: 10px;
    padding: 1px 6px;
  }

  .button {
    font-size: 12px;
    padding: 6px 10px;
  }

  .search,
  select,
  input[type="text"],
  input[type="number"],
  input[type="email"] {
    padding: 6px 8px;
    font-size: 14px;
  }

  .site-logo {
    width: 180px;
  }

  .top-nav {
    padding: 6px 12px;
  }

  .toolbar {
    gap: 8px;
    margin: 8px 0 12px;
  }

  
  .teams-grid {
    gap: 12px;
  }

  .card.teams-card {
    padding: 12px;
    max-width: 100%;
    width: 100% !important;
  }

  .team-header {
    gap: 8px;
    margin-bottom: 8px;
  }

  .team-section {
    margin-bottom: 12px;
  }

  .team-section-title {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .player-row {
    padding: 4px 8px;
    font-size: 13px;
  }

  .team-meta {
    font-size: 12px;
  }

  .manager-pill {
    padding: 4px 8px;
    font-size: 12px;
  }

  .team-name {
    font-size: 13px;
  }

  .team-score {
    font-size: 12px;
  }

  .pos-strength-table {
    font-size: 12px;
  }

  .pos-strength-table th,
  .pos-strength-table td {
    padding: 3px;
  }

  .team-strength-card .card-header-row {
    padding-bottom: 4px;
  }

  .team-strength-card .card-header-row .mini-label {
    font-size: 10px;
  }

  .teams-sort-bar {
    gap: 4px;
  }

  .teams-sort-btn {
    flex: 1;
    text-align: center;
    padding: 4px 4px;
    font-size: 11px;
  }

  .activity-card {
    padding: 8px;
  }

  .activity-card h2 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .scroll-box {
    max-height: 350px;
    padding: 6px 8px;
  }

  .tx {
    padding: 8px;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .tx .meta {
    font-size: 11px;
    margin-bottom: 6px;
  }

  .trade-card .teams {
    gap: 8px;
  }

  .team-col {
    padding: 8px;
    border-radius: 10px;
  }

  .team-col header {
    gap: 8px;
    margin-bottom: 6px;
  }

  .team-name {
    font-size: 13px;
  }

  .avatar {
    width: 32px;
    height: 32px;
  }

  .player-activity {
    padding: 4px 6px;
    font-size: 12px;
    gap: 8px;
  }

  .player-activity .io {
    width: 16px;
    height: 16px;
    font-size: 11px;
  }

  .player-trade-value {
    font-size: 11px;
    margin-right: 8px;
  }

  .bract-total-row {
    margin-top: 6px;
  }

  .bract-total-head {
    font-size: 12px;
    margin-bottom: 3px;
  }

  .bract-verdict {
    font-size: 10px;
    padding: 3px 6px;
  }

  .activity-pill {
    font-size: 10px;
    padding: 2px 6px;
  }

  
  .otc-layout {
    gap: 12px;
  }

  .otc-builder-grid {
    gap: 12px;
  }

  .otc-team-card {
    padding: 12px;
  }

  .otc-team-head {
    gap: 8px;
    margin-bottom: 8px;
  }

  .otc-team-title {
    font-size: 16px;
  }

  .otc-team-pill {
    font-size: 11px;
    padding: 4px 8px;
  }

  .otc-slot-empty-title {
    font-size: 13px;
  }

  .otc-slot-empty-sub {
    font-size: 11px;
  }

  .otc-search-input {
    font-size: 14px;
    padding: 8px 10px;
  }

  .otc-summary-card {
    padding: 12px;
  }

  .otc-summary-title {
    font-size: 16px;
  }

  .otc-stat-box {
    padding: 8px;
  }

  .otc-stat-label {
    font-size: 11px;
  }

  .otc-stat-value {
    font-size: 18px;
  }

  .trade-summary-card .trade-total {
    min-width: 120px;
  }

  .trade-summary-card .trade-total .label {
    font-size: 11px;
  }

  .trade-summary-card .trade-total .value {
    font-size: 18px;
  }

  .trade-bar-track {
    height: 18px;
  }

  .trade-bar-indicator {
    width: 10px;
    top: -2px;
  }

  .trade-bar-scale {
    font-size: 10px;
  }

  .trade-verdict {
    font-size: 13px;
  }

  .trade-player-chip {
    padding: 8px 10px;
  }

  .trade-player-chip span {
    font-size: 15px;
  }

  .otc-slot {
    padding: 12px 12px 14px;
    min-height: 0;
  }

  .otc-chip {
    padding: 8px 12px;
    column-gap: 0;
    row-gap: 2px;
    grid-template-rows: auto auto;
    align-items: start;
  }

  .otc-chip-main {
    grid-column: 1;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .otc-chip-value-wrap {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    padding-left: 10px;
    gap: 5px;
  }

  .otc-chip-remove {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    padding-left: 6px;
  }

  .otc-chip-meta {
    font-size: 12px;
    white-space: normal;
    line-height: 1.4;
  }

  .otc-chip-team {
    display: none;
  }

  .otc-tier-badge {
    font-size: 9px;
    padding: 1px 4px;
    vertical-align: middle;
  }

  .otc-chip-value {
    font-size: 14px;
  }

  .player-chip-list,
  .otc-selected-list {
    margin-top: 8px;
    gap: 6px;
  }

  .os-waiver-row {
    padding: 10px 12px;
  }

  .os-waiver-name {
    font-size: 14px;
  }

  .os-waiver-sub {
    font-size: 11px;
    margin-top: 3px;
  }

  .os-waiver-value {
    min-width: 48px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .nav-pill {
    font-size: 0.75rem;
    padding: 4px 6px;
    min-height: 28px;
  }

  .refresh-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .changelog-bell-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }

  .card {
    padding: 6px;
    border-radius: 10px;
    margin-bottom: 6px;
  }

  .card h2 {
    font-size: 0.9rem;
  }

  .card h3 {
    font-size: 0.8rem;
  }

  .mini-card {
    padding: 6px 8px 4px;
  }

  .chip {
    font-size: 9px;
    padding: 1px 3px;
  }

  .badge {
    font-size: 9px;
    padding: 1px 4px;
  }

  .search,
  select,
  input[type="text"],
  input[type="number"],
  input[type="email"] {
    padding: 4px 6px;
    font-size: 13px;
  }

  .site-logo {
    width: 160px;
  }

  .top-nav {
    padding: 4px 8px;
  }

  .toolbar {
    gap: 6px;
    margin: 6px 0 8px;
  }

  .avatar {
    width: 32px;
    height: 32px;
  }

  .avatar.sm {
    width: 20px;
    height: 20px;
  }

  .team-avatar {
    width: 24px;
    height: 24px;
  }

  .pos-badge {
    height: 20px;
    width: 30px;
    font-size: 10px;
    padding: 1px 4px;
  }

  .player-row {
    padding: 4px 6px;
    font-size: 12px;
  }

  .mini-label {
    font-size: 9px;
  }

  .activity-list li {
    padding: 6px 0;
  }

  .activity-list .time {
    font-size: 11px;
    min-width: 80px;
  }

  
  .teams-grid {
    gap: 12px;
  }

  .card.teams-card {
    padding: 12px;
    max-width: 100%;
    width: 100% !important;
  }

  .team-header {
    gap: 8px;
    margin-bottom: 8px;
  }

  .team-section {
    margin-bottom: 12px;
  }

  .team-section-title {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .player-row {
    padding: 4px 8px;
    font-size: 13px;
  }

  .team-meta {
    font-size: 12px;
  }

  .manager-pill {
    padding: 4px 8px;
    font-size: 12px;
  }

  .team-name {
    font-size: 13px;
  }

  .team-score {
    font-size: 12px;
  }

  .pos-strength-table {
    font-size: 12px;
  }

  .pos-strength-table th,
  .pos-strength-table td {
    padding: 3px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .nav-pill {
    font-size: 14px;
    padding: 4px 6px;
    min-height: 28px;
    margin-top: 4px;
  }

  .refresh-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .changelog-bell-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }

  .card {
    padding: 6px;
    border-radius: 10px;
    margin-bottom: 6px;
  }

  .card h2 {
    font-size: 0.9rem;
  }

  .card h3 {
    font-size: 0.8rem;
  }

  .mini-card {
    padding: 6px 8px 4px;
  }

  .chip {
    font-size: 9px;
    padding: 1px 3px;
  }

  .badge {
    font-size: 9px;
    padding: 1px 4px;
  }

  button {
    font-size: 11px;
    padding: 4px 8px;
  }

  .search,
  select,
  input[type="text"],
  input[type="number"],
  input[type="email"] {
    padding: 4px 6px;
    font-size: 13px;
  }

  .site-logo {
    width: 160px;
  }

  .top-nav {
    padding: 4px 8px;
  }

  .toolbar {
    gap: 6px;
    margin: 6px 0 8px;
  }

  .avatar {
    width: 32px;
    height: 32px;
  }

  .avatar.sm {
    width: 20px;
    height: 20px;
  }

  .team-avatar {
    width: 24px;
    height: 24px;
  }

  .pos-badge {
    height: 20px;
    width: 30px;
    font-size: 10px;
    padding: 1px 4px;
  }

  .player-row {
    padding: 4px 6px;
    font-size: 12px;
  }

  .mini-label {
    font-size: 9px;
  }

  .activity-list li {
    padding: 6px 0;
  }

  .activity-list .time {
    font-size: 10px;
    min-width: 70px;
  }

  
  .teams-grid {
    gap: 8px;
  }

  .card.teams-card {
    padding: 8px;
    max-width: 100%;
    width: 100% !important;
  }

  .team-header {
    gap: 6px;
    margin-bottom: 6px;
  }

  .team-section {
    margin-bottom: 8px;
  }

  .team-section-title {
    font-size: 11px;
    margin-bottom: 3px;
  }

  .player-row {
    padding: 3px 6px;
    font-size: 11px;
  }

  .team-meta {
    font-size: 11px;
  }

  .manager-pill {
    padding: 3px 6px;
    font-size: 11px;
  }

  .team-name {
    font-size: 12px;
  }

  .team-score {
    font-size: 11px;
  }

  .pos-strength-table {
    font-size: 11px;
  }

  .pos-strength-table th,
  .pos-strength-table td {
    padding: 2px;
  }

  .team-row {
    padding: 3px 0;
  }

  .team-main {
    gap: 6px;
  }

  .pill-arrow {
    width: 18px;
    height: 18px;
    font-size: 12px;
  }

  
  .activity-card {
    padding: 6px;
  }

  .activity-card h2 {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .scroll-box {
    max-height: 300px;
    padding: 4px 6px;
  }

  .tx {
    padding: 6px;
    border-radius: 8px;
    margin-bottom: 6px;
  }

  .tx .meta {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .trade-card .teams {
    gap: 6px;
  }

  .team-col {
    padding: 6px;
    border-radius: 8px;
  }

  .team-col header {
    gap: 6px;
    margin-bottom: 4px;
  }

  .team-name {
    font-size: 12px;
  }

  .avatar {
    width: 28px;
    height: 28px;
  }

  .player-activity {
    padding: 3px 4px;
    font-size: 11px;
    gap: 6px;
  }

  .player-activity .io {
    width: 14px;
    height: 14px;
    font-size: 10px;
  }

  .player-trade-value {
    font-size: 10px;
    margin-right: 6px;
  }

  .bract-total-row {
    margin-top: 4px;
  }

  .bract-total-head {
    font-size: 11px;
    margin-bottom: 2px;
  }

  .bract-verdict {
    font-size: 9px;
    padding: 2px 4px;
  }

  .activity-pill {
    font-size: 9px;
    padding: 1px 4px;
  }

  
  .otc-layout {
    gap: 8px;
  }

  .otc-builder-grid {
    gap: 8px;
  }

  .otc-team-card {
    padding: 8px;
  }

  .otc-team-head {
    gap: 6px;
    margin-bottom: 6px;
  }

  .otc-team-title {
    font-size: 14px;
  }

  .otc-team-pill {
    font-size: 10px;
    padding: 3px 6px;
  }

  .otc-slot-empty-title {
    font-size: 12px;
  }

  .otc-slot-empty-sub {
    font-size: 10px;
  }

  .otc-search-input {
    font-size: 13px;
    padding: 6px 8px;
  }

  .otc-summary-card {
    padding: 8px;
  }

  .otc-summary-title {
    font-size: 14px;
  }

  .otc-stat-box {
    padding: 6px;
  }

  .otc-stat-label {
    font-size: 10px;
  }

  .otc-stat-value {
    font-size: 16px;
  }

  .trade-summary-card .trade-total {
    min-width: 100px;
  }

  .trade-summary-card .trade-total .label {
    font-size: 10px;
  }

  .trade-summary-card .trade-total .value {
    font-size: 16px;
  }

  .trade-bar-track {
    height: 16px;
  }

  .trade-bar-indicator {
    width: 8px;
    top: -2px;
  }

  .trade-bar-scale {
    font-size: 9px;
  }

  .trade-verdict {
    font-size: 12px;
  }

  .trade-player-chip {
    padding: 6px 8px;
  }

  .trade-player-chip span {
    font-size: 14px;
  }

  
  .os-waiver-row {
    padding: 8px 10px;
  }

  .os-waiver-name {
    font-size: 13px;
  }

  .os-waiver-sub {
    font-size: 10px;
    margin-top: 2px;
  }

  .os-waiver-value {
    min-width: 44px;
    font-size: 12px;
  }
}

@media (max-width: 1200px) {
  .otc-side-stack {
    gap: 14px;
  }
}

@media (max-width: 1100px) {
  .history-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .history-header {
    flex-direction: column;
  }

  .history-season-picker {
    width: 100%;
  }

  .history-season-picker select {
    width: 100%;
  }

  .history-title {
    font-size: 1.45rem;
  }
}

@media (max-width: 1020px) {
  .history-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .history-header {
    flex-direction: column;
    padding: 18px 16px;
    max-width: 100%;
    overflow: hidden;
  }

  .history-header > div {
    max-width: 100%;
    overflow: hidden;
  }

  .history-season-picker {
    width: 100%;
  }

  .history-season-picker select {
    width: 100%;
  }

  .history-section-card {
    padding: 16px;
    border-radius: 20px;
  }

  .history-awards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .history-card.is-featured {
    grid-column: span 1;
  }

  .history-page {
    padding: 0;
    max-width: 100vw;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .history-page * {
    max-width: 100%;
    box-sizing: border-box;
  }

  .history-top-grid {
    gap: 14px;
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .history-chart-panel {
    order: 1;
  }

  .history-recap-panel {
    order: 2;
  }

  .history-chart-wrap {
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
  }

  .history-table-wrap {
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
  }

  .history-table {
    min-width: 600px;
  }

  .history-recap-header {
    flex-direction: column;
    gap: 12px;
  }

  .history-recap-controls {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .history-recap-controls select,
  .history-recap-controls button {
    width: 100%;
  }

  .history-recap-content {
    max-width: 100%;
    overflow: hidden;
  }

  .recap-result {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #aiAnalysisResult {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .history-title {
    font-size: 1.35rem;
    line-height: 1.15;
  }

  .history-subtitle {
    font-size: 0.92rem;
    line-height: 1.5;
    max-height: 72px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }
}

@media (max-width: 980px) {
  .otc-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .trade-ai-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .otc-shell {
    padding: 12px;
    border-radius: 16px;
  }

  .otc-page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .otc-page-title-wrap {
    width: 100%;
  }

  .otc-page-title-wrap > div {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .otc-page-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .otc-info-tooltip-wrapper {
    flex-shrink: 0;
  }

  .otc-page-title {
    font-size: 22px;
    flex: 0 1 auto;
    min-width: 0;
  }

  .otc-page-head-controls {
    width: 100%;
  }

  .otc-settings-row {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .otc-settings-row .otc-ctrl-group {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
  }

  .otc-viewer-toggles {
    flex: 0 0 auto;
  }

  .otc-restrict-toggle {
    flex: 0 0 auto;
  }

  .otc-toggle-divider {
    border-left: none;
    padding-left: 0;
  }

  .otc-ctrl-group.otc-toggle-divider {
    border-left: none;
    padding-left: 0;
  }

  .otc-ctrl-select {
    width: auto;
  }

  .otc-viewer-toggle {
    flex: 1;
    justify-content: center;
    font-size: 11px;
    padding: 5px 7px;
    gap: 4px;
  }

  .otc-viewer-toggle input[type="radio"] {
    width: 12px;
    height: 14px;
  }

  .otc-info-tooltip-wrapper {
    position: static;
  }

  .otc-info-btn {
    font-size: 16px;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .otc-info-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    z-index: 9999;
  }

  .otc-side-panel {
    padding: 12px;
    border-radius: 16px;
  }

  .otc-side-title {
    font-size: 15px;
  }

  .otc-mini-title {
    font-size: 14px;
  }

  .otc-mini-sub {
    font-size: 11px;
  }

  .otc-values-list {
    gap: 6px;
  }

  .otc-values-item {
    padding: 8px 10px;
    font-size: 13px;
  }

  .otc-lower-grid {
    gap: 12px;
  }

  .otc-summary-card, .otc-ai-card {
    padding: 12px;
    border-radius: 16px;
  }

  .otc-summary-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .otc-summary-title, .otc-ai-title {
    font-size: 16px;
  }

  .otc-summary-sub, .otc-ai-sub {
    font-size: 11px;
  }

  .otc-summary-actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .otc-summary-team-select {
    flex: 1;
    min-width: 0;
  }

  .otc-summary-team-select .otc-team-select-dropdown {
    min-width: 0;
    width: 100%;
    padding: 10px 8px;
  }

  .otc-clear-btn, .otc-add-pick-btn {
    flex-shrink: 0;
    width: auto;
    font-size: 13px;
    padding: 10px 12px;
    white-space: nowrap;
  }

  .otc-share-btn {
    flex-shrink: 0;
  }

  .otc-balance-labels {
    font-size: 10px;
  }

  .otc-verdict {
    font-size: 13px;
  }

  .chip {
    padding: 4px 8px;
    font-size: 12px;
  }

  .chip-remove {
    width: 16px;
    height: 16px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .os-hero-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .os-stat-card {
    padding: 14px;
  }

  .os-hero-title {
    font-size: 24px;
    max-width: 100%;
  }

  .os-hero-card {
    padding: 18px;
    max-width: 100%;
  }

  .os-hero-copy {
    max-width: 100%;
  }

  .os-card, .os-card-soft {
    padding: 14px;
    max-width: 100%;
  }

  .history-header {
    padding: 16px 14px;
    max-width: 100%;
  }

  .history-header > div {
    max-width: 100%;
  }

  .history-section-card {
    padding: 12px;
    border-radius: 16px;
    max-width: 100%;
    overflow: hidden;
  }

  .history-card {
    padding: 8px 10px;
  }

  .history-awards-panel {
    padding: 14px;
  }

  .history-section-title {
    font-size: 15px;
  }

  .history-recap-panel {
    max-width: 100%;
    overflow: hidden;
  }

  .recap-result {
    max-height: 350px;
    padding: 14px;
  }

  #aiAnalysisResult {
    max-height: 350px;
  }

  .history-title {
    font-size: 1.25rem;
  }

  .history-subtitle {
    font-size: 0.88rem;
    max-height: 66px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

@media (max-width: 480px) {
  .history-header {
    padding: 14px 12px;
    max-width: 100%;
  }

  .history-header > div {
    max-width: 100%;
  }

  .history-title {
    font-size: 1.15rem;
    line-height: 1.1;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .history-kicker {
    font-size: 0.7rem;
  }

  .history-subtitle {
    font-size: 0.82rem;
    line-height: 1.4;
    max-height: 58px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .history-card-value {
    font-size: 0.88rem;
  }

  .history-card-sub {
    font-size: 0.76rem;
  }

  .history-card-label {
    font-size: 0.62rem;
  }

  .os-hero-title {
    font-size: 20px;
    max-width: 100%;
  }

  .os-hero-kicker {
    font-size: 11px;
    max-width: 100%;
  }

  .os-hero-copy {
    font-size: 14px;
    max-width: 100%;
  }

  .os-hero-card {
    padding: 16px;
  }

  .os-stat-label,
  .os-stat-value,
  .os-stat-sub {
    font-size: 13px;
  }

  .os-section-title {
    font-size: 14px;
  }

  .os-snapshot-team,
  .os-waiver-name {
    font-size: 13px;
  }
}

/* ============================================================
   TRADE LOGIN MODAL
   ============================================================ */

.trade-login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.trade-login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.trade-login-content {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10000;
}

.trade-login-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}

.trade-login-close:hover {
  color: var(--text);
}

.trade-login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px 0;
}

.trade-login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px 0;
}

.trade-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trade-login-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trade-login-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.trade-login-row input,
.trade-login-row select {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.trade-login-row input:focus,
.trade-login-row select:focus {
  outline: none;
  border-color: var(--accent);
}

.trade-login-row button {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: opacity 0.2s;
}

.trade-login-row button:hover {
  opacity: 0.9;
}

.trade-login-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-toggle:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--card-soft) !important;
  color: var(--text-subtle) !important;
  border-color: var(--border) !important;
}

.trade-login-error {
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 13px;
  display: none;
}

/* ============================================
   GM MEMO STYLES (using otc-ai classes to match trade analyzer)
   ============================================ */
.os-section-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gm-memo-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 13px;
  padding: 12px;
  margin-top: 15px;
}
/* ============================================
   ADVERTISING & COOKIE CONSENT
   ============================================ */

/* Ad Containers */
.ad-container {
  width: 100%;
  max-width: 100%;
  margin: 8px auto;
  padding: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  min-height: 90px;
  max-height: 100px;
  overflow: hidden;
}

.ad-top-banner {
  margin-top: 8px;
  margin-bottom: 16px;
}

.ad-bottom-content {
  margin-top: 24px;
  margin-bottom: 16px;
}

/* Ensure ads don't overflow on mobile */
.ad-container ins {
  width: 100%;
  display: block;
}

/* Cookie Consent Banner */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #16365d 0%, #1e4976 100%);
  color: white;
  padding: 16px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-consent-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
  min-width: 250px;
}

.cookie-consent-content a {
  color: #93c5fd;
  text-decoration: underline;
  font-weight: 500;
}

.cookie-consent-content a:hover {
  color: #bfdbfe;
}

.cookie-consent-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: #22c55e;
  color: white;
}

.cookie-btn-accept:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

.cookie-btn-decline {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-decline:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .ad-container {
    margin: 12px auto;
    padding: 6px;
    min-height: 70px;
    max-height: 80px;
  }

  .ad-top-banner {
    margin-top: 6px;
    margin-bottom: 12px;
  }

  .ad-bottom-content {
    margin-top: 16px;
    margin-bottom: 12px;
  }

  .cookie-consent {
    padding: 12px;
  }

  .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cookie-consent-content p {
    font-size: 13px;
    min-width: 100%;
    text-align: center;
  }

  .cookie-consent-buttons {
    justify-content: center;
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .cookie-consent-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .cookie-btn {
    width: 100%;
  }
}

/* ============================================
   PLAYER RANKINGS PAGE - MOBILE
   ============================================ */
@media (max-width: 768px) {
  #prControls {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px !important;
  }

  #prControls > div {
    margin-left: 0 !important;
  }

  /* Search takes full width */
  #prControls > div:first-child {
    max-width: 100% !important;
  }

  /* Format + Teams on same row */
  .pr-format-row {
    display: flex;
    gap: 10px;
  }

  /* Position buttons wrap naturally */
  #prControls .pr-pos-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Sort select full width */
  #prSort {
    width: 100%;
  }

  /* Tighter table grid on mobile: hide Team column */
  .pr-grid-row {
    grid-template-columns: 38px 1fr 54px 44px 54px !important;
  }

  .pr-team {
    display: none;
  }

  #prTableHeader span:nth-child(5) {
    display: none;
  }

  .pr-name {
    font-size: 12px;
  }

  .pr-value {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  /* Even tighter: also hide Age column */
  .pr-grid-row {
    grid-template-columns: 34px 1fr 52px 52px !important;
  }

  .pr-age {
    display: none;
  }

  #prTableHeader span:nth-child(4) {
    display: none;
  }

  .pr-toggle-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* ============================================
   PLAYER MODAL
   ============================================ */
.player-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

[data-theme="dark"] .player-modal-overlay {
  background: rgba(2, 6, 23, 0.88);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.player-modal {
  background: var(--card);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  animation: scaleIn 0.3s ease forwards;
}

[data-theme="dark"] .player-modal {
  background: #1a2535;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8);
}

@keyframes scaleIn {
  to {
    transform: scale(1);
  }
}

.player-modal-header {
  padding-left: 28px;
  padding-top: 5px;
  padding-right: 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}


.player-modal-title-section {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-modal-headshot-container {
  flex-shrink: 0;
}

.player-modal-headshot {
  width: 160px;
  height: 135px;
  object-fit: cover;
  background: var(--surface);
  display: none;
}

.player-modal-headshot[src]:not([src=""]) {
  display: block;
}

/* Two-column layout for breakout modal analysis */
.pm-two-column {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.pm-left-column,
.pm-right-column {
  flex: 1;
  min-width: 0;
}

.pm-subsection-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
  .pm-two-column {
    flex-direction: column;
    gap: 20px;
  }
  .pm-bk-comp-col    { order: 2; }
  .pm-bk-reasons-col { order: 1; }
}

.player-modal-title-text {
  padding-left: 5px;
  flex: 1;
  min-width: 0;
}

.player-modal-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
}

.player-modal-meta {
  font-size: 14px;
  color: var(--text-muted);
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start;
  gap: 2px;
}

@media (max-width: 768px) {
  .player-modal-meta {
    gap: 0px;
  }
}

.player-modal-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player-modal-close {
  background: var(--bg-alt);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 20px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.player-modal-close:hover {
  background: var(--bg-alt);
  color: var(--text);
  opacity: 0.8;
}

.player-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.player-modal-section {
  margin-bottom: 28px;
}

.player-modal-section:last-child {
  margin-bottom: 0;
}

.player-modal-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.player-modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.player-modal-stat-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

[data-theme="dark"] .player-modal-stat-card {
  background: #111e2e;
}

.player-modal-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.player-modal-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.player-modal-chart-container {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  min-height: 300px;
}

[data-theme="dark"] .player-modal-chart-container {
  background: #111e2e;
}

.player-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
}

.player-modal-loading .loading-spinner {
  margin-bottom: 12px;
}

.player-modal-game-logs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-modal-game-log-row {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .player-modal-game-log-row {
  background: #111e2e;
}

.player-modal-game-log-row:hover {
  background: var(--bg-alt);
  border-color: var(--border);
  transform: translateX(2px);
  opacity: 0.8;
}

.player-modal-game-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 12px;
}

.player-modal-game-log-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.player-modal-game-log-opponent {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  padding: 3px 10px;
  background: var(--card);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.player-modal-game-log-stats {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Game Log Year Sections */
.game-log-year-section {
  margin-bottom: 12px;
}

.game-log-year-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.game-log-year-header:hover {
  background: var(--bg-alt);
  border-color: var(--border);
  opacity: 0.8;
}

.game-log-year-header-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-log-year-toggle {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  width: 12px;
  display: inline-block;
}

.game-log-year-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.game-log-year-summary {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.game-log-year-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 6px;
}

.game-log-year-content.expanded {
  max-height: 2000px;
}

/* Game Log Table */
.game-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.game-log-table thead {
  background: var(--bg-alt);
  border-bottom: 2px solid var(--border);
}

.game-log-table th {
  padding: 8px 6px;
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.game-log-table th:first-child {
  text-align: left;
  padding-left: 12px;
}

.game-log-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.game-log-table tbody tr:hover {
  background: var(--bg-alt);
}

.game-log-table tbody tr:last-child {
  border-bottom: none;
}

.game-log-table td {
  padding: 6px 6px;
  text-align: center;
  color: var(--text-muted);
}

.game-log-table td:first-child {
  text-align: left;
  padding-left: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.game-log-table-opp {
  font-weight: 700;
  color: var(--text) !important;
}

.game-log-table-pts {
  font-weight: 700;
  color: var(--accent) !important;
  font-size: 13px;
}

/* Season Total Row in Table */
.game-log-table tfoot {
  background: var(--bg-alt);
  border-top: 2px solid var(--border);
}

.game-log-table-total td {
  padding: 8px 6px;
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}

.game-log-table-total td:first-child {
  padding-left: 12px;
  text-align: left;
}

.game-log-table-total td:nth-child(2) {
  text-align: center;
  color: #64748b;
  font-size: 11px;
}

.game-log-table-total .game-log-table-pts {
  color: #3b82f6 !important;
  font-size: 13px;
  font-weight: 700;
}

/* Games where player didn't play */
.game-log-no-stats {
  opacity: 0.5;
  background-color: #f9fafb;
}

.game-log-no-stats:hover {
  opacity: 0.7;
  background-color: #f3f4f6;
}

.game-log-no-stats td:first-child {
  background-color: #f9fafb;
}

.game-log-proj-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.game-log-proj-th {
  color: #6366f1 !important;
}

.game-log-proj-row {
  background: rgba(99, 102, 241, 0.03);
}

.game-log-proj-pts {
  color: #6366f1 !important;
  font-style: italic;
}

.game-log-bye {
  opacity: 0.45;
  background-color: #f9fafb;
}

.game-log-bye:hover {
  opacity: 0.6;
  background-color: #f3f4f6;
}

.game-log-bye td:first-child {
  background-color: #f9fafb;
}

/* ============================================
   Advanced Metrics Season Pills
   ============================================ */

.adv-metrics-season-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.adv-season-pill {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color, #e5e7eb);
  background: transparent;
  color: var(--text-muted, #6b7280);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  line-height: 1.5;
}

.adv-season-pill:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.adv-season-pill.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

/* ============================================
   Player + Breakout Modals – Shared Design System
   Hero Row, Info Row, Section Divider, Metric Bars
   ============================================ */

.pm-hero-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.pm-hero-stat {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}
.pm-hero-primary {
  background: rgba(59, 130, 246, 0.08);
  border-color: transparent;
}
.pm-hero-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.pm-hero-val {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.pm-hero-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  margin-bottom: 4px;
  font-size: 13px;
  flex-wrap: wrap;
}
.pm-section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 10px 0 10px;
}
.pm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pm-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pm-comp-list {
  display: flex;
  flex-direction: column;
  gap: 35px;
}
/* Flat 7-col grid so left & right metric rows share the same grid row */
.adv-metrics-grid {
  display: grid;
  grid-template-columns: 120px 1fr 54px 1px 120px 1fr 54px;
  column-gap: 8px;
  row-gap: 13px;
  align-items: center;
}
.am-vert-sep {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  min-height: 16px;
}
.pm-comp-sub {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.65;
  line-height: 1.1;
  margin-top: 2px;
}
@media (max-width: 600px) {
  .adv-metrics-grid {
    grid-template-columns: 90px 1fr 44px;
  }
  /* display:contents removes the sep from grid flow; right-side cells
     wrap onto the next row(s) making a single-column list */
  .am-vert-sep { display: contents; }
}
.pm-comp-list-bo {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.pm-comp-row {
  display: grid;
  grid-template-columns: 110px 1fr 48px;
  align-items: center;
  gap: 10px;
}
.pm-comp-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.pm-comp-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.pm-comp-bar {
  height: 100%;
  border-radius: 3px;
}
.pm-comp-val {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}
.pm-context-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}
.pm-context-box.competition {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.04);
}
.pm-footer {
  padding-top: 16px;
  display: flex;
  justify-content: center;
}
.pm-profile-btn {
  padding: 9px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.pm-profile-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}
/* Advanced metrics + value history side-by-side */
.pm-metrics-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.pm-metrics-chart-grid--prospect {
  grid-template-columns: 3fr 2fr;
}
@media (max-width: 700px) {
  .pm-metrics-chart-grid { grid-template-columns: 1fr; }
  .pm-metrics-chart-grid--prospect { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pm-hero-row { grid-template-columns: 1fr 1fr !important; }
  .pm-hero-primary { grid-column: auto; }
  .pm-hero-label { font-size: 8px; letter-spacing: 0.02em; }
  .pm-hero-val { font-size: 20px; }
  .pm-hero-sub { font-size: 10px; }
  .pm-hero-stat { padding: 10px 8px; }
  .pm-comp-row { grid-template-columns: 90px 1fr 40px; gap: 8px; }
}

/* ── Player Modal News ─────────────────────────────────────────────────────── */
.pm-news-section { }

.pm-news-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.pm-news-item:last-child { border-bottom: none; }

.pm-news-headline {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 3px;
}

.pm-news-link {
  color: var(--text);
  text-decoration: none;
}
.pm-news-link:hover { text-decoration: underline; color: #3b82f6; }

.pm-news-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 4px;
}

.pm-news-meta {
  font-size: 11px;
  color: var(--text-subtle, var(--text-muted));
  opacity: 0.7;
}

/* ============================================
   Team Modal Styles
   ============================================ */

.team-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-modal {
  background: var(--card);
  border-radius: 16px;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  animation: scaleIn 0.3s ease forwards;
  z-index: 10000;
  position: relative;
  margin: 20px;
}

.team-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.team-modal-avatar {
  width: 102px;
  height: 102px;
  margin-right: 16px;
  flex-shrink: 0;
}

.team-modal-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.team-modal-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 700;
  border: 2px solid var(--border);
}

.team-modal-title-section {
  flex: 1;
}

.team-modal-name {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.team-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
}

.team-modal-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-modal-stat-label {
  font-weight: 600;
  color: var(--text-muted);
}

.team-modal-stat-value {
  color: var(--text);
}

.team-modal-close {
  background: none;
  border: none;
  font-size: 32px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.team-modal-close:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.team-modal-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Team modal tabs - mirrors .pm-tab-bar / .pm-tab */
.tm-tab-bar {
  display: flex;
  background: var(--bg-alt, rgba(0,0,0,.03));
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  gap: 2px;
}
.tm-tab-bar::-webkit-scrollbar { display: none; }

.tm-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  border-radius: 6px 6px 0 0;
  margin-bottom: -1px;
}

.tm-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
}
.tm-tab.active {
  color: var(--accent, #3b82f6);
  border-bottom-color: var(--accent, #3b82f6);
  background: rgba(59,130,246,.06);
}

.tm-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.tm-panel.active { display: block; }

.team-modal-body-left {
  flex: 0 0 50%;
}

.team-modal-body-right {
  flex: 0 0 calc(50% - 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Roster panel uses two-column layout */
#tm-panel-roster {
  display: none;
  gap: 24px;
}
#tm-panel-roster.active { display: flex; }

/* Charts panel: side by side */
#tm-panel-charts {
  display: none;
}
#tm-panel-charts.active {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
#tm-panel-charts .team-modal-section {
  max-width: 770px;
  overflow: hidden;
  margin-bottom: 0;
}
.tm-chart-weekly { flex: 0 0 66%; min-width: 0; }
.tm-chart-radar  { flex: 0 0 calc(34% - 24px); min-width: 0; }

.team-modal-loading,
.team-modal-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 15px;
  width: 100%;
}

/* Override flexbox layout when loading/error */
.team-modal-body:has(.team-modal-loading),
.team-modal-body:has(.team-modal-error) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-modal-section {
  margin-bottom: 32px;
}

.team-modal-section:last-child {
  margin-bottom: 0;
}

.team-modal-section h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
}

.team-roster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.team-roster-table thead th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.team-roster-table thead th:nth-child(1) { width: 45%; } /* Player name */
.team-roster-table thead th:nth-child(2) { width: 10%; text-align: center; } /* Pos */
.team-roster-table thead th:nth-child(3) { width: 10%; text-align: center; } /* Team */
.team-roster-table thead th:nth-child(4) { width: 10%; text-align: center; } /* Age */
.team-roster-table thead th:nth-child(5) { width: 15%; text-align: right; } /* Value */

/* Override global sticky behavior for team roster table */
.team-roster-table thead th {
  position: static;
}

.team-roster-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s;
}

.team-roster-table tbody tr:hover {
  background-color: var(--row);
}

.team-roster-table tbody td {
  padding: 12px;
  color: var(--text);
}

.team-roster-table tbody td:first-child {
  font-weight: 500;
}

.team-roster-table tbody td:nth-child(2),
.team-roster-table tbody td:nth-child(3),
.team-roster-table tbody td:nth-child(4) {
  text-align: center;
}

.team-roster-table tbody td:nth-child(5) {
  text-align: right;
  font-weight: 600;
}

.elite-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* When badge appears in player modal name (after player name) */
.player-modal-name .elite-badge {
  margin-left: 8px;
  margin-right: 0;
}

.rookie-badge {
  display: inline-block;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* When badge appears in player modal name (after player name) */
.player-modal-name .rookie-badge {
  margin-left: 8px;
  margin-right: 0;
}

.team-picks-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.team-pick-item {
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
}

.pick-label {
  font-weight: 600;
  color: var(--text);
}

.pick-via {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.team-modal-empty {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 14px;
}

/* Team chart containers */
.team-chart-container {
  width: 100%;
  height: 250px;
  background: var(--card);
  padding: 12px;
}

#teamRadarChart {
  height: 260px;
}

/* Clickable team cards / names */
.team-clickable {
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

/* Block-level clickable cards (os-snapshot-card etc.) get the lift */
div.team-clickable:hover, article.team-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Inline / span / text clickables just dim slightly */
span.team-clickable:hover, h2.team-clickable:hover,
.pr-team-name.team-clickable:hover, .po-team-name.team-clickable:hover {
  opacity: 0.72;
}

/* Table row clickables get a row highlight */
tr.team-clickable:hover td {
  background: var(--accent-soft);
}
tr.team-clickable {
  cursor: pointer;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .team-modal {
    max-height: 88dvh;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    margin: 0;
    margin-top: auto;
    max-width: 100%;
  }

  .team-modal-header {
    padding: 16px;
  }

  .team-modal-avatar {
    width: 48px;
    height: 48px;
    margin-right: 12px;
  }

  .team-modal-avatar-placeholder {
    font-size: 18px;
  }

  .team-modal-name {
    font-size: 18px;
  }

  .tm-panel { padding: 16px; }

  #tm-panel-roster {
    flex-direction: column;
  }

  .team-modal-body-left,
  .team-modal-body-right {
    flex: 1;
  }

  .team-roster-table {
    font-size: 12px;
  }

  .team-roster-table thead th,
  .team-roster-table tbody td {
    padding: 8px 6px;
  }

  .team-picks-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .player-modal-overlay { padding: 16px 4px; }
  .player-modal {
    max-height: 88dvh;
    max-height: 88vh;
    border-radius: 16px;
    margin: auto;
    max-width: calc(100% - 8px);
  }

  .player-modal-header {
    position: relative;
    padding: 10px 12px 14px;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: nowrap;
  }

  /* Push content below the absolutely-positioned buttons */
  .player-modal-title-section {
    padding-top: 44px;
    padding-right: 35px;
    gap: 0;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
  }

  /* Remove extra padding on the inner text wrapper */
  .player-modal-title-text {
    padding-top: 0;
    width: 100%;
  }

  /* Headshot: tall enough to span header, aligned to top */
  .player-modal-headshot {
    width: 90px;
    height: 101px;
    border-radius: 8px;
    object-fit: cover;
    object-position: top;
    flex-shrink: 0;
  }

  .player-modal-name {
    font-size: 17px;
    line-height: 1.2;
    margin-bottom: 4px;
  }

  .player-modal-meta {
    font-size: 12px;
    gap: 1px;
  }

  /* Buttons pinned to top-right, above name */
  .player-modal-header > div:last-child {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
  }

  .player-modal-compare-btn {
    font-size: 11px;
    padding: 5px 9px;
    white-space: nowrap;
  }

  .player-modal-body {
    padding: 12px;
  }

  /* Make chart responsive */
  .player-modal-chart-container {
    margin: 0 -12px;
    padding: 0 12px;
    overflow-x: auto;
  }

  /* Make game log table scrollable */
  .game-log-year-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .game-log-table {
    min-width: 800px;
    font-size: 11px;
  }

  .game-log-table th {
    padding: 6px 4px;
    font-size: 10px;
  }

  .game-log-table td {
    padding: 5px 4px;
    font-size: 11px;
  }

  .game-log-table td:first-child,
  .game-log-table th:first-child {
    padding-left: 8px;
    position: sticky;
    left: 0;
    background: var(--card);
    z-index: 1;
  }

  .game-log-table tbody tr:hover td:first-child {
    background: var(--bg-alt);
  }

  .game-log-table tfoot td:first-child {
    background: var(--bg-alt);
  }

  /* Adjust year header for mobile */
  .game-log-year-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .game-log-year-summary {
    font-size: 11px;
    padding-left: 20px;
  }

  .player-modal-body {
    padding: 20px;
  }

  .player-modal-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   BREAKOUT MODAL
   ============================================ */

#bkModal {
  border-top: 3px solid #10b981;
  max-width: 680px;
}

#bkModal .player-modal-header {
  background: linear-gradient(135deg, rgba(16,185,129,0.06) 0%, transparent 55%);
}

.bk-score-header {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.bk-overall-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-radius: 12px;
  min-width: 120px;
  text-align: center;
  flex-shrink: 0;
}

.bk-overall-score-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.bk-overall-score-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.bk-type-badge {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.bk-type-emoji {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}

.bk-type-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.bk-type-driver {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.bk-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}

.bk-components-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.bk-component-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  transition: border-color 0.15s;
}

.bk-component-card:hover {
  border-color: #10b981;
}

.bk-component-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
  font-weight: 600;
}

.bk-component-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.bk-reasons {
  margin-bottom: 20px;
}

.bk-reason-item {
  display: flex;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.bk-reason-item:last-child {
  border-bottom: none;
}

.bk-reason-bullet {
  color: #10b981;
  font-weight: 700;
  flex-shrink: 0;
}

.bk-context-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid #10b981;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.bk-context-box.competition {
  border-left-color: #ef4444;
}

.bk-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.bk-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
}

.bk-profile-btn:hover {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 600px) {
  .bk-score-header {
    flex-direction: column;
  }
  .bk-overall-score {
    flex-direction: row;
    min-width: unset;
    justify-content: space-between;
    padding: 12px 16px;
  }
  .bk-overall-score-value {
    font-size: 28px;
  }
  .bk-components-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   GRAPHS SEASON SELECTOR
   ============================================ */

.graphs-season-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 4px;
}

.graphs-season-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.graphs-season-select {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  min-width: 180px;
}

/* ============================================
   NEW USER TOUR
   ============================================ */

.tour-overlay-piece {
  position: fixed;
  background: rgba(0, 0, 0, 0.65);
  z-index: 99990;
  pointer-events: none;
}

.tour-tooltip {
  position: fixed;
  z-index: 99991;
  background: var(--card, #1e293b);
  border: 1px solid var(--border, #334155);
  border-radius: 14px;
  padding: 16px 18px 14px;
  width: 300px;
  box-sizing: border-box;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: none;
}
@media (max-width: 540px) {
  .tour-tooltip { width: auto; }
}

.tour-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tour-step-count {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.tour-progress {
  height: 3px;
  border-radius: 2px;
  background: var(--border, #e2e8f0);
  margin-bottom: 12px;
  overflow: hidden;
}

.tour-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent, #3b82f6);
  transition: width 0.25s ease;
}

.tour-skip-btn {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.tour-skip-btn:hover {
  color: var(--text, #e2e8f0);
}

.tour-tooltip-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  margin-bottom: 6px;
}

.tour-tooltip-body {
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.5;
  margin-bottom: 14px;
}

.tour-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tour-btn {
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.tour-btn-primary {
  background: #38bdf8;
  color: #0f172a;
}

.tour-btn-primary:hover {
  background: #7dd3fc;
}

.tour-btn-secondary {
  background: var(--card-bg, #0f172a);
  color: var(--text-muted, #94a3b8);
  border: 1px solid var(--border, #334155);
}

.tour-btn-secondary:hover {
  color: var(--text, #e2e8f0);
}

/* ============================================
   PLAYER COMPARISON
   ============================================ */

/* Watchlist star button */
.player-modal-watchlist-btn {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.player-modal-watchlist-btn:hover {
  color: #f59e0b;
  transform: scale(1.15);
}
.player-modal-watchlist-btn--active {
  color: #f59e0b;
}

/* Compare button in modal header */
.player-modal-compare-btn {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.player-modal-compare-btn:hover {
  background: rgba(59, 130, 246, 0.2);
}

.player-modal-page-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.player-modal-page-btn:hover {
  background: var(--hover-bg, rgba(0,0,0,.04));
  color: var(--text);
  border-color: var(--text-muted);
}

/* Shared trade-row styling (matches the Trade Intelligence trade list). Defined
   globally so the per-player page and any other surface render trades the same. */
.ti-trade-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.ti-trade-item:last-child { border-bottom: none; }
.ti-trade-date {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px;
}
.ti-trade-sides {
  display: grid; grid-template-columns: 1fr 28px 1fr; gap: 8px; align-items: start;
}
.ti-trade-side-label {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase;
}
.ti-trade-asset { font-size: 13px; padding: 2px 0; line-height: 1.4; }
.ti-trade-asset.focus { font-weight: 700; }
.ti-trade-asset.other { color: var(--text-muted); }
.ti-trade-asset.pick { color: var(--text-muted); font-style: italic; }
.ti-trade-arrow { text-align: center; color: var(--text-muted); padding-top: 22px; font-size: 15px; }

/* Player page: similar-value player links */
.pp-similar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 4px 0; }
.pp-similar-link {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  text-decoration: none; transition: background 0.12s, border-color 0.12s;
}
.pp-similar-link:hover { background: var(--hover-bg, rgba(0,0,0,.03)); border-color: var(--text-muted); }
.pp-similar-name { font-size: 13px; font-weight: 600; color: var(--text); }
.pp-similar-meta { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.pp-faq { padding: 4px 0; }

/* Player page: sign-in modal */
.pp-signin-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 100000; padding: 20px;
}
.pp-signin-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  width: 100%; max-width: 380px; padding: 24px;
}
.pp-signin-title { font-size: 18px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.pp-signin-sub { font-size: 13px; color: var(--text-muted); margin: 0 0 16px; }
.pp-signin-input, .pp-signin-select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg, #fff); color: var(--text); font-size: 14px; margin-bottom: 10px;
}
.pp-signin-err { color: #ef4444; font-size: 12px; margin: 2px 0 8px; min-height: 14px; }
.pp-signin-actions { display: flex; gap: 8px; margin-top: 4px; }
.pp-signin-foot { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 12px; }
.pp-signin-foot a { color: var(--accent, #38bdf8); }
.pp-signin-platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pp-plat-btn {
  padding: 8px 0; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg, #fff); color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.pp-plat-btn:hover { color: var(--text); }
.pp-plat-btn.active { background: rgba(59,130,246,.1); border-color: #3b82f6; color: #3b82f6; }
.pp-plat-btn:disabled, .pp-plat-soon { opacity: 0.5; cursor: not-allowed; }
.pp-soon, .platform-soon {
  display: inline-block; font-size: 8px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; background: var(--border); color: var(--text-muted);
  padding: 1px 5px; border-radius: 6px; margin-left: 4px; vertical-align: middle;
}
.platform-soon { font-size: 9px; }
.platform-btn-soon { opacity: 0.5; cursor: not-allowed; }
.pp-signin-or { text-align: center; font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
.pp-signin-note { font-size: 11px; color: var(--text-muted); margin-top: 8px; line-height: 1.4; }
.pp-link-btn { background: none; border: none; color: var(--text-muted); font-size: 12px; cursor: pointer; padding: 0; }
.pp-link-btn:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 600px) {
  .pp-similar { grid-template-columns: 1fr; }
}

/* Widened modal in compare mode */
.player-modal.compare-mode {
  max-width: 1000px;
}
.player-modal.compare-mode .player-modal-compare-btn {
  display: none;
}

/* ── Dual-player header ─────────────────────────────────────────── */
.compare-dual-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 4px 0 2px;
}
.compare-player-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.compare-player-header:last-child {
  flex-direction: row-reverse;
}
.compare-player-header:last-child .compare-player-meta {
  justify-content: flex-end;
}
.compare-player-headshot {
  width: 60px;
  height: 52px;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  background: var(--bg-alt);
  flex-shrink: 0;
}
.compare-player-headshot[src=""] { display: none; }
.compare-player-header-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.compare-player-header:last-child .compare-player-header-info {
  align-items: flex-end;
}
.compare-owner-line {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 3px;
  opacity: .9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.compare-player-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compare-player-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  flex-wrap: wrap;
}
.compare-vs-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* ── Hero stats ─────────────────────────────────────────────────── */
.compare-hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.compare-hero-player { min-width: 0; }
.compare-hero-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

/* ── PPG / Points row ───────────────────────────────────────────── */
.compare-pts-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
  padding: 14px 0 6px;
}
.compare-pts-player {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.compare-pts-stats {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.compare-pts-player-right .compare-pts-stats {
  justify-content: flex-end;
}
.compare-pts-cell { text-align: center; }
.compare-pts-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.compare-pts-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}
.compare-pts-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.compare-pts-player-right .compare-pts-meta {
  text-align: right;
}
.compare-pts-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 0 16px;
}


/* ── Season selector ────────────────────────────────────────────── */
.compare-season-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.compare-season-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.compare-season-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.compare-season-pill {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.13s;
  white-space: nowrap;
}
.compare-season-pill:hover {
  color: var(--text);
  border-color: var(--accent-color, #3b82f6);
}
.compare-season-pill.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  font-weight: 600;
}

/* ── Metrics section ────────────────────────────────────────────── */
.compare-metrics-section { padding: 2px 0 6px; }
.compare-metrics-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.compare-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.compare-metric-row {
  display: grid;
  grid-template-columns: 48px 1fr 120px 1fr 48px;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-radius: 6px;
}
.compare-metric-row:nth-child(even) {
  background: var(--bg-alt);
  padding: 4px 6px;
  margin: 0 -6px;
}
.compare-metric-p1-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  flex-shrink: 0;
}
.compare-metric-p2-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  flex-shrink: 0;
}
.compare-metric-label {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.compare-bar-left {
  height: 7px;
  background: var(--border);
  border-radius: 4px 0 0 4px;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
}
.compare-bar-right {
  height: 7px;
  background: var(--border);
  border-radius: 0 4px 4px 0;
  overflow: hidden;
}
.compare-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.35s ease;
}

/* ── Game logs side-by-side ─────────────────────────────────────── */
.compare-gamelogs-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.compare-gamelogs-col {
  min-width: 0;
}
.compare-gamelogs-col .game-log-year-section {
  margin-bottom: 8px;
}
.compare-gamelogs-col .game-log-year-content {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.compare-gamelogs-col .game-log-table {
  font-size: 11px;
  width: max-content;
  min-width: 100%;
}
.compare-gamelogs-col .game-log-table th,
.compare-gamelogs-col .game-log-table td {
  padding: 5px 5px;
}
.compare-gamelogs-col .game-log-table th:first-child,
.compare-gamelogs-col .game-log-table td:first-child {
  padding-left: 8px;
}

/* ── Nav buttons ────────────────────────────────────────────────── */
.compare-nav-btns {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.compare-back-btn,
.compare-profile-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.13s, border-color 0.13s;
}
.compare-back-btn:hover,
.compare-profile-btn:hover {
  color: var(--text);
  border-color: var(--accent-color, #3b82f6);
}
.compare-profile-btn { margin-left: auto; }

/* Search panel */
.compare-search-panel {
  padding: 24px 0;
}
.compare-search-header {
  display: flex;
  align-items: center;
  gap: 20px;
}
.compare-search-p1 {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.compare-search-headshot {
  width: 52px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface);
  flex-shrink: 0;
}
.compare-search-headshot[src=""] {
  display: none;
}
.compare-search-p1-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.compare-search-p1-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.compare-search-picker {
  flex: 1;
  position: relative;
}
.compare-search-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
}
.compare-search-input:focus {
  border-color: #3b82f6;
}
.compare-search-results {
  /* In-flow (not absolute) so it's never clipped by the modal's overflow:hidden */
  margin-top: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  max-height: 320px;
  overflow-y: auto;
}
.compare-search-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.compare-search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.1s;
}
.compare-search-result-item:hover {
  background: var(--bg-alt);
}
.compare-result-headshot {
  width: 36px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface);
  flex-shrink: 0;
}
.compare-result-headshot[src=""] {
  display: none;
}
.compare-result-info {
  flex: 1;
  min-width: 0;
}
.compare-result-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.compare-result-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.compare-result-value {
  font-size: 13px;
  font-weight: 700;
  color: #3b82f6;
  flex-shrink: 0;
}

/* ── Mobile: tablet and below ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Full-width modal */
  .player-modal.compare-mode {
    max-width: 100%;
    margin-top: 0;        /* override bottom-sheet margin - center vertically instead */
    border-radius: 16px;  /* restore all-corner rounding when centered */
    max-height: 88dvh;
    max-height: 88vh;
  }

  /* Give dual header more breathing room by reducing overall header padding */
  .player-modal.compare-mode .player-modal-header {
    padding: 10px 12px;
  }

  /* Dual header: keep side-by-side but tighten */
  .compare-dual-header {
    gap: 6px;
  }
  .compare-player-header {
    gap: 6px;
    min-width: 0;
  }
  .compare-player-headshot {
    width: 38px;
    height: 32px;
  }
  .compare-player-name {
    font-size: 13px;
  }
  .compare-player-meta {
    font-size: 11px;
  }
  .compare-vs-badge {
    font-size: 11px;
    padding: 0 4px;
  }

  /* Two-column compare: P1 left, P2 right, cards stack vertically in each col */
  .compare-hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  .compare-hero-player:first-child,
  .compare-hero-player:last-child {
    padding: 0;
    border: none;
    margin: 0;
  }

  /* Player name label above each column */
  .compare-hero-player::before {
    display: block;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #compareHero1::before { content: attr(data-name); }
  #compareHero2::before { content: attr(data-name); }

  /* Each player's cards stack in a single column */
  .compare-hero-row {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
  }
  .compare-hero-row .pm-hero-stat {
    padding: 8px 8px;
  }
  .compare-hero-row .pm-hero-val {
    font-size: 16px !important;
  }
  .compare-hero-row .pm-hero-label {
    font-size: 8px;
    letter-spacing: 0.02em;
  }
  .compare-hero-row .pm-hero-sub {
    font-size: 9px;
  }

  /* PPG / scoring row: tighten font */
  .compare-pts-val {
    font-size: 18px;
  }
  .compare-pts-label {
    font-size: 9px;
    letter-spacing: 0.03em;
  }
  .compare-pts-divider {
    margin: 0 10px;
  }

  /* Season selector: allow pills to scroll horizontally */
  .compare-season-selector {
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .compare-season-label {
    flex-shrink: 0;
  }
  .compare-season-pills {
    flex-wrap: nowrap;
  }

  /* Metric rows: shrink label, keep mirrored bars readable */
  .compare-metric-label {
    width: 88px;
    font-size: 10px;
  }
  .compare-metric-p1-val,
  .compare-metric-p2-val {
    width: 34px;
    font-size: 11px;
  }

  /* Search: stack player + picker vertically */
  .compare-search-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .compare-search-p1 {
    width: 100%;
  }
  .compare-search-picker {
    width: 100%;
  }
}

/* ── Mobile: small phones ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Metric rows: move label above bars so bars get full width.
     Must switch from the base grid to flex - flex-wrap/order only apply to
     flex containers, otherwise the items stay in the 5 fixed grid tracks and
     the label gets crammed into a narrow column. */
  .compare-metric-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 6px;
    row-gap: 3px;
  }
  .compare-metric-label {
    width: 100%;
    order: -1;
    text-align: center;
    margin-bottom: 1px;
    font-size: 10px;
  }
  .compare-metric-p1-val {
    order: 1;
    width: 30px;
    text-align: right;
  }
  .compare-bar-left {
    order: 2;
    flex: 1 1 0;
    min-width: 0;
  }
  .compare-bar-right {
    order: 3;
    flex: 1 1 0;
    min-width: 0;
  }
  .compare-metric-p2-val {
    order: 4;
    width: 30px;
    text-align: left;
  }

  /* Tighter dual header on small phones */
  .compare-player-headshot {
    width: 32px;
    height: 28px;
  }
  .compare-player-name {
    font-size: 12px;
  }
  .compare-player-meta {
    font-size: 10px;
  }

  /* Metrics legend: wrap naturally */
  .compare-metrics-legend {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Season pills: smaller touch targets */
  .compare-season-pill {
    padding: 3px 9px;
    font-size: 11px;
  }
}

/* ─── Teams Analytics Card ───────────────────────────────────────────────── */
.teams-analytics-card {}

.analytics-loading {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.analytics-loading::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f4f6;
  border-radius: 50%;
  border-top-color: #3498db;
  border-right-color: transparent;
  animation: spin 1s linear infinite;
}

.analytics-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.analytics-btm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 4px;
  flex-wrap: wrap;
  gap: 4px;
}

.analytics-date-label {
  font-size: 12px;
  color: var(--text-muted);
}

.analytics-avg-label {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Bar list shared by Beat-the-Market and Schedule Strength */
.analytics-bar-list {
  padding: 4px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.analytics-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-bar-name {
  width: 140px;
  flex-shrink: 0;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.analytics-bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-alt, #1e293b);
  border-radius: 5px;
  overflow: hidden;
}

.analytics-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s ease;
}

.analytics-bar-pos  { background: var(--color-green,  #22c55e); }
.analytics-bar-neg  { background: var(--color-red,    #ef4444); }
.analytics-bar-mid  { background: var(--color-yellow, #f59e0b); }

.analytics-bar-val {
  width: 48px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.analytics-bar-val.analytics-bar-pos { color: var(--color-green, #22c55e); }
.analytics-bar-val.analytics-bar-neg { color: var(--color-red,   #ef4444); }

/* ── Draft tab - accordion ──────────────────────────────────────────────── */

.draft-adp-banner {
  font-size: 11px;
  color: var(--text-muted);
  padding: 8px 16px;
  border-bottom: 1px solid var(--border, #dbe2ea);
}
.draft-adp-banner.draft-adp-none  { color: #f87171; }
.draft-adp-banner.draft-adp-model { color: #f59e0b; }

.draft-accordion {
  padding: 10px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.draft-acc-item {
  border: 1px solid var(--border, #dbe2ea);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-soft);
  transition: box-shadow 0.15s;
}
.draft-acc-item.open {
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
[data-theme="dark"] .draft-acc-item.open {
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.draft-acc-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 8px;
  color: inherit;
  transition: background 0.12s;
}
.draft-acc-header:hover { background: var(--hover, rgba(0,0,0,0.04)); }
.draft-acc-item.open .draft-acc-header {
  border-bottom: 1px solid var(--border, #dbe2ea);
}

.draft-acc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-acc-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.draft-acc-grade {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 5px;
  min-width: 32px;
  text-align: center;
}

.draft-acc-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.draft-acc-item.open .draft-acc-chevron { transform: rotate(180deg); }

.draft-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.draft-acc-item.open .draft-acc-body { max-height: 1200px; }

.draft-acc-picks {
  padding: 8px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Grade colour buckets - light */
.dg-Aplus { background: #dcfce7; color: #15803d; }
.dg-A     { background: #bbf7d0; color: #166534; }
.dg-B     { background: #dbeafe; color: #1d4ed8; }
.dg-C     { background: #fef9c3; color: #92400e; }
.dg-D     { background: #fee2e2; color: #b91c1c; }
.dg-F     { background: #fecaca; color: #991b1b; }

/* Grade colour buckets - dark */
[data-theme="dark"] .dg-Aplus { background: #14532d; color: #4ade80; }
[data-theme="dark"] .dg-A     { background: #166534; color: #86efac; }
[data-theme="dark"] .dg-B     { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .dg-C     { background: #713f12; color: #fcd34d; }
[data-theme="dark"] .dg-D     { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .dg-F     { background: #450a0a; color: #ef4444; }

/* Pick rows */
.analytics-pick-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--row, transparent);
  transition: background 0.1s;
}
.analytics-pick-row:hover { background: var(--hover, rgba(0,0,0,0.04)); }

.analytics-pick-num {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 24px;
  margin-top: 3px;
  text-align: right;
}

.analytics-pick-grade {
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.analytics-pick-info {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.analytics-pick-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
}

.analytics-pick-pos {
  font-size: 10px;
  font-weight: 600;
}

.analytics-pick-adp-line {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.adp-value   { color: #16a34a; font-weight: 700; }
.adp-reach   { color: #dc2626; font-weight: 700; }
.adp-neutral { color: var(--text-muted); }
.adp-wait    { color: #b45309; font-style: italic; }

[data-theme="dark"] .adp-value { color: #4ade80; }
[data-theme="dark"] .adp-reach { color: #f87171; }
[data-theme="dark"] .adp-wait  { color: #f59e0b; }

.analytics-pick-bpa {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.bpa-name {
  font-weight: 600;
  margin-right: 4px;
}

.draft-need-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: #dbeafe;
  color: #1d4ed8;
  margin-left: 4px;
  vertical-align: middle;
}
[data-theme="dark"] .draft-need-badge { background: #1e3a5f; color: #93c5fd; }

/* Position colours for BPA names */
.pos-qb { color: #1d4ed8; }
.pos-rb { color: #16a34a; }
.pos-wr { color: #dc2626; }
.pos-te { color: #9333ea; }

[data-theme="dark"] .pos-qb { color: #93c5fd; }
[data-theme="dark"] .pos-rb { color: #4ade80; }
[data-theme="dark"] .pos-wr { color: #f87171; }
[data-theme="dark"] .pos-te { color: #c084fc; }

.analytics-pick-val {
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  width: 36px;
  text-align: right;
}

@media (max-width: 600px) {
  .analytics-bar-name { width: 100px; }
  .draft-accordion { padding: 8px 8px 16px; }
}

/* ── Draft view tabs (By Team / By Round) ─────────────────────────────────── */
.draft-view-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px 6px;
  border-bottom: 1px solid var(--border);
}
.draft-view-tab {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.draft-view-tab.active {
  background: var(--accent, #3b82f6);
  color: #fff;
  border-color: transparent;
}
.draft-view-tab:hover:not(.active) { background: var(--hover, rgba(0,0,0,0.05)); }

/* ── By Round pagination nav ──────────────────────────────────────────────── */
.draft-round-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.draft-round-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* ── Team tag on round picks ─────────────────────────────────────────────── */
.draft-pick-team-tag {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

/* ── Draft league ADP banner highlight ──────────────────────────────────────*/
.draft-adp-banner.draft-adp-league { color: #22c55e; }

/* ── Value Tracker (BTM) ──────────────────────────────────────────────────── */

/* Header: title + window pills */
.btm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 6px;
}
.btm-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.btm-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.btm-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}
.btm-window-pills {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.btm-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.btm-pill:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.btm-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Meta row: date range + league avg */
.btm-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 16px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.btm-date-range {
  font-size: 11px;
  color: var(--text-muted);
}
.btm-league-avg {
  font-size: 11px;
  color: var(--text-muted);
}
.btm-league-avg strong { color: var(--text); }

/* Column header */
.btm-col-header {
  display: grid;
  grid-template-columns: 36px 1fr 72px 70px;
  gap: 8px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--accent-soft);
  border-radius: 6px;
  margin: 0 8px 2px;
}

/* Row list */
.btm-rows {
  display: flex;
  flex-direction: column;
  padding: 2px 8px 10px;
  gap: 1px;
}

/* Individual row */
.btm-row {
  display: grid;
  grid-template-columns: 36px 1fr 72px 70px;
  align-items: center;
  gap: 8px;
  padding: 9px 4px;
  border-radius: 8px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  transition: background 0.12s;
}
.btm-row:hover {
  background: var(--accent-soft);
  border-color: var(--border);
  border-left-color: inherit;
}
.btm-row.btm-pos { border-left-color: #16a34a; }
.btm-row.btm-neg { border-left-color: #dc2626; }
:root[data-theme="dark"] .btm-row.btm-pos { border-left-color: #22c55e; }
:root[data-theme="dark"] .btm-row.btm-neg { border-left-color: #ef4444; }

/* Rank cell */
.btm-rank-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.btm-rank-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.btm-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.rk-gold   { background: #d97706; }
.rk-silver { background: #94a3b8; }
.rk-bronze { background: #b45309; }

/* Team cell */
.btm-team-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.btm-team-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.12s;
}
.btm-row:hover .btm-team-name { color: var(--accent); }

/* Movers chips (below team name) */
.btm-movers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.btm-mover {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 500;
}
.btm-mover strong { font-weight: 700; }
.btm-mover-pos { background: rgba(22,163,74,0.10); color: #15803d; }
.btm-mover-neg { background: rgba(220,38,38,0.10); color: #b91c1c; }
:root[data-theme="dark"] .btm-mover-pos { background: rgba(34,197,94,0.12); color: #4ade80; }
:root[data-theme="dark"] .btm-mover-neg { background: rgba(239,68,68,0.12); color: #f87171; }

/* Change cell */
.btm-change-cell { text-align: right; }
.btm-change-num {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.btm-change-num.btm-pos { color: #16a34a; }
.btm-change-num.btm-neg { color: #dc2626; }
:root[data-theme="dark"] .btm-change-num.btm-pos { color: #22c55e; }
:root[data-theme="dark"] .btm-change-num.btm-neg { color: #ef4444; }

/* vs avg cell */
.btm-vsavg-cell { text-align: right; }
.btm-vsavg-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
}
.btm-vsavg-badge.btm-pos { background: rgba(22,163,74,0.12); color: #15803d; }
.btm-vsavg-badge.btm-neg { background: rgba(220,38,38,0.10); color: #b91c1c; }
:root[data-theme="dark"] .btm-vsavg-badge.btm-pos { background: rgba(34,197,94,0.15); color: #4ade80; }
:root[data-theme="dark"] .btm-vsavg-badge.btm-neg { background: rgba(239,68,68,0.12); color: #f87171; }

/* Teams sidebar sticky positioning - desktop only */
@media (min-width: 1181px) {
  .teams-page.page-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .teams-sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    align-self: flex-start;
  }
}

/* Slim (sidebar) variant */
.btm-col-header.btm-slim,
.btm-row.btm-slim { grid-template-columns: 28px minmax(0, 1fr) 64px 64px; }
.teams-sidebar .btm-meta { padding: 6px 12px 8px; }
.teams-sidebar .teams-analytics-card { margin: 0; }

/* ── Roster Intel ─────────────────────────────────────── */
.ri-pos-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ri-pos-section:last-child { border-bottom: none; padding-bottom: 0; }

.ri-pos-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ri-pos-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text);
  width: 26px;
  flex-shrink: 0;
}

.ri-pos-stats {
  display: flex;
  gap: 10px;
  flex: 1;
  font-size: 11px;
  color: var(--text-muted);
}

.ri-pos-stats span + span::before {
  content: '·';
  margin-right: 10px;
}

.ri-health-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.ri-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  gap: 8px;
}

.ri-player-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ri-player-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ri-player-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.ri-signal {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── Roster Grade Badge ──────────────────────────────── */
.roster-grade-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  cursor: default;
}
.grade-a { background: #dcfce7; color: #166534; }
.grade-b { background: #dbeafe; color: #1e40af; }
.grade-c { background: #fef3c7; color: #92400e; }
.grade-d { background: #fee2e2; color: #991b1b; }
.grade-window-label {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}
.roster-grade-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.roster-grade-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  flex-shrink: 0;
}
.roster-grade-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.roster-grade-window {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.roster-grade-score {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Power Rankings ──────────────────────────────────── */
.power-rankings-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}
.pr-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.pr-row:last-child { border-bottom: none; }
.pr-rank {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 20px;
  text-align: right;
  padding-top: 2px;
}
.pr-body { flex: 1; min-width: 0; }
.pr-team-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.pr-team-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.pr-record, .pr-pf {
  font-size: 12px;
  color: var(--text-muted);
}
.pr-momentum {
  font-size: 14px;
  font-weight: 700;
}
.momentum-rising { color: #22c55e; }
.momentum-falling { color: #ef4444; }
.momentum-steady { color: var(--text-muted); }
.pr-narrative {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

/* ── Trade Suggestions ───────────────────────────────── */
.trade-suggestions-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}
.suggestion-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.suggestion-card {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.suggestion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.suggestion-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.suggestion-partner {
  font-size: 12px;
  color: var(--text-muted);
}
.suggestion-urgency {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.urgency-high { background: #fee2e2; color: #991b1b; }
.urgency-medium { background: #fef3c7; color: #92400e; }
.urgency-low { background: #dcfce7; color: #166534; }
.suggestion-assets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.suggestion-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
}
.suggestion-side-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.suggestion-asset {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin: 2px 2px 0 0;
}
.suggestion-asset.give { background: #fee2e2; color: #991b1b; }
.suggestion-asset.get { background: #dcfce7; color: #166534; }
.suggestion-arrow {
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.suggestion-reasoning {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}

/* ── Positional Scarcity Notes ───────────────────────── */
.scarcity-notes-wrap {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--row, #f8fafc);
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
}
.scarcity-notes-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.scarcity-notes-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scarcity-note-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.scarcity-pos {
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--border, #e2e8f0);
}
.scarcity-tier { font-weight: 600; color: var(--text); }
.scarcity-fa { color: var(--text-muted); }
.depth-danger .scarcity-tier { color: #991b1b; }
.depth-caution .scarcity-tier { color: #92400e; }
.depth-danger { background: #fff5f5; border-radius: 4px; padding: 2px 4px; }
.depth-caution { background: #fffbeb; border-radius: 4px; padding: 2px 4px; }

/* ── Trade Outcome Tracker ───────────────────────────── */
.outcome-check-btn {
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--card, #fff);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s;
}
.outcome-check-btn:hover { background: var(--row, #f8fafc); }
.outcome-check-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.trade-outcome-result {
  margin-top: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border, #e2e8f0);
}
.trade-outcome-wrap { display: flex; flex-direction: column; gap: 8px; }
.outcome-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.outcome-verdict {
  font-size: 13px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}
.outcome-win { background: #dcfce7; color: #166534; }
.outcome-loss { background: #fee2e2; color: #991b1b; }
.outcome-even { background: #f1f5f9; color: #475569; }
.outcome-delta { font-size: 13px; color: var(--text-muted); }
.outcome-rows { display: flex; flex-direction: column; gap: 4px; }
.outcome-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.outcome-name { flex: 1; font-weight: 600; color: var(--text); }
.outcome-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.outcome-got { background: #dcfce7; color: #166534; }
.outcome-gave { background: #fee2e2; color: #991b1b; }
.outcome-val { font-weight: 700; min-width: 40px; text-align: right; }
.outcome-plus { color: #22c55e; }
.outcome-minus { color: #ef4444; }
.outcome-neutral { color: #6b7280; }
.outcome-note { font-size: 10px; color: var(--text-muted); }
.outcome-error { font-size: 12px; color: #ef4444; }
.outcome-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 4px;
}
.outcome-section-label--current { margin-top: 8px; }

/* ── Watchlist nav panel ─────────────────────────────────────────────────── */
.watchlist-nav-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}
#watchlistNavBtn {
  font-size: 16px;
  line-height: 1;
}
.watchlist-nav-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15,23,42,.15);
  z-index: 300;
}
.watchlist-nav-header {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 0.5px solid var(--border);
}
.watchlist-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 0.5px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.watchlist-nav-item:last-child { border-bottom: none; }
.watchlist-nav-item:hover { background: var(--bg-alt); }
.watchlist-nav-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  padding: 0 0 0 8px;
  line-height: 1;
}
.watchlist-nav-empty {
  padding: 16px 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================
   PROSPECT / ROOKIE SHARED COMPONENTS
   (used in rookie modal and player modal prospect section)
   ============================================ */
.rk-hero-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.rk-hero-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}
.rk-hero-primary {
  background: var(--accent-soft);
  border-color: transparent;
}
.rk-hero-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.rk-hero-val {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.rk-hero-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rk-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  margin-bottom: 10px;
}
.rk-meas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.rk-meas-cell {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.rk-meas-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.rk-meas-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.rk-section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}
.rk-comp-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.rk-comp-row {
  display: grid;
  grid-template-columns: 90px 1fr 32px;
  align-items: center;
  gap: 10px;
}
.rk-comp-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.rk-comp-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.rk-comp-bar {
  height: 100%;
  border-radius: 3px;
}
.rk-comp-val {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}
@media (max-width: 480px) {
  .rk-hero-row { grid-template-columns: 1fr 1fr; }
  .rk-hero-primary { grid-column: 1 / -1; }
  .rk-meas-grid { grid-template-columns: repeat(2, 1fr); }
  .rk-comp-row { grid-template-columns: 76px 1fr 28px; gap: 8px; }
}

/* ============================================
   AWARDS PAGE ENHANCEMENTS
   ============================================ */

/* Cross-page nav link pill (awards ↔ history) */
.awards-page-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border, #d6dfeb);
  background: var(--card, #fff);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text, #1f2937);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15,23,42,0.06);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.awards-page-nav-link:hover {
  background: var(--card-soft, #f8fafc);
  box-shadow: 0 4px 14px rgba(15,23,42,0.10);
  transform: translateY(-1px);
}

/* League Superlatives + Championship History two-column row */
.awards-two-col {
  grid-template-columns: 2fr 1fr;
  display: grid;
  gap: 16px;
  align-items: stretch;
}
.awards-two-col > .card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
/* Championship history: scrollable body that fills remaining card height */
.champ-history-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.champ-history-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.champ-history-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
@media (max-width: 900px) {
  .awards-two-col {
    grid-template-columns: 1fr;
  }
  .champ-history-body { overflow: visible; }
  .champ-history-scroll { overflow-y: visible; }
}

/* Win% progress bar in standings table */
.winpct-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--border, #e8eef6);
  margin-top: 4px;
  overflow: hidden;
  min-width: 60px;
}
.winpct-fill {
  height: 100%;
  border-radius: 999px;
}

/* Plain rank badge for non-top-3 positions */
.rank-plain {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
}

/* Awards records grid - auto-fit for variable card count */
.awards-records-grid {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)) !important;
  gap: 10px !important;
}

/* Icon prefix inside a history-card */
.history-card-icon {
  font-size: 1.1rem;
  padding-left: 10px;
  margin-bottom: 2px;
}

/* League Superlatives grid - auto columns, exactly 2 rows */
.fun-awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-content: start;
}

.fun-award-item {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 10px 16px 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fun-award-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
}

.fun-award-item::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 4px;
  border-radius: 999px;
  background: var(--award-accent, #3b82f6);
}

.fun-award-title {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted, #6b7280);
}

.fun-award-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin: 2px 0;
}

.fun-award-winner {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.fun-award-sub {
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
  font-weight: 600;
}

/* Championship history - most recent row highlight */
.history-table tbody tr.champ-recent td {
  background: linear-gradient(90deg, rgba(245,158,11,0.07) 0%, var(--card) 100%);
  font-weight: 600;
}
.dark .history-table tbody tr.champ-recent td {
  background: linear-gradient(90deg, rgba(245,158,11,0.1) 0%, var(--card) 100%);
}

@media (max-width: 700px) {
  .awards-records-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .awards-records-grid { grid-template-columns: 1fr !important; }
  .fun-awards-grid { grid-template-columns: 1fr; }
}

/* ── Mobile polish (consolidated) ────────────────────────────────────────── */

/* Tab strips: horizontally scrollable on narrow screens instead of wrapping */
@media (max-width: 640px) {
  .card .tab-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding-bottom: 6px;
  }
  .card .tab-strip::-webkit-scrollbar { display: none; }
  .card .tab-btn {
    flex: 0 0 auto;
    font-size: 0.78rem;
    padding: 6px 10px;
    white-space: nowrap;
  }
}

/* Player modal: edge-to-edge on small phones */
@media (max-width: 480px) {
  .player-modal-overlay { padding: 16px 4px; align-items: center; }
  .player-modal-header { padding-left: 16px; padding-right: 16px; }
}

/* Team modal: bottom-sheet on mobile */
@media (max-width: 480px) {
  .team-modal-overlay { align-items: flex-end; padding: 0; }
  .team-modal {
    border-radius: 16px 16px 0 0;
    margin: 0;
    width: 100%;
    max-height: 88dvh;
    max-height: 88vh;
  }
}

/* PRO badge: smaller on mobile, never break nav layout */
@media (max-width: 640px) {
  .nav-pro-badge { font-size: 8px; padding: 1px 4px; }
}

/* Trade calculator: prevent two-column layout from breaking on phone */
@media (max-width: 540px) {
  .otc-two-col, .trade-sides { flex-direction: column; }
  .otc-col { min-width: 0; width: 100%; }
}

/* Breakout/prospect page table: clip long names on very small screens */
@media (max-width: 480px) {
  .breakout-name-cell, .prospect-name-cell {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ── Data freshness chip ─────────────────────────────────────────────────── */
/* ── Floating action pills (Discord + Data Freshness) ── */
#floating-pill-group {
  position: fixed;
  bottom: 14px;
  right: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  z-index: 50;
}

.fp-pill {
  display: inline-flex;
  align-items: center;
  height: 40px;
  width: 40px;
  border-radius: 20px;
  background: var(--card, #1e293b);
  border: 1px solid var(--border, #334155);
  color: var(--text-muted, #94a3b8);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  transition: width 0.22s ease, border-color 0.15s ease, color 0.15s ease;
  pointer-events: auto;
}

.fp-pill:hover {
  color: var(--text, #f1f5f9);
  border-color: var(--accent, #38bdf8);
}

#discord-pill:hover  { width: 148px; }
#cache-freshness:hover { width: 112px; }

.fp-pill-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.fp-pill-time {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fp-pill-label {
  font-size: 12px;
  font-weight: 600;
  padding-right: 14px;
  padding-left: 1px;
}

#cache-freshness.cf-stale { color: #f59e0b; border-color: #f59e0b55; }

.fp-discord-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity 0.15s ease;
  filter: brightness(0) saturate(100%) invert(40%);
}
#discord-pill:hover .fp-discord-icon { opacity: 1; }
html[data-theme="dark"] .fp-discord-icon {
  filter: brightness(0) saturate(100%) invert(90%);
}
.fp-robot-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity 0.15s ease;
  filter: brightness(0) saturate(100%) invert(40%);
}
#ask-gm-pill:hover .fp-robot-icon,
#ask-gm-pill.gm-active .fp-robot-icon { opacity: 1; filter: brightness(0) saturate(100%) invert(100%); }
html[data-theme="dark"] .fp-robot-icon {
  filter: brightness(0) saturate(100%) invert(90%);
}

/* ── Disabled button state ───────────────────────────────────────────────── */
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Player Modal Tab Bar ─────────────────────────────────────────────────── */
.pm-tab-bar {
  display: flex;
  background: var(--bg-alt, rgba(0,0,0,.03));
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  gap: 2px;
}

[data-theme="dark"] .pm-tab-bar {
  background: #111e2e;
}
.pm-tab-bar::-webkit-scrollbar { display: none; }
.pm-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  border-radius: 6px 6px 0 0;
}
.pm-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
}
.pm-tab.active {
  color: var(--accent, #3b82f6);
  border-bottom-color: var(--accent, #3b82f6);
  background: rgba(59,130,246,.06);
}
.pm-panel { display: none; }
.pm-panel.pm-panel-active { display: block; }

/* ── Weekly Hub tab bar - matches trade calculator otc-main-tabs style ──────── */
#weeklyLeftTabs {
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}
#weeklyLeftTabs .tab-bar {
  display: flex;
  gap: 4px;
  background: var(--row);
  padding: 3px;
  border-radius: 10px;
  width: fit-content;
  margin: 14px 11px 10px;
}
#weeklyLeftTabs .tab-btn {
  padding: 7px 17px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
#weeklyLeftTabs .tab-btn:hover {
  color: var(--text);
  background: var(--border);
}
#weeklyLeftTabs .tab-btn.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
#weeklyLeftTabs .tab-panels {
  padding: 0;
}
#weeklyLeftTabs .tab-panel {
  display: none;
}
#weeklyLeftTabs .tab-panel.active {
  display: block;
  padding: 10px 12px 12px;
}

.pm-trade-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.pm-trade-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-alt, rgba(0,0,0,.03));
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.pm-trade-date { color: var(--text-muted); font-weight: 500; }
.pm-trade-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
}
.pm-trade-col { display: flex; flex-direction: column; gap: 4px; }
.pm-trade-asset { font-size: 13px; font-weight: 500; color: var(--text); }
.pm-trade-asset.pm-focus { font-weight: 700; color: var(--accent); }
.pm-trade-asset.pm-pick { color: var(--text-muted); font-style: italic; font-size: 12px; }

/* Login / subscribe gate card */
.login-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 24px;
  text-align: center;
}
.login-gate-icon {
  font-size: 28px;
  opacity: 0.6;
  line-height: 1;
}
.login-gate-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.login-gate-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.5;
}
.login-gate-btn {
  margin-top: 4px;
  padding: 9px 22px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.12s;
}
.login-gate-btn:hover { opacity: 0.88; }
.login-gate-btn-secondary {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.12s;
}
.login-gate-btn-secondary:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* Sign-in modal */
.signin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10001;
  align-items: center;
  justify-content: center;
}
.signin-modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px 28px;
  width: 360px;
  max-width: 92vw;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
  animation: scaleIn 0.22s ease forwards;
}
.signin-modal-title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}
.signin-modal-sub {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.signin-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 13px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: var(--card-soft);
  color: var(--text);
  font-size: 14px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.15s;
}
.signin-modal-input::placeholder { color: var(--text-subtle); }
.signin-modal-input:focus { border-color: var(--accent); }
.signin-modal-actions {
  display: flex;
  gap: 10px;
}
.signin-modal-submit {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.12s;
}
.signin-modal-submit:hover { opacity: 0.85; }
.signin-modal-cancel {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.signin-modal-cancel:hover {
  background: var(--accent-soft);
  color: var(--text);
  border-color: var(--accent);
}

/* ── Generic skeleton shimmer ─────────────────────────────────────────────── */
@keyframes skShimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.sk-shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-alt, #1e293b) 25%,
    var(--border, #334155) 50%,
    var(--bg-alt, #1e293b) 75%
  );
  background-size: 200% 100%;
  animation: skShimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
}

.sk-line {
  height: 12px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.sk-line.sk-line--lg { height: 18px; }
.sk-line.sk-line--sm { height: 9px; }
.sk-line.sk-line--w75 { width: 75%; }
.sk-line.sk-line--w50 { width: 50%; }
.sk-line.sk-line--w60 { width: 60%; }

.sk-avatar {
  border-radius: 50%;
  flex-shrink: 0;
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

/* Movers skeleton rows */
.sk-mover-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

/* ── Recap page mobile layout ─────────────────────────────────────────────── */
@media (max-width: 720px) {
  .recap-scoreboard-grid {
    grid-template-columns: 1fr !important;
  }
  .recap-lineup-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Toast notifications ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #1e293b;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: auto;
  white-space: nowrap;
  max-width: 90vw;
}
.toast.toast-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast.toast-success { background: #16a34a; }
.toast.toast-error   { background: #dc2626; }
.toast.toast-info    { background: #0ea5e9; }

/* ── Async card fade-in ───────────────────────────────────────────────────── */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}
.card-fade-in {
  animation: cardFadeIn .3s ease forwards;
}

/* ── Consistent empty state ──────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  text-align: center;
}
.empty-state-icon {
  font-size: 26px;
  color: var(--muted, #64748b);
  opacity: .5;
}
.empty-state-msg {
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  margin: 0;
  line-height: 1.5;
}

/* ── PWA install banner ───────────────────────────────────────────────────── */
#pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 9990;
  background: var(--card, #1e293b);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: clamp(280px, 90vw, 400px);
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
}
#pwa-install-banner.pwa-banner-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pwa-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}
.pwa-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #f1f5f9);
}
.pwa-banner-sub {
  font-size: 11px;
  color: var(--muted, #94a3b8);
  margin-top: 2px;
}
.pwa-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.pwa-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.pwa-btn-install {
  background: var(--accent, #38bdf8);
  color: #fff;
}
.pwa-btn-install:hover { opacity: .9; }
.pwa-btn-dismiss {
  background: var(--row, rgba(255,255,255,.05));
  color: var(--muted, #94a3b8);
}
.pwa-btn-dismiss:hover { opacity: .8; }

/* ── Notification toast (changelog new-entry popup) ──────────────────────── */
.notif-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99998;
  width: clamp(260px, 90vw, 320px);
  background: var(--card, #1e293b);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-top: 3px solid var(--accent, #38bdf8);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  padding: 14px 16px 12px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .25s ease, transform .25s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notif-toast.notif-toast-visible {
  opacity: 1;
  transform: translateY(0);
}
.notif-toast-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-toast-bell {
  font-size: 13px;
  color: var(--accent, #38bdf8);
  flex-shrink: 0;
}
.notif-toast-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #f1f5f9);
  flex: 1;
}
.notif-toast-close {
  background: none;
  border: none;
  color: var(--muted, #94a3b8);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.notif-toast-close:hover { color: var(--text, #f1f5f9); }
.notif-toast-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notif-toast-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  align-self: flex-start;
}
/* Mirror changelog tag colours */
.notif-toast-tag-new     { background: rgba(59,130,246,.12);  color: #3b82f6; }
.notif-toast-tag-fix     { background: rgba(34,197, 94,.15);  color: #22c55e; }
.notif-toast-tag-update  { background: rgba(251,191, 36,.15); color: #fbbf24; }
.notif-toast-tag-feature { background: rgba(16,185,129,.12);  color: #10b981; }
.notif-toast-text {
  font-size: 13px;
  color: var(--muted, #94a3b8);
  margin: 0;
  line-height: 1.5;
}
.notif-toast-action {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent, #38bdf8);
  text-decoration: none;
  padding-top: 2px;
}
.notif-toast-action:hover { text-decoration: underline; }

/* ── Analytics panel skeleton ────────────────────────────────────────────── */
.analytics-skeleton {
  padding: 12px 4px;
}
.analytics-skeleton .sk-line {
  height: 13px;
  border-radius: 4px;
  margin-bottom: 0;
}

/* ── Empty state icon ─────────────────────────────────────────────────────── */
.bract-empty-icon {
  margin-bottom: 10px;
  line-height: 1;
}

/* ── Sparkline canvas in player rankings (lives in the arrow column) ─────── */
.pr-sparkline {
  display: block;
  margin: 0 auto;
}

/* ── Optimal Lineup Tracker navigation ────────────────────────────────────── */
.opt-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.opt-tab-group {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.opt-tab {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.opt-tab.active {
  background: var(--accent);
  color: #fff;
}
.opt-tab:not(.active):hover {
  background: var(--surface2);
  color: var(--text);
}
.opt-week-select {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

/* ── Schedule (matchup-difficulty grid) ───────────────────────────────────── */
.sched-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
}
/* Rank controls live in the shared bar; span the row so pills sit left, sort right */
.sched-shared-controls .sched-rank-controls { flex: 1; justify-content: space-between; padding: 0; }
.sched-week-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sched-ctrl-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sched-ctrl-sep {
  font-size: 12px;
  color: var(--text-muted);
}
.sched-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.sched-add {
  position: relative;
  flex: 1;
  min-width: 200px;
}
#schedAddInput:focus { border-color: var(--accent) !important; outline: none; }
.sched-add-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}
.sched-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}
.sched-add-row:hover { background: var(--accent-soft); }
.sched-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 14px;
}
.sched-legend span { display: inline-flex; align-items: center; }
.sched-chip {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 5px;
}
.sched-legend-note { color: var(--text-muted); }
.sched-grid-wrap { overflow-x: auto; }
.sched-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
}
.sched-table {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
}
.sched-th {
  padding: 10px 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.sched-th-player {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--accent-soft);
  border-right: 1px solid var(--border);
}
.sched-td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.sched-td-player {
  text-align: left;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--card);
  border-right: 1px solid var(--border);
}
.sched-bye { color: var(--text-muted); font-size: 12px; }
.sched-opp { font-weight: 600; font-size: 13px; }
.sched-rank { font-size: 11px; font-weight: 700; }
.sched-fpts { font-size: 10px; color: var(--text-muted); }
.sched-player-pts { font-size: 10px; font-weight: 600; color: var(--text); margin-top: 1px; white-space: nowrap; }
.sched-player-pts--proj { color: var(--text-muted); font-weight: 400; }
.sched-pos {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
}
.sched-pname { cursor: pointer; font-weight: 600; }
.sched-pname:hover { color: var(--accent); }
.sched-nfl { font-size: 11px; color: var(--text-muted); margin-left: 6px; }
/* On the rankings cell, push the NFL team to the far right of the player column */
.sched-rank-player-cell { width: 100%; }
.sched-rank-player-cell .sched-nfl { margin-left: auto; padding-left: 8px; }
.sched-roster-badge--owner {
  text-transform: none;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched-th-sos { text-align: center; }
.sched-sos-td {
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.sched-sos-total { font-size: 9px; color: var(--text-muted); font-weight: 600; }
.sched-remove {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  margin-right: 8px;
  padding: 0 2px;
  border-radius: 4px;
  transition: color 0.14s;
}
.sched-remove:hover { color: #ef4444; }

@media (max-width: 640px) {
  .sched-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
  }
  .sched-week-range { gap: 6px; }
  .sched-ctrl-label { font-size: 11px; }
  .sched-select { font-size: 12px; padding: 5px 8px; }
  .sched-add { min-width: 0; }
  .sched-legend {
    gap: 8px 12px;
    font-size: 11px;
    margin-bottom: 10px;
  }
  .sched-legend-note {
    width: 100%;
    font-size: 10px;
    line-height: 1.4;
  }
  .sched-th { padding: 7px 8px; font-size: 10px; }
  .sched-td { padding: 6px 7px; }
  .sched-opp { font-size: 12px; }
  .sched-pname { font-size: 12px; }
  .sched-nfl { font-size: 10px; }
  .sched-pos { font-size: 10px; padding: 1px 4px; margin-right: 4px; }
  .sched-remove { font-size: 14px; margin-right: 5px; }
  .sched-rank-controls { gap: 8px; flex-wrap: wrap; }
  .sched-sort-btn { font-size: 12px; padding: 5px 10px; }
  .sched-rank-pos { font-size: 11px; padding: 4px 8px; }

  /* Rankings view - tighter cells so more weeks fit */
  .sched-th { padding: 6px 6px; font-size: 10px; }
  .sched-td { padding: 5px 6px; }
  .sched-opp { font-size: 11px; }
  .sched-rank { font-size: 10px; }
  .sched-player-pts { font-size: 9px; }

  /* Narrow the sticky player column */
  .sched-td-player { max-width: 140px; }
  .sched-rank-player-cell { gap: 4px; }
  .sched-rank-medal,
  .sched-rank-num { width: 20px; height: 20px; font-size: 10px; flex-shrink: 0; }
  .sched-pname {
    font-size: 11px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
  }
  .sched-nfl { font-size: 9px; }
  .sched-pos { font-size: 9px; padding: 1px 3px; margin-right: 2px; flex-shrink: 0; }

  /* Hide ease bar column on mobile - saves ~90px */
  .sched-ease-td,
  th.sched-th:last-child { display: none; }

  /* Pagination bar */
  .sched-page-bar { gap: 6px; font-size: 12px; }
  .sched-page-btn { padding: 4px 10px; font-size: 11px; }
}

/* ── Skip link (accessibility) ─────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--accent, #3b82f6);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.skip-link:focus {
  left: 8px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Toast notifications ────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--card, #1e293b);
  color: var(--text, #e2e8f0);
  border: 1px solid var(--border, #334155);
  border-left: 3px solid var(--accent, #3b82f6);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: auto;
}
.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Schedule view toggle ────────────────────────────────────────────────── */
.sched-view-toggle {
  display: flex;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  align-self: center;
}
.sched-view-btn {
  padding: 6px 14px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.sched-view-btn.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ── Rankings controls ───────────────────────────────────────────────────── */
.sched-rank-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 8px;
  flex-wrap: wrap;
}
.sched-pos-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.sched-rank-pos {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
}
.sched-rank-pos.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sched-sort-btn {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s;
  white-space: nowrap;
}
.sched-sort-btn:hover { background: var(--accent-soft); }

/* ── Rank medals & numbers ───────────────────────────────────────────────── */
.sched-rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.sched-rank-medal-1 { background: #fbbf24; color: #000; }
.sched-rank-medal-2 { background: #94a3b8; color: #000; }
.sched-rank-medal-3 { background: #c2855d; color: #fff; }
.sched-rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Roster badge ────────────────────────────────────────────────────────── */
.sched-roster-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

/* ── Rankings player cell layout ─────────────────────────────────────────── */
.sched-rank-player-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sched-rank-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* Grouped team row: align players to the top, stack each name + owner badge */
.sched-rank-player-cell--group { align-items: flex-start; }
.sched-rank-player-cell--group .sched-pos { margin-top: 2px; }
.sched-rank-player-cell--group .sched-nfl { margin-top: 2px; }
.sched-rank-player-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.sched-rank-player-line .sched-pname { font-weight: 600; }

/* ── Ease score bar ──────────────────────────────────────────────────────── */
.sched-ease-td { min-width: 90px; }
.sched-ease-wrap {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
}
.sched-ease-bar { height: 100%; border-radius: 3px; }
.sched-ease-num {
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}
.sched-page-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 4px;
}
.sched-page-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s;
}
.sched-page-btn:hover:not(:disabled) { background: var(--accent-soft); }
.sched-page-btn:disabled { opacity: 0.35; cursor: default; }
.sched-page-info { font-size: 13px; color: var(--text-muted); }

/* ============================================
   WINDOW LEGEND
   ============================================ */
/* Teams topbar: sort filters + window guide on same row */
.teams-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  position: relative;
}
.teams-topbar .teams-sort-bar { flex: 1; margin-bottom: 0; }
.teams-topbar .window-legend-wrap { flex-shrink: 0; margin-bottom: 0; }
@media (max-width: 768px) {
  .teams-topbar { flex-direction: column; align-items: stretch; }
}

.window-legend-wrap { margin-bottom: 12px; }
.window-legend-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
  transition: background 0.14s;
}
.window-legend-toggle:hover { background: var(--row); }
.wl-chevron { margin-left: 4px; transition: transform 0.2s; }
.window-legend-toggle[aria-expanded="true"] .wl-chevron { transform: rotate(180deg); }
.window-legend-panel {
  display: none;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
}
@media (min-width: 769px) {
  .window-legend-panel {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    z-index: 30;
    min-width: 540px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  }
}
.window-legend-panel.wl-open { display: block; }
.window-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 7px 20px;
}
.wl-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
}
.wl-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}
.wl-label {
  min-width: 120px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.wl-desc { color: var(--text-muted); }

.wl-section-label {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
}

.wl-grade {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.wl-grade-note {
  grid-column: 1 / -1;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.75;
  padding-top: 2px;
}

/* ============================================
   MOBILE COLLAPSIBLE TEAM CARDS
   ============================================ */
.team-card-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--row);
  cursor: pointer;
  flex-shrink: 0;
  color: var(--text-muted);
  padding: 0;
  transition: background 0.15s;
}
.team-card-toggle:hover { background: var(--border); }
.team-card-toggle svg { transition: transform 0.2s; }
.team-strength-card.tc-expanded .team-card-toggle svg { transform: rotate(180deg); }

@media (max-width: 768px) {
  .team-card-toggle { display: flex; }
  .team-strength-card .card-body { display: none; }
  .team-strength-card.tc-expanded .card-body { display: block; }
}

/* ============================================
   WINDOW-TYPE ACCENT COLORS
   ============================================ */
.team-strength-card { border-left: 3px solid transparent; }
.wt-contender        { border-left-color: #22c55e; }
.wt-win-now          { border-left-color: #f59e0b; }
.wt-aging-contender  { border-left-color: #84cc16; }
.wt-contender-window { border-left-color: #3b82f6; }
.wt-2yr              { border-left-color: #6366f1; }
.wt-rising           { border-left-color: #8b5cf6; }
.wt-holding          { border-left-color: #94a3b8; }
.wt-retooling        { border-left-color: #f97316; }
.wt-rebuilding       { border-left-color: #ef4444; }
.wt-full-rebuild     { border-left-color: #dc2626; }

/* Positional index inline text in card header */
.tc-pi-text { color: var(--text-subtle); font-weight: 500; font-size: 11px; text-transform: none; letter-spacing: 0; }
.tc-pi-num  { font-weight: 700; color: var(--text-muted); }
@media (max-width: 768px) {
  .tc-pi-text { display: none; }
}

/* Colored window label text */
.grade-window-label { font-size: 11px; font-weight: 700; font-style: normal; letter-spacing: 0.04em; text-transform: uppercase; }
.wt-contender        .grade-window-label { color: #16a34a; }
.wt-win-now          .grade-window-label { color: #d97706; }
.wt-aging-contender  .grade-window-label { color: #65a30d; }
.wt-contender-window .grade-window-label { color: #2563eb; }
.wt-2yr              .grade-window-label { color: #4f46e5; }
.wt-rising           .grade-window-label { color: #7c3aed; }
.wt-holding          .grade-window-label { color: #64748b; }
.wt-retooling        .grade-window-label { color: #ea580c; }
.wt-rebuilding       .grade-window-label { color: #dc2626; }
.wt-full-rebuild     .grade-window-label { color: #b91c1c; }

/* ============================================
   TRADE SUGGESTIONS MOBILE
   ============================================ */
@media (max-width: 540px) {
  .suggestion-assets {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .suggestion-side { min-width: 0; }
  .suggestion-arrow {
    text-align: center;
    font-size: 16px;
    transform: rotate(90deg);
    display: block;
    line-height: 1;
  }
}

/* ============================================
   TEAMS PAGE SKELETON
   ============================================ */
.teams-loading-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}
.teams-sk-card .card-body { display: block !important; }
.teams-sk-card .card-header-row {
  padding-bottom: 8px;
}
.teams-sk-card {
  pointer-events: none;
}


/* ════════════════════════════════════════════════════════════════════════════
   NEW FEATURES CSS
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Feature 5: Steps hint bar ───────────────────────────────────────────────*/
.home-steps-hint {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: var(--card-soft, #111827);
  border: 1px solid var(--border, #334155);
  border-radius: 10px;
}
.home-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.home-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  transition: border-color .25s, background .25s, color .25s, box-shadow .25s;
}
.home-step-label {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
  transition: color .25s;
  white-space: nowrap;
}
.home-step-item.active .home-step-num {
  border-color: var(--accent, #38bdf8);
  background: var(--accent, #38bdf8);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(56,189,248,.15);
}
.home-step-item.active .home-step-label {
  color: var(--accent, #38bdf8);
  font-weight: 700;
}
.home-step-item.done .home-step-num {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
  font-size: 0;
}
.home-step-item.done .home-step-num::before {
  content: '✓';
  font-size: 10px;
}
.home-step-item.done .home-step-label { color: #10b981; }
.home-step-connector {
  flex: 1;
  height: 1.5px;
  background: var(--border, #334155);
  align-self: flex-start;
  margin-top: 9px;
  margin-left: 7px;
  margin-right: 7px;
  transition: background .25s;
}
.home-step-item.active + .home-step-connector {
  background: linear-gradient(90deg, rgba(56,189,248,.45) 0%, var(--border, #334155) 100%);
}
.home-step-item.done + .home-step-connector { background: #10b981; }

/* ── Feature 7: Enhanced Empty States ───────────────────────────────────────*/
.empty-state {
  gap: 12px;
  padding: 40px 20px;
}
.empty-state-icon { font-size: 30px; }
.empty-state-msg { max-width: 280px; }
.empty-state-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent, #38bdf8);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity .15s;
}
.empty-state-cta:hover { opacity: .85; }

/* ── Feature 10 + 15: Ask My GM chat panel (anchored above pill group) ───────*/
#ask-gm-pill:hover { width: 120px; }
#ask-gm-pill.gm-active {
  background: var(--accent, #38bdf8);
  color: #fff;
  border-color: var(--accent, #38bdf8);
  width: 120px;
}
#ask-gm-pill.gm-active .fp-pill-label { opacity: 1; }

#ask-gm-panel {
  position: fixed;
  bottom: 64px;
  right: 16px;
  width: 360px;
  max-height: 500px;
  background: var(--card, #1e293b);
  border: 1px solid var(--border, #334155);
  border-top: 3px solid var(--accent, #38bdf8);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 8999;
  animation: gmPanelIn .22s cubic-bezier(.16,1,.3,1);
}
@keyframes gmPanelIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.ask-gm-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px 11px;
  border-bottom: 1px solid var(--border, #334155);
  background: linear-gradient(135deg, var(--accent-soft, #162032) 0%, var(--card, #1e293b) 100%);
  flex-shrink: 0;
}
.ask-gm-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(56,189,248,.3);
}
.ask-gm-robot-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(100%);
}
.ask-gm-header-text { flex: 1; }
.ask-gm-header-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #f1f5f9);
  line-height: 1.2;
}
.ask-gm-header-sub {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
  margin-top: 1px;
}
.ask-gm-close {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
  transition: background .12s, color .12s;
}
.ask-gm-close:hover { color: var(--text, #f1f5f9); background: var(--card-soft, #111827); }

.ask-gm-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  min-height: 0;
}
.ask-gm-messages::-webkit-scrollbar { width: 4px; }
.ask-gm-messages::-webkit-scrollbar-track { background: transparent; }
.ask-gm-messages::-webkit-scrollbar-thumb { background: var(--border, #334155); border-radius: 2px; }

.ask-gm-msg {
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 12px;
  border-radius: 12px;
  max-width: 86%;
  word-break: break-word;
}
.ask-gm-msg--system {
  background: var(--card-soft, #111827);
  color: var(--text-muted, #94a3b8);
  border: 1px solid var(--border, #334155);
  align-self: flex-start;
  max-width: 100%;
  font-size: 12px;
  border-radius: 10px;
}
.ask-gm-msg--user {
  background: var(--accent, #38bdf8);
  color: #fff;
  align-self: flex-end;
  border-radius: 12px 12px 3px 12px;
  font-weight: 500;
}
.ask-gm-msg--ai {
  background: var(--card-soft, #111827);
  color: var(--text, #f1f5f9);
  align-self: flex-start;
  border: 1px solid var(--border, #334155);
  border-radius: 3px 12px 12px 12px;
}
.ask-gm-msg--typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
}
.ask-gm-typing-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted, #94a3b8);
  animation: gmDotPulse 1.2s infinite ease-in-out;
}
.ask-gm-typing-dot:nth-child(2) { animation-delay: .18s; }
.ask-gm-typing-dot:nth-child(3) { animation-delay: .36s; }
@keyframes gmDotPulse { 0%,80%,100% { transform: scale(.55); opacity: .35; } 40% { transform: scale(1); opacity: 1; } }
.ask-gm-msg--error {
  color: #f87171;
  background: rgba(248,113,113,.07);
  border-color: rgba(248,113,113,.18);
}

.ask-gm-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border, #334155);
  background: var(--card, #1e293b);
  flex-shrink: 0;
}
.ask-gm-input {
  flex: 1;
  background: var(--card-soft, #111827);
  border: 1.5px solid var(--border, #334155);
  border-radius: 10px;
  color: var(--text, #f1f5f9);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color .15s;
  min-width: 0;
}
.ask-gm-input::placeholder { color: var(--text-muted, #94a3b8); }
.ask-gm-input:focus { border-color: var(--accent, #38bdf8); }
.ask-gm-send {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent, #38bdf8);
  border: none;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity .15s, transform .12s;
}
.ask-gm-send:hover:not(:disabled) { opacity: .88; transform: scale(1.05); }
.ask-gm-send:disabled { opacity: .35; cursor: not-allowed; }

@media (max-width: 500px) {
  #ask-gm-panel { width: calc(100vw - 20px); right: 10px; bottom: 60px; }
}

/* ── Feature 11: Lazy-Load Sentinel ─────────────────────────────────────────*/
.lazy-load-sentinel {
  height: 1px;
  margin-top: -1px;
  visibility: hidden;
}
.load-more-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
}
.load-more-indicator .loading-dot {
  width: 6px; height: 6px;
  background: var(--accent, #38bdf8);
  border-radius: 50%;
  animation: dotPulse 1.2s infinite ease-in-out;
}
.load-more-indicator .loading-dot:nth-child(2) { animation-delay: .2s; }
.load-more-indicator .loading-dot:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse { 0%,80%,100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* ── Feature 12: League Bulletins ───────────────────────────────────────────*/
.bulletins-card { margin-top: 16px; }
.bulletins-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #334155);
}
.bulletins-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #f1f5f9);
  display: flex;
  align-items: center;
  gap: 7px;
}
.bulletins-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.bulletin-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle, #1e293b);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bulletin-item:last-child { border-bottom: none; }
.bulletin-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bulletin-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--card-soft, #111827);
}
.bulletin-avatar-fallback {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--card-soft, #111827);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted, #94a3b8);
  flex-shrink: 0;
}
.bulletin-author { font-size: 12px; font-weight: 600; color: var(--text, #f1f5f9); }
.bulletin-time { font-size: 10.5px; color: var(--text-muted, #94a3b8); margin-left: auto; }
.bulletin-body { font-size: 12.5px; color: var(--text-secondary, #cbd5e1); line-height: 1.5; }
.bulletin-likes {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 4px;
}
.bulletins-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted, #94a3b8);
}

/* ── Feature 13: Share Card ──────────────────────────────────────────────────*/
.share-card {
  background: var(--surface, #1e293b);
  border: 1px solid var(--border, #334155);
  border-radius: 16px;
  overflow: hidden;
}
.sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card-soft, #111827);
  border-bottom: 1px solid var(--border, #334155);
}
.sc-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}
.sc-league { font-size: 11px; color: var(--text-muted, #94a3b8); }
.sc-team-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border, #334155);
}
.sc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.sc-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--card-soft, #111827);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #94a3b8);
  font-size: 18px;
  flex-shrink: 0;
}
.sc-team-info { flex: 1; }
.sc-team-name { font-size: 15px; font-weight: 700; color: var(--text, #f1f5f9); }
.sc-owner { font-size: 11.5px; color: var(--text-muted, #94a3b8); margin-top: 2px; }
.sc-record {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #f1f5f9);
  text-align: right;
  flex-shrink: 0;
}
.sc-stats-row {
  display: flex;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #334155);
  gap: 0;
}
.sc-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.sc-stat + .sc-stat { border-left: 1px solid var(--border, #334155); }
.sc-stat-val { font-size: 14px; font-weight: 700; color: var(--text, #f1f5f9); }
.sc-stat-lbl { font-size: 10px; color: var(--text-muted, #94a3b8); text-transform: uppercase; letter-spacing: .5px; }
.sc-section-title {
  padding: 12px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted, #94a3b8);
}
.sc-players { padding: 0 16px 8px; display: flex; flex-direction: column; gap: 4px; }
.sc-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle, #1e293b);
}
.sc-player-row:last-child { border-bottom: none; }
.sc-pos-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.sc-player-name { flex: 1; font-size: 12.5px; font-weight: 500; color: var(--text, #f1f5f9); }
.sc-player-team { font-size: 11px; color: var(--text-muted, #94a3b8); min-width: 28px; text-align: right; }
.sc-player-val { font-size: 11px; color: var(--text-muted, #94a3b8); min-width: 36px; text-align: right; font-weight: 600; }
.sc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border, #334155);
  gap: 8px;
}
.sc-cta {
  font-size: 11px;
  color: var(--accent, #38bdf8);
  text-decoration: none;
}
.sc-copy-btn {
  background: var(--card-soft, #111827);
  border: 1px solid var(--border, #334155);
  color: var(--text, #f1f5f9);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.sc-copy-btn:hover { background: var(--hover, #334155); }

/* Positional ranking grid */
.sc-pos-ranks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 16px 14px;
  gap: 6px;
}
.sc-pos-rank-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 8px 4px;
}
.sc-pos-rank-pos {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.sc-pos-rank-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #f1f5f9);
  line-height: 1;
}
.sc-pos-rank-of {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
}
/* Win window badge on share card */
.sc-window-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
}

/* Share button in team cards */
.share-report-icon {
  width: 15px;
  height: 15px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(40%);
  transition: filter .15s;
}
html[data-theme="dark"] .share-report-icon {
  filter: brightness(0) saturate(100%) invert(80%);
}
.share-report-btn:hover .share-report-icon {
  filter: brightness(0) saturate(100%) invert(15%);
}
html[data-theme="dark"] .share-report-btn:hover .share-report-icon {
  filter: brightness(0) saturate(100%) invert(100%);
}
.share-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border, #334155);
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.share-report-btn:hover { background: var(--hover, #334155); color: var(--text, #f1f5f9); }

/* ── Feature 1: Live Draft Board ─────────────────────────────────────────────*/
.live-draft-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card-soft, #111827);
  border: 1px solid var(--accent, #38bdf8);
  border-radius: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.live-draft-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent, #38bdf8);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.live-draft-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent, #38bdf8);
  animation: livePulse 1.5s infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.live-draft-count {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  margin-left: auto;
}
.live-draft-clear-btn {
  background: none;
  border: 1px solid var(--border, #334155);
  color: var(--text-muted, #94a3b8);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.live-draft-clear-btn:hover { color: var(--text, #f1f5f9); background: var(--hover, #334155); }
.ld-need-pill {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .4px;
  flex-shrink: 0;
}
.ld-need-pill--major  { background: rgba(239,68,68,.15); color: #f87171; }
.ld-need-pill--need   { background: rgba(245,158,11,.15); color: #fbbf24; }
.ld-need-pill--neutral{ background: rgba(100,116,139,.12); color: #64748b; }
.ld-need-pill--depth  { background: rgba(16,185,129,.10); color: #34d399; }
.ld-need-pill--stacked{ background: rgba(99,102,241,.12); color: #818cf8; }
