:root {
  --bg: #0b1014;
  --panel: #11191f;
  --panel-2: #152128;
  --muted: #1b2830;
  --border: #2b3a44;
  --text: #eef4f7;
  --text-muted: #9fb0bc;
  --accent: #2dd4bf;
  --accent-2: #a3e635;
  --green: #34d399;
  --red: #f87171;
  --yellow: #fbbf24;
  --warn: var(--yellow);
  --shadow: rgba(0, 0, 0, 0.34);
  --board-zoom: 1;
  --workspace-board-fr: 7fr;
  --workspace-player-fr: 3fr;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% -10%, rgba(45, 212, 191, 0.12), transparent 32rem),
    linear-gradient(180deg, #0c1216 0%, var(--bg) 45%);
  color: var(--text);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.app-header,
header {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(11, 16, 20, 0.92), rgba(11, 16, 20, 0.78));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  box-shadow: 0 4px 20px -2px var(--shadow);
}

.app-header h1,
header h1 {
  font-size: 18px;
  margin: 0;
  letter-spacing: 0;
}

.app-title-short {
  display: none;
}

.app-header .chip,
header .chip {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}

.container {
  display: grid;
  grid-template-columns: minmax(400px, var(--workspace-board-fr)) 10px minmax(350px, var(--workspace-player-fr));
  gap: 16px;
  padding: 16px;
  min-height: 0;
}

#draftBoardCard { grid-column: 1; }
.workspace-resize-handle { grid-column: 2; }
#bestAvailableCard { grid-column: 3; }

.workspace-resize-handle {
  position: relative;
  align-self: stretch;
  min-height: 320px;
  border-radius: 999px;
  cursor: col-resize;
  touch-action: none;
}

.workspace-resize-handle::before {
  position: absolute;
  inset: 0 -5px;
  content: '';
}

.workspace-resize-handle > span {
  position: sticky;
  top: 50vh;
  display: block;
  width: 4px;
  height: 54px;
  margin: 110px auto 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, .28);
  box-shadow: 0 0 0 1px rgba(7, 12, 16, .72);
  transition: width .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.workspace-resize-handle:hover > span,
.workspace-resize-handle:focus-visible > span,
.workspace-resize-handle.is-dragging > span {
  width: 6px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, .12);
}

body.workspace-resizing,
body.workspace-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

@media (min-width: 1201px) {
  .container.swapped {
    grid-template-columns: minmax(350px, var(--workspace-player-fr)) 10px minmax(400px, var(--workspace-board-fr));
  }

  .container.swapped #draftBoardCard { grid-column: 3; }
  .container.swapped .workspace-resize-handle { grid-column: 2; }
  .container.swapped #bestAvailableCard { grid-column: 1; }
}

.card {
  background: rgba(17, 25, 31, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  overflow: clip;
  box-shadow: 0 12px 26px -20px var(--shadow);
  min-width: 0;
}

.card header {
  position: initial;
  background: none;
  border: 0;
  padding: 12px;
}

.section-title {
  font-weight: 700;
  opacity: 0.95;
  letter-spacing: 0;
}

.subtle {
  color: var(--text-muted);
  font-size: 12px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap
}

label {
  font-size: 12px;
  opacity: 0.9
}

input,
select,
textarea,
button {
  background: rgba(7, 12, 16, 0.78);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
}

input[type="number"] {
  width: 90px
}

button {
  cursor: pointer
}

button:hover {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(36, 52, 61, 0.8);
}

button:active {
  transform: scale(0.97);
}

button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #07120f;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(45, 212, 191, 0.22);
}

button.primary:hover {
  box-shadow: 0 6px 16px rgba(45, 212, 191, 0.28);
  transform: translateY(-1px);
}

button.primary:active {
  transform: scale(0.97) translateY(0);
}

button.ghost {
  background: transparent;
  border-color: transparent;
}

button.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: transparent;
}

button.warn {
  background: rgba(33, 11, 11, 0.8);
  border-color: rgba(91, 25, 25, 0.8);
  color: #fca5a5
}

button.warn:hover {
  background: rgba(50, 15, 15, 0.9);
  border-color: #7f1d1d;
}

.stack {
  display: grid;
  gap: 8px
}

.pad {
  padding: 12px
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0
}

/* Draft board */
#board {
  overflow: auto;
  height: calc(100vh - 140px);
  padding: 8px
}

.board-zoom-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(7, 12, 16, 0.48);
  overflow: hidden;
}

.board-zoom-group button {
  border: 0;
  border-radius: 0;
  padding: 4px 8px;
  min-height: 28px;
  font-size: 12px;
}

.board-zoom-group .zoom-btn {
  font-weight: 700;
  min-width: 26px;
  padding: 4px 6px;
}

.board-zoom-group .zoom-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 44px;
  text-align: center;
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  user-select: none;
}

.board-zoom-group button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border: 1px solid var(--border);
  padding: calc(6px * var(--board-zoom, 1)) calc(8px * var(--board-zoom, 1));
}

th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 5
}

td {
  min-width: calc(140px * var(--board-zoom, 1));
  vertical-align: top;
}

#board td.jump-target {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  animation: jump-target-pulse .8s ease-out;
}

@keyframes jump-target-pulse {
  from { box-shadow: inset 0 0 0 6px rgba(45, 212, 191, .38); }
  to { box-shadow: inset 0 0 0 0 rgba(45, 212, 191, 0); }
}

.pick {
  display: grid;
  gap: 4px;
  font-size: 12px;
  border-left: 4px solid transparent;
  padding-left: 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.pick .slot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.pick .name {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.pick .pick-in-round { color: #cbd5e1; }
.pick .overall-pick { opacity: .48; font-size: 9px; font-weight: 650; }

.pick .meta {
  font-size: 11px;
  opacity: 0.8
}

.current {
  outline: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2) inset, 0 0 12px rgba(34, 211, 238, 0.4);
}

.selected {
  outline: 2px solid var(--accent-2);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2) inset, 0 0 12px rgba(167, 139, 250, 0.4);
}

.bye-conflict {
  background: rgba(251, 191, 36, 0.1);
  outline: 1px solid var(--yellow);
}

/* Best available */
.player-panel {
  gap: 12px;
}

.player-toolbar {
  display: grid;
  gap: 8px;
}

.player-toolbar-expandable {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  max-height: 440px;
  opacity: 1;
  overflow: visible;
  transform: translateY(0);
  transition: max-height .2s ease, opacity .16s ease, transform .2s ease;
}

.draft-plan-toolbar,
.comparison-header,
.note-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.draft-plan-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.restore-player-chrome {
  min-height: 34px;
  padding: 5px 9px;
  white-space: nowrap;
}

.plan-view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  background: rgba(7, 12, 16, 0.48);
}

.plan-view-switch button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.plan-view-switch button.active {
  background: rgba(45, 212, 191, 0.16);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.32);
}

.plan-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  min-height: 19px;
  margin-left: 3px;
  padding-inline: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text);
  font-size: 10px;
}

.compare-status {
  min-height: 40px;
  white-space: nowrap;
}

.search-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input-wrap input {
  width: 100%;
  min-height: 42px;
  font-size: 15px;
  padding-right: 36px;
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.search-clear-btn:hover {
  background: rgba(148, 163, 184, 0.32);
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--text);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(7, 12, 16, 0.48);
}

.pos-segment {
  min-height: 32px;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.pos-segment:hover {
  background: rgba(255, 255, 255, 0.06);
}

.pos-segment.active {
  background: rgba(45, 212, 191, 0.16);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.32);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  min-width: 0;
}

.filter-grid select,
.advanced-filter-body select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.filter-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.check-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 700;
}

.check-option input {
  width: auto;
  margin: 0;
}

.filter-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
  color: var(--text-muted);
  font-size: 12px;
}

.filter-pill,
.need-chip,
.warning-chip,
.queue-chip,
.fade-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.need-chip {
  background: rgba(163, 230, 53, 0.16);
  color: #d9f99d;
}

.warning-chip {
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
}

.queue-chip {
  background: rgba(45, 212, 191, 0.16);
  color: #99f6e4;
}

.fade-chip {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

.insight-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  max-height: 44px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  opacity: 1;
  overflow: hidden;
  transform: translateY(0);
  transition: max-height .2s ease, opacity .16s ease, transform .2s ease;
}

#bestAvailableCard.player-chrome-collapsed .player-panel {
  gap: 4px;
  padding-top: 7px;
  padding-bottom: 7px;
}

#bestAvailableCard.player-chrome-collapsed .player-toolbar {
  gap: 4px;
}

#bestAvailableCard.player-chrome-collapsed .player-toolbar-expandable,
#bestAvailableCard.player-chrome-collapsed .insight-summary {
  max-height: 0;
  min-height: 0;
  padding-block: 0;
  border-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-6px);
}

.insight-summary-item {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
}

.insight-summary-item:first-child {
  flex: 1 1 auto;
}

.insight-summary-item:last-child {
  flex: 0 1 38%;
}

.insight-summary-item strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.insight-summary-item span {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-summary-separator {
  flex: 0 0 auto;
  color: rgba(148, 163, 184, .48);
}

.player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  border-left: 4px solid transparent;
  border-radius: 0;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.player:hover,
.player:focus-visible {
  background: rgba(45, 212, 191, 0.08);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.18);
  outline: none;
}

.player.player-need {
  background: linear-gradient(90deg, rgba(163, 230, 53, 0.05), transparent 46%);
}

.player.player-fade {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.06), transparent 52%);
}

.player.player-fade .player-main,
.player.player-fade .player-metrics {
  opacity: 0.68;
}

.player.player-queued {
  box-shadow: inset 3px 0 0 rgba(45, 212, 191, 0.78);
}

.player-main {
  min-width: 0;
}

.player-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player .name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-indicators {
  display: inline-flex;
  gap: 4px;
  flex: 0 0 auto;
}

.player .pos {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 11px;
  opacity: 1;
}

.player-metrics {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  gap: 6px;
  justify-self: stretch;
}

.player-metric {
  display: grid;
  gap: 1px;
  min-width: 58px;
  padding: 5px 7px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(7, 12, 16, 0.48);
  text-align: right;
}

.player-metric span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.player-metric strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.player-metric.muted strong {
  color: var(--text-muted);
}

.player-metric.estimated-metric {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(120, 53, 15, 0.16);
}

.player-metric.estimated-metric span {
  color: #fbbf24;
}

.player .score {
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
  font-weight: 600;
  font-size: 14px;
  text-align: right;
}

.player .score-label {
  font-size: 11px;
  opacity: 0.6;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
}

.player-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.player-actions button {
  min-height: 36px;
  min-width: 70px;
  padding: 8px 12px;
  font-weight: 800;
}

.player-plan-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 9px;
}

