/* ===========================================================
   Setup page — spacing scale: 4 / 8 / 12 / 16 / 20 / 24 / 28
   =========================================================== */

.setup-main {
  padding: 32px 0 72px;
  max-width: 960px;
  margin-inline: auto;
}

.setup-head {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.setup-eyebrow {
  display: inline-block;
  background: var(--accent-teal);
  color: #fff;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-weight: 800;
  font-size: .9rem;
  line-height: 1.3;
  box-shadow: 2px 2px 0 0 var(--ink);
}

.setup-head .text-lead {
  max-width: 28rem;
}

.setup-flow-hint {
  max-width: 34rem;
  margin: 4px 0 0;
  padding: 12px 18px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.75);
  border: 2px dashed var(--ink);
  border-radius: var(--radius-sm);
  line-height: 1.55;
}

/* —— Grid —— */
.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .setup-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* —— Panels —— */
.setup-panel {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  overflow: visible;
}

.setup-panel--players {
  border-top: 6px solid var(--accent-blue);
}

.setup-panel--settings {
  border-top: 6px solid var(--accent-violet);
}

/* —— Panel header (title + count as siblings — never nest count in tag) —— */
.setup-panel-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0 6px 18px 2px;
  border-bottom: 2px dashed rgba(22, 22, 26, 0.12);
}

.setup-panel-head__title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.25;
}

.tag-label--players {
  background: var(--accent-amber);
}

.tag-label--settings {
  background: var(--accent-violet);
  color: #fff;
}

.setup-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--accent-amber);
  font-weight: 900;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  border: var(--border-w) solid var(--ink);
  box-shadow: 2px 2px 0 0 var(--ink);
  flex-shrink: 0;
}

.setup-form-error {
  margin: 0 0 12px;
  font-size: .88rem;
  font-weight: 800;
  color: var(--brand-imposter-red);
  text-align: center;
}
.setup-form-error[hidden] {
  display: none;
}

/* —— Players list —— */
.players-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 380px;
  margin: 0;
}

.player-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-height: 48px;
  padding-bottom: 4px;
  padding-right: 4px;
}

.player-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  box-shadow: 2px 2px 0 0 var(--ink);
}

.player-row .field {
  padding: 12px 14px;
  font-size: 1rem;
  flex: 1;
  min-width: 0;
  min-height: 48px;
}

.player-remove {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--accent-coral);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 2px 2px 0 0 var(--ink);
  transition: transform .15s ease;
  font-size: 1.1rem;
}

.player-remove:hover {
  transform: translateY(-1px);
}

.player-remove-spacer {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

/* —— Settings fields —— */
.setup-panel .field-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.setup-panel .field-label {
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.3;
}

.setup-panel .field[type="number"] {
  font-variant-numeric: tabular-nums;
  max-width: 100%;
}

.category-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  padding-bottom: 4px;
}

.cat-btn {
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  min-height: 48px;
  font-weight: 800;
  font-size: .98rem;
  line-height: 1.35;
  background: var(--surface);
  cursor: pointer;
  box-shadow: 2px 2px 0 0 var(--ink);
  transition: background-color .15s ease, color .15s ease;
  text-align: center;
}

.cat-btn.active {
  background: var(--accent-violet);
  color: #fff;
}

.cat-btn:hover:not(.active) {
  background: #f8f6f0;
}

/* —— Actions —— */
.setup-action-btn {
  min-height: 52px;
  margin-top: 4px;
}

.setup-action-btn--primary {
  margin-top: 8px;
}

.setup-footnote {
  margin: -8px 0 0;
  text-align: center;
  font-size: .85rem;
  color: var(--ink-soft);
  font-weight: 700;
  line-height: 1.4;
}
