/**
 * Chalk & Settle — Game catalog / launcher (Phase 3 · screen 2)
 * Wire: APPROVED — Game catalog / launcher (June 16 2026)
 */

#screen-picker.cs-cat-picker {
  padding-top: 0;
  font-family: var(--cs-font-sans);
  color: var(--cs-ledger-ink);
  background: var(--cs-ledger-bg);
}

.cs-cat-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 0 0;
}

.cs-cat-brand .cs-brand-wordmark {
  cursor: default;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  /* Hit target for long-press demo gesture — must receive pointers */
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.cs-cat-brand .cs-brand-wordmark img {
  width: 200px;
  min-width: 80px;
  /* Events bubble to #logo parent (gesture listeners live there) */
  pointer-events: none;
}

.cs-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.cs-cat-top-end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.cs-cat-settings {
  min-height: var(--cs-hit-min);
  min-width: var(--cs-hit-min);
  padding: 0 14px;
  border-radius: var(--cs-radius-2);
  border: 1px solid var(--cs-ledger-border);
  background: var(--cs-ledger-surface);
  color: var(--cs-ledger-ink);
  font-family: var(--cs-font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.cs-cat-settings:active {
  background: var(--bg-inset);
  transform: scale(0.99);
}

.cs-cat-trial {
  min-height: var(--cs-hit-min);
  padding: 0 14px;
  border-radius: var(--cs-radius-2);
  border: 1px solid var(--cs-ledger-border);
  background: var(--cs-ledger-surface);
  color: var(--cs-ledger-ink);
  font-family: var(--cs-font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.cs-cat-trial--guest {
  background: var(--cs-ledger-surface);
  color: var(--cs-ledger-ink);
  font-weight: 600;
  font-size: 15px;
  padding: 0 14px;
  cursor: pointer;
}

.cs-cat-trial--hidden {
  visibility: hidden;
  pointer-events: none;
}

.cs-cat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.cs-cat-avatar--hidden {
  visibility: hidden;
  pointer-events: none;
}

.cs-cat-head {
  padding: 14px 0 4px;
}

.cs-cat-title {
  font-family: var(--cs-font-sans);
  font-size: 28px;
  font-weight: 600;
  color: var(--cs-ledger-ink);
  margin: 0;
  line-height: 1.15;
}

.cs-cat-nudge {
  font-family: var(--cs-font-sans);
  font-size: 15px;
  color: var(--cs-ledger-muted);
  margin-top: var(--cs-space-2);
}

.cs-cat-section {
  padding-top: 20px;
}

.cs-cat-section-hd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 9px;
}

.cs-cat-section-hd h2 {
  font-family: var(--cs-font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--cs-ledger-ink);
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
}

.cs-cat-section-meta {
  font-family: var(--cs-font-sans);
  font-size: 13px;
  color: var(--cs-ledger-muted);
}

.cs-cat-meta-num {
  font-family: var(--cs-font-numbers);
}

.cs-cat-section-note {
  font-family: var(--cs-font-sans);
  font-size: 14px;
  color: var(--cs-ledger-muted);
  margin: 0 0 10px;
  line-height: 1.45;
}

.cs-cat-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cs-cat-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  background: var(--cs-ledger-surface);
  border: 1px solid var(--cs-ledger-border);
  border-radius: var(--cs-radius-3);
  padding: 13px 14px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--motion-fast);
}

.cs-cat-card:active {
  transform: scale(0.992);
}

.cs-cat-ic {
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  border-radius: var(--cs-radius-2);
  background: var(--cs-ledger-divider);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cs-ledger-ink);
  flex: 0 0 40px;
  overflow: hidden;
}

.cs-cat-ic svg {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  display: block;
  flex-shrink: 0;
}

.cs-cat-body {
  flex: 1;
  min-width: 0;
}

.cs-cat-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.cs-cat-name,
.cs-cat-desc {
  display: block;
}

.cs-cat-name {
  font-family: var(--cs-font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--cs-ledger-ink);
  line-height: 1.25;
}

.cs-cat-badge {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
}

.cs-cat-badge--play {
  background: rgba(59, 109, 17, 0.12);
  color: var(--birdie);
}

.cs-cat-badge--soon {
  background: #eae5db;
  color: #9a9183;
}

.cs-cat-desc {
  font-family: var(--cs-font-sans);
  font-size: 14px;
  color: var(--cs-ledger-muted);
  margin-top: var(--cs-space-1);
  line-height: 1.4;
  min-height: calc(1.4em * 2);
}

.cs-cat-players {
  font-family: var(--cs-font-numbers);
  font-size: 13px;
  color: var(--cs-ledger-muted);
  flex-shrink: 0;
  margin-top: 2px;
  min-width: 44px;
  text-align: right;
}

.cs-cat-chev {
  color: #c8c2b8;
  flex-shrink: 0;
  margin-top: 4px;
  display: flex;
}

.cs-cat-chev svg {
  width: 16px;
  height: 16px;
}

/* Coming soon band */
.cs-cat-section--soon .cs-cat-card {
  background: transparent;
  border-color: #e6e1d6;
  cursor: default;
}

.cs-cat-section--soon .cs-cat-card:active {
  transform: none;
}

.cs-cat-section--soon .cs-cat-ic {
  background: #ece8df;
  color: #bbb3a6;
}

.cs-cat-section--soon .cs-cat-name {
  color: #8a847a;
}

.cs-cat-section--soon .cs-cat-desc {
  color: #a8a096;
}

.cs-cat-section--soon .cs-cat-players {
  color: #b5ada2;
  border-color: #e6e1d6;
}

/* Request a game */
.cs-cat-request {
  margin-top: 6px;
  border: 1px dashed #cfc8bb;
  border-radius: 14px;
  padding: 15px;
  text-align: center;
}

.cs-cat-request h3 {
  font-family: var(--cs-font-sans);
  font-size: 16px;
  color: var(--cs-ledger-ink);
  margin: 0 0 3px;
  font-weight: 600;
}

.cs-cat-request p {
  font-family: var(--cs-font-sans);
  font-size: 14px;
  color: var(--cs-ledger-muted);
  margin: 0 0 12px;
}

.cs-cat-request-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cs-ledger-ink);
  color: var(--cs-ledger-ink);
  border-radius: var(--cs-radius-2);
  padding: 0 18px;
  font-family: var(--cs-font-sans);
  font-size: 16px;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  min-height: var(--cs-btn-primary-height);
  min-width: var(--cs-hit-min);
  -webkit-tap-highlight-color: transparent;
}

.cs-cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cs-space-2);
  padding-top: var(--cs-space-4);
}

.cs-cat-filter {
  min-height: var(--cs-hit-min);
  min-width: var(--cs-hit-min);
  padding: 0 14px;
  border-radius: var(--cs-radius-2);
  border: 1px solid var(--cs-ledger-border);
  background: var(--cs-ledger-surface);
  color: var(--cs-ledger-ink);
  font-family: var(--cs-font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cs-cat-filter.is-on {
  background: var(--cs-ledger-ink);
  color: var(--cs-ledger-bg);
  border-color: var(--cs-ledger-ink);
}

.cs-cat-card {
  min-height: var(--cs-btn-primary-height);
}

.cs-cat-sheet-title,
.cs-cat-sheet-ic,
.cs-cat-start-btn {
  font-family: var(--cs-font-sans);
}

/* Rules bottom sheet */
.cs-cat-scrim {
  position: fixed;
  inset: 0;
  z-index: 520;
  background: rgba(27, 61, 47, 0.34);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.cs-cat-scrim.on {
  display: flex;
}

.cs-cat-sheet {
  width: 100%;
  max-width: 430px;
  background: var(--cs-ledger-surface);
  color: var(--cs-ledger-ink);
  color-scheme: light;
  border-radius: var(--cs-radius-4) var(--cs-radius-4) 0 0;
  padding: var(--cs-space-2) var(--cs-space-5) var(--cs-space-5);
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cs-cat-scrim--confirm {
  z-index: 540;
}

.cs-cat-sheet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--cs-space-3);
  margin-bottom: var(--cs-space-4);
}

.cs-cat-sheet-close {
  min-width: var(--cs-hit-min);
  min-height: var(--cs-hit-min);
  padding: 0 12px;
  border: none;
  border-radius: var(--cs-radius-2);
  background: transparent;
  color: var(--cs-ledger-ink);
  font-family: var(--cs-font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cs-cat-sheet-copy {
  font-family: var(--cs-font-sans);
  font-size: 16px;
  line-height: 1.4;
  color: var(--cs-ledger-ink);
  margin: 0 0 var(--cs-space-5);
}

.cs-cat-keep-btn,
.cs-cat-danger-btn {
  width: 100%;
  min-height: var(--cs-btn-primary-height);
  border-radius: var(--cs-radius-2);
  font-family: var(--cs-font-sans);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-cat-keep-btn {
  border: none;
  background: var(--cs-ledger-ink);
  color: var(--cs-ledger-bg);
  margin-bottom: var(--cs-space-2);
}

.cs-cat-danger-btn {
  border: none;
  background: var(--clay, #A8593E);
  color: var(--cs-board-ink);
}

.cs-cat-grip {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--stone);
  margin: 0 auto 14px;
}

.cs-cat-sheet-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.cs-cat-sheet-ic {
  width: 46px;
  height: 46px;
  border-radius: var(--cs-radius-3);
  background: var(--cs-ledger-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cs-ledger-ink);
  flex-shrink: 0;
  overflow: hidden;
}

.cs-cat-sheet-title {
  font-family: var(--cs-font-sans);
  font-size: 22px;
  font-weight: 600;
  color: var(--cs-ledger-ink);
  margin: 0;
  line-height: 1.15;
}

.cs-cat-sheet-players {
  font-family: var(--cs-font-numbers);
  font-size: 13px;
  color: var(--cs-ledger-muted);
  display: block;
  margin-top: 3px;
}

.cs-cat-mg-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cs-font-sans);
  font-size: 14px;
  line-height: 1.4;
  color: var(--cs-ledger-muted);
  margin-bottom: 12px;
}

.cs-cat-mg-line svg,
.cs-cat-sheet-ic svg {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
}

.cs-cat-rblock {
  margin-bottom: 14px;
}

.cs-cat-rblock h4 {
  font-family: var(--cs-font-sans);
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--cs-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 6px;
}

.cs-cat-rblock ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cs-cat-rblock li {
  font-family: var(--cs-font-sans);
  font-size: 15px;
  color: var(--cs-ledger-ink);
  line-height: 1.4;
  padding-left: 15px;
  position: relative;
}

.cs-cat-rblock li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--olive);
}

.cs-cat-rblock p {
  font-family: var(--cs-font-sans);
  font-size: 15px;
  color: var(--cs-ledger-ink);
  line-height: 1.45;
  margin: 0;
}

.cs-cat-start-btn {
  width: 100%;
  min-height: var(--cs-btn-primary-height);
  background: var(--cs-ledger-ink);
  color: var(--cs-ledger-bg);
  border: none;
  border-radius: var(--cs-radius-2);
  padding: 0 16px;
  font-family: var(--cs-font-sans);
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.cs-cat-start-btn:active {
  opacity: 0.94;
  transform: scale(0.99);
}

.cs-cat-foot-spacer {
  height: 26px;
}

/* Hide legacy catalog chrome superseded by wire */
#screen-picker.cs-cat-picker .catalog-toolbar,
#screen-picker.cs-cat-picker .picker-top-bar,
#screen-picker.cs-cat-picker .greeting,
#screen-picker.cs-cat-picker #cs-ob-guest-foot,
#screen-picker.cs-cat-picker #cs-ob-guest-pill {
  display: none !important;
}

body.cs-ob-guest-mode #catalog-your-label,
body.cs-ob-guest-mode #catalog-multi-label,
body.cs-ob-guest-mode #catalog-soon-label {
  font-family: var(--cs-font-sans);
  font-style: normal;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--cs-ledger-ink);
}
