  :root { --ink:#1f2937; --muted:#6b7280; --line:#e5e7eb; --bg:#f7f7fb; --card:#fff; --accent:#6D28D9; --accent-soft:#ede9fe; }
  * { box-sizing:border-box; }
  body { margin:0; font:14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; color:var(--ink); background:var(--bg); }
  header { display:flex; align-items:center; gap:12px; padding:10px 20px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
  header img { width:36px; height:36px; }
  header .app { font-size:16px; font-weight:600; }
  header .crumb { color:var(--muted); }
  header .right { margin-left:auto; display:flex; gap:8px; align-items:center; }
  .btn { border:1px solid var(--line); background:var(--card); border-radius:8px; padding:6px 12px; font:inherit; color:var(--ink); cursor:pointer; }
  .btn[disabled] { color:var(--muted); cursor:not-allowed; }
  .tabs { display:flex; gap:4px; padding:0 20px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:57px; z-index:4; }
  .tabs a { padding:9px 14px; color:var(--muted); text-decoration:none; border-bottom:2px solid transparent; font-weight:600; font-size:13.5px; }
  .tabs a.on { color:var(--accent); border-bottom-color:var(--accent); }
  .tabs .hint { margin-left:auto; align-self:center; font-size:12px; color:var(--muted); }
  .wrap { display:grid; grid-template-columns:270px minmax(0,1fr); min-height:calc(100vh - 98px); }
  .wrap.full { grid-template-columns:minmax(0,1fr); } .wrap.full nav { display:none; }
  nav { background:var(--card); border-right:1px solid var(--line); padding:12px 10px; overflow-y:auto; max-height:calc(100vh - 98px); position:sticky; top:98px; }
  nav h4 { margin:14px 10px 6px; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); }
  nav a { display:block; padding:5px 10px; border-radius:7px; color:var(--ink); text-decoration:none; font-size:13px; }
  nav a:hover { background:#f3f4f6; }
  nav a.on { background:var(--accent-soft); color:var(--accent); font-weight:600; }
  main { padding:16px 22px; min-width:0; }
  .titlebar { display:flex; align-items:flex-end; gap:16px; flex-wrap:wrap; }
  h1 { margin:0; font-size:21px; }
  .sub { color:var(--muted); font-size:12.5px; }
  .controls { margin-left:auto; display:flex; gap:12px; flex-wrap:wrap; }
  .controls label { display:flex; flex-direction:column; font-size:12px; color:var(--muted); gap:3px; }
  .controls select, .controls input { font:inherit; padding:5px 8px; border:1px solid var(--line); border-radius:8px; background:#fff; min-width:140px; }
  .card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:12px 14px; margin-top:12px; }
  .card h3 { margin:0 0 6px; font-size:13.5px; color:#374151; font-weight:600; }
  .scroll { overflow-x:auto; }
  table { border-collapse:collapse; font-variant-numeric:tabular-nums; }
  th, td { padding:4px 8px; border-bottom:1px solid var(--line); text-align:right; white-space:nowrap; font-size:12.5px; }
  th.k, td.k { text-align:left; position:sticky; background:var(--card); z-index:1; }
  thead th { color:var(--muted); font-weight:600; font-size:11.5px; }
  tr.total td { font-weight:700; border-top:2px solid var(--ink); }
  td.sd { padding:2px 4px; text-align:center; cursor:default; }
  td.click { cursor:pointer; }
  td.click:hover { background:#f5f3ff; }
  .sw { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:6px; vertical-align:-1px; }
  .legend { display:flex; flex-wrap:wrap; gap:3px 12px; font-size:11.5px; color:var(--muted); margin-top:6px; }
  .note { font-size:12px; color:var(--muted); margin:2px 0 8px; }
  .empty { color:var(--muted); padding:18px; text-align:center; }
  .grid2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(420px,1fr)); gap:12px; }
  footer { color:var(--muted); font-size:12px; margin-top:14px; }
  .tip { position:fixed; pointer-events:none; background:#111827; color:#fff; padding:6px 8px; border-radius:6px; font-size:12px; display:none; z-index:20; }
  .pill { display:inline-block; padding:1px 8px; border-radius:10px; font-size:11px; font-weight:600; }
  .k1 { left:0 } .k2 { left:var(--k2,160px) } .k3 { left:var(--k3,320px) }
  .back { margin-bottom:6px; }
  .who { color:var(--muted); font-size:12.5px; margin-right:6px; }
  .cover { position:fixed; inset:0; background:rgba(17,24,39,.55); display:flex; align-items:center; justify-content:center; z-index:50; cursor:pointer; }
  .cover p { background:#fff; padding:18px 22px; border-radius:12px; max-width:460px; font-size:15px; }
  .error { background:#fee2e2; color:#991b1b; padding:12px 14px; border-radius:10px; margin-top:12px; }