.player-plan-actions button {
  min-height: 36px;
  padding: 5px 9px;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.player-plan-actions button.active {
  border-color: rgba(45, 212, 191, 0.44);
  background: rgba(45, 212, 191, 0.13);
  color: #99f6e4;
}

.player-plan-actions button.fade-active {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(248, 113, 113, 0.11);
  color: #fecaca;
}

.queue-position {
  margin-right: auto;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.queue-move {
  min-width: 36px;
  padding-inline: 7px !important;
}

.player-note-preview {
  margin: 0 10px 9px;
  padding: 7px 9px;
  border-left: 2px solid rgba(167, 139, 250, 0.62);
  border-radius: 0 7px 7px 0;
  background: rgba(167, 139, 250, 0.07);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player.queue-dragging {
  opacity: 0.45;
}

.player.queue-drop-target {
  box-shadow: inset 0 2px 0 var(--accent);
}

.comparison-backdrop {
  position: fixed;
  inset: 0;
  z-index: 41;
  background: rgba(3, 8, 11, .68);
  backdrop-filter: blur(5px);
}

.comparison-backdrop[hidden],
.comparison-panel[hidden] { display: none; }

.comparison-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 42;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(760px, 82vw);
  height: 100dvh;
  overflow: hidden;
  border-left: 1px solid rgba(167, 139, 250, .38);
  background: linear-gradient(180deg, #121d24 0%, #0b1014 100%);
  box-shadow: -24px 0 70px rgba(0, 0, 0, .5);
  animation: comparison-drawer-enter .2s ease-out;
}

@media (min-width: 1201px) {
  .comparison-backdrop {
    background: rgba(3, 8, 11, .28);
    backdrop-filter: blur(1.5px);
  }

  .comparison-panel {
    width: min(680px, 48vw);
    border-left: 1px solid rgba(45, 212, 191, .35);
    box-shadow: -16px 0 48px rgba(0, 0, 0, .55);
  }
}

body.comparison-open { overflow: hidden; }

@keyframes comparison-drawer-enter {
  from { transform: translateX(28px); opacity: .7; }
  to { transform: translateX(0); opacity: 1; }
}

.comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.comparison-header strong {
  display: block;
  font-size: 18px;
}

.comparison-header-actions { display: flex; align-items: center; gap: 8px; }

.comparison-scroller {
  overflow: auto;
  overscroll-behavior: contain;
}

.comparison-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
}

.comparison-table th,
.comparison-table td {
  padding: 8px 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.11);
  border-bottom: 1px solid rgba(148, 163, 184, 0.11);
  text-align: left;
  vertical-align: top;
}

.comparison-table td.metric-best {
  color: #34d399;
  font-weight: 800;
  background: rgba(52, 211, 153, 0.08);
}

.comparison-draft-action {
  width: 100%;
  margin-top: 6px;
  min-height: 32px;
  font-size: 12px;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  width: 90px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison-player-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.comparison-player-heading strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.comparison-remove {
  min-width: 36px;
  min-height: 36px;
  padding: 3px 7px;
}

.comparison-note {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.comparison-note button {
  justify-self: start;
  min-height: 30px;
  padding: 4px 8px;
}

.note-panel {
  width: min(520px, 100%);
}

.note-editor textarea {
  width: 100%;
  resize: vertical;
  min-height: 130px;
}

.empty-state {
  display: grid;
  gap: 4px;
  padding: 24px 14px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
}

.empty-state-action {
  justify-self: center;
  max-width: 100%;
  min-height: 44px;
  margin-top: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.empty-state-target {
  font-size: 12px;
}

.scroller {
  max-height: calc(100vh - 220px);
  overflow: auto
}

.tag {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag.pos-chip {
  opacity: 1;
  font-weight: 700;
  letter-spacing: 0;
  border: none;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pick .meta {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px
}

details {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 8px
}

summary {
  cursor: pointer;
  opacity: 0.85
}

.help {
  font-size: 12px;
  opacity: 0.8;
  line-height: 1.4
}

.file-control {
  display: grid;
  gap: 4px;
  min-width: 260px;
}

.file-label {
  font-size: 12px;
  opacity: 0.9;
}

.icon-button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
}

#draftBoardCard .draft-board-header {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 56px);
  width: 100%;
  padding: 16px;
}

.draft-board-meta {
  min-width: 0;
}

.draft-board-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2vw, 28px);
  min-width: 0;
}

.draft-timer {
  display: none;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 6px 8px 6px 14px;
  font-variant-numeric: tabular-nums;
  background: rgba(7, 12, 16, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.timer-display {
  min-width: 4.1ch;
  text-align: right;
  font-size: clamp(22px, 1.5vw, 28px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  transition: color 0.25s ease;
}

.draft-timer.timer-warning .timer-display {
  color: var(--warn);
}

.draft-timer.timer-urgent .timer-display {
  color: var(--red);
  animation: timer-urgent-pulse 1s infinite alternate ease-in-out;
}

@keyframes timer-urgent-pulse {
  0% { opacity: 1; transform: scale(1); text-shadow: 0 0 0 transparent; }
  100% { opacity: 0.85; transform: scale(1.04); text-shadow: 0 0 8px rgba(248, 113, 113, 0.5); }
}

.draft-timer.timer-overtime .timer-display {
  color: var(--red);
}

.timer-toggle {
  min-width: 72px;
}

.draft-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(84px, auto));
  gap: 8px;
  align-items: center;
}

.draft-actions .icon-button,
.draft-timer .icon-button {
  min-height: 44px;
  padding: 8px 14px;
}

.draft-actions .icon-button {
  min-width: 84px;
}

.draft-actions .icon-button.ghost,
.draft-timer .icon-button.ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.12);
}

.draft-actions .icon-button:hover,
.draft-timer .icon-button:hover {
  background: rgba(36, 52, 61, 0.78);
  border-color: rgba(148, 163, 184, 0.32);
}

.pick-controls {
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(7, 12, 16, 0.36);
}

.setup-trigger {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-actions .setup-trigger {
  margin-left: 0;
}

.shortcuts-help {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
}

.shortcuts-help > summary {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.shortcuts-help > summary::-webkit-details-marker { display: none; }
.shortcuts-help > summary:hover { border-color: rgba(45, 212, 191, .45); color: var(--accent); }

.shortcuts-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 310px;
  max-height: min(640px, calc(100vh - 80px));
  overflow-y: auto;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 10px;
  background: #101a20;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .42);
}

.shortcuts-popover > strong { margin-bottom: 2px; font-size: 13px; }
.shortcuts-popover > small {
  margin-top: 3px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.shortcuts-popover > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: 12px; }
.shortcuts-popover kbd {
  flex: 0 0 auto;
  min-width: 28px;
  padding: 3px 6px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .04);
  color: #f8fafc;
  font: 700 11px ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
}

body.modal-open,
body.comparison-open {
  overflow: hidden;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 12, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  z-index: 40;
}

.overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.overlay-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: min(92vh, 960px);
  overflow: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
  background: #0f171d !important;
  background: linear-gradient(180deg, #131e26 0%, #0b1014 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.setup-panel {
  display: flex;
  flex-direction: column;
  width: min(1380px, 94vw);
  height: min(92vh, 1050px);
  overflow: hidden;
  background: #0f171d !important;
  background: linear-gradient(180deg, #131e26 0%, #0b1014 100%) !important;
  isolation: isolate;
  transform: none;
  transition: none;
}

@media (min-width: 1600px) {
  .setup-panel {
    width: min(1520px, 94vw);
    height: min(94vh, 1180px);
  }
}

.overlay.open .setup-panel {
  transform: none;
}

.overlay.open .overlay-panel {
  transform: translateY(0) scale(1);
}

.overlay-close {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.overlay-close:hover {
  background: rgba(148, 163, 184, 0.12);
}

/* --- Welcome Setup Wizard --- */
.welcome-wizard-panel {
  width: min(820px, 96vw);
  max-height: min(90dvh, 760px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.welcome-wizard-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.welcome-wizard-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.welcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.welcome-side-column {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.welcome-card {
  align-content: start;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
}

.welcome-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.welcome-option-card {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px;
}

.welcome-option-card .setup-subtle {
  margin-top: 4px;
  margin-left: 24px;
}

.welcome-cutoff-card {
  display: grid;
  gap: 10px;
}

.welcome-cutoff-card .welcome-cutoff-controls {
  display: grid;
  gap: 9px;
  margin-left: 24px;
  padding: 10px;
}

.welcome-cutoff-controls .setup-subtle {
  margin: -3px 0 0;
}

.welcome-team-name-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.welcome-team-name-list .team-name-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.welcome-team-name-list .team-name-index {
  height: 34px;
  font-size: 12px;
}

.welcome-team-name-list input {
  min-height: 34px;
  font-size: 13px;
  padding: 6px 10px;
}

.welcome-rankings-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

.welcome-rankings-card > legend {
  padding: 0 4px 0 0;
}

.welcome-ranking-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.welcome-ranking-option:hover {
  border-color: rgba(56, 189, 248, 0.38);
}

.welcome-ranking-option:has(input[type="radio"]:checked) {
  border-color: rgba(56, 189, 248, 0.62);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: inset 3px 0 0 var(--accent);
}

.welcome-ranking-option input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--accent);
}

.welcome-ranking-option strong,
.welcome-ranking-option small {
  display: block;
}

.welcome-ranking-option strong {
  font-size: 13px;
}

.welcome-ranking-option small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.welcome-custom-ranking-option {
  cursor: default;
}

.welcome-custom-ranking-option .welcome-import-actions {
  display: none;
}

.welcome-custom-ranking-option.is-selected .welcome-import-actions {
  display: grid;
}

.welcome-ranking-option-heading {
  display: contents;
}

.welcome-file-control {
  margin: 0;
  justify-self: start;
}

.welcome-import-actions {
  display: grid;
  grid-column: 2;
  justify-items: start;
  gap: 6px;
  min-width: 0;
}

.welcome-import-status-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  max-width: 100%;
}

.welcome-import-status {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
}

.welcome-import-status.is-ready {
  color: var(--accent);
}

.welcome-import-status.is-error {
  color: #fca5a5;
}

.welcome-import-status-row .text-button {
  flex: 0 0 auto;
}

.welcome-start-hint {
  min-height: 16px;
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.welcome-wizard-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(10, 16, 26, 0.7);
}

@media (max-width: 900px) {
  .welcome-grid {
    grid-template-columns: 1fr;
  }

  .welcome-wizard-header,
  .welcome-wizard-body,
  .welcome-wizard-footer {
    padding-inline: 16px;
  }

  .welcome-wizard-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .welcome-wizard-footer button {
    width: 100%;
  }

  .welcome-import-actions {
    justify-items: stretch;
  }

  .welcome-import-status-row {
    justify-content: space-between;
    max-width: none;
  }

  .welcome-import-status {
    text-align: left;
  }
}

.setup-panel-header {
  flex: 0 0 auto;
  padding: 18px 24px 14px;
  background: #121d24;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.setup-nav {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  padding: 12px 24px;
  overflow-x: auto;
  background: #101920;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.setup-nav button {
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.setup-nav button:hover,
.setup-nav button:focus-visible {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(45, 212, 191, 0.08);
  color: var(--text);
}

.setup-title-row {
  justify-content: space-between;
  width: 100%;
}

.setup-header-actions {
  gap: 8px;
}

.setup-scroll {
  display: grid;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 24px 24px;
  overflow: auto;
  background: #0b1014;
}

.setup-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 860px) {
  .setup-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.setup-summary-item {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(7, 12, 16, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.setup-summary-item span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.setup-summary-item strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

@media (min-width: 1400px) {
  .setup-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 22px;
  }
}

@media (max-width: 960px) {
  .setup-layout {
    grid-template-columns: 1fr;
  }
  #playersSetupSection {
    grid-row: auto;
  }
}

#leagueSetupSection,
#rosterSetupSection,
#teamsSetupSection,
#playersSetupSection,
#preferencesSetupSection {
  grid-column: 1;
}

#playersSetupSection {
  grid-row: 1 / span 2;
}

@media (max-width: 960px) {
  #leagueSetupSection,
  #playersSetupSection,
  #preferencesSetupSection {
    grid-column: auto;
    grid-row: auto;
  }
}

.setup-section {
  background: rgba(7, 12, 16, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 18px 20px;
}

.setup-section-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.optional-label {
  margin-left: 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.team-name-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.text-button {
  min-height: auto;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
}

.text-button:hover {
  background: transparent;
  text-decoration: underline;
}

.setup-validation,
.setup-impact-note {
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.setup-validation {
  border: 1px solid rgba(248, 113, 113, 0.34);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}

.setup-impact-note {
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.07);
  color: #fde68a;
}

.setup-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.setup-check:hover {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.045);
}

.setup-check input {
  width: auto;
  flex: 0 0 auto;
}

.field-group {
  display: grid;
  gap: 10px;
}

.field-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.setup-label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.setup-label input,
.setup-label select,
.setup-label textarea {
  width: 100%;
}

.setup-subtle {
  font-size: 12px;
  opacity: 0.72;
  margin-top: -2px;
  line-height: 1.45;
}

.setup-sub-section {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 6px;
  margin-left: 0;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  transition: opacity var(--transition-fast);
}

.setup-sub-section.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.setup-sub-section select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.35;
}

.cutoff-policy-editor {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.cutoff-policy-editor strong {
  font-size: 13px;
}

.cutoff-policy-editor .setup-subtle {
  margin: 3px 0 0;
}

.cutoff-rule-list {
  display: grid;
  gap: 8px;
}

.cutoff-rule-card {
  display: grid;
  grid-template-columns: minmax(145px, 0.7fr) minmax(240px, 1.3fr) auto;
  gap: 10px;
  align-items: end;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.cutoff-rule-range {
  align-self: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.cutoff-rule-range label {
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr);
  gap: 8px;
  align-items: center;
}

.cutoff-rule-range input {
  width: 100%;
  min-height: 38px;
}

.cutoff-rule-card .setup-label {
  gap: 4px;
}

.cutoff-remove-rule {
  min-height: 38px;
  padding-inline: 10px;
}

.cutoff-add-rule {
  justify-self: start;
}

.cutoff-counts-summary {
  margin: 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: rgba(45, 212, 191, 0.08);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .cutoff-rule-card {
    grid-template-columns: 1fr auto;
  }

  .cutoff-rule-card .setup-label {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .cutoff-remove-rule {
    grid-column: 2;
    grid-row: 1;
  }
}

.setup-cta {
  align-self: end;
  min-height: 44px;
  font-weight: 700;
  font-size: 14px;
}

.setup-footer-actions,
.setup-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.setup-footer-actions>button,
.setup-actions>button {
  flex: 1;
  min-width: 150px;
}

.setup-help {
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.26);
  border-radius: 8px;
  padding: 10px 12px;
}

.import-status {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.1), transparent 9rem),
    rgba(45, 212, 191, 0.07);
  color: var(--text-muted);
  font-size: 12px;
}

.import-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.import-status-info {
  display: grid;
  gap: 4px;
}

.player-preview-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 999px;
  color: var(--accent, #2dd4bf);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.player-preview-toggle:hover {
  background: rgba(45, 212, 191, 0.22);
  border-color: rgba(45, 212, 191, 0.5);
  color: #fff;
}

.player-preview-toggle.is-expanded {
  background: rgba(45, 212, 191, 0.2);
  border-color: rgba(45, 212, 191, 0.5);
}

.preview-toggle-icon {
  transition: transform 0.2s ease;
}

.player-preview-toggle.is-expanded .preview-toggle-icon {
  transform: rotate(180deg);
}

.player-preview-inline {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(45, 212, 191, 0.18);
}

.player-preview-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 8px;
  width: min(340px, calc(100vw - 48px));
  background: #0d151c;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
}

.player-preview-popover.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.import-status.import-status-error {
  border-color: rgba(248, 113, 113, 0.36);
  background:
    radial-gradient(circle at 100% 0%, rgba(248, 113, 113, 0.12), transparent 9rem),
    rgba(248, 113, 113, 0.07);
}

.import-status strong {
  color: var(--text);
  font-size: 13px;
}

.import-panel {
  border-color: rgba(45, 212, 191, 0.28);
}

.import-dropzone {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px dashed rgba(45, 212, 191, 0.42);
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.05);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.import-dropzone:hover {
  border-color: rgba(45, 212, 191, 0.7);
  background: rgba(45, 212, 191, 0.08);
}

