:root {
  --bg: #1e1f22; --card: #2b2d31; --line: #3f4147; --text: #e6e7ea; --muted: #a3a6ad;
  --done: #2e9e5b; --open: #d4a017; --wait: #8a8f98; --accent: #5865f2; --today: #ed4245;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 20px 24px 40px; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; }
header { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
h1 { margin: 0; font-size: 28px; }
h2 { margin: 0 0 10px; font-size: 17px; }
.sub { color: var(--muted); font-size: 13px; }
.total { min-width: 280px; }
.card { background: var(--card); border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .d { background: var(--done); } .bar .o { background: var(--open); } .bar .w { background: var(--wait); }
.nums { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.chip { display: inline-block; min-width: 22px; text-align: center; border-radius: 6px; padding: 0 6px; font-size: 12px; font-weight: 600; color: #111; }
.chip.d { background: var(--done); } .chip.o { background: var(--open); } .chip.w { background: var(--wait); }
#milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ms { border-left: 4px solid var(--open); padding-left: 10px; }
.ms.d { border-color: var(--done); } .ms.w { border-color: var(--wait); }
.ms b { display: block; } .ms span { color: var(--muted); font-size: 13px; }
#timeline svg { width: 100%; height: auto; display: block; }
#timeline text { fill: var(--muted); font-size: 12px; }
#timeline .lab { fill: var(--text); font-size: 13px; }
.treehead { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.treehead h2 { margin: 0; }
.filters { display: flex; gap: 6px; }
.filters button { background: var(--line); color: var(--text); border: 0; border-radius: 6px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.filters button.on { background: var(--accent); }
details { margin-left: 18px; }
#tree > details { margin-left: 0; }
summary { cursor: pointer; padding: 6px 4px; border-radius: 6px; list-style: none; display: flex; gap: 10px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "▸"; color: var(--muted); width: 12px; }
details[open] > summary::before { content: "▾"; }
summary:hover, .leaf:hover { background: #35373c; }
summary .t { font-weight: 600; }
summary .mini { flex: 0 0 120px; }
summary .cnt { color: var(--muted); font-size: 13px; }
.leaf { margin-left: 18px; padding: 6px 4px 6px 26px; border-radius: 6px; }
.leaf .row { display: flex; gap: 10px; align-items: center; }
.leaf .no { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 42px; }
.leaf .date { color: var(--muted); font-size: 13px; margin-left: auto; }
.leaf .brief { color: var(--muted); font-size: 13.5px; margin: 4px 0 0 76px; white-space: pre-wrap; }
.leaf a, footer a { color: #8ea1ff; text-decoration: none; cursor: pointer; font-size: 13px; }
.brief code { background: #1e1f22; border-radius: 4px; padding: 0 4px; font-size: 12.5px; color: #c9cdd4; }
footer { display: flex; gap: 18px; color: var(--muted); font-size: 13px; }
.msg { position: fixed; bottom: 12px; right: 16px; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) {
  body { padding: 14px 12px 30px; }
  h1 { font-size: 22px; }
  .leaf .brief { margin-left: 0; }
  summary .mini { display: none; }
}
