:root {
  color-scheme: dark;
  --bg: #0e0e10;
  --surface: #18181b;
  --surface-raised: #202024;
  --surface-soft: #131316;
  --border: #2d2d32;
  --border-strong: #3f3f46;
  --text: #fafafa;
  --text-muted: #c4c4cc;
  --text-faint: #a1a1aa;
  --accent: #3b82f6;
  --accent-bright: #60a5fa;
  --accent-dim: rgba(59, 130, 246, 0.16);
  --future: #a78bfa;
  --future-bright: #c4b5fd;
  --future-dim: rgba(167, 139, 250, 0.16);
  --success: #34d399;
  --danger: #fb7185;
  --warning: #fbbf24;
  --radius: 14px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 85% -15%, rgba(59, 130, 246, 0.12), transparent 30rem),
    var(--bg);
  font-family: var(--font);
  line-height: 1.45;
}

button, input, select {
  font: inherit;
}

button, select {
  cursor: pointer;
}

button, input, select, summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid rgba(96, 165, 250, 0.65);
  outline-offset: 2px;
}

button:disabled, select:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  color: var(--text);
  background: var(--accent);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(1rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.9rem max(1rem, env(safe-area-inset-left));
}

.brand {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.05em;
}

.eyebrow {
  margin: 0 0 0.08rem;
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text-muted);
  background: var(--surface);
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.icon-button svg, .search-control svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.is-loading svg {
  animation: spin 0.75s linear infinite;
}

.draft-status {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  min-height: 3.65rem;
  padding: 0.65rem max(1rem, env(safe-area-inset-right)) 0.65rem max(1rem, env(safe-area-inset-left));
  border-block: 1px solid var(--border);
  background: rgba(14, 14, 16, 0.92);
  backdrop-filter: blur(16px);
}

.connection-dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: 0 0 0 4px rgba(113, 113, 122, 0.12);
}

.connection-dot.live {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.13);
}

.connection-dot.loading, .connection-dot.cached {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.13);
}

.connection-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.13);
}

.status-copy {
  min-width: 0;
}

.status-copy strong, .status-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-copy strong {
  font-size: 0.84rem;
}

