#spt-fraction-calc {
  --fc-ink: #1c1917;
  --fc-ink-soft: #6b625c;
  --fc-surface: #faf8f6;
  --fc-border: #d9d2ca;
  --fc-accent: #2563eb;
  --fc-accent-hover: #1d4fd6;
  font-family: 'Pretendard', -apple-system, 'Malgun Gothic', 'Segoe UI', sans-serif;
  color: var(--fc-ink);
  max-width: 900px;
}
#spt-fraction-calc * { box-sizing: border-box; }

.fc-hint {
  font-size: 14px;
  color: var(--fc-ink-soft);
  margin: 0 0 10px;
}

.fc-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px rgba(28, 25, 23, 0.05);
}
.fc-frac {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fc-frac input {
  width: 140px;
  height: 56px;
  text-align: center;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  font-size: 24px;
  font-weight: 600;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fc-frac input:focus {
  outline: none;
  border-color: var(--fc-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.fc-whole { width: 140px; }
.fc-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}
.fc-stack::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 2px;
  background: var(--fc-ink);
}
.fc-stack input { width: 140px; height: 44px; font-size: 20px; }

#fc-op {
  height: 56px;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  font-size: 26px;
  font-weight: 700;
  padding: 0 16px;
  background: #fff;
  font-family: inherit;
  color: var(--fc-accent);
  cursor: pointer;
}

.fc-go-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
#fc-go {
  height: 60px;
  padding: 0 56px;
  border-radius: 12px;
  border: 0;
  background: var(--fc-accent);
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
#fc-go:hover {
  background: var(--fc-accent-hover);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.34);
}
#fc-go:active { transform: translateY(1px); }

.fc-result { margin-top: 32px; }
.fc-error { color: #b91c1c; font-weight: 600; font-size: 16px; }
.fc-answer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.fc-big { font-size: 52px; font-weight: 800; letter-spacing: -0.01em; }
.fc-sub { font-size: 15px; color: var(--fc-ink-soft); }
.fc-steps {
  font-size: 16px;
  color: var(--fc-ink-soft);
  padding-left: 22px;
  line-height: 2;
}

@media (max-width: 640px) {
  .fc-row { padding: 24px; }
  .fc-frac { justify-content: center; }
  #fc-go { width: 100%; }
  .fc-big { font-size: 40px; }
}
