html,body,#root{height:100%;margin:0}body{background:linear-gradient(160deg,var(--from),var(--to));color:var(--ink);font-family:system-ui,sans-serif;-webkit-tap-highlight-color:transparent}:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.demo{box-sizing:border-box;height:100%;max-width:720px;margin:0 auto;display:flex;flex-direction:column;padding:14px 14px 16px;gap:10px}.tabs{display:flex;gap:4px;margin-right:52px;padding:4px;border-radius:12px;background:color-mix(in srgb,var(--ink) 8%,transparent)}.tabs [data-slot=tabs-tab]{flex:1;border:0;border-radius:9px;padding:8px 6px;background:transparent;color:var(--muted);font:600 .85rem system-ui,sans-serif;cursor:pointer}.tabs [data-slot=tabs-tab][aria-selected=true]{background:#fff;color:var(--ink);box-shadow:0 1px 3px #0000001f}.panel{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}.panel[hidden]{display:none}.hint{margin:0;font-size:.72rem;line-height:1.4;color:var(--muted)}.sheet{display:flex;flex-direction:column;gap:8px;min-height:0}.sheet-grid{overflow:auto;border-radius:10px;background:#fff;box-shadow:0 1px 4px #0000001a;font-size:.85rem;user-select:none;-webkit-user-select:none}.sheet-row{display:grid;grid-template-columns:30px minmax(92px,1.6fr) repeat(3,minmax(64px,1fr))}.sheet-head,.sheet-corner{display:flex;align-items:center;justify-content:center;padding:4px;background:#f3f3f1;color:#5f5f5a;font-size:.7rem;font-weight:600;border-right:1px solid #e3e3df;border-bottom:1px solid #e3e3df}.sheet-cell{position:relative;min-height:34px;padding:0 8px;display:flex;align-items:center;border-right:1px solid #ececea;border-bottom:1px solid #ececea;color:#1f1f1c;cursor:cell;font-variant-numeric:tabular-nums;touch-action:none}.sheet-cell:not([aria-colindex="2"]){justify-content:flex-end}.sheet-cell[data-header]{font-weight:650;justify-content:flex-start}.sheet-cell [data-formula]{color:#1d4ed8}.sheet-cell[data-selected]{background:#e6efff}.sheet-cell[data-range-edge~=top]{box-shadow:inset 0 2px #2563eb}.sheet-cell[data-range-edge~=bottom]{box-shadow:inset 0 -2px #2563eb}.sheet-cell[data-range-edge~=left]{box-shadow:inset 2px 0 #2563eb}.sheet-cell[data-range-edge~=right]{box-shadow:inset -2px 0 #2563eb}.sheet-cell[data-active]{outline:2px solid #2563eb;outline-offset:-2px;z-index:1}.sheet-cell:focus-visible{outline:2px solid #2563eb;outline-offset:-2px}.sheet-editor{box-sizing:border-box;width:100%;height:100%;margin:0 -8px;padding:0 8px;border:0;outline:2px solid #2563eb;outline-offset:-2px;font:inherit;color:inherit;background:#fff;text-align:left}.sheet-status{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 10px;min-height:1.4em;font-size:.75rem;color:var(--muted)}.sheet-where{font-weight:700;color:var(--ink)}.sheet-status code{color:#1d4ed8}.board,.flow{flex:1;min-height:260px;border-radius:12px;background-color:#fbfaf7;background-image:radial-gradient(circle,rgb(0 0 0 / .13) 1px,transparent 1.2px);background-size:18px 18px;box-shadow:inset 0 0 0 1px #00000014;cursor:grab}.board-world{transform-origin:0 0}.note{box-sizing:border-box;padding:12px;border-radius:6px;display:flex;cursor:grab;user-select:none;-webkit-user-select:none;box-shadow:0 2px 6px #0000001f;transition:box-shadow .12s}.note:has([data-tone=sun]){background:#fde68a}.note:has([data-tone=mint]){background:#bbf7d0}.note:has([data-tone=sky]){background:#bfdbfe}.note:has([data-tone=rose]){background:#fecdd3}.note-text{font-size:.85rem;font-weight:550;line-height:1.3;color:#1c1b17}.note[aria-pressed=true]{outline:2px solid #1c1b17;outline-offset:2px}.note[data-dragging],.step[data-dragging]{cursor:grabbing;box-shadow:0 10px 24px #0003;z-index:2}.controls{position:absolute;left:10px;bottom:10px;display:flex;gap:6px;flex-wrap:wrap}.controls button{min-width:36px;height:34px;padding:0 12px;border:0;border-radius:9px;background:#1c1b17;color:#fff;font:600 .8rem system-ui,sans-serif;cursor:pointer}.controls button[aria-disabled=true]{opacity:.45;cursor:default}.wires{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}.wires path{fill:none;stroke:#8a877d;stroke-width:2}.wires path[data-lit]{stroke:#16a34a;stroke-width:3}.wires .wire-draft{stroke:#2563eb;stroke-dasharray:6 5}.step{box-sizing:border-box;padding:10px 14px;border-radius:12px;background:#fff;box-shadow:0 0 0 1px #0000001a,0 2px 6px #00000014;display:flex;flex-direction:column;justify-content:center;gap:2px;cursor:grab;user-select:none;-webkit-user-select:none;transition:box-shadow .16s,background .16s}.step small{font-size:.62rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#6b6960;pointer-events:none}.step strong{font-size:.85rem;color:#1c1b17;pointer-events:none}.step[data-done]{background:#dcfce7}.step[data-running]{background:#fef9c3;box-shadow:0 0 0 2px #ca8a04,0 6px 16px #00000024}.port{position:absolute;left:50%;width:14px;height:14px;margin-left:-7px;border-radius:50%;background:#fff;border:2px solid #8a877d;box-sizing:border-box}.port:after{content:"";position:absolute;inset:-12px}.port-in{top:-7px}.port-out{bottom:-7px;cursor:crosshair}.port[data-connect=source],.port[data-connect=target]{background:#2563eb;border-color:#2563eb}.port[data-connect=candidate]{border-color:#2563eb}@media(prefers-reduced-motion:reduce){.note,.step{transition:none}}