.status-copy span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.status-metrics {
  display: none;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.status-metrics span + span {
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.app-shell {
  display: grid;
  gap: 1rem;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 1rem max(0.75rem, env(safe-area-inset-right)) calc(5.5rem + env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
}

.workspace, .players-panel, .roster-panel {
  min-width: 0;
}

.setup-card {
  margin-bottom: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.setup-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.4rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  list-style: none;
}

.setup-card summary::-webkit-details-marker {
  display: none;
}

.setup-title, .setup-summary {
  display: block;
}

.setup-title {
  font-size: 0.86rem;
  font-weight: 600;
}

.setup-summary {
  margin-top: 0.08rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.chevron {
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.2rem;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.setup-card[open] .chevron {
  transform: rotate(225deg);
}

.setup-grid {
  display: grid;
  gap: 0.9rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.field-group label {
  display: block;
  margin-bottom: 0.36rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.field-group label span {
  color: var(--text-faint);
  font-weight: 400;
}

input, select {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface-soft);
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 1.16rem, calc(100% - 10px) 1.16rem;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
}

.button {
  min-height: 2.75rem;
  border-radius: 9px;
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.button.secondary {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--surface-raised);
}

.button.secondary:hover {
  border-color: var(--accent);
}

.field-help, .setup-error {
  margin: 0.32rem 0 0;
  font-size: 0.75rem;
}

.field-help { color: var(--text-faint); }
.setup-error { color: var(--danger); padding: 0 1rem 1rem; }

.setup-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 1rem 0.9rem;
}

.workspace-view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-bottom: 0.8rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.workspace-view-tabs button {
  min-height: 2.75rem;
  border: 0;
  border-radius: 8px;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
}

.workspace-view-tabs button.active {
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.mobile-view-switch {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  left: max(0.75rem, env(safe-area-inset-left));
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.3rem;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(24, 24, 27, 0.94);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.mobile-view-switch button {
  min-height: 2.7rem;
  border: 0;
  border-radius: 9px;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 600;
}

.mobile-view-switch button.active {
  color: var(--text);
  background: var(--surface-raised);
}

.mobile-view-switch span {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  min-height: 1.35rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  color: var(--accent-bright);
  background: var(--accent-dim);
  font-size: 0.75rem;
}

body[data-mobile-view="roster"] .players-panel,
body[data-mobile-view="roster"] .curve-panel,
body[data-mobile-view="roster"] .workspace-view-tabs {
  display: none;
}

body[data-mobile-view="players"] .roster-panel {
  display: none;
}

.players-panel, .curve-panel, .roster-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(24, 24, 27, 0.8);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.17);
}

.player-toolbar {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.search-control {
  position: relative;
  display: block;
}

.search-control svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  color: var(--text-faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-control input {
  padding-left: 2.25rem;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.position-tabs {
  display: flex;
  min-width: 0;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.position-tabs::-webkit-scrollbar { display: none; }

.position-tabs button {
  min-width: 2.45rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
}

.position-tabs button.active {
  color: var(--text);
  background: var(--accent-dim);
}

.toggle-control {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
  cursor: pointer;
}

.toggle-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle {
  position: relative;
  width: 2rem;
  height: 1.12rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-soft);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 0.17rem;
  left: 0.18rem;
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.16s ease, background 0.16s ease;
}

.toggle-control input:checked + .toggle {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.toggle-control input:checked + .toggle::after {
  background: var(--accent-bright);
  transform: translateX(0.83rem);
}

.toggle-control input:focus-visible + .toggle {
  outline: 3px solid rgba(96, 165, 250, 0.65);
  outline-offset: 2px;
}

.text-button {
  margin-left: auto;
  padding: 0;
  border: 0;
  color: var(--text-muted);
  background: transparent;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15rem;
}

.text-button.forget-button {
  min-height: 2.75rem;
  margin-left: 0;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 600;
}

.player-table-wrap {
  width: 100%;
  overflow: clip;
}

.player-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.player-table th {
  position: sticky;
  top: 3.65rem;
  z-index: 20;
  padding: 0;
  border-bottom: 1px solid var(--border-strong);
  background: var(--surface-raised);
}

.player-table .numeric-column {
  width: 5rem;
  text-align: right;
}

.player-table th button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  border: 0;
  color: var(--text-faint);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.player-table th.numeric-column button {
  justify-content: flex-end;
  text-align: right;
}

.player-table th button:hover,
.player-table th button.active {
  color: var(--text);
}

.sort-indicator {
  display: inline-block;
  width: 0.7rem;
  color: var(--accent-bright);
  font-size: 0.8rem;
  line-height: 1;
  text-align: center;
}

.player-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.player-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.player-row.selected {
  background: var(--accent-dim);
  box-shadow: inset 3px 0 0 var(--warning);
}

.player-row:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: -2px;
}

.player-row:last-child {
  border-bottom: 0;
}

.player-row td {
  height: 3rem;
  padding: 0.4rem 0.65rem;
  vertical-align: middle;
}

.player-row.drafted {
  opacity: 0.48;
}

.player-row.drafted.selected {
  opacity: 0.72;
}

.player-row.drafted .player-name {
  text-decoration: line-through;
}

.player-identity {
  min-width: 0;
}

.player-name {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-meta {
  display: block;
  overflow: hidden;
  margin-top: 0.08rem;
  color: var(--text-faint);
  font-size: 0.68rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-position {
  color: var(--text-muted);
  font-weight: 700;
}

.player-row td.numeric-column {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.player-row td.dynasty-number {
  color: var(--future-bright);
}

.drafted-badge {
  color: var(--danger);
  font-weight: 600;
}

.empty-state {
  margin: 0;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

.loading-row td {
  height: 3rem;
  padding: 0.65rem;
}

.loading-row span {
  display: block;
  height: 0.65rem;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--surface-raised), var(--border), var(--surface-raised));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.loading-row td:nth-child(2) span,
.loading-row td:nth-child(3) span {
  width: 2.5rem;
  margin-left: auto;
}

.curve-panel {
  min-width: 0;
  overflow: hidden;
}

.curve-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 0.9rem 0.7rem;
}

.curve-heading h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.curve-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.65rem;
  color: var(--text-faint);
  font-size: 0.65rem;
}

.curve-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.curve-legend i {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  background: var(--accent-bright);
}

.curve-legend .drafted-key { background: #71717a; }
.curve-legend .pick-key { background: var(--success); }

.curve-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  padding: 0 0.75rem 0.55rem;
  border-bottom: 1px solid var(--border);
}

.curve-position-tabs {
  display: flex;
  min-width: 0;
  gap: 0.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.curve-position-tabs::-webkit-scrollbar { display: none; }

.curve-position-tabs button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.65rem;
  border: 0;
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 700;
}

.curve-position-tabs button.active {
  color: var(--text);
  background: var(--accent-dim);
}

.curve-depth-toggle {
  min-height: 2.75rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text-muted);
  background: var(--surface-soft);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.curve-depth-toggle[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.curve-depth-note {
  margin: 0;
  padding: 0.45rem 0.9rem 0;
  color: var(--text-faint);
  font-size: 0.67rem;
}

.value-curve-figure {
  width: 100%;
  margin: 0;
  overflow: hidden;
}

.value-curve-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 290px;
  overflow: visible;
  touch-action: manipulation;
  user-select: none;
}

.curve-grid line {
  stroke: var(--border);
  stroke-width: 1;
}

.curve-grid text {
  fill: var(--text-faint);
  font-family: var(--font);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.curve-grid .curve-axis-label {
  fill: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.curve-line {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.62;
  pointer-events: none;
}

.curve-point {
  stroke: var(--surface);
  stroke-width: 1.5;
  transition: r 0.12s ease, opacity 0.12s ease;
}

.curve-point.available {
  fill: var(--accent-bright);
  cursor: pointer;
}

.curve-point.drafted {
  fill: #71717a;
  opacity: 0.48;
  cursor: pointer;
}

.curve-point.selected {
  fill: var(--warning);
  stroke: var(--text);
  stroke-width: 2;
}

.curve-point.drafted.selected {
  fill: #71717a;
  stroke: var(--warning);
  stroke-width: 3;
  opacity: 1;
}

.curve-point:focus-visible {
  outline: none;
  stroke: var(--text);
  stroke-width: 3;
}

.curve-callout {
  pointer-events: none;
}

.curve-callout rect {
  fill: var(--surface-raised);
  stroke: var(--border-strong);
  stroke-width: 1;
}

.curve-callout text {
  fill: var(--text);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
}

.curve-pick-marker {
  stroke: var(--success);
  stroke-width: 1;
  stroke-dasharray: 3 5;
  opacity: 0.45;
}

.curve-pick-marker-dot {
  fill: var(--success);
}

.value-curve-figure figcaption,
.curve-pick-note {
  margin: 0;
  padding: 0 0.9rem;
  color: var(--text-faint);
  font-size: 0.69rem;
  line-height: 1.45;
}

.curve-pick-note {
  padding-top: 0.35rem;
  color: var(--text-muted);
}

.curve-player-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-height: 3rem;
  margin: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.curve-player-details strong {
  font-size: 0.8rem;
}

.curve-player-details span {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.curve-player-details .curve-selection-note {
  color: var(--warning);
}

.curve-clear-selection {
  align-self: flex-end;
  min-width: 3.5rem;
  min-height: 2.75rem;
  margin-top: 0.2rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 700;
}

.roster-panel {
  padding: 0.9rem;
}

.roster-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.roster-heading h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.roster-count {
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  color: var(--accent-bright);
  background: var(--accent-dim);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.roster-prompt, .roster-note {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.roster-prompt {
  margin-bottom: 0.7rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.roster-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.roster-slot {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  align-items: center;
  min-height: 3rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.slot-label {
  display: grid;
  align-self: stretch;
  place-items: center;
  border-right: 1px solid var(--border);
  color: var(--text-faint);
  background: rgba(32, 32, 36, 0.7);
  font-size: 0.75rem;
  font-weight: 700;
}

.slot-player {
  min-width: 0;
  padding: 0.35rem 0.5rem;
}

.slot-player strong, .slot-player span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-player strong {
  font-size: 0.75rem;
}

.slot-player span {
  margin-top: 0.08rem;
  color: var(--text-faint);
  font-size: 0.75rem;
}

.slot-empty {
  color: var(--text-faint);
  font-size: 0.75rem;
}

.roster-note {
  margin: 0.75rem 0 0;
}

.roster-extras {
  margin-top: 0.9rem;
}

.roster-extras h3 {
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

@media (min-width: 700px) {
  .draft-status {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-inline: max(1.5rem, calc((100vw - 1440px) / 2));
  }

  .status-metrics {
    display: flex;
  }

  .app-shell {
    padding-inline: 1.5rem;
  }

  .setup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-table .numeric-column { width: 6.5rem; }
  .player-table th button, .player-row td { padding-inline: 1rem; }

  .curve-player-details {
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
  }

  .curve-clear-selection {
    align-self: auto;
    margin-top: 0;
    margin-left: auto;
  }
}

@media (min-width: 960px) {
  .site-header {
    padding-inline: 2rem;
    padding-top: 1.25rem;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 1.15rem;
    padding: 1.2rem 2rem 2.5rem;
  }

  .workspace {
    display: grid;
    gap: 1rem;
  }

  .setup-card {
    margin-bottom: 0;
  }

  .setup-card[open] .setup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-view-switch {
    display: none;
  }

  body[data-mobile-view] .players-panel,
  body[data-mobile-view] .curve-panel,
  body[data-mobile-view] .roster-panel {
    display: block;
  }

  body[data-mobile-view="roster"] .workspace-view-tabs {
    display: grid;
  }

  .roster-panel {
    position: sticky;
    top: 4.85rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    padding: 1rem;
  }

  .roster-slots {
    grid-template-columns: 1fr;
  }

  .roster-slot {
    min-height: 2.8rem;
  }
}

@media (min-width: 1240px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 1.5rem;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .setup-card[open] .setup-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-toolbar {
    padding: 0.9rem 1rem;
  }

  .filter-row {
    padding-inline: 1rem;
  }

  .roster-panel {
    padding: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
