:root {
  --bg: #0f1115;
  --panel: #181c23;
  --text: #f2f4f8;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --human: #2fbf71;
  --bot: #e5534b;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Heebo", "Arial Hebrew", Arial, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
#topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #232833;
}
#brand { font-weight: 800; letter-spacing: 0.3px; }
#lang-toggle {
  background: var(--panel);
  color: var(--text);
  border: 1px solid #2a3140;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  cursor: pointer;
}
#app { flex: 1; display: flex; flex-direction: column; }
.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 48px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.screen.active { display: flex; }
h1 { font-size: 1.9rem; line-height: 1.25; margin-bottom: 12px; }
h2 { font-size: 1.5rem; margin-bottom: 16px; }
h3 { font-size: 1.1rem; margin: 28px 0 8px; }
.sub { color: var(--muted); margin-bottom: 28px; }
.muted { color: var(--muted); font-size: 0.9rem; }
.hidden { display: none !important; }
.error { color: var(--bot); margin-top: 16px; }

.btn {
  border: none;
  border-radius: var(--radius);
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  background: var(--panel);
  transition: transform 0.06s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.big { font-size: 1.15rem; padding: 18px 34px; width: 100%; max-width: 340px; }
.btn.ghost { background: transparent; border: 1px solid #2a3140; color: var(--muted); }
.btn.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid #2a3140; }
.btn.chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; }

.social-proof { margin-top: 26px; color: var(--muted); font-size: 0.95rem; }
.streak-line { margin-top: 14px; font-weight: 700; }

#progress-dots { display: flex; gap: 10px; margin-bottom: 22px; }
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #2a3140;
}
.dot.current { background: var(--accent); }
.dot.answered { background: var(--muted); }

.context-label {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
  font-style: italic;
}
.card-text {
  background: var(--panel);
  border: 1px solid #232833;
  border-radius: var(--radius);
  padding: 26px 22px;
  font-size: 1.2rem;
  line-height: 1.55;
  margin-bottom: 28px;
  text-align: start;
  width: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
}
.answer-row { display: flex; gap: 14px; width: 100%; }
.btn.answer { flex: 1; padding: 20px 0; font-size: 1.15rem; }
.btn.answer.human { background: var(--human); color: #062b17; }
.btn.answer.bot { background: var(--bot); color: #fff; }
.btn.answer.picked { outline: 3px solid #fff; }
#btn-back { margin-top: 18px; }
.practice { margin-top: 16px; color: #e0b341; font-size: 0.9rem; font-weight: 700; }

#reveal-list { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.reveal-card {
  background: var(--panel);
  border: 1px solid #232833;
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: start;
}
.reveal-card .head { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 6px; }
.reveal-card .verdict-correct { color: var(--human); }
.reveal-card .verdict-wrong { color: var(--bot); }
.reveal-card .tell { color: var(--muted); font-size: 0.92rem; line-height: 1.4; }
.reveal-card .stat { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }

.emoji-grid { font-size: 2rem; letter-spacing: 6px; margin: 10px 0 18px; direction: ltr; }
.money-line { font-size: 1.15rem; font-weight: 800; margin: 8px 0 22px; color: var(--accent); }
.share-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.countdown { margin-top: 16px; color: var(--muted); }
.below-fold { margin-top: 40px; width: 100%; border-top: 1px solid #232833; padding-top: 8px; }
#archive-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.archive-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--panel); border: 1px solid #232833; border-radius: 12px;
  padding: 12px 16px; cursor: pointer; color: var(--text); width: 100%;
  font-size: 0.95rem;
}
.reminder-channels { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
#reminder-address {
  width: 100%; padding: 14px; border-radius: 12px; border: 1px solid #2a3140;
  background: var(--panel); color: var(--text); font-size: 1rem; margin-bottom: 12px;
  text-align: center;
}
#reminder-msg { margin-top: 10px; }

/* Tinder-style swipe: drag the card, right = HUMAN, left = BOT, down = back. */
#swipe-wrap {
  position: relative;
  width: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#swipe-wrap .card-frame { cursor: grab; will-change: transform; }
#swipe-wrap .card-frame.dragging { cursor: grabbing; }
.stamp {
  position: absolute;
  top: 22px;
  padding: 4px 12px;
  border: 3px solid;
  border-radius: 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.stamp-human { left: 14px; color: #22c55e; border-color: #22c55e; transform: rotate(-14deg); }
.stamp-bot { right: 14px; color: #ef4444; border-color: #ef4444; transform: rotate(14deg); }

/* Toast (e.g. LinkedIn share copies the score first). */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #f9fafb;
  border: 1px solid #374151;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 50;
  transition: opacity 0.25s;
}
.toast.hidden { opacity: 0; pointer-events: none; }
.share-row { flex-wrap: wrap; justify-content: center; }

/* Reveal flip: human cards uncover the real author. */
.reveal-card.flip { background: none; border: none; padding: 0; perspective: 1000px; cursor: pointer; }
.flip-inner { position: relative; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.25, 1); }
.reveal-card.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  background: var(--panel);
  border: 1px solid #232833;
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: start;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.who-hint { margin-top: 10px; color: var(--accent); font-size: 0.85rem; font-weight: 700; }
.author-row { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.author-initial {
  display: inline-flex; align-items: center; justify-content: center;
  background: #2a3342; color: #cbd5e1; font-weight: 800; font-size: 1.2rem;
}
.author-name { font-weight: 800; }
.author-handle { color: var(--muted); font-size: 0.85rem; }
.author-link { color: var(--accent); font-weight: 700; font-size: 0.92rem; }
.endorse-note { color: var(--muted); font-size: 0.75rem; }
.ai-badge {
  display: inline-block; margin-bottom: 6px; padding: 2px 10px;
  border: 1px solid var(--bot); color: var(--bot); border-radius: 999px;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 1px;
}

.players-line { color: var(--muted); font-size: 0.95rem; margin: 4px 0 10px; }
