:root {
  color-scheme: dark;
  --bg: #050b14;
  --surface: #0b1523;
  --surface-2: #101e2e;
  --surface-3: #17283b;
  --line: #20344a;
  --text: #f5f8fb;
  --muted: #8fa4b9;
  --lime: #b8ff2c;
  --cyan: #37d9ff;
  --orange: #ffae35;
  --red: #ff5b6f;
  --purple: #b895ff;
  --radius: 16px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  --topbar-bg: rgba(5, 11, 20, 0.88);
  --field-bg: #07111f;
  --table-head: #0e1b2a;
  --board-bg: #081321;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf3f8;
  --surface: #ffffff;
  --surface-2: #f2f6fa;
  --surface-3: #e8f0f6;
  --line: #c9d6e2;
  --text: #0b1724;
  --muted: #5f7284;
  --lime: #71a800;
  --cyan: #007fa3;
  --orange: #c56b00;
  --red: #c72b46;
  --purple: #7752c7;
  --shadow: 0 18px 45px rgba(39, 65, 88, 0.12);
  --topbar-bg: rgba(255, 255, 255, 0.9);
  --field-bg: #f4f8fb;
  --table-head: #eaf1f7;
  --board-bg: #f6f9fb;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% -10%, rgba(55, 217, 255, 0.11), transparent 28rem),
    radial-gradient(circle at 93% 5%, rgba(184, 255, 44, 0.08), transparent 26rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(55, 217, 255, 0.45);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 12px clamp(16px, 2.5vw, 38px);
  border-bottom: 1px solid rgba(143, 164, 185, 0.16);
  background: var(--topbar-bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.brand-lockup,
.topbar-actions,
.panel-heading,
.pool-controls,
.selected-action,
.board-legend {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(184, 255, 44, 0.42);
  border-radius: 13px;
  color: #07111f;
  background: var(--lime);
  box-shadow: 0 0 24px rgba(184, 255, 44, 0.2);
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 2px;
  font-size: clamp(20px, 2vw, 29px);
  line-height: 1;
  letter-spacing: -0.04em;
}

h2 {
  margin-top: 3px;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.eyebrow,
.status-label,
.hero-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.live-pill,
.ghost-button {
  min-height: 38px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(184, 255, 44, 0.28);
  color: var(--lime);
  background: rgba(184, 255, 44, 0.07);
}

.live-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pulse 1.8s infinite;
}

.sync-pill.disconnected {
  color: var(--orange);
  border-color: color-mix(in srgb, var(--orange) 42%, transparent);
  background: color-mix(in srgb, var(--orange) 9%, transparent);
}

.sync-pill.disconnected span {
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
}

@keyframes pulse {
  50% { opacity: 0.4; }
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}

.ghost-button:hover {
  border-color: var(--cyan);
  background: var(--surface-2);
}

.install-sync-button {
  border-color: color-mix(in srgb, var(--lime) 55%, var(--line));
  color: #07111f;
  background: var(--lime);
}

.install-sync-button:hover {
  color: #07111f;
  border-color: var(--lime);
  background: color-mix(in srgb, var(--lime) 82%, white);
}

.danger-text {
  color: #ff8c99;
}

.status-rail {
  display: grid;
  max-width: 1800px;
  margin: 18px auto 0;
  padding: 0 clamp(14px, 2vw, 30px);
  grid-template-columns: 1.25fr 0.8fr 1.25fr 1fr 1fr;
  gap: 10px;
}

.status-card {
  display: flex;
  min-height: 90px;
  flex-direction: column;
  justify-content: center;
  padding: 15px 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(155deg, rgba(16, 30, 46, 0.92), rgba(9, 20, 33, 0.92));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.status-card strong {
  margin: 3px 0 2px;
  overflow: hidden;
  font-size: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-card > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.on-clock-card {
  border-color: rgba(255, 174, 53, 0.36);
  box-shadow: inset 3px 0 0 var(--orange);
}

.timer-card {
  position: relative;
  align-items: center;
  text-align: center;
}

.timer-card strong {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.timer-card strong.urgent {
  color: var(--red);
}

.timer-card button {
  position: absolute;
  right: 7px;
  bottom: 5px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.accent-card {
  border-color: rgba(184, 255, 44, 0.38);
  box-shadow: inset 3px 0 0 var(--lime);
}

.accent-card strong {
  color: var(--lime);
}

.jump-card div {
  display: flex;
  gap: 7px;
  margin-top: 6px;
}

.jump-card input,
.jump-card button,
.field-label select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--field-bg);
}

.jump-card input {
  min-width: 0;
  width: 100%;
  padding: 0 10px;
  font-weight: 800;
}

.jump-card button {
  padding: 0 14px;
  color: #07111f;
  border-color: var(--lime);
  background: var(--lime);
  font-weight: 900;
}

.command-grid {
  display: grid;
  max-width: 1800px;
  margin: 12px auto 0;
  padding: 0 clamp(14px, 2vw, 30px);
  grid-template-columns: minmax(310px, 0.92fr) minmax(560px, 1.8fr) minmax(285px, 0.86fr);
  gap: 12px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 21, 35, 0.94);
  box-shadow: var(--shadow);
}

:root[data-theme="light"] .panel,
:root[data-theme="light"] .status-card {
  background: rgba(255, 255, 255, 0.95);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at 8% -10%, rgba(0, 127, 163, 0.09), transparent 28rem),
    radial-gradient(circle at 93% 5%, rgba(113, 168, 0, 0.08), transparent 26rem),
    var(--bg);
}

.recommendations-panel,
.player-panel,
.manager-radar-panel,
.roster-panel,
.sources-panel,
.board-panel {
  padding: 18px;
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 15px;
}

.field-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-label select {
  min-width: 130px;
  padding: 0 30px 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-pick {
  position: relative;
  display: grid;
  min-height: 151px;
  padding: 18px;
  overflow: hidden;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(184, 255, 44, 0.4);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(184, 255, 44, 0.18), transparent 56%),
    linear-gradient(145deg, #10271f, #0b1820);
}

:root[data-theme="light"] .hero-pick {
  background:
    radial-gradient(circle at 100% 0, rgba(113, 168, 0, 0.14), transparent 56%),
    linear-gradient(145deg, #f2fae8, #f6fbfd);
}

:root[data-theme="light"] .hero-copy > p { color: #46665d; }
:root[data-theme="light"] .reason-row span { color: #395700; }

.hero-pick::after {
  position: absolute;
  right: -30px;
  bottom: -62px;
  width: 150px;
  height: 150px;
  border: 24px solid rgba(184, 255, 44, 0.05);
  border-radius: 50%;
  content: "";
}

.hero-rank {
  display: grid;
  width: 53px;
  height: 53px;
  place-items: center;
  border-radius: 12px;
  color: #07111f;
  background: var(--lime);
  font-size: 20px;
  font-weight: 950;
}

.hero-copy {
  min-width: 0;
}

.hero-copy h3 {
  margin: 4px 0 2px;
  overflow: hidden;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-copy > p {
  color: #bad0c9;
  font-size: 13px;
}

.reason-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.reason-row span {
  padding: 4px 7px;
  border: 1px solid rgba(184, 255, 44, 0.16);
  border-radius: 999px;
  color: #dbff98;
  background: rgba(184, 255, 44, 0.08);
  font-size: 10px;
  font-weight: 700;
}

.select-pick-button,
.selected-action button,
.row-pick-button {
  position: relative;
  z-index: 2;
  border: 0;
  color: #07111f;
  background: var(--lime);
  font-weight: 900;
}

.select-pick-button {
  grid-column: 1 / -1;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 9px;
}

.recommendation-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.recommendation-card {
  display: grid;
  width: 100%;
  min-height: 57px;
  padding: 7px 9px;
  grid-template-columns: 25px 42px 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-2);
  text-align: left;
}

.recommendation-card:hover {
  border-color: rgba(55, 217, 255, 0.44);
  background: var(--surface-3);
}

.recommendation-number {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.recommendation-name,
.roster-row > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.recommendation-name strong,
.recommendation-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-name small,
.availability small,
td small,
.roster-row small {
  color: var(--muted);
  font-size: 10px;
}

.availability {
  display: grid;
  text-align: right;
}

.availability strong {
  color: var(--cyan);
  font-size: 16px;
}

.position-chip {
  display: inline-grid;
  min-width: 35px;
  min-height: 25px;
  padding: 0 5px;
  place-items: center;
  border-radius: 7px;
  color: #06101d;
  font-size: 10px;
  font-weight: 950;
}

.pos-qb { background: var(--purple); }
.pos-rb { background: #61e9a5; }
.pos-wr { background: var(--cyan); }
.pos-te { background: var(--orange); }
.pos-k { background: #f596d4; }
.pos-dst { background: #bac8d6; }

.player-panel {
  min-width: 0;
}

.player-heading {
  align-items: flex-end;
}

.selected-action {
  max-width: 60%;
  gap: 8px;
}

.selected-action span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-action button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.selected-action button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.pool-controls {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.search-wrap {
  display: flex;
  min-width: 190px;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-height: 41px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--field-bg);
}

.search-wrap span {
  color: var(--cyan);
  font-size: 22px;
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.position-filters {
  display: flex;
  gap: 4px;
}

.position-filters button {
  min-width: 37px;
  min-height: 37px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--field-bg);
  font-size: 10px;
  font-weight: 900;
}

.position-filters button.active {
  color: #07111f;
  border-color: var(--cyan);
  background: var(--cyan);
}

.table-wrap {
  max-height: 593px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  position: sticky;
  z-index: 3;
  top: 0;
  background: var(--table-head);
}

th {
  padding: 10px 9px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 8px 9px;
  border-top: 1px solid rgba(32, 52, 74, 0.68);
  vertical-align: middle;
}

tbody tr {
  cursor: pointer;
  transition: background 100ms ease;
}

tbody tr:hover,
tbody tr.selected {
  background: rgba(55, 217, 255, 0.07);
}

tbody tr.selected {
  box-shadow: inset 3px 0 0 var(--cyan);
}

td > strong,
td > small {
  display: block;
}

.rank-cell {
  color: var(--text);
  font-weight: 900;
}

.rec-badge {
  display: block;
  width: fit-content;
  margin-top: 3px;
  padding: 2px 4px;
  border-radius: 4px;
  color: #07111f;
  background: var(--lime);
  font-size: 7px;
}

.row-pick-button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 9px;
}

.chance-meter {
  width: 55px;
  height: 4px;
  margin-bottom: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: #203146;
}

.chance-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--cyan));
}

.empty-table {
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.right-column {
  display: grid;
  gap: 12px;
}

.manager-radar-panel {
  display: grid;
  gap: 9px;
}

.radar-count {
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--orange) 35%, transparent);
  border-radius: 999px;
  color: var(--orange);
  background: color-mix(in srgb, var(--orange) 8%, transparent);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.radar-target {
  margin-top: -4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.manager-radar {
  display: grid;
  gap: 6px;
}

.radar-row {
  display: grid;
  padding: 9px;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.radar-manager {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.radar-manager strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-manager span,
.radar-row small,
.radar-empty,
.radar-more {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.radar-positions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.radar-position {
  padding: 3px 6px;
  border-radius: 5px;
  color: #06101d;
  font-size: 8px;
  font-weight: 950;
}

.radar-row p {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-row p strong { color: var(--cyan); }

.radar-more {
  padding: 3px 6px 0;
  text-align: center;
}

.survivor-panel {
  display: grid;
  padding-top: 9px;
  gap: 6px;
  border-top: 1px solid var(--line);
}

.survivor-list {
  display: grid;
  gap: 5px;
}

.survivor-list > div {
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 7px;
  font-size: 9px;
}

.survivor-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.survivor-list b {
  color: var(--lime);
  font-size: 11px;
}

.compact-heading {
  padding-bottom: 12px;
}

.roster-count {
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--lime);
  background: rgba(184, 255, 44, 0.08);
  font-size: 11px;
  font-weight: 800;
}

.keeper-banner {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid rgba(184, 255, 44, 0.25);
  border-radius: 10px;
  background: rgba(184, 255, 44, 0.07);
}

.keeper-banner span {
  color: var(--lime);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.keeper-banner strong {
  font-size: 16px;
}

.roster-rule-banner {
  display: grid;
  margin-top: 8px;
  padding: 9px 10px;
  grid-template-columns: 31px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--cyan) 38%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--cyan) 8%, transparent);
}

.roster-rule-banner > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 8px;
  color: #06101d;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 950;
}

.roster-rule-banner div {
  display: grid;
  gap: 1px;
}

.roster-rule-banner small {
  color: var(--cyan);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.roster-rule-banner strong {
  font-size: 11px;
}

.roster-list {
  display: grid;
  min-height: 58px;
  gap: 6px;
  margin-top: 10px;
}

.roster-row {
  display: grid;
  padding: 7px 8px;
  grid-template-columns: 37px 1fr;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
  background: var(--surface-2);
}

.needs-list {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.need-item {
  display: grid;
  gap: 1px;
  padding: 7px 4px;
  border: 1px solid rgba(255, 174, 53, 0.22);
  border-radius: 7px;
  color: var(--orange);
  background: rgba(255, 174, 53, 0.06);
  font-size: 10px;
  text-align: center;
}

.need-item.complete {
  color: #8fa4b9;
  border-color: var(--line);
  background: transparent;
}

.controls-panel {
  display: grid;
  padding: 12px;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.controls-panel button {
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 800;
}

.controls-panel button:hover {
  border-color: var(--cyan);
}

.controls-panel p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

kbd {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--field-bg);
  font: inherit;
}

.sources-panel {
  display: grid;
  gap: 9px;
}

.sources-panel > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.sources-panel strong {
  color: var(--text);
}

.source-note {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.board-panel {
  max-width: 1800px;
  margin: 12px auto 35px;
  padding-right: 18px;
  padding-left: 18px;
}

.board-heading {
  padding-bottom: 13px;
}

.board-legend {
  gap: 13px;
  color: var(--muted);
  font-size: 10px;
}

.board-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.keeper-dot { background: var(--purple); }
.bk-dot { background: var(--lime); }
.current-dot { background: var(--orange); }

.draft-board {
  display: grid;
  min-width: 1030px;
  gap: 4px;
}

.board-panel {
  overflow-x: auto;
}

.board-round {
  display: grid;
  grid-template-columns: 47px 1fr;
  gap: 4px;
}

.round-label,
.board-cell {
  min-height: 47px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--board-bg);
}

.round-label {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
}

.round-label strong {
  color: var(--text);
  font-size: 12px;
}

.round-picks {
  display: grid;
  grid-template-columns: repeat(12, minmax(76px, 1fr));
  gap: 4px;
}

.board-cell {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 5px 6px;
  overflow: hidden;
}

.board-cell span,
.board-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-cell span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.board-cell strong {
  margin-top: 2px;
  font-size: 9px;
}

.board-cell.keeper {
  border-color: rgba(184, 149, 255, 0.5);
  background: rgba(184, 149, 255, 0.11);
}

.board-cell.bk {
  border-color: rgba(184, 255, 44, 0.38);
  box-shadow: inset 0 -3px 0 rgba(184, 255, 44, 0.6);
}

.board-cell.current {
  color: #07111f;
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: 0 0 15px rgba(255, 174, 53, 0.27);
}

.board-cell.current span {
  color: #422700;
}

.board-cell.past:not(.keeper):not(.bk) {
  opacity: 0.5;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 25px;
  bottom: 25px;
  padding: 13px 17px;
  transform: translateY(25px);
  border: 1px solid rgba(184, 255, 44, 0.4);
  border-radius: 10px;
  color: #07111f;
  background: var(--lime);
  box-shadow: var(--shadow);
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.mock-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.mock-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mock-panel > p,
.brain-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.mode-badge {
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--cyan) 38%, transparent);
  border-radius: 999px;
  color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 9%, transparent);
  font-size: 9px;
  font-weight: 900;
}

.mode-badge.mock {
  color: var(--orange);
  border-color: color-mix(in srgb, var(--orange) 38%, transparent);
  background: color-mix(in srgb, var(--orange) 9%, transparent);
}

.mock-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.mock-actions button {
  min-height: 38px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 850;
}

.mock-actions button:hover { border-color: var(--cyan); }

.mock-batch-summary {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 86%, var(--cyan));
}

.mock-batch-summary > span,
.mock-batch-summary header span {
  color: var(--muted);
  font-size: 0.75rem;
}

.mock-batch-summary header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.mock-result-grid {
  display: grid;
  gap: 5px;
  margin-top: 4px;
}

.mock-result-grid > div {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 2px 7px;
  padding-top: 5px;
  border-top: 1px solid var(--border);
}

.mock-result-grid b {
  grid-row: 1 / span 2;
  color: var(--cyan);
}

.mock-result-grid span,
.mock-result-grid small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-result-grid span { font-size: 0.7rem; }
.mock-result-grid small { color: var(--muted); font-size: 0.68rem; }

.season-panel {
  display: grid;
  gap: 10px;
}

.season-fields {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
}

.season-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.season-fields input,
.season-panel textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  text-transform: none;
}

.season-panel > button {
  border: 0;
  border-radius: 9px;
  padding: 9px 11px;
  color: #00131a;
  background: var(--cyan);
  font-weight: 900;
  cursor: pointer;
}

.brain-launcher {
  position: fixed;
  z-index: 35;
  right: 24px;
  bottom: 22px;
  display: grid;
  min-width: 198px;
  min-height: 62px;
  padding: 9px 14px 9px 57px;
  border: 1px solid rgba(55, 217, 255, 0.5);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  text-align: left;
}

.brain-launcher > span {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  color: #07111f;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  font-weight: 950;
}

.brain-launcher strong { font-size: 13px; }
.brain-launcher small { color: var(--muted); font-size: 9px; }

.brain-drawer {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  display: grid;
  width: min(520px, 100vw);
  height: 100dvh;
  padding: 18px;
  transform: translateX(105%);
  grid-template-rows: auto auto auto auto 1fr auto auto;
  gap: 12px;
  border-left: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.38);
  transition: transform 180ms ease;
}

.brain-drawer.open { transform: translateX(0); }

.brain-drawer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brain-drawer > header button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 24px;
}

.provider-grid,
.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.provider-option {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 800;
}

.provider-option.offline { opacity: 0.42; }
.provider-option.connected { border-color: rgba(184, 255, 44, 0.38); }
.provider-option input { accent-color: var(--lime); }
.provider-option small { color: var(--muted); font-size: 8px; font-weight: 700; }
.provider-loading { color: var(--muted); font-size: 11px; }

.session-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.session-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 800;
}

.quick-prompts button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--cyan) 30%, var(--line));
  border-radius: 8px;
  color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 6%, var(--surface));
  font-size: 9px;
  font-weight: 800;
}

