:root {
  --red: #8E1C23;
  --red-deep: #6C1218;
  --navy: #1C3D5A;
  --gold: #C4A35A;
  --cream: #F3EEE4;
  --paper: #FFFDF8;
  --ink: #2A2620;
  --muted: #7A7266;
  --stuck: #C4392A;
  --slow: #D97706;
  --normal: #2F6B4F;
  --done: #1C3D5A;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #d7cbb8; }
body {
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}
#app {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(80,40,30,.18);
}
.page { min-height: 100vh; padding-bottom: 92px; animation: fadeUp .5s cubic-bezier(.22,1,.36,1); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes grow { from { transform: scaleX(.08); } to { transform: scaleX(1); } }
@keyframes pulse { 50% { transform: scale(1.12); } }
.hero {
  background: linear-gradient(165deg, #6C1218, #8E1C23 55%, #9E2A24);
  color: #fff;
  padding: 22px 20px 28px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px; top: -30px;
  width: 140px; height: 140px;
  border: 8px solid rgba(196,163,90,.22);
  border-radius: 50%;
}
.kicker { letter-spacing: .28em; color: #E7C98A; font-size: 12px; }
.title { font-size: 22px; font-weight: 800; margin: 6px 0 4px; }
.sub { font-size: 13px; opacity: .88; }
.wrap { padding: 14px 16px 20px; }
.card {
  background: var(--paper);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(80,50,30,.06);
  border: 1px solid rgba(140,110,70,.14);
}
.btn {
  width: 100%; height: 48px; border: 0; border-radius: 12px;
  background: linear-gradient(#A3222A, #8E1C23); color: #fff;
  font-size: 17px; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 16px rgba(142,28,35,.28);
}
.btn.ghost { background: #fff; color: var(--red); border: 1px solid var(--red); box-shadow: none; }
.inp, textarea {
  width: 100%; border: 0; background: #F6F1E7; border-radius: 12px;
  padding: 12px 14px; font-size: 16px; margin-bottom: 12px;
}
.label { color: var(--muted); font-size: 13px; margin: 4px 0 8px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; height: 26px; padding: 0 10px; border-radius: 99px;
  color: #fff; font-size: 12px; font-weight: 800;
}
.stuck { background: var(--stuck); } .slow { background: var(--slow); }
.normal, .doing { background: var(--normal); } .done { background: var(--done); }
.pending { background: #9A9388; }
.bar { display: flex; align-items: center; gap: 8px; }
.track { flex: 1; height: 14px; background: #E8E0D2; border-radius: 99px; overflow: hidden; }
.fill { height: 100%; border-radius: 99px; transform-origin: left; animation: grow .9s cubic-bezier(.22,1,.36,1) both; }
.fill.stuck { background: linear-gradient(90deg,#E45A4C,#C4392A); }
.fill.slow { background: linear-gradient(90deg,#F0B429,#D97706); }
.fill.normal, .fill.doing { background: linear-gradient(90deg,#4C9A73,#2F6B4F); }
.fill.done { background: linear-gradient(90deg,#3E6B8A,#1C3D5A); }
.num { min-width: 42px; text-align: right; font-weight: 800; color: var(--navy); }
.tabbar {
  position: absolute; left: 12px; right: 12px; bottom: 10px;
  height: 58px; background: rgba(255,253,248,.94);
  border-radius: 18px; display: flex; border: 1px solid rgba(140,110,70,.16);
  box-shadow: 0 10px 24px rgba(50,30,20,.12); z-index: 9;
}
.tabbar button {
  flex: 1; border: 0; background: none; font-weight: 800; color: #7A7266; cursor: pointer;
}
.tabbar button.on { color: var(--red); }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: -18px; }
.cat { background: #FFFDF8; border-radius: 16px; padding: 14px; border-top: 4px solid var(--red); cursor: pointer; }
.cat.gold { border-top-color: var(--gold); }
.cat b { display: block; font-size: 32px; color: var(--navy); }
.stats { display: flex; text-align: center; }
.stats div { flex: 1; cursor: pointer; }
.stats b { display: block; font-size: 22px; }
.chips { display: flex; gap: 8px; overflow: auto; padding: 4px 0 10px; }
.chip {
  flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: 99px;
  border: 1px solid rgba(140,110,70,.16); background: #FFFDF8; font-weight: 700; cursor: pointer;
}
.chip.on { background: var(--red); color: #fff; border-color: var(--red); }
.node { display: flex; gap: 10px; }
.dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 10px; box-shadow: 0 0 0 4px rgba(196,163,90,.18); }
.dot.stuck { background: var(--stuck); animation: pulse 1.6s ease-in-out infinite; }
.dot.slow { background: var(--slow); }
.dot.doing { background: #3E6B8A; }
.dot.done { background: var(--normal); }
.dot.pending { background: #C4BBAE; box-shadow: none; }
.rail { display: flex; flex-direction: column; align-items: center; }
.line { width: 2px; flex: 1; background: #E4D8C4; }
.login {
  min-height: 100vh;
  background: linear-gradient(180deg, #6C1218 0%, #8E1C23 36%, #F3EEE4 36%);
  padding: 56px 20px 24px;
}
.seal {
  width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%;
  border: 3px solid var(--gold); display: grid; place-items: center;
  color: #E7C98A; font-weight: 800; letter-spacing: .12em;
}
.demo {
  height: 42px; display: grid; place-items: center; border-radius: 10px;
  background: #F8EFE3; color: var(--red); font-weight: 700; margin-top: 8px; cursor: pointer;
}
.warn { background: #FDECEC; color: var(--stuck); padding: 8px 10px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
h3 { margin: 8px 0 6px; color: var(--navy); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
link, a { color: var(--red); }
.hero-create {
  margin-top: 12px;
  width: 100%;
  height: 40px;
  border: 1.5px solid #E7C98A;
  background: transparent;
  color: #E7C98A;
  border-radius: 10px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.pg-num { text-align: center; font-size: 42px; font-weight: 800; color: var(--red); margin: 4px 0 10px; }
.hs-row { display: flex; align-items: center; gap: 8px; }
.nudge {
  width: 48px; height: 48px; border: 0; border-radius: 12px;
  background: #1C3D5A; color: #fff; font-size: 16px; font-weight: 800; cursor: pointer;
}
.nudge.plus { background: var(--red); }
.hs-box {
  flex: 1; height: 56px; position: relative; display: flex; align-items: center;
  padding: 0 24px; touch-action: none;
  background: #F6F1E7; border-radius: 14px; border: 2px solid var(--red);
}
.hs-track { width: 100%; height: 16px; background: #D9D0C2; border-radius: 99px; overflow: hidden; }
.hs-fill { height: 100%; background: linear-gradient(90deg, #E45A4C, #8E1C23); }
.hs-thumb {
  position: absolute; top: 50%; width: 48px; height: 48px; margin-left: -24px;
  transform: translateY(-50%); border-radius: 50%; background: var(--red); color: #fff;
  font-size: 13px; font-weight: 800; display: grid; place-items: center;
  border: 3px solid #E7C98A; box-shadow: 0 4px 10px rgba(142,28,35,.35); pointer-events: none;
}
.hs-quick { display: flex; gap: 6px; margin-top: 10px; }
.hs-quick .q {
  flex: 1; height: 36px; border-radius: 8px; border: 1px solid rgba(140,110,70,.16);
  background: #F6F1E7; font-weight: 800; cursor: pointer;
}
.hs-quick .q.on { background: var(--red); color: #fff; border-color: var(--red); }
select.inp { appearance: auto; }
