:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#fff4de;--bg2:#ffe6b8;--ink:#2a2b44;--muted:#7d7a95;--paper:#fff;--line:#f0dcae;--mat:#f6ebd5;--grid:#e7d4ae;--F:#2fbf71;--F-d:#1f9a57;--B:#3d8bfd;--B-d:#2a68c9;--L:#ff9f1c;--L-d:#cf7800;--R:#a45ee9;--R-d:#7b3fbf;--go:#19b35a;--go-d:#0f8a44;--stop:#ef4444;--stop-d:#b91c1c;--pink:#ff4f8b;--card:clamp(54px, 9.2vmin, 82px);--pcard:clamp(68px, 14vmin, 110px);--font:"Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--ink);font-family:var(--font);-webkit-font-smoothing:antialiased;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;overscroll-behavior:none;font-weight:700;overflow:hidden}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;background:0 0;border:0;padding:0}button:disabled{cursor:default}button:focus-visible,[tabindex]:focus-visible{outline:4px solid var(--pink);outline-offset:3px}svg{display:block}.app{background:radial-gradient(1200px 500px at 85% -10%, #ffe9c2 0, transparent 60%), radial-gradient(900px 500px at -10% 110%, #ffe0b0 0, transparent 60%), var(--bg);height:100dvh;padding-bottom:env(safe-area-inset-bottom);grid-template-rows:auto minmax(0,1fr);display:grid}.top{padding:max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));align-items:center;gap:10px;display:flex}.logo{background:var(--L);width:46px;height:46px;color:var(--ink);box-shadow:0 4px 0 var(--L-d);border-radius:15px;place-items:center;display:grid}.logo svg{width:32px;height:32px}.logo:active{box-shadow:0 1px 0 var(--L-d);transform:translateY(3px)}.spacer{flex:1}.robot-btn{background:var(--paper);border:3px solid var(--line);min-width:56px;height:56px;box-shadow:0 3px 0 var(--line);border-radius:28px;justify-content:center;align-items:center;gap:8px;padding:0 14px;display:inline-flex}.robot-btn:active{box-shadow:0 1px 0 var(--line);transform:translateY(2px)}.robot-btn .conn-icon{width:46px;height:46px;color:var(--ink);overflow:visible}.conn-icon .body{fill:#fff;stroke:currentColor}.conn-icon .waves{stroke:#9a94b4}.conn-icon.off .body{stroke:#aaa5c0}.conn-icon.off .bot>circle:last-child{fill:#aaa5c0}.conn-icon.off .lf,.conn-icon.off .lb{fill:#cfcbe0}.conn-icon.off .waves{opacity:.35}.conn-icon.wait .waves{stroke:#3d8bfd}.conn-icon.wait .waves path{animation:1.2s infinite wave}.conn-icon .waves path:nth-child(2){animation-delay:.2s!important}.conn-icon .waves path:nth-child(3){animation-delay:.4s!important}.conn-icon.wait .lf,.conn-icon.wait .lb{animation:.7s infinite blink}.conn-icon.on .waves,.conn-icon.sync .waves,.conn-icon.standby .waves{stroke:var(--go)}.conn-icon.sync .waves path{animation:.9s infinite wave}.conn-icon.standby .lf,.conn-icon.standby .lb{fill:#cfcbe0}.conn-icon.standby .waves{opacity:.35}.conn-icon.no .bot,.conn-icon.no .waves{opacity:.45}.robot-btn.live{background:#e3f8ec;border-color:#7fd6a2;box-shadow:0 3px #7fd6a2}.robot-btn .bat{width:36px;color:var(--go-d)}.robot-btn .bat svg{width:36px;height:auto;color:var(--go-d)}.board{min-height:0;padding:0 max(14px, env(safe-area-inset-right)) 18px max(14px, env(safe-area-inset-left));grid-template-rows:minmax(0,40%) minmax(0,1fr);grid-template-columns:minmax(0,1fr);gap:14px;display:grid}@media (width>=720px) and (aspect-ratio>=5/4){.board{grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1.05fr) minmax(0,1fr)}}.left,.right{flex-direction:column;gap:12px;min-width:0;min-height:0;display:flex}.stage{background:var(--mat);min-height:0;box-shadow:0 0 0 5px var(--paper), 0 0 0 8px var(--line), 0 14px 26px #7850142e;border-radius:28px;flex:1;margin:8px;position:relative;overflow:hidden}.stage.live{box-shadow:0 0 0 5px var(--paper), 0 0 0 8px #8fdcae, 0 14px 26px #14643c2e}.mat{width:100%;height:100%;position:absolute;inset:0}.floor{fill:var(--mat)}.gridline{stroke:var(--grid);stroke-width:.035px;fill:none}.start-tile rect{fill:#fff9;stroke:#e8a33c;stroke-width:.04px;stroke-dasharray:.1 .09}.start-tile .flag{color:#e11d48}.target-cell{fill:#ff4f8b21;stroke:var(--pink);stroke-width:.05px;stroke-dasharray:.12 .09}.finish .pole{stroke:var(--ink);stroke-width:.06px;stroke-linecap:round;fill:none}.finish .foot{fill:var(--ink)}.finish .cloth{fill:#fff}.finish .checks rect{fill:var(--ink)}.finish .edge{fill:none;stroke:var(--ink);stroke-width:.035px}.hud circle{fill:#fff;stroke:var(--pink);stroke-width:.07px}.hud path{fill:var(--pink)}.stage{cursor:crosshair}.seg line{stroke-linecap:round;fill:none}.seg.todo line{stroke:#9a94b4;stroke-width:.085px;stroke-dasharray:.001 .19}.seg.todo .chev{stroke:#9a94b4}.seg.active line{stroke:var(--go);stroke-width:.12px;stroke-dasharray:.22 .16;animation:.5s linear infinite march}.seg.active .chev{stroke:var(--go-d)}.seg.done line{stroke:var(--F-d);stroke-width:.13px}.seg.done .chev{stroke:#fff}.seg .chev{fill:none;stroke-width:.06px;stroke-linecap:round;stroke-linejoin:round}.seg.todo .chev,.seg.active .chev{stroke-width:.075px}.seg.B.todo line,.seg.B.todo .chev{stroke:#7eaef7}.seg.B.active line{stroke:var(--B)}.seg.B.active .chev,.seg.B.done line{stroke:var(--B-d)}.avatar{--pulse:0}.avatar .body{fill:#fff;stroke:#c3c9dc;stroke-width:.035px;stroke-linejoin:round}.avatar .pad{fill:#f1f3f9}.avatar .btn{fill:#cfd5e3}.avatar .dot{fill:#ff7a00;opacity:.08}.avatar .sensors circle{fill:#3a3b58}.avatar .led{stroke-width:.05px}.avatar .led.front{fill:#e040fb;stroke:#e040fb;fill-opacity:calc(.3 + .7 * var(--pulse));stroke-opacity:calc(.55 * var(--pulse))}.avatar .led.back{fill:#18d6e0;stroke:#18d6e0;fill-opacity:calc(.3 + .7 * var(--pulse));stroke-opacity:calc(.55 * var(--pulse))}.stage-note{color:var(--ink);box-shadow:0 6px 0 var(--line), 0 12px 24px #3c280a38;pointer-events:none;background:#fff;border-radius:26px;align-items:center;gap:14px;padding:12px 22px;animation:.35s cubic-bezier(.2,1.5,.4,1) pop;display:flex;position:absolute;bottom:14px;left:50%;transform:translate(-50%)}.stage-note svg{flex:none;width:46px;height:46px}.stage-note .mini{background:var(--c);color:#fff;width:46px;height:46px;box-shadow:0 4px 0 var(--cd);border-radius:14px;place-items:center;display:grid}.stage-note .mini svg{width:30px;height:30px}.stage-note .who svg{color:var(--ink)}.stage-note .flag{color:#e11d48}.stage-note .star{color:#ffc61a;animation:.5s ease-in-out infinite alternate throb;display:grid}.stage-note .star svg{width:56px;height:56px}.stage-note .dots{gap:7px;display:flex}.stage-note .dots i{background:var(--B);border-radius:50%;width:11px;height:11px;animation:1s infinite hop}.stage-note .dots i:nth-child(2){animation-delay:.15s}.stage-note .dots i:nth-child(3){animation-delay:.3s}.stage-note.script.log{white-space:pre-wrap;word-break:break-all;max-height:220px;font-size:11.5px}.plain:disabled{opacity:.45}.keys{grid-template-columns:auto 1fr;align-items:center;gap:8px 14px;margin:0 0 6px;font-size:14px;display:grid}.keys dd{margin:0}kbd{min-width:34px;font:800 13px/1 var(--font);text-align:center;white-space:nowrap;background:#f3f0fa;border:2px solid #e2dcf2;border-bottom-width:4px;border-radius:9px;padding:5px 9px;display:inline-block}.warn{background:#fff7d6}.stage-note.link{background:#ffe9e9}.celebrate{pointer-events:none;position:absolute;inset:0;overflow:hidden}.celebrate span{color:#ffc61a;width:38px;animation:1.5s ease-out forwards burst;position:absolute;top:45%;left:50%}.celebrate span:nth-child(3n){color:var(--pink)}.celebrate span:nth-child(3n+1){color:#3d8bfd}.track-scroll{min-height:0;box-shadow:inset 0 0 0 3px var(--line);scrollbar-width:thin;background:#ffffffb8;border-radius:26px;flex:1;padding:16px 16px 6px;position:relative;overflow:hidden auto}.track-scroll.shake{animation:.45s shake}.track{min-height:calc(var(--card) + 20px);flex-wrap:wrap;align-content:flex-start;gap:14px 10px;margin:0;padding:8px 4px 4px;list-style:none;display:flex;position:relative}.flag-tile{width:var(--card);height:var(--card);background:var(--paper);color:#e11d48;letter-spacing:.02em;border:3px dashed #e5c98f;border-radius:18px;flex-direction:column;flex:none;justify-content:center;align-items:center;gap:1px;font-size:11px;font-weight:800;display:flex}.flag-tile svg{width:52%}.empty-hint{align-self:center;align-items:center;gap:14px;margin-left:4px;display:flex}.empty-hint .ghost-slot{width:var(--card);height:var(--card);color:#e0c78f;border:3px dashed #e0c78f;border-radius:18px;place-items:center;animation:1.8s ease-in-out infinite breathe;display:grid}.empty-hint .ghost-slot svg{width:46%}.hint-arrow{width:68px;color:var(--pink);pointer-events:none;margin-left:-34px;animation:1s ease-in-out infinite bounce;position:absolute;bottom:34px;left:50%}.hint-arrow svg{width:100%;height:auto}.slot{width:var(--card);height:var(--card);cursor:grab;flex:none;transition:transform .15s;position:relative}.card,.pcard,.c-F{--c:var(--F);--cd:var(--F-d)}.c-B{--c:var(--B);--cd:var(--B-d)}.c-L{--c:var(--L);--cd:var(--L-d)}.c-R{--c:var(--R);--cd:var(--R-d)}.card{background:var(--c);color:#fff;width:100%;height:100%;box-shadow:0 5px 0 var(--cd), 0 9px 14px #3c280a24;border-radius:18px;place-items:center;display:grid}.card svg{width:64%;height:64%}.slot.pop,.slot:last-of-type{animation:none}.slot.todo .card{opacity:.95}.slot.done .card{opacity:.5;filter:saturate(.7)}.slot.done:after{content:"✓";background:var(--go);color:#fff;border:2px solid #fff;border-radius:50%;place-items:center;width:24px;height:24px;font-size:15px;font-weight:900;display:grid;position:absolute;bottom:-4px;right:-6px}.slot.active{z-index:2;transform:scale(1.16)}.slot.active .card{box-shadow:0 5px 0 var(--cd), 0 0 0 5px #fff, 0 0 0 9px var(--ink);animation:.6s ease-in-out infinite wiggle}.slot.selected{z-index:2;transform:translateY(-5px)}.slot.selected .card{box-shadow:0 5px 0 var(--cd), 0 0 0 4px #fff, 0 0 0 7px var(--pink)}.slot.lifted{opacity:.25}.slot .x{background:var(--stop);color:#fff;border:3px solid #fff;border-radius:50%;place-items:center;width:36px;height:36px;display:grid;position:absolute;top:-13px;right:-13px;box-shadow:0 3px 8px #00000040}.slot .x svg{width:15px;height:15px}.drop-bar{background:var(--pink);pointer-events:none;z-index:3;border-radius:4px;width:7px;position:absolute;box-shadow:0 0 0 3px #ff4f8b40}.gauge{pointer-events:none;background:#7d7a9529;border-radius:5px;height:9px;margin-top:8px;position:sticky;bottom:0;overflow:hidden}.gauge i{background:#9a94b4;border-radius:5px;height:100%;transition:width .2s;display:block}.gauge.full i{background:var(--stop)}.dock{gap:12px;padding-bottom:8px;display:grid}.palette{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;display:grid}.pcard{aspect-ratio:1;min-height:var(--pcard);background:var(--c);color:#fff;box-shadow:0 8px 0 var(--cd), 0 12px 18px #3c280a29;cursor:grab;border-radius:24px;flex-direction:column;justify-content:center;align-items:center;gap:6px;transition:transform 80ms,box-shadow 80ms;display:flex;position:relative}.pcard svg{width:62%;height:auto;max-height:68%}.pcard:active{box-shadow:0 3px 0 var(--cd), 0 6px 10px #3c280a29;transform:translateY(5px)}.pcard:disabled{opacity:.45}.actions{align-items:center;gap:12px;display:flex}.tool{background:var(--paper);width:68px;height:68px;color:var(--ink);box-shadow:0 6px 0 var(--line), inset 0 0 0 3px var(--line);border-radius:22px;flex:none;place-items:center;transition:transform 80ms;display:grid;position:relative}.tool svg:not(.ring){width:38px;height:38px}.tool:disabled{opacity:.4}.tool:active:not(:disabled){box-shadow:0 2px 0 var(--line), inset 0 0 0 3px var(--line);transform:translateY(4px)}.tool.eraser.ready{box-shadow:0 6px 0 #f5a3a3, inset 0 0 0 4px var(--stop);background:#ffe1e1;transform:scale(1.12)}.tool .ring{pointer-events:none;width:calc(100% + 8px);height:calc(100% + 8px);position:absolute;inset:-4px;transform:rotate(-90deg)}.tool .ring circle{fill:none;stroke:var(--stop);stroke-width:7px;stroke-linecap:round;stroke-dasharray:283;stroke-dashoffset:283px}.tool.holding .ring circle{animation:linear forwards fill}.tool.holding{background:#fff0f0}.go{background:var(--go);color:#fff;min-width:0;height:76px;box-shadow:0 8px 0 var(--go-d), 0 12px 20px #0f8a444d;letter-spacing:.01em;border-radius:38px;flex:1;justify-content:center;align-items:center;gap:10px;font-size:clamp(20px,3.4vmin,28px);font-weight:900;transition:transform 80ms,box-shadow 80ms;display:flex}.go svg{flex:none;width:46px;height:46px}.go:active{box-shadow:0 3px 0 var(--go-d);transform:translateY(5px)}.go.ready{animation:1.8s ease-in-out infinite breathe}.go.stop{background:var(--stop);box-shadow:0 8px 0 var(--stop-d), 0 12px 20px #b91c1c4d}.app.running .palette{opacity:.4;pointer-events:none}.ghost{z-index:60;width:var(--card);height:var(--card);pointer-events:none;filter:drop-shadow(0 12px 14px #2814004d);position:fixed;transform:translate(-50%,-62%)rotate(-5deg)scale(1.14)}.ghost.over-eraser{opacity:.7;transform:translate(-50%,-62%)rotate(8deg)scale(.7)}.panel-back{z-index:80;background:#2a2b4480;justify-content:center;align-items:flex-end;animation:.2s fade;display:flex;position:fixed;inset:0}.panel{background:var(--paper);width:min(680px,100%);max-height:90dvh;padding:18px 20px calc(24px + env(safe-area-inset-bottom));-webkit-user-select:text;user-select:text;border-radius:28px 28px 0 0;animation:.25s ease-out rise;overflow-y:auto}@media (width>=720px){.panel-back{align-items:center}.panel{border-radius:28px}}.panel header{justify-content:space-between;align-items:center;display:flex}.panel h2{margin:0;font-size:24px;font-weight:900}.panel h3{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:22px 0 8px;font-size:14px;font-weight:900}.panel .close{background:#f3f0fa;border-radius:50%;place-items:center;width:44px;height:44px;display:grid}.panel .close svg{width:16px;height:16px}.rows{gap:12px;margin-top:12px;display:grid}.row{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.row label{font-weight:800}.seg-ctl{background:#f3f0fa;border-radius:14px;flex-wrap:wrap;gap:2px;padding:4px;display:inline-flex}.seg-ctl button{border-radius:10px;padding:9px 14px;font-size:14px;font-weight:800}.seg-ctl button.on{background:var(--ink);color:#fff}.examples{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;display:grid}.examples button{text-align:left;background:#faf7ff;border:2px solid #ece6f8;border-radius:16px;gap:6px;padding:10px;display:grid}.examples button:active{background:#efe8fb}.examples .mini{flex-wrap:wrap;gap:3px;display:flex}.examples .mini span{background:var(--c);color:#fff;border-radius:6px;place-items:center;width:20px;height:20px;display:grid}.examples .mini svg{width:70%;height:70%}.examples b{font-size:14px}.facts{grid-template-columns:auto 1fr;gap:6px 14px;margin:0 0 10px;font-size:14px;display:grid}.facts dt{color:var(--muted);font-weight:800}.facts dd{word-break:break-all;margin:0;font-weight:700}.plain{background:#f3f0fa;border-radius:12px;padding:9px 14px;font-size:14px;font-weight:800}.script-actions{flex-wrap:wrap;gap:8px;display:flex}.script{color:#e8e8ff;white-space:pre;background:#1f2038;border-radius:14px;max-height:280px;margin:10px 0 0;padding:12px;font:12px/1.45 ui-monospace,SF Mono,Menlo,monospace;overflow:auto}.warn{background:#fff4d6;border-radius:14px;margin:0 0 10px;padding:12px 14px;font-size:14px}.nobt{color:var(--ink);background:#fff0ee;border:3px solid #ef4444;border-radius:20px;align-items:flex-start;gap:14px;margin:14px 0 6px;padding:16px;display:flex}.nobt-icon{background:#fff;border-radius:16px;flex:none;place-items:center;width:52px;height:52px;display:grid}.nobt-icon svg{width:36px;height:36px}.nobt b{font-size:18px;font-weight:900;line-height:1.25;display:block}.nobt p{margin:6px 0 12px;font-size:16px;line-height:1.4}.nobt-link{background:var(--ink);color:#fff;border-radius:14px;padding:12px 18px;font-weight:900;text-decoration:none;display:inline-block}.panel p.hint{color:var(--muted);margin:0 0 8px;font-size:14px}.about{color:var(--muted);margin:16px 0 0;font-size:13px;line-height:1.45}.sr-only{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.tool.wobble{animation:.45s shake}@keyframes pop{0%{opacity:0;transform:translate(-50%)scale(.7)}to{opacity:1;transform:translate(-50%)scale(1)}}@keyframes fade{0%{opacity:0}to{opacity:1}}@keyframes rise{0%{opacity:.5;transform:translateY(40px)}to{opacity:1;transform:none}}@keyframes wave{0%,to{opacity:.25}40%{opacity:1}}@keyframes blink{50%{opacity:.3}}@keyframes throb{to{transform:scale(1.15)}}@keyframes hop{0%,60%,to{transform:translateY(0)}30%{transform:translateY(-9px)}}@keyframes bounce{0%,to{transform:translateY(-4px)}50%{transform:translateY(8px)}}@keyframes march{to{stroke-dashoffset:-.38px}}@keyframes wiggle{0%,to{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}@keyframes breathe{0%,to{transform:scale(1)}50%{transform:scale(1.035)}}@keyframes shake{0%,to{transform:translate(0)}20%{transform:translate(-9px)}40%{transform:translate(8px)}60%{transform:translate(-6px)}80%{transform:translate(4px)}}@keyframes fill{to{stroke-dashoffset:0}}@keyframes arrive{0%{transform:scale(1)}40%{transform:scale(1.22)}to{transform:scale(1)}}.avatar.arrive{animation:.4s ease-out arrive}@keyframes burst{0%{opacity:1;transform:translate(-50%,-50%)scale(.2)rotate(0)}to{transform:translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(200deg);opacity:0}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition:none!important;animation-duration:1ms!important;animation-iteration-count:1!important}}@media (width<=520px){.robot-btn{padding:0 12px}.board{gap:10px;padding-bottom:10px}.stage{margin:4px}.tool{border-radius:20px;width:60px;height:60px}.go{height:66px}}@media (height<=520px){:root{--card:50px;--pcard:58px}.pcard{aspect-ratio:auto;min-height:58px;box-shadow:0 5px 0 var(--cd);border-radius:18px}.go{height:58px}.tool{width:54px;height:54px}.top{padding-top:6px;padding-bottom:6px}.robot-btn{height:42px}}.confirm-back{z-index:70;position:fixed;inset:0}.confirm{top:calc(max(10px, env(safe-area-inset-top)) + 64px);right:max(14px, env(safe-area-inset-right));box-shadow:0 6px 0 var(--line), 0 16px 34px #3c280a47;transform-origin:100% 0;background:#fff;border-radius:26px;justify-items:center;gap:12px;padding:14px 16px;animation:.22s cubic-bezier(.2,1.4,.4,1) pop2;display:grid;position:absolute}.confirm .change{color:var(--ink);align-items:center;gap:8px;display:flex}.confirm .change .conn-icon{width:54px;height:54px;overflow:visible}.confirm .change>svg:not(.conn-icon){width:26px;height:26px;color:var(--muted)}.confirm .choices{gap:14px;display:flex}.confirm .choices button{color:#fff;border-radius:22px;place-items:center;width:76px;height:64px;display:grid}.confirm .choices svg{width:34px;height:34px}.confirm .no{background:#8d89a6;box-shadow:0 6px #6a6684}.confirm .yes{background:var(--go);box-shadow:0 6px 0 var(--go-d)}.confirm .choices button:active{box-shadow:none;transform:translateY(4px)}@keyframes pop2{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}.crash{background:var(--bg);place-content:center;justify-items:center;gap:28px;height:100dvh;display:grid}.crash .sign svg{width:110px;height:110px}.crash .again{background:var(--go);color:#fff;width:120px;height:120px;box-shadow:0 8px 0 var(--go-d);border-radius:50%;place-items:center;display:grid}.crash .again svg{width:64px;height:64px}