.import-dropzone.dragging {
  border-color: var(--accent);
  background: rgba(45, 212, 191, 0.12);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

.import-dropzone-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.import-dropzone-copy {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.import-dropzone input[type='file'] {
  width: 100%;
  margin-top: 2px;
}

.player-help-tools {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.player-help-tools summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.player-help-tools summary:hover {
  background: rgba(255, 255, 255, 0.035);
}

.player-help-tools-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.player-help-tools-body .setup-subtle {
  margin: 0;
  line-height: 1.45;
}

.player-help-tools-protected {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.06);
}

.player-help-tools-protected summary {
  color: #fde68a;
}

.player-help-tools-body .supported-columns {
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 6px;
}

.player-help-tools-body .supported-columns summary {
  font-size: 12px;
  padding: 8px 10px;
}

.player-help-tools-body .supported-columns p {
  padding: 0 10px 10px;
  font-size: 11px;
  margin: 0;
}

.setup-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 14px;
  margin-bottom: 8px;
}

.player-preview {
  display: grid;
  gap: 8px;
}

.player-preview:empty,
.player-preview[hidden] {
  display: none !important;
}

.player-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 12px;
}

.player-preview-heading strong {
  color: var(--text);
  font-size: 13px;
}

.player-preview-list {
  display: grid;
  gap: 6px;
}

.player-preview-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
}

.player-preview-row strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-preview-rank,
.player-preview-meta {
  color: var(--text-muted);
}

.teams-section-layout {
  display: grid;
  gap: 12px;
}

.my-team-panel {
  padding: 12px 14px;
  background: rgba(45, 212, 191, 0.05);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 10px;
}

.team-name-wrap {
  align-content: start;
}

.team-name-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.team-name-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  max-height: min(380px, 45vh);
  overflow: auto;
  padding-right: 6px;
}

.team-name-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.team-name-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 800;
}

.team-name-row input {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  padding-block: 6px;
  font-size: 13px;
  font-weight: 600;
}

.roster-base-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 800px) {
  .roster-base-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.roster-pos-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  text-align: center;
  transition: border-color 0.15s ease;
}

.roster-pos-card:hover {
  border-color: rgba(148, 163, 184, 0.32);
}

.roster-pos-card input {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  min-height: 36px;
}

.roster-pos-badge,
.pos-badge,
.flex-pos-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pos-QB { background: rgba(59, 130, 246, 0.18); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.35); }
.pos-RB { background: rgba(34, 197, 94, 0.18); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.35); }
.pos-WR { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.35); }
.pos-TE { background: rgba(249, 115, 22, 0.18); color: #fdba74; border: 1px solid rgba(249, 115, 22, 0.35); }
.pos-K { background: rgba(234, 179, 8, 0.18); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.35); }
.pos-DST { background: rgba(20, 184, 166, 0.18); color: #5eead4; border: 1px solid rgba(20, 184, 166, 0.35); }

.flex-config {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  display: block;
}

.flex-config legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.flex-config-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 16px 32px;
  margin-bottom: 8px;
}

.flex-config .flex-count {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.flex-config .flex-count input {
  width: 70px;
  max-width: 70px;
  text-align: center;
  min-height: 36px;
  font-size: 15px;
  font-weight: 700;
}

.flex-eligibility-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.flex-eligibility-wrap > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.flex-eligibility {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.flex-eligibility .check-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  min-height: 36px;
  min-width: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.flex-eligibility .check-option:hover {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.flex-eligibility .check-option input {
  margin: 0;
  cursor: pointer;
}

.timer-primary-controls {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  align-items: center;
}

@media (max-width: 640px) {
  .timer-primary-controls {
    grid-template-columns: 1fr;
  }
}

.roster-color-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

@media (max-width: 800px) {
  .roster-color-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.color-pos-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
}

.color-pos-card input[type='color'] {
  width: 100%;
  min-height: 38px;
  height: 38px;
  padding: 3px;
  border-radius: 6px;
  cursor: pointer;
}

.roster-grid label,
.color-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}

.roster-grid input {
  width: 100%;
}

.color-grid input[type='color'] {
  width: 100%;
  min-height: 38px;
  padding: 3px;
}

.setup-upload-grid {
  display: grid;
  gap: 10px;
}

.setup-upload-grid .file-control {
  min-width: 100%;
}

.setup-upload-grid .file-control input[type='file'] {
  width: 100%;
}

.setup-upload-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.compact-actions {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.danger-zone {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(40, 12, 14, 0.5);
}

.setup-section details {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 8px;
}

.setup-section details:last-child {
  margin-bottom: 0;
}

.setup-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.setup-section summary:hover {
  background: rgba(255, 255, 255, 0.035);
}

.setup-section summary::-webkit-details-marker {
  display: none;
}

.setup-section summary::after {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.12);
  font-weight: 800;
  font-size: 14px;
}

.setup-section details[open] summary::after {
  content: '-';
}

.setup-section details> :not(summary) {
  padding-inline: 14px;
  padding-bottom: 14px;
}

.advanced-detail-body {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.setup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 14px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(7, 12, 16, 0.94);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.22);
}

.setup-footer-note {
  color: var(--text-muted);
  font-size: 12px;
}

.setup-footer-actions {
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 380px;
}

.setup-footer-actions > button {
  min-width: 140px;
}

.setup-footer-actions button:disabled {
  cursor: not-allowed;
  filter: saturate(0.4);
  opacity: 0.5;
}

.data-panel {
  width: min(720px, 100%);
  overflow: hidden;
}

.data-panel-body {
  display: grid;
  gap: 14px;
  max-height: calc(92vh - 84px);
  padding: 16px 18px 18px;
  overflow: auto;
  background: #0b1014;
}

footer:not(.setup-footer) {
  padding: 8px 12px;
  opacity: 0.7;
  font-size: 12px
}

@media (max-width: 1200px) {
  .container {
    grid-template-columns: 1fr;
  }

  .container>.card:first-child {
    order: 2;
    /* Draft board goes below on small screens */
  }

  .container>.card:last-child {
    order: 1;
    /* Player selection goes above on small screens */
  }
}

@media (max-width: 900px) {

  #draftBoardCard .draft-board-header {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
  }

  .draft-board-tools {
    justify-content: space-between;
  }

  .draft-timer {
    flex: 1 1 180px;
    justify-content: space-between;
  }

  .draft-actions {
    flex: 1 1 360px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .draft-actions .icon-button {
    min-width: 0;
    padding-inline: 10px;
  }
}

@media (max-width: 640px) {
  header {
    flex-wrap: wrap;
    gap: 8px;
  }

  #draftBoardCard .draft-board-header {
    padding: 14px 12px;
  }

  .draft-board-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .draft-timer {
    flex: 0 0 auto;
    width: 100%;
  }

  .draft-actions {
    flex: 0 0 auto;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .draft-actions .icon-button {
    width: 100%;
  }

  .setup-trigger {
    margin-left: 0;
  }

  .overlay {
    padding: 12px;
    background: rgba(4, 8, 12, 0.88);
  }

  #setupOverlay {
    padding: 0;
  }

  .overlay-panel {
    max-height: 94vh;
  }

  .setup-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
    transform: none;
    transition: none;
  }

  .overlay.open .setup-panel { transform: none; }

  .setup-panel-header,
  .setup-nav,
  .setup-scroll,
  .setup-footer {
    padding-inline: 12px;
  }

  .setup-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .setup-summary-item:last-child {
    grid-column: auto;
  }

  .setup-layout {
    grid-template-columns: 1fr;
  }

  .team-name-list {
    grid-template-columns: 1fr;
  }

  .roster-base-grid,
  .roster-color-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .setup-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-footer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 0 0 auto;
  }

  .setup-footer-actions>button {
    min-width: 0;
    width: 100%;
  }

  .setup-footer-actions .setup-cta {
    grid-column: 2;
    grid-row: 1;
  }

  .setup-footer-actions #setupCancelBtn {
    grid-column: 1;
    grid-row: 1;
  }

  .player {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .player-metrics {
    grid-column: auto;
    justify-self: stretch;
    grid-template-columns: repeat(3, 1fr);
  }

  .player-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .player-actions button {
    width: 100%;
  }

  .segmented-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-options {
    display: grid;
    grid-template-columns: 1fr;
  }

  .check-option,
  .filter-options button {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 900px) {

  .setup-summary {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .setup-layout,
  .setup-upload-actions,
  .field-grid-2,
  .field-grid-3,
  .grid-4,
  .grid-3,
  .grid-2,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  #leagueSetupSection,
  #rosterSetupSection,
  #teamsSetupSection,
  #playersSetupSection,
  #preferencesSetupSection {
    grid-column: 1;
    grid-row: auto;
  }

  .setup-actions>button {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .setup-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Summary overlay */
.summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  background: var(--bg);
  padding: 12px;
  border-radius: 8px;
}

.summary-team {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}

.summary-team-name {
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  text-align: center;
}

.summary-player {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
}

.summary-player:last-child {
  border-bottom: none;
}

.summary-player-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.summary-player-pos {
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  background: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.player.keeper-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border-top: 0;
  border-right: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  border-left-width: 4px;
  border-left-style: solid;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.player.keeper-result:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  box-shadow: 0 0 0 2px #071013;
}

.keeper-result-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 7px;
  background: var(--accent);
  color: #041021;
  font-size: 12px;
  font-weight: 800;
}

.write-in-panel {
  flex: 0 0 auto;
  border: 1px solid rgba(45, 212, 191, .28);
  border-radius: 9px;
  background: rgba(45, 212, 191, .045);
}

.write-in-panel > summary {
  min-height: 44px;
  padding: 11px 12px;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.write-in-panel[open] {
  margin-bottom: 24px;
}

.write-in-panel[open] > summary {
  border-bottom: 1px solid rgba(45, 212, 191, .2);
}

.write-in-form {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.write-in-form p {
  margin: 0;
}

.write-in-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.write-in-team-container {
  position: relative;
  width: 100%;
}

.write-in-team-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 190px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--card-bg, #0d1a2d);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.55), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

.write-in-team-suggestions.open-above {
  top: auto;
  bottom: calc(100% + 4px);
  box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.55), 0 -8px 10px -6px rgba(0, 0, 0, 0.5);
}

.team-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text, #e2e8f0);
  transition: background 0.12s ease;
}

.team-suggestion-item:hover,
.team-suggestion-item.active {
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
}

.team-suggestion-name {
  font-weight: 600;
}

.team-suggestion-code {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--subtle, #94a3b8);
}

.team-suggestion-item.active .team-suggestion-code {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.write-in-actions button {
  min-height: 44px;
}

.write-in-error {
  min-height: 18px;
  color: #fecaca;
  font-size: 12px;
  font-weight: 700;
}

.write-in-form [aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, .16);
}

#keeperOverlay #keeperResults {
  height: auto;
}

@media (max-width: 640px) {
  #keeperOverlay .overlay-panel {
    max-height: calc(100dvh - 24px);
  }

  #keeperOverlay .pad {
    overflow-y: auto;
  }

  .write-in-actions {
    grid-template-columns: 1fr;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: var(--draft-selection-toast-bottom, 24px);
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
  pointer-events: none;
}

body.modal-open .toast-container {
  bottom: 112px;
}

@media (max-width: 640px) {
  body.modal-open .toast-container {
    right: 12px;
    bottom: 180px;
    left: 12px;
  }

  body.modal-open .toast {
    max-width: none;
  }
}

.toast {
  background: var(--panel);
  border-left: 4px solid var(--accent);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: auto;
  max-width: 320px;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
}

.toast.toast-error {
  border-left-color: var(--red);
}

.toast.toast-warning {
  border-left-color: var(--yellow);
}

.toast.toast-out {
  animation: toast-out 0.2s ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
}

/* Pick animations */
.pick {
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Roster FLEX configuration and keyboard navigation */
.roster-base-grid {
  margin-top: 8px;
}

#board td[role="button"]:focus-visible,
#board th[role="button"]:focus-visible,
.player[role="button"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

#board td[role="button"],
#board .team-heading {
  cursor: pointer;
}
/* Draft-day workflow refresh */
.league-chips {
  display: flex;
  align-items: center;
  gap: 8px;
}

.local-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 12px;
}

.local-status.save-status-error {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .4);
  background: rgba(127, 29, 29, .28);
}

.local-status > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.draft-command-bar {
  position: sticky;
  top: 57px;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(210px, .8fr) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(10, 16, 20, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
  backdrop-filter: blur(14px);
}

.next-queue-callout {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 1px;
  padding: 7px 11px;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-align: left;
  border: 1px solid rgba(45, 212, 191, .24);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(45, 212, 191, .11), rgba(45, 212, 191, .035));
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.next-queue-callout:not(:disabled):hover {
  border-color: rgba(45, 212, 191, .5);
  background: linear-gradient(135deg, rgba(45, 212, 191, .17), rgba(45, 212, 191, .055));
}

.next-queue-callout:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.next-queue-callout::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  content: '';
  transition: background 0.2s ease;
}

.next-queue-callout .eyebrow { margin-bottom: 1px; color: #99f6e4; transition: color 0.2s ease; }

.next-queue-callout strong,
.next-queue-callout > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-queue-callout strong { font-size: 13px; }

.next-queue-callout > span:last-child {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.next-queue-callout.is-empty {
  border-color: rgba(148, 163, 184, .12);
  background: rgba(255, 255, 255, .015);
  padding-block: 5px;
}

.next-queue-callout.is-empty::before { background: rgba(148, 163, 184, .3); }
.next-queue-callout.is-empty .eyebrow { color: var(--text-muted); font-size: 9px; }
.next-queue-callout.is-empty strong { color: var(--text-muted); font-size: 12px; font-weight: 600; }

.next-queue-callout.queue-target-taken {
  border-color: rgba(251, 191, 36, .55);
  background: linear-gradient(135deg, rgba(251, 191, 36, .2), rgba(127, 29, 29, .14));
  animation: queue-target-taken-pulse .7s ease-out 2;
}

.next-queue-callout.queue-target-taken::before { background: var(--warn); }
.next-queue-callout.queue-target-taken .eyebrow { color: #fde68a; }

@keyframes queue-target-taken-pulse {
  50% { box-shadow: 0 0 0 4px rgba(251, 191, 36, .13); }
}

.on-clock-block strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.on-clock-compact {
  display: none;
}

.draft-progress-block {
  display: grid;
  gap: 6px;
}

.draft-command-bar.is-my-turn {
  border-bottom-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 4px 24px rgba(251, 191, 36, 0.12);
}

.on-clock-block.is-my-turn strong {
  color: #fde68a;
}

.draft-progress-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.command-my-pick-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.command-my-turn-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
  line-height: 1.2;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.command-my-turn-chip.is-on-clock {
  background: rgba(251, 191, 36, 0.18);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
  animation: on-clock-chip-pulse 1.5s infinite ease-in-out;
}

.command-my-turn-chip.is-on-deck {
  background: rgba(45, 212, 191, 0.14);
  color: var(--accent);
  border-color: rgba(45, 212, 191, 0.4);
}

.command-my-turn-chip.is-upcoming {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-muted);
}

.command-my-turn-chip.is-complete {
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.3);
}

@keyframes on-clock-chip-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(251, 191, 36, 0.2); }
  50% { transform: scale(1.04); box-shadow: 0 0 12px rgba(251, 191, 36, 0.4); }
}

.draft-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .16);
}

.draft-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .25s ease;
}

.draft-command-bar .draft-timer {
  display: none;
}

.presenter-badge {
  display: none;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-weight: 800;
  min-width: 0;
}

.presenter-badge > span {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .12);
}

.presenter-badge-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.presenter-badge-copy strong {
  max-width: 240px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presenter-badge-copy small {
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.presenter-timer-message { display: none; }

.draft-timer.timer-overtime {
  border-color: rgba(248, 113, 113, .48);
  background: rgba(127, 29, 29, .18);
}

.mobile-view-tabs,
.my-team-card {
  display: none;
}

.draft-actions {
  grid-template-columns: repeat(4, minmax(78px, auto));
}

.action-menu {
  position: relative;
}

.action-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu[open] > summary { border-color: rgba(148, 163, 184, .34); background: var(--muted); }

.action-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  width: min(300px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .45);
}

.action-menu-section {
  display: grid;
  gap: 7px;
  padding: 4px;
}

.action-menu-section + .action-menu-section {
  margin-top: 7px;
  padding-top: 11px;
  border-top: 1px solid rgba(148, 163, 184, .13);
}

.action-menu-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.action-menu-popover .action-menu-section > button {
  width: 100%;
  min-height: 38px;
  text-align: left;
}

.board-zoom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 4px 0 4px 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.workspace-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.workspace-presets button {
  min-width: 0;
  min-height: 42px;
  padding: 6px 5px;
  font-size: 11px;
  line-height: 1.15;
}

.workspace-presets button[aria-pressed="true"] {
  border-color: rgba(45, 212, 191, .5);
  background: rgba(45, 212, 191, .14);
  color: #99f6e4;
}

.board-visibility-toggle {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 11px;
  white-space: nowrap;
}

.player-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.position-columns-sort {
  display: none;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

#bestAvailableCard.position-column-view:not(.neutral-player-list) .position-columns-sort {
  display: flex;
}

.position-columns-sort select {
  min-height: 36px;
  padding: 6px 24px 6px 8px;
  font-size: 11px;
  text-transform: none;
}

@media (min-width: 1201px) {
  body.draft-board-collapsed .container,
  body.draft-board-collapsed .container.swapped {
    grid-template-columns: minmax(0, 1fr);
  }

  body.draft-board-collapsed #draftBoardCard,
  body.draft-board-collapsed .workspace-resize-handle {
    display: none;
  }

  body.draft-board-collapsed #bestAvailableCard,
  body.draft-board-collapsed .container.swapped #bestAvailableCard {
    grid-column: 1;
    width: 100%;
  }
}

@media (max-width: 1200px) {
  .board-visibility-toggle,
  .position-columns-sort { display: none !important; }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Six-board player workspace */
#bestAvailableCard.position-column-view .player-panel {
  display: none;
}

#bestAvailableCard.position-column-view #bestList {
  height: calc(100vh - 220px);
  max-height: calc(100vh - 220px);
  overflow-x: auto;
  overflow-y: hidden;
}

.position-columns {
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 6px;
  min-width: 820px;
  height: 100%;
  padding: 6px;
}

.position-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 9px;
  background: rgba(7, 12, 16, .34);
}

.position-column-heading {
  z-index: 2;
  display: grid;
  gap: 8px;
  padding: 9px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  background: linear-gradient(180deg, rgba(27, 40, 48, .96), rgba(17, 25, 31, .96));
}

.position-column-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.position-column-title-row h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.position-column-count {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.position-column-search {
  position: relative;
  display: flex;
  align-items: center;
}

.position-column-search > span[aria-hidden] {
  position: absolute;
  left: 9px;
  z-index: 1;
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.position-column-search input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 8px 7px 28px;
  border-radius: 7px;
  font-size: 12px;
}

.position-column-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.player.position-player-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 7px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  border-left: 3px solid transparent;
  background: transparent;
}

.player.position-player-card[hidden] {
  display: none;
}

.position-player-card .position-player-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 2px 6px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 3px;
  border-radius: 6px;
}

.position-player-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.position-player-name,
.position-player-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.position-player-name {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.position-player-meta {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 650;
}

.position-player-metric {
  grid-column: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--text-muted);
  font-size: 9px;
}

.position-player-metric small { font-size: inherit; }
.position-player-metric strong { color: var(--text); font-size: 10px; }

.position-player-pick {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(45, 212, 191, .3);
  border-radius: 999px;
  background: rgba(45, 212, 191, .09);
  color: var(--accent);
  font-size: 14px;
  font-weight: 850;
}

.position-player-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding-left: 3px;
}

.position-player-chips :is(.queue-chip, .fade-chip, .need-chip) {
  min-height: 17px;
  padding: 1px 5px;
  font-size: 8px;
}

.position-player-card > :is(.draft-intelligence-compact, .draft-intelligence, .position-player-plan-menu) {
  grid-column: 1 / -1;
  min-width: 0;
}

.position-player-card > .draft-intelligence-compact {
  min-height: 0;
  padding: 3px;
  border-top: 0;
  background: transparent;
}

.position-player-card .intelligence-recommendation {
  max-width: 100%;
  padding: 2px 5px;
  overflow: hidden;
  font-size: 8px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.position-player-card > .draft-intelligence > summary {
  min-height: 34px;
  padding: 5px;
}

.position-player-card .intelligence-why {
  font-size: 9px;
}

.position-player-card .draft-intelligence-details {
  gap: 7px;
  padding: 3px 5px 8px;
}

.position-player-card .intelligence-support { gap: 3px; }
.position-player-card .intelligence-return,
.position-player-card .intelligence-chip { padding: 2px 5px; font-size: 8px; }
.position-player-card .intelligence-explanation { padding: 6px; }
.position-player-card .intelligence-explanation > strong { font-size: 9px; }
.position-player-card .intelligence-explanation p { font-size: 9px; }
.position-player-card .intelligence-facts { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.position-player-card .intelligence-fact { padding: 5px; }
.position-player-card .intelligence-fact dt { font-size: 8px; }
.position-player-card .intelligence-fact dd strong { font-size: 9px; }
.position-player-card .intelligence-fact dd span,
.position-player-card .intelligence-method { font-size: 8px; }

.position-player-card .position-player-plan-menu {
  position: static;
  border-top: 1px solid rgba(148, 163, 184, .08);
}

.position-player-card .player-plan-toggle {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 9px;
}

.position-player-card .player-plan-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
}

.position-player-card .player-plan-actions button {
  min-width: 0;
  min-height: 32px;
  padding: 4px;
  font-size: 9px;
}

.position-player-card .player-note-preview {
  margin: 0 5px 6px;
  font-size: 9px;
}

.position-column-empty {
  display: grid;
  gap: 5px;
  padding: 22px 10px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.position-column-empty[hidden] { display: none; }
.position-column-empty strong { color: var(--text); font-size: 11px; }

@media (max-width: 1200px) {
  #bestAvailableCard.position-column-view #bestList {
    height: calc(100vh - 242px);
    max-height: none;
  }
}

@media (max-width: 640px) {
  .position-columns { grid-template-columns: repeat(6, 160px); }
}

.presenter-menu-section:has(> button:not([hidden])) {
  display: grid;
}

.presenter-menu-section:not(:has(> button:not([hidden]))) {
  display: none;
}

.action-menu-danger button {
  text-align: center !important;
}

.draft-management-disclosure {
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, .24);
  border-radius: 9px;
  background: rgba(127, 29, 29, .08);
}

.draft-management-disclosure > summary {
  min-height: 40px;
  padding: 11px 12px;
  color: #fecaca;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style-position: inside;
}

.draft-management-disclosure[open] > summary {
  border-bottom: 1px solid rgba(248, 113, 113, .2);
  background: rgba(127, 29, 29, .12);
}

.draft-management-actions {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.draft-management-actions p {
  margin: 0 0 3px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.draft-management-actions button {
  width: 100%;
  min-height: 40px;
}

.my-team-card > header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .13);
}

.my-team-content {
  display: grid;
  gap: 16px;
  padding: 12px;
}

.depth-chart-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 16px;
  padding: 11px 12px;
  border: 1px solid rgba(45, 212, 191, .22);
  border-radius: 10px;
  background: rgba(45, 212, 191, .055);
}

.depth-chart-summary-copy,
.depth-chart-projection {
  display: grid;
  gap: 2px;
}

.depth-chart-summary-copy span,
.depth-chart-projection span,
.depth-chart-section-title {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.depth-chart-summary-copy strong,
.depth-chart-projection strong {
  font-size: 14px;
}

.depth-chart-projection {
  text-align: right;
}

.depth-chart-progress {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .16);
}

.depth-chart-progress span {
  display: block;
  width: var(--starter-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.depth-chart-section {
  display: grid;
  gap: 8px;
}

.depth-chart-grid,
.depth-chart-bench {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.depth-slot-card {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 82px;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-left: 4px solid rgba(148, 163, 184, .28);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}

.depth-slot-card.filled {
  background: rgba(15, 23, 30, .9);
}

.depth-slot-card.empty {
  border-style: dashed;
  color: var(--text-muted);
  background: rgba(7, 12, 16, .28);
}

.depth-slot-header,
.depth-slot-meta {
  display: flex;
  align-items: center;
  gap: 5px;
}

.depth-slot-header {
  justify-content: space-between;
}

.depth-slot-badge {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
}

.depth-slot-name {
  overflow: hidden;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.depth-slot-meta {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
}

.depth-slot-empty-label {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 750;
}

.depth-chart-empty {
  grid-column: 1 / -1;
  min-height: 72px;
}

.bye-heatmap-container {
  display: grid;
  gap: 8px;
}

.bye-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.bye-heatmap-col {
  display: grid;
  place-items: center;
  min-height: 48px;
  gap: 2px;
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 8px;
  background: rgba(148, 163, 184, .05);
}

.bye-heatmap-col.bye-level-1 {
  border-color: rgba(45, 212, 191, .3);
  background: rgba(45, 212, 191, .1);
}

.bye-heatmap-col.bye-level-2 {
  border-color: rgba(251, 191, 36, .38);
  background: rgba(251, 191, 36, .13);
}

.bye-heatmap-col.bye-level-3,
.bye-heatmap-col.bye-conflict {
  border-color: rgba(248, 113, 113, .46);
  background: rgba(248, 113, 113, .14);
}

.bye-week-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}

.bye-count-badge {
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.bye-conflict-alert {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(248, 113, 113, .1);
  color: #fecaca;
  font-size: 11px;
  font-weight: 750;
}

.quick-filters {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.quick-filters .plan-view-switch {
  flex: 1;
  height: 42px;
  min-width: 0;
  padding: 3px;
}

.quick-filters .plan-view-switch button {
  flex: 1;
  min-width: 0;
  min-height: 34px;
  padding-inline: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.quick-filters .plan-count {
  min-width: 15px;
  min-height: 15px;
  margin-left: 1px;
  padding-inline: 3px;
  font-size: 9px;
}

.advanced-filters {
  position: relative;
  flex: 1;
  padding: 0;
}

.advanced-filters > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.quick-filters .advanced-filters > summary {
  box-sizing: border-box;
  height: 100%;
}

.advanced-filters > summary::-webkit-details-marker { display: none; }

.filter-section {
  display: grid;
  gap: 7px;
}

.filter-section-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.advanced-filter-body .segmented-control {
  width: 100%;
}

.filter-count {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #052e2b;
  font-size: 11px;
  text-align: center;
}

.advanced-filter-body {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  display: grid;
  gap: 12px;
  width: min(520px, calc(200% + 8px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #11191f;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .45);
}

.player {
  display: block;
  padding: 0;
}

.player-select {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(58px, 72px));
  gap: 8px;
  width: 100%;
  min-height: 68px;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.player-select:hover,
.player-select:focus-visible {
  background: rgba(45, 212, 191, .08);
  box-shadow: inset 0 0 0 2px var(--accent);
  outline: 2px solid transparent;
}

.player.player-selected {
  background: rgba(45, 212, 191, .11);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.player .player-metrics {
  display: contents;
}

.player .player-metric {
  align-self: center;
  padding: 4px 6px;
  border: 0;
  border-left: 1px solid rgba(148, 163, 184, .13);
  border-radius: 0;
  background: transparent;
}

.draft-intelligence {
  border-top: 1px solid rgba(148, 163, 184, .1);
  background: rgba(7, 12, 16, .2);
}

.draft-intelligence-compact {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-top: 1px solid rgba(148, 163, 184, .08);
  background: rgba(7, 12, 16, .12);
}

.draft-intelligence > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 12px;
  cursor: pointer;
  list-style: none;
}

.draft-intelligence > summary::-webkit-details-marker { display: none; }

.draft-intelligence > summary::before {
  content: '›';
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .16s ease;
}

.draft-intelligence[open] > summary::before { transform: rotate(90deg); }

.draft-intelligence > summary:hover {
  background: rgba(45, 212, 191, .055);
}

.draft-intelligence > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.intelligence-recommendation,
.intelligence-return,
.intelligence-chip {
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(148, 163, 184, .08);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

.intelligence-recommendation { color: var(--text); }
.intelligence-return { font-variant-numeric: tabular-nums; }
.intelligence-highlights { display: inline-flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.intelligence-why { margin-left: auto; color: var(--accent); font-size: 11px; font-weight: 800; }

.intelligence-urgent {
  border-color: rgba(248, 113, 113, .4);
  background: rgba(248, 113, 113, .11);
  color: #fecaca;
}

.intelligence-warning {
  border-color: rgba(251, 191, 36, .38);
  background: rgba(120, 53, 15, .15);
  color: #fde68a;
}

.intelligence-positive {
  border-color: rgba(45, 212, 191, .38);
  background: rgba(45, 212, 191, .11);
  color: #99f6e4;
}

.intelligence-muted { color: var(--text-muted); }

.draft-intelligence-details {
  display: grid;
  gap: 10px;
  padding: 2px 12px 12px 36px;
}

.intelligence-explanation {
  padding: 9px 10px;
  border-left: 3px solid var(--accent);
  border-radius: 0 7px 7px 0;
  background: rgba(45, 212, 191, .055);
}

.intelligence-explanation > strong { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.intelligence-explanation p { margin: 3px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.45; }

.intelligence-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.intelligence-fact {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.intelligence-fact dt {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.intelligence-fact dd { display: grid; gap: 3px; margin: 3px 0 0; }
.intelligence-fact dd strong { font-size: 12px; }
.intelligence-fact dd span { color: var(--text-muted); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.intelligence-method { margin: 0; color: var(--text-muted); font-size: 10px; line-height: 1.4; }

.draft-selection-bar {
  position: sticky;
  bottom: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-top: 1px solid rgba(45, 212, 191, .32);
  background: rgba(11, 20, 24, .97);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, .3);
}

.draft-selection-bar[hidden] { display: none; }
.draft-selection-bar strong { display: block; font-size: 13px; }
.draft-selection-actions { display: flex; gap: 8px; flex: 0 0 auto; }

#draftBoardCard.compact td { min-width: calc(86px * var(--board-zoom, 1)); padding: calc(4px * var(--board-zoom, 1)) calc(5px * var(--board-zoom, 1)); }
#draftBoardCard.compact .pick { gap: 2px; font-size: 11px; }
#draftBoardCard.compact .pick .slot {
  gap: 2px;
  line-height: 1.1;
  white-space: nowrap;
}
#draftBoardCard.compact .pick .slot > span { flex-shrink: 0; }
body:not(.presenter-mode) #draftBoardCard.compact .pick .overall-label { display: none; }
#draftBoardCard.compact .pick .meta .tag:not(.pos-chip) { display: none; }
#draftBoardCard.compact .team-heading { max-width: calc(110px * var(--board-zoom, 1)); font-size: 11px; }

#board thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.14);
}

#board th:first-child,
#board td:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: calc(64px * var(--board-zoom, 1));
  background: var(--panel);
  text-align: center;
}

#board thead th:first-child {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 8;
  background: var(--panel);
}

.round-header-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: calc(12px * var(--board-zoom, 1));
  font-weight: 700;
  white-space: nowrap;
}

.round-snake-arrow {
  color: var(--accent);
  font-size: 11px;
  opacity: 0.85;
  user-select: none;
}

#board th.my-team-column,
#board td.my-team-column {
  box-shadow: inset 0 0 0 1px rgba(163, 230, 53, .38);
}

#board td.my-upcoming-pick {
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .45);
  background: linear-gradient(135deg, rgba(45, 212, 191, .06), rgba(163, 230, 53, .03));
}

#board td.my-upcoming-pick .pick-in-round {
  color: var(--accent);
  font-weight: 700;
}

#board th.my-team-column::after {
  content: 'MY TEAM';
  display: block;
  margin-top: 3px;
  color: var(--accent-2);
  font-size: 9px;
  letter-spacing: .08em;
}

#board tr.current-round > * {
  border-top-color: rgba(45, 212, 191, .3);
  border-bottom-color: rgba(45, 212, 191, .3);
  background-color: rgba(45, 212, 191, .035);
}

#board tr.current-round > th:first-child {
  color: var(--accent);
  background: linear-gradient(90deg, rgba(45, 212, 191, .16), var(--panel));
  box-shadow: inset 3px 0 var(--accent);
  font-size: 14px;
}

#board tr.current-round > th:first-child::after {
  content: 'CURRENT';
  display: block;
  margin-top: 2px;
  font-size: 8px;
  letter-spacing: .08em;
}

@media (max-width: 1200px) {
  .workspace-resize-handle { display: none; }

  .mobile-view-tabs {
    position: sticky;
    top: 129px;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
    background: rgba(11, 16, 20, .96);
  }
  .mobile-view-tab {
    min-height: 40px;
    padding: 6px 4px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    background: transparent;
  }
  .mobile-view-tab.active {
    border-color: var(--accent);
    background: rgba(45, 212, 191, .12);
    color: var(--accent);
    box-shadow: inset 0 -2px 0 var(--accent);
  }
  .container { display: block; padding: 12px; }
  .container #draftBoardCard,
  .container #bestAvailableCard,
  .container #myTeamCard { display: none; }
  .container.mobile-view-board #draftBoardCard,
  .container.mobile-view-players #bestAvailableCard,
  .container.mobile-view-roster #myTeamCard { display: block; }
  .container.mobile-view-players #bestAvailableCard { display: flex; flex-direction: column; }
  #bestAvailableCard > header { order: 0; }
  #bestAvailableCard > #bestList { order: 1; }
  #bestAvailableCard > .draft-selection-bar { order: 2; }
  .container.mobile-view-roster #myTeamCard { min-height: calc(100vh - 210px); }
  #board, .scroller { max-height: none; height: calc(100vh - 242px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.system-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(45, 212, 191, .35);
  background: #102b2a;
  color: var(--text);
  font-size: 13px;
}

.system-banner[hidden] {
  display: none;
}

.system-banner-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(45, 212, 191, .14);
  color: var(--accent);
  font-size: 15px;
  font-weight: 900;
}

.system-banner-copy {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

#applyUpdateBtn[hidden] {
  display: none;
}

.system-banner-warning {
  border-color: rgba(251, 191, 36, .42);
  background: #302610;
}

.system-banner .row {
  flex-wrap: nowrap;
}

body.draft-read-only [data-draft-mutation="true"] {
  opacity: .58;
}

.reconciliation-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, .3);
  border-radius: 10px;
  background: rgba(45, 212, 191, .055);
}

.reconciliation-panel[hidden] {
  display: none;
}

.reconciliation-heading,
.reconciliation-row,
.checkpoint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reconciliation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
}

.reconciliation-heading p {
  margin: 3px 0 0;
}

.reconciliation-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(163, 230, 53, .14);
  color: #d9f99d;
  font-size: 11px;
  font-weight: 800;
}

.reconcile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.reconcile-badge.reconcile-exact {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.32);
}

.reconcile-badge.reconcile-likely {
  background: rgba(234, 179, 8, 0.16);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.32);
}

.reconcile-badge.reconcile-ambiguous {
  background: rgba(249, 115, 22, 0.16);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.32);
}

.reconcile-badge.reconcile-retained {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.32);
}

.reconciliation-mappings,
.checkpoint-list {
  display: grid;
  gap: 7px;
}

.reconciliation-row,
.checkpoint-row {
  padding: 8px 9px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.reconciliation-player,
.checkpoint-copy {
  min-width: 0;
}

.reconciliation-player strong,
.checkpoint-copy strong {
  display: block;
}

.reconciliation-player span,
.checkpoint-copy span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
}

.reconciliation-choice {
  display: grid;
  gap: 4px;
}

.reconciliation-choice > span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.reconciliation-row select {
  width: 100%;
}

.reconciliation-evidence {
  grid-column: 1 / -1;
  min-width: 0;
  border-top: 1px solid rgba(148, 163, 184, .14);
  padding-top: 7px;
}

.reconciliation-evidence summary {
  width: fit-content;
  color: #bae6fd;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  touch-action: manipulation;
}

.reconciliation-evidence summary span {
  color: var(--text-muted);
  font-weight: 700;
}

.reconciliation-evidence-body,
.reconciliation-candidates {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.reconciliation-evidence-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
}

.reconciliation-evidence-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reconciliation-evidence-signal {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, .36);
  font-size: 11px;
}

.reconciliation-evidence-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow-wrap: anywhere;
  color: var(--text-muted);
}

.reconciliation-evidence-status {
  color: #86efac;
  font-weight: 800;
}

[data-evidence-status="different"] .reconciliation-evidence-status {
  color: #fdba74;
}

[data-evidence-status="unavailable"] .reconciliation-evidence-status,
.reconciliation-evidence-missing {
  color: #94a3b8;
}

.reconciliation-candidate {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 7px;
}

@media (max-width: 640px) {
  .system-banner,
  .checkpoint-row {
    align-items: stretch;
    flex-direction: column;
  }

  .system-banner .row,
  .system-banner button,
  .checkpoint-row button {
    width: 100%;
  }

  #pwaUpdateBanner.is-draft-active {
    position: fixed;
    top: 148px;
    right: 8px;
    z-index: 34;
    width: auto;
    max-width: calc(100vw - 16px);
    min-height: 42px;
    padding: 5px 6px 5px 8px;
    border: 1px solid rgba(45, 212, 191, .42);
    border-radius: 999px;
    flex-direction: row;
    gap: 7px;
    background: rgba(16, 43, 42, .96);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
    backdrop-filter: blur(10px);
  }

  #pwaUpdateBanner.is-draft-active .system-banner-icon {
    width: 28px;
    height: 28px;
  }

  #pwaUpdateBanner.is-draft-active .system-banner-copy {
    display: grid;
    flex: 0 1 auto;
    gap: 0;
  }

  #pwaUpdateBanner.is-draft-active .system-banner-copy strong {
    font-size: 11px;
  }

  #pwaUpdateBanner.is-draft-active .system-banner-copy span {
    max-width: 150px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #pwaUpdateBanner.is-draft-active .row {
    width: auto;
  }

  #pwaUpdateBanner.is-draft-active button {
    width: auto;
    min-width: 0;
    min-height: 32px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
  }

  .reconciliation-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .reconciliation-heading > div:last-child {
    flex-wrap: wrap;
  }

  .reconciliation-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .reconciliation-evidence {
    grid-column: 1;
  }

  .reconciliation-evidence summary {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 12px 4px;
  }

  .reconciliation-evidence-signal {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .reconciliation-evidence-values {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Read-only TV/projector surface. The commissioner continues working in the primary window. */
body.presenter-mode {
  overflow: hidden;
  background: #081014;
}

.presenter-mode .app-header,
.presenter-mode .system-banner,
.presenter-mode .mobile-view-tabs,
.presenter-mode .overlay,
.presenter-mode .toast-container,
.presenter-mode #bestAvailableCard,
.presenter-mode #myTeamCard,
.presenter-mode #draftBoardCard .draft-board-header,
.presenter-mode #pickControls {
  display: none !important;
}

.presenter-mode .draft-command-bar {
  position: sticky;
  top: 0;
  grid-template-columns: minmax(190px, .75fr) minmax(280px, 1.6fr) minmax(110px, auto) auto;
  min-height: 68px;
  height: 68px;
  gap: clamp(12px, 2vw, 28px);
  padding: 7px 14px;
}

.presenter-mode .next-queue-callout { display: none !important; }
.presenter-mode .command-my-turn-chip { display: none !important; }
.presenter-mode .my-team-column,
.presenter-mode .my-upcoming-pick {
  box-shadow: none !important;
  background: none !important;
}
.presenter-mode .my-team-column::after { display: none !important; }
.presenter-mode .draft-command-bar.is-my-turn {
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2) !important;
}
.presenter-mode .on-clock-block.is-my-turn strong { color: inherit !important; }
.presenter-mode .draft-progress-block { display: grid; }
.presenter-mode .presenter-badge { display: inline-flex; }

.presenter-mode .draft-command-bar .draft-timer {
  display: grid !important;
  grid-template-columns: auto;
  justify-items: center;
  gap: 2px;
  min-width: 110px;
  min-height: 54px;
  padding: 5px 9px;
}

.presenter-mode .draft-timer .timer-toggle { display: none; }

