* { box-sizing: border-box; }
body {
  margin: 0; padding: 0;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f5f6f8; color: #1f2329;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 20px 60px; }
header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
h1 { font-size: 22px; margin: 0; font-weight: 600; }
h2 { font-size: 15px; margin: 20px 0 10px; font-weight: 600; color: #2b2f36; }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.badge-off { background: #eceff3; color: #6b7280; }
.badge-on { background: #e6f7ee; color: #0a7a4b; }
.badge-err { background: #fdeaea; color: #b42318; }
.card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 16px 20px; margin-bottom: 16px;
}
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
label { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
select, input[type=range], input[type=color] { font-size: 13px; }
select { padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; }
.btn {
  font-size: 13px; padding: 8px 16px; border: 1px solid #d1d5db;
  border-radius: 8px; background: #fff; color: #1f2329; cursor: pointer;
}
.btn:hover:not(:disabled) { background: #f3f4f6; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.active { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.hint { font-size: 12px; color: #8a9099; margin: 8px 0 0; }
.warn { font-size: 12px; color: #b45309; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 6px; padding: 6px 10px; margin: 8px 0 0; }
.stage {
  position: relative; min-height: 150px; border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 16px 20px; gap: 8px;
}
.line { font-size: 32px; line-height: 1.4; word-break: break-word; }
.src-line { color: #e8e8e8; }
.dst-line { color: #ffd54a; font-weight: 500; }
footer { font-size: 12px; color: #9aa0a6; margin-top: 24px; }
.diag { font-family: ui-monospace, monospace; font-size: 11px; color: #6b7280; }

.pip-body { margin: 0; padding: 10px 14px; display: flex; flex-direction: column;
  justify-content: center; height: 100%; gap: 6px; }
.pip-line { margin: 0; word-break: break-word; line-height: 1.35; }
