body {
  font-family: "Noto Sans TC", system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.math-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.6;
}

.math,
.math-display {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.math-display {
  width: 100%;
  justify-content: center;
  overflow-x: auto;
  padding: 10px 0;
}

.katex {
  font-size: 1.15em;
}

.slot {
  min-width: 58px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border: 3px solid #93c5fd;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  user-select: none;
  font-size: 24px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.slot.active {
  border-color: #2563eb;
  background: #dbeafe;
  animation: pulse-slot 1s infinite;
}

.slot.correct {
  border-color: #22c55e;
  background: #dcfce7;
  color: #166534;
  cursor: default;
}

.fraction-answer {
  min-width: 100px;
}

mark {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  font-weight: 800;
}

@keyframes pulse-slot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgb(37 99 235 / 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgb(37 99 235 / 0);
  }
}

@media (max-width: 640px) {
  .math-line {
    gap: 6px;
    font-size: 22px;
  }

  .slot {
    min-width: 52px;
    min-height: 44px;
    padding: 3px 9px;
    font-size: 21px;
  }
}