.presenter-mode .timer-display {
  min-width: 0;
  font-size: clamp(25px, 2vw, 38px);
  text-align: center;
}

.presenter-mode .presenter-timer-message {
  display: -webkit-box;
  max-width: 220px;
  max-height: 2.3em;
  overflow: hidden;
  color: #fecaca;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.presenter-mode .container,
.presenter-mode .container.swapped {
  display: block !important;
  height: calc(100vh - 68px);
  min-height: 0;
  padding: 5px;
}

.presenter-mode .container #draftBoardCard {
  display: block !important;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
}

.presenter-mode #board {
  display: block;
  height: 100%;
  max-height: none;
  padding: 3px;
  overflow: hidden;
  overscroll-behavior: contain;
}

.presenter-display-controls {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(45, 212, 191, .22);
  border-radius: 10px;
  background: rgba(45, 212, 191, .045);
}

.presenter-display-heading,
.presenter-display-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.presenter-display-heading {
  justify-content: space-between;
}

.presenter-display-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.presenter-display-heading strong {
  color: var(--text);
  font-size: 13px;
}

.presenter-display-heading span,
.presenter-display-status {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.presenter-display-actions {
  flex-wrap: wrap;
}

.presenter-display-actions button {
  flex: 1 1 190px;
}

.presenter-display-status {
  min-height: 17px;
  margin: 0;
}

.presenter-display-status[data-tone="ready"] { color: #99f6e4; }
.presenter-display-status[data-tone="warning"] { color: #fde68a; }
.presenter-display-status[data-tone="error"] { color: #fecaca; }

@media (max-width: 620px) {
  .presenter-display-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

.presenter-mode #board table {
  width: 100%;
  height: 100%;
  min-height: 0;
  table-layout: fixed;
}

.presenter-mode #board thead {
  height: var(--presenter-header-height, 42px);
}

.presenter-mode #board tbody tr {
  height: var(--presenter-row-height, auto);
}

.presenter-mode #board th,
.presenter-mode #board td {
  min-width: 0;
  max-width: none;
  height: auto;
  padding: 1px 3px;
  overflow: hidden;
  vertical-align: middle;
}

.presenter-mode #board th:first-child,
.presenter-mode #board td:first-child {
  width: clamp(42px, 4.2vw, 64px);
  min-width: 0;
}

.presenter-mode #board .pick,
.presenter-mode #board .pick .name,
.presenter-mode #board .team-heading > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presenter-mode #board .pick .name,
.presenter-mode #board .team-heading > div {
  white-space: nowrap;
}

.presenter-mode #draftBoardCard.compact td {
  min-width: 0;
  padding: 1px 3px;
}

.presenter-mode #draftBoardCard.compact .pick {
  gap: 1px;
  font-size: clamp(10px, .72vw, 13px);
}

.presenter-mode #draftBoardCard.compact .pick .meta { font-size: clamp(9px, .62vw, 11px); }
.presenter-mode #draftBoardCard.compact .team-heading { max-width: 130px; font-size: clamp(10px, .72vw, 13px); }
.presenter-mode #board[data-presenter-density="tight"] thead { height: 34px; }
.presenter-mode #board[data-presenter-density="tight"] tbody tr {
  height: var(--presenter-row-height, auto);
}
.presenter-mode #board[data-presenter-density="tight"] th,
.presenter-mode #board[data-presenter-density="tight"] td { padding-block: 0; }
.presenter-mode #board[data-presenter-density="tight"] .pick { gap: 0; font-size: clamp(9px, .66vw, 11px); }
.presenter-mode #board[data-presenter-density="tight"] .pick .slot,
.presenter-mode #board[data-presenter-density="tight"] .pick .meta { font-size: clamp(8px, .56vw, 9px); line-height: 1; }
.presenter-mode #board[data-presenter-density="tight"] .pick .name { font-size: clamp(9px, .7vw, 11px); line-height: 1.05; }
.presenter-mode #board[data-presenter-density="tight"] .team-heading { font-size: clamp(9px, .68vw, 11px); }
.presenter-mode #board[data-presenter-density="tight"] .team-heading > div:last-child { margin-top: 1px !important; font-size: 8px !important; }

.presenter-mode #board[data-presenter-density="ultra"] thead { height: 28px; }
.presenter-mode #board[data-presenter-density="ultra"] tbody tr {
  height: var(--presenter-row-height, auto);
}
.presenter-mode #board[data-presenter-density="ultra"] th,
.presenter-mode #board[data-presenter-density="ultra"] td { padding: 0 2px; }
.presenter-mode #board[data-presenter-density="ultra"] .pick { gap: 0; padding-left: 2px; font-size: 8px; line-height: 1; }
.presenter-mode #board[data-presenter-density="ultra"] .pick .slot { font-size: 7px; line-height: 1; }
.presenter-mode #board[data-presenter-density="ultra"] .pick .name { font-size: 8px; line-height: 1; }
.presenter-mode #board[data-presenter-density="ultra"] .pick .meta,
.presenter-mode #board[data-presenter-density="ultra"] .team-heading > div:last-child { display: none; }
.presenter-mode #board[data-presenter-density="ultra"] .team-heading,
.presenter-mode #board[data-presenter-density="ultra"] .round-header-cell { font-size: 8px; line-height: 1; }
.presenter-mode #board td[role="button"],
.presenter-mode #board .team-heading { cursor: default; }

.presenter-multiplayer-welcome { display: none; }

.presenter-mode .presenter-multiplayer-welcome:not([hidden]) {
  position: fixed;
  inset: 68px 0 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 64px);
  background:
    radial-gradient(circle at 25% 20%, rgba(45, 212, 191, .2), transparent 38%),
    radial-gradient(circle at 80% 80%, rgba(56, 189, 248, .12), transparent 42%),
    #071014;
}

.presenter-multiplayer-card {
  display: grid;
  justify-items: center;
  width: min(1060px, 94vw);
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid rgba(45, 212, 191, .42);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(17, 31, 38, .98), rgba(7, 15, 20, .98));
  box-shadow: 0 30px 100px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 255, 255, .08);
  text-align: center;
}

.presenter-multiplayer-kicker {
  color: var(--accent);
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.presenter-multiplayer-card > strong {
  margin-top: 8px;
  font-size: clamp(32px, 4.5vw, 62px);
  line-height: 1.05;
  text-wrap: balance;
}

.presenter-multiplayer-card > p {
  margin: 12px 0 24px;
  color: var(--text-muted);
  font-size: clamp(16px, 1.8vw, 22px);
}

.presenter-multiplayer-join {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(300px, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  width: 100%;
  text-align: left;
}

.presenter-multiplayer-qr-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  color: #334155;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .34);
}

.presenter-multiplayer-qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.presenter-multiplayer-instructions {
  display: grid;
  gap: 20px;
}

.presenter-multiplayer-instructions ol {
  display: grid;
  gap: 13px;
  margin: 0;
  padding-left: 1.5em;
  font-size: clamp(17px, 2vw, 25px);
  font-weight: 750;
  line-height: 1.3;
}

.presenter-multiplayer-room {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(45, 212, 191, .32);
  border-radius: 12px;
  background: rgba(45, 212, 191, .08);
}

.presenter-multiplayer-room span {
  color: var(--text-muted);
  font-size: clamp(13px, 1.3vw, 17px);
  font-weight: 800;
  text-transform: uppercase;
}

.presenter-multiplayer-room strong {
  color: #99f6e4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(25px, 3vw, 42px);
  letter-spacing: .16em;
}

.presenter-multiplayer-url {
  overflow: hidden;
  color: var(--text-muted);
  font-size: clamp(11px, 1.1vw, 15px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 800px), (max-height: 650px) {
  .presenter-multiplayer-join {
    grid-template-columns: minmax(180px, 34vh) minmax(260px, 1fr);
  }

  .presenter-multiplayer-card {
    padding: 20px 28px;
  }

  .presenter-multiplayer-card > p { margin-bottom: 16px; }
}

@media (max-width: 800px) {
  .presenter-mode .draft-command-bar {
    grid-template-columns: minmax(145px, 1fr) minmax(90px, auto) auto;
  }
  .presenter-mode .draft-progress-block { display: none; }
}

.draft-intro {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(45, 212, 191, .2), transparent 50%),
    rgba(3, 8, 11, .9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.draft-intro[hidden] {
  display: none;
}

.draft-intro.is-visible:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: draft-intro-backdrop 2.2s ease both;
}

.draft-intro-card {
  display: grid;
  justify-items: center;
  width: min(760px, 92vw);
  padding: clamp(32px, 6vw, 64px);
  border: 2px solid rgba(45, 212, 191, .65);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(17, 31, 38, .98), rgba(7, 15, 20, .98));
  box-shadow: 0 30px 100px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .08);
  text-align: center;
}

.draft-intro.is-visible .draft-intro-card {
  animation: draft-intro-card 2.2s cubic-bezier(.2, .8, .2, 1) both;
}

.draft-intro-kicker {
  color: var(--accent);
  font-size: clamp(13px, 1.5vw, 18px);
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.draft-intro-card strong {
  max-width: 100%;
  margin-top: 14px;
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1.05;
  text-wrap: balance;
}

.draft-intro-clock {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 700;
}

@keyframes draft-intro-backdrop {
  0%, 100% { opacity: 0; }
  12%, 82% { opacity: 1; }
}

@keyframes draft-intro-card {
  0% { opacity: 0; transform: translateY(18px) scale(.96); }
  14%, 80% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-8px) scale(1.01); }
}

.presenter-pick-reveal { display: none; }

.presenter-mode .presenter-pick-reveal:not([hidden]) {
  position: fixed;
  inset: 68px 0 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 80px);
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(45, 212, 191, .2), transparent 48%),
    rgba(3, 8, 11, .86);
  opacity: 0;
}

.presenter-mode .presenter-pick-reveal.is-visible {
  opacity: 1;
  animation: presenter-reveal-backdrop 7s ease both;
}

.presenter-pick-card {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(1040px, 92vw);
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden;
  border: 2px solid rgba(45, 212, 191, .6);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(17, 31, 38, .98), rgba(7, 15, 20, .98));
  box-shadow: 0 30px 100px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .08);
  text-align: center;
}

.presenter-pick-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .08) 50%, transparent 65%);
  transform: translateX(-120%);
  content: '';
}

.is-visible .presenter-pick-card {
  animation: presenter-card-arrive .65s cubic-bezier(.2, .8, .2, 1) both;
}

.is-visible .presenter-pick-card::before { animation: presenter-card-shine 1.1s .25s ease-out; }
.tone-quick .presenter-pick-card { border-color: rgba(163, 230, 53, .72); }
.tone-late .presenter-pick-card,
.tone-very-late .presenter-pick-card { border-color: rgba(251, 191, 36, .75); }

.presenter-pick-kicker,
.presenter-pick-selects {
  color: var(--text-muted);
  font-size: clamp(14px, 1.5vw, 22px);
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.presenter-pick-team {
  margin-top: 10px;
  color: var(--accent);
  font-size: clamp(34px, 5vw, 76px);
  line-height: 1;
}

.presenter-pick-selects { margin: 14px 0 8px; }

.presenter-pick-player {
  max-width: 100%;
  font-size: clamp(48px, 7.5vw, 118px);
  line-height: .95;
  text-wrap: balance;
}

.presenter-pick-meta {
  margin-top: 18px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 28px);
  font-weight: 800;
}

.presenter-pick-message {
  max-width: 820px;
  max-height: 160px;
  margin: 26px 0 0;
  overflow: hidden;
  color: #d9f99d;
  font-size: clamp(18px, 2.2vw, 32px);
  font-weight: 750;
  line-height: 1.3;
  text-wrap: balance;
  transition: max-height .3s ease, margin .3s ease, opacity .2s ease, transform .3s ease;
}

.presenter-pick-league {
  max-width: 100%;
  margin-bottom: 10px;
  overflow: hidden;
  color: var(--accent);
  font-size: clamp(20px, 2.5vw, 36px);
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presenter-pick-next {
  display: grid;
  gap: 5px;
  width: min(760px, 100%);
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .24);
  transition: margin .3s ease, padding .3s ease, border-color .3s ease, background .3s ease;
}

.presenter-pick-next span {
  color: var(--text-muted);
  font-size: clamp(12px, 1.1vw, 17px);
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.presenter-pick-next strong {
  color: #e2e8f0;
  font-size: clamp(18px, 2.1vw, 31px);
  line-height: 1.2;
  text-wrap: balance;
  transition: color .3s ease, font-size .3s ease;
}

.tone-late .presenter-pick-message,
.tone-very-late .presenter-pick-message { color: #fde68a; }

.presenter-pick-reveal.novelty-collapsed .presenter-pick-message {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  transform: translateY(-8px);
}

.presenter-pick-reveal.novelty-collapsed .presenter-pick-next {
  margin-top: 14px;
  padding: 16px 20px;
  border: 1px solid rgba(45, 212, 191, .34);
  border-radius: 12px;
  background: rgba(45, 212, 191, .08);
}

.presenter-pick-reveal.novelty-collapsed .presenter-pick-next strong {
  color: #f8fafc;
  font-size: clamp(22px, 2.8vw, 40px);
}

@keyframes presenter-card-arrive {
  from { opacity: 0; transform: translateY(34px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes presenter-card-shine {
  to { transform: translateX(120%); }
}

@keyframes presenter-reveal-backdrop {
  0% { opacity: 0; }
  8%, 86% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .draft-intro.is-visible,
  .draft-intro.is-visible .draft-intro-card,
  .presenter-mode .presenter-pick-reveal.is-visible,
  .is-visible .presenter-pick-card,
  .is-visible .presenter-pick-card::before {
    animation: none;
  }
  .draft-intro.is-visible { opacity: 1; }
  .draft-intro.is-visible .draft-intro-card { opacity: 1; transform: none; }
  .presenter-mode .presenter-pick-reveal.is-visible { opacity: 1; }
}
.toast:has(.toast-action) {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
}

.toast-action {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 10px;
  border-color: rgba(45, 212, 191, .45);
  background: rgba(45, 212, 191, .12);
  color: var(--accent);
  font-weight: 800;
}

.cutoff-prompt-panel {
  max-width: 520px;
  width: 92vw;
  box-shadow: var(--shadow-modal);
}

.cutoff-prompt-details {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

/* Focused setup panels */
.setup-nav button.active,
.setup-nav button[aria-selected="true"] {
  border-color: rgba(45, 212, 191, .62);
  background: rgba(45, 212, 191, .14);
  color: var(--accent);
}

.setup-nav {
  scrollbar-width: none;
}

.setup-nav::-webkit-scrollbar {
  display: none;
}

.setup-layout {
  display: block;
  width: min(100%, 960px);
  margin-inline: auto;
}

.setup-section[hidden] {
  display: none !important;
}

:where(button, a[href], summary, [role="button"]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(7, 16, 19, .92);
}

@media (forced-colors: active) {
  :where(button, a[href], summary, [role="button"]):focus-visible {
    outline-color: Highlight;
    box-shadow: none;
  }
}

/* Decision-first player cards */
.player {
  display: block;
  position: relative;
  padding: 0;
  cursor: default;
  container-type: inline-size;
}

.player-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(62px, 74px) 192px;
  align-items: stretch;
  gap: 8px;
  padding: 8px 10px;
}

.player-select {
  display: block;
  min-height: 56px;
  padding: 6px 4px;
}

.player-primary-metric {
  display: flex;
  align-items: center;
}

.player-primary-metric .player-metric {
  width: 100%;
  min-width: 0;
  border-left: 1px solid rgba(148, 163, 184, .16);
}

.player-draft-action {
  align-self: center;
  justify-self: end;
  width: 92px;
  min-width: 92px;
  min-height: 44px;
  padding-inline: 10px;
}

.player-draft-action.selected {
  background: rgba(45, 212, 191, .16);
  border: 1px solid rgba(45, 212, 191, .5);
  color: #99f6e4;
  box-shadow: none;
}

.player-plan-menu {
  border-top: 0;
}

.player-plan-toggle {
  position: absolute;
  top: 18px;
  right: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 92px;
  min-width: 92px;
  min-height: 36px;
  padding: 6px 9px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.player-plan-toggle span {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(45, 212, 191, .14);
  color: var(--accent);
  text-align: center;
}

.player-plan-content {
  display: none;
}

.player-plan-menu.open {
  border-top: 1px solid rgba(148, 163, 184, .1);
}

.player-plan-menu.open .player-plan-content {
  display: block;
}

.player-plan-actions {
  padding: 8px 10px;
}

@container (max-width: 440px) {
  .player-summary-row {
    grid-template-columns: minmax(0, 1fr) minmax(62px, 74px) 92px;
  }

  .player-plan-toggle {
    position: static;
    display: flex;
    width: 100%;
    min-height: 40px;
  }
}

.player-note-preview {
  margin: 0 10px 9px;
}

.intelligence-support {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.draft-intelligence > summary {
  justify-content: space-between;
}

.draft-intelligence > summary::before {
  order: -1;
}

.intelligence-why {
  margin-left: auto;
}

/* One live snackbar replaces stacked notifications. */
.toast-container {
  display: block;
}

/* Mobile current-round and recent-picks feed */
.mobile-board-switch,
.mobile-draft-feed {
  display: none;
}

@media (max-width: 1200px) {
  .mobile-board-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 8px 12px;
    border-top: 1px solid rgba(148, 163, 184, .12);
    border-bottom: 1px solid rgba(148, 163, 184, .12);
    background: rgba(7, 12, 16, .28);
  }

  .mobile-board-switch button {
    min-height: 40px;
    background: transparent;
  }

  .mobile-board-switch button.active {
    border-color: rgba(45, 212, 191, .5);
    background: rgba(45, 212, 191, .12);
    color: var(--accent);
  }

  #draftBoardCard.mobile-board-mode-feed #board {
    display: none;
  }

  #draftBoardCard.mobile-board-mode-feed .mobile-draft-feed {
    display: grid;
  }

  #draftBoardCard.mobile-board-mode-grid .mobile-draft-feed {
    display: none;
  }

  .mobile-draft-feed {
    gap: 16px;
    height: calc(100dvh - 292px);
    min-height: 360px;
    padding: 12px;
    overflow-y: auto;
  }

  .draft-feed-section {
    display: grid;
    align-content: start;
    gap: 8px;
  }

  .draft-feed-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .draft-feed-heading strong {
    font-size: 14px;
  }

  .draft-feed-heading span,
  .draft-feed-empty {
    color: var(--text-muted);
    font-size: 12px;
  }

  .draft-feed-list {
    display: grid;
    gap: 6px;
  }

  .draft-feed-pick {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    text-align: left;
  }

  .draft-feed-pick.current {
    border-color: var(--accent);
    background: rgba(45, 212, 191, .12);
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .draft-feed-pick.upcoming {
    color: var(--text-muted);
  }

  .draft-feed-number {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    opacity: .65;
  }

  .draft-feed-main {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .draft-feed-main strong,
  .draft-feed-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .draft-feed-main strong {
    color: #f8fafc;
    font-size: 14px;
    font-weight: 850;
  }

  .draft-feed-main span,
  .draft-feed-meta span {
    color: var(--text-muted);
    font-size: 12px;
  }

  .draft-feed-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
  }
}

@media (max-width: 640px) {
  /* Draft-night mode: keep unselected cards to one fast-scanning summary. */
  .player-summary-row {
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 6px;
    padding: 6px 8px 4px;
  }

  .player-select {
    min-height: 46px;
    padding-inline: 2px;
  }

  .player .name {
    font-size: 14px;
  }

  .player-draft-action {
    display: none;
  }

  .player:not(.player-selected) .player-indicators,
  .player:not(.player-selected) .player-select .pos .tag:not(.pos-chip) {
    display: none;
  }

  .player:not(.player-selected) .draft-intelligence-compact {
    min-height: 26px;
    padding: 2px 8px 6px;
    border-top: 0;
    background: transparent;
  }

  #bestList:not([data-current-plan-view="queue"]) .player:not(.player-selected) .player-plan-menu {
    display: none;
  }

  .player-plan-toggle {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, .025);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .player-plan-toggle span {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(45, 212, 191, .14);
    color: var(--accent);
  }

  .player-plan-content {
    display: none;
  }

  .player-plan-menu.open .player-plan-content {
    display: block;
  }

  .player-plan-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }

  .player-plan-actions button {
    width: 100%;
    min-height: 44px;
    font-size: 12px;
  }

  .queue-position {
    grid-column: 1 / -1;
  }

  .draft-intelligence > summary {
    flex-wrap: nowrap;
  }

  .intelligence-highlights {
    order: initial;
    flex-basis: auto;
    margin-left: 0;
  }

  .all-positions-segment {
    flex-basis: 112px;
  }

  .segmented-control {
    scrollbar-width: none;
  }

  .segmented-control::-webkit-scrollbar {
    display: none;
  }

  .player-note-preview {
    font-size: 12px;
  }
}

/* Readable microcopy where density is not structurally required. */
.setup-summary-item span,
.setup-subtle,
.player-plan-actions button,
.player-note-preview,
.intelligence-recommendation,
.intelligence-return,
.intelligence-chip,
.intelligence-explanation > strong,
.intelligence-fact dt,
.intelligence-fact dd span,
.intelligence-method,
.queue-position {
  font-size: 12px;
}

.presenter-start-panel {
  width: min(560px, calc(100vw - 28px));
}

.presenter-start-body > p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.presenter-start-error {
  padding: 10px 12px;
  border: 1px solid rgba(248, 113, 113, .35);
  border-radius: 8px;
  background: rgba(248, 113, 113, .08);
  color: #fecaca !important;
}

.presenter-start-actions {
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

/* Neutral shared-computer mode: keep the drafting surface operational without strategy cues. */
#bestAvailableCard.neutral-player-list [data-strategic-control],
#bestAvailableCard.neutral-player-list .insight-summary,
#bestAvailableCard.neutral-player-list .compare-status,
#bestAvailableCard.neutral-player-list .restore-player-chrome,
#bestAvailableCard.neutral-player-list .player-primary-metric,
#bestAvailableCard.neutral-player-list .player-plan-menu,
#bestAvailableCard.neutral-player-list .draft-intelligence,
#bestAvailableCard.neutral-player-list .draft-intelligence-compact,
.neutral-draft-mode #myTeamCard,
.neutral-draft-mode [data-mobile-view="roster"],
.neutral-draft-mode .command-my-turn-chip {
  display: none !important;
}

#bestAvailableCard.neutral-player-list .filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#bestAvailableCard.neutral-player-list .player-summary-row {
  grid-template-columns: minmax(0, 1fr) minmax(72px, auto);
}

#bestAvailableCard.neutral-player-list .player-select .pos .tag {
  display: inline-flex;
}

#bestAvailableCard.neutral-player-list .player-draft-action {
  grid-column: 2;
}

@media (max-width: 640px) {
  #bestAvailableCard.neutral-player-list .player-summary-row {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 6px;
  }

  #bestAvailableCard.neutral-player-list .player-draft-action {
    display: none;
  }
}

/* Multiplayer room */
#multiplayerStartPanel[hidden],
#multiplayerRoomPanel[hidden] {
  display: none !important;
}

.multiplayer-panel {
  width: min(940px, calc(100vw - 24px));
  max-height: min(820px, calc(100vh - 24px));
}

.multiplayer-content {
  overflow-y: auto;
}

.multiplayer-callout {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 9%, var(--card));
  line-height: 1.45;
}

.multiplayer-callout span {
  color: var(--text-muted);
}

.multiplayer-callout code {
  color: var(--text);
}

.multiplayer-access-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.multiplayer-access-options legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: var(--text);
  font-weight: 800;
}

.multiplayer-access-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, white 2%, var(--card));
  cursor: pointer;
}

.multiplayer-access-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}

.multiplayer-access-option input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.multiplayer-access-option span {
  display: grid;
  gap: 4px;
}

.multiplayer-access-option small {
  color: var(--text-muted);
  line-height: 1.35;
}

.multiplayer-tunnel-status {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--muted) 8%, var(--card));
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.multiplayer-tunnel-status.is-ready {
  border-color: color-mix(in srgb, var(--good) 50%, var(--line));
  color: var(--good);
  background: color-mix(in srgb, var(--good) 10%, var(--card));
}

.multiplayer-tunnel-status.is-error {
  border-color: color-mix(in srgb, var(--warn) 54%, var(--line));
  color: var(--text);
  background: color-mix(in srgb, var(--warn) 12%, var(--card));
}

.multiplayer-security-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.multiplayer-security-note summary {
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.multiplayer-security-note p {
  margin: 8px 0 0;
}

.multiplayer-room-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 24%, var(--card)), var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
}

.multiplayer-room-hero > div {
  display: grid;
  gap: 4px;
}

.multiplayer-room-code {
  font-size: clamp(2rem, 8vw, 3.75rem);
  letter-spacing: .18em;
  line-height: 1;
}

.multiplayer-connection-status {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  white-space: nowrap;
}

.multiplayer-connection-status.is-connected {
  color: var(--good);
  background: color-mix(in srgb, var(--good) 13%, transparent);
}

.multiplayer-share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.multiplayer-address-warning {
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--warn) 54%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--warn) 12%, var(--card));
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.multiplayer-join-access-badge {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.multiplayer-join-access-badge.is-public {
  color: var(--good);
  background: color-mix(in srgb, var(--good) 12%, transparent);
}

.multiplayer-qr-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, white 3%, var(--card));
}

.multiplayer-qr-frame {
  display: grid;
  width: 196px;
  min-height: 196px;
  place-items: center;
  padding: 8px;
  border-radius: 12px;
  background: white;
}

.multiplayer-qr-frame img {
  display: block;
  width: 180px;
  height: 180px;
}

.multiplayer-qr-frame img[hidden],
.multiplayer-qr-frame span[hidden] {
  display: none !important;
}

.multiplayer-qr-copy {
  display: grid;
  gap: 6px;
  line-height: 1.45;
}

.multiplayer-qr-copy > span:not(.eyebrow),
.multiplayer-qr-copy small {
  color: var(--text-muted);
}

.multiplayer-seat-header,
.multiplayer-room-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.multiplayer-seat-header > div {
  display: grid;
  gap: 2px;
}

.multiplayer-seat-list {
  display: grid;
  gap: 7px;
}

.multiplayer-invitation-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.multiplayer-invite-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, white 3%, var(--card));
}

.multiplayer-invite-header,
.multiplayer-invite-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.multiplayer-invite-header {
  justify-content: space-between;
}

.multiplayer-invite-identity {
  min-width: 0;
}

