/* ── 3 Truths & 1 Lie ───────────────────────────────────────────────────── */

/* Game page layout */
.ttal-game-page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header ── */
.ttal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px auto 0;
  width: min(1100px, calc(100% - 28px));
  padding: 12px 18px;
  background: #fff;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
  z-index: 100;
}

.ttal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ttal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.ttal-close:hover { background: var(--m-three-truths-tint); color: var(--ink); }

.ttal-logo {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.ttal-logo .clay { flex: none; }

.ttal-category-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--m-three-truths-tint);
  border: 0;
  color: var(--m-three-truths-text);
  white-space: nowrap;
}

.ttal-header-center {
  flex: 1;
  max-width: 320px;
  margin: 0 auto;
}

.ttal-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(var(--overlay-rgb),0.08);
  overflow: hidden;
}

.ttal-progress-label { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 4px; }
.ttal-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--rose, #C4314E);
  transition: width 0.4s ease;
}

.ttal-score-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ── Body ── */
.ttal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.ttal-container {
  width: 100%;
  max-width: 680px;
}

.ttal-prompt {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 28px;
  text-align: center;
}

.ttal-lie-label {
  color: var(--rose, #C4314E);
  background: rgba(var(--rose-rgb),0.12);
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 18px;
}

/* ── Statement buttons ── */
.ttal-statements {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.ttal-stmt-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: #fff;
  border: 0;
  box-shadow: var(--shadow-card), inset 0 0 0 1.5px rgba(30, 27, 75, 0.08);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.ttal-stmt-btn:hover:not(:disabled) {
  box-shadow: var(--shadow-card-hover), inset 0 0 0 1.5px rgba(var(--m-three-truths-rgb), 0.45);
  transform: translateY(-2px);
}

.ttal-stmt-btn:disabled { cursor: default; }

.ttal-stmt-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(var(--overlay-rgb),0.08);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
}

.ttal-stmt-text { flex: 1; }

/* Result states */
.ttal-stmt-btn.correct {
  background: #DDF7F0;
  box-shadow: var(--shadow-card), inset 0 0 0 2px var(--emerald, #00754A);
}
.ttal-stmt-btn.correct .ttal-stmt-letter {
  background: var(--emerald, #00754A);
  color: #fff;
}

.ttal-stmt-btn.wrong {
  background: #FFE4EF;
  box-shadow: var(--shadow-card), inset 0 0 0 2px var(--rose, #C4314E);
}
.ttal-stmt-btn.wrong .ttal-stmt-letter {
  background: var(--rose, #C4314E);
  color: #fff;
}

.ttal-stmt-btn.dimmed { opacity: 0.4; }

/* ── Explanation ── */
.ttal-explanation {
  padding: 14px 18px;
  background: rgba(var(--accent-rgb),0.08);
  border: 1px solid rgba(var(--accent-rgb),0.2);
  border-radius: var(--radius-md, 10px);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Actions ── */
.ttal-actions {
  display: flex;
  justify-content: flex-end;
}

/* ── Results page ── */
.ttal-results-page {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 16px 60px;
}

.ttal-review-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.ttal-review-row:last-child { border-bottom: none; }

.ttal-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ttal-review-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ttal-review-result {
  font-size: 12px;
  font-weight: 700;
}

.ttal-review-statements {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.ttal-review-stmt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm, 6px);
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(var(--overlay-rgb),0.02);
  position: relative;
}

.ttal-review-stmt.is-lie {
  background: rgba(var(--rose-rgb),0.08);
  color: var(--text-primary);
  border: 1px solid rgba(var(--rose-rgb),0.2);
}

.ttal-review-stmt.is-chosen-wrong {
  background: rgba(var(--gold-rgb),0.08);
  color: var(--text-primary);
  border: 1px solid rgba(var(--gold-rgb),0.25);
}

.ttal-review-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  width: 16px;
  flex-shrink: 0;
  padding-top: 1px;
}

.ttal-lie-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(var(--rose-rgb),0.15);
  color: var(--rose, #C4314E);
  border: 1px solid rgba(var(--rose-rgb),0.3);
  margin-left: 8px;
  white-space: nowrap;
}

.ttal-pick-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(var(--gold-rgb),0.15);
  color: var(--gold-light);
  border: 1px solid rgba(var(--gold-rgb),0.3);
  margin-left: 8px;
  white-space: nowrap;
}

.ttal-review-explanation {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Home page ── */
.ttal-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px 60px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .ttal-body { padding: 24px 16px; }
  .ttal-prompt { font-size: 17px; }
  .ttal-stmt-btn { padding: 13px 14px; font-size: 13px; }
  .ttal-header { padding: 10px 14px; }
  .ttal-category-chip { display: none; }
  .ttal-header-center { max-width: 140px; }
  .ttal-progress-label { display: none; }
}
