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

body {
  width: 100%;
  min-height: 100vh;
  background: #0f172a;
  color: #f1f5f9;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  overflow-y: scroll;
}

#app { padding: 16px; position: relative; }

header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.logo { font-size: 26px; }
h1 { font-size: 18px; font-weight: 800; color: #f1f5f9; }
.subtitle { font-size: 11px; color: #64748b; margin-top: 1px; }

.input-row { display: flex; gap: 8px; margin-bottom: 10px; }
input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
input:focus { border-color: #3b82f6; }
#username-field input { width: 100%; box-sizing: border-box; }
.username-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
}
.username-suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-radius: 5px;
  font-size: 13px;
  color: #e2e8f0;
  cursor: pointer;
}
.username-suggest-item.active,
.username-suggest-item:hover { background: #334155; }
.username-suggest-remove {
  color: #475569;
  font-size: 13px;
  padding: 0 4px;
  margin-left: 8px;
}
.username-suggest-remove:hover { color: #ef4444; }
button {
  padding: 9px 18px;
  border-radius: 7px;
  border: none;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
button:hover { background: #2563eb; }
button:disabled { background: #334155; cursor: not-allowed; }

#error-box {
  background: #ef444422;
  border: 1px solid #ef4444;
  border-radius: 7px;
  padding: 8px 12px;
  color: #ef4444;
  font-size: 13px;
  margin-bottom: 10px;
  display: none;
}
#error-box:not(:empty) {
  display: block;
}

#loading {
  display: none;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 24px;
  color: #64748b;
}
#loading:not(.hidden) {
  display: flex;
}
.spinner {
  width: 18px; height: 18px;
  border: 2px solid #334155;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.count-label { color: #64748b; font-size: 12px; margin-bottom: 10px; }
.count-label strong { color: #94a3b8; }

.minimalist-toggle-footer {
  display: block;
  width: 100%;
  margin: 16px 0 6px;
  padding: 4px 0;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  cursor: pointer;
}
.minimalist-toggle-footer:hover {
  color: #94a3b8;
}
.minimalist-toggle-footer.active {
  color: #3b82f6;
}

.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 9px;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.card.open { border-color: #3b82f680; }

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.card-header:hover { background: #243044; }
.card.open .card-header { background: #243044; }

.avatar {
  width: 38px; height: 38px;
  border-radius: 7px;
  background: #334155;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

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

.name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.league-name { font-weight: 700; font-size: 14px; color: #f1f5f9; }
.season { font-size: 11px; color: #64748b; }

.tag-row { display: flex; gap: 4px; flex-wrap: wrap; }

.tag {
  border-radius: 4px;
  border: 1px solid;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.chevron {
  color: #64748b;
  font-size: 12px;
  flex-shrink: 0;
  padding-top: 2px;
}

.icon-btn {
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  box-sizing: border-box;
}
.icon-btn:hover { background: #334155; }
.icon-btn.active { background: #3b82f622; border-color: #3b82f6; color: #3b82f6; }

.player-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  margin-bottom: 4px;
  overflow: hidden;
}

.player-detail {
  padding: 10px 12px;
  border-top: 1px solid #334155;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.player-detail-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-detail-row {
  display: flex;
  flex-direction: column;
}

.player-detail-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
}

.player-detail-val {
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 500;
}

.player-detail-pfr-link {
  font-size: 11px;
  font-weight: 700;
  color: #3b82f6;
  text-decoration: none;
  display: inline-block;
}
.player-detail-pfr-link:hover { color: #60a5fa; }

.rank-row.selection-mode {
  padding-left: 4px !important;
}
.player-sort-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

#filter-btn-wrap {
  padding: 6px 0 2px 0;
}

.filter-toggle-btn {
  padding: 6px 14px;
  border-radius: 7px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.filter-toggle-btn:hover { background: #334155; color: #f1f5f9; }
.filter-toggle-btn.active { background: #3b82f622; border-color: #3b82f6; color: #3b82f6; }

#players-search {
  width: 100%;
  padding: 8px 12px;
  border-radius: 7px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 13px;
  outline: none;
  margin-bottom: 8px;
  box-sizing: border-box;
}
#players-search:focus { border-color: #3b82f6; }

.filter-subsection {
  border-bottom: 1px solid #1e293b;
}
.filter-subsection:last-child { border-bottom: none; }

.filter-subsection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
}
.filter-subsection-header:hover { background: #243044; }

.filter-subsection-body {
  padding: 8px 10px;
  background: #0a1120;
}
#filter-panel {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 9px;
  margin-bottom: 16px;
  overflow: hidden;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #334155;
}

.filter-title {
  font-weight: 700;
  font-size: 13px;
  color: #f1f5f9;
}

.filter-match {
  font-size: 11px;
  color: #64748b;
}

.clear-btn {
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid #334155;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
}
.clear-btn:hover { background: #334155; }

.filter-load-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  min-width: 180px;
  z-index: 300;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  overflow: hidden;
}

.filter-load-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 12px;
  color: #f1f5f9;
  cursor: pointer;
  border-bottom: 1px solid #0f172a;
  gap: 8px;
}
.filter-load-item:last-child { border-bottom: none; }
.filter-load-item:hover { background: #243044; }

.filter-load-item-name { flex: 1; }

.filter-load-delete {
  font-size: 11px;
  color: #475569;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
}
.filter-load-delete:hover { color: #ef4444; background: #ef444422; }

.filter-load-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: #475569;
}

.filter-section {
  border-bottom: 1px solid #1e293b;
}

.filter-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  background: #1e293b;
}
.filter-section-header:hover { background: #243044; }

.filter-section-body {
  padding: 10px 14px;
  background: #0f172a;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  border-radius: 5px;
  border: 1px solid #334155;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  position: relative;
}
.filter-chip:hover { border-color: #64748b; color: #94a3b8; }
.filter-chip.active {
  background: #3b82f622;
  border-color: #3b82f6;
  color: #3b82f6;
}
.filter-chip.or {
  background: #f59e0b22;
  border-color: #f59e0b;
  color: #f59e0b;
}
.filter-chip.exclude {
  background: #ef444422;
  border-color: #ef4444;
  color: #ef4444;
}

.player-search-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 7px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.player-search-input:focus { border-color: #3b82f6; }

.player-selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.player-chip.chip-and {
  background: #3b82f622;
  border: 1px solid #3b82f6;
  color: #3b82f6;
}

.player-chip.chip-or {
  background: #f59e0b22;
  border: 1px solid #f59e0b;
  color: #f59e0b;
}

.chip-remove {
  cursor: pointer;
  opacity: 0.7;
  font-size: 10px;
}
.chip-remove:hover { opacity: 1; }

.player-suggestions {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  margin-top: 4px;
  overflow: hidden;
}

.suggestion-item {
  padding: 8px 12px;
  font-size: 12px;
  color: #f1f5f9;
  cursor: pointer;
  border-bottom: 1px solid #0f172a;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: #243044; }
.roster-wrap {
  margin-top: 12px;
  border-top: 1px solid #1e293b;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.roster-section {}

.roster-heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 6px;
}

.roster-empty {
  font-size: 12px;
  color: #475569;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid #1e293b;
  font-size: 12px;
}

.player-slot {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  width: 36px;
  flex-shrink: 0;
  text-align: center;
  border-radius: 5px;
  padding: 2px 3px;
}

.slot-QB    { background: #e040a0; }
.slot-RB    { background: #10b981; }
.slot-WR    { background: #3b82f6; }
.slot-TE    { background: #f59e0b; }
.slot-K     { background: #8b5cf6; }
.slot-DEF   { background: #334155; }
.slot-DL    { background: #f97316; }
.slot-LB    { background: #8b5cf6; }
.slot-DB    { background: #ec4899; }
.slot-IDP   { background: #94a3b8; }
.slot-FLX   { background: linear-gradient(135deg, #3b82f6 33%, #10b981 33% 66%, #f59e0b 66%); }
.slot-WR-RB { background: linear-gradient(135deg, #3b82f6 50%, #10b981 50%); }
.slot-WR-TE { background: linear-gradient(135deg, #3b82f6 50%, #f59e0b 50%); }
.slot-SF    { background: linear-gradient(135deg, #e040a0 25%, #3b82f6 25% 50%, #10b981 50% 75%, #f59e0b 75%); }

.player-name {
  flex: 1;
  color: #f1f5f9;
  font-weight: 500;
}

.player-name.empty {
  color: #475569;
  font-style: italic;
}

.player-team-inline {
  font-size: 10px;
  color: #64748b;
  font-weight: 400;
}

.injury {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  text-transform: uppercase;
}
.injury-out       { background: #ef444422; color: #ef4444; }
.injury-doubtful  { background: #f9731622; color: #f97316; }
.injury-questionable { background: #f59e0b22; color: #f59e0b; }
.injury-ir        { background: #8b5cf622; color: #8b5cf6; }
.injury-pup       { background: #ec489922; color: #ec4899; }
.injury-dnr       { background: #a1620722; color: #a16207; }
.injury-na        { background: #78716c22; color: #78716c; }
.injury-sus       { background: #9a341222; color: #9a3412; }

.hidden { display: none !important; }

.detail {
  padding: 12px 13px;
  border-top: 1px solid #334155;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 10px;
}

.detail-heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 6px;
}

.detail-extra { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.detail-meta, .detail-limits { font-size: 11px; color: #475569; }

.player-hl-red {
  background: rgba(239, 68, 68, 0.13) !important;
}
.player-hl-red .rank-name,
.player-hl-red .player-team-inline {
  color: #fca5a5 !important;
}
.player-hl-yellow {
  background: rgba(251, 191, 36, 0.11) !important;
}
.player-hl-yellow .rank-name,
.player-hl-yellow .player-team-inline {
  color: #fcd34d !important;
}
.player-hl-pink {
  background: rgba(236, 72, 153, 0.15) !important;
}
.player-hl-pink .rank-name,
.player-hl-pink .player-team-inline {
  color: #f9a8d4 !important;
}

.waiver-line {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  margin-top: 5px;
}

#tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px;
}
.tab-btn {
  flex: 1;
  padding: 7px 0;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn:hover { background: #243044; color: #94a3b8; }
.tab-btn.active { background: #3b82f6; color: #fff; }

.rankings-toolbar {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 10px;
  gap: 8px;
}

.pos-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px;
  min-width: 0;
}

.pos-tab {
  padding: 5px 7px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.pos-tab:hover { background: #243044; color: #94a3b8; }
.pos-tab.active { background: #334155; color: #f1f5f9; }

.sort-dropdown-wrap {
  position: relative;
}

.sort-option.sort-divider { }
.sort-option.sort-divider:hover { }

.league-picker {
  position: absolute;
  right: 0;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  overflow: hidden;
  z-index: 201;
  min-width: 220px;
  max-height: 300px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.league-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #334155;
  flex-shrink: 0;
}

.league-picker-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

#league-picker-list,
.league-picker-list {
  overflow-y: auto;
}

.league-picker-search {
  padding: 7px 10px;
  border: none;
  border-bottom: 1px solid #334155;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 12px;
  outline: none;
  width: 100%;
  flex-shrink: 0;
}
.league-picker-search:focus { border-bottom-color: #3b82f6; }

.league-picker-item {
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 1px solid #0f172a;
  transition: background 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.league-picker-item:last-child { border-bottom: none; }
.league-picker-item:hover { background: #243044; color: #f1f5f9; }
.league-picker-item.active { color: #3b82f6; }

.sort-menu {
  position: absolute;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  display: none;
  flex-wrap: wrap;
}
.sort-menu.open { display: flex; }

.sort-option {
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  border-right: 1px solid #1e293b;
  white-space: nowrap;
  transition: background 0.1s;
  flex-shrink: 0;
}
.sort-option:hover { background: #243044; color: #f1f5f9; }
.sort-option.active { color: #3b82f6; }
.sort-option.hidden { display: none !important; }

.rankings-scope-label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
  min-height: 16px;
}

.sort-label-type {
  font-weight: 700;
  font-size: 12px;
  color: #86efac;
}

.sort-label-source {
  font-weight: 700;
  font-size: 12px;
  color: #93c5fd;
}

.sort-label-duration {
  font-weight: 700;
  font-size: 12px;
  color: #fca5a5;
}

#league-list.minimalist-mode .tag-row {
  display: none;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
}

.rank-row.selection-mode {
  padding-left: 4px;
}

.rank-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

#custom-scoring-panel {
  position: absolute;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px;
}
#custom-scoring-panel.hidden { display: none; }
.cs-overlay-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 9px;
  overflow: hidden;
  width: 100%;
  max-height: calc(100% - 24px);
  display: flex;
  flex-direction: column;
}

.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #334155;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.cs-profile-wrap {
  display: flex;
  gap: 4px;
  align-items: center;
}

.cs-select {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #f1f5f9;
  font-size: 12px;
  padding: 5px 8px;
  cursor: pointer;
  outline: none;
  max-width: 140px;
}

.cs-delete-btn {
  padding: 6px 8px;
  font-size: 12px;
}

.cs-apply {
  background: #3b82f6;
  color: #fff;
  border: none;
}
.cs-apply:hover { background: #2563eb; }

.cs-sections {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.cs-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 6px;
}

.cs-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cs-label {
  font-size: 12px;
  color: #94a3b8;
  flex: 1;
}

.cs-input {
  width: 70px;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 12px;
  text-align: right;
  outline: none;
  flex-shrink: 0;
}
.cs-input:focus { border-color: #3b82f6; }
.cs-input::-webkit-outer-spin-button,
.cs-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cs-input[type=number] { -moz-appearance: textfield; }

.glossary-trigger-btn {
  display: block;
  width: 100%;
  margin: 16px 0 6px;
  padding: 8px 0;
  background: transparent;
  border: 1px solid #1e293b;
  border-radius: 7px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.glossary-trigger-btn:hover {
  border-color: #334155;
  color: #94a3b8;
}

.glossary-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.glossary-modal {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55);
}
.glossary-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}
.glossary-modal-title {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}
.glossary-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 5px;
}
.glossary-modal-close:hover {
  color: #f1f5f9;
  background: #1e293b;
}
.glossary-modal-body {
  padding: 10px 14px 16px;
  overflow-y: auto;
}
.glossary-tab-section {
  border-bottom: 1px solid #1e293b;
}
.glossary-tab-section:last-child {
  border-bottom: none;
}
.glossary-tab-section summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  padding: 10px 2px;
  list-style: none;
}
.glossary-tab-section summary::-webkit-details-marker { display: none; }
.glossary-tab-section summary::before {
  content: "▸ ";
  display: inline-block;
  color: #3b82f6;
  transition: transform 0.15s ease;
}
.glossary-tab-section[open] > summary::before {
  transform: rotate(90deg);
}
.glossary-tab-body {
  padding: 0 0 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.glossary-empty {
  font-size: 11px;
  color: #475569;
  padding: 2px 0 6px;
}
.glossary-subsection {
  border: 1px solid #1e293b;
  border-radius: 7px;
  padding: 0 8px;
}
.glossary-subsection summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  padding: 7px 2px;
  list-style: none;
}
.glossary-subsection summary::-webkit-details-marker { display: none; }
.glossary-subsection summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}
.glossary-subsection[open] summary::before {
  transform: rotate(90deg);
}
.glossary-category-body {
  padding: 0 0 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.glossary-category {
  border-bottom: 1px solid #1e293b;
}
.glossary-category:last-child {
  border-bottom: none;
}
.glossary-category summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  padding: 6px 2px;
  list-style: none;
}
.glossary-category summary::-webkit-details-marker { display: none; }
.glossary-category summary::before {
  content: "▸ ";
  display: inline-block;
  color: #3b82f6;
  transition: transform 0.15s ease;
}
.glossary-category[open] > summary::before {
  transform: rotate(90deg);
}
.glossary-subcategory {
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 0 8px;
  margin-left: 4px;
}
.glossary-subcategory summary {
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 6px 2px;
  list-style: none;
}
.glossary-subcategory summary::-webkit-details-marker { display: none; }
.glossary-subcategory summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}
.glossary-subcategory[open] summary::before {
  transform: rotate(90deg);
}
.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 2px 8px;
}
.glossary-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 5px;
}
.glossary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.glossary-term {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}
.glossary-desc {
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  line-height: 1.4;
}

.player-chip-wrapper {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.chip-slot-label {
  font-size: 10px;
  opacity: 0.75;
  margin-left: 3px;
}
.chip-slot-btn {
  font-size: 10px;
  opacity: 0.6;
  cursor: pointer;
  padding: 0 2px;
}
.chip-slot-btn:hover { opacity: 1; }
.chip-slot-dropdown {
  position: absolute;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  overflow: visible;
  z-index: 300;
  min-width: 120px;
  box-shadow: 0 4px 16px #00000077;
}
.chip-slot-option {
  padding: 7px 12px;
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}
.chip-slot-option:first-child { border-radius: 7px 7px 0 0; }
.chip-slot-option:last-child  { border-radius: 0 0 7px 7px; }
.chip-slot-option:hover { background: #334155; color: #f1f5f9; }

.chip-exclude {
  background: #ef444420 !important;
  color: #ef4444 !important;
  border-color: #ef444455 !important;
}

.chip-slot-divider {
  height: 1px;
  background: #334155;
  margin: 2px 0;
}

.lm-section {
  padding: 6px 13px 8px;
  border-top: 1px solid #1e293b;
}
.lm-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 0;
  transition: color 0.15s;
}
.lm-toggle-row:hover { color: #94a3b8; }
.lm-chevron { font-size: 9px; color: #475569; }
.lm-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 5px;
}
.lm-list.hidden { display: none; }
.lm-name-row {
  font-size: 12px;
  color: #94a3b8;
  padding: 3px 0 3px 8px;
  border-left: 2px solid #334155;
}

.draft-adp-delta-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

