/**
 * Chalk & Settle — 30/40-Ball setup wizard (Phase 3 · screen 10)
 * Wire: setup-screen-THIRTYBALL-APPROVED · June 11 2026
 */

.cs-tb-screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 0;
  max-width: 430px;
}

.cs-tb-screen.u-hidden {
  display: none;
}

.cs-tb-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 8px;
  flex-shrink: 0;
}

.cs-tb-back {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--forest);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  min-height: var(--touch-min);
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.cs-tb-game {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--forest);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cs-tb-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 14px;
}

.cs-tb-sec {
  margin-top: 16px;
}

.cs-tb-sec-h {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
}

.cs-tb-hint {
  color: #c8c2b8;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  margin-left: auto;
}

.cs-tb-note {
  font-size: 12px;
  color: #8a8378;
  margin-top: 9px;
  line-height: 1.45;
  padding: 0 2px;
}

.cs-tb-note b {
  color: #6b655c;
  font-weight: 600;
}

.cs-tb-chiprow {
  display: flex;
  gap: 6px;
}

.cs-tb-chip {
  flex: 1;
  border: 1.5px solid var(--stone);
  border-radius: 9px;
  padding: 9px 6px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: #6b655c;
  font-weight: 500;
  background: var(--paper);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cs-tb-chip.is-on {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--cream);
}

.cs-tb-budget {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #fbf9f4;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 8px;
}

.cs-tb-budget-n {
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
  color: var(--forest);
  line-height: 1;
  flex-shrink: 0;
}

.cs-tb-budget-t {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--forest);
  font-weight: 600;
}

.cs-tb-budget-s {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
  line-height: 1.4;
}

.cs-tb-team {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.cs-tb-team-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 9px;
}

.cs-tb-team-nm {
  font-family: var(--font-display-alt, 'Cormorant Garamond', serif);
  font-style: italic;
  font-size: 15px;
  font-weight: 600;
  color: var(--forest);
}

.cs-tb-team-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.cs-tb-pchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cs-tb-pchip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
}

.cs-tb-pchip-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #efeae0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  color: var(--olive);
  flex-shrink: 0;
}

.cs-tb-pchip-nm {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--forest);
}

.cs-tb-team-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid #efeae0;
  font-family: var(--font-body);
  font-size: 12px;
  color: #8a8378;
  width: 100%;
  text-align: left;
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cs-tb-team-foot .cs-tb-who {
  font-weight: 600;
  color: var(--forest);
}

.cs-tb-team-foot .cs-tb-host {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.cs-tb-team-foot .cs-tb-edit {
  margin-left: auto;
  color: #c8c2b8;
  font-size: 13px;
}

.cs-tb-vs {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  padding: 2px 0 6px;
}

.cs-tb-addteam {
  background: transparent;
  border: 1.5px dashed #c8c2b8;
  border-radius: 11px;
  padding: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #6b655c;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cs-tb-invite {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  margin-top: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cs-tb-invite-ic {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #efeae0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-tb-invite-t {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--forest);
}

.cs-tb-invite-s {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.cs-tb-invite-chev {
  margin-left: auto;
  color: #c8c2b8;
  font-size: 18px;
}

.cs-tb-rule {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.cs-tb-rule:last-child {
  margin-bottom: 0;
}

.cs-tb-rule-t {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
}

.cs-tb-rule-s {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.45;
}

.cs-tb-toggle {
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: var(--stone);
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.cs-tb-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cream);
  transition: left 0.2s ease, right 0.2s ease;
}

.cs-tb-toggle.is-on {
  background: var(--forest);
}

.cs-tb-toggle.is-on::after {
  left: auto;
  right: 2px;
}

.cs-tb-bet-grid {
  display: flex;
  gap: 7px;
}

.cs-tb-bet {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 8px;
}

.cs-tb-bet-l {
  font-family: var(--font-body);
  font-size: 10.5px;
  color: #8a8378;
  margin-bottom: 6px;
  text-align: center;
}

.cs-tb-bet-in {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-tb-bet-cur {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
}

.cs-tb-bet-in input {
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  color: var(--forest);
  width: 30px;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.cs-tb-bet-in input::-webkit-outer-spin-button,
.cs-tb-bet-in input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cs-tb-ovteaser {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cs-tb-ovteaser-ic {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #efeae0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-tb-ovteaser-t {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
}

.cs-tb-ovteaser-s {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.cs-tb-ovteaser-chev {
  margin-left: auto;
  color: #c8c2b8;
  font-size: 20px;
}

.cs-tb-opt-row {
  display: flex;
  gap: 8px;
}

.cs-tb-opt-card {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.cs-tb-opt-lbl {
  font-family: var(--font-body);
  font-size: 11px;
  color: #8a8378;
  margin-bottom: 5px;
}

.cs-tb-opt-val {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cs-tb-v {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--forest);
}

.cs-tb-opt-step {
  display: flex;
  gap: 5px;
}

.cs-tb-opt-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1.5px solid var(--stone);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--forest);
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.cs-tb-startbar {
  position: sticky;
  bottom: 0;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--cream);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.cs-tb-btn-start {
  width: 100%;
  background: var(--forest);
  color: #f2e3b6;
  border: none;
  border-radius: 14px;
  padding: 15px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  min-height: var(--touch-min);
  -webkit-tap-highlight-color: transparent;
}

.cs-tb-engine-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.cs-tb-scrim {
  position: fixed;
  inset: 0;
  background: rgba(36, 33, 29, 0.35);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.cs-tb-scrim.is-on {
  display: flex;
}

.cs-tb-sheet {
  width: 100%;
  max-width: 430px;
  background: var(--paper);
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 85vh;
  overflow-y: auto;
}

.cs-tb-sheet-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--forest);
  margin-bottom: 12px;
}

.cs-tb-scorer-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--forest);
  margin-bottom: 8px;
  cursor: pointer;
}

.cs-tb-scorer-opt.is-on {
  border-color: var(--forest);
  background: var(--paper);
  font-weight: 600;
}

.cs-tb-sheet-done {
  width: 100%;
  margin-top: 8px;
  background: var(--forest);
  color: #f2e3b6;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: var(--touch-min);
}
