/* Feature: Is the caller a real person? Two-way verification and caller progress styles. */

/* "Ink" (dark text colour) used below. base.css has no --ink, so without this line the
   selected demo chip had white text on no background and could not be seen. */
.cc-screen {
  --ink: var(--charcoal);
}

.cc-page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Home Screen Role Cards */
.role-grid {
  display: grid;
  gap: 0.95rem;
  margin-top: 0.9rem;
}

.role-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: #FFFFFF;
  border: 2.5px solid #C9D2D7;
  border-radius: 20px;
  padding: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #C9D2D7;
  transition: border-color 0.15s, background-color 0.15s, transform 0.1s, box-shadow 0.1s;
}

.role-card:hover {
  border-color: var(--red);
  background: var(--red-tint);
}

.role-card:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #C9D2D7;
}

.role-card.primary-role {
  border-color: var(--red);
  background: #FFFDFD;
  box-shadow: 0 4px 0 rgba(237, 28, 36, 0.25);
}

.role-icon {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 16px;
  background: var(--red-tint);
  color: var(--red-dark);
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  flex: none;
}

.role-icon .icon {
  width: 2.1rem;
  height: 2.1rem;
}

.role-card.primary-role .role-icon {
  background: var(--red);
  color: #FFFFFF;
}

.role-card strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.18rem;
}

.role-card span.sub {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
}

/* How-it-works box on home screen */
.how-box {
  margin-top: 1.1rem;
  background: var(--slate-tint);
  border-radius: 16px;
  padding: 0.9rem 1rem;
}

.how-box p.how-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin: 0 0 0.45rem;
}

.how-box ol {
  margin: 0;
  padding-left: 1.3rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.how-box li {
  margin-bottom: 0.25rem;
}

.how-box li:last-child {
  margin-bottom: 0;
}

/* Step & Theme Pills */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.step-pill {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--slate-tint);
  color: var(--ink);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

.theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  background: #FFF3D1;
  color: #7A4F00;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

/* Mahjong & Kopitiam 2x2 CAPTCHA Grid */
.rp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.rp-card {
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 8.5rem;
  padding: 0.95rem 0.5rem;
  border-radius: 18px;
  border: 3px solid #C9D2D7;
  background: #FFFFFF;
  box-shadow: 0 4px 0 #C9D2D7;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s, background-color 0.15s, box-shadow 0.1s;
}

.rp-card:hover {
  border-color: var(--red);
  background: var(--red-tint);
}

.rp-card:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #C9D2D7;
}

/* Tactile Ivory Mahjong Piece */
.rp-mj-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.7rem;
  height: 4.6rem;
  background: #FFFDF7;
  border: 2.5px solid #2C3E50;
  border-bottom: 6px solid #1E7E5A;
  border-radius: 10px;
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.rp-mj-red { color: #D31924; }
.rp-mj-green { color: #157A46; }
.rp-mj-blue { color: #1B4F9C; }

.rp-mj-sub {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-top: 0.22rem;
  color: #363B40;
}

/* Food pictures: a line icon in a soft square, about the size of a mahjong tile.
   Same warm colours as the theme pill and the picture box (stamp-box). */
.rp-kopi-icon {
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 16px;
  background: #FFF3D1;
  color: #7A4F00;
}

.rp-kopi-icon .icon {
  width: 3rem;
  height: 3rem;
}

.theme-pill .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.stamp-box .icon {
  width: 1.6rem;
  height: 1.6rem;
}

.rp-cap-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
}

.rp-cap-hint {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* High-Contrast Senior Code Box & Character Pills */
.cc-code {
  font-size: clamp(2.3rem, 7vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  color: #1F2A33;
  background: #FFFDF7;
  border: 3px solid #363B40;
  border-radius: 18px;
  padding: 1.25rem 0.8rem;
  margin: 0.75rem 0;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.cc-say-label {
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.cc-say-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 0 0 1.15rem;
}

.cc-say-pills span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  height: 2.35rem;
  padding: 0 0.35rem;
  background: var(--slate-tint);
  border: 1.5px solid #C9D2D7;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.cc-say-pills span.pill-dash {
  padding: 0 0.6rem;
  font-size: 0.95rem;
}

/* Caller / Opposition Input Screen */
.code-input {
  font: inherit;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
  padding: 1rem;
  border: 3px solid #363B40;
  border-radius: 16px;
  background: #FFFDF7;
  color: #1F2A33;
  margin: 0.5rem 0 1rem;
}

.code-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-tint);
}

.quick-fill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--slate-tint);
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Expected Answer & Mutual Stamp Box */
.verify-box {
  background: var(--slate-tint);
  border: 2px solid #C9D2D7;
  border-radius: 18px;
  padding: 1.05rem;
  margin-top: 1.15rem;
}

.cc-expected-label {
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.stamp-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #FFF3D1;
  color: #7A4F00;
  border: 2px solid #E5C16C;
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

/* Live Caller Progress Box & Demo Toggle under Step 2 */
.cc-progress-wrap {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.cc-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg, #F3F5F7);
  border: 2px dashed #6B7A84;
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  font-size: 0.92rem;
}

.cc-demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cc-demo .chip[aria-pressed="true"] {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

.cc-caller {
  background: var(--ink, #363B40);
  color: #FFFFFF;
  border-radius: 20px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 6px 18px rgba(54, 59, 64, 0.14);
}

.cc-caller-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.cc-caller .cc-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  background: #FFFFFF;
  color: var(--ink, #363B40);
  border-radius: 999px;
  padding: 0.18rem 0.65rem;
}

.cc-timer-pill {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 0.18rem 0.7rem;
  font-variant-numeric: tabular-nums;
}

.cc-caller h2 {
  font-size: 1.05rem;
  color: #FFFFFF;
  margin: 0 0 0.55rem;
}

.cc-caller ol {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.94rem;
  line-height: 1.45;
  color: #F3F5F7;
}

.cc-warning {
  color: var(--red-dark);
}

.cc-error {
  color: var(--red-dark);
  font-weight: 700;
  background: var(--red-tint);
  border: 1.5px solid #F4A3A7;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  margin: 0.5rem 0;
}