/* Participant experience: intentionally independent of the production console. */
.participant-view {
  color: #f7f5ed;
  background: #161823;
  background-image: radial-gradient(
    ellipse at 12% 0%,
    #342752 0,
    transparent 45%
  );
  min-height: 100vh;
}
.participant-view .participant-stage {
  width: min(100% - 40px, 660px);
  margin: 0 auto;
  padding: 36px 0 72px;
}
.participant-view .participant-kicker {
  color: #d0d5bc;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}
.participant-view .participant-stage h1 {
  color: #fffdf7;
  font-size: clamp(2.15rem, 7vw, 3.5rem);
  font-weight: 750;
  letter-spacing: -0.05em;
  line-height: 1.06;
  overflow-wrap: anywhere;
  margin: 0 0 18px;
}
.participant-view .participant-intro {
  color: #c9cbd7;
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 36rem;
  margin: 0 0 30px;
}
.participant-view .participant-card {
  color: #262735;
  background: #fffdf7;
  border: 1px solid #f4f1e8;
  border-radius: 24px;
  padding: clamp(22px, 5vw, 34px);
  margin: 22px 0;
  box-shadow: 0 12px 38px #00000012;
  min-width: 0;
  overflow-wrap: anywhere;
}
.participant-view .participant-card h2 {
  color: #20222f;
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 20px 0;
}
.participant-view .participant-card h3 {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  margin: 12px 0;
}
.participant-view .participant-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.participant-view .participant-tag {
  background: #ece5ff;
  color: #57319b;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  font-weight: 800;
}
.participant-view .participant-state {
  color: #5c5b69;
  font-size: 0.76rem;
  font-weight: 650;
}
.participant-view .participant-help {
  color: #5e5c69;
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 16px 0;
}
.participant-view .participant-choices {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.participant-view .participant-choice {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  width: 100%;
  padding: 15px;
  border: 2px solid #dedce5;
  border-radius: 13px;
  background: #fff;
  color: #2b2b3a;
  cursor: pointer;
  text-align: left;
  font: inherit;
  line-height: 1.45;
  transition:
    border-color 120ms,
    background 120ms;
}
.participant-view .participant-choice:hover:not(:disabled) {
  border-color: #8f72ba;
  background: #f6f1ff;
}
.participant-view .participant-choice.is-selected {
  border-color: #7041ad;
  background: #eee6fa;
}
.participant-view .participant-choice-number {
  font-size: 0.7rem;
  color: #70687e;
  font-weight: 750;
}
.participant-view .participant-choice-mark {
  color: #7041ad;
  font-weight: 800;
}
.participant-view .participant-choice:disabled {
  cursor: default;
  opacity: 0.8;
}
.participant-view .participant-primary,
.participant-view .entry-card button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 15px 20px;
  border: 1px solid #becd70;
  border-radius: 12px;
  background: #d2eb71;
  color: #222815;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.4;
  white-space: normal;
}
.participant-view .participant-primary:hover:not(:disabled),
.participant-view .entry-card button[type="submit"]:hover:not(:disabled) {
  background: #e0f69a;
  transform: none;
}
.participant-view .participant-primary:disabled {
  opacity: 0.65;
  cursor: default;
}
.participant-view .participant-stage :focus-visible {
  outline: 3px solid #8a5bc4;
  outline-offset: 4px;
}
.participant-view .entry-card .field {
  color: #42404e;
}
.participant-view .entry-card input {
  min-height: 56px;
  background: white;
  color: #252431;
  border: 1px solid #b8b5c5;
  border-radius: 12px;
  width: 100%;
}
.participant-view .participant-receipt,
.participant-view .participant-status {
  text-align: center;
}
.participant-view .participant-receipt {
  padding: 20px 0;
}
.participant-view .participant-receipt > span,
.participant-view .participant-status-icon {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  width: 62px;
  height: 62px;
  font-size: 1.7rem;
  background: #edf4cf;
  color: #465320;
}
.participant-view .participant-status-icon {
  background: #ece5ff;
  color: #7041ad;
}
.participant-view .participant-status p,
.participant-view .participant-receipt p {
  color: #605c6b;
  line-height: 1.65;
}
.participant-view .participant-status .participant-primary {
  margin-top: 28px;
}
.participant-view .participant-waiting {
  display: inline-block;
  margin-top: 10px;
  color: #4b5825;
  background: #eef3d6;
  font-size: 0.8rem;
  border-radius: 20px;
  padding: 8px 13px;
}
.participant-view .participant-feedback {
  color: #584973;
  background: #f0eafa;
  border-radius: 12px;
  padding: 14px;
  line-height: 1.6;
  font-size: 0.9rem;
}
.participant-view .participant-feedback.uncertain {
  color: #624a18;
  background: #fff0ca;
}
.participant-view .participant-received {
  color: #485520;
  font-size: 0.95rem;
  font-weight: 650;
}
.participant-view .participant-progress {
  display: grid;
  gap: 12px;
  padding: 20px 22px;
  color: #f3f1f9;
  border: 1px solid #464055;
  border-radius: 16px;
  background: #282536;
  margin: 24px 0;
}
.participant-view .participant-progress progress {
  width: 100%;
  height: 7px;
  accent-color: #d2eb71;
}
.participant-view .participant-progress span {
  color: #c6c1d4;
  font-size: 0.8rem;
  line-height: 1.55;
}
.participant-view .participant-end {
  color: #c9c6d6;
  font-size: 0.9rem;
  line-height: 1.65;
}
.participant-view .participant-card .results {
  margin-top: 24px;
}
.participant-view .participant-card .muted {
  color: #676271;
}
.participant-view .participant-card .form-error {
  color: #a82739;
  line-height: 1.6;
}
@media (max-width: 480px) {
  .participant-view .participant-stage {
    width: calc(100% - 28px);
    padding-top: 28px;
  }
  .participant-view .participant-card {
    border-radius: 20px;
    padding: 22px 18px;
  }
  .participant-view .participant-choice {
    padding: 14px 11px;
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .participant-view .participant-choice {
    transition: none;
  }
}

.participant-view .device-tools {
  max-width: 640px;
  margin: 24px auto;
  padding: 16px;
  color: #f9f5ff;
  background: #302c3c;
  border: 1px solid #665b7b;
  border-radius: 12px;
}
.participant-view .device-tools summary {
  cursor: pointer;
  font-weight: 700;
}
.participant-view .device-tools p {
  font-size: 13px;
  line-height: 1.5;
}
.participant-view .device-tools .button {
  min-height: 44px;
  background: #f7f3ff;
  color: #322940;
}
.participant-view .device-tools .button[aria-pressed="true"] {
  background: #dfff82;
  color: #252a1c;
}
@media (max-width: 680px) {
  .participant-view .device-tools {
    margin: 16px;
  }
}

.lead-card[hidden] {
  display: none;
}
.lead-card h2 {
  overflow-wrap: anywhere;
}
.lead-form,
.lead-form > label {
  display: grid;
  gap: 12px;
}
.lead-form {
  margin-top: 20px;
}
.lead-form input[type="email"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.lead-form .lead-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.lead-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
}
.lead-consent span {
  overflow-wrap: anywhere;
}

/* 008: only an authorized experience snapshot opts into these local variables. */
.participant-view .participant-stage[data-experience-branding] {
  width: 100%;
  min-height: 100vh;
  padding: 36px max(20px, calc((100% - 620px) / 2)) 72px;
  background: var(--brand-background);
  color: var(--brand-ink);
}
.participant-stage[data-experience-branding]
  :is(
    h1,
    h2,
    h3,
    .participant-intro,
    .participant-help,
    .participant-state,
    .participant-received,
    .participant-end,
    .participant-kicker,
    .participant-card .muted,
    .participant-receipt p,
    .participant-status p
  ) {
  color: var(--brand-ink);
}
.participant-stage[data-experience-branding]
  :is(.participant-card, .participant-choice, .entry-card input) {
  background: var(--brand-background);
  color: var(--brand-ink);
}
.participant-stage[data-experience-branding]
  :is(
    .participant-primary,
    .entry-card button[type="submit"],
    .participant-tag,
    .participant-waiting,
    .participant-receipt > span,
    .participant-status-icon,
    .participant-score
  ) {
  background: var(--brand-background);
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}
.participant-stage[data-experience-branding]
  :is(.participant-primary, .entry-card button[type="submit"]):hover:not(
    :disabled
  ) {
  background: var(--brand-background);
}
.participant-stage[data-experience-branding]
  :is(
    .participant-choice.is-selected,
    .participant-choice:hover:not(:disabled)
  ) {
  border-color: var(--brand-accent);
  background: var(--brand-background);
}
.participant-stage[data-experience-branding] .participant-choice.is-selected {
  outline: 2px solid var(--brand-accent);
}
.participant-stage[data-experience-branding]
  :is(
    .participant-choice-number,
    .participant-choice-mark,
    .experience-brand-name
  ) {
  color: var(--brand-accent);
}
.participant-stage[data-experience-branding] :focus-visible {
  outline-color: var(--brand-accent);
}
.participant-stage[data-experience-branding] :is(progress, .track) {
  accent-color: var(--brand-accent);
}
.participant-stage[data-experience-branding]
  :is(.participant-progress, .participant-feedback) {
  color: var(--brand-ink);
  background: var(--brand-background);
  border-color: var(--brand-accent);
}
.participant-stage .experience-brand-name {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
/* The existing console phone monitor is also a local experience surface. */
.monitor-viewport[data-experience-branding] {
  color: var(--brand-ink) !important;
  background: var(--brand-background) !important;
}
.monitor-viewport[data-experience-branding]
  :is(
    .monitor-content,
    .monitor-content h4,
    .monitor-content h5,
    .monitor-message
  ) {
  color: var(--brand-ink);
}
.monitor-viewport[data-experience-branding]
  :is(.monitor-question, .monitor-option) {
  color: var(--brand-ink);
  background: var(--brand-background);
  border-color: var(--brand-accent);
}
.monitor-viewport[data-experience-branding]
  :is(
    .monitor-brand,
    .monitor-state,
    .experience-brand-name,
    .monitor-option > span:first-child
  ) {
  color: var(--brand-accent);
}
.monitor-viewport[data-experience-branding] progress {
  accent-color: var(--brand-accent);
}
.participant-stage[data-experience-branding] .participant-card {
  border-color: var(--brand-tone);
}
.participant-stage[data-experience-branding] progress::-webkit-progress-bar {
  background: var(--brand-tone);
}
.participant-stage[data-experience-branding] progress::-webkit-progress-value {
  background: var(--brand-accent);
}
.participant-stage[data-experience-branding] progress::-moz-progress-bar {
  background: var(--brand-accent);
}

/* New activity kinds stay within the participant surface. */
.participant-stage .kind-rating-choices {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 22px 0;
}
.participant-stage .kind-rating-choices button {
  min-height: 64px;
  min-width: 0;
  padding: 8px 3px;
  border: 2px solid var(--brand-accent, #6e51be);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.participant-stage .kind-rating-choices button[aria-pressed="true"] {
  background: var(--brand-accent, #6e51be);
  color: var(--brand-background, #f4f3ec);
}
.participant-stage .kind-rating-choices strong,
.participant-stage .kind-rating-choices span {
  display: block;
}
.participant-stage .kind-rating-choices span {
  font-size: 11px;
}
.participant-stage .kind-text-form textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 130px;
  border: 1px solid currentColor;
  border-radius: 12px;
  padding: 14px;
  font: inherit;
  color: inherit;
  background: transparent;
}
.participant-stage .kind-text-form label {
  display: block;
}
.participant-stage .kind-rating-average {
  font-size: 22px;
}

.words-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  padding: 1rem;
}
.words-word {
  display: inline-block;
  overflow-wrap: anywhere;
  line-height: 1.1;
  font-weight: 800;
  color: var(--experience-accent, #6d47ea);
}
.words-size-1 {
  font-size: 1rem;
}
.words-size-2 {
  font-size: 1.25rem;
}
.words-size-3 {
  font-size: 1.5rem;
}
.words-size-4 {
  font-size: 1.75rem;
}
.words-size-5 {
  font-size: 2rem;
}
.words-participant form {
  display: grid;
  gap: 0.7rem;
}
.words-participant label {
  display: grid;
  gap: 0.5rem;
}
.words-participant input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  padding: 0.9rem;
  border: 1px solid currentColor;
  border-radius: 0.7rem;
}
.words-mine {
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.words-mine li {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.words-mine span {
  font-size: 0.85rem;
}

.ls-root .words-results table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  table-layout: fixed;
}
.ls-root .words-results th,
.ls-root .words-results td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid #deded2;
  overflow-wrap: anywhere;
}
.ls-root .words-results th:first-child {
  width: 45%;
}

.questions-participant form,
.questions-participant label {
  display: grid;
  gap: 0.65rem;
}
.questions-participant textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.8rem;
  border: 1px solid currentColor;
  border-radius: 0.7rem;
  font: inherit;
}
.questions-participant .questions-alias {
  display: flex;
  align-items: center;
}
.questions-participant .questions-alias input {
  width: 1.2rem;
  height: 1.2rem;
}
.questions-mine article,
.questions-public article {
  border-top: 1px solid #deded2;
  padding: 0.8rem 0;
  overflow-wrap: anywhere;
}
.questions-mine small,
.questions-public small {
  display: block;
  margin-bottom: 0.5rem;
}
.questions-public button {
  min-height: 44px;
  min-width: 60px;
  border: 1px solid currentColor;
  border-radius: 0.6rem;
  background: transparent;
  color: inherit;
  font: inherit;
}
.questions-public button[aria-pressed="true"] {
  background: var(--experience-accent, #6d47ea);
  color: white;
}
.questions-participant :focus-visible {
  outline: 3px solid #56822a;
  outline-offset: 3px;
}
.ls-root .questions-results table {
  table-layout: fixed;
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}
.ls-root .questions-results th,
.ls-root .questions-results td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid #deded2;
  overflow-wrap: anywhere;
}
.ls-root .questions-results th:first-child {
  width: 45%;
}

.scratch-participant {
  display: grid;
  gap: 1rem;
}
.scratch-canvas {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 1.2rem;
  touch-action: none;
  cursor: crosshair;
}
.scratch-terms {
  white-space: pre-wrap;
  max-height: 15rem;
  overflow: auto;
}
.scratch-participant label {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.scratch-participant input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
}
.scratch-result {
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
  overflow-wrap: anywhere;
}
.scratch-code {
  font: 700 2rem monospace;
  letter-spacing: 0.12em;
}
.scratch-result img {
  max-width: 100%;
}
.scratch-board {
  position: relative;
  width: 100%;
  max-width: 480px;
}
.scratch-board .scratch-canvas {
  position: relative;
  display: block;
}
.scratch-underlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 1.2rem;
  background: #f2eaff;
  color: #281346;
  font-size: 1.8rem;
}
@media (prefers-reduced-motion: reduce) {
  .scratch-canvas {
    transition: none;
  }
}
.participant-view .route-stations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
  gap: 8px;
  margin: 18px 0;
}
.participant-view .route-station {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  border: 1px solid var(--line, #ddd);
  border-radius: 18px;
  padding: 12px 8px;
  background: var(--paper, #fff);
  color: inherit;
  overflow-wrap: anywhere;
}
.participant-view .route-station span {
  font-size: 24px;
}
.participant-view .route-stamped {
  background: var(--tone, #ddff7a);
  border-color: currentColor;
}
.participant-view .route-station:disabled {
  opacity: 0.55;
}
.participant-view .route-station[aria-pressed="true"] {
  outline: 3px solid var(--accent, #6d47ea);
  outline-offset: 2px;
}
.participant-view .route-code-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.participant-view .route-code-form input {
  text-transform: uppercase;
  font-size: 24px;
  letter-spacing: 0.18em;
  width: 100%;
  box-sizing: border-box;
}
.participant-view .route-reward {
  padding: 20px;
  border-radius: 20px;
  background: var(--tone, #ddff7a);
  margin-top: 18px;
  overflow-wrap: anywhere;
}
.participant-view .route-station strong {
  font-size: 13px;
  line-height: 1.25;
}
.participant-view .route-station small {
  font-size: 11px;
}
.participant-view .route-code-toggle,
.participant-view .route-code-form button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid currentColor;
  border-radius: 12px;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

/* 028: readable, reflowing controls on the participant surface only. */
.participant-view .participant-stage {
  font-size: 1rem;
}
.participant-view
  .participant-stage
  :is(button, input, textarea, select, summary, a) {
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  font: inherit;
  box-sizing: border-box;
}
.participant-view .participant-stage :is(button, summary, a) {
  white-space: normal;
  overflow-wrap: anywhere;
}
.participant-view .participant-stage :is(summary, a) {
  display: inline-flex;
  align-items: center;
}
.participant-view
  .participant-stage
  :is(input[type="checkbox"], input[type="radio"]) {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  accent-color: var(--brand-accent, #57319b);
}
.participant-view .participant-stage label {
  min-width: 0;
}
.participant-view .participant-stage :is(input, textarea) {
  color: var(--brand-ink, #262735);
  background: var(--brand-background, #fffdf7);
}
.participant-view
  .participant-stage
  :is(.kind-rating-choices, .route-stations) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.5rem), 1fr));
}
/* The five rating buttons stay on one row, even at 320 px. */
.participant-view .participant-stage .kind-rating-choices {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.participant-view .kind-rating-choices span,
.participant-view .route-station small {
  font-size: 0.8rem;
}
.participant-view .route-station strong {
  font-size: 0.9rem;
}
.participant-view .route-station span {
  font-size: 1.5rem;
}
.participant-view .route-code-form input {
  font-size: 1.5rem;
}
.participant-view .participant-stage .result-label {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.participant-view .participant-stage .track {
  max-width: 100%;
}
.participant-view .scratch-code {
  font-size: clamp(1rem, 6vw, 2rem);
  max-width: 100%;
}
.participant-view .device-tools summary {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.participant-view .device-tools p {
  font-size: 0.85rem;
}
.participant-view .device-tools .button {
  white-space: normal;
}
.participant-view .participant-stage .text-button {
  color: var(--brand-accent, #57319b);
}
.participant-view .participant-stage .words-word {
  color: var(--brand-accent, #57319b);
}
.participant-view .participant-stage .route-station,
.participant-view .participant-stage .route-reward {
  color: var(--brand-ink, #262735);
  background: var(--brand-background, #fffdf7);
  border-color: var(--brand-accent, #57319b);
}
.participant-view .participant-stage .route-stamped {
  border-width: 3px;
}
.participant-view .participant-stage .route-station[aria-pressed="true"] {
  outline-color: var(--brand-accent, #57319b);
}
.participant-view
  .participant-stage
  .questions-public
  button[aria-pressed="true"] {
  background: var(--brand-accent, #57319b);
  color: var(--brand-background, #fffdf7);
}
@media (prefers-reduced-motion: reduce) {
  .participant-view .participant-stage *,
  .participant-view .participant-stage *::before,
  .participant-view .participant-stage *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.participant-stage[data-experience-branding] .participant-progress span {
  color: var(--brand-ink);
}
.participant-view .participant-card .participant-kicker {
  color: var(--brand-ink, #42404e);
}

/* 034: photo capture stays within the participant card. */
.photos-participant {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.photos-participant label {
  display: grid;
  gap: 10px;
}
.photos-participant input[type="file"] {
  max-width: 100%;
  min-height: 44px;
}
.photos-preview {
  display: block;
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
  object-fit: contain;
}
.photos-participant progress {
  width: 100%;
}
.photos-participant button {
  min-height: 48px;
}
.photos-participant :is(input, button):focus-visible {
  outline: 3px solid var(--participant-accent, #6d47ea);
  outline-offset: 3px;
}
