/* Bulls and cows, and the acrostic (task.md section 9.5). */

.game {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.game__counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.game__cells {
  display: flex;
  gap: var(--space-2);
}

.game__cell {
  width: 100%;
  max-width: 62px;
  height: 58px;
  padding: 0;
  border: 2px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: var(--radius-sm);
  background: var(--paper);
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--text-md);
  text-transform: uppercase;
  caret-color: var(--violet);
}

.game__cell:focus-visible {
  border-color: var(--violet);
  background: var(--accent-soft);
}

.game__cell--filled {
  background: var(--accent-soft);
  border-color: var(--violet);
}

.game__cell--error {
  border-color: var(--rose);
  background: var(--rose-soft);
  animation: shake 300ms var(--ease-out);
}

.game__hint-count {
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: center;
}

.game__hints {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.game__hint {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  font-size: var(--text-sm);
  line-height: var(--leading-text);
}

.game__hint b {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--violet);
}

/* --- history ------------------------------------------------------------ */

.game__history {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 34dvh;
  overflow-y: auto;
}

.game__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.game__row--fresh {
  animation: row-in var(--dur-base) var(--ease-out);
}

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

.game__word {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.12em;
}

.game__word > span {
  display: inline-block;
  min-width: 0.7em;
}

.game__tally {
  display: flex;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-sm);
}

.game__tally span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.game__icon {
  width: 18px;
  height: 18px;
}

.game__win {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}

.game__reveal {
  text-align: center;
  font-size: var(--text-md);
}

.game__reveal b {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--rose);
}

/* --- acrostic ----------------------------------------------------------- */

.acrostic__phrase {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  font-size: var(--text-lg);
  line-height: 1.35;
}

.acrostic__step {
  font-size: var(--text-md);
  color: var(--ink);
}
