/* ============================================================
   Slow Draft — Stylesheet
   ============================================================ */

/* --- Reset & base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:         #0f1117;
  --color-surface:    #1a1d27;
  --color-surface2:   #22263a;
  --color-border:     #2e3250;
  --color-text:       #e2e8f0;
  --color-text-muted: #8892b0;
  --color-accent:     #4f8ef7;
  --color-accent-dk:  #2563eb;
  --color-green:      #22c55e;
  --color-yellow:     #eab308;
  --color-red:        #ef4444;
  --color-onclock:    #1a3a2a;
  --color-ondeck:     #2a2a12;
  --radius:           8px;
  --radius-sm:        4px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html, body {
  height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Navbar ----------------------------------------------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 52px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}

.nav-brand {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.03em;
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-brand:hover { text-decoration: none; opacity: 0.85; }
.nav-brand-icon { font-style: normal; font-size: 1rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex: 1;
  justify-content: flex-end;
}

.nav-link {
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--color-text-muted);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--color-text); background: var(--color-surface2); text-decoration: none; }
.nav-link.active { color: var(--color-text); background: var(--color-surface2); font-weight: 600; }

.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--color-border);
  margin: 0 0.4rem;
  flex-shrink: 0;
}

.nav-user {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  white-space: nowrap;
}

.btn-logout {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  padding: 0.3rem 0.5rem;
  white-space: nowrap;
}

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0 7px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 2px;
  transition: opacity 0.15s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-hamburger span { transition: transform 0.2s, opacity 0.15s; }

/* --- Container -------------------------------------------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* --- Flash messages --------------------------------------- */
.flash-messages { margin-bottom: 1.25rem; }

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.flash-success { background: #14532d; color: #86efac; border: 1px solid #16a34a; }
.flash-error   { background: #450a0a; color: #fca5a5; border: 1px solid #dc2626; }
.flash-info    { background: #1e3a5f; color: #93c5fd; border: 1px solid #2563eb; }

.flash { position: relative; padding-right: 2.25rem; }
.flash-dismiss {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.15rem 0.3rem;
}
.flash-dismiss:hover { opacity: 1; }

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface2);
  color: var(--color-text);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn:hover { background: var(--color-border); text-decoration: none; }

.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent-dk);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover { background: var(--color-accent-dk); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-full { width: 100%; justify-content: center; }
.btn-lg   { padding: 0.65rem 1.5rem; font-size: 1rem; }
.btn-sm   { padding: 0.3rem 0.75rem; font-size: 0.82rem; }

/* --- Login ------------------------------------------------ */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 3rem);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem 2rem 2.5rem;
}

.login-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-accent);
  text-align: center;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.form-group input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.95rem;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group input + .btn { margin-top: 0.75rem; }

/* --- Board header ----------------------------------------- */
.board-header { margin-bottom: 1.25rem; }
.board-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }

.clock-banner {
  display: flex;
  gap: 2rem;
  background: var(--color-onclock);
  border: 1px solid #1e5c38;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.clock-label, .deck-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 0.1rem;
}
.deck-label { color: var(--color-yellow); }

.clock-name { font-size: 1.25rem; font-weight: 700; }
.deck-name  { font-size: 1.1rem; font-weight: 600; color: var(--color-yellow); }

.clock-pick, .deck-pick {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.deck-info { border-left: 1px solid var(--color-border); padding-left: 2rem; }

.your-turn-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e3a5f;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
}

