* { box-sizing: border-box; }
body {
  margin: 0 auto;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: #f5f5f7;
  color: #1d1d1f;
  max-width: 720px;
}
h1 { font-size: 20px; margin: 8px 0 16px; }
h2 { font-size: 16px; color: #555; margin: 24px 0 8px; font-weight: 600; }
.empty { text-align: center; color: #888; padding: 40px 0; font-size: 16px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.topbar a { color: #007aff; text-decoration: none; font-size: 15px; }
.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card.dimmed { opacity: 0.5; pointer-events: none; }
.card-error { color: #d32f2f; font-size: 14px; margin-bottom: 8px; }
.meta { color: #666; font-size: 13px; margin-bottom: 6px; }
.meta .stage { font-weight: 600; color: #1d1d1f; }
.summary { font-size: 17px; font-weight: 600; margin: 8px 0 12px; }
.summary-line { font-size: 15px; margin: 4px 0; }
.answer { font-size: 14px; color: #2a7; margin-top: 4px; }
details { margin: 8px 0 12px; }
details summary {
  cursor: pointer; color: #007aff; font-size: 14px; user-select: none;
}
details pre {
  margin-top: 8px; padding: 12px; background: #f0f0f3; border-radius: 8px;
  font-size: 14px; white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}
.options { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.opt {
  display: flex; align-items: center; padding: 12px;
  border: 2px solid #e0e0e5; border-radius: 8px; cursor: pointer;
  font-size: 16px;
}
.opt:has(input:checked) { border-color: #007aff; background: #eaf3ff; }
.opt input { margin: 0 12px 0 0; transform: scale(1.3); }
.opt .recommended {
  margin-left: auto; font-size: 12px; color: #007aff;
  background: #eaf3ff; padding: 2px 8px; border-radius: 10px;
}
textarea, input.text-input, select {
  width: 100%; padding: 10px;
  border: 1px solid #d0d0d5; border-radius: 8px; font-size: 16px;
  font-family: inherit; background: #fff;
}
textarea { min-height: 60px; resize: vertical; }
button.primary, button.submit {
  width: 100%; height: 48px; margin-top: 12px;
  background: #007aff; color: #fff; border: none; border-radius: 8px;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
button.primary:disabled, button.submit:disabled { background: #999; }
button.danger {
  background: #d32f2f;
}
button.ghost {
  background: #fff; color: #007aff; border: 1px solid #d0d0d5;
}
.btn-row { display: flex; gap: 8px; }
.btn-row > button { flex: 1; }
.done { color: #2a7; font-weight: 600; padding: 12px 0; text-align: center; }
.task-card .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.status-pill {
  display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px;
  background: #eee; color: #555;
}
.status-queued { background: #fff4cc; color: #7a5a00; }
.status-running { background: #d6efff; color: #004a7a; }
.status-completed { background: #d6f5d6; color: #1a5c1a; }
.status-failed { background: #ffd6d6; color: #7a0000; }
.status-killed { background: #f0d6ff; color: #4a0070; }
.history-item {
  display: flex; gap: 12px; font-size: 14px; padding: 8px 12px;
  background: #fff; border-radius: 8px; margin-bottom: 6px;
}
.history-item .t { color: #888; }
