* { box-sizing: border-box; }
:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #1f2733;
  --muted: #7a879a;
  --line: #e6eaf0;
  --primary: #2563eb;
  --primary-d: #1d4ed8;
  --green: #16a34a;
  --red: #dc2626;
}
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
.app { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; }
.top { text-align: center; margin: 8px 0 18px; }
.top h1 { font-size: 22px; margin: 0 0 4px; }
.top .sub { color: var(--muted); font-size: 14px; margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}

.step { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.badge {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.step-title { font-weight: 600; }
.step-desc { color: var(--muted); font-size: 13px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  border: 1px solid transparent; border-radius: 10px; padding: 11px 16px;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: .15s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-secondary { background: #eef2ff; color: var(--primary-d); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn.wide { flex: 1; }
.btn.small { padding: 6px 12px; font-size: 13px; }

.manual { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.manual textarea {
  width: 100%; min-height: 120px; resize: vertical; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 14px;
}
.hidden { display: none; }

.hint { margin-top: 10px; font-size: 13px; min-height: 18px; }
.hint.ok { color: var(--green); }
.hint.err { color: var(--red); }

.list-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 14px; font-weight: 600;
}
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px;
  background: #fbfcfe;
}
.li-idx {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; background: #eef2ff;
  color: var(--primary-d); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.li-main { flex: 1; min-width: 0; }
.li-title { font-size: 14px; font-weight: 600; }
.li-desc { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-tag { font-size: 11px; color: var(--primary-d); background:#eef2ff; padding:1px 6px; border-radius: 6px; margin-left:6px;}
.li-btns { display: flex; gap: 4px; }
.icon-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  width: 30px; height: 30px; cursor: pointer; font-size: 14px; color: var(--muted);
}
.icon-btn:hover { background: #f1f5f9; }
.icon-btn.del:hover { color: var(--red); border-color: #f3c2c2; }

.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 8px; }

.result {
  white-space: pre-wrap; word-break: break-word; background: #0f172a; color: #e2e8f0;
  padding: 14px; border-radius: 10px; font-size: 13px; margin: 10px 0 0;
  max-height: 460px; overflow: auto;
}
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