.your-position-banner {
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.6rem 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.your-position-ondeck {
  background: var(--color-ondeck);
  border-color: #5c4a10;
  color: var(--color-yellow);
}

.draft-complete-banner {
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

/* --- Recent picks strip ----------------------------------- */
.recent-picks {
  display: flex;
  align-items: center;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
}

.recent-picks-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  flex-shrink: 0;
  padding-right: 0.5rem;
  border-right: 1px solid var(--color-border);
  white-space: nowrap;
}

.recent-pick-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.recent-pick-num {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.recent-pick-manager {
  font-weight: 600;
  color: var(--color-text);
}

.recent-pick-sep {
  color: var(--color-border);
}

.recent-pick-player {
  color: var(--color-text);
  font-weight: 500;
}

/* --- Board search ----------------------------------------- */
.board-search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.board-search-bar .filter-input { flex: 1; }

.board-search-clear {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
}
.board-search-clear:hover { opacity: 1; color: var(--color-red); }

/* --- Board table ------------------------------------------ */
.board-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.board-table thead tr {
  background: var(--color-surface2);
}

.board-table th {
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.board-table td {
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

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

/* Row states */
.row-onclock { background: var(--color-onclock); }
.row-ondeck  { background: var(--color-ondeck); }
.row-picked  { background: var(--color-surface); }
.row-future  { background: var(--color-bg); color: var(--color-text-muted); }

.row-onclock .pick-num,
.row-onclock .pick-manager { font-weight: 700; }

.col-pick    { width: 3rem; }
.pick-num    { font-variant-numeric: tabular-nums; color: var(--color-text-muted); font-size: 0.82rem; }
.pick-player { font-weight: 500; }

/* Round header rows */
.round-header-row { pointer-events: none; }
.round-header-cell {
  padding: 0.3rem 0.9rem 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
  border-top: 2px solid var(--color-border);
}
.round-header-row:first-child .round-header-cell { border-top: none; }

/* Inline position badge in board player cell */
.pos-inline {
  font-size: 0.62rem;
  padding: 0.08rem 0.3rem;
  margin-right: 0.35rem;
  border-radius: 3px;
  vertical-align: middle;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.badge-clock { background: #14532d; color: #86efac; }
.badge-deck  { background: #422006; color: #fcd34d; }

.picking-now { color: var(--color-text-muted); animation: pulse 2s ease-in-out infinite; }

/* Board footer */
.board-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.25rem 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.poll-indicator {
  cursor: default;
  opacity: 0.6;
}
.poll-indicator.refreshed {
  color: var(--color-green);
  opacity: 1;
}

/* --- Pick page -------------------------------------------- */
.pick-header { margin-bottom: 1.25rem; }
.pick-header h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.25rem; }
.pick-meta { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }

.filter-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-input {
  flex: 1;
  min-width: 180px;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.9rem;
}
.filter-input:focus { outline: none; border-color: var(--color-accent); }

.filter-select {
  padding: 0.5rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.9rem;
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--color-accent); }

.filter-multipos-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.player-count {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* chip-pos alias — used in All Teams table */
.chip-pos { font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.4rem; border-radius: 3px; display: inline-block; white-space: nowrap; }

/* Player grid */
.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.5rem;
  max-height: calc(100vh - 340px);
  min-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.6rem;
  background: var(--color-surface);
  margin-bottom: 1rem;
  scroll-padding-top: 0.5rem;
}
/* Subtle scrollbar in the grid */
.player-grid::-webkit-scrollbar { width: 6px; }
.player-grid::-webkit-scrollbar-track { background: transparent; }
.player-grid::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
.player-grid::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

.player-card {
  display: block;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  transition: border-color 0.1s, background 0.1s;
}
.player-card:hover { border-color: var(--color-accent); background: var(--color-surface2); }

.player-card input[type="radio"] { display: none; }

.player-card:has(input:checked) {
  border-color: var(--color-accent);
  background: #1a2a4a;
}

.player-card-inner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.75rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

/* Group multiple position badges tight */
.player-pos + .player-pos { margin-left: 2px; }

.player-rank {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  min-width: 1.6rem;
  text-align: right;
  flex-shrink: 0;
  opacity: 0.6;
}

.player-pos {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  min-width: 1.9rem;
  text-align: center;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Position color coding */
.pos-C  { background: #1e3a5f; color: #93c5fd; }
.pos-LW { background: #14532d; color: #86efac; }
.pos-RW { background: #3b1f6e; color: #c4b5fd; }
.pos-D  { background: #422006; color: #fcd34d; }
.pos-G  { background: #450a0a; color: #fca5a5; }

.player-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.player-team {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.player-pts {
  font-size: 0.8rem;
  color: var(--color-green);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.player-pts-prev {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Submit bar */
.pick-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.35);
}

.selected-display {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Error page ------------------------------------------- */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}
.error-page h1 { font-size: 4rem; color: var(--color-text-muted); }
.error-page p  { margin: 1rem 0 2rem; color: var(--color-text-muted); }

/* --- Admin panel ------------------------------------------ */
.admin-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.admin-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.stat-value { font-size: 1.1rem; font-weight: 700; }
.text-green { color: var(--color-green); }

.admin-section { margin-bottom: 2rem; }
.admin-section h2 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--color-border); }

.on-clock-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--color-onclock);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
}
.clock-info { display: flex; flex-direction: column; gap: 0.2rem; }
.clock-manager { font-weight: 700; font-size: 1rem; }
.clock-detail { font-size: 0.82rem; color: var(--color-text-muted); }
.clock-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th { padding: 0.4rem 0.75rem; text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); }
.admin-table td { padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--color-border); }
.admin-table tr:last-child td { border-bottom: none; }

.row-skipped td { color: var(--color-text-muted); font-style: italic; }
.row-onclock td { background: var(--color-onclock); }

.timer-info { display: flex; flex-direction: column; gap: 0.2rem; border-left: 1px solid var(--color-border); padding-left: 1.5rem; }
.timer-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-muted); }
.timer-display { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-green); letter-spacing: 0.05em; }
.timer-yellow { color: var(--color-yellow); }
.timer-red { color: var(--color-red); animation: pulse 1s ease-in-out infinite; }
.timer-expired { color: var(--color-red); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.checklist { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  font-size: 0.88rem;
}
.checklist-done {
  background: #0d2218;
  border-color: #1a5c38;
}
.checklist-icon {
  font-size: 0.9rem;
  font-weight: 700;
  width: 1.2rem;
  text-align: center;
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.checklist-done .checklist-icon { color: var(--color-green); }
.checklist-label { flex: 1; font-weight: 500; }
.checklist-done .checklist-label { color: var(--color-text-muted); text-decoration: line-through; }
.checklist-detail { font-size: 0.78rem; color: var(--color-text-muted); white-space: nowrap; }

.generate-form { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.form-field { display: flex; flex-direction: column; gap: 0.3rem; }
.form-field label { font-size: 0.78rem; color: var(--color-text-muted); }

.btn-warning { background: var(--color-yellow); color: #000; }
.btn-warning:hover { background: #ca9b06; }
.btn-danger  { background: var(--color-red); color: #fff; }
.btn-danger:hover  { background: #c53030; }

/* --- My Team lineup --------------------------------------- */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }

.lineup-board { display: flex; flex-direction: column; gap: 1.25rem; }

.slot-section { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; }

.slot-section-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 0.75rem; }

.slot-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.lineup-slot {
  min-width: 180px;
  background: var(--color-surface2);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.15s;
}
.lineup-slot:hover { border-color: var(--color-accent); }

.slot-dropzone {
  min-height: 38px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.slot-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.chip-name { flex: 1; font-weight: 500; }
.chip-team { font-size: 0.72rem; color: var(--color-text-muted); }
.chip-pts  { font-size: 0.72rem; color: var(--color-green); font-weight: 600; white-space: nowrap; }
.chip-source { font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.3rem; border-radius: 3px; }
.source-keeper { background: #1e3a5f; color: #93c5fd; }
.source-farm   { background: #14532d; color: #86efac; }
.chip-farm-elig   { font-size: 0.68rem; color: var(--color-green); font-weight: 600; white-space: nowrap; }
.chip-farm-inelig { font-size: 0.68rem; color: var(--color-text-muted); white-space: nowrap; }

.lineup-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  cursor: grab;
  user-select: none;
  font-size: 0.82rem;
}
.lineup-chip:active { cursor: grabbing; }
.drag-chosen { opacity: 0.45; }
.drag-chosen * { pointer-events: none; }
.lineup-slot.drag-over .slot-dropzone {
  background: rgba(79, 142, 247, 0.15);
  border-radius: var(--radius-sm);
  outline: 2px dashed var(--color-accent);
}

.slot-select {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.82rem;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
}
.slot-select:focus { outline: none; border-color: var(--color-accent); }

.slot-player-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  min-height: 1.2rem;
  margin-top: 0.2rem;
}

/* --- Position filter bar ---------------------------------- */
.pos-filter-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.pos-filter-btn {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pos-filter-btn:hover { background: var(--color-surface2); color: var(--color-text); }
.pos-filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent-dk);
  color: #fff;
}

.team-pick-count {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: 0.4rem;
}

/* --- All Teams -------------------------------------------- */
.all-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.team-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.team-card-header {
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
}

.team-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.team-table th { padding: 0.4rem 0.75rem; text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); }
.team-table td { padding: 0.35rem 0.75rem; border-bottom: 1px solid var(--color-border); }
.team-table tr:last-child td { border-bottom: none; }
.team-table tr:hover td { background: var(--color-surface2); }
.pick-num { color: var(--color-text-muted); font-size: 0.75rem; }
.no-picks { padding: 1rem 0.75rem; }

/* --- Roster quick-pick panel ------------------------------ */
.roster-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
}
.roster-panel-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.roster-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.roster-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--color-text);
  transition: border-color 0.15s, background 0.15s;
}
.roster-chip:hover:not(:disabled) { border-color: var(--color-accent); background: var(--color-surface); }
.roster-chip.chip-selected { border-color: var(--color-green); color: var(--color-green); }
.roster-chip.chip-already  { border-color: var(--color-yellow); color: var(--color-yellow); }
.roster-chip.chip-full     { opacity: 0.4; cursor: not-allowed; }
.roster-chip:disabled      { opacity: 0.4; cursor: not-allowed; }

/* --- Keeper submission ------------------------------------ */
.keeper-section { margin-bottom: 2rem; }
.keeper-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.keeper-count-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--color-surface2);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.keeper-rules-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.keeper-rules-hint span::before {
  content: '· ';
  opacity: 0.5;
}

.keeper-list { display: flex; flex-direction: column; gap: 0.5rem; }

.keeper-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  transition: border-color 0.15s;
}
.keeper-row-filled {
  background: var(--color-surface2);
  border-color: var(--color-accent);
}

.keeper-slot-label { min-width: 120px; flex-shrink: 0; }
.slot-num { font-weight: 600; font-size: 0.88rem; display: block; }
.slot-desc { font-size: 0.7rem; color: var(--color-text-muted); }

.keeper-tally {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.tally-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--color-surface2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.tally-pill.over-cap {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--color-red);
  color: var(--color-red);
}

.tier-badge {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  margin-top: 0.15rem;
  letter-spacing: 0.02em;
}
.tier-badge.tier-new    { color: var(--color-text-muted); }
.tier-badge.tier-second { color: var(--color-yellow); }
.tier-badge.tier-final  { color: var(--color-accent); }
.tier-badge.tier-ineligible { color: var(--color-red); }

.keeper-row-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.keeper-team {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 600;
}
.keeper-row-empty-hint {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  opacity: 0.4;
  font-style: italic;
}

.roster-panel-empty {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.keeper-search-wrap { position: relative; flex: 1; }

.player-search-input {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  padding: 0.35rem 0.6rem;
  font-size: 0.88rem;
}
.player-search-input:focus { outline: none; border-color: var(--color-accent); }

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
}

.search-result-item {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--color-surface2); }

.keeper-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.75rem;
}
.badge-approved  { background: #14532d; color: #86efac; }
.badge-submitted { background: #1e3a5f; color: #93c5fd; }
.badge-rejected  { background: #450a0a; color: #fca5a5; }
.badge-pending   { background: var(--color-surface2); color: var(--color-text-muted); }

.commissioner-note {
  font-size: 0.85rem;
  color: var(--color-yellow);
  margin-top: 0.4rem;
}

/* --- Keeper review (admin) -------------------------------- */
.keeper-warning-box {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid var(--color-red);
  border-radius: var(--radius-sm);
}
.keeper-warning-line {
  font-size: 0.8rem;
  color: var(--color-red);
  margin: 0.15rem 0;
}
.keeper-review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.keeper-review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.review-manager { font-weight: 700; font-size: 1rem; }
.review-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 0.75rem; }
.review-col-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: 0.4rem; }
.review-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }

/* --- Export page ------------------------------------------ */
.export-actions { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.export-instructions {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* --- Mobile queue drawer ---------------------------------- */
.queue-mobile-btn {
  display: none; /* shown only on mobile via media query */
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 140;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  gap: 0.4rem;
  align-items: center;
}

.queue-mobile-btn span {
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  font-size: 0.78rem;
}

.queue-mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 149;
}
.queue-mobile-backdrop.active { display: block; }

/* --- Board two-column layout ------------------------------ */
.board-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

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

/* --- Queue sidebar (on board page) ------------------------ */
.queue-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  position: sticky;
  top: 68px; /* below the fixed navbar */
  max-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.queue-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface2);
  flex-shrink: 0;
}

.queue-sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.queue-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem 0;
}
.queue-sidebar-list::-webkit-scrollbar { width: 4px; }
.queue-sidebar-list::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

/* --- Shared queue item ------------------------------------ */
.queue-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.1s;
  cursor: default;
}
.queue-item:last-child { border-bottom: none; }
.queue-item:hover { background: var(--color-surface2); }
.queue-item.drag-chosen { opacity: 0.45; }

.queue-drag-handle {
  cursor: grab;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}
.queue-drag-handle:active { cursor: grabbing; }

.queue-item-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.queue-item-team {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.queue-remove-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.queue-remove-btn:hover { opacity: 1; color: var(--color-red); }

.queue-empty-hint {
  padding: 1rem 0.85rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Small position badge variant (used in queue items) */
.pos-sm {
  font-size: 0.62rem;
  padding: 0.08rem 0.28rem;
  min-width: unset;
  flex-shrink: 0;
}

/* --- Queue toggle button on player cards ------------------ */
.queue-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-text-muted);
  padding: 0 0.15rem;
  flex-shrink: 0;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s, color 0.15s;
}
.queue-toggle-btn:hover { opacity: 1; color: var(--color-accent); }
.queue-toggle-btn.in-queue { color: var(--color-yellow); opacity: 1; }

/* --- Pick page queue panel -------------------------------- */
.pick-queue-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.pick-queue-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.pick-queue-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.pick-queue-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  flex: 1;
}

.pick-queue-items {
  display: flex;
  flex-direction: column;
}

.pick-queue-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--color-border);
}
.pick-queue-item:last-child { border-bottom: none; }

.pick-queue-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-queue-team {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.pick-queue-pts {
  font-size: 0.8rem;
  color: var(--color-green);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

/* --- Queue management page -------------------------------- */
.queue-page-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.queue-browser {
  flex: 1;
  min-width: 0;
}

.player-grid-queue {
  cursor: default;
  max-height: calc(100vh - 260px);
  min-height: 200px;
}

.player-card-queue {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  transition: border-color 0.1s, background 0.1s;
}
.player-card-queue:hover { border-color: var(--color-accent); background: var(--color-surface2); }

.queue-panel {
  width: 280px;
  flex-shrink: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  position: sticky;
  top: 68px;
  max-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.queue-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface2);
  flex-shrink: 0;
}

.queue-panel-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.queue-count {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  color: var(--color-text-muted);
  min-width: 1.4rem;
  text-align: center;
}

.queue-panel-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem 0;
}
.queue-panel-list::-webkit-scrollbar { width: 4px; }
.queue-panel-list::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.queue-panel-footer {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* --- Welcome modal ---------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.modal-header {
  padding: 1rem 1.25rem 0.75rem;
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-accent);
}

.modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.65;
}

.welcome-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 0;
}

.welcome-list li {
  padding: 0.55rem 0.85rem;
  background: var(--color-surface2);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
}

.modal-help-link {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
}

/* --- Help page -------------------------------------------- */
.help-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.help-toc {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 68px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.85rem;
}

.help-toc-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}

.help-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.toc-link {
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--color-text-muted);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.toc-link:hover { color: var(--color-text); background: var(--color-surface2); text-decoration: none; }
.toc-link.toc-active { color: var(--color-accent); background: var(--color-surface2); font-weight: 600; }

.help-content { flex: 1; min-width: 0; }

.help-page-header { margin-bottom: 2rem; }
.help-page-header h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.4rem; }
.help-page-header p { color: var(--color-text-muted); font-size: 0.95rem; }

.help-section {
  margin-bottom: 2.5rem;
  padding-top: 0.5rem;
}

.help-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: 80px;
}

.help-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1rem 0 0.4rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
}

.help-section p {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 0.6rem;
  color: var(--color-text);
}

.help-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.5rem 0 0.75rem;
  padding-left: 0;
}

.help-list li {
  padding-left: 1.1rem;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.6;
}
.help-list li::before {
  content: "·";
  position: absolute;
  left: 0.2rem;
  color: var(--color-accent);
  font-weight: 700;
}

.help-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-left: 0;
  margin: 0.75rem 0;
}

.help-steps li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.65;
}

.step-num {
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  border-radius: 999px;
  min-width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.help-note {
  background: var(--color-surface2);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.87rem;
  line-height: 1.6;
  margin: 0.75rem 0;
  color: var(--color-text-muted);
}
.help-note strong { color: var(--color-text); }

.help-note-warn {
  border-left-color: var(--color-yellow);
}

.help-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.help-badge-clock { background: #14532d; color: #86efac; }
.help-badge-deck  { background: #422006; color: #fcd34d; }

.help-yellow { color: var(--color-yellow); font-weight: 600; }
.help-red    { color: var(--color-red);    font-weight: 600; }
.help-green  { color: var(--color-green);  font-weight: 600; }

/* --- Misc helpers ----------------------------------------- */
.text-muted { color: var(--color-text-muted); }

/* --- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  .queue-mobile-btn { display: inline-flex; }

  /* Hamburger nav */
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 2px solid var(--color-border);
    padding: 0.5rem 0;
    z-index: 99;
  }
  .nav-links.nav-open { display: flex; }

  .nav-link {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-size: 0.95rem;
    color: var(--color-text);
  }
  .nav-link:hover { background: var(--color-surface2); }

  .nav-divider {
    width: auto;
    height: 1px;
    margin: 0.35rem 1.5rem;
    background: var(--color-border);
  }

  .nav-user, .btn-logout {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Board table on mobile — hide pick# column, tighten */
  .col-pick, .pick-num { display: none; }
  .board-table { font-size: 0.85rem; }
  .board-table th, .board-table td { padding: 0.45rem 0.65rem; }
  .round-header-cell { padding: 0.25rem 0.65rem; }

  /* Clock banner */
  .clock-banner { gap: 0.75rem; }
  .deck-info { border-left: none; padding-left: 0; border-top: 1px solid var(--color-border); padding-top: 0.75rem; width: 100%; }
  .your-turn-banner { flex-direction: column; gap: 0.75rem; align-items: stretch; }
  .your-turn-banner a { text-align: center; }

  /* Pick page */
  .pick-submit-bar { flex-direction: column; align-items: stretch; }
  .player-grid {
    grid-template-columns: 1fr;
    max-height: 42vh;
  }
  .player-rank { display: none; }
  .filter-bar { gap: 0.5rem; }
  .filter-select { flex: 1; }

  /* Keepers */
  .keeper-row { flex-wrap: wrap; }
  .keeper-slot-label { min-width: 90px; }
  .keeper-search-wrap { flex: 1 1 100%; order: 3; }
  .keeper-row-meta { order: 2; margin-left: auto; }

  /* All teams grid */
  .all-teams-grid { grid-template-columns: 1fr; }

  /* Admin */
  .admin-status-bar { gap: 1rem; }
  .generate-form { flex-direction: column; align-items: flex-start; }

  /* Review lists */
  .review-lists { grid-template-columns: 1fr; }

  .container { padding: 1rem 0.85rem 3rem; }

  /* Board layout: sidebar becomes a drawer on mobile */
  .board-layout { flex-direction: column; }
  .queue-sidebar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    max-height: 60vh;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: none;
    z-index: 150;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
  }
  .queue-sidebar.mobile-open { display: flex; }

  /* Queue page layout: panel floats to top on mobile */
  .queue-page-layout { flex-direction: column-reverse; }
  .queue-panel { width: 100%; position: static; max-height: 280px; }
  .player-grid-queue { max-height: 42vh; }

  /* Pick queue panel */
  .pick-queue-header { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .pick-queue-item { flex-wrap: wrap; }
  .pick-queue-pts { display: none; }

  /* Help page */
  .help-layout { flex-direction: column; }
  .help-toc { width: 100%; position: static; }
  .help-toc-list { flex-direction: row; flex-wrap: wrap; gap: 0.25rem; }
}

@media (max-width: 480px) {
  .navbar { padding: 0 1rem; }
  .clock-name { font-size: 1.05rem; }
  .board-header h1 { font-size: 1.25rem; }
  .pick-header h1 { font-size: 1.2rem; }
  .roster-chips { gap: 0.35rem; }
  .roster-chip { font-size: 0.78rem; padding: 0.2rem 0.5rem; }
}
