.prompt {
  text-align: center;
  font-size: 19px;
  font-weight: bold;
  color: #555;
  padding: 10px 14px 6px;
}

.rows {
  padding: 4px 8px 6px;
}

/* ── Each row: in-box → magic-box → out-box ── */
.row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 6px 0;
}

.qty-box {
  width: 90px;
  min-height: 76px;
  background: #fff;
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
}

.qty-box .items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 4px;
  align-items: center;
  justify-items: center;
  width: 100%;
  font-size: 18px;
  line-height: 1.05;
}

.qty-box.unknown {
  font-size: 40px;
  font-weight: bold;
  color: #c43d6c;
  border-style: dashed;
  border-color: #c43d6c;
}

.magic-box {
  width: 76px;
  min-height: 76px;
  background:
    radial-gradient(circle, #c8a8d8 1.8px, transparent 2px) 0 0/10px 10px,
    #fff;
  border: 2px solid #8e54a8;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  color: #8e54a8;
  box-shadow: 0 2px 8px rgba(142, 84, 168, 0.25);
}

.arrow {
  font-size: 24px;
  color: #555;
  font-weight: bold;
  width: 24px;
  text-align: center;
}

.row.question .arrow,
.row.question .qty-box.unknown {
  color: #c43d6c;
}

/* ── Choices ── */
.choices-label {
  text-align: center;
  font-size: 16px;
  color: #888;
  margin: 8px 0 4px;
  font-weight: bold;
}

.choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 10px 18px;
}

.choice-btn {
  background: var(--color-card);
  border: 3px solid #eee;
  border-radius: var(--radius);
  padding: 10px 4px;
  min-height: 80px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice-btn .items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 4px;
  align-items: center;
  justify-items: center;
  width: 100%;
  font-size: 16px;
  line-height: 1.05;
}

.choice-btn:active {
  transform: scale(0.96);
}

.choice-btn.correct {
  background: #d4edda;
  border-color: var(--color-correct);
}

.choice-btn.wrong {
  background: #fde2e2;
  border-color: var(--color-wrong);
  animation: shake 0.4s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── Feedback ── */
.feedback {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 120px;
  font-weight: bold;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 200;
}

.feedback.show { opacity: 1; }
.feedback.correct { color: var(--color-correct); }
.feedback.wrong   { color: var(--color-wrong); }

/* ── Result ── */
.result {
  text-align: center;
  padding: 40px 20px;
}

.result h2 {
  font-size: 36px;
  color: var(--color-primary);
}

.result .score {
  font-size: 24px;
  margin: 20px 0;
}

.result .candy-get {
  font-size: 56px;
  margin: 20px 0;
  word-break: break-all;
}

.result button {
  margin: 10px 8px;
  font-size: 18px;
}
