/* ── Eyebrow ─────────────────────────────────────────────────────────────── */

.fb-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 6px;
  text-align: center;
}

/* ── Prompt card ─────────────────────────────────────────────────────────── */

.fb-prompt-card {
  background: rgba(47, 159, 232, 0.06);
  border: 1.5px solid rgba(47, 159, 232, 0.18);
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 20px;
}

.fb-sentence {
  font-family: "Nunito", sans-serif;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 18px;
  -webkit-font-smoothing: antialiased;
}

.fb-blank {
  display: inline-block;
  font-family: "Nunito", sans-serif;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  font-weight: 900;
  color: var(--primary);
  padding: 0 16px 4px;
  min-width: 80px;
  text-align: center;
  transition: color 0.2s;
}

.fb-blank--filled {
  padding: 0 4px 4px;
  min-width: 0;
  animation: blankPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.fb-blank--correct { color: #15803d; }
.fb-blank--wrong   { color: #b91c1c; }

@keyframes blankPop {
  0%   { transform: scale(0.8); }
  100% { transform: scale(1); }
}

.fb-translation {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(47, 159, 232, 0.15);
  font-family: "Source Sans 3", sans-serif;
}

/* ── Instruction ─────────────────────────────────────────────────────────── */

.fb-instruction {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin: 0 0 16px;
}

/* ── 2×2 Grid ────────────────────────────────────────────────────────────── */

.fb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.fb-btn {
  padding: 20px 12px;
  min-height: 68px;
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-family: "Nunito", sans-serif;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 900;
  -webkit-font-smoothing: antialiased;
  border: 2px solid rgba(6, 38, 61, 0.12);
  /* Slab edge is a box-shadow (not a border) so pressing never changes the
     box height and so never reflows the buttons around it. */
  box-shadow: 0 4px 0 rgba(6, 38, 61, 0.2);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.08s ease,
              background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Hover lift only on real pointing devices — no sticky hover after a tap. */
@media (hover: hover) {
  .fb-btn:hover:not(:disabled) {
    background: rgba(47, 159, 232, 0.08);
    border-color: rgba(47, 159, 232, 0.35);
    box-shadow: 0 4px 0 rgba(47, 159, 232, 0.5);
    color: var(--primary);
    transform: translateY(-2px);
  }
}

.fb-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: none;
}

.fb-btn:disabled { cursor: default; }

.fb-btn--correct {
  background: #f0fdf4;
  border-color: #22c55e;
  box-shadow: 0 4px 0 #16a34a;
  color: #15803d;
  animation: btnPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.fb-btn--wrong {
  background: #fef2f2;
  border-color: #ef4444;
  box-shadow: 0 4px 0 #dc2626;
  color: #b91c1c;
  animation: btnShake 0.42s ease both;
}

/* Chosen but not yet checked — a calm highlight that reveals nothing. */
.fb-btn--selected {
  background: rgba(47, 159, 232, 0.1);
  border-color: var(--primary);
  box-shadow: 0 4px 0 var(--primary-dark);
  color: var(--primary);
}

.fb-btn--dim { opacity: 0.3; }

@keyframes btnPop {
  0%   { transform: scale(0.94); }
  60%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes btnShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ── Feedback ────────────────────────────────────────────────────────────── */

.fb-feedback {
  text-align: center;
  animation: feedbackIn 0.22s ease both;
}

@keyframes feedbackIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fb-feedback-text {
  font-family: "Nunito", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 16px;
  -webkit-font-smoothing: antialiased;
}

.fb-feedback-text--correct { color: #15803d; }
.fb-feedback-text--wrong   { color: #b91c1c; }

.fb-feedback-tip {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 16px;
  font-family: "Source Sans 3", sans-serif;
}

.fb-continue-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 0 var(--primary-dark);
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.fb-continue-btn:hover:not(:disabled)  { transform: translateY(-2px); }
.fb-continue-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }

/* Check is dormant until a word is chosen. */
.fb-continue-btn:disabled {
  background: rgba(6, 38, 61, 0.16);
  box-shadow: 0 4px 0 rgba(6, 38, 61, 0.1);
  color: rgba(255, 255, 255, 0.9);
  cursor: default;
  transform: none;
}

/* ── Score modal ─────────────────────────────────────────────────────────── */

.score-encourage {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  margin: 6px 0 0;
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .game--fillblank .progress-row {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 6px;
  }

  .game--fillblank .progress-meta { text-align: center; }

  .game--fillblank .progress-track {
    width: 100%;
    flex: none;
  }
}

@media (max-width: 480px) {
  .fb-prompt-card { padding: 24px 16px; }
  .fb-btn { min-height: 60px; padding: 16px 10px; }
  .fb-grid { gap: 10px; }
  .fb-continue-btn { padding: 13px; }
}
