:root {
  --ink: #1f2821;
  --ink-soft: #39433c;
  --paper: #f4f0e7;
  --card: #fffdf8;
  --line: rgba(31, 40, 33, 0.14);
  --line-strong: rgba(31, 40, 33, 0.25);
  --lime: #d8f25b;
  --lime-dark: #758721;
  --orange: #ff8c5a;
  --blue: #86b9d8;
  --pink: #ef9cba;
  --muted: #6c756e;
  --green: #629446;
  --danger: #a8453b;
  --shadow: 0 26px 80px rgba(45, 48, 34, 0.1);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 7% 2%, rgba(216, 242, 91, 0.3), transparent 28rem),
    radial-gradient(circle at 94% 30%, rgba(255, 140, 90, 0.12), transparent 25rem),
    var(--paper);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(31, 40, 33, 0.055) 0.7px, transparent 0.7px);
  background-size: 11px 11px;
  content: "";
  pointer-events: none;
}

[hidden] { display: none !important; }

button,
input,
textarea { font: inherit; }

button { color: inherit; -webkit-tap-highlight-color: transparent; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(113, 133, 28, 0.38);
  outline-offset: 3px;
}

.shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: max(54px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 2px 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand img { display: block; }

.brand > span { display: grid; gap: 1px; }
.brand strong { font-size: 17px; letter-spacing: -0.04em; }
.brand small { color: var(--muted); font-size: 10px; font-weight: 750; }

.prototype-badge,
.privacy-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.6);
  font-size: 11px;
  font-weight: 750;
}

.prototype-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 140, 90, 0.14);
}

.screen { padding-top: 54px; }

.hero,
.dashboard-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 42px;
}

.eyebrow {
  margin: 0 0 11px;
  color: var(--lime-dark);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  margin-bottom: 0;
  font-size: clamp(44px, 6vw, 79px);
  font-weight: 650;
  line-height: 0.94;
  letter-spacing: -0.065em;
}

h1 em {
  color: var(--lime-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.hero-copy {
  max-width: 390px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.setup-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
  gap: 22px;
  align-items: stretch;
}

.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.form-card,
.explainer-card,
.participant-card,
.test-card { padding: clamp(22px, 3.5vw, 38px); }

.card-kicker {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 27px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.card-kicker span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 10px;
  letter-spacing: 0;
}

label,
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
}

.label-row label { margin: 0; }
.label-row span { color: var(--muted); font-size: 11px; font-weight: 700; }

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input { margin-bottom: 23px; padding: 13px 14px; }
textarea { min-height: 220px; padding: 13px 14px; resize: vertical; line-height: 1.55; }
input:focus,
textarea:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 4px rgba(216, 242, 91, 0.24); outline: none; }

.field-help,
.small-note {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.form-error {
  margin: -8px 0 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(168, 69, 59, 0.09);
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.participant-action,
.back-button,
.spin-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  border-radius: 13px;
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease;
}

.primary-button:hover { background: #303a32; transform: translateY(-1px); }
.primary-button b { color: var(--lime); font-size: 18px; }

.steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 0 0 24px 43px;
  counter-increment: step;
}

.steps li:not(:last-child)::after {
  position: absolute;
  top: 27px;
  bottom: 2px;
  left: 14px;
  width: 1px;
  background: var(--line);
  content: "";
}

.steps li::before {
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--muted);
  content: counter(step);
  font-size: 10px;
  font-weight: 850;
}

.steps b { font-size: 13px; }
.steps span { color: var(--muted); font-size: 12px; line-height: 1.55; }

.safety-note {
  display: flex;
  gap: 13px;
  padding: 15px;
  border-radius: 14px;
  background: rgba(216, 242, 91, 0.2);
}

.safety-note > span {
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  background: var(--lime);
}

.safety-note p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }

.dashboard-heading { align-items: center; }
.dashboard-actions { display: flex; justify-content: flex-end; }