.chat-log {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  padding: 4px 3px;
  overflow-y: auto;
}

.chat-empty,
.chat-user,
.answer-card,
.local-answer {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 11px;
  line-height: 1.45;
}

.chat-empty span { color: var(--muted); }
.chat-user { margin-left: 42px; border-color: rgba(55, 217, 255, 0.3); }
.local-answer { border-color: rgba(184, 255, 44, 0.35); }
.answer-card.error { border-color: rgba(255, 91, 111, 0.35); }
.answer-card.running { border-color: rgba(55, 217, 255, 0.35); }
.answer-card header { display: flex; justify-content: space-between; color: var(--cyan); font-weight: 900; }
.answer-card header small { color: var(--muted); font-weight: 600; }
.answer-card p { white-space: pre-wrap; }

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.chat-form textarea {
  min-height: 54px;
  resize: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--field-bg);
}

.chat-form button {
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  color: #07111f;
  background: var(--lime);
  font-size: 11px;
  font-weight: 900;
}

.chat-form button:disabled { cursor: wait; opacity: 0.55; }

.drawer-scrim {
  position: fixed;
  z-index: 55;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.drawer-scrim.open { opacity: 1; pointer-events: auto; }

@media (max-width: 1300px) {
  .command-grid {
    grid-template-columns: minmax(300px, 0.9fr) minmax(540px, 1.7fr);
  }

  .right-column {
    grid-column: 1 / -1;
    grid-template-columns: 1.4fr 1.4fr 0.8fr 0.9fr 1fr;
  }
}

@media (max-width: 980px) {
  .topbar {
    position: static;
    align-items: flex-start;
    gap: 12px;
  }

  .live-pill {
    display: none;
  }

  .status-rail {
    grid-template-columns: repeat(3, 1fr);
  }

  .command-grid {
    grid-template-columns: 1fr;
  }

  .right-column {
    grid-column: auto;
    grid-template-columns: 1fr 1fr;
  }

  .roster-panel {
    grid-row: span 2;
  }

  .manager-radar-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .ghost-button {
    flex: 1;
  }

  .theme-toggle { flex: 0 0 auto; }

  .status-rail {
    grid-template-columns: 1fr 1fr;
  }

  .on-clock-card {
    grid-column: 1 / -1;
  }

  .jump-card {
    grid-column: 1 / -1;
  }

  .panel-heading,
  .pool-controls,
  .right-column {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .player-heading,
  .pool-controls {
    flex-direction: column;
  }

  .selected-action {
    width: 100%;
    max-width: none;
    justify-content: space-between;
  }

  .position-filters {
    overflow-x: auto;
  }

  .position-filters button {
    flex: 1;
  }

  .recommendation-card {
    grid-template-columns: 24px 38px 1fr;
  }

  .availability {
    display: none;
  }

  .table-wrap {
    max-height: 520px;
  }

  th:nth-child(5),
  td:nth-child(5) {
    display: none;
  }

  .board-legend {
    display: none;
  }

  .brain-launcher {
    right: 12px;
    bottom: 12px;
    min-width: 60px;
    width: 60px;
    padding: 0;
  }

  .brain-launcher strong,
  .brain-launcher small { display: none; }

  .chat-form { grid-template-columns: 1fr; }
  .chat-form button { min-height: 42px; }
}
