  :root {
    --bg: #14161b; --panel: rgba(24, 27, 34, .88); --line: #2f3440; --text: #e8e6e1;
    --dim: #9aa0ab; --leader: #6f9bd8; --follower: #e58a6c; --accent: #f2c96b;
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; margin: 0; }
  body { background: var(--bg); color: var(--text); overflow: hidden; display: grid; grid-template-rows: 1fr auto;
         font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
  #view { position: relative; min-height: 0; }
  canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
  .panel { position: absolute; background: var(--panel); border: 1px solid var(--line);
           border-radius: 10px; backdrop-filter: blur(6px); }
  #top { top: 12px; left: 12px; padding: 10px 12px; max-width: min(420px, calc(100vw - 24px)); }
  #top select { width: 100%; font: inherit; font-weight: 600; color: var(--text);
                background: #20242d; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
  #meta { color: var(--dim); font-size: 12px; margin-top: 6px; }
  #legend { margin-top: 6px; font-size: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
  .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; background: var(--accent); }
  .dot.m { background: var(--leader) !important; } .dot.w { background: var(--follower) !important; }
  #views { top: 12px; right: 12px; padding: 6px; display: flex; gap: 4px; }
  button { font: inherit; color: var(--text); background: #262b35; border: 1px solid var(--line);
           border-radius: 6px; padding: 5px 10px; cursor: pointer; }
  button:hover { background: #303644; }
  button.on { border-color: var(--accent); color: var(--accent); }
  #bottom { position: static; margin: 0 12px 12px; padding: 10px 12px; }
  #transport { display: flex; align-items: center; gap: 10px; }
  #play { width: 74px; }
  #clock { font-variant-numeric: tabular-nums; min-width: 64px; color: var(--accent); font-weight: 600; }
  #scrubwrap { flex: 1; position: relative; padding-bottom: 16px; }
  #scrub { width: 100%; margin: 0; accent-color: var(--accent); }
  #ticks { position: absolute; left: 8px; right: 8px; bottom: 0; height: 14px; font-size: 10px; color: var(--dim); }
  #ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
  #ticks span.now { color: var(--accent); }
  #rows { margin-top: 8px; max-height: 24vh; overflow: auto; border-top: 1px solid var(--line); }
  table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
  td { padding: 3px 8px 3px 0; white-space: nowrap; vertical-align: top; }
  td.note { white-space: normal; color: var(--dim); width: 100%; }
  td.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
  tr { cursor: pointer; }
  tr.now td { color: var(--text); }
  tr.now td:first-child { color: var(--accent); font-weight: 700; }
  tr.now { background: rgba(242, 201, 107, .08); }
  tr:not(.now) td { color: var(--dim); }
  .m { color: var(--leader) !important; } .w { color: var(--follower) !important; }
  #error { position: fixed; inset: 0; display: none; place-items: center; padding: 24px; text-align: center; }
  @media (max-width: 640px) { td.note { display: none; } #views { top: auto; bottom: 12px; } }