.secondary-button,
.back-button {
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.72);
  font-size: 12px;
  font-weight: 780;
}

.secondary-button:hover,
.back-button:hover { background: white; }

.summary-strip {
  display: grid;
  grid-template-columns: 170px 170px minmax(230px, 1fr);
  gap: 0;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.7);
}

.summary-strip > div {
  display: grid;
  gap: 5px;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}

.summary-strip > div:last-child { border-right: 0; }
.summary-strip span { color: var(--muted); font-size: 10px; font-weight: 780; text-transform: uppercase; letter-spacing: 0.08em; }
.summary-strip strong { font-size: 24px; line-height: 1; }
.progress-cell { align-content: center; }

.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(31, 40, 33, 0.1); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lime-dark); transition: width 0.35s ease; }

.list-heading {
  display: flex;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.list-heading .card-kicker { margin-bottom: 9px; }
h2 { margin-bottom: 0; font-size: 22px; letter-spacing: -0.035em; }
.privacy-chip { padding: 7px 10px; background: rgba(216, 242, 91, 0.17); white-space: nowrap; }

.participant-list { display: grid; gap: 8px; }

.participant-row {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.56);
}

.participant-index {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 11px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.participant-info { min-width: 0; }
.participant-info strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.participant-status { display: inline-flex; gap: 6px; align-items: center; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.participant-status::before { width: 6px; height: 6px; border-radius: 50%; background: #bbbdb5; content: ""; }
.participant-row.is-viewed .participant-status { color: var(--green); }
.participant-row.is-viewed .participant-status::before { background: var(--green); }

.participant-action {
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.participant-action:hover { background: #303a32; }

.test-card > p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.test-illustration { display: flex; align-items: center; justify-content: center; gap: 21px; min-height: 180px; margin: 23px 0 15px; border-radius: 17px; background: var(--paper); }
.phone-shape { display: grid; width: 74px; height: 124px; place-items: center; border: 4px solid var(--ink); border-radius: 17px; background: var(--card); box-shadow: 7px 8px 0 var(--lime); }
.phone-shape i { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--lime); font-style: normal; font-weight: 900; }
.test-illustration b { color: var(--orange); font-size: 22px; }
.hands { font-size: 32px; transform: rotate(-18deg); }

.private-screen { width: min(760px, 100%); margin: 0 auto; }
.back-button { margin-bottom: 18px; }

.privacy-gate,
.result-stage {
  max-width: 650px;
  margin: 24px auto 0;
  padding: clamp(30px, 6vw, 60px);
  text-align: center;
}

.sealed-mark {
  display: grid;
  width: 96px;
  height: 96px;
  margin: 0 auto 26px;
  place-items: center;
  border-radius: 31px;
  background: var(--ink);
  box-shadow: 10px 12px 0 var(--lime);
  transform: rotate(-7deg);
}

.sealed-mark span { color: var(--lime); font-size: 36px; transform: rotate(7deg); }
.privacy-gate h1 { font-size: clamp(40px, 7vw, 64px); }
.privacy-gate > p:not(.eyebrow),
.result-stage > p:not(.eyebrow) { max-width: 450px; margin: 22px auto 28px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.privacy-gate .primary-button,
.result-stage .primary-button { width: min(360px, 100%); margin: 0 auto; }

.reveal-heading { margin: 12px auto 22px; text-align: center; }
.reveal-heading h1 { font-size: clamp(39px, 7vw, 65px); }
.reveal-heading > p:not(.eyebrow) { margin: 16px auto 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.secret-sound-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.secret-sound-toggle svg { width: 17px; height: 17px; }
.secret-sound-toggle path { fill: var(--ink); }
.secret-sound-toggle .sound-wave,
.secret-sound-toggle .sound-slash { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-width: 1.8; }
.secret-sound-toggle .sound-wave { display: none; }
.secret-sound-toggle.is-on { border-color: rgba(117, 135, 33, 0.42); background: rgba(216, 242, 91, 0.2); color: var(--ink); }
.secret-sound-toggle.is-on .sound-wave { display: block; }
.secret-sound-toggle.is-on .sound-slash { display: none; }

.wheel-stage {
  position: relative;
  width: min(570px, 92vw);
  aspect-ratio: 1;
  margin: 28px auto 0;
  filter: drop-shadow(0 23px 34px rgba(31, 40, 33, 0.16));
}

#secretWheel { display: block; width: 100%; height: 100%; }

.pointer {
  position: absolute;
  z-index: 4;
  top: -4px;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 34px solid var(--ink);
  border-right: 17px solid transparent;
  border-left: 17px solid transparent;
  filter: drop-shadow(0 5px 3px rgba(31, 40, 33, 0.19));
  transform: translateX(-50%);
  transform-origin: 50% 0;
}

.spin-button {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(92px, 21vw, 124px);
  aspect-ratio: 1;
  place-content: center;
  border: 8px solid rgba(255, 253, 248, 0.92);
  border-radius: 50%;
  background: var(--ink);
  color: white;
  box-shadow: 0 10px 28px rgba(31, 40, 33, 0.23);
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, background 0.18s ease;
}

.spin-button:hover { background: #303a32; transform: translate(-50%, -50%) scale(1.035); }
.spin-button:disabled { cursor: wait; }
.spin-button span { font-size: 16px; font-weight: 900; letter-spacing: 0.08em; }
.spin-button small { margin-top: 2px; color: var(--lime); font-size: 9px; font-weight: 750; }
.spin-hint { margin: 11px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

.result-stage { position: relative; overflow: hidden; }
.result-stage::before,
.result-stage::after { position: absolute; width: 160px; height: 160px; border: 32px solid var(--lime); border-radius: 50%; content: ""; opacity: 0.27; }
.result-stage::before { top: -93px; left: -80px; }
.result-stage::after { right: -98px; bottom: -95px; border-color: var(--orange); }
.confetti-mark { position: relative; z-index: 1; margin-bottom: 16px; color: var(--orange); font-size: 45px; }
.result-stage h1 { position: relative; z-index: 1; color: var(--lime-dark); font-family: Georgia, "Times New Roman", serif; }
.result-stage > * { position: relative; z-index: 1; }

.toast {
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  padding: 12px 15px;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  box-shadow: 0 15px 38px rgba(31, 40, 33, 0.22);
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 780px) {
  .shell { width: min(100% - 28px, 680px); }
  .topbar { padding-top: 17px; }
  .brand small { display: none; }
  .screen { padding-top: 36px; }
  .hero,
  .dashboard-heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 29px; }
  .dashboard-heading { align-items: start; }
  .dashboard-actions { justify-content: flex-start; }
  .setup-grid,
  .dashboard-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-strip > div:nth-child(2) { border-right: 0; }
  .summary-strip .progress-cell { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .privacy-gate,
  .result-stage { border-radius: 20px; }
}

@media (max-width: 480px) {
  .shell { width: calc(100% - 22px); }
  .prototype-badge { padding: 7px 9px; font-size: 9px; }
  h1 { font-size: 43px; }
  .hero-copy { font-size: 13px; }
  .form-card,
  .explainer-card,
  .participant-card,
  .test-card { padding: 19px; border-radius: 18px; }
  .list-heading { display: grid; }
  .privacy-chip { justify-self: start; }
  .participant-row { grid-template-columns: 35px minmax(0, 1fr); }
  .participant-index { width: 35px; height: 35px; }
  .participant-action { grid-column: 1 / -1; padding: 11px; }
  .private-screen { padding-top: 22px; }
  .privacy-gate,
  .result-stage { margin-top: 6px; padding: 34px 20px; }
  .sealed-mark { width: 80px; height: 80px; border-radius: 25px; }
  .reveal-heading h1 { font-size: 42px; }
  .wheel-stage { width: min(94vw, 440px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
