/**
 * Chalk & Settle — Snake setup wizard (Phase 3)
 */

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

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

.cs-sn-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  padding: 14px 18px 8px;
  flex-shrink: 0;
}

.cs-sn-nav > :first-child { justify-self: start; }
.cs-sn-nav > :nth-child(2) { justify-self: center; }
.cs-sn-nav > :last-child { justify-self: end; }

.cs-sn-back {
  font-family: var(--font-body);
  font-size: 14px;
  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-sn-game {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--cs-muted);
  font-weight: 600;
}

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

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

.cs-sn-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-sn-hint {
  color: var(--text-dim);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  margin-left: auto;
}

.cs-sn-players {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cs-sn-player {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.cs-sn-p-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--olive);
  flex-shrink: 0;
}

.cs-sn-p-name {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--forest);
  flex: 1;
  min-width: 0;
}

.cs-sn-p-ch {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

.cs-sn-p-strokes {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--cs-muted);
  min-width: 48px;
  text-align: right;
  flex-shrink: 0;
}

.cs-sn-locked {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
}

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

.cs-sn-locked-s {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

.cs-sn-money {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
}

.cs-sn-money-lbl {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.cs-sn-money-in {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
}

.cs-sn-cur {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--cs-muted);
  flex-shrink: 0;
}

.cs-sn-money-in input {
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--forest);
  width: 100%;
  outline: none;
  -moz-appearance: textfield;
}

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

.cs-sn-rule-stack {
  margin-top: 8px;
}

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

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

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

.cs-sn-rule-s {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
  line-height: 1.35;
}

.cs-sn-toggle {
  width: 40px;
  height: 23px;
  border-radius: 12px;
  background: var(--stone);
  position: relative;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.cs-sn-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--paper);
}

.cs-sn-toggle.is-on { background: var(--forest); }
.cs-sn-toggle.is-on::after { left: auto; right: 2px; }

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

.cs-sn-ovteaser-t {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
}

.cs-sn-ovteaser-s {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.cs-sn-ovteaser-chev {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 18px;
}

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

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

.cs-sn-opt-lbl {
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

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

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

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

.cs-sn-opt-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--forest);
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.cs-sn-startbar {
  flex-shrink: 0;
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.cs-sn-start-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.cs-sn-lab {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--forest);
}

.cs-sn-amt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

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

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

.cs-sn-scrim {
  position: fixed;
  inset: 0;
  background: rgba(36, 33, 29, 0.28);
  z-index: 40;
  display: none;
  align-items: flex-end;
}

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

.cs-sn-sheet {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 86dvh;
  overflow-y: auto;
}

.cs-sn-sheet-grip {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--stone);
  margin: 4px auto 12px;
}

.cs-sn-sheet-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--forest);
  margin: 0 0 12px;
}

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