.robot-game{--rg-ink:#333348;--rg-muted:#77748b;--rg-purple:#8061bd;--rg-mint:#c5edda;--rg-line:#e7e3ec;color:var(--rg-ink);font:inherit;width:100%;isolation:isolate}.robot-game *{box-sizing:border-box}.robot-game button,.robot-game select,.robot-game input{font:inherit}.robot-game button,.robot-game select{cursor:pointer}.robot-game button{touch-action:manipulation}.robot-game button:focus-visible,.robot-game select:focus-visible,.robot-game input:focus-visible,.robot-game summary:focus-visible{outline:3px solid #b393e8;outline-offset:3px}.robot-game button:disabled{cursor:default;opacity:.5}.robot-game .robot-mission{display:flex;gap:18px;align-items:center;justify-content:space-between;margin-bottom:22px}.robot-game .robot-eyebrow{font-size:10px;letter-spacing:.13em;font-weight:800;color:var(--rg-purple)}.robot-game h3{font-size:clamp(21px,2.5vw,30px);letter-spacing:-.035em;margin:6px 0 7px;font-weight:800}.robot-game .robot-mission p{font-size:13px;line-height:1.65;color:var(--rg-muted);margin:0;max-width:540px}.robot-game .robot-mode-badge{background:#f0eafa;color:#7154a8;white-space:nowrap;border-radius:30px;padding:10px 15px;font-size:11px;font-weight:700}.robot-game .robot-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,1fr);gap:24px;align-items:start}.robot-game .robot-stage{background:#f6f5ef;border:1px solid #eae7dc;border-radius:24px;padding:17px;overflow:hidden}.robot-game .robot-stage-top{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:12px;min-height:30px}.robot-game .robot-board-caption{font-size:10px;font-weight:700;color:#8b887c}.robot-game .robot-map-tabs{display:flex;gap:4px}.robot-game .robot-map-tabs button{border:0;background:transparent;border-radius:8px;padding:6px 9px;color:#9a95a9;font-size:10px;font-weight:700}.robot-game .robot-map-tabs button.active{background:white;color:#7354ab;box-shadow:0 2px 8px #6956480c}.robot-game .robot-map-wrap{padding:8px;background:#eeece4;border-radius:18px;max-width:430px;margin:auto}.robot-game .robot-map{display:grid;grid-template-columns:repeat(var(--cols),1fr);position:relative;width:100%;aspect-ratio:var(--cols)/var(--rows)}.robot-game .robot-cell{position:relative;min-width:0;aspect-ratio:1;padding:3px;display:grid;place-items:center}.robot-game .robot-cell:before{position:absolute;content:"";inset:3px;border-radius:11px;background:#fcfbf5;box-shadow:0 2px 1px #c8c5bb30;transition:background .25s}.robot-game .robot-cell.is-wall:before{background:#d7d5cf;box-shadow:inset 0 1px 2px #aaa89c0c,0 2px 0 #c3c1bb}.robot-game .robot-cell.is-wall>span{position:relative;color:#c3c1b8;font-size:15px;transform:rotate(15deg)}.robot-game .robot-cell.is-start:before{background:#c6e7d6;border:1px dashed #9ac8ad}.robot-game .robot-cell.is-goal:before{background:#f9e4ab}.robot-game .robot-cell.is-visited:not(.is-goal):not(.is-start):before{background:#e0d5f2}.robot-game .robot-cell.is-visited:not(.is-goal):not(.is-start):after{content:"";position:absolute;width:7px;height:7px;border-radius:50%;background:#aa8ccd;opacity:.5}.robot-game .robot-cell>svg{width:80%;position:relative;z-index:1;filter:drop-shadow(0 2px 1px #0000000b);animation:rg-flag-float 3s ease-in-out infinite}.robot-game .robot-start-marker{width:11px;height:11px;border:2px solid #72ac8e;z-index:1;border-radius:50%;opacity:.6}.robot-game .robot-avatar{position:absolute;z-index:3;width:calc(100% / var(--cols));height:calc(100% / var(--rows));left:calc(var(--x) * 100% / var(--cols));top:calc(var(--y) * 100% / var(--rows));display:grid;place-items:center;transition:left .25s cubic-bezier(.22,.8,.3,1),top .25s cubic-bezier(.22,.8,.3,1);pointer-events:none}.robot-game .robot-avatar-body{position:absolute;width:90%;height:90%;animation:rg-robot-breathe 2.6s ease-in-out infinite;filter:drop-shadow(0 5px 3px #4d33752b)}.robot-game .robot-avatar-body svg{width:100%;height:100%;overflow:visible}.robot-game .robot-avatar-shadow{position:absolute;bottom:10%;width:57%;height:13%;background:#4b3166;opacity:.14;filter:blur(2px);border-radius:50%}.robot-game .robot-heading-arrow{position:absolute;top:0;right:0;width:19px;height:19px;display:grid;place-items:center;border-radius:50%;background:white;box-shadow:0 1px 5px #58456b22;font-size:14px;font-weight:900;color:#8360b7;transform:rotate(var(--heading));transition:transform .25s}.robot-game .robot-avatar.is-bumped .robot-avatar-body{animation:rg-bump .4s ease-in-out 2}.robot-game .robot-stage-footer{display:flex;gap:15px;align-items:center;margin:14px 3px 15px;font-size:10px;color:#8c887d}.robot-game .robot-stage-footer>span{display:flex;align-items:center;gap:5px}.robot-game .robot-stage-footer>span:last-child{margin-left:auto;font-weight:800;color:#77736c}.robot-game .robot-legend-dot,.robot-game .robot-legend-goal{display:inline-block;width:8px;height:8px;border-radius:3px;background:#b4d9c2}.robot-game .robot-legend-goal{background:#ecc468}.robot-game .robot-status{border-radius:13px;background:#fffef9;display:flex;gap:9px;align-items:flex-start;padding:12px 13px;color:#837c70;font-size:12px;line-height:1.6;min-height:64px}.robot-game .robot-status-icon{color:#a38ac8;font-size:15px;font-weight:800;flex:0 0 16px}.robot-game .robot-status.is-error{background:#fff0e4;color:#9a664c}.robot-game .robot-status.is-error .robot-status-icon{color:#c68a63}.robot-game .robot-status.is-success{background:#e2f2e4;color:#477452}.robot-game .robot-status.is-success .robot-status-icon{color:#578c5d}.robot-game .robot-editor{padding:2px 0}.robot-game .robot-editor-heading,.robot-game .robot-program-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 11px}.robot-game h4{margin:0;font-size:13px;font-weight:800}.robot-game .robot-editor-heading>span{font-size:10px;color:var(--rg-muted)}.robot-game .robot-command-controls{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:13px}.robot-game .robot-command{border:1px solid #e7def1;background:#f4effa;color:#7755a6;border-radius:13px;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:67px;padding:7px 5px;gap:4px;transition:transform .2s,box-shadow .2s,background .2s;font-size:10px;font-weight:750}.robot-game .robot-command>span:first-child{font-size:22px;line-height:1}.robot-game .robot-command:hover:not(:disabled){transform:translateY(-3px);background:#ebe1f7;box-shadow:0 5px 0 #ddd0ec}.robot-game .robot-command:active:not(:disabled){transform:translateY(1px);box-shadow:none}.robot-game .relative-controls{grid-template-columns:repeat(3,1fr)}.robot-game .robot-command-safe{grid-column:1/-1;background:#e7f4ec;border-color:#d1e8d8;color:#58876a;flex-direction:row;min-height:58px;gap:12px;text-align:left}.robot-game .robot-command-safe:hover:not(:disabled){background:#dcf0e3;box-shadow:0 5px 0 #cde4d4}.robot-game .robot-command-safe small{font-size:10px;font-weight:500;color:#729580}.robot-game .robot-repeat-controls{padding:12px;border:1px solid #e9e1d3;background:#fcf8ee;border-radius:14px;margin-bottom:18px}.robot-game .robot-repeat-controls>div:first-child{display:flex;align-items:center;gap:7px;margin-bottom:8px;font-size:11px;color:#a18248}.robot-game .robot-repeat-mark{font-size:17px;line-height:1}.robot-game .robot-repeat-fields{display:flex;align-items:end;gap:7px}.robot-game .robot-repeat-fields label{display:flex;flex-direction:column;gap:4px;min-width:0}.robot-game .robot-repeat-fields label>span{font-size:9px;color:#a39476}.robot-game .robot-repeat-fields input,.robot-game .robot-repeat-fields select{border:1px solid #e9e0ce;border-radius:8px;padding:7px;background:#fffefa;color:#756a54;height:34px;font-size:11px;min-width:0}.robot-game .robot-repeat-fields input{width:54px}.robot-game .robot-repeat-action{flex:1}.robot-game .robot-repeat-action select{width:100%}.robot-game .robot-repeat-add{border:0;background:#ecdfbf;color:#8b7137;border-radius:9px;width:35px;height:34px;font-size:21px;flex-shrink:0}.robot-game .robot-repeat-add:hover:not(:disabled){background:#e3d09f}.robot-game .robot-program-heading{margin:17px 0 9px}.robot-game [data-cost]{font-size:10px;background:#f3f0f8;color:#9685b3;border-radius:20px;padding:4px 8px;font-weight:750}.robot-game [data-cost].over-budget{color:#af705c;background:#fae7df}.robot-game .robot-program{display:flex;flex-direction:column;gap:6px;list-style:none;margin:0;padding:10px;min-height:155px;max-height:266px;overflow:auto;background:#faf9fc;border:1px dashed #dfd8e9;border-radius:14px;scrollbar-width:thin;scrollbar-color:#cbbddf transparent}.robot-game .robot-program-card{display:flex;align-items:center;gap:9px;min-height:36px;padding:5px 8px;background:#f0eafa;border:1px solid #e5dbf2;border-radius:9px;position:relative;animation:rg-card-in .2s ease-out;color:#77569f;font-size:11px;flex-shrink:0;transition:background .2s,border-color .2s,box-shadow .2s}.robot-game .robot-program-card.is-repeat{background:#faf1dc;border-color:#ecdfbf;color:#9c7b39}.robot-game .robot-program-card.is-condition{background:#e8f2e9;border-color:#d5e5d7;color:#598265}.robot-game .robot-program-card.is-active{border-color:#9672c9;box-shadow:0 0 0 2px #c6ade55c;background:#e8daf9}.robot-game .robot-card-index{font-size:9px;opacity:.6;min-width:12px}.robot-game .robot-card-symbol{font-size:17px;width:16px;flex-shrink:0}.robot-game .robot-card-title{flex:1;font-weight:650;line-height:1.4}.robot-game .robot-program-card button{border:0;background:transparent;width:27px;height:27px;border-radius:6px;font-size:18px;color:inherit;opacity:.55;flex-shrink:0}.robot-game .robot-program-card button:hover:not(:disabled){background:#ffffff90;opacity:1}.robot-game .robot-empty-program{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#a69aB7;min-height:132px;gap:5px;text-align:center;font-size:10px;width:100%}.robot-game .robot-empty-program>span:first-child{font-size:37px;line-height:1;color:#c5b4da;margin-bottom:3px}.robot-game .robot-empty-program strong{font-size:11px;font-weight:600}.robot-game .robot-program-help{font-size:10px;color:#9a91a6;line-height:1.5;margin:7px 1px 10px}.robot-game .robot-edit-tools{display:flex;gap:6px;align-items:center;justify-content:flex-end;margin-bottom:13px}.robot-game .robot-edit-tools button{font-size:10px;padding:6px 9px;background:transparent;color:#8e829f;border:1px solid #ede8f3;border-radius:8px}.robot-game .robot-edit-tools button:first-child{margin-right:auto}.robot-game .robot-edit-tools button:hover:not(:disabled){background:#f4f0f8}.robot-game .robot-run-row{display:flex;gap:12px;align-items:center}.robot-game .robot-run{border:0;background:#7e5ab9;color:#fff;border-radius:12px;min-height:45px;padding:11px 17px;flex:1;font-size:12px;font-weight:750;box-shadow:0 4px 0 #634192;display:flex;align-items:center;justify-content:center;gap:9px;transition:transform .2s,box-shadow .2s}.robot-game .robot-run:hover:not(:disabled){background:#8a64c6;transform:translateY(-2px);box-shadow:0 6px 0 #634192}.robot-game .robot-run:active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 #634192}.robot-game .robot-run:disabled{opacity:.8}.robot-game .robot-speed{display:flex;flex-direction:column;gap:3px;font-size:9px;color:#9c91aa}.robot-game .robot-speed select{background:#faf8fc;border:1px solid #e9e3f0;border-radius:7px;padding:6px 5px;font-size:10px;color:#8c7c9e;width:68px}.robot-game .robot-running-dot{width:7px;height:7px;border-radius:50%;background:#e6d8fb;animation:rg-status-pulse .8s ease-in-out infinite}.robot-game .robot-hint{margin-top:19px;border-top:1px solid #eee9f3;padding-top:15px;font-size:12px;color:#8a779f}.robot-game .robot-hint summary{cursor:pointer;font-weight:650;list-style:none;width:fit-content;transition:color .2s}.robot-game .robot-hint summary::-webkit-details-marker{display:none}.robot-game .robot-hint summary:hover{color:#6e4b9e}.robot-game .robot-hint p{line-height:1.8;background:#fbf7eb;padding:13px 16px;border-radius:12px;color:#9a8459;margin:11px 0 0;font-size:12px;animation:rg-card-in .25s ease-out}.robot-game .robot-success{margin-top:16px;display:flex;gap:16px;align-items:center;border:1px solid #c7e6d3;background:#edf8ef;border-radius:17px;padding:17px 20px;animation:rg-card-in .4s ease-out}.robot-game .robot-success[hidden]{display:none}.robot-game .robot-success-orbit{width:44px;height:44px;flex-shrink:0;border-radius:15px;background:#d3eacb;display:grid;place-items:center;color:#699b66;font-size:27px;animation:rg-flag-float 2.5s ease-in-out infinite}.robot-game .robot-success strong{font-size:14px;color:#4e7e58}.robot-game .robot-success p{font-size:12px;line-height:1.6;color:#7d9a7e;margin:3px 0 0}@keyframes rg-robot-breathe{0%,100%{transform:translateY(1px)}50%{transform:translateY(-2px)}}@keyframes rg-flag-float{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-2px) rotate(3deg)}}@keyframes rg-bump{0%,100%{transform:translateX(0) rotate(0)}25%{transform:translateX(-4px) rotate(-8deg)}75%{transform:translateX(4px) rotate(8deg)}}@keyframes rg-card-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}@keyframes rg-status-pulse{0%,100%{opacity:.3;transform:scale(.8)}50%{opacity:1;transform:scale(1.2)}}@media(max-width:760px){.robot-game .robot-workspace{grid-template-columns:1fr;gap:23px}.robot-game .robot-stage{max-width:500px;width:100%;margin:auto}.robot-game .robot-mission{align-items:flex-start;gap:10px}.robot-game .robot-mode-badge{font-size:9px;padding:8px 10px}.robot-game .robot-mission p{font-size:12px}.robot-game .robot-map-wrap{max-width:350px}.robot-game .robot-program{max-height:220px}.robot-game .robot-command{min-height:61px}}@media(max-width:400px){.robot-game .robot-mode-badge{display:none}.robot-game .robot-stage{padding:11px}.robot-game .robot-stage-top{flex-wrap:wrap}.robot-game .robot-map-wrap{padding:4px}.robot-game .robot-cell:before{inset:2px;border-radius:7px}.robot-game .robot-cell{padding:2px}.robot-game .robot-heading-arrow{width:14px;height:14px;font-size:11px}.robot-game .robot-stage-footer{gap:9px}.robot-game .robot-edit-tools{gap:4px}.robot-game .robot-edit-tools button{padding:6px;font-size:9px}}@media(prefers-reduced-motion:reduce){.robot-game *,.robot-game *:before,.robot-game *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.robot-game .robot-card-tools{display:flex;align-items:center;flex-shrink:0;gap:0}.robot-game .robot-card-tools button{width:22px;height:25px;font-size:15px;padding:0}.robot-game .robot-card-tools button:disabled{opacity:.18}.robot-game .robot-program-card{gap:7px}.robot-game .robot-card-tools button:last-child{font-size:18px}
