.prompt-area {
  min-height: 176px;
  padding-bottom: 18px;
}

.formula-editor-display {
  width: 100%;
  height: 112px;
  min-height: 112px;
  max-height: 112px;
  padding: 18px 20px;
  overflow: auto;
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 18px;
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #afc7e1;
  border-radius: 12px;
  background: linear-gradient(145deg, #fbfdff, #f0f5fb);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 75%);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  align-items: center;
  justify-content: safe center;
  display: flex;
}

.formula-editor-display .katex-display {
  width: max-content;
  min-width: max-content;
  padding-inline: 14px;
  margin: auto 0;
  text-align: center;
}

.prompt-area.result-correct .formula-editor-display {
  border-color: var(--sage);
  background: var(--sage-soft);
  box-shadow: 0 0 0 4px rgb(113 138 114 / 10%);
}

.prompt-area.result-wrong .formula-editor-display {
  border-color: var(--coral);
  background: var(--coral-soft);
  box-shadow: 0 0 0 4px rgb(217 108 95 / 10%);
}

.prompt-area.result-revealed .formula-editor-display {
  border-color: #d7b096;
  background: #fff8ef;
}

.keyboard-wrap {
  margin-top: 4px;
}

.previous-button {
  min-height: 34px;
  margin-left: auto;
  padding: 0 10px;
  color: var(--blue);
  font-size: 13px;
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  background: transparent;
  transition: color 0.16s, background 0.16s;
}

.previous-button:hover:not(:disabled) {
  background: var(--blue-soft);
}

.previous-button:disabled {
  color: #a8adb5;
  cursor: not-allowed;
}

.question-card-head .previous-button + .shuffle-button {
  margin-left: 0;
}

@media (width <= 720px) {
  .prompt-area {
    min-height: 164px;
    padding-bottom: 16px;
  }

  .formula-editor-display {
    height: 104px;
    min-height: 104px;
    max-height: 104px;
    padding: 14px;
    font-size: 1.12rem;
  }

  .previous-button span {
    display: none;
  }
}