.multiplayer-invite-identity > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.multiplayer-invite-identity strong {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-invite-slot {
  display: grid;
  place-items: center;
  min-width: 58px;
  min-height: 42px;
  padding: 6px 8px;
  border-radius: 10px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, var(--card));
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.multiplayer-invite-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.multiplayer-invite-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.multiplayer-invite-status.is-connected {
  color: var(--good);
}

.multiplayer-invite-body {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.multiplayer-invite-qr-frame {
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  overflow: hidden;
  border-radius: 10px;
  color: #475569;
  background: white;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.multiplayer-invite-qr-frame img {
  display: block;
  width: 136px;
  height: 136px;
}

.multiplayer-invite-details {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.multiplayer-invite-details p,
.multiplayer-invite-details small {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.4;
}

.multiplayer-invite-details p {
  font-size: 12px;
}

.multiplayer-invite-details small {
  font-size: 10px;
}

.multiplayer-invite-credentials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.multiplayer-invite-credentials > div {
  display: grid;
  gap: 2px;
}

.multiplayer-invite-credentials dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.multiplayer-invite-credentials dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
}

.multiplayer-invite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.multiplayer-invite-actions button {
  min-height: 36px;
  padding: 7px 10px;
}

.multiplayer-invite-url {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-seat-pin {
  padding: 4px 8px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.multiplayer-seat-status {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.multiplayer-seat-status.is-connected {
  background: var(--good);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 16%, transparent);
}

.multiplayer-invitation-print-root {
  display: none;
}

@media (max-width: 640px) {
  #multiplayerTrigger {
    display: none;
  }

  .multiplayer-share-row {
    grid-template-columns: 1fr;
  }

  .multiplayer-access-options {
    grid-template-columns: 1fr;
  }

  .multiplayer-qr-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .multiplayer-invitation-list {
    grid-template-columns: 1fr;
  }

  .multiplayer-invite-body {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .multiplayer-invite-qr-frame,
  .multiplayer-invite-qr-frame img {
    width: 112px;
    height: 112px;
  }
}

.draft-plan-toolbar[hidden] {
  display: none;
}

/* Focused status hierarchy and quieter draft-night emphasis. */
.league-chips {
  gap: 0;
}

.app-header .league-chips .chip {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--text-muted) 82%, transparent);
  font-size: 11px;
}

.league-chips .chip + .chip::before {
  content: none;
}

.app-header .league-chips .chip + .chip {
  margin-left: 7px;
  padding-left: 7px;
  border-left: 1px solid rgba(148, 163, 184, .24);
}

.local-status {
  gap: 6px;
  color: color-mix(in srgb, var(--text-muted) 78%, transparent);
  font-size: 11px;
}

.local-status > span {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.header-actions > button {
  padding-inline: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.header-actions > button.primary,
#multiplayerTrigger.primary {
  color: #07120f;
  font-weight: 700;
}

.header-actions > .setup-trigger {
  color: var(--text);
}

.draft-command-bar {
  grid-template-areas: 'clock progress timer queue';
  grid-template-columns: minmax(180px, .8fr) minmax(280px, 1.35fr) auto minmax(150px, .72fr);
  gap: 16px;
  padding-block: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
}

.on-clock-block { grid-area: clock; }
.draft-progress-block { grid-area: progress; }
.draft-command-bar .draft-timer { grid-area: timer; }
.next-queue-callout { grid-area: queue; }

.draft-command-bar.is-my-turn {
  border-bottom-color: rgba(251, 191, 36, .3);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
}

.next-queue-callout {
  border-color: rgba(148, 163, 184, .16);
  background: rgba(255, 255, 255, .025);
}

.next-queue-callout::before {
  width: 2px;
  background: rgba(45, 212, 191, .62);
}

.next-queue-callout:not(:disabled):hover {
  border-color: rgba(45, 212, 191, .34);
  background: rgba(45, 212, 191, .06);
}

.next-queue-callout > span:last-child,
.draft-progress-copy,
.command-my-turn-chip {
  font-size: 12px;
}

.next-queue-callout.is-empty {
  border-color: transparent;
  background: transparent;
}

.next-queue-callout.is-empty::before {
  background: rgba(148, 163, 184, .2);
}

.command-my-turn-chip.is-on-clock {
  border-color: rgba(251, 191, 36, .34);
  background: rgba(251, 191, 36, .1);
  box-shadow: none;
  animation: none;
}

.draft-progress-track {
  height: 4px;
}

.draft-progress-track span {
  background: var(--accent);
}

.draft-command-bar .draft-timer {
  border-color: rgba(148, 163, 184, .14);
  background: rgba(7, 12, 16, .36);
}

.timer-toggle {
  min-width: 88px;
  color: var(--text-muted);
  font-size: 12px;
}

body:not(.presenter-mode) .draft-board-context {
  display: none;
}

.player.player-selected {
  background: rgba(45, 212, 191, .065);
  box-shadow: inset 3px 0 0 rgba(45, 212, 191, .78);
}

.player-select:hover,
.player-select:focus-visible {
  background: rgba(45, 212, 191, .045);
  box-shadow: inset 2px 0 0 rgba(45, 212, 191, .62);
}

.player-draft-action {
  border-color: rgba(148, 163, 184, .2);
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  font-weight: 800;
  box-shadow: none;
}

.player-draft-action:hover {
  border-color: rgba(45, 212, 191, .36);
  background: rgba(45, 212, 191, .07);
  color: #ccfbf1;
}

.player-draft-action.selected {
  border-color: rgba(45, 212, 191, .34);
  background: rgba(45, 212, 191, .09);
  color: #99f6e4;
}

.player-plan-toggle {
  min-width: 64px;
  color: var(--text-muted);
  font-size: 12px;
}

.player .pos,
.player-primary-metric .player-metric span {
  font-size: 12px;
}

.tier-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.tier-divider-line {
  flex: 1 1 auto;
  height: 1px;
  background: rgba(148, 163, 184, .16);
}

.tier-divider-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.tier-divider-badge {
  color: var(--text);
  font-weight: 800;
}

.tier-divider-separator {
  color: rgba(148, 163, 184, .5);
}

.tier-divider-count {
  font-weight: 600;
}

#board th.my-team-column,
#board td.my-team-column {
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .22);
}

#board td.my-upcoming-pick {
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .3);
  background: rgba(45, 212, 191, .04);
}

#board th.my-team-column::after {
  color: var(--text-muted);
}

/* Consolidated responsive shell: tablet status, mobile chrome, scrolling, and controls. */
@media (max-width: 1000px) {
  .draft-command-bar {
    grid-template-areas: 'clock progress timer';
    grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.2fr) auto;
    gap: 12px;
  }

  .next-queue-callout {
    display: none;
  }

  .draft-progress-block {
    display: grid;
  }
}

@media (max-width: 760px) {
  html,
  body {
    height: auto;
    min-height: 100%;
  }

  .league-chips,
  .local-status,
  .shortcuts-help {
    display: none;
  }

  .app-header {
    height: 46px;
    min-height: 46px;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 2px 8px 2px 12px;
  }

  .app-header h1 {
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-title-full { display: none; }
  .app-title-short { display: inline; }

  .header-actions {
    flex: 0 0 auto;
    gap: 2px;
    margin-left: 0;
  }

  .header-actions button {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }

  .header-actions .setup-trigger {
    margin-left: 0;
    border-color: rgba(45, 212, 191, .28);
    background: rgba(45, 212, 191, .09);
    color: var(--accent);
  }

  .draft-command-bar {
    top: 46px;
    grid-template-areas:
      'clock timer'
      'progress progress';
    grid-template-columns: minmax(0, 1fr) minmax(126px, auto);
    gap: 4px 8px;
    height: 48px;
    min-height: 48px;
    padding: 3px 8px 6px;
  }

  .on-clock-block .eyebrow,
  .next-queue-callout .eyebrow,
  .next-queue-callout > span:last-child {
    display: none;
  }

  .on-clock-block strong {
    font-size: 13px;
  }

  .on-clock-detail {
    display: none;
  }

  .on-clock-compact {
    display: inline;
  }

  .draft-progress-block {
    position: absolute;
    right: 8px;
    bottom: 1px;
    left: 8px;
    display: block;
  }

  .draft-progress-copy {
    display: none;
  }

  .draft-progress-track {
    height: 3px;
  }

  .draft-command-bar .draft-timer {
    width: auto;
    min-width: 0;
    min-height: 38px;
    gap: 5px;
    padding: 2px 3px 2px 7px;
  }

  .timer-display {
    min-width: 3.8ch;
    font-size: 18px;
  }

  .timer-toggle {
    min-width: 72px;
    min-height: 34px;
    padding-inline: 6px;
    font-size: 11px;
  }

  .mobile-view-tabs {
    top: 94px;
    padding: 4px 8px;
  }

  .mobile-view-tab {
    min-height: 38px;
    padding-block: 5px;
  }

  .container {
    min-height: calc(100dvh - 140px);
    padding: 8px;
  }

  .container.mobile-view-players #bestAvailableCard,
  .container.mobile-view-board #draftBoardCard,
  .container.mobile-view-roster #myTeamCard {
    overflow: visible;
  }

  .container.mobile-view-players #bestAvailableCard {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .player-panel {
    gap: 8px;
    padding: 10px;
  }

  .player-toolbar {
    gap: 8px;
  }

  .advanced-filter-body .segmented-control {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .pos-segment {
    min-width: 0;
    min-height: 42px;
    padding-inline: 3px;
  }

  .draft-board-tools {
    align-items: stretch;
  }

  .draft-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .action-menu > summary,
  .draft-actions .icon-button {
    width: 100%;
    min-width: 0;
  }

  .player-select {
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(45px, 56px));
    padding: 10px;
  }

  .player .name {
    font-size: 14px;
  }

  .player .tag:not(.pos-chip) {
    display: none;
  }

  .player-metric {
    min-width: 0;
  }

  #board {
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }

  .scroller,
  .mobile-draft-feed {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  #bestAvailableCard:has(.draft-selection-bar:not([hidden])) {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .draft-selection-bar {
    position: fixed;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    z-index: 30;
    border: 1px solid rgba(45, 212, 191, .28);
    border-radius: 10px;
    box-shadow: 0 -10px 28px rgba(0, 0, 0, .42);
    align-items: stretch;
    flex-direction: column;
  }

  .draft-selection-actions {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
  }

  .draft-selection-actions button {
    width: 100%;
  }

  .player-plan-toggle {
    font-size: 12px;
  }

  .comparison-panel {
    inset: 0;
    width: 100%;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .comparison-header {
    min-height: 58px;
    padding: 7px 10px 7px 14px;
  }

  .comparison-header strong {
    font-size: 16px;
  }

  .comparison-scroller {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .draft-plan-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .plan-view-switch,
  .quick-filters .plan-view-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plan-view-switch button {
    min-width: 0;
    padding-inline: 5px;
  }

  .compare-status {
    width: auto;
    min-height: 36px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .player-plan-actions {
    gap: 5px;
  }

  .player-plan-actions button {
    flex: 1 1 auto;
    min-width: 44px;
    min-height: 44px;
  }

  .comparison-remove {
    min-width: 44px;
    min-height: 44px;
  }

  .queue-position {
    flex-basis: 100%;
  }

  .note-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .note-editor-footer .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .player-select {
    grid-template-columns: minmax(0, 1fr) 56px;
  }

  .player .player-metric:not(.primary-metric) {
    display: none;
  }

  .draft-intelligence > summary {
    min-height: 44px;
    padding-inline: 10px;
    flex-wrap: wrap;
  }

  .intelligence-highlights {
    order: 3;
    flex-basis: calc(100% - 24px);
    margin-left: 24px;
  }

  .intelligence-why {
    margin-left: auto;
  }

  .draft-intelligence-details {
    padding: 2px 10px 12px;
  }

  .intelligence-facts {
    grid-template-columns: 1fr;
  }

  .quick-filters {
    flex-direction: row;
  }

  .quick-filters > * {
    width: auto;
    min-width: 0;
  }

  .advanced-filter-body {
    right: 0;
    left: auto;
    width: min(520px, calc(200% + 8px));
  }
}

@media print {
  @page {
    margin: .5in;
  }

  body.is-printing-team-invitation {
    color: #0f172a !important;
    background: #fff !important;
  }

  body.is-printing-team-invitation > :not(.multiplayer-invitation-print-root) {
    display: none !important;
  }

  .multiplayer-invitation-print-root {
    display: grid !important;
    place-items: start center;
    min-height: 100vh;
  }

  .multiplayer-invitation-print-root .multiplayer-invite-card {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 6.5in;
    padding: .35in;
    border: 2px solid #0f172a;
    border-radius: 18px;
    color: #0f172a;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
  }

  .multiplayer-invitation-print-root .multiplayer-invite-slot {
    color: #0f766e;
    background: #ccfbf1;
  }

  .multiplayer-invitation-print-root .eyebrow,
  .multiplayer-invitation-print-root .multiplayer-invite-status,
  .multiplayer-invitation-print-root .multiplayer-invite-details p,
  .multiplayer-invitation-print-root .multiplayer-invite-details small,
  .multiplayer-invitation-print-root .multiplayer-invite-url,
  .multiplayer-invitation-print-root .multiplayer-invite-credentials dt {
    color: #475569;
  }

  .multiplayer-invitation-print-root .multiplayer-invite-status.is-connected {
    color: #047857;
  }

  .multiplayer-invitation-print-root .multiplayer-invite-body {
    grid-template-columns: 2.15in minmax(0, 1fr);
    gap: .3in;
  }

  .multiplayer-invitation-print-root .multiplayer-invite-qr-frame,
  .multiplayer-invitation-print-root .multiplayer-invite-qr-frame img {
    width: 2.15in;
    height: 2.15in;
  }

  .multiplayer-invitation-print-root .multiplayer-seat-pin {
    border: 0;
    color: #0f172a;
    background: #e2e8f0;
  }
}
