:root {
  --bg: #0e1016;
  --card: #171b24;
  --card2: #1e2330;
  --line: #2a3040;
  --text: #eceff4;
  --muted: #8b93a7;
  --lime: #b7f04a;
  --lime-dim: #8fc22e;
  --purple: #8e78ff;
  --coral: #ff6b6b;
  --gold: #ffd166;
  --radius: 16px;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.app {
  width: 100%;
  max-width: 440px;
  padding: 18px 16px 40px;
}
/* ---------- header ---------- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.logo .qm {
  color: var(--lime);
}
.hdr-right {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pill {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  gap: 5px;
  align-items: center;
}
.pill.streak {
  color: var(--gold);
}
.daybar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.daynum {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.countdown {
  font-size: 13px;
  color: var(--muted);
}
.countdown b {
  color: var(--text);
}
/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 14px;
}
.mode-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  border: 1px solid var(--lime-dim);
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 12px;
}
.prompt {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.subprompt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 18px;
}
.subprompt b {
  color: var(--text);
}
/* ---------- inputs ---------- */
.num-display {
  text-align: center;
  font-size: 56px;
  font-weight: 900;
  color: var(--lime);
  letter-spacing: -0.02em;
  margin: 6px 0 2px;
  font-variant-numeric: tabular-nums;
}
input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 8px;
  border-radius: 4px;
  background: var(--card2);
  outline: none;
  margin: 14px 0 6px;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lime);
  border: 3px solid #0e1016;
  box-shadow: 0 0 0 2px var(--lime);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lime);
  border: 3px solid #0e1016;
  box-shadow: 0 0 0 2px var(--lime);
  cursor: pointer;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choices.row {
  flex-direction: row;
}
.choice {
  background: var(--card2);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  flex: 1;
  transition: border-color 0.15s, transform 0.05s;
}
.choice .big {
  font-size: 30px;
  display: block;
  margin-bottom: 4px;
}
.choice small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.choice:hover {
  border-color: var(--muted);
}
.choice.sel {
  border-color: var(--lime);
  background: #20281a;
}
.btn {
  display: block;
  width: 100%;
  background: var(--lime);
  color: #10130a;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 12px;
  padding: 15px;
  margin-top: 18px;
  cursor: pointer;
}
.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.purple {
  background: var(--purple);
  color: #0e1016;
}
/* ---------- locked / sealed screen ---------- */
.sealed {
  text-align: center;
  padding: 30px 20px;
}
.sealed .lock {
  font-size: 44px;
  margin-bottom: 10px;
}
.sealed h2 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 6px;
}
.sealed p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}
.yourpick {
  margin: 18px auto 4px;
  display: inline-block;
  background: var(--card2);
  border: 1px dashed var(--lime-dim);
  border-radius: 12px;
  padding: 10px 22px;
  font-size: 18px;
  font-weight: 800;
  color: var(--lime);
}
.factoid {
  background: var(--card2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 16px;
  text-align: left;
}
.factoid b {
  color: var(--text);
}
/* ---------- reveal ---------- */
.result-head {
  text-align: center;
  margin-bottom: 16px;
}
.result-head .badge {
  font-size: 40px;
}
.result-head h2 {
  font-size: 24px;
  font-weight: 900;
  margin: 4px 0 2px;
}
.result-head .pct {
  color: var(--lime);
  font-weight: 800;
}
.result-head p {
  font-size: 14px;
  color: var(--muted);
}
.chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  margin: 18px 0 4px;
}
.bar {
  flex: 1;
  background: #333b4e;
  border-radius: 3px 3px 0 0;
  position: relative;
  min-height: 2px;
  transition: height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bar.win {
  background: var(--lime);
}
.bar.you {
  background: var(--purple);
}
.bar.you.win {
  background: linear-gradient(180deg, var(--lime) 0%, var(--purple) 100%);
}
.bar .youtag {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  color: var(--purple);
  white-space: nowrap;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  justify-content: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 5px;
}
.reveal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.stat {
  background: var(--card2);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
}
.stat .v {
  font-size: 20px;
  font-weight: 900;
}
.stat .k {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.story {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  background: var(--card2);
  border-left: 3px solid var(--lime);
  border-radius: 0 12px 12px 0;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.story b {
  color: var(--text);
}
/* ---------- share card ---------- */
.sharecard {
  background: #10131b;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  margin-bottom: 10px;
}
.copied {
  color: var(--lime);
  font-size: 13px;
  text-align: center;
  height: 18px;
  font-weight: 700;
}
/* ---------- how it works ---------- */
.section-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 10px;
}
.how {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.how .step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
}
.how .n {
  background: var(--card2);
  border: 1px solid var(--line);
  min-width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--lime);
}
.how .step span {
  color: var(--muted);
}
.how .step span b {
  color: var(--text);
}
.footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 26px;
  line-height: 1.6;
}
.hidden {
  display: none;
}
.back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 10px;
}
.back:hover {
  color: var(--text);
}
@keyframes pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  80% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.pop {
  animation: pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
