:root{color-scheme:light;--ink:#293a3d;--muted:#67787a;--line:#ced7d5;--action:#347d59;--flow:#c38129;--sensor:#ab8b2d;--data:#ac5368;--paper:#f4f6f3}*{box-sizing:border-box}body{margin:0;background:#edf0ed;color:var(--ink);font:14px/1.5 -apple-system,BlinkMacSystemFont,"Noto Sans CJK JP","Yu Gothic",sans-serif}button,input,select{font:inherit;color:inherit}button,select{cursor:pointer}button{background:white;border:1px solid #c4cfcb;border-radius:6px;min-height:44px;padding:7px 12px;font-weight:600}button:hover{background:#edf4ee;border-color:#8aab97}button:disabled{cursor:default;opacity:.45}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #346fa5;outline-offset:2px}input[type=number],input[type=text],select{border:1px solid #c2cfca;border-radius:4px;background:white;min-height:36px;padding:5px 7px;max-width:100%}input[type=checkbox]{width:18px;height:18px;accent-color:#317557}button svg{width:22px;height:22px;vertical-align:middle;flex-shrink:0}[hidden]{display:none!important}.brand{background:#25383c;color:white;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:10px 24px;letter-spacing:.04em}.brand b{font-weight:500;margin-left:24px;color:#dce7df}.brand-mark{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;background:#c8dcab;color:#25383c;border-radius:8px;font-weight:800;margin-right:8px}.preview-badge{font-size:11px;white-space:nowrap;color:#d5dfd7;border:1px solid #587067;border-radius:5px;padding:4px 8px}.page-tabs{display:flex;gap:6px;padding:8px 24px 0;background:#f8faf7;border-bottom:1px solid var(--line)}.page-tabs button{border:0;background:transparent;border-bottom:3px solid transparent;border-radius:0;padding:9px 15px}.page-tabs button[aria-selected=true]{border-color:#357c58;color:#276241}.page-tabs small{font-weight:400;color:#77847d;margin-left:8px}.page-tabs #guide-toggle{margin-left:auto;font-size:12px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:15px 24px}.preset-label{font-size:11px;color:var(--muted);display:flex;flex-direction:column;gap:3px}.preset-label select{font-size:14px;min-width:244px;font-weight:650}.toolbar-actions{display:flex;gap:7px;align-items:center}.toolbar-actions button{display:flex;align-items:center;gap:6px;font-size:13px}.primary{background:#2c704e;color:white;border-color:#2c704e}.primary:hover{background:#245b41;color:white}.danger{color:#9e3b36}.studio-layout{display:grid;grid-template-columns:minmax(0,1fr) 282px;gap:16px;margin:0 24px;align-items:start}.editor-panel{border:1px solid #c3cfca;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 6px 28px #314e3a08}.canvas-toolbar{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-bottom:1px solid #e0e6e1;gap:10px}.canvas-toolbar b{font-size:13px}.state-badge{font-size:10px;margin-left:10px;padding:3px 6px;background:#edf0eb;color:#617064;border-radius:4px}.state-badge.synced{background:#e4f0e5;color:#347245}.edit-tools{display:flex;gap:5px}.edit-tools button{font-size:11px;min-height:36px;padding:4px 9px}.legend{display:flex;flex-wrap:wrap;gap:14px;font-size:10px;color:#62736b;padding:9px 14px;background:#fafbf8}.legend span{display:flex;align-items:center;gap:4px}.legend b{font-size:9px}.wire-swatch{display:inline-block;width:21px;border-top:3px solid #91a19d}.wire-swatch.numeric{border-color:#b88710}.wire-swatch.boolean{border-color:#3877ab}.scroll-note{margin-left:auto;color:#7e8982}#canvas-scroll{position:relative;overflow:auto;height:556px;background-color:#fcfdfb;background-image:radial-gradient(#d9e0da .7px,transparent .7px);background-size:16px 16px;scrollbar-color:#aebeb2 #edf2ec;overscroll-behavior:contain;touch-action:pan-x pan-y}#canvas-content{position:relative;min-height:100%;width:max-content;min-width:100%;padding:38px 36px 62px 24px}#wires{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:1}#diagram{position:relative;z-index:2;display:flex;align-items:flex-start;gap:60px}#start-block{width:66px;height:78px;flex-shrink:0;margin-top:62px;background:linear-gradient(#fff,#e2e8df);border:2px solid #92a49a;border-top:8px solid #779b64;border-radius:16px 16px 12px 12px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#32784e;font-size:10px;font-weight:700;box-shadow:0 3px 0 #d5ded5}#start-block svg{width:36px;height:36px}.lanes{display:flex;flex-direction:column;gap:60px}.lane{position:relative}.lane-title{display:flex;gap:10px;align-items:center;font-size:10px;color:#637568;margin-bottom:18px;letter-spacing:.06em}.lane-title b{background:#e7ede4;padding:3px 7px;border-radius:3px;color:#566c57}.lane-title button{min-height:28px;font-size:10px;padding:2px 7px;background:transparent}.sequence{display:flex;align-items:center;position:relative;min-height:144px;width:max-content;min-width:72px;gap:0}.insert{width:32px;min-width:32px;align-self:stretch;position:relative;display:flex;align-items:center;justify-content:center;margin:0 2px}.insert button{min-height:32px;width:30px;padding:0;background:#fbfdf9;border:1px dashed #a5b9a8;color:#879d88;font-weight:400;font-size:18px;border-radius:50%;z-index:2;opacity:.7}.insert.target button,.insert.hover button{background:#e5f2df;border:2px solid #477a4d;color:#35683d;opacity:1;box-shadow:0 0 0 4px #a9c99330}.insert:hover button{opacity:1}.node{--cat:var(--action);position:relative;flex-shrink:0;isolation:isolate}.node.selected{filter:drop-shadow(0 0 3px #4a83ad80)}.block{width:132px;border:1.5px solid #9eafa6;border-top:7px solid var(--cat);border-radius:7px 7px 9px 9px;background:linear-gradient(#fff 10%,#edf1eb 100%);box-shadow:0 3px 0 #d6dfd5;position:relative}.node.cat-flow{--cat:var(--flow)}.node.cat-sensor{--cat:var(--sensor)}.node.cat-data{--cat:var(--data)}.block-head{height:26px;display:flex;justify-content:space-between;gap:4px;align-items:center;padding:2px 7px;font-size:10px}.block-head b{font-weight:600}.block-head .bid{font:9px ui-monospace,monospace;color:#7d8c82}.block-main{height:44px;display:flex;align-items:center;justify-content:center;gap:6px}.block-main svg{width:36px;height:36px;color:#384b45}.block-main .port-select{font-size:10px;width:44px;min-height:30px;padding:3px;color:#526859}.params{border-top:1px solid #cdd7cc;display:flex;align-items:center;gap:3px;padding:5px;background:#e5ebe1;border-radius:0 0 7px 7px;font-size:10px;min-height:48px}.params input[type=number]{width:50px;font-size:13px;font-weight:650;text-align:center;padding:4px 1px;min-height:36px}.params input[type=text]{width:112px;font-size:11px;padding:5px;min-height:36px}.params select{min-width:0;font-size:10px;padding:4px;min-height:36px;flex:1}.params .unit{font-size:10px;white-space:nowrap}.block.extra .params{flex-wrap:wrap}.block.extra .params .wide{width:100%;flex:auto}.node-handle{position:absolute;inset:0;z-index:-1}.select-block{position:absolute;left:0;right:0;top:0;height:76px;border:0;border-radius:0;background:transparent;z-index:0;min-height:0;cursor:grab;padding:0}.select-block:hover{background:#e7f1e02b}.block-head,.block-main{position:relative;pointer-events:none}.block-main select{pointer-events:auto;position:relative;z-index:2}.seq-in,.seq-out{position:absolute;top:54px;width:11px;height:11px;border:2px solid #8d9f98;background:#edf4ed;border-radius:4px;z-index:3}.seq-in{left:-7px}.seq-out{right:-7px}.node.selected>.block,.node.selected>.container{outline:2px solid #417daa;outline-offset:4px}.node.active>.block,.node.active>.container{outline:3px solid #43a762;outline-offset:3px}.node.failed>.block,.node.failed>.container{outline:3px solid #b44d42;outline-offset:4px}.running-label{display:none;position:absolute;top:-27px;left:5px;background:#2a7b48;border-radius:4px;color:white;padding:2px 5px;font-size:9px;white-space:nowrap;z-index:10}.node.active>.running-label{display:block}.node.failed>.running-label{display:block;background:#b44d42}.data-port{position:absolute;bottom:-20px;border:1px solid #a57e1d;border-radius:4px;color:#855e00;background:#fff9e4;font:700 10px ui-monospace,monospace;min-height:28px;height:28px;min-width:34px;padding:0 4px;z-index:6}.data-port.out{right:5px}.data-port.in{left:5px}.data-port.logic{color:#2d618a;background:#eef5fc;border-color:#678eaf}.data-port.armed{outline:3px solid #ca9b33}.data-port.connected{box-shadow:0 2px 0 currentColor}.data-port:disabled{opacity:1}.value-tag{position:absolute;bottom:-40px;right:5px;font:10px ui-monospace,monospace;color:#8d6612;background:#fffaf0;padding:1px 4px;white-space:nowrap}.container{border:3px solid #d79b40;border-radius:14px;position:relative;background:#fffdf8;box-shadow:0 3px 0 #e9e2d3;min-width:240px}.container-head{height:40px;background:linear-gradient(#fff4dd,#f8e5bf);border-radius:11px 11px 0 0;border-bottom:1px solid #e4c383;display:flex;gap:8px;align-items:center;padding:3px 12px;font-size:10px}.container-head button{background:transparent;border:0;min-height:30px;padding:0 5px;display:flex;align-items:center;gap:6px;font-size:11px}.container-head svg{width:22px;height:22px}.container-head small{color:#927545}.container-head select{min-height:30px;font-size:10px;max-width:100px;padding:3px}.container-head input{width:48px;min-height:30px;font-size:12px;text-align:center;padding:3px}.iteration{margin-left:auto;font-size:10px;color:#8b692a}.container-body{display:flex;align-items:stretch;padding:8px 8px 34px;gap:10px}.loop-end{border-left:1px solid #dfc691;min-width:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#aa7833;font-size:18px;padding-left:8px}.loop-end small{font-size:9px}.container>.seq-in,.container>.seq-out{top:calc(50% - 5px)}.switch-body{padding:0 8px 30px}.case-row{display:flex;align-items:center;min-height:166px;padding:8px 0 24px}.case-row+.case-row{border-top:1px dashed #d8c7aa}.case-label{align-self:stretch;width:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:#8d6a35;font-size:15px;border-right:1px solid #eadcc7;margin-right:7px}.case-row.chosen{background:#eef6e8;border-radius:5px}.case-row.chosen>.case-label{color:#357849;font-weight:800}.container .data-port.in{bottom:-17px}.container-footer{position:absolute;bottom:4px;left:15px;font-size:9px;color:#997843}.palette{background:#f1f4ee;border-top:1px solid #d3ddcf}.palette #category-tabs{display:flex;gap:4px;padding:8px 14px 0;border-bottom:1px solid #d4ded0}.palette #category-tabs button{min-height:35px;font-size:11px;padding:4px 10px;border:0;border-top:4px solid var(--tab-color);border-radius:5px 5px 0 0;background:transparent;color:#627164}.palette #category-tabs button[aria-selected=true]{background:#fff;color:#304934}.palette #palette-items{display:flex;gap:11px;padding:13px 16px;overflow-x:auto;min-height:98px}.palette-item{min-width:94px;min-height:76px;border:1px solid #bbcbbb;border-top:5px solid var(--tab-color);border-radius:6px;background:linear-gradient(#fff,#e2e9df);box-shadow:0 2px 0 #d1dccd;padding:5px 8px;font-size:10px;cursor:grab;touch-action:none;display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center}.palette-item svg{width:30px;height:30px;color:#435c4c}.palette-foot{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#6c806c;padding:0 16px 10px}#message{min-height:42px;padding:11px 15px;font-size:12px;background:#f3f7ef;border-top:1px solid #dce4d7;color:#4c684a}#message.error{background:#fff0ea;color:#983c34}.sidebar{display:grid;gap:12px}.sidebar>section{border:1px solid #c7d2c8;border-radius:9px;background:#fafcf8;padding:11px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;margin-bottom:8px}.panel-heading span{font-size:9px;color:#7b8b7b}.field{position:relative;aspect-ratio:1;background-color:#e7ede1;background-image:linear-gradient(to right,#c7d3c3 1px,transparent 1px),linear-gradient(to bottom,#c7d3c3 1px,transparent 1px);background-size:16.6667% 16.6667%;border:1px solid #c5d0bf;border-radius:4px;overflow:hidden;max-height:235px;margin:auto}.floor-label{position:absolute;left:33.333%;top:66.666%;width:16.666%;height:16.666%;background:#d8e6c8;color:#799269;font:8px ui-monospace,monospace;display:grid;place-items:center}#robot{position:absolute;width:14%;height:16%;transition:left .4s ease,top .4s ease,transform .32s ease;transform-origin:50% 55%;filter:drop-shadow(0 2px 2px #42524430)}#robot svg{width:100%;height:100%}.pose-readout{font:10px ui-monospace,monospace;text-align:center;color:#6c7e6a;margin-top:7px}.brick{background:#d5dfd3;border:1px solid #a8b8a6;border-radius:8px;padding:12px;box-shadow:inset 0 1px white}#brick-screen{min-height:62px;background:#becfae;border:3px solid #809274;border-radius:4px;display:grid;place-items:center;font:600 17px/1.4 ui-monospace,"Noto Sans CJK JP",monospace;color:#384c31;overflow-wrap:anywhere;padding:6px}.brick-bottom{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:9px}#brick-light{width:18px;height:18px;border:4px solid #afbaac;border-radius:50%;background:#dbe3d7}.brick-bottom button{min-height:34px;font-size:10px;padding:4px 9px;background:#e9eee5}#device-state{font-size:10px;color:#697d66;margin-top:7px}.mute{display:flex;gap:7px;align-items:center;font-size:11px;margin-top:7px}.sensors>label{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:11px;margin-top:9px}.port-tag{background:#e5eadf;border:1px solid #c9d3c1;border-radius:3px;padding:1px 5px;font:bold 10px ui-monospace,monospace}.sensors output{margin-left:auto;font:11px ui-monospace,monospace}.sensors input[type=range]{width:100%;height:25px;accent-color:#758c4e}.sensors #touch{min-height:34px;font-size:11px;margin-left:auto;padding:3px 8px}.sensors #touch[aria-pressed=true]{background:#dbeed5;border-color:#7aa269}.inspector p{font-size:11px;color:#71806a}.inspector .selected-title{display:flex;align-items:center;gap:8px;font-size:13px}.selected-title svg{width:30px;height:30px}.inspector .edit-buttons{display:flex;gap:5px;flex-wrap:wrap}.inspector button{font-size:10px;min-height:36px;padding:4px 7px}.inspector label{display:block;font-size:10px;margin-top:10px}.inspector select{width:100%;font-size:11px}.inspector .remove{color:#a04b3c}.app-footer{font-size:10px;color:#72826d;padding:17px 24px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}#guide{background:#f8fbf2;border:1px solid #c5d6bd;border-radius:8px;padding:18px 24px;margin:0 24px 16px;max-width:1024px}#guide h2{font-size:18px;margin:0 0 8px}#guide p,#guide li{font-size:12px;line-height:1.8}#guide ol{padding-left:24px}#beginner-frame{border:0;width:100%;height:calc(100vh - 115px);min-height:800px}#drag-ghost{position:fixed;z-index:100;pointer-events:none;padding:10px 16px;background:#e6efdd;border:2px solid #5d8853;border-radius:8px;box-shadow:0 8px 20px #21391e35;font-size:12px}body.dragging{user-select:none}body.dragging .palette-item{cursor:grabbing}.studio-layout.running .select-block{cursor:default}.node.active{opacity:1}@media(max-width:1100px){.studio-layout{grid-template-columns:1fr}.sidebar{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}.sidebar .inspector{grid-column:1/-1}.field{max-width:235px}.toolbar{flex-wrap:wrap}.scroll-note{display:none}#canvas-scroll{height:530px}.brand b{margin-left:12px}.toolbar-actions{margin-left:auto}.inspector .edit-buttons{display:inline-flex;margin:6px}.inspector p{margin:6px 0}.inspector label{display:inline-block;width:min(46%,340px);margin-right:10px}}@media(max-width:700px){.brand{padding:10px 12px}.brand b{display:none}.preview-badge{font-size:9px}.page-tabs{padding:5px 8px 0;gap:0}.page-tabs button{font-size:11px;padding:8px}.page-tabs small{display:none}.page-tabs #guide-toggle{font-size:10px}.toolbar{padding:12px}.toolbar-actions{margin:0;width:100%;flex-wrap:wrap}.toolbar-actions button{font-size:11px;padding:6px 8px}.toolbar-actions button svg{width:19px;height:19px}.preset-label{width:100%}.preset-label select{width:100%}.studio-layout{margin:0 10px;gap:12px}.sidebar{grid-template-columns:1fr 1fr;gap:8px}.sidebar .sensors{grid-column:1/-1}.sensors>label{display:inline-flex;width:31%;vertical-align:top;margin-right:1%}.sensors #touch{margin-left:0}.sidebar .inspector{grid-column:1/-1}.panel-heading span{display:none}.brick{padding:7px}#brick-screen{font-size:13px}.brick-bottom{gap:5px}.brick-bottom button{font-size:9px;padding:4px}.legend{font-size:9px;gap:9px}.canvas-toolbar{padding:8px}.edit-tools button{font-size:10px;padding:4px 7px}.edit-tools span{display:none}.state-badge{margin-left:6px}.canvas-toolbar b{font-size:11px}.palette #category-tabs{padding:7px 6px 0;gap:0}.palette #category-tabs button{font-size:10px;padding:4px 9px}.palette-foot{font-size:9px;padding:0 9px 9px}.palette-foot span:last-child{display:none}#canvas-scroll{height:500px}#guide{margin:0 10px 12px;padding:14px}.app-footer{padding:15px 12px}.app-footer span{display:none}}
@media(prefers-reduced-motion:reduce){#robot{transition:none}}
/* Wires overlay the container surfaces; endpoints stay clear of block controls. */
#wires{z-index:4}
.select-block{touch-action:none}
.edit-tools #zoom{min-height:36px;font-size:11px;width:70px;padding:4px}
@media(max-width:700px){.edit-tools #zoom{width:57px;font-size:10px}.canvas-toolbar{flex-wrap:wrap}}
.block.kind-S{width:158px}.block.kind-compare{width:168px}.params input{min-width:0}
/* v0.5: one viewport workbench, readable insertion targets, live course sensors. */
html,body{height:100%;overflow:hidden}body{display:flex;flex-direction:column;font-size:13px}.brand{min-height:44px;padding:6px 20px;flex-shrink:0}.brand-mark{width:27px;height:27px}.page-tabs{padding:0 16px;flex-shrink:0}.page-tabs button{min-height:42px;padding:7px 13px}#studio{display:flex;flex:1;min-height:0;flex-direction:column}.toolbar{flex-shrink:0;padding:9px 16px;gap:12px}.toolbar-actions{gap:6px}.toolbar-actions button{min-height:44px}.preset-label select{min-width:205px}.studio-layout{flex:1;min-height:0;grid-template-columns:minmax(0,1fr) clamp(290px,29vw,390px);align-items:stretch;margin:0 16px;gap:12px}.editor-panel{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative}.canvas-toolbar{min-height:48px;padding:5px 10px;flex-shrink:0}.canvas-toolbar select,.edit-tools button{min-height:38px}.legend{padding:5px 10px;min-height:27px;flex-shrink:0}#canvas-scroll{height:auto;flex:1;min-height:150px}#canvas-content{padding:35px 35px 60px 18px}#diagram{gap:20px}.lanes{gap:55px}#start-block{width:54px}.lane-title{margin-bottom:15px}.lane-title button{min-height:36px}.insert{width:48px;min-width:48px;margin:0 2px;min-height:100px}.insert button{min-height:44px;width:44px;font-size:24px;opacity:1;background:#f9fcf7;border-width:1.5px;color:#698467}.insert.target button{border-style:solid;box-shadow:0 0 0 4px #a9c99345}.insert.hover{background:#dfeeda99;border-radius:9px}.insert.hover button{background:#cfe5bc;border-style:solid}.sequence.empty{min-width:180px;min-height:130px}.sequence.empty>.insert{width:170px}.sequence.empty>.insert button{width:154px;height:68px;border-radius:9px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:23px}.insert .empty-label{font-size:12px}.sequence.drop-active{background:#ecf4e9;outline:2px dashed #8daf81;outline-offset:6px;border-radius:7px}.block{width:142px}.block-head{font-size:11px;height:28px}.block-head .bid{background:#edf1e9;border-radius:3px;padding:1px 4px}.block-main{height:46px}.select-block{height:78px}.params{min-height:51px;padding:5px 7px}.params input[type=number],.params input[type=text],.params select{min-height:40px}.params select{font-size:11px}.container-head{height:48px;padding:3px 8px}.container-head button{min-height:44px}.container-head input,.container-head select{min-height:38px}.container-head small{font-size:10px}.container-body{padding-top:10px}.node.selected>.block,.node.selected>.container{outline-width:3px;outline-offset:4px}.node.selected>.block::after{content:'えらんでいる';position:absolute;top:-30px;left:0;font-size:10px;color:#245b87;background:#e8f1fa;padding:1px 5px;border-radius:3px}.node.active>.block::after{display:none}.data-port{height:34px;min-height:34px;min-width:40px;bottom:-24px}.value-tag{bottom:-44px}.palette{flex-shrink:0}.palette-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:35px;padding:5px 10px;background:#e7eee1;font-size:11px}.palette-heading b{white-space:nowrap}.palette-heading #insert-label{color:#386034;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.palette #category-tabs{padding:0 8px;gap:2px}.palette #category-tabs button{min-height:38px;padding:5px 12px;font-size:12px}.palette #palette-items{padding:8px 10px;min-height:90px;gap:9px}.palette-item{min-width:96px;min-height:72px;font-size:11px;padding:4px 8px}.palette-item svg{width:30px;height:30px}#message{padding:7px 10px;min-height:34px;max-height:58px;overflow:auto;font-size:11px;flex-shrink:0}.inspector{border-top:1px solid #c9d7cf;background:#f1f6f8;padding:7px 10px;flex-shrink:0;max-height:134px;overflow:auto}.inspector.empty{min-height:42px;display:flex;align-items:center}.inspector p{margin:0;font-size:11px}.selection-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.selection-name{display:flex;align-items:center;gap:7px;min-width:0}.selection-name svg{width:25px;height:25px}.selection-name b{font-size:12px;white-space:nowrap}.selection-name small{font-size:10px;color:#677b7c}.inspector .edit-buttons{display:flex;gap:5px;flex-wrap:nowrap;margin:0}.inspector button{min-height:40px;font-size:11px;padding:6px 10px;white-space:nowrap}.inspector .edit-buttons button.remove{color:#a14738}.selection-options{display:flex;gap:8px;margin-top:5px}.inspector .selection-options label{display:flex;gap:5px;align-items:center;font-size:10px;flex:1;min-width:0;margin:0;width:auto}.inspector select{width:100%;min-width:0;min-height:38px;font-size:11px}.sidebar{display:flex;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain;gap:9px}.sidebar>section{padding:10px;border-radius:9px;flex-shrink:0}.panel-heading{margin-bottom:6px;font-size:12px}.panel-heading span{font-size:10px}.field{width:100%;max-height:none;max-width:none;background-color:#f9faf5;isolation:isolate}.floor-label{z-index:1;font-size:8px;background:transparent;pointer-events:none}.tile,.wall-tile{position:absolute;width:16.66667%;height:16.66667%;display:grid;place-items:center;font-size:10px}.tile.black{background:#354248}.tile.blue{background:#5692b4}.tile.yellow{background:#e4cb65}.wall-tile{background:repeating-linear-gradient(45deg,#9aa3a0 0 6px,#b7bfbb 6px 12px);border:3px solid #6f7e77;border-radius:5px;color:#263f38;font-weight:700;z-index:1}#robot{width:14%;height:15.95%;transform-origin:50% 50%;transition:left .44s linear,top .44s linear,transform .44s ease;z-index:3;filter:drop-shadow(0 2px 2px #24382e45)}#sensor-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:4;overflow:visible}#distance-ray{fill:none;stroke:#347ba9;stroke-width:4;stroke-dasharray:9 6}#distance-hit{fill:white;stroke:#347ba9;stroke-width:3}#color-spot{fill:#e56c5633;stroke:#d64c38;stroke-width:4}.field.manual #sensor-overlay{opacity:.22}.field.manual::after{content:'手でためす';position:absolute;left:7px;top:7px;z-index:5;background:#fff8df;padding:2px 6px;font-size:10px;border-radius:4px}.field.moving .treads{animation:tread .16s linear infinite alternate}.field.turning .treads{animation:tread .22s linear infinite alternate}.field.touching #bumper{fill:#df7949;stroke:#a34425}.field.collision{box-shadow:inset 0 0 0 3px #bd5346}.motion-caption{margin-top:7px;min-height:22px;font-size:12px;text-align:center;font-weight:650;color:#386b4d}.pose-readout{font-size:10px;margin-top:1px}.sensor-readings{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.sensor-readings>div{display:flex;flex-wrap:wrap;align-content:start;justify-content:center;align-items:center;gap:3px;background:#edf2e9;border:1px solid #d7e0d2;border-radius:6px;padding:7px 2px;text-align:center;font-size:10px}.sensor-readings strong{font:700 16px ui-monospace,sans-serif;display:block;width:100%;margin-top:3px}.sensor-readings #touch-live{font-size:11px;min-height:19px;padding-top:3px}.sensor-readings small{font-size:9px;color:#74806e;width:100%}.sensors .panel-heading select{min-height:36px;padding:3px 5px;font-size:11px}.sensors p{font-size:10px;color:#75816e;margin:5px 0 0}.sensors #manual-controls{margin-top:7px;border-top:1px solid #d8dfd0;padding-top:4px}.sensors #manual-controls label{display:flex;align-items:center;gap:6px;font-size:11px;flex-wrap:wrap;margin:3px 0}.sensors input[type=range]{height:30px;margin:0}.sensors #touch{min-height:40px}.brick{padding:8px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px}#brick-screen{min-height:62px;font-size:15px}.brick-bottom{margin:0;flex-direction:column;gap:4px}.brick-bottom button{min-height:40px;font-size:10px;padding:3px 6px}#device-state{font-size:10px;margin-top:5px}.mute{margin:0;font-size:10px}.app-footer{padding:5px 16px;font-size:9px;flex-shrink:0;min-height:24px}#guide{position:fixed;inset:80px 16px auto auto;width:min(600px,calc(100vw - 32px));max-height:calc(100dvh - 100px);overflow:auto;margin:0;z-index:30;box-shadow:0 12px 60px #122d4155;padding:20px}#beginner{flex:1;min-height:0}#beginner-frame{height:100%;min-height:0}#drag-ghost{max-width:260px;display:flex;gap:8px;align-items:center;font-weight:650}#drag-ghost small{font-weight:400;font-size:11px}#drag-ghost.ready{background:#d8ebcc;box-shadow:0 6px 20px #315d3c44}.drop-hint{font-size:10px;position:absolute;top:-24px;left:0;white-space:nowrap;background:#d8ebcc;color:#366635;padding:2px 6px;border-radius:3px;z-index:10}
@keyframes tread{from{transform:translateY(-1px)}to{transform:translateY(2px)}}
@media(max-width:1100px){.studio-layout{grid-template-columns:minmax(0,1fr) 270px;margin:0 10px;gap:9px}.sidebar{display:flex}.sidebar .inspector{grid-column:auto}.toolbar{flex-wrap:nowrap;padding:7px 10px}.toolbar-actions{margin-left:auto;gap:4px}.toolbar-actions button{font-size:11px;padding:6px 8px}.toolbar-actions button svg{width:20px;height:20px}.preset-label select{min-width:185px;font-size:12px}.canvas-toolbar{flex-wrap:wrap;gap:4px}.canvas-toolbar b{font-size:11px}.state-badge{margin-left:5px}.edit-tools{gap:3px}.edit-tools button{font-size:10px;padding:4px 7px}.edit-tools select{font-size:11px;padding:3px}.edit-tools span{display:none}.inspector .edit-buttons{display:flex;margin:0}.inspector .selection-options label{display:flex;width:auto;margin:0}.selection-name small{display:none}.selection-row{flex-wrap:wrap}.selection-options{flex-wrap:wrap}.sidebar>section{padding:8px}.field{max-width:none}.brick{grid-template-columns:1fr}.brick-bottom{flex-direction:row;justify-content:center}.sensor-readings{gap:3px}.sensor-readings strong{font-size:14px}.palette #category-tabs button{font-size:11px;padding:4px 9px}#message{max-height:62px}#canvas-scroll{height:auto}.selection-name svg{width:20px;height:20px}}
@media(min-width:701px) and (max-width:850px){.studio-layout{grid-template-columns:minmax(0,1fr) 245px}.toolbar{gap:6px}.toolbar-actions button{font-size:10px;padding:5px 6px}.toolbar-actions #send{width:44px;overflow:hidden;font-size:0;gap:0;justify-content:center}.toolbar-actions #send svg{width:22px}.preset-label select{min-width:170px}.brand b{font-size:12px}.palette-heading{align-items:flex-start;flex-direction:column;gap:0}.palette-heading #insert-label{text-align:left;max-width:100%}.selection-options{gap:3px}.inspector{max-height:142px}}
@media(max-width:700px){.brand{padding:5px 10px}.brand b{display:none}.page-tabs{padding:0 6px}.page-tabs button{font-size:11px;padding:6px 8px}.toolbar{flex-wrap:wrap;padding:6px 8px;gap:5px}.preset-label{width:auto}.preset-label select{min-width:180px}.toolbar-actions{width:auto;flex:1;justify-content:flex-end;flex-wrap:nowrap}.toolbar-actions button{min-height:42px;font-size:10px;padding:4px 6px}.toolbar-actions #send{display:none}.toolbar-actions #reset{font-size:0;gap:0}.studio-layout{margin:0 7px;grid-template-columns:minmax(0,1fr) 190px;gap:6px}.sidebar{display:flex;gap:6px}.sidebar>section{padding:6px}.panel-heading span{display:none}.sensor-readings{grid-template-columns:1fr}.sensor-readings>div{display:grid;grid-template-columns:20px 1fr 1fr;padding:3px;font-size:9px;text-align:left}.sensor-readings small{display:none}.sensor-readings strong{font-size:12px;margin:0}.sensor-readings #touch-live{font-size:9px;padding:0;min-height:0}.sensors .panel-heading{flex-wrap:wrap}.sensors .panel-heading select{width:100%;min-height:32px}.palette-heading{flex-direction:column;align-items:flex-start;gap:0;font-size:10px}.palette-heading #insert-label{max-width:100%;text-align:left}.palette #category-tabs{padding:0 3px;flex-wrap:wrap}.palette #category-tabs button{font-size:10px;min-height:34px;padding:4px 7px}.palette-item{min-width:78px;min-height:66px;font-size:10px}.palette #palette-items{padding:6px;min-height:80px;gap:6px}.canvas-toolbar{padding:4px}.canvas-toolbar .edit-tools{flex-wrap:wrap}.edit-tools #add-lane{display:none}.legend{font-size:9px;gap:6px;padding:3px 6px}.inspector{padding:5px 6px;max-height:150px}.inspector .edit-buttons{gap:3px;flex-wrap:wrap}.inspector button{min-height:38px;padding:4px 5px;font-size:10px}.selection-options{display:block}.inspector .selection-options label{font-size:0;margin-top:3px}.motion-caption{font-size:10px;min-height:28px}.pose-readout{font-size:9px}.brick-bottom button{font-size:9px}.app-footer{font-size:8px;padding:4px 8px}.app-footer span{display:none}#message{font-size:10px}#canvas-scroll{min-height:120px}}
@media(max-width:480px){.studio-layout{grid-template-columns:minmax(0,1fr) 150px}.toolbar-actions{flex-basis:100%;justify-content:flex-start}.toolbar-actions #reset{font-size:10px;gap:4px}.preset-label{width:100%}.preset-label select{width:100%}.brand{min-height:38px}.sidebar .panel-heading{font-size:10px}.device-panel .panel-heading{flex-wrap:wrap}.sensor-readings>div{grid-template-columns:16px 1fr}.sensor-readings strong{grid-column:2}.palette #category-tabs button{font-size:9px}.selection-name b{font-size:10px}.legend{display:none}.canvas-toolbar{min-height:70px}}
@media(prefers-reduced-motion:reduce){#robot{transition:none}.field .treads{animation:none!important}}
[data-select]{touch-action:none}.field{width:min(100%,36dvh)}
.sidebar{align-items:stretch}.sidebar>section{width:100%}
.selection-options label>span{white-space:nowrap}#wires{z-index:1}.container{background:rgba(255,253,248,.35)}
/* Swipe the shelf sideways; drag a command vertically into the program. */
.palette-item{touch-action:pan-x}

#data-wires{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:4}
/* v0.6: desktop workbench first. Keep labels readable, reduce block chrome. */
html{overflow-x:auto;overflow-y:hidden}body{min-width:1100px;overflow:hidden}.brand{padding:6px 18px}.preview-badge{color:#e1ebd9;border-color:#809278}.page-tabs{padding:0 14px}.page-tabs #beginner-tab{margin-left:auto;color:#6f7e74;font-size:11px}.page-tabs #guide-toggle{margin-left:4px}.desktop-notice{display:none}.toolbar{padding:7px 14px;flex-wrap:nowrap}.toolbar-actions{width:auto;gap:6px;flex-wrap:nowrap;margin-left:auto}.toolbar-actions button{font-size:12px;padding:5px 10px;min-height:38px}.toolbar-actions button svg{width:20px;height:20px}.preset-label{width:auto}.preset-label select{min-width:210px;min-height:34px}.studio-layout{grid-template-columns:minmax(0,1fr) 310px;gap:12px;margin:0 14px}.canvas-toolbar{min-height:42px;padding:5px 10px;flex-wrap:nowrap}.canvas-toolbar b{font-size:12px}.edit-tools{gap:5px}.edit-tools button,.edit-tools select{min-height:30px;font-size:11px}.edit-tools span{display:inline}.legend{min-height:25px;padding:4px 10px;font-size:10px;display:flex;gap:12px}.scroll-note{display:inline-flex}#canvas-scroll{min-height:160px}#canvas-content{padding:27px 30px 54px 18px}#diagram{gap:18px}.lanes{gap:36px}.lane-title{margin-bottom:12px}.lane-title button{min-height:28px}.sequence{min-height:112px}.insert{width:30px;min-width:30px;min-height:82px;margin:0 2px}.insert button{width:28px;min-height:28px;font-size:19px;border-width:1px}.insert.target button{box-shadow:0 0 0 3px #a9c99335}.sequence.empty{min-width:152px;min-height:112px}.sequence.empty>.insert{width:146px}.sequence.empty>.insert button{width:134px;height:54px;font-size:22px}.insert .empty-label{font-size:11px}#start-block{width:48px;height:64px;margin-top:48px;border-radius:12px;border-top-width:6px;font-size:9px}#start-block svg{width:28px;height:28px}.block{width:114px;border-top-width:5px;border-radius:6px 6px 8px 8px}.block.kind-F,.block.kind-R,.block.kind-L{width:108px}.block.kind-D{width:128px}.block.kind-W,.block.kind-S{width:138px}.block.kind-compare{width:148px}.block.kind-measure{width:118px}.block-head{height:22px;font-size:10px;padding:2px 6px}.block-head .bid{font-size:9px;padding:0 3px}.block-main{height:34px;gap:6px}.block-main svg{width:28px;height:28px}.block-main .port-select{width:37px;min-height:26px;font-size:10px;padding:2px}.select-block{height:56px}.seq-in,.seq-out{top:38px;width:9px;height:9px;border-width:1.5px}.seq-in{left:-5px}.seq-out{right:-5px}.params{min-height:39px;padding:4px 5px;gap:3px}.params input[type=number]{width:43px;min-height:30px;font-size:12px;padding:3px 1px}.params input[type=text]{min-height:30px;font-size:11px;padding:3px 5px}.params select{min-height:30px;font-size:10px;padding:3px}.params .unit{font-size:10px}.data-port{height:26px;min-height:26px;min-width:32px;bottom:-19px;font-size:9px;padding:0 3px}.value-tag{bottom:-37px;font-size:10px}.container{border-width:2px;border-radius:11px;min-width:210px}.container-head{height:36px;padding:2px 7px;gap:6px;border-radius:9px 9px 0 0}.container-head button{min-height:30px;font-size:11px;padding:0 3px}.container-head svg{width:19px;height:19px}.container-head input,.container-head select{min-height:27px;font-size:11px;padding:2px 4px}.container-head input{width:42px}.container-head select{max-width:90px}.container-body{padding:6px 6px 33px;gap:7px}.loop-end{min-width:32px;padding-left:5px;font-size:17px}.loop-end small{font-size:9px}.case-row{min-height:134px;padding:6px 0 22px}.case-label{width:28px;margin-right:4px}.switch-body{padding:0 6px 28px}.container-footer{font-size:9px;left:10px;bottom:3px}.running-label{top:-23px;font-size:9px}.node.selected>.block::after{top:-26px;font-size:9px}.node.selected>.block,.node.selected>.container{outline-width:2px;outline-offset:3px}.node.active>.block,.node.active>.container{outline-width:3px;outline-offset:2px}.inspector{max-height:106px;padding:6px 9px}.inspector.empty{min-height:35px}.inspector:not(.empty){display:flex;align-items:center;gap:12px;flex-wrap:wrap}.selection-row{flex:1;min-width:300px;flex-wrap:nowrap}.selection-name b{font-size:11px}.selection-name small{display:none}.selection-name svg{width:21px;height:21px}.inspector .edit-buttons{gap:4px;flex-wrap:nowrap}.inspector button{min-height:30px;padding:4px 7px;font-size:10px}.selection-options{flex:1;max-width:420px;min-width:210px;display:flex;flex-wrap:nowrap;margin:0;gap:7px}.inspector .selection-options label{font-size:10px;margin:0}.inspector select{min-height:30px;font-size:10px}.palette-heading{min-height:29px;padding:4px 10px;flex-direction:row;align-items:center;font-size:10px}.palette-heading #insert-label{text-align:right}.palette #category-tabs{padding:0 8px;flex-wrap:nowrap}.palette #category-tabs button{min-height:30px;font-size:11px;padding:3px 10px}.palette #palette-items{min-height:70px;padding:6px 10px;gap:8px}.palette-item{min-width:76px;min-height:56px;border-top-width:4px;font-size:10px;padding:3px 6px;gap:2px}.palette-item svg{width:24px;height:24px}#message{min-height:30px;max-height:47px;font-size:11px;padding:6px 10px}.sidebar{align-items:stretch;gap:8px}.sidebar>section{padding:9px}.field{width:min(100%,30dvh);max-width:none;max-height:none}.panel-heading{font-size:11px}.robot-intro{display:flex;align-items:center;gap:10px;margin:-1px 0 7px;min-height:61px}.robot-intro>div:nth-child(2){flex:1}.robot-intro>small{font-size:9px;color:#7e8b80;text-align:right;line-height:1.5;align-self:flex-start;margin-top:9px}#toco-avatar{width:53px;height:61px;flex-shrink:0}.toco-art{width:100%;height:100%;overflow:visible}.toco-name{display:flex;gap:8px;align-items:baseline}.toco-name b{font-size:16px;letter-spacing:.08em}.toco-name span{font-size:9px;color:#7a9084;letter-spacing:.12em}#toco-message{font-size:11px;color:#52705e;margin:3px 0 0;line-height:1.55;min-height:18px}#robot{filter:drop-shadow(0 2px 2px #35564735)}.toco-view .mouth{display:none}.toco-view[data-mood=ready] .mouth-ready,.toco-view[data-mood=happy] .mouth-happy,.toco-view[data-mood=thinking] .mouth-thinking,.toco-view[data-mood=curious] .mouth-curious{display:block}.toco-eyes{transform-box:fill-box;transform-origin:center;animation:toco-blink 6.4s infinite}.field.touching .toco-bumper{fill:#dd9864;stroke:#b86c46}.toco-view[data-mood=happy] .toco-cheeks{opacity:1}.motion-caption{font-size:11px;margin-top:5px;min-height:18px}.pose-readout{font-size:9px}.sensor-readings{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.sensor-readings>div{display:flex;padding:5px 2px;font-size:9px}.sensor-readings strong{font-size:14px;margin-top:2px}.sensor-readings small{display:block;font-size:8px}.sensors .panel-heading{flex-wrap:nowrap}.sensors .panel-heading select{width:auto;min-height:30px;font-size:10px}.sensors p{font-size:9px}.brick{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:7px}#brick-screen{min-height:55px;font-size:14px}.brick-bottom{flex-direction:column;gap:3px}.brick-bottom button{min-height:30px;font-size:9px;padding:3px 5px}#brick-light{width:14px;height:14px;border-width:3px}.mute{font-size:10px}#device-state{font-size:9px}.app-footer{font-size:9px;padding:4px 14px}.app-footer span{display:inline}.page-tabs small{display:inline}.panel-heading span{display:inline}.toolbar-actions #send,.toolbar-actions #reset{font-size:12px;display:flex;width:auto;gap:6px}.edit-tools #add-lane{display:block}#guide{width:590px;inset:80px 18px auto auto}.sensors #manual-controls label{font-size:10px}.sensors input[type=range]{height:25px}.sensors #touch{min-height:30px;font-size:10px}
@keyframes toco-blink{0%,43%,47%,100%{transform:scaleY(1)}45%{transform:scaleY(.12)}}
@media(min-width:1440px){.studio-layout{grid-template-columns:minmax(0,1fr) 340px}.field{width:min(100%,32dvh)}}
@media(max-width:1099px){.desktop-notice{display:block;background:#edf3e8;color:#5e735a;font-size:11px;padding:4px 16px}.brand b{display:inline}.toolbar-actions{flex-basis:auto}.sidebar .panel-heading{font-size:11px}}
@media(prefers-reduced-motion:reduce){.toco-eyes{animation:none}}

/* v0.7: compact editing, large run view, a lesson path in the same editor. */
body{min-width:1024px}.brand{min-height:36px;padding:4px 16px;font-size:11px}.brand-mark{width:24px;height:24px}.brand b{font-size:12px}.page-tabs{padding:0 12px}.page-tabs button{min-height:36px;padding:5px 14px;font-size:12px}.page-tabs #guide-toggle{margin-left:auto}.page-tabs #studio-tab{margin-left:0}.toolbar{padding:6px 12px;min-height:54px;gap:12px}.toolbar-actions button{min-height:34px;font-size:12px;padding:4px 10px}.preset-label select{min-height:30px;font-size:12px;min-width:225px}.lesson-selector{display:flex;align-items:center;gap:10px;font-size:11px;color:#6c7e71}.lesson-selector select{min-width:260px;min-height:32px;font-size:12px;font-weight:650}.desktop-notice{display:none}.studio-layout{grid-template-columns:minmax(0,1fr) 238px;margin:0 12px;gap:10px}.canvas-toolbar{min-height:38px;padding:4px 9px}.canvas-toolbar b{font-size:11px}.edit-tools button,.edit-tools select,.edit-tools #zoom{min-height:28px;font-size:10px}.legend{min-height:22px;padding:2px 9px}#canvas-content{padding:24px 24px 44px 14px}#canvas-scroll{min-height:115px}#diagram{gap:12px}.lane-title{margin-bottom:10px}.lanes{gap:32px}.sequence{min-height:90px}.insert{width:24px;min-width:24px;min-height:64px;margin:0 2px}.insert button{width:23px;min-height:23px;font-size:17px}.sequence.empty{min-width:130px;min-height:90px}.sequence.empty>.insert{width:126px}.sequence.empty>.insert button{width:118px;height:48px}.insert .empty-label{font-size:11px}#start-block{width:42px;height:54px;margin-top:40px;border-top-width:5px}#start-block svg{width:24px;height:24px}.block,.block.kind-F,.block.kind-R,.block.kind-L{width:80px}.block.kind-D{width:104px}.block.kind-W{width:120px}.block.kind-S{width:140px}.block.kind-compare{width:132px}.block.kind-measure{width:96px}.block-head{height:20px;padding:1px 5px;font-size:10px;gap:1px}.block-head .bid{font-size:8px;padding:0}.block-main{height:28px;gap:4px}.block-main svg{width:24px;height:24px}.block-main .port-select{min-height:22px;width:32px;font-size:10px;padding:1px 3px}.select-block{height:48px}.params{min-height:30px;padding:3px;gap:2px}.params input[type=number]{width:36px;min-height:24px;padding:1px;font-size:12px}.params input[type=text],.params select{min-height:24px;font-size:10px;padding:2px 3px}.params .unit{font-size:9px}.fixed-distance{font:650 12px ui-monospace,monospace;padding:0 9px}.seq-in,.seq-out{top:31px;width:8px;height:8px}.seq-in{left:-5px}.seq-out{right:-5px}.data-port{height:23px;min-height:23px;min-width:29px;bottom:-17px;font-size:9px}.value-tag{bottom:-34px}.container{min-width:180px;border-radius:8px}.container-head{height:30px;padding:2px 5px;gap:5px;border-radius:6px 6px 0 0;font-size:10px}.container-head button{font-size:10px;min-height:25px;padding:0 2px;gap:4px}.container-head svg{width:17px;height:17px}.container-head input,.container-head select{min-height:24px;font-size:10px;padding:1px 3px}.container-head input{width:36px}.container-body{padding:5px 4px 30px;gap:5px}.loop-end{min-width:25px;font-size:15px;padding-left:3px}.loop-end small{font-size:8px}.case-row{min-height:109px;padding:5px 0 20px}.case-label{width:23px;font-size:13px}.switch-body{padding:0 4px 25px}.container-footer{font-size:8px;left:7px}.running-label{font-size:9px;top:-23px}.inspector{padding:5px 8px;max-height:78px;gap:8px}.inspector.empty{min-height:30px}.selection-row{min-width:270px}.selection-name b{font-size:10px}.selection-name svg{width:18px;height:18px}.inspector button,.inspector select{min-height:28px}.selection-options{min-width:180px;max-width:350px}.palette-heading{min-height:23px;padding:3px 9px}.palette #category-tabs button{min-height:27px;font-size:10px;padding:3px 10px}.palette #palette-items{min-height:65px;padding:5px 9px;gap:8px}.palette-item{min-width:80px;width:80px;min-height:54px;padding:3px;font-size:10px}.palette-item svg{width:24px;height:24px}#message{min-height:28px;padding:5px 9px;font-size:11px;max-height:44px}.app-footer{min-height:20px;padding:3px 12px;font-size:9px}#preview-dock{overflow:auto}#preview-dock .sensors,#preview-dock .device-panel{display:none}#preview-dock .simulation{padding:9px}.course-heading{display:flex;align-items:center;justify-content:space-between;font-size:11px;gap:6px;margin-bottom:6px}.course-heading button{min-height:28px;font-size:10px;padding:3px 7px}.robot-intro{min-height:43px;gap:7px;margin:0 0 5px}#toco-avatar{width:36px;height:41px}.toco-name b{font-size:13px}.toco-name span{font-size:8px}#toco-message{font-size:10px;line-height:1.35;min-height:14px;margin-top:2px}.robot-intro>small{font-size:8px;margin-top:4px}.field{width:100%;max-width:218px}#robot{transition:left var(--motion-ms,600ms) linear,top var(--motion-ms,600ms) linear,transform var(--motion-ms,600ms) ease}.goal-tile{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f5e5a0;color:#886923;font-size:clamp(18px,3vw,30px);line-height:1.1;box-shadow:inset 0 0 0 2px #e7cd68;border-radius:3px}.goal-tile small{font-size:9px;margin-top:3px}.motion-caption{font-size:10px;min-height:17px}.pose-readout{font-size:9px}.lesson-mode #sensor-overlay,.lesson-mode .sensors,.lesson-mode .device-panel{display:none!important}.lesson-mode #category-tabs{display:none}.lesson-mode .palette-heading b{font-size:11px}.lesson-mode .selection-options{display:none}.lesson-mode .selection-row{flex:none;width:100%;max-width:530px}.lesson-mode .inspector:not(.empty){max-height:45px}.lesson-mode .lane-title{display:none}.lesson-mode #start-block{margin-top:21px}#lesson-banner{display:flex;gap:14px;align-items:center;flex-shrink:0;margin:0 12px 8px;padding:8px 11px;border:1px solid #cfdec9;border-radius:7px;background:#f4f8ef;min-height:44px;font-size:13px}#lesson-step{background:#3c7255;color:white;font:700 11px ui-monospace,monospace;border-radius:4px;padding:4px 7px;white-space:nowrap}#lesson-hint{font-size:11px;color:#63775f;margin-left:auto}.lesson-mode .field{background-color:#fcfdf9}.lesson-mode .wall-tile{font-size:11px}
/* Native dialog keeps the editor's focus and makes stopping/returning predictable. */
#run-dialog{padding:0;border:1px solid #b9caba;border-radius:14px;background:#f6f8f3;color:var(--ink);width:min(1440px,calc(100vw - 28px));height:calc(100dvh - 24px);max-width:none;max-height:none;overflow:hidden;box-shadow:0 22px 80px #112b2f55}#run-dialog[open]{display:flex;flex-direction:column}#run-dialog::backdrop{background:#2037399c;backdrop-filter:blur(3px)}.run-header{display:flex;align-items:center;gap:16px;padding:9px 18px;border-bottom:1px solid #d4dfd1;background:white;min-height:58px;flex-shrink:0}.run-eyebrow{font-size:8px;letter-spacing:.13em;color:#739079}.run-header h2{font-size:16px;margin:0;line-height:1.3}.run-header #run-context{font-size:11px;color:#627c68;margin-left:auto}.run-header button{min-height:32px;width:34px;font-size:21px;line-height:1;padding:0;background:#f3f6f1}.run-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,36%);gap:16px;flex:1;min-height:0;padding:12px 18px}.run-right{display:flex;flex-direction:column;min-width:0;min-height:0;border-left:1px solid #d5dfd2;padding-left:16px}.watch-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;flex-shrink:0}.watch-heading span{font-size:10px;color:#72866f}#run-current{display:flex;gap:7px;align-items:center;min-height:38px;padding:6px 9px;margin:8px 0;background:#e5efdd;border:1px solid #c3d6b5;border-radius:6px;font-size:12px;flex-shrink:0}#run-current svg{width:23px;height:23px}#run-watch{overflow:auto;flex:1;min-height:110px;background:#fcfdfb;border:1px solid #d7dfd2;border-radius:8px;padding:13px;scrollbar-color:#aebeb2 #edf2ec}.watch-lane{width:max-content;min-width:100%;padding-bottom:12px}.watch-lane+.watch-lane{border-top:1px dashed #bacab8;padding-top:12px}.watch-lane>small{font-size:10px;color:#5a7b5a}.watch-sequence{display:flex;align-items:center;width:max-content;min-height:76px;gap:7px;padding:7px 3px}.watch-arrow{font-size:16px;color:#8aa58c}.watch-node{position:relative;flex-shrink:0}.watch-block{width:66px;min-height:70px;border:1px solid #afc2ae;border-top:4px solid #347d59;border-radius:5px;background:linear-gradient(#fff,#edf2e9);padding:3px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.watch-block>div{position:relative;width:100%}.watch-block svg{width:23px;height:23px}.watch-block small{position:absolute;left:2px;top:0;font:9px ui-monospace,monospace;color:#78907c}.watch-block b{font-size:10px;font-weight:600}.watch-block span{font-size:9px;overflow-wrap:anywhere;max-width:100%}.watch-block output{font-size:10px;color:#9b7616}.watch-block.cat-flow{border-top-color:#c38129}.watch-block.cat-sensor{border-top-color:#ab8b2d}.watch-block.cat-data{border-top-color:#ac5368}.watch-group{border:2px solid #d4a45e;border-radius:7px;padding:0 6px 5px;background:#fffaf0}.watch-group-head{display:flex;align-items:center;gap:6px;font-size:10px;min-height:26px;border-bottom:1px solid #ecd9b4}.watch-group-head svg{width:17px;height:17px}.watch-group-head small{margin-left:auto;color:#9a6b2f;font-size:9px}.watch-case{display:flex;align-items:center;gap:6px}.watch-case+.watch-case{border-top:1px dashed #deca9f}.watch-case>b{font-size:12px;color:#8f713d}.watch-case.chosen{background:#e5efde}.watch-node.active{outline:3px solid #399b5b;outline-offset:2px;background-color:#edf8e7;box-shadow:0 0 0 5px #c4dfb64d}.watch-node.failed{outline:3px solid #b55446;outline-offset:2px}.watch-node.finished{box-shadow:0 0 0 2px #7baf7b}#run-stage{display:flex;align-items:center;justify-content:center;min-height:0;min-width:0}#run-stage .simulation{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;min-height:0}#run-stage .course-heading{display:none}#run-stage .robot-intro{width:min(100%,560px);flex-shrink:0;min-height:38px;margin:0 0 6px}#run-stage #toco-avatar{width:32px;height:37px}#run-stage .toco-name b{font-size:14px}#run-stage #toco-message{font-size:11px}#run-stage .field{width:min(100%,calc(100dvh - 220px),600px);max-width:none;max-height:none;flex-shrink:0}#run-stage .motion-caption{font-size:12px;margin-top:6px;min-height:18px}#run-stage .pose-readout{font-size:10px}#run-stage .goal-tile{font-size:42px}#run-stage .goal-tile small{font-size:12px}#run-details{display:grid;gap:8px;flex-shrink:0;max-height:44%;overflow-y:auto;margin-top:9px}#run-details>section{background:#f7faf3;border:1px solid #d4dfce;border-radius:7px;padding:7px}.sensor-readings strong{font-size:13px}.sensor-readings small{font-size:9px}#run-details .panel-heading{font-size:10px;margin-bottom:4px}#run-details .brick{padding:5px}#run-details #brick-screen{min-height:36px;font-size:13px}#run-details .brick-bottom button{display:block;min-height:28px;font-size:9px;padding:2px 5px}#run-details #device-state{font-size:9px}.run-footer{display:flex;align-items:center;gap:12px;padding:10px 18px;border-top:1px solid #d2decc;background:#fff;min-height:65px;flex-shrink:0}#run-result{flex:1;font-size:12px;line-height:1.6}.run-buttons{display:flex;gap:6px;flex-shrink:0}.run-buttons button{font-size:11px;min-height:34px;padding:5px 10px}.lesson-mode #run-details{display:none}.lesson-mode #run-watch{flex:1}.lesson-mode .run-body{grid-template-columns:minmax(0,1fr) minmax(310px,34%)}.lesson-mode #run-stage .field{width:min(100%,calc(100dvh - 220px),580px)}
@media(max-height:680px){#lesson-hint{max-width:45%;font-size:10px}.run-header{min-height:50px;padding:6px 14px}.run-body{padding:8px 14px;gap:12px}.run-footer{min-height:58px;padding:7px 14px}#run-stage .field,.lesson-mode #run-stage .field{width:min(100%,calc(100dvh - 200px),600px)}#run-details{gap:5px;margin-top:5px}#run-details>section{padding:5px}.run-right{padding-left:12px}#run-current{min-height:32px;margin:6px 0}.watch-heading span{display:none}#preview-dock .robot-intro{min-height:38px}.field{max-width:195px}}
@media(max-width:1150px){#lesson-hint{max-width:43%;font-size:10px}.toolbar-actions button{font-size:11px}.selection-options{min-width:180px}.selection-row{min-width:260px}.run-footer{flex-wrap:wrap;gap:4px;padding:7px 14px}#run-result{flex-basis:100%;font-size:11px}.run-buttons{margin-left:auto}.run-body{grid-template-columns:minmax(0,1fr) 340px}#run-stage .field,.lesson-mode #run-stage .field{width:min(100%,calc(100dvh - 228px))}.lesson-selector select{min-width:235px}}
@media(max-width:1023px){.desktop-notice{display:block;font-size:10px;padding:3px 12px}.studio-layout{grid-template-columns:minmax(0,1fr) 220px}}
@media(prefers-reduced-motion:reduce){#robot{transition:none}}

/* Let the course use the remaining dialog height, including laptop browser chrome. */
#run-stage .simulation{display:grid;grid-template-rows:40px minmax(0,1fr) 22px 14px;gap:2px;justify-items:center;align-items:center}
#run-stage .robot-intro{height:38px;min-height:0;margin:0;align-self:center}
#run-stage .field,.lesson-mode #run-stage .field{height:min(100%,600px);width:auto;aspect-ratio:1;max-width:100%;max-height:600px;margin:0;align-self:center}
#run-stage .motion-caption,#run-stage .pose-readout{margin:0}
#run-details{max-height:none;flex-shrink:0}
.run-right:has(#manual-controls:not([hidden])) #run-details{max-height:60%;overflow:auto}
.lesson-mode #program-state{display:none}
/* v0.8: the same grid runner, now viewed through an original 3D robot. */
.stage-visual{position:relative;width:100%;aspect-ratio:1;min-height:0}
.stage-visual .field{width:100%;height:100%;margin:0}
#scene3d{position:absolute;inset:0;border-radius:14px;overflow:hidden;background:#ecf2ec;border:1px solid #cbd9ce}
#scene-canvas{display:block;width:100%;height:100%}
.scene-hint{position:absolute;bottom:13px;left:15px;font-size:11px;color:#526a61;background:#ffffffd9;border:1px solid #d4e2d6;border-radius:20px;padding:6px 12px;pointer-events:none}
.view-controls{display:none;position:absolute;top:10px;left:10px;right:10px;align-items:center;justify-content:space-between;gap:10px;pointer-events:none}
.view-controls button{pointer-events:auto;background:#fffdf5eF;min-height:30px;border:1px solid #b9cdc0;padding:5px 9px;font-size:11px;box-shadow:0 1px 3px #2f594512}
.view-switch,#camera-controls{display:flex;gap:3px}
.view-switch button[aria-pressed=true]{background:#365f52;color:white;border-color:#365f52}
#run-stage .stage-visual{height:100%;width:100%;aspect-ratio:auto;display:grid;place-items:center;overflow:hidden}
#run-stage .view-controls{display:flex}
#run-stage[data-view=3d] .field{visibility:hidden}
#run-stage .stage-visual .field{height:min(100%,600px);width:auto;aspect-ratio:1;max-width:100%;max-height:600px;margin:0}
#run-stage[data-view=2d] .view-controls{top:5px}
#view-notice{position:absolute;bottom:4px;left:6px;right:6px;font-size:11px;background:#fff9dc;border:1px solid #dbc795;padding:6px;border-radius:6px}
#scene3d[hidden],#camera-controls[hidden],#view-notice[hidden]{display:none}
@media(max-height:680px){.view-controls button{padding:4px 6px}.view-controls{gap:5px;left:6px;right:6px;top:6px}.scene-hint{bottom:8px;left:10px}}

#run-stage .simulation{grid-template-columns:minmax(0,1fr);justify-content:stretch}

/* v0.9: top projection and oblique view use one robot mesh. */
#robot{transform-origin:50% 50%;filter:drop-shadow(0 2px 2px #42524430)}
.toco-model-canvas{display:block;width:100%;height:100%;pointer-events:none}
#toco-avatar{width:30px;height:42px}#run-stage #toco-avatar{width:28px;height:40px}

/* Shared equipment and a separate, non-programming mechanism inspector. */
.page-tabs #open-parts{margin-left:auto;font-size:12px}.page-tabs #guide-toggle{margin-left:0}
#parts-dialog{padding:0;width:min(1080px,calc(100vw - 32px));height:min(690px,calc(100dvh - 28px));max-height:none;max-width:none;border:1px solid #b8cbbf;border-radius:14px;background:#f7f9f5;color:var(--ink);overflow:hidden;box-shadow:0 24px 80px #18392f55}
#parts-dialog[open]{display:flex;flex-direction:column}#parts-dialog::backdrop{background:#203739aa;backdrop-filter:blur(3px)}
.parts-header{display:flex;align-items:center;gap:16px;padding:12px 18px;border-bottom:1px solid #d6dfd4;background:white;flex-shrink:0}.parts-header small{font-size:9px;letter-spacing:.12em;color:#72917f}.parts-header h2{font-size:20px;margin:0}.parts-header>span{margin-left:auto;font-size:11px;color:#768678}.parts-header>button{min-height:34px;width:36px;padding:0;font-size:24px}
.parts-body{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:16px;padding:16px;flex:1;min-height:0}.parts-stage{position:relative;min-height:0;min-width:0;background:#ecf2ec;border:1px solid #cedbd0;border-radius:10px;overflow:hidden}.parts-stage canvas{display:block;width:100%;height:calc(100% - 68px)}.parts-views{position:absolute;top:12px;left:12px;display:flex;gap:5px}.parts-views button{min-height:34px;padding:5px 9px;font-size:11px}.parts-views button[aria-pressed=true]{background:#365e51;color:white;border-color:#365e51}.parts-info{min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:14px}.parts-list{display:grid;grid-template-columns:1fr 1fr;gap:7px}.parts-list button{font-size:11px;text-align:left;padding:7px 9px;min-height:42px}.parts-list button:first-child{grid-column:1/-1}.parts-list b{display:inline-block;min-width:18px;border:1px solid #c6d5c6;border-radius:3px;text-align:center;margin-right:4px;font:10px ui-monospace,monospace;padding:2px}.parts-list button[aria-pressed=true]{border:2px solid #b38631;background:#fff3d7;padding:6px 8px}.part-card{background:white;border:1px solid #d3ded1;border-radius:8px;padding:14px}.part-card>div{display:flex;gap:8px;align-items:center}.part-card h3{font-size:16px;margin:0}.part-card #part-port{font:bold 11px ui-monospace,monospace;border:1px solid #c0d0c0;border-radius:4px;padding:3px 6px;color:#55755e}.part-card p{font-size:14px;line-height:1.85;margin:12px 0 0}.part-card #part-note{font-size:11px;line-height:1.65;color:#6e7b70}.parts-future{padding:0 3px}.parts-future b{font-size:12px}.parts-future p{font-size:12px;line-height:1.7;margin:5px 0}.parts-future small{font-size:10px;color:#7c897e}.arm-controls{position:absolute;bottom:0;left:0;right:0;background:#fafcf8;border-top:1px solid #d1dfd0;min-height:68px;display:flex;gap:8px;align-items:center;justify-content:center;padding:10px;flex-wrap:wrap}.arm-controls>span{font-size:11px}.arm-controls>button{font-size:12px;min-height:36px;padding:6px 12px}.arm-controls output{font-size:10px;min-width:90px;color:#657b68}#part-cutaway{position:absolute;bottom:83px;left:12px;right:12px;padding:7px;background:#fffbebeb;border:1px solid #e0c57c;border-radius:5px;font-size:11px;text-align:center}.parts-footer{padding:10px 18px;border-top:1px solid #d6dfd4;font-size:10px;color:#6b7e6c;background:white;flex-shrink:0}#parts-error{position:absolute;top:65px;left:20px;right:20px;color:#9e4a36;font-size:12px}
@media(max-height:680px){.parts-header{padding:7px 14px}.parts-header h2{font-size:18px}.parts-body{padding:12px;gap:12px}.parts-info{gap:10px}.parts-list{gap:5px}.parts-list button{min-height:36px}.part-card{padding:11px}.part-card p{font-size:12px;margin-top:8px}.part-card h3{font-size:14px}.part-card #part-note{font-size:10px}.parts-footer{padding:7px 14px}}
/* v0.11: a rectangular sensor field and the same Nova robot in every view. */
:root{--ink:#293f4d;--action:#397f7d;--paper:#f2f6f8}.brand{background:#243f50}.brand-mark{background:#abede0;color:#244c53}.page-tabs{background:#f6f9fb}.page-tabs button[aria-selected=true]{border-color:#438e91;color:#286774}.primary{background:#347978;border-color:#347978}.primary:hover{background:#28696c}.field{aspect-ratio:2;max-height:none;background-color:#fafcfb;border:5px solid #aabecd;border-radius:3px;box-shadow:0 3px 0 #7893a8}.field::after{pointer-events:none}.field #robot{transform-origin:50% 50%}.continuous-field #robot{transition:none!important}.wall-tile{background:#b7c9d4;color:#365465;box-shadow:0 2px 1px #69859a}.physical-wall{border:1px solid #7895a8}.field #course-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.field #sensor-overlay{overflow:visible;z-index:4;pointer-events:none}.field #sensor-overlay path{stroke-width:.6}.field #sensor-overlay circle{stroke-width:.3}.field #robot{z-index:3}.robot-intro small{white-space:nowrap;line-height:1.5}.block.kind-drive{width:140px}.block.kind-drive .params{justify-content:center}.block.kind-drive .params input{width:43px}.block.kind-gyroReset{width:88px}.block.kind-W{width:132px}.block.kind-W .params{flex-wrap:wrap}.block.kind-W .params select{width:100%;flex-basis:100%}.block.kind-measure{width:114px}.sensor-extra{display:flex;flex-wrap:wrap;gap:5px 15px;font-size:11px;border-top:1px solid #d5e0e5;padding-top:8px}.sensor-extra b{font-variant-numeric:tabular-nums;color:#2d6579}.sensor-extra small{color:#68828e}#run-dialog .run-body{grid-template-columns:minmax(0,1fr) 340px}#run-stage .simulation{justify-content:flex-start}#run-stage .field{width:100%;max-width:none;max-height:none}#run-stage .stage-visual{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center}#run-stage .stage-visual>#field{flex:none}#run-stage #scene3d{height:100%;width:100%;min-height:220px;aspect-ratio:2}#run-stage[data-view=3d] .stage-visual{display:block}#run-stage .view-controls{flex:none}.sensor-readings{grid-template-columns:repeat(3,minmax(0,1fr))}#parts-dialog .parts-list{grid-template-columns:1fr 1fr}#parts-dialog .parts-list button[data-part=all]{grid-column:1/-1}.scene-hint{color:#325d70}.run-header,#parts-dialog .parts-header{background:#f6fafb}.robot-intro .toco-name span{letter-spacing:.15em;color:#5e9b9f}#lesson-banner{min-height:42px}#lesson-step{font-size:10px}.watch-block.kind-drive{width:94px}.run-right{min-width:0}
@media(max-height:680px){#run-dialog .run-body{grid-template-columns:minmax(0,1fr) 320px}#run-stage #scene3d{min-height:180px}.sensor-readings>div{padding:5px}.sensor-extra{padding-top:5px;font-size:10px}.parts-info{padding:0}.parts-list button{min-height:35px}.parts-future{margin-top:8px}#run-details .device-panel{display:none}}

/* v0.11: keep the map and robot proportions in the editing preview. */
#preview-dock .stage-visual{aspect-ratio:2;height:auto}
#preview-dock .stage-visual .field{width:100%;height:auto;aspect-ratio:2;max-width:none}
.watch-block.kind-brake{width:80px}

/* Face display: the same content on the model and the enlarged monitor. */
#brick-screen{padding:0;background:#fff2df;overflow:hidden;min-height:64px;height:76px;display:flex;align-items:center;justify-content:center;border-radius:18px}
#brick-screen canvas{height:100%;width:auto;max-width:100%;object-fit:contain}#face-caption{display:block;text-align:center;font-size:11px;margin:3px 0;color:#415965}
.face-controls{display:grid;gap:7px;padding:12px;background:#fff7eb;border-radius:12px;margin-top:10px}.face-controls select{padding:6px}.face-controls small{font-size:11px;color:#566875}

/* Calm face panel and independently controlled status rim. No bloom or flashing. */
#brick-screen{background:#234b56;border:5px solid #81999a;box-shadow:inset 0 0 0 1px #183c46}
#brick-screen canvas{width:100%;height:100%;object-fit:contain}
#light-caption{font-size:10px;color:#415965;white-space:nowrap}.brick-bottom{flex-wrap:wrap}
.face-controls label{font-size:12px;font-weight:600}
/* v0.13: one learning path on PC, projects and a quiet mission companion. */
#mission-card{background:#f7faf9;border-color:#c9dadb;display:flex;flex-direction:column;gap:7px;padding:13px!important}
#mission-card>small{font-size:10px;color:#477a7b}#mission-card>b{font-size:13px;color:#294f5e}#mission-card details{border-top:1px solid #dce6e5;padding-top:7px;font-size:11px}#mission-card summary{cursor:pointer;font-weight:650;min-height:24px;display:list-item;margin-left:13px}#mission-card p{font-size:11px;line-height:1.8;margin:5px 0}#mission-card button{min-height:30px;font-size:11px;background:#edf5f1}
#lesson-hint{display:none}#lesson-banner{background:#f6faf8;border-color:#cedfda}#lesson-step{background:#396f73}
#reflection-panel{flex-shrink:0;padding:12px 0 0;font-size:11px}#reflection-panel>div{display:flex;gap:5px;flex-wrap:wrap;margin:7px 0}#reflection-panel button{min-height:32px;font-size:10px;padding:4px 7px}#reflection-panel [aria-pressed=true]{background:#d9eee8;border-color:#4d8a7e;box-shadow:inset 0 0 0 1px #4d8a7e}#reflection-panel p{line-height:1.6;color:#52716c;margin:5px 0 8px}#reflection-panel>b{font-size:12px}
.expression-lesson #run-details{display:grid;max-height:33%}.expression-lesson #run-details .device-panel{display:block!important}.expression-lesson #run-details .device-panel .brick-bottom button,.expression-lesson #run-details #device-state{display:none}.expression-lesson #run-details #brick-screen{height:62px;min-height:62px;padding:0}.expression-lesson #run-details #face-caption{font-size:11px}.expression-lesson #run-details .brick{display:flex;gap:8px}.expression-lesson #run-details .brick #brick-screen{width:126px;flex-shrink:0}.expression-lesson #run-details .brick-bottom{margin-left:auto}
.learning-dialog{border:1px solid #b8cfd0;border-radius:16px;padding:0;background:#f4f8f7;color:var(--ink);width:min(950px,calc(100vw - 48px));max-height:calc(100dvh - 36px);box-shadow:0 20px 80px #17384455}.learning-dialog::backdrop{background:#203c4b99;backdrop-filter:blur(3px)}.learning-dialog[open]{display:flex;flex-direction:column}.learning-dialog>header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;background:#fff;border-bottom:1px solid #d4e1df;flex-shrink:0}.learning-dialog header small{color:#6d8d8b;letter-spacing:.08em;font-size:10px}.learning-dialog h2{font-size:21px;margin:3px 0 0}.learning-dialog>header button{width:35px;height:35px;min-height:35px;font-size:22px;padding:0}.dialog-content{padding:18px 24px 26px;overflow:auto;min-height:0}.dialog-lead{margin:0 0 18px;font-size:13px;line-height:1.8;color:#4e6c70}
.chapter-card{background:white;border:1px solid #cedfda;border-radius:12px;padding:16px 18px;margin-bottom:14px}.chapter-card>header{display:flex;align-items:center;justify-content:space-between}.chapter-card h3{font-size:17px;margin:2px 0}.chapter-card>header>span{font-size:11px;border-radius:20px;background:#edf5f0;color:#477060;padding:5px 9px}.chapter-card>p{font-size:11px;color:#6e8580;margin:2px 0 12px}.lesson-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.lesson-grid button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:3px;padding:11px 12px;min-height:88px;border-color:#d6e1dd;border-radius:8px;background:#f8faf8;font-weight:400}.lesson-grid small{font-size:10px;color:#537c77}.lesson-grid b{font-size:12px}.lesson-grid span{font-size:10px;color:#5f8272}.lesson-grid button[aria-current=step]{background:#e2f0e9;border-color:#468579;box-shadow:inset 3px 0 #468579}.future-path{border:1px dashed #b7cbcb;border-radius:12px;padding:16px 18px;background:#edf3f5;color:#506b78}.future-path h3{font-size:15px;margin:0}.future-path p,.future-path li{font-size:12px;line-height:1.8}.future-path ol{padding-left:20px}
.project-form{display:grid;gap:10px;padding:16px;background:white;border:1px solid #d0dfdb;border-radius:10px}.project-form label{display:grid;gap:5px;font-size:12px}.project-form input,.project-form textarea{width:100%;border:1px solid #bfcfcb;border-radius:5px;padding:8px;font:inherit;color:inherit}.project-actions{display:flex;gap:8px;flex-wrap:wrap}.project-actions button{font-size:12px;min-height:38px}#project-message{min-height:22px;font-size:12px;color:#356f61}#project-message.error{color:#994839}#pending-project{padding:14px;border:2px solid #72a797;border-radius:9px;background:#edf6ee;margin:12px 0}#pending-project p{font-size:12px}#pending-project button,#recover-work{min-height:34px;font-size:11px;margin-right:6px}#works-count{font-weight:400;font-size:11px;color:#718984}.saved-work{background:white;border:1px solid #d2e0dd;border-radius:9px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 16px;margin-bottom:8px}.saved-work>div:first-child{min-width:0}.saved-work b{font-size:13px;overflow-wrap:anywhere}.saved-work small{display:block;font-size:10px;color:#6b8482;margin-top:3px}.saved-work p{font-size:11px;white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0}.work-actions{display:flex;gap:5px;flex-shrink:0}.work-actions button{font-size:10px;min-height:32px;padding:4px 8px}.storage-note,.empty-works{font-size:11px;line-height:1.9;color:#647c7c}#save-status{display:inline;font-size:9px;white-space:normal}
@media(max-height:700px){#mission-card{gap:4px;padding:10px!important}.learning-dialog>header{padding:12px 22px}.dialog-content{padding-top:14px}#reflection-panel{padding-top:7px}#reflection-panel p{font-size:10px;margin:3px 0}.expression-lesson #run-details{max-height:30%}}

.lesson-mode .block.kind-D .params{flex-direction:column;align-items:stretch}.lesson-mode .block.kind-D .params select,.lesson-mode .block.kind-D .params input{width:100%;flex:auto}.mode-label{font-size:9px;color:#4c6967;line-height:1.2}.lesson-mode .block.kind-W{width:96px}.lesson-mode .block.kind-W .params{flex-wrap:nowrap}
/* v0.14: focus on the route, keep the complete rectangular course. */
#run-stage .stage-visual{display:block!important;background:#edf3f6;border-radius:12px;isolation:isolate}
#run-stage .stage-visual .field{max-width:none;max-height:none}
#run-stage #scene3d{min-height:0;border-radius:12px}
.view-controls{flex-wrap:wrap;z-index:5}.framing-controls{display:flex;gap:3px;margin-left:auto}.framing-controls button[aria-pressed=true]{background:#365f52;color:white;border-color:#365f52}
#camera-controls button[data-camera=reset]{font-size:10px}.view-controls #camera-controls{margin-left:auto}
#run-watch.wrapped-watch{overflow-x:hidden;padding:12px 10px;min-height:185px}
.wrapped-watch .watch-lane{width:100%;padding-bottom:3px}
.wrapped-watch .watch-sequence{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 13px;width:100%;padding:8px 2px 3px;align-items:stretch}
.wrapped-watch .watch-arrow{display:none}.wrapped-watch .watch-block{width:100%;min-height:66px;max-width:none}
.wrapped-watch .watch-block:not(:last-child)::after{content:'→';position:absolute;left:calc(100% + 2px);top:25px;color:#728f85;font-size:12px}
.wrapped-watch .watch-block:nth-of-type(3n):not(:last-child)::after{content:'↙';top:auto;left:auto;right:2px;bottom:-18px}
.wrapped-watch .watch-block b{font-size:10px}.wrapped-watch .watch-block small{font-size:10px;color:#3c635b}
.run-help{display:flex;gap:6px;margin-top:8px;flex-shrink:0}.run-help button{min-height:32px;padding:5px 7px;font-size:10px}.run-help #fix-block{color:#9e493d;border-color:#cda197}
.watch-node.failed::before{content:'ここで とまった';position:absolute;z-index:1;top:-17px;background:#a1483b;color:white;border-radius:3px;font-size:9px;padding:1px 4px;white-space:nowrap}
#run-watch:has(.failed){padding-top:19px}
.expression-lesson #run-details{max-height:none;overflow:visible}.expression-lesson #run-details .brick #brick-screen{height:78px;min-height:78px;width:150px}
.face-study #run-stage .simulation{display:grid;grid-template-rows:38px minmax(140px,1fr) minmax(155px,.75fr) 20px 14px;gap:6px}
#face-spotlight{align-self:stretch;display:flex;align-items:center;justify-content:center;gap:16px;width:100%;background:#e2eeed;border:1px solid #bdcfce;border-radius:14px;padding:12px 18px}
#face-spotlight>div:first-child{display:flex;flex-direction:column;gap:8px;min-width:72px;max-width:135px;overflow-wrap:anywhere}#face-spotlight small{font-size:11px;color:#466765}#focus-face-caption{font-size:13px}
#focus-face-screen{width:62%;max-width:410px;height:100%;max-height:185px;min-height:100px;border:7px solid #81999a;border-radius:26px;background:#234b56;padding:0;overflow:hidden;box-shadow:inset 0 0 0 1px #183c46;flex-shrink:0}
#focus-face-canvas{display:block;width:100%;height:100%;object-fit:contain}#focus-light-caption{max-width:80px}
.face-study #run-details{display:none!important}
#hints-dialog{width:min(660px,calc(100vw - 40px))}.hint-steps{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:18px}.hint-steps button{font-size:11px;min-height:36px;padding:6px 10px}.hint-steps [aria-pressed=true]{background:#397c78;color:white;border-color:#397c78}
#hint-content{padding:20px;background:white;border:1px solid #c9ddda;border-radius:12px;min-height:210px}.hint-eyebrow{color:#427d74;font-size:11px}#hint-content h3{font-size:18px;margin:6px 0 14px}#hint-content p{font-size:14px;line-height:1.9}.hint-position{color:#647e7c;font-size:12px!important}.hint-actions{display:flex;gap:9px;margin-top:18px}.hint-actions button{font-size:12px}.hint-note{font-size:11px;color:#647e7c}
.direction-hint{display:flex;gap:12px;justify-content:space-around;background:#eef5f2;border-radius:8px;padding:12px;margin-bottom:10px}.direction-hint span{display:flex;flex-direction:column;align-items:center;font-size:11px}.direction-hint b{font-size:35px;line-height:1.4;color:#306965}
.hint-sample{display:flex;gap:8px;align-items:center;padding:6px 0}.hint-sample>div{display:flex;flex-direction:column;align-items:center;position:relative;border:1px solid #abc7bd;border-top:4px solid #397f7d;border-radius:6px;background:#f3f8f5;width:100px;padding:8px;gap:3px}.hint-sample svg{width:26px;height:26px}.hint-sample small{position:absolute;left:5px;top:3px}.hint-sample b{font-size:12px}.hint-sample span{font-size:11px}
@media(max-height:740px){#run-watch.wrapped-watch{min-height:178px}.wrapped-watch .watch-sequence{gap:14px 11px}.wrapped-watch .watch-block{min-height:61px}.wrapped-watch .watch-block svg{width:20px;height:20px}.run-help{margin-top:6px}#reflection-panel{padding-top:6px}.expression-lesson #run-details .brick #brick-screen{height:60px;min-height:60px;width:118px}#run-details{margin-top:6px}.face-study #run-stage .simulation{grid-template-rows:34px minmax(120px,1fr) minmax(132px,.8fr) 18px 12px}#face-spotlight{padding:8px 12px;gap:10px}#focus-face-screen{max-height:150px;min-height:100px}.run-header{min-height:48px}.run-header h2{font-size:15px}.run-body{padding-top:8px;padding-bottom:8px}}

.brand{min-height:58px;padding:6px 20px;background:#223c43}.brand-identity{display:flex;align-items:center;gap:12px}.toco-brand-mark{height:46px;width:52px;display:block;object-fit:contain}.brand-name{display:flex;flex-direction:column;gap:0}.brand .brand-name b{color:#f5faf7;font-weight:750;font-size:23px;margin:0;letter-spacing:.08em}.brand-name small{font-size:10px;color:#b8d7d0;letter-spacing:.08em}.brand-name small span{margin-left:10px;color:#e1eae4}
@media(max-height:740px){.brand{min-height:50px;padding:4px 18px}.toco-brand-mark{height:41px;width:47px}.brand .brand-name b{font-size:21px}}

.wrapped-watch .watch-block:last-child::after{content:none}

#preview-dock #face-spotlight{display:none!important}
.expression-lesson #run-details .brick{display:grid;grid-template-columns:150px minmax(0,1fr);align-items:center;gap:6px}
.expression-lesson #run-details .brick #brick-screen{grid-row:1/3}.expression-lesson #run-details #face-caption{text-align:left;margin:0;overflow-wrap:anywhere}.expression-lesson #run-details .brick-bottom{margin:0;justify-content:flex-start;gap:4px}
@media(max-height:740px){.expression-lesson #run-details .brick{grid-template-columns:118px minmax(0,1fr)}}
.hint-map{display:block;max-height:165px;width:100%;background:#f2f7f5;border-radius:8px;margin:10px 0}.hint-map-key{font-size:11px!important;margin:0!important;color:#4e6d68}

#run-watch.wrapped-watch{min-height:214px}.watch-block output:empty{display:none}.watch-node.finished::after{pointer-events:none}
.expression-lesson #run-details .panel-heading{display:none}#reflection-panel>div{gap:4px;flex-wrap:wrap;margin:5px 0}#reflection-panel #run-save{background:#eef6f3;border-color:#9fbbb0}.run-challenge-details{font-size:10px}.run-challenge-details summary{cursor:pointer;line-height:1.8}.run-challenge-details[open]{max-height:75px;overflow:auto}

/* v0.14.3: balance the brand, editing space and course on laptop screens. */
.brand{min-height:54px;padding:5px 18px}
.brand-identity{gap:10px}
.toco-brand-mark{width:45px;height:31px}
.brand .brand-name b{font-size:22px;line-height:1.3;letter-spacing:.06em}
.brand-name small{font-size:9px;line-height:1.5;letter-spacing:.04em}
.preview-badge{font-size:10px;color:#c1d5d1;border-color:#698583}
.studio-layout{grid-template-columns:minmax(0,1fr) clamp(288px,25vw,360px);gap:12px}
.editor-panel{border-color:#c7d5d1;box-shadow:none}
.canvas-toolbar{min-height:40px;background:#fbfdfc;border-bottom-color:#dce6e2}
#canvas-scroll{background-color:#fff;background-image:radial-gradient(#dce6e2 .65px,transparent .65px);background-size:20px 20px}
#canvas-content{padding:29px 28px 44px 20px}
.palette{background:#f2f6f3}
.palette-heading{background:#e8f0eb;border-bottom:1px solid #dbe6df}
#preview-dock{gap:10px}
#preview-dock .simulation{flex-shrink:0;padding:12px;border-color:#c7d5d1;background:#fff}
#preview-dock .course-heading{margin-bottom:9px;font-size:12px}
#preview-dock .course-heading button{font-size:11px;min-height:30px}
#preview-dock .robot-intro{min-height:44px;margin-bottom:8px;gap:9px}
#preview-dock #toco-message{font-size:11px;line-height:1.5}
#preview-dock #course-size{font-size:9px}
#preview-dock .stage-visual{aspect-ratio:2}
#preview-dock .field{max-width:none}
#preview-dock .motion-caption{font-size:11px;margin-top:8px}
#preview-dock .pose-readout{font-size:10px}
#mission-card{display:grid;grid-template-columns:1fr 1fr;gap:7px 8px;padding:12px!important;flex-shrink:0;background:#f8fbf9;border-color:#d4e0da}
#mission-card>small,#mission-card>b,#mission-card>p,#mission-card>details{grid-column:1/-1}
#mission-card>b{font-size:12px}
#mission-card>small{font-size:10px}
#mission-card #open-hints{grid-column:1;grid-row:3}
#mission-card #save-project{grid-column:2;grid-row:3;background:white}
#mission-card button{min-height:32px;font-size:10px;padding:4px 7px}
#mission-card details{padding-top:5px;margin-top:2px}
#mission-card summary{min-height:22px}
#mission-card #sound-toggle{grid-column:1/-1}
#run-dialog .run-body{grid-template-columns:minmax(0,1fr) 350px;gap:18px}
#run-stage .robot-intro{width:100%;padding:0 8px}
#run-stage .stage-visual{border:1px solid #d2dfdf}
.run-right{padding-left:16px}
#run-watch.wrapped-watch{padding:8px 10px}
.wrapped-watch .watch-lane{padding-bottom:0}
.wrapped-watch .watch-sequence{gap:10px 13px;padding:5px 2px 2px}
.wrapped-watch .watch-block{min-height:60px;line-height:1.3;gap:1px}
.wrapped-watch .watch-block>div{line-height:1}
.wrapped-watch .watch-block svg{width:20px;height:20px}
.wrapped-watch .watch-block:nth-of-type(3n):not(:last-child)::after{bottom:-15px}
#face-spotlight{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:22px minmax(0,1fr);gap:5px 12px;padding:10px 14px}
#face-spotlight>div:first-child{min-width:0;max-width:none;flex-direction:row;align-items:center;gap:12px;overflow:hidden}
#focus-face-caption{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#focus-light-caption{grid-column:2;grid-row:1;max-width:none;text-align:right;font-size:10px}
#focus-face-screen{grid-column:1/-1;grid-row:2;justify-self:center;width:min(100%,340px);height:100%;min-height:70px;max-height:170px;border-width:6px;border-radius:24px}
@media(max-width:1150px){
 .studio-layout{grid-template-columns:minmax(0,1fr) 278px;gap:10px}
 #preview-dock .simulation{padding:10px}
 #preview-dock #course-size{font-size:8px}
 #run-dialog .run-body{grid-template-columns:minmax(0,1fr) 320px;gap:12px}
 .run-right{padding-left:12px}
}
@media(max-height:740px){
 .brand{min-height:50px;padding:4px 18px}
 .brand .brand-name b{font-size:21px}
 #preview-dock .robot-intro{min-height:36px;margin-bottom:6px}
 #preview-dock .course-heading{margin-bottom:6px}
 #preview-dock .motion-caption{margin-top:5px}
 #mission-card{gap:5px 8px;padding:10px!important}
 #face-spotlight{padding:8px 12px;grid-template-rows:19px minmax(0,1fr);gap:4px 10px}
}

/* v0.15: the same Toco model greets the learner in a readable portrait. */
#preview-dock .robot-intro{min-height:66px;gap:8px;margin:3px 0 9px}
#preview-dock #toco-avatar{width:64px;height:66px;flex-shrink:0}
#preview-dock .robot-intro>div:nth-child(2){min-width:0;flex:1}
#preview-dock #toco-message{padding:6px 8px;margin:3px 0 0;border-radius:3px 10px 10px 10px;background:#edf6f1;color:#335f5d;line-height:1.5;font-size:11px}
#preview-dock #course-size{align-self:flex-start;margin-top:6px;font-size:8px}
#preview-dock .goal-tile{font-size:13px}
#preview-dock .goal-tile small{display:none}
#run-stage #toco-avatar{width:42px;height:42px;flex-shrink:0}
#run-stage .robot-intro{height:46px;min-height:46px}
#run-stage .simulation{grid-template-rows:48px minmax(0,1fr) 22px 14px}
.face-study #run-stage .simulation{grid-template-rows:48px minmax(120px,1fr) minmax(155px,.75fr) 20px 14px}
@media(max-height:740px){
 #preview-dock .robot-intro{min-height:62px;margin-bottom:7px}
 #preview-dock #toco-avatar{width:60px;height:62px}
 .face-study #run-stage .simulation{grid-template-rows:44px minmax(120px,1fr) minmax(132px,.8fr) 18px 12px}
 #run-stage .robot-intro{height:42px;min-height:42px}
}

/* v0.16: direct observation of real sensor-driven programs. */
#open-demos{color:#286d66}
#demo-dialog{width:calc(100vw - 24px);max-width:1440px;height:calc(100dvh - 24px);max-height:900px;padding:0;border:1px solid #c8d8d0;border-radius:16px;background:#f8faf7;color:#293f43;overflow:hidden}
#demo-dialog[open]{display:flex;flex-direction:column}#demo-dialog::backdrop{background:#153b40a8;backdrop-filter:blur(3px)}
.demo-header{display:flex;align-items:center;gap:20px;padding:14px 18px;border-bottom:1px solid #d4dfd8;background:white;flex-shrink:0}.demo-header small{font-size:9px;letter-spacing:.13em;color:#6a8b83}.demo-header h2{font-size:19px;margin:2px 0}.demo-header nav{display:flex;gap:6px;margin-left:auto}.demo-header button{font-size:12px;min-height:38px}.demo-header button[aria-pressed=true]{background:#285e58;color:#fff;border-color:#285e58}#close-demo{font-size:24px;width:38px;padding:0}
.demo-body{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;padding:14px;flex:1;min-height:0}.demo-stage{position:relative;min-width:0;min-height:0;border:1px solid #cfdbd7;border-radius:12px;overflow:hidden;background:#edf3f6}.demo-stage>canvas{width:100%;height:100%;display:block}.demo-view-tools{position:absolute;inset:10px 10px auto;display:flex;gap:5px;z-index:1;align-items:center}.demo-view-tools button,.demo-view-tools select{font-size:11px;padding:4px 8px;min-height:32px}.demo-view-tools button[aria-pressed=true]{background:#285e58;color:#fff;border-color:#285e58}.demo-view-tools label{margin-left:auto;background:#fff;padding:3px 7px;border-radius:6px;font-size:11px}.demo-stage-note{position:absolute;bottom:10px;left:10px;right:10px;padding:7px 10px;background:#ffffffed;border-radius:7px;font-size:12px;line-height:1.5}#demo-error{position:absolute;top:60px;left:16px;right:16px;background:#fff1e8;padding:12px;border:1px solid #b65a32}
.demo-explain{min-height:0;overflow:auto}.demo-card-label{display:flex;justify-content:space-between;align-items:center;font-size:13px}.demo-card-label span{font-size:10px;color:#6c827b}#demo-sensor-view{display:block;width:100%;height:88px;border:1px solid #cad8d2;border-radius:9px;margin-top:8px;background:white}.demo-reading{display:flex;align-items:center;justify-content:space-between;margin:8px 0 3px;font-size:11px}.demo-reading strong{font-size:25px;font-variant-numeric:tabular-nums}.reflection-scale{height:8px;background:linear-gradient(90deg,#25343d,#fff);border:1px solid #c1cdc7;border-radius:5px;position:relative}.reflection-scale span{position:absolute;left:0;top:-4px;height:14px;border-right:3px solid #c74629}.reflection-scale i{position:absolute;left:50%;top:-2px;height:11px;border-right:1px solid #467a75}.scale-labels{display:flex;justify-content:space-between;font-size:9px;color:#71847c;margin-top:3px}
.demo-loop{border:2px solid #cb9a44;border-radius:9px;padding:8px;margin-top:10px;background:#fffaf0}.demo-loop>b{font-size:12px;color:#815d24}.demo-decision{border-top:1px solid #e3cc9d;margin-top:6px;padding:7px 0;font-size:11px}.demo-decision small{display:block;color:#697970;margin-top:3px;font-size:10px}.demo-branches{display:grid;grid-template-columns:1fr 1fr;gap:7px}.demo-branches>div{display:flex;flex-direction:column;gap:5px;padding:8px 5px;background:white;border:1px solid #cad5ce;border-top:4px solid #397f7d;border-radius:6px;opacity:.65;font-size:11px}.demo-branches span{font-size:10px}.demo-branches strong{font-size:11px}.demo-branches .chosen,.rear-program .chosen{border-color:#397f7d;opacity:1;background:#e0f0e7;box-shadow:0 0 0 2px #89bba5}
.demo-explanation{font-size:12px;line-height:1.8;margin:10px 0}.demo-small{font-size:10px;color:#627c75;line-height:1.7;margin:8px 0}.demo-motors{display:flex;align-items:center;justify-content:space-between;padding:10px;background:#eaf2ed;border-radius:8px;font-size:11px;margin-top:10px}.demo-motors b{font-variant-numeric:tabular-nums}
.rear-diagram{display:flex;justify-content:space-between;padding:12px 8px;margin:20px 0;border:5px solid #b0dacf;border-radius:12px;background:#e9f1ec;gap:8px}.rear-diagram span{font-size:10px;border-radius:5px;padding:7px 4px;background:#f8faf7;border:1px solid #bbcdc2}.rear-diagram .contact{background:#285e58;color:white}.rear-program{padding-left:25px;display:grid;gap:10px;margin-top:18px}.rear-program li{padding:9px 6px;border:1px solid #cad5ce;border-radius:6px;font-size:12px;background:white}
.demo-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 18px;border-top:1px solid #d3ded7;background:white;flex-shrink:0}.demo-footer p{font-size:12px;margin:0}.demo-footer>div{display:flex;gap:6px}.demo-footer button{font-size:12px;min-height:36px}
@media(max-width:1100px){.demo-body{grid-template-columns:minmax(0,1fr) 290px;gap:10px;padding:10px}.demo-header{gap:10px;padding:10px 14px}.demo-header h2{font-size:16px}.demo-header nav button{font-size:10px}.demo-view-tools label{margin-left:0}.demo-stage-note{font-size:10px}.demo-footer{padding:10px 14px}.demo-footer p{font-size:11px}}
@media(max-height:740px){.demo-header{padding-top:8px;padding-bottom:8px}.demo-body{padding:10px}.demo-explain #demo-sensor-view{height:74px}.demo-reading strong{font-size:22px}.demo-loop{margin-top:7px}.demo-explanation{margin:7px 0}.demo-footer{padding-top:8px;padding-bottom:8px}}

/* v0.17: compact parameter strip, consistent mode selectors, flow containers. */
.block.kind-steer,.block.kind-drive{width:152px}.motor-controls{display:grid;grid-template-columns:1fr 1fr;gap:5px;width:100%;font-size:10px}.motor-controls>select,.motor-ports,.on-note{grid-column:1/-1}.motor-controls label{display:flex;flex-direction:column;gap:2px}.motor-controls input{width:100%!important;min-width:0}.motor-controls>select{width:100%;font-size:11px}.motor-ports{color:#5b6f73;font:10px monospace}.block.kind-steer .params,.block.kind-drive .params{display:block}.motor-controls .duration-input{flex-direction:row;align-items:center;grid-column:1/-1;justify-content:space-between}.motor-controls .duration-input input{width:65px!important}.block.kind-steer .block-main,.block.kind-drive .block-main{height:38px}.block.kind-W{width:166px}.block.kind-W .params{display:block}.block.kind-W .params>select{width:100%;font-size:11px}.condition-inputs{display:flex;gap:4px;align-items:center;flex-wrap:wrap;font-size:11px}.condition-inputs input{width:58px!important}.condition-inputs select{width:auto!important;max-width:140px;font-size:11px;flex-basis:auto!important}.condition-inputs .port-select{width:39px!important}.flow-settings{display:flex;gap:6px;align-items:center}.flow-settings>select{max-width:180px;font-size:11px}.loop-end{width:184px;min-width:184px;display:flex;flex-direction:column;padding:9px;background:#f8f0e5;border-left:1px solid #dbc398;align-self:stretch;justify-content:center}.loop-end .flow-settings{flex-direction:column;align-items:stretch}.loop-end .flow-settings>select{width:100%}.loop-end small{font-size:10px}.container-head{flex-wrap:wrap;gap:6px}.container-head .loop-name{width:100px;font-size:11px;min-height:28px}.container-footer{font-size:10px}.case-tabs{display:flex;gap:4px;padding:6px 8px;background:#faf6ee}.case-tabs button{font-size:10px;min-height:26px;padding:3px 8px}.case-tabs button[aria-pressed=true]{border-color:#ad772b;background:#f5dfb9}.case-label{width:88px;min-width:88px;display:flex;flex-direction:column;font-size:10px}.case-label select{width:72px;font-size:10px}.case-label button{min-height:22px;padding:1px 6px}.block.kind-interrupt{width:120px}.block.kind-interrupt .params select{width:100%;font-size:11px}.lesson-mode .loop-end{width:105px;min-width:105px}.lesson-mode .loop-name,.lesson-mode .case-tabs{display:none}.continuous-field{background-image:none!important}.watch-block.kind-steer,.watch-block.kind-drive{width:108px}.watch-case>b{font-size:10px;min-width:36px}.watch-block span{white-space:normal}.sensor-extra{gap:3px 12px}.sensor-extra b{font-size:10px}

/* v0.18: named value sockets and compact, mode-dependent inputs. */
.input-ports{position:absolute;left:4px;bottom:-20px;display:flex;gap:2px;max-width:calc(100% - 45px);z-index:6}.input-ports .data-port.in{position:static;min-width:24px;padding:0 3px;font-size:9px;height:24px;min-height:24px;white-space:nowrap}.data-port.text{background:#f8eefb;border-color:#9c6aaa;color:#744780}.wired-value{padding:3px 6px;border-radius:3px;background:#fff6dc;border:1px solid #dcc784;font-size:11px;white-space:nowrap}.param-field{display:flex;align-items:center;gap:3px}.param-field small{min-width:12px;font-size:9px;white-space:nowrap}.params:has(.param-field),.kind-variable .params,.kind-constant .params,.kind-timer .params,.kind-rotation .params,.kind-B .params{flex-wrap:wrap;align-content:flex-start}.kind-S .params>select,.kind-math .params>select,.kind-logic .params>select,.kind-timer .params>select,.kind-rotation .params>select{width:100%;flex-basis:100%}.params .param-field input{width:45px}.kind-variable .params>.wide,.kind-constant .params>.wide{width:100%}.drawing-unit{width:100%;font-size:8px;color:#6a7873}.selection-options{flex-wrap:wrap}.selection-options select{max-width:210px}.kind-D .params{max-width:150px}.block:has(.input-ports .data-port:nth-child(3)){min-width:146px}.container>.input-ports{bottom:-17px}.kind-S .params{max-width:150px}.kind-math,.kind-logic,.kind-variable,.kind-constant,.kind-timer,.kind-rotation{min-width:126px}

/* Execution shows compact wrapped groups; editing retains left-to-right sequences. */
.wrapped-watch .watch-group{grid-column:1/-1;min-width:0;width:100%;box-sizing:border-box}.wrapped-watch .watch-group-head{flex-wrap:wrap;gap:3px}.wrapped-watch .watch-group .watch-sequence{grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.wrapped-watch .watch-case{display:block}.wrapped-watch .watch-case>b{display:block;text-align:left}.wrapped-watch .watch-block.kind-steer,.wrapped-watch .watch-block.kind-drive{width:100%}.wrapped-watch .watch-group .watch-block{min-height:70px}.wrapped-watch .watch-group .watch-block span{font-size:8px}.kind-arm .params,.kind-measure .params{flex-wrap:wrap}.kind-arm .params>select,.kind-measure .params>select{flex-basis:100%;width:100%}

.wrapped-watch .watch-block{min-width:0;max-width:100%;overflow-wrap:anywhere}

/* v0.19: visible, named input/output terminals and direct value-wire editing. */
.io-panel{position:relative;padding:5px 4px 4px;border-top:1px solid #bfc9bf;background:#f6f7f1;border-radius:0 0 6px 6px}
.io-label{font-size:9px;line-height:13px;font-weight:700;color:#576861;margin-bottom:2px}
.io-panel .input-ports{position:static;display:flex;flex-wrap:wrap;gap:4px;max-width:none;width:100%;margin-bottom:4px}
.io-panel .data-port{position:relative;inset:auto;min-height:30px;height:auto;padding:3px 4px;font:600 10px/1.25 -apple-system,BlinkMacSystemFont,"Yu Gothic",sans-serif;touch-action:none}
.io-panel .data-port.in{display:grid;grid-template-columns:auto 1fr;gap:1px 3px;flex:1;min-width:38px;text-align:center;min-height:36px;font-size:10px}
.io-panel .data-port.in small{grid-column:1/-1;font-size:9px;color:#70510b;font-weight:400}
.io-panel .data-port.out{display:flex;align-items:center;justify-content:space-between;gap:3px;width:100%;text-align:left;min-height:30px;margin-top:3px;border-radius:3px 3px 7px 7px;background:#f9e8af;border-color:#a67c16}
.io-panel .data-port.out b{font-size:10px;font-weight:650;overflow-wrap:anywhere}.io-panel .data-port.out span,.io-panel .data-port.out small{font-size:9px;white-space:nowrap}
.io-panel .data-port.logic{background:#e5effc;border-color:#507caa;color:#27577c}.io-panel .data-port.text{background:#f4e7f7;border-color:#9262a0;color:#744780}
.io-panel .data-port.armed{outline:3px solid #315f80;outline-offset:1px;background:#e4edf6}
.io-panel .data-port.compatible{outline:2px solid #3a7890;outline-offset:1px;box-shadow:0 0 0 4px #c6e5e8}
.io-panel .data-port.unavailable{opacity:.45}.io-panel .data-port.drop-ready{outline-width:4px;background:#d8edf0}
.io-panel .value-tag{position:static;display:block;padding:0 2px;font-size:9px;text-align:right;background:transparent;min-height:13px;color:#68551f}.io-panel .value-tag:before{content:'最後の値：';color:#738078}
.container>.io-panel{position:absolute;right:6px;bottom:-66px;width:140px;border:1px solid #d9c492;z-index:4}.container>.io-panel:has(.input-ports){bottom:-106px}
#wire-tools{display:flex;gap:8px;align-items:center;min-height:32px;padding:3px 10px;border-bottom:1px solid #d6ded8;background:#fff9e8;font-size:11px;flex-shrink:0}
#wire-help{flex:1}#wire-tools button{min-height:26px;font-size:10px;padding:2px 8px;white-space:nowrap}
#wire-draft{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;z-index:1000;overflow:visible}.wiring-drag{user-select:none;cursor:crosshair}
.container-body{padding-bottom:48px}.switch-body{padding-bottom:45px}.lanes{gap:120px}#canvas-content{padding-bottom:125px}
.kind-math .params .param-field{flex:1}.kind-math .params .wired-value{min-width:42px;text-align:center}

/* v0.20: pictograms, modes, parameter values and sockets share a compact baseline. */
body:not(.lesson-mode) #wire-tools[hidden]{display:none}
body:not(.lesson-mode) .sequence{min-height:112px;align-items:center}
body:not(.lesson-mode) .insert{width:21px;min-width:21px;margin:0}
body:not(.lesson-mode) .insert button{width:19px;min-height:23px;height:23px;font-size:15px;border-radius:4px;opacity:0;border-color:transparent;background:#f6faf7}
body:not(.lesson-mode) .insert:hover button,body:not(.lesson-mode) .insert.target button,body:not(.lesson-mode) .insert button:focus-visible,body:not(.lesson-mode) .sequence.empty .insert button{opacity:1}
body:not(.lesson-mode) .sequence.empty .insert{width:100px;min-width:100px}
body:not(.lesson-mode) .sequence.empty .insert button{width:96px}
body:not(.lesson-mode) .lanes{gap:65px}
body:not(.lesson-mode) #canvas-content{padding:28px 20px 80px 12px}
body:not(.lesson-mode) #start-block{font-size:0;width:44px;min-width:44px;padding:8px 5px;align-self:center}
body:not(.lesson-mode) #start-block svg{width:28px;height:28px}
.compact-node .compact-block{width:max-content;min-width:58px;border:1px solid #a1aaa7;border-top:0;border-radius:5px;background:linear-gradient(#fff,#e9ecea);box-shadow:0 2px 0 #c5cdca}
.compact-cap{height:13px;border-radius:4px 4px 0 0;background:var(--cat);color:white;display:flex;align-items:center;justify-content:space-between;padding:0 4px;font:9px/1 ui-monospace,monospace;position:relative}
.compact-cap>span:first-child{opacity:.7}
.hardware-badge{display:inline-flex;align-items:center;justify-content:center;background:#f7f9f4;border:1px solid #a7b1a6;min-width:27px;height:19px;padding:0 3px;line-height:17px;color:#43514a;border-radius:3px;font:10px ui-monospace,monospace;z-index:4;white-space:nowrap}
.compact-cap .hardware-badge{margin-top:-6px}
.hardware-badge select,.compact-block .hardware-badge select.port-select{min-height:18px;height:18px;padding:0;border:0;background:transparent;font:10px ui-monospace,monospace;width:29px;min-width:29px;color:#354d45}
.compact-body{display:flex;align-items:stretch;min-height:65px}
.block-identity{width:40px;min-width:40px;display:flex;flex-direction:column;justify-content:space-between;align-items:center;border-right:1px solid #c6cfca}
.block-identity>button{display:flex;align-items:center;justify-content:center;width:39px;height:36px;min-height:36px;padding:2px;border:0;background:none;border-radius:0;color:#40554d;cursor:grab;position:relative;z-index:4}
.block-identity>button:focus-visible{outline:2px solid #347da4;outline-offset:-3px}.block-identity>button svg{pointer-events:none}
.compact-mode{display:flex;align-items:center;justify-content:center;width:100%;min-height:28px;background:#dfe5e0;border-top:1px solid #c2cdc5;border-radius:0 0 3px 3px}
.compact-pick{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:25px;font:600 15px/1.1 ui-sans-serif,sans-serif;color:#364b43;white-space:nowrap}
.compact-pick>span{display:flex;align-items:center;justify-content:center;gap:2px;pointer-events:none;padding-right:7px}
.compact-pick::after{content:'';position:absolute;right:1px;bottom:3px;border:3px solid transparent;border-top-color:#687e73;pointer-events:none}
.compact-pick>select{position:absolute;inset:0;opacity:0;width:100%;height:100%;min-height:0;margin:0;padding:0;cursor:pointer;font-size:13px;z-index:5}
.compact-pick:focus-within{outline:2px solid #397fa3;border-radius:3px}.compact-mode .compact-pick{width:100%;height:27px}.compact-fixed{font-size:18px;color:#455f4f}
.compact-fields{display:flex;align-items:stretch}
.compact-field{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-width:38px;width:38px;border-left:1px solid #d2d8d4;padding:2px 2px 10px;min-height:65px;flex-shrink:0}
.compact-field:first-child{border-left:0}.compact-field:has(input[type=text]){width:83px}
.param-symbol{display:flex;align-items:center;justify-content:center;height:25px;min-height:25px;font:600 13px/1 ui-sans-serif,sans-serif;color:#607168}
.param-symbol svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.param-symbol sup{font-size:8px;margin-left:-1px}
.param-value{display:flex;align-items:center;justify-content:center;min-height:25px;width:100%}
.compact-field input[type=number],.compact-field input[type=text]{min-width:0;width:100%;height:25px;min-height:25px;padding:1px 0;border:1px solid #bcc6be;border-radius:2px;background:#f7faf6;box-shadow:inset 0 1px 2px #33443312;font:600 12px/1.3 ui-monospace,monospace;text-align:center;color:#293e33;appearance:textfield;-moz-appearance:textfield}
.compact-field input[type=number]::-webkit-inner-spin-button,.compact-field input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.compact-field input:focus{outline:2px solid #367faa;outline-offset:0;background:white}
.compact-field .wired-value{width:100%;text-align:center;min-width:0;height:25px;padding:3px 0;border-radius:2px;background:repeating-linear-gradient(135deg,#edf0eb,#edf0eb 4px,#e2e7df 4px,#e2e7df 5px);border-color:#bac4ba;color:#647163;font-size:15px}
.compact-field.output-field{background:#e3e9e2;min-width:33px;width:33px;border-radius:0 0 4px 0}
.output-value{display:block;max-width:31px;overflow:hidden;text-overflow:ellipsis;text-align:center;min-height:25px;line-height:25px;font:10px/25px ui-monospace,monospace;color:#526b59}
.compact-field .data-port{position:absolute;bottom:-9px;top:auto;left:50%;right:auto;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;width:24px;min-width:24px;height:19px;min-height:19px;padding:0;border:1px solid #a88a36;border-radius:2px;background:#f4e2a6;color:#755c1d;z-index:6;touch-action:none;font:600 13px/1 ui-sans-serif,sans-serif}
.compact-field .data-port.out{border-radius:2px 2px 7px 7px;background:#e2bf59}.compact-field .data-port.logic{background:#e2edf8;border-color:#4e789d;color:#345f83}.compact-field .data-port.text{background:#eedff1;border-color:#94659c;color:#774881}
.compact-field .data-port.connected{box-shadow:inset 0 0 0 2px #bca34f}.compact-field .data-port.armed{outline:3px solid #36799b;outline-offset:2px;background:#d9ebf3}.compact-field .data-port.compatible{outline:2px solid #347b98;outline-offset:2px;box-shadow:0 0 0 4px #c0e5ec}.compact-field .data-port.unavailable{opacity:.35}.compact-field .data-port.drop-ready{outline:4px solid #347b98;background:#d9ebf3}
.compact-block>.seq-in,.compact-block>.seq-out{top:29px;width:9px;height:9px;border-radius:3px;border-width:1.5px;background:#c2d3d0}
.compact-container{border-radius:10px;border-width:2px;background:#fffefa;box-shadow:none}
.compact-container>.container-head{height:23px;min-height:23px;padding:0 6px;gap:5px;flex-wrap:nowrap;background:linear-gradient(#efbc63,#dfaa4c);border-radius:7px 7px 0 0;color:#7e581e}
.compact-container>.container-head>button{height:22px;min-height:22px;width:24px;padding:0;background:transparent;border:0}
.compact-container .loop-name{height:20px;min-height:20px;padding:0 4px;width:85px;font-size:10px;border:1px solid #cfa252;background:#fff8e5}
.compact-container .container-body{padding:10px 0 37px 4px;gap:0;align-items:stretch}.compact-container .container-body>.sequence{min-height:112px}
.compact-container .loop-end{min-width:45px;width:auto;max-width:none;padding:4px;background:#faf2dd;justify-content:center;gap:3px;align-items:center;border-radius:0 0 7px 0;border-left:2px solid #dbb36b}
.compact-flow{display:flex;align-items:stretch;gap:0}.compact-flow>.compact-mode{width:33px;min-width:33px;align-self:stretch;border:1px solid #cfba8e;border-radius:3px;background:#f1e4c8}
.loop-end .compact-flow{flex-wrap:wrap;justify-content:center;max-width:160px}.loop-end .compact-flow>.compact-mode{width:100%;height:25px;min-height:25px}.loop-end .compact-flow .compact-field{min-height:57px;padding-bottom:7px;min-width:35px;width:35px;background:none}.loop-end .compact-flow .compact-field .param-symbol{height:20px;min-height:20px}
.compact-container>.seq-in,.compact-container>.seq-out{top:64px}
.compact-container>.container-head:has(.compact-flow){height:77px;min-height:77px;align-items:flex-start;padding:4px 8px}.compact-container>.container-head .compact-flow{align-self:center;background:#faf3e3;border-radius:4px;border:1px solid #d2b476}
.compact-container .switch-body{padding:8px 8px 34px}.compact-container .case-row{min-height:130px;padding:6px 0 30px}.compact-container .case-label{min-width:34px;width:34px;font-size:12px}.compact-container .case-label:has(select){min-width:72px;width:72px}.compact-container .case-tabs{padding:4px 8px}.compact-container .case-tabs button{min-height:23px}
.color-chip{display:inline-block;width:12px;height:12px;border-radius:50%;border:1px solid #6e7c73}
body:not(.lesson-mode) .lane-title{font-size:10px;margin-bottom:15px;color:#8a948d}body:not(.lesson-mode) .lane-title b{display:none}body:not(.lesson-mode) .selection-row{min-height:36px}
.selection-hint{max-width:470px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.connection-details{margin-top:4px;font-size:10px;color:#667b70}.connection-details summary{cursor:pointer;min-height:20px}.connection-details[open] .selection-options{padding:5px 0}
body:not(.lesson-mode) .palette-item{width:64px;min-width:64px;height:51px;font-size:9px;gap:2px;padding:4px 3px}body:not(.lesson-mode) .palette-item svg{width:26px;height:26px}

.wired-value svg{display:block;margin:auto;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
/* Connection guidance floats above the canvas: arming a socket must not move its target. */
body:not(.lesson-mode) .editor-panel{position:relative}
body:not(.lesson-mode) #wire-tools{position:absolute;left:0;right:0;top:61px;z-index:20;border:1px solid #ddcf9d;border-radius:0 0 5px 5px;box-shadow:0 2px 5px #38442b15}
body:not(.lesson-mode) .dragging .insert button{opacity:1}
.selection-name .selection-hint{display:block;flex:1;min-width:0}
.selection-name{flex:1;overflow:hidden}.selection-name b{flex-shrink:0}

/* v0.21: selectable wires and recognisable, original equipment illustrations. */
#data-wires .data-wire{pointer-events:none;outline:none}
#data-wires .wire-hit{stroke:transparent;stroke-width:14px;fill:none;pointer-events:stroke;cursor:pointer}
#data-wires .wire-line{stroke:var(--wire-color);stroke-width:2.5px;stroke-linejoin:round;fill:none}
#data-wires .wire-arrow{stroke:var(--wire-color);stroke-width:2px;fill:none}
#data-wires .data-wire circle{fill:var(--wire-color)}
#data-wires .data-wire:hover .wire-line,#data-wires .data-wire:focus-visible .wire-line{stroke-width:4px;filter:drop-shadow(0 0 2px #6b796f66)}
#data-wires .data-wire.selected .wire-line{stroke:#337bb2;stroke-width:4px;filter:drop-shadow(0 0 3px #78b7da70)}
#data-wires .data-wire.selected .wire-arrow{stroke:#337bb2}#data-wires .data-wire.selected circle{fill:#337bb2}
.compact-field .data-port.wire-selected{outline:2px solid #337bb2;outline-offset:2px;background:#e1effb}
#wire-popover{position:absolute;z-index:12;width:112px;height:30px;pointer-events:auto}
#wire-popover[hidden]{display:none}
#wire-remove{width:112px;height:30px;min-height:30px;border:1px solid #3779a8;background:#fff;color:#265d80;box-shadow:0 3px 8px #344b5d26;font-size:11px;font-weight:650;padding:2px 6px;border-radius:5px;white-space:nowrap}
#wire-remove:hover{background:#e5f0f8}
.wire-selection-note{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:5px 0;font-size:11px;color:#315e7a}.wire-selection-note span{font-size:10px;color:#67818c}
.block-identity>button svg.block-art{width:34px;height:34px;filter:drop-shadow(0 1px 0 #fff)}
body:not(.lesson-mode) .palette-item svg.block-art{width:31px;height:31px}
body:not(.lesson-mode) .palette-item{height:57px}
.compact-pick .mode-art{width:21px;height:21px;flex-shrink:0}.param-symbol .mode-art{width:20px;height:20px}
.compact-field .param-symbol{color:#384e47}
.compact-block .hardware-badge{background:#fff;border-color:#899b93}
.compact-block{box-shadow:0 2px 1px #a9b4ad!important}

/* v0.22: one physical block shell for every PC block and palette entry. */
:root{--action:#75aa24;--flow:#ef8b17;--sensor:#e4bd25;--data:#c33e45}
.compact-node{--shell-edge:#a9aaab;--shell-face:#f4f4f4}
.compact-node .compact-block,.switch-test,.loop-end{border:1px solid var(--shell-edge);border-radius:7px 7px 4px 4px;background:linear-gradient(#fff 0%,#f8f8f8 45%,#dedfe0 100%);box-shadow:inset 0 1px #fff,0 2px 1px #0002!important}
.compact-node .compact-block{min-width:66px;min-height:77px}
.compact-cap,.flow-cap,.palette-cap{height:14px;background:radial-gradient(#ffffff80 .6px,transparent .8px) 0 0/3px 3px,linear-gradient(#ffffff65,transparent 70%),var(--cat);border-radius:6px 6px 0 0;border-bottom:1px solid #0002;box-shadow:inset 0 1px #fff8}
.compact-cap{position:relative;justify-content:flex-end;padding:0 3px}
.compact-cap .block-number{position:absolute;top:-15px;left:2px;font:9px ui-monospace,monospace;color:#8a9191;opacity:0}
.node:hover .block-number,.node.selected .block-number{opacity:1}
.hardware-badge{border-radius:1px;min-width:28px;height:15px;line-height:15px;padding:0 2px;font-size:10px;border-color:#92999a;background:#fff!important}
.compact-cap .hardware-badge{margin-top:0}
.hardware-badge select,.compact-block .hardware-badge select.port-select{height:14px;min-height:14px;font-size:10px;width:24px;min-width:24px}
.compact-body{min-height:61px}
.block-identity{width:43px;min-width:43px;border-right:0;position:relative;align-self:stretch}
.block-identity>button{height:35px;min-height:35px;width:42px;padding:1px;z-index:4}
.block-identity>button svg{width:32px;height:32px}
.compact-mode{width:38px;height:24px;min-height:24px;margin:0 2px 2px;background:linear-gradient(#f6f6f6,#b9bbbd);border:1px solid #a1a5a8;border-radius:3px;box-shadow:inset 1px 1px #fff,0 1px 1px #0002}
.compact-mode .compact-pick{height:22px;min-width:34px;font-size:10px}
.compact-mode .compact-pick .mode-art{width:17px;height:17px}
.compact-mode .compact-pick>span{gap:0;padding-right:5px}
.compact-mode .compact-pick>span:has(.mode-art+.mode-art) .mode-art{width:15px}
.compact-fields{align-items:stretch;min-height:61px}
.compact-field{min-width:35px;width:35px;min-height:61px;padding:0 0 9px;border-left:0;background:linear-gradient(transparent 53%,#d5d7d8 54%,#e9eaea 100%)}
.compact-field:has(input[type=text]){width:77px}
.param-symbol{height:29px;min-height:29px;color:#353c40;font-size:13px}
.compact-field .param-symbol{color:#353c40}
.param-value{height:25px;min-height:25px;padding:0 1px}
.compact-field input[type=number],.compact-field input[type=text]{height:24px;min-height:24px;border-radius:0;border:1px solid #a8adaf;background:linear-gradient(#e9eaeb,#fafafa);font-size:11px;font-weight:500;color:#252d31;box-shadow:inset 0 1px 1px #0001}
.compact-field .compact-pick{width:31px;min-width:31px;height:24px;background:linear-gradient(#e8e9e9,#fafafa);border:1px solid #a8adaf;font-size:13px}
.compact-field .output-value{height:25px;min-height:25px;line-height:25px;color:#3c4549;font-size:10px}
.compact-field.output-field{min-width:30px;width:30px;background:linear-gradient(transparent 53%,#d5d7d8 54%,#e9eaea 100%);border-left:1px solid #c7c9ca}
.compact-field .data-port{bottom:-5px;width:20px;min-width:20px;height:14px;min-height:14px;border:1px solid #aaaeb0;border-radius:2px 2px 4px 4px;background:linear-gradient(#fefefe,#bdc0c2);color:#5e666a;font-size:10px;box-shadow:inset 1px 1px #fff}
.compact-field .data-port.out{border-radius:2px 2px 6px 6px;background:linear-gradient(#e4e5e6,#a7adaf)}
.compact-field .data-port.connected{background:#ebcf72;border-color:#a98d35;box-shadow:inset 0 0 0 1px #fff5}
.compact-field .data-port.logic{border-color:#5085a2;color:#32667f}
.compact-field .data-port.logic.connected{background:#9dccde}
.compact-field .data-port.text{border-color:#96739b;color:#805b86}
.compact-field .data-port.text.connected{background:#d8b8df}
.compact-block>.seq-in,.compact-block>.seq-out,.container>.seq-in,.container>.seq-out{width:11px;height:13px;background:linear-gradient(100deg,#aac8cc,#668b91);border:2px solid #d7e1e1;border-radius:4px;box-shadow:0 0 0 1px #899c9f;top:31px;z-index:5}
.compact-block>.seq-in{left:-6px}.compact-block>.seq-out{right:-6px}
.block-top-setting{position:absolute;bottom:100%;left:3px;right:3px;z-index:6;display:flex;justify-content:center;padding-bottom:2px}
.block-top-setting input,.block-top-setting select{border:1px solid #929da1;border-radius:2px;background:#fff;height:22px;min-height:22px;max-width:100%;min-width:58px;width:100%;font:10px/1.3 sans-serif;padding:1px 4px;color:#35454b;box-shadow:inset 0 1px 1px #0001}
.block-top-setting input:focus{outline:2px solid #397ca8}
.compact-container.ev3-loop{position:relative;border:3px double #a7acae;background:transparent;border-radius:21px;min-width:170px;margin:18px 4px 0;padding:23px 0 15px;box-shadow:inset 0 2px #fff}
.ev3-loop::before{content:'';position:absolute;top:6px;left:7px;right:7px;height:48%;border:5px solid #f28b14;border-bottom:0;border-radius:16px 16px 0 0;pointer-events:none}
.ev3-loop::after{content:'';position:absolute;left:1px;top:calc(50% - 20px);border:9px solid transparent;border-top:15px solid #f28b14;pointer-events:none}
.compact-container.ev3-loop>.container-head{position:absolute;bottom:100%;left:0;right:0;top:auto;height:23px;min-height:23px;justify-content:center;border:0;background:none;padding:0}
.compact-container.ev3-loop .loop-name{width:64px;height:19px;min-height:19px;font:10px monospace;text-align:center;background:#fff;border:1px solid #a2abad;color:#3f4c50;display:block}
.compact-container.ev3-loop>.container-head .iteration{position:absolute;right:5px;font-size:10px;color:#74664f}
.compact-container.ev3-loop .container-body{padding:8px 0 25px;gap:0;align-items:center}
.loop-begin{width:36px;min-width:36px;align-self:center;position:relative;z-index:3;margin-left:-5px;background:linear-gradient(#fff,#d6d9da);border:1px solid #9da5a8;border-radius:5px;box-shadow:0 2px 1px #0002}
.loop-begin .flow-cap{display:block;border-radius:4px 4px 0 0}
.loop-begin>button{width:33px;min-height:29px;height:29px;padding:2px;border:0;background:none}.loop-begin>button svg{width:23px;height:23px}
.loop-index .compact-field{width:33px;min-width:33px;height:19px;min-height:19px;padding:0;background:none;border:0}
.loop-index .param-symbol{display:none}.loop-index .output-value{min-height:17px;height:17px;line-height:17px}.loop-index .data-port{bottom:-7px}
.compact-container.ev3-loop .loop-end{padding:0;margin-right:-5px;min-width:43px;width:max-content;align-self:center;display:block;position:relative;z-index:3;max-width:none;border-left:1px solid #9da5a8;border-radius:5px;background:linear-gradient(#fff,#dedfe0)}
.ev3-loop .loop-end .compact-field{min-height:61px;width:35px;min-width:35px;padding:0 0 9px}
.ev3-loop .loop-end .param-symbol{height:29px;min-height:29px}
.compact-container.ev3-loop>.seq-in,.compact-container.ev3-loop>.seq-out{top:calc(50% - 8px)}
.ev3-loop>.seq-in{left:-8px}.ev3-loop>.seq-out{right:-8px}
.compact-container.ev3-switch{display:flex;align-items:center;position:relative;border:0;background:none;border-radius:0;margin:15px 5px 0 0;padding:0;min-width:180px}
.switch-test{position:relative;align-self:center;z-index:3;flex:none}
.switch-test .compact-cap{border-radius:5px 5px 0 0}
.switch-cases{position:relative;min-width:100px;border-left:4px solid #f28b14;border-right:4px solid #f28b14;padding:0 7px 0;margin-left:-1px;border-radius:5px}
.switch-view{position:absolute;right:7px;bottom:100%;height:24px;z-index:6}.switch-view .compact-pick{width:26px;min-width:26px;background:#f4f4f4;border:1px solid #a9adaf;border-radius:3px}.switch-view .mode-art{width:18px;height:18px}
.ev3-switch .switch-body{padding:0}
.ev3-switch .case-row{border:3px double #b1b6b8;border-radius:16px;position:relative;padding:19px 2px 23px;margin:0 0 3px;background:#fff;min-height:129px}
.ev3-switch .case-row[hidden]{display:none}
.ev3-switch .case-label{position:absolute;left:50%;top:0;transform:translateX(-50%);width:25px;min-width:25px;min-height:20px;padding:0 3px;line-height:18px;border:1px solid #b5b9bb;border-top:0;border-radius:0 0 3px 3px;background:#e6e7e7;color:#546268;font-size:15px;display:flex;flex-direction:row;justify-content:center;gap:3px;z-index:5}
.ev3-switch .case-label:has(select){width:88px;min-width:88px}.ev3-switch .case-label select{min-height:20px;height:20px;font-size:9px;width:58px;padding:0;border:0;background:#e6e7e7}.ev3-switch .case-label button{min-height:18px;height:18px;width:18px;padding:0}
.ev3-switch .case-tabs{background:none;padding:0 0 3px;min-height:0;gap:3px;justify-content:center}
.ev3-switch.flat .case-tabs{display:none}.ev3-switch.flat:has([data-add-case]) .case-tabs{display:flex}
.ev3-switch .case-tabs button{min-width:25px;min-height:22px;height:22px;padding:1px 6px;background:#e7e8e8;border:1px solid #a8afb2;border-radius:3px;font-size:12px}
.ev3-switch .case-tabs button[aria-pressed=true]{background:#fff;border-bottom-color:#fff;color:#2c6b74}
.ev3-switch.tabbed .case-label{display:none}
.compact-container.ev3-switch>.seq-in,.compact-container.ev3-switch>.seq-out{top:calc(50% - 7px)}
.ev3-switch>.seq-in{left:-6px}.ev3-switch>.seq-out{right:-5px}
.node.selected>.compact-block,.node.selected>.compact-container{outline:2px solid #4c9dce;outline-offset:4px}
.node.active>.compact-block,.node.active>.compact-container{outline:3px solid #4a9b33;outline-offset:3px}
body:not(.lesson-mode) #start-block,#start-block{border-radius:9px 9px 9px 9px;background:linear-gradient(#fff,#dedfe0);border:1px solid #a7aeb0;border-top:13px solid #ed921d;box-shadow:0 2px 1px #0002;height:65px;min-width:43px;width:43px;padding:3px;font-size:0}
#start-block>.seq-out{top:22px}#start-block svg{color:#3e9b4a}
.palette #palette-items{gap:10px;padding:6px 12px 4px;min-height:80px}
body:not(.lesson-mode) .palette-item,.palette-item{--cat:var(--tab-color);width:66px;min-width:66px;height:72px;min-height:72px;border:0;border-radius:4px;padding:0 3px;gap:3px;background:transparent;box-shadow:none;font-size:10px;color:#394c52;display:flex;flex-direction:column;justify-content:flex-start;align-items:center}
.palette-item:hover,.palette-item:focus-visible{background:#dce8ee;outline:1px solid #8dafc0}
.palette-block{position:relative;width:45px;height:54px;min-height:54px;display:block;border:1px solid #a3aaad;border-radius:5px;background:linear-gradient(#fff,#dbdedf);box-shadow:0 2px 1px #0002}
.palette-cap{display:block;height:10px;border-radius:4px 4px 0 0}
.palette-body{display:flex;height:28px;justify-content:center;align-items:center}
.palette-item .palette-body svg,body:not(.lesson-mode) .palette-item .palette-body svg{width:29px;height:29px}
.palette-mode{position:absolute;left:3px;bottom:-2px;width:23px;height:18px;border:1px solid #a4abad;border-radius:3px;background:linear-gradient(#eee,#bfc3c5);display:flex;align-items:center;justify-content:center}
.palette-item .palette-mode svg,body:not(.lesson-mode) .palette-item .palette-mode svg{width:14px;height:14px}
.palette-block>i{position:absolute;bottom:-3px;right:4px;width:11px;height:13px;border:1px solid #a9adaf;border-radius:1px 1px 3px 3px;background:linear-gradient(#fff,#b7bdc0)}
.palette-name{white-space:nowrap;font-size:9px}
.lesson-block-name{display:block;text-align:center;font-size:11px;font-weight:600;margin-top:13px}
.lesson-mode .compact-node .compact-block{min-width:80px}
.lesson-mode .block-identity{min-width:44px;width:44px}
.lesson-mode .sequence{align-items:center;min-height:140px}
.lesson-mode .palette #palette-items{min-height:85px}
@media(max-height:800px){.palette #palette-items{min-height:73px;padding-top:4px;padding-bottom:0}.palette-item,body:not(.lesson-mode) .palette-item{height:68px;min-height:68px}.palette-name{font-size:9px}}

/* Two flat cases should fit a laptop-height canvas. */
.ev3-switch .case-row{padding:15px 2px 21px;min-height:116px}
.ev3-switch .case-row>.sequence{min-height:82px}
.top-wired{display:block;width:100%;text-align:center;border:1px solid #9da9ad;border-radius:2px;background:#f8f8f8;color:#687b80;font:11px monospace;padding:3px}

/* v0.23.0 — calm contemporary surfaces; retain execution and data grammar. */
:root{--action:#54a77a;--flow:#e1a04b;--sensor:#d9b550;--data:#cc7183}
body{background:#edf2f4;color:#273d49;font-family:Inter,"Noto Sans JP","Hiragino Kaku Gothic ProN",Meiryo,sans-serif}
.app-header{background:#213e49}.editor-panel,.simulation{border-color:#d5e0e5;border-radius:12px;box-shadow:0 2px 8px #243d4605}
#canvas-scroll{background-color:#fff;background-image:radial-gradient(#d5e0e6 .65px,transparent .65px);background-size:18px 18px}
.compact-node .compact-block,.switch-test,.loop-end{background:#fff;border:1px solid #b5c5ce;border-radius:8px;box-shadow:0 2px 4px #243c4810!important}
.compact-cap,.flow-cap,.palette-cap{background:var(--cat);box-shadow:none;border-bottom:0}
.compact-mode{background:#edf3f6;border:1px solid #c4d1d9;box-shadow:none;border-radius:5px}
.compact-field,.compact-field.output-field{background:#f4f7f9}
.compact-field.output-field{border-color:#e0e7eb}
.compact-field input[type=number],.compact-field input[type=text],.compact-field .compact-pick{background:#fff;border:1px solid #c5d2da;box-shadow:none;border-radius:4px;font-size:12px}
.compact-field input:focus{outline:2px solid #248c9b;outline-offset:1px}
.compact-field .output-value{font-size:11px;color:#385463}
.compact-field .data-port{background:#e9f0f4;box-shadow:none;border-color:#aabecb}
.compact-field .data-port.out{background:#ccdae3}
.compact-field .data-port.connected{background:#f8db80;border-color:#ad8425}
.compact-field .data-port.logic.connected{background:#b6d9f2}.compact-field .data-port.text.connected{background:#dec6e8}
.hardware-badge,.block-top-setting input,.block-top-setting select{border-color:#bacbd4;border-radius:4px;box-shadow:none}
.compact-container.ev3-loop{border:1px solid #b6c6ce;border-radius:19px;box-shadow:none;background:#f8fafb90}
.ev3-loop::before{border-color:#dda050;border-width:3px}.ev3-loop::after{border-top-color:#dda050}
.loop-begin{background:#fff;border-color:#b6c6ce;box-shadow:none}
.compact-container.ev3-loop .loop-end{background:#fff;border-color:#b6c6ce;border-radius:8px}
.ev3-loop .loop-name{border-color:#b6c6ce;border-radius:4px}
.switch-cases{border-color:#dda050;border-width:3px}
.ev3-switch .case-row{border:1px solid #bccbd4;border-radius:12px;background:#ffffffb0}
.ev3-switch .case-label,.ev3-switch .case-tabs button{background:#edf3f6;border-color:#c2d0d9;border-radius:0 0 5px 5px;color:#456170}
.node.selected>.compact-block,.node.selected>.compact-container{outline-color:#238b9a;outline-offset:3px}
body:not(.lesson-mode) #start-block,#start-block{background:#fff;border-color:#b6c6ce;border-top-color:#dda050;box-shadow:none}
.palette{background:#f7fafb}.palette-block{background:#fff;border-color:#bdcdd5;border-radius:7px;box-shadow:none}.palette-mode,.palette-block>i{background:#edf3f6;box-shadow:none;border-color:#b6c8d1}
.palette-item:hover,.palette-item:focus-visible{background:#e5f2f3;outline-color:#5da3ab;border-radius:7px}
.palette-name{color:#324c59}.palette-item .palette-cap{background:var(--tab-color)}
.compact-pick>.picker-trigger{position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;border:0;background:transparent;border-radius:4px;padding:0;z-index:6;cursor:pointer}
.compact-pick>.picker-trigger:hover{box-shadow:inset 0 0 0 1px #4097a4;background:#2a8b9810}
.compact-pick>.picker-trigger:focus-visible{outline:2px solid #238b9a;outline-offset:2px}
.compact-pick>select[hidden]{display:none!important}
#symbol-help{position:fixed;display:flex;gap:11px;align-items:center;width:max-content;max-width:310px;z-index:1000;background:#203e49;color:#fff;border:1px solid #335964;border-radius:10px;box-shadow:0 8px 28px #132f492b;padding:12px 14px;pointer-events:none;font-size:12px;line-height:1.6}
#symbol-help[hidden]{display:none}#symbol-help b{font-size:13px}#symbol-help p{margin:3px 0 0;color:#d7e9ed}
.help-icon{display:flex;align-items:center;justify-content:center;flex:none;width:38px;height:38px;border-radius:8px;background:#f5fafb;color:#274c57;font-size:22px}
.help-icon svg{width:30px;height:30px}.help-icon .mode-art{width:21px;height:21px}
.selection-name{align-items:center}.selection-name .selection-hint{max-width:580px;color:#536b76;line-height:1.5}
#visual-picker{width:430px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);padding:0;border:1px solid #c6d7de;border-radius:17px;box-shadow:0 20px 90px #17364335;background:#fff;color:#27434e}
#visual-picker::backdrop{background:#173b472b;backdrop-filter:blur(2px)}
#visual-picker header{display:flex;justify-content:space-between;align-items:center;padding:19px 22px 15px;border-bottom:1px solid #e2eaee}#visual-picker header small{font-size:11px;color:#6c818b}#visual-picker h2{font-size:17px;margin:4px 0 0}#visual-picker .picker-close{width:34px;height:34px;min-height:34px;font-size:22px;border:0;border-radius:50%;background:#edf3f6;color:#607982}
.picker-content{padding:16px 22px;max-height:58dvh;overflow:auto}.picker-content section+section{margin-top:15px}.picker-content h3{font-size:12px;margin:0 0 8px;display:flex;align-items:center;gap:6px;color:#647b85}.picker-content h3 svg{width:18px;height:18px}
.choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.visual-choice{position:relative;min-height:82px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:1px solid #d3e0e6;border-radius:10px;background:#f8fafb;padding:10px 5px;color:#34545f}
.visual-choice>svg{width:31px;height:31px}.visual-choice>span:not(.choice-symbol){font-size:12px;line-height:1.3}.visual-choice .choice-symbol{font-size:25px;line-height:31px}.visual-choice:hover{background:#eef8f8;border-color:#6cb3ba}.visual-choice[aria-pressed=true]{border:2px solid #2e949d;background:#eaf7f7}.visual-choice>i:not(.choice-swatch){position:absolute;top:4px;right:6px;font-style:normal;font-size:12px;color:#24818c}.visual-choice:focus-visible{outline:3px solid #a5d5da;outline-offset:2px}.choice-swatch{width:29px;height:29px;display:block;border:1px solid #8ca2ae;border-radius:50%}
#picker-description{min-height:55px;padding:12px 22px;background:#f2f7f9;border-top:1px solid #e0eaee;font-size:12px;line-height:1.6}
#run-pause{background:#eaf4f5;border-color:#85b4bc;color:#28616c;font-weight:700;min-width:108px}
#run-dialog.is-paused #run-pause{background:#257c87;color:#fff;border-color:#257c87}
#run-dialog.is-paused .run-eyebrow{color:#217986}
#run-dialog.is-paused .watch-node.active{animation:none;box-shadow:0 0 0 2px #2a909b;background:#e5f4f5}
#pause-inspector{border:1px solid #9cc6cd;border-radius:12px;background:#f2f9fa;margin:0 0 10px;padding:12px}
.pause-title{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:#25636e}.pause-title time{font:12px ui-monospace,monospace}
.frozen-readings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0}.frozen-readings>div{position:relative;background:#fff;border:1px solid #dce9ed;border-radius:7px;padding:8px 5px;display:flex;flex-direction:column;gap:3px}.frozen-readings svg{position:absolute;right:5px;top:6px;width:15px;height:15px;opacity:.6}.frozen-readings span{font-size:10px;color:#657f8a}.frozen-readings strong{font-size:14px;font-variant-numeric:tabular-nums}
#pause-inspector summary{font-weight:600;font-size:12px;cursor:pointer}#pause-inspector details>p{font-size:10px;line-height:1.5;color:#667c85;margin:6px 0}
.frozen-values{max-height:160px;overflow:auto}.frozen-values>div{display:flex;align-items:center;gap:7px;border-bottom:1px solid #dce9ed;padding:6px 0}.frozen-values>div>span{flex:1;min-width:0}.frozen-values b{display:block;font-size:11px}.frozen-values small{display:block;font:12px ui-monospace,monospace;margin-top:2px}.frozen-values strong{font:600 16px ui-monospace,monospace;color:#25636e}
.frozen-motors{font:12px ui-monospace,monospace;padding-top:8px}.frozen-motors small{display:block;font:10px sans-serif;color:#667e88;line-height:1.5;margin-top:5px}
#run-dialog.is-paused #run-details{display:none}#run-dialog.is-paused .run-right{overflow:auto}#run-dialog.is-paused #run-watch.wrapped-watch{min-height:160px;flex:none;max-height:240px}#run-dialog.is-paused .run-help{display:none}
@media(max-height:800px){#run-dialog.is-paused #run-watch.wrapped-watch{min-height:100px;max-height:160px}.frozen-values{max-height:110px}#pause-inspector{padding:9px;margin-bottom:6px}.frozen-readings{margin:6px 0}.frozen-readings>div{padding:5px}.run-footer{gap:6px}.run-buttons{gap:5px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.node.active,.watch-node.active{animation:none!important}}

.lesson-pause-note{font-size:12px;line-height:1.7;margin:8px 0}.lesson-mode #pause-inspector>small{font-size:11px;color:#5d7b86}

/* A block surface selects/moves the block; fields and sockets keep their own actions. */
.compact-cap,.hardware-badge,.block-identity>button,.loop-begin,.container-head{cursor:grab}
.compact-block{cursor:pointer}
.compact-block input,.compact-block select{cursor:auto}

/* Group editing: compact toolbar, visible selection and a separate canvas gesture. */
.edit-tools{flex-wrap:wrap;gap:4px}.edit-tools #multi-select[aria-pressed=true]{background:#234b56;color:#fff}.edit-tools #copy-blocks,.edit-tools #cut-blocks,.edit-tools #paste-blocks,.edit-tools #multi-select{font-size:10px;padding:4px 7px;min-height:28px}
#selection-box{position:fixed;z-index:10000;border:1.5px solid #238b9a;background:#44b5c329;pointer-events:none;color:#134b57;font-size:11px;padding:3px;min-width:1px;min-height:1px;box-sizing:border-box}
.selecting-blocks,.selecting-blocks *{user-select:none!important;cursor:crosshair!important}.panning-canvas,.panning-canvas *{cursor:grabbing!important;user-select:none!important}
#inspector .selection-name small{font-size:10px}.node.selected>[class*=compact-]{box-shadow:0 0 0 5px #238b9a15!important}
#canvas-scroll:focus-visible{outline:2px solid #238b9a;outline-offset:-2px}

/* The same rotation-count unit accompanies the motor icon in run view. */
.rotation-unit{display:inline-flex;align-items:center;vertical-align:middle;margin-left:3px}
.watch-block .rotation-unit svg,#run-current .rotation-unit svg{width:18px;height:18px}

/* TOCOROBO v0.24.0: original face and lettering; compact workbench surfaces.
   Category colors and execution/data-wire grammar remain independently readable. */
:root{--toco-ink:#234b56;--toco-mint:#b0dacf;--toco-paper:#f8f6f1;--toco-surface:#fff;--toco-line:#d5e2dd;--toco-muted:#5b7478;--ink:var(--toco-ink);--muted:var(--toco-muted)}
body{background:#f3f6f3;color:var(--toco-ink);font-family:-apple-system,BlinkMacSystemFont,"Noto Sans CJK JP","Yu Gothic",Meiryo,sans-serif}
button,input,select,textarea{color:var(--toco-ink)}
button{border-color:#c9d9d3;border-radius:9px;background:#fff;transition:background .15s,border-color .15s,box-shadow .15s}
button:hover{background:#e8f4ee;border-color:#7cac9e}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #297d87;outline-offset:3px}
button:disabled{opacity:.43}
input[type=number],input[type=text],select,textarea{border-color:#c7d8d1;border-radius:7px;background:#fff}
input[type=checkbox],input[type=range]{accent-color:var(--toco-ink)}
.primary,.toolbar-actions #run{background:var(--toco-ink);border-color:var(--toco-ink);color:#fff;box-shadow:0 2px 0 #173943}
.primary:hover,.toolbar-actions #run:hover{background:#316674;border-color:#316674}
.danger{color:#9b443d}.danger:hover{background:#fff0eb;border-color:#d8a59d}
.brand{background:var(--toco-paper);color:var(--toco-ink);height:64px;min-height:64px;padding:7px 22px;border-bottom:1px solid #e2e8e1;gap:24px;letter-spacing:normal}
.brand-identity{display:flex;align-items:center;gap:20px;min-width:0}
.tocorobo-logo{display:block;width:245px;height:40px;object-fit:contain}
.brand-subtitle{font-size:11px;color:#567271;border-left:1px solid #cbd9d0;padding-left:19px;white-space:nowrap;line-height:1.7}
.brand-meta{display:flex;align-items:center;gap:14px;white-space:nowrap}.brand-owner{font-size:11px;color:#66817a;letter-spacing:.08em}
.preview-badge{font-size:10px;color:#4d726b;border:1px solid #c2d8cc;background:#edf4ee;padding:4px 9px;border-radius:20px}
.page-tabs{margin:0;padding:8px 18px;gap:5px;align-items:center;min-height:49px;background:#fff;border-bottom:1px solid var(--toco-line);flex-shrink:0}
.page-tabs button{display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:32px;border:0;border-radius:8px;background:transparent;color:#607a7c;font-size:11px;padding:6px 11px;line-height:1.4;white-space:nowrap}
.page-tabs button svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.page-tabs button:hover{background:#eef6f1;color:var(--toco-ink)}
.page-tabs button[aria-selected=true]{background:var(--toco-ink);color:white;border:0;box-shadow:none}
.page-tabs #lesson-tab,.page-tabs #studio-tab{font-size:12px;font-weight:700;padding:7px 14px}
.page-tabs #open-demos{margin-left:auto}.page-tabs #guide-toggle{margin-left:0;font-size:11px}
.toolbar{padding:12px 18px 9px;gap:18px;min-height:62px;align-items:center}
.lesson-selector,.preset-label{font-size:10px;gap:3px;color:var(--toco-muted)}
.lesson-selector select,.preset-label select{border:1px solid #c7dad1;min-height:34px;font-size:12px;min-width:240px;padding:4px 32px 4px 10px;font-weight:650}
.toolbar-actions{gap:7px}.toolbar-actions button{min-height:36px;padding:6px 12px;font-size:11px;border-radius:9px;gap:6px}
.toolbar-actions button svg{width:18px;height:18px}.toolbar-actions #run{min-width:144px;font-size:12px}
.toolbar-actions #send{background:#e3eee8;border-color:#c4d9ce;font-size:11px}
#lesson-banner{margin:0 18px 10px;padding:10px 14px;background:#e2f1e9;border:1px solid #c7e0d3;border-radius:12px;min-height:52px;gap:12px;color:var(--toco-ink)}
#lesson-step{background:var(--toco-ink);color:white;border-radius:8px;min-width:38px;padding:5px 8px;font-size:11px;text-align:center}
#lesson-aim{font-size:14px;font-weight:750;letter-spacing:.02em}#lesson-hint{font-size:11px;color:#506e65;line-height:1.5}
.studio-layout{margin:0 18px;gap:13px;grid-template-columns:minmax(0,1fr) clamp(286px,24vw,335px);min-height:0}
.editor-panel{border:1px solid #cbded5;border-radius:14px;background:#fff;box-shadow:0 3px 12px #244f3d06}
.canvas-toolbar{min-height:40px;padding:6px 12px;background:#fff;border-bottom-color:#e4ece7}
.canvas-toolbar b{font-size:12px}.state-badge{padding:3px 7px;border-radius:20px;font-size:9px;background:#f1f3ee;color:#75847a}
.state-badge.synced{background:#dff1e5;color:#376b53}
.edit-tools button,.edit-tools select{min-height:28px;border-radius:6px;border-color:#d6e2db;font-size:10px;background:#f8faf7}
.legend{padding:5px 12px;font-size:9px;background:#fbfcfa;border-bottom:1px solid #edf2ed;color:#74877e}
#canvas-scroll{background-color:#fff;background-image:radial-gradient(#cadbd3 .7px,transparent .7px);background-size:20px 20px;scrollbar-color:#b6cfc3 #f3f7f4}
#canvas-content{background:transparent}
.inspector{background:#eef6f1;border-top:1px solid #d8e8df;color:var(--toco-ink)}
.inspector.empty{min-height:36px}.inspector p{color:#627d71}.selection-name .selection-hint{color:#547265}
.inspector button{background:#fff;border-color:#c6d9cd;border-radius:7px}
.palette{background:#fafcf9;border-top:1px solid #d9e5dc}
.palette-heading{background:#edf4ee;border-bottom:1px solid #dce8df;padding:6px 12px;min-height:30px;font-size:10px}
.palette-heading #insert-label{color:#527560}.palette #category-tabs{padding:5px 10px 0;gap:6px;background:#fafcf9;border-bottom:0}
.palette #category-tabs button{font-size:10px;min-height:27px;padding:3px 10px;border-top:3px solid var(--tab-color);border-radius:5px 5px 0 0;color:#536f62}
.palette #category-tabs button[aria-selected=true]{background:#e9f0e9;box-shadow:inset 0 -2px var(--tab-color);color:#264c38}
.palette #palette-items{padding:8px 12px;gap:10px;min-height:77px}
.palette-item:hover,.palette-item:focus-visible{background:#e1f1e8}
.palette-name{color:#395d4d}
#message{background:#f1f7ef;border-color:#dce9d8;color:#557245;font-size:11px;min-height:31px}
#message.error{color:#96493d;background:#fff1e9;border-color:#ebccbf}
.sidebar{gap:11px}.sidebar>section,#preview-dock .simulation{border:1px solid #d1e0d7;border-radius:14px;background:#fff;padding:12px}
#preview-dock .simulation{background:#fff}
#preview-dock .course-heading{font-size:12px;margin-bottom:4px}.course-heading button{border-color:#c7ded0;background:#f0f7f2;border-radius:7px}
#preview-dock #toco-message{background:#e2f2e9;color:#345c4d;border-radius:3px 12px 12px 12px;padding:7px 9px;font-size:11px}
.toco-name b{color:var(--toco-ink)}.toco-name span{color:#6a9588}
.stage-visual,.field{border-radius:11px}.field{border-color:#d4e1d6;background-color:#f9fbf6}
.view-controls button{border-color:#c7ddd2;border-radius:7px;background:#fff}
.view-switch button[aria-pressed=true],.framing-controls button[aria-pressed=true]{background:var(--toco-ink);border-color:var(--toco-ink);color:white}
#mission-card{background:#f5f8ef;border-color:#dae3cb;gap:8px;padding:12px!important}
#mission-card>small{color:#6b8361}#mission-card>b{font-size:12px;color:#4d693f}
#mission-card button{background:white;border-color:#c9d9bc;border-radius:8px}
#mission-card details{border-top:1px solid #e1e9d7;padding-top:8px;font-size:10px}
.sensor-readings>div{background:#f3f8f4;border-color:#dce9de;border-radius:9px;padding:7px 2px}
.sensor-readings strong{color:var(--toco-ink);font-variant-numeric:tabular-nums}.sensor-readings small{color:#728776}
.sensor-extra{color:#6a8075;border-color:#e1e9e3}.port-tag{background:#fff;border-color:#c9dbce;color:#617b65;border-radius:4px}
.brick{background:#eef4f0;border-color:#c7dcd0;border-radius:12px}
.app-footer{padding:7px 20px 6px;font-size:9px;color:#7b8f84;min-height:28px}.app-footer span:last-child{color:#648577}
dialog{color:var(--toco-ink)}dialog::backdrop{background:#183e465c;backdrop-filter:blur(3px)}
#run-dialog{border:1px solid #c4dcd0;border-radius:19px;background:#f8fbf7;box-shadow:0 24px 100px #133d4a33}
.run-header{background:#fff;border-bottom:1px solid #dce9df;padding:12px 18px;min-height:62px}
.run-title-group{display:flex;gap:12px;align-items:center}.run-brand-face{width:43px;height:34px;object-fit:contain}
.run-eyebrow{color:#6b9988;font-size:9px;letter-spacing:.12em}.run-header h2{font-size:16px;color:var(--toco-ink);margin-top:2px}
#run-context{color:#6c8379;font-size:10px}.run-header>button{border-color:#d6e4db;border-radius:9px;background:#f4f8f3}
#run-dialog .run-body{padding:14px 18px;gap:18px;grid-template-columns:minmax(0,1fr) 350px}
.run-right{border-color:#d3e2d7;padding-left:17px}.watch-heading{color:#42604c}.watch-heading b{font-size:12px}.watch-heading span{font-size:9px;color:#7c907e}
#run-current{background:#e5f2e6;border-color:#c4dfc4;border-radius:9px;color:#426449}
#run-stage .stage-visual{border:1px solid #cbded2;border-radius:15px}
#run-watch{border-radius:12px;border-color:#d8e6dc;background:#fff}.watch-block{border-radius:7px}
.run-footer{background:#fff;border-top:1px solid #dce9df;padding:10px 18px;min-height:60px}
.run-buttons button{min-height:36px;border-radius:9px;font-size:11px}.run-buttons #close-run{background:#eff5ef;border-color:#b7d0bf}
#run-pause{background:#e6f3ed;color:#315d54;border-color:#a7cabb}
#run-dialog.is-paused #run-pause{background:var(--toco-ink);border-color:var(--toco-ink);color:white}
#pause-inspector{border-color:#a8cdbd;background:#eaf6ef;border-radius:12px}
.pause-title,.frozen-values strong{color:#315f50}.frozen-readings>div{border-color:#cfe4d8}.frozen-readings span{color:#698577}
.frozen-values>div{border-color:#cddfd3}.frozen-motors small{color:#6c8678}
.learning-dialog,#parts-dialog,#demo-dialog,#visual-picker{border-color:#ccdfd2;border-radius:18px;background:#fff;color:var(--toco-ink);box-shadow:0 24px 90px #153b4429}
.learning-dialog>header,.parts-header,.demo-header,#visual-picker header{background:#f1f7f1;border-bottom-color:#dce9dc}
.learning-dialog header small,.parts-header small,.demo-header small{color:#6b9179}
.learning-dialog>header>button,.parts-header>button,.demo-header>button,#visual-picker .picker-close{background:#fff;border-color:#d4e4d7;border-radius:9px}
.dialog-lead{color:#5d7967}.future-path{border-color:#d4e4cc;background:#f6f9f0}
.roadmap-chapter,.chapter-card,.work-card,.part-card{border-color:#d5e5d9;border-radius:12px}
.hint-steps button[aria-pressed=true],.parts-list button[aria-pressed=true]{background:var(--toco-ink);border-color:var(--toco-ink);color:white}
.hint-map{background:#f0f6ed}.hint-sample>div{background:#f0f7ed;border-color:#b7d3be;border-top-color:#4d8770}
.project-form{background:#f4f8f1;border-color:#dbe6d6;border-radius:12px}
.visual-choice{background:#f6faf5;border-color:#d5e5d6;border-radius:12px;color:#355a48}
.visual-choice:hover{background:#e9f6ec;border-color:#87b89c}.visual-choice[aria-pressed=true]{background:#e3f3e8;border-color:#48846d}
#picker-description{background:#f2f8ef;color:#53705b;border-color:#dce8d8}
#symbol-help{background:var(--toco-ink);border-color:#466e72}.help-icon{background:#f1f7ed;color:var(--toco-ink)}
@media(max-width:1150px){.brand{padding-left:16px;padding-right:16px}.tocorobo-logo{width:220px;height:36px}.brand-subtitle{font-size:10px;padding-left:14px}.page-tabs{padding-left:12px;padding-right:12px;gap:2px}.page-tabs button{padding:6px 8px;font-size:10px}.page-tabs #lesson-tab,.page-tabs #studio-tab{padding:7px 10px;font-size:11px}.studio-layout{grid-template-columns:minmax(0,1fr) 278px;margin:0 12px;gap:10px}.toolbar{padding-left:12px;padding-right:12px}.toolbar-actions button{padding:5px 8px}.lesson-selector select,.preset-label select{min-width:215px}#lesson-banner{margin-left:12px;margin-right:12px}#run-dialog .run-body{grid-template-columns:minmax(0,1fr) 320px;gap:12px;padding:10px 14px}.run-right{padding-left:12px}}
@media(max-height:800px){.brand{min-height:53px;height:53px;padding-top:5px;padding-bottom:5px}.tocorobo-logo{width:224px;height:37px}.page-tabs{min-height:42px;padding-top:5px;padding-bottom:5px}.toolbar{padding-top:7px;padding-bottom:7px;min-height:55px}#lesson-banner{min-height:44px;padding:7px 12px;margin-bottom:8px}.palette #palette-items{min-height:71px;padding-top:5px;padding-bottom:5px}.sidebar>section,#preview-dock .simulation{padding:9px}.sidebar{gap:8px}#preview-dock .robot-intro{min-height:53px;margin:2px 0 5px}#preview-dock #toco-avatar{width:54px;height:55px}#preview-dock .course-heading{margin-bottom:2px}#preview-dock .motion-caption{margin-top:5px}#mission-card{padding:9px!important;gap:5px 7px}#mission-card details{padding-top:5px}.app-footer{min-height:22px;padding-top:4px;padding-bottom:4px}.run-header{min-height:51px;padding:8px 15px}.run-header h2{font-size:15px}.run-brand-face{width:37px;height:30px}#run-dialog .run-body{padding-top:9px;padding-bottom:9px}.run-footer{min-height:53px;padding:8px 14px}.run-buttons button{min-height:33px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}
/* Leave room for a complete short loop and its paused values on laptop displays. */
@media(max-height:800px){
 body:not(.lesson-mode) #canvas-content{padding:10px 18px 20px 12px}
 body:not(.lesson-mode) .lane-title{margin-bottom:6px}
 #run-dialog.is-paused #run-current{min-height:28px;padding:5px 9px;font-size:11px;line-height:1.4}
 #run-dialog.is-paused .watch-heading{margin-bottom:0}
 .frozen-readings>div{padding:3px 5px;gap:1px}
 .frozen-readings span{font-size:10px;line-height:1.2}
 .frozen-readings strong{font-size:13px;line-height:1.3}
 .frozen-readings svg{top:4px;width:12px;height:12px}
 .frozen-values{max-height:116px}
 .frozen-values>div{padding:4px 0;gap:5px}
 .frozen-values>div>span{display:flex;align-items:baseline;gap:7px}
 .frozen-values b{font-size:10px;line-height:1.4;white-space:nowrap}
 .frozen-values small{margin:0;font-size:11px;line-height:1.4}
 .frozen-values strong{font-size:14px;line-height:1.4}
 .frozen-motors{font-size:11px;line-height:15px;padding-top:6px}
 .frozen-motors small{font-size:10px;line-height:12px;margin-top:3px}
 #run-dialog.is-paused #run-watch.wrapped-watch{max-height:260px;min-height:100px}
}
@media(max-height:800px) and (min-width:1200px){#run-dialog .run-body{grid-template-columns:minmax(0,1fr) 370px}}

/* Steering setting: keep the numeric field and its hit area unchanged. */
.steering-preview{display:inline-flex;align-items:center;justify-content:center;color:var(--ink);vertical-align:middle;line-height:1;pointer-events:none}
.steering-preview .steering-art{width:24px;height:24px;flex-shrink:0}
.watch-block .steering-preview .steering-art{width:24px;height:24px}
.steering-preview:has([data-direction=pending]){color:#85968f}

.challenge-mode #challenge-tab{background:#234b56;color:white;border-radius:8px}.challenge-mode #studio-tab{background:transparent;color:#526e6c}
.challenge-summary{padding:10px 12px!important;background:#f5faf3!important}.challenge-summary header{display:flex;align-items:center;justify-content:space-between;gap:8px}.challenge-summary strong{font-size:20px;color:#234b56}.challenge-summary small{font-size:11px;color:#668075}.challenge-summary p{margin:4px 0;font-size:11px}.challenge-summary button{font-size:11px;min-height:32px;padding:4px 9px}.challenge-mini{display:flex;gap:4px;margin:8px 0;flex-wrap:wrap}.challenge-mini span{border:1px solid #c4d9ce;border-radius:5px;padding:2px 5px;color:#526c63;font-size:10px}.challenge-mini .earned{background:#234b56;border-color:#234b56;color:white}.challenge-actions{display:flex;gap:6px;flex-wrap:wrap}
#run-challenge-score{border:1px solid #c7ddcd;border-radius:10px;padding:8px 10px;background:#f4f9f2;margin:4px 0 8px}#run-challenge-score .challenge-mini{margin:4px 0}#run-challenge-score p{margin:0;font-size:11px}#run-challenge-score strong{font-size:20px}#run-challenge-score header{display:flex;justify-content:space-between;gap:8px;align-items:center}#run-challenge-score small{font-size:10px;color:#657c70}
#challenge-dialog{width:min(1000px,95vw);max-height:92vh;padding:0;border:1px solid #bfd5c8;border-radius:18px;color:#234b56;background:#fff}#challenge-dialog::backdrop{background:#183c4966;backdrop-filter:blur(3px)}#challenge-dialog>header{display:flex;align-items:center;justify-content:space-between;padding:16px 22px;border-bottom:1px solid #d7e6dc;background:#f3f8f0}#challenge-dialog h2{margin:3px 0;font-size:22px}#challenge-dialog small{font-size:11px;letter-spacing:.05em}.challenge-body{padding:18px 22px;overflow:auto;max-height:calc(92vh - 150px);display:grid;grid-template-columns:1.1fr 1fr;gap:22px}.challenge-intro p{font-size:13px;line-height:1.8}.challenge-map{width:100%;border-radius:12px;border:1px solid #c7d6ca;background:#f8faf5}.challenge-key{font-size:11px!important;color:#5c7468}.challenge-rules{list-style:none;padding:0;margin:0;display:grid;gap:8px}.challenge-rules li{border:1px solid #d8e3d9;border-radius:10px;padding:10px 12px}.challenge-rules li.earned{background:#eef7ea;border-color:#8faf91}.challenge-rules .rule-head{display:flex;justify-content:space-between;gap:8px}.challenge-rules p{margin:5px 0;font-size:12px;line-height:1.6}.challenge-rules details{font-size:12px}.challenge-rules summary{cursor:pointer;color:#477761}.challenge-rules details p{color:#526a5c}.challenge-footer{border-top:1px solid #d9e4d9;padding:12px 22px;display:flex;justify-content:space-between;align-items:center;gap:8px;background:#f8faf5}.challenge-footer p{margin:0;font-size:11px;max-width:48%}.challenge-footer div{display:flex;gap:8px}.challenge-footer button{font-size:12px}.challenge-mode #lesson-step{background:#234b56}.challenge-mode .run-right{overflow:auto}#run-dialog.is-paused #run-challenge-score{padding:5px 8px}
@media(max-height:800px){.challenge-summary{padding:6px 10px!important}.challenge-summary strong{font-size:17px}.challenge-summary .challenge-mini{margin:4px 0}.challenge-mode .sidebar{gap:6px}.challenge-mode #run-watch{min-height:120px;max-height:260px}.challenge-body{padding:12px 18px;gap:16px}.challenge-rules li{padding:7px 10px}}
@media(max-width:800px){.challenge-body{grid-template-columns:1fr}.challenge-footer{flex-wrap:wrap}.challenge-footer p{max-width:100%}}

/* v0.30 — the program is the primary surface; tools never scale the blocks down. */
.workspace-header{display:flex;align-items:center;gap:24px;min-height:54px;height:54px;flex-shrink:0;padding:6px 16px;background:var(--toco-paper);border-bottom:1px solid var(--toco-line)}
.workspace-brand{flex:none}.workspace-brand .tocorobo-logo{width:200px;height:33px}
.workspace-header .page-tabs{padding:0;min-height:0;background:transparent;border:0;gap:5px}
.workspace-header .page-tabs button{min-height:36px;font-size:12px;padding:6px 12px}
.workspace-links{display:flex;align-items:center;gap:8px;margin-left:auto}
.workspace-links>button{display:flex;align-items:center;gap:7px;font-size:12px;min-height:34px;background:transparent;border-color:transparent}
.workspace-links svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.workspace-menu{position:relative;flex:none;font-size:12px}
.workspace-menu>summary{display:flex;align-items:center;justify-content:center;gap:10px;min-height:34px;list-style:none;padding:6px 10px;border:1px solid #c9d9d3;border-radius:7px;cursor:pointer;background:#fff;font-weight:600;white-space:nowrap}
.workspace-menu>summary::-webkit-details-marker{display:none}
.workspace-menu>summary:hover,.workspace-menu[open]>summary{background:#e5f1eb;border-color:#80aa9a}
.workspace-menu>summary:focus-visible{outline:3px solid #297d87;outline-offset:2px}
.menu-sheet{position:absolute;right:0;top:calc(100% + 6px);z-index:80;display:flex;flex-direction:column;align-items:stretch;gap:6px;width:240px;padding:12px;border:1px solid #bdcfc6;border-radius:12px;background:#fff;box-shadow:0 10px 35px #244b5626;max-height:calc(100dvh - 140px);overflow:auto}
.workspace-menu:not([open])>.menu-sheet{display:none}
.menu-sheet>button{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:36px!important;width:100%;font-size:12px!important;padding:7px 10px!important;border:1px solid transparent;background:#f6f9f6;text-align:left}
.menu-sheet>button svg{width:20px;height:20px;flex:none}
.menu-sheet p,.menu-sheet small{font-size:11px;color:#607b70;line-height:1.7;margin:5px 2px}
.menu-sheet .state-badge{align-self:flex-start;margin:0}.menu-sheet .legend{border:0;gap:10px;padding:4px 0;min-height:0;font-size:10px}
.workspace-bar{display:flex;align-items:center;gap:10px;padding:7px 12px;min-height:52px;flex-shrink:0}
.workspace-bar>button{min-height:36px;font-size:12px;padding:6px 11px;white-space:nowrap}
.workspace-bar #choose-program{background:#fff;border-color:#bdcfc6}
.workspace-bar #lesson-banner{display:flex;flex:1;min-width:0;gap:8px;padding:0;margin:0;border:0;background:none;min-height:0;overflow:hidden}
.workspace-bar #lesson-step{font-size:10px;min-width:0;padding:3px 6px;flex:none;background:#e2eee6;color:#456457}
.workspace-bar #lesson-aim{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:0}
.workspace-bar #task-help{background:transparent;border-color:transparent;padding-left:6px;padding-right:6px;color:#3e6a5e;text-decoration:underline;text-underline-offset:3px}
.workspace-bar #toggle-preview[aria-expanded=true]{background:#e0efe7;border-color:#77a591}
.workspace-bar .toolbar-actions{display:flex;flex:none;gap:6px;width:auto;margin:0}
.workspace-bar .toolbar-actions #run{min-height:36px;padding:6px 13px;font-size:12px;min-width:0;white-space:nowrap}
.workspace-bar .toolbar-actions #send,.workspace-bar .toolbar-actions #reset{display:flex;width:auto;font-size:12px;gap:8px}
.studio-layout{grid-template-columns:minmax(0,1fr);margin:0 12px;gap:10px;min-height:0}
.studio-layout.with-course{grid-template-columns:minmax(0,1fr) 310px}
.editor-panel{border-radius:12px;overflow:visible}
.canvas-toolbar{flex:none;min-height:44px;padding:5px 10px;gap:12px;border-radius:12px 12px 0 0}
.canvas-title{display:flex;align-items:center;gap:10px;min-width:0}.canvas-title>b{font-size:13px}.canvas-title>span{font-size:11px;color:#789084}
.canvas-toolbar .edit-tools{flex-wrap:nowrap;align-items:center;gap:6px}
.edit-tools>button,.edit-tools .workspace-menu>summary{min-height:32px;font-size:11px;padding:5px 10px;background:#fff}
.edit-tools #multi-select{min-height:32px;font-size:11px;padding:5px 10px}
.edit-tools #redo{min-width:34px;font-size:17px;padding:1px 8px}
.zoom-label{display:flex;align-items:center;gap:6px;font-size:11px;color:#647e72;margin-right:6px;white-space:nowrap}
.canvas-toolbar #zoom{min-height:32px;font-size:12px;padding:3px 8px}
#canvas-scroll{flex:1;min-height:120px;height:auto;scrollbar-gutter:stable}
body:not(.lesson-mode) #canvas-content,#canvas-content{padding:24px 24px 60px 18px}
body:not(.lesson-mode) #wire-tools{top:44px;left:0;right:0}
#inspector{max-height:112px;padding:5px 12px;min-height:0;overflow:auto}
#inspector.empty:not(:has(.wire-selection-note)){display:none}
#inspector .selection-row{min-height:32px;gap:12px;width:100%}
#inspector .selection-name{min-width:0;gap:8px}#inspector .selection-name small{font-size:11px}
#inspector .selection-hint{max-width:650px;line-height:1.5}
#inspector button{min-height:32px;font-size:11px;padding:5px 10px}
#inspector .connection-details{margin:0;font-size:11px}
.palette{flex:none}.palette-top{display:flex;align-items:center;min-height:36px;gap:16px;background:#f1f6f0;border-bottom:1px solid #dce8df;padding:0 12px}
.palette-top .palette-heading{display:contents}.palette-top .palette-heading b{font-size:11px;white-space:nowrap}
.palette-top #insert-label{font-size:10px;order:3;margin-left:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#557560}
.palette .palette-top #category-tabs{display:flex;flex:none;gap:5px;padding:0;background:none;border:0;order:2}
.palette .palette-top #category-tabs button{min-height:32px;font-size:11px;padding:4px 13px}
.palette #palette-items,.lesson-mode .palette #palette-items{padding:7px 14px 6px;min-height:82px;gap:13px}
.palette-name{font-size:10px}#message{padding:4px 12px;min-height:27px;max-height:44px;font-size:11px;border-radius:0 0 12px 12px}
.app-footer{min-height:23px;padding:4px 14px;font-size:9px}
.course-panel{min-height:0;display:flex;flex-direction:column;border:1px solid #cbded5;border-radius:12px;overflow:hidden;background:#f4f8f3}
.course-panel-header{display:flex;align-items:center;justify-content:space-between;padding:5px 10px;min-height:43px;border-bottom:1px solid #dce8df;font-size:12px;background:#fff;flex:none}
.course-panel-header button{min-height:30px;min-width:32px;padding:0 8px;font-size:20px;border:0;background:transparent}
.course-panel .sidebar{padding:8px;gap:9px;flex:1;min-height:0;overflow:auto}
.course-panel .sidebar>section,#preview-dock .simulation{padding:9px;border-radius:9px}
#preview-dock .sensors,#preview-dock .device-panel{display:block}
#preview-dock #toco-avatar{width:49px;height:50px}#preview-dock .robot-intro{min-height:50px;margin:4px 0 7px}
.workspace-dialog{width:520px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);padding:0;border:1px solid #bfd5c8;border-radius:16px;background:#fff;box-shadow:0 20px 80px #234b5633}
.workspace-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;background:#f1f7f1;border-bottom:1px solid #dce8df}
.workspace-dialog h2{font-size:18px;margin:0}.workspace-dialog header small{font-size:10px;letter-spacing:.1em;color:#6b9179}
.workspace-dialog header button{min-width:34px;min-height:34px;padding:2px 8px;font-size:20px}
.workspace-dialog-body{padding:22px;overflow:auto;max-height:calc(100dvh - 210px)}
.workspace-dialog .lesson-selector,.workspace-dialog .preset-label{display:flex;flex-direction:column;font-size:13px;gap:8px}
.workspace-dialog select{width:100%;min-height:44px;font-size:14px}
.workspace-dialog p{font-size:12px;line-height:1.8;color:#577566;margin:16px 0 0}
.workspace-dialog #lesson-hint{display:block;font-size:15px;margin:0;line-height:1.9}
.workspace-dialog>footer{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px;border-top:1px solid #e1e9e1}
.workspace-dialog>footer button{min-height:38px;font-size:13px;min-width:90px}
#guide{position:fixed;inset:80px 14% auto;max-height:calc(100dvh - 110px);overflow:auto;z-index:100;margin:0;box-shadow:0 15px 80px #234b5633}
@media(max-width:1150px){.workspace-header{gap:16px;padding:6px 12px}.workspace-brand .tocorobo-logo{width:180px}.workspace-header .page-tabs{gap:2px}.workspace-header .page-tabs button{padding:6px 9px}.workspace-bar{gap:7px}.workspace-bar>button{font-size:11px;padding:6px 9px}.workspace-bar #lesson-step{display:none}.studio-layout.with-course{grid-template-columns:minmax(0,1fr) 280px}.canvas-title>span{display:none}.palette-top{gap:10px}.palette .palette-top #category-tabs button{padding:4px 10px}.with-course .palette-top #insert-label{display:none}.with-course .selection-name .selection-hint{display:none}}
@media(max-height:700px){.workspace-header{height:48px;min-height:48px}.workspace-bar{min-height:48px;padding-top:5px;padding-bottom:5px}.canvas-toolbar{min-height:42px}.palette #palette-items,.lesson-mode .palette #palette-items{min-height:78px;padding-top:5px;padding-bottom:5px}.app-footer{min-height:20px;padding-top:2px;padding-bottom:2px}}

/* v0.38 — beginner route and lesson numbers remain visible on supported PCs. */
.intro-lesson .studio-layout.with-course{grid-template-columns:minmax(0,1fr) clamp(300px,30vw,410px)}
.workspace-bar #lesson-step{display:inline-block}

#cargo-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:6;overflow:visible}
.cargo-box rect{fill:#efbd72;stroke:#ad783d;stroke-width:.5}.cargo-box .cargo-shadow{fill:#264d5030;stroke:none}.cargo-box.held .cargo-shadow{transform:translate(1px,1px);fill:#264d5028}.cargo-box path{stroke:#fff1d7;stroke-width:2.2}.cargo-box text{font-size:5px;fill:#176a56;text-anchor:middle;font-weight:900}
#cargo-status{padding:8px 12px;background:#eff7f3;border:1px solid #c1ddd1;border-radius:10px;margin:8px 0;color:#294d48}
.cargo-stages{display:flex;gap:5px;flex-wrap:wrap;font-size:11px}.cargo-stages span{padding:4px 8px;border:1px solid transparent;border-radius:6px}.cargo-stages .current{background:#fff;border-color:#438f7b;color:#175c4c;font-weight:750;box-shadow:0 1px 3px #244d4910}
.cargo-reading{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;align-items:center;padding:6px 3px 0;font-size:12px}.cargo-reading span{font-size:11px;font-variant-numeric:tabular-nums;color:#52736b}
body:is([data-mechanism="grab-lift"],[data-mechanism="dual-arm"]) #run-stage .motion-caption{display:none}

body:is([data-mechanism="grab-lift"],[data-mechanism="dual-arm"]) #run-stage .simulation{grid-template-rows:48px minmax(0,1fr) auto 14px;gap:5px}
#run-stage #cargo-status{width:100%;margin:0;padding:6px 10px;align-self:stretch}

.cargo-box.fixed>rect:not(.cargo-shadow){fill:#91b3bf;stroke:#537987}.arm-controls{flex-wrap:wrap}.compact-badge select{min-width:48px}

body.home-view>.workspace-header,body.home-view>#studio,body.home-view>.app-footer{display:none!important}
#home-page{display:none;background:#f9fbf5;color:#203f3d;font-size:16px;line-height:1.9}
.home-view #home-page{display:block;overflow-y:auto;flex:1;min-height:0}
#home-page a{color:inherit;text-underline-offset:5px}#home-page button{font-size:15px;border-radius:10px;min-height:48px;padding:12px 20px}
.site-nav{max-width:1180px;margin:auto;padding:24px 28px;display:flex;gap:22px;align-items:center}.site-nav img{width:230px;height:auto;display:block}.site-nav a:nth-last-child(2){margin-left:auto;font-size:14px}.beta-tag{font-size:11px;white-space:nowrap;background:#e4eddd;color:#3e6655;padding:4px 9px;border-radius:20px}
.home-hero{max-width:1180px;margin:25px auto 80px;padding:20px 40px;display:grid;grid-template-columns:1.1fr 1fr;gap:44px;align-items:center}.eyebrow{font-size:12px;letter-spacing:.14em;font-weight:700;color:#538475;margin:0 0 18px}.home-hero h1{font-size:clamp(32px,3.4vw,48px);line-height:1.4;letter-spacing:.025em;font-weight:800;margin:0 0 25px}.hero-description{font-size:16px;line-height:2.1;color:#506a63}.hero-actions{display:flex;align-items:center;gap:22px;margin-top:28px}.hero-actions a{font-size:13px}.site-primary{background:#245e50!important;color:#fff!important;border-color:#245e50!important;box-shadow:0 4px 0 #163d34}.site-primary:hover{background:#194a40!important}.hero-meta{font-size:12px;font-weight:700;margin:18px 0 12px}.device-note{font-size:11px;color:#64746d}.hero-visual{text-align:center;position:relative;padding-top:14px}.visual-label{letter-spacing:.17em;font-size:12px;color:#548171}.robot-disc{background:#e3eddb;border-radius:50%;aspect-ratio:1;max-width:420px;margin:20px auto;display:grid;place-items:center;border:1px solid #d9e5ce}.robot-disc img{width:90%;height:90%;object-fit:contain}.hero-visual>p{font-size:13px;color:#5b7769}.program-steps{display:flex;align-items:center;justify-content:center;gap:9px;margin-top:-30px;position:relative}.program-steps span{background:#fff;padding:9px 18px;border-radius:9px;border-top:5px solid #578b66;box-shadow:0 5px 14px #203f3d13;font-size:13px;font-weight:700}.program-steps i{font-style:normal;color:#809282}
.start-section,.how-section,.faq-section{max-width:1100px;margin:80px auto;padding:0 28px}.section-heading{margin-bottom:30px}.section-heading h2,.story-section h2,.beta-section h2{font-size:30px;line-height:1.6;margin:0 0 16px}.section-heading>p:last-child{color:#64776c;font-size:14px}.start-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.start-cards article{background:#fff;border:1px solid #dce5d7;border-radius:18px;padding:28px;display:flex;flex-direction:column}.card-number{color:#6b8876;font-size:10px;letter-spacing:.12em}.start-cards h3{font-size:19px;margin:15px 0 9px}.start-cards p{font-size:14px;color:#587064;flex:1}.start-cards button{width:100%;margin-top:18px}.story-section{display:grid;grid-template-columns:.9fr 1.2fr;gap:60px;background:#eaf0e3;padding:70px max(32px,calc((100% - 1020px)/2));margin:90px 0}.story-section h2{font-size:38px}.story-sign{font-size:13px;margin-top:40px}.story-sign span{font-size:11px;color:#64776c}.story-text p{margin:0 0 20px;font-size:15px}.story-text .story-last{font-weight:700;color:#245e50;margin-top:28px}
.how-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:30px}.how-grid article{border-top:1px solid #bfd0ba;padding:24px 0}.how-grid span{display:inline-grid;place-items:center;border-radius:50%;width:35px;height:35px;background:#e5edde;color:#35604b;font-family:monospace}.how-grid h3{margin:12px 0 0;font-size:20px}.how-grid p,.support-copy{font-size:14px;color:#5c7466}.support-copy{background:#f0f4e9;border-radius:10px;padding:20px}
.beta-section{max-width:1044px;margin:80px auto;padding:42px;display:grid;grid-template-columns:1fr 1fr;gap:45px;border:1px solid #cbd9c4;border-radius:20px;background:#fff}.beta-section p{font-size:14px;color:#566f62}.beta-scope h3{font-size:15px;margin:0 0 7px}.beta-scope h3:not(:first-child){margin-top:24px}.small-copy{font-size:12px!important;color:#667b70}.faq-section details{border-top:1px solid #d7e1d0;padding:19px 3px}.faq-section details:last-child{border-bottom:1px solid #d7e1d0}.faq-section summary{cursor:pointer;font-size:15px;font-weight:600}.faq-section details p{font-size:14px;color:#506a5d;padding:0 20px}.closing-section{text-align:center;padding:25px 20px 75px}.closing-section h2{font-size:28px}.site-footer{border-top:1px solid #d7e1d0;padding:28px 32px;display:flex;flex-wrap:wrap;gap:16px;justify-content:center;font-size:12px;color:#557463}.site-footer small{width:100%;text-align:center;font-size:10px}
#feedback-dialog label{display:flex;flex-direction:column;gap:8px;margin:16px 0;font-size:13px}#feedback-dialog textarea{font:inherit;border:1px solid #becfc5;border-radius:7px;padding:10px;resize:vertical;width:100%}.beta-sample{padding-left:22px;line-height:2.2}.beta-sample li{font-size:14px}.beta-sample span{color:#597367;font-size:12px}
#beta-run-observation{margin:0;padding:8px 15px;background:#f0f6ea;font-size:12px;color:#335c4c;flex:none}.continuous-lesson #run-details{display:grid!important;max-height:28%;overflow:auto}.continuous-lesson #run-details .device-panel{display:none}.continuous-lesson .run-body{grid-template-columns:minmax(0,1fr) minmax(310px,34%)}
#site-home{font-size:11px;padding:5px 8px;min-height:32px}.app-footer button{min-height:20px;padding:1px 5px;font-size:10px}.home-view #boot-error{position:fixed;bottom:16px;left:16px;right:16px;padding:18px;background:#fff3e6;border:1px solid #b67846;z-index:200}
@media(max-width:760px){.site-nav{padding:18px;gap:10px;flex-wrap:wrap}.site-nav img{width:180px}.site-nav a:nth-last-child(2){display:inline}.site-nav .resume-link{margin-left:auto}.home-hero{grid-template-columns:1fr;gap:10px;padding:12px 24px;margin:5px auto 45px}.hero-visual{order:2;max-width:370px;margin:auto}.home-hero h1{font-size:clamp(28px,7.1vw,38px)}.start-cards,.how-grid,.story-section,.beta-section{grid-template-columns:1fr}.story-section{gap:18px;padding:42px 26px}.story-sign{margin-top:20px}.start-section,.how-section,.faq-section{margin:45px auto;padding:0 22px}.beta-section{margin:45px 22px;padding:26px;gap:25px}.section-heading h2,.beta-section h2{font-size:25px}.story-section h2{font-size:32px}.hero-actions{gap:16px}.hero-actions a{font-size:12px}.closing-section h2{font-size:23px}}
@media(prefers-reduced-motion:reduce){#home-page{scroll-behavior:auto}}

/* Static learning guides and direct contact navigation. */
.site-nav{flex-wrap:wrap;gap:14px 22px}.site-nav>a:not(:first-child){font-size:13px;white-space:nowrap}.site-nav a:nth-last-child(2){margin-left:0}.site-nav>a:nth-child(3){margin-left:auto}.site-nav .resume-link{font-size:13px!important;min-height:38px!important;padding:6px 13px!important}.home-guides{max-width:1120px;margin:0 auto;padding:72px 28px}.toco-guide-feature{display:flex;justify-content:space-between;align-items:center;gap:24px;text-decoration:none;background:#eaf1df;border:1px solid #ccdbc2;border-radius:18px;padding:28px 32px;margin:28px 0}.toco-guide-feature h3{font-size:27px;margin:8px 0}.toco-guide-feature p{margin:0;font-size:15px}.toco-guide-feature>span{font-size:28px}.guide-index{display:grid;grid-template-columns:1fr 1fr;column-gap:42px}.guide-index>a{display:flex;align-items:flex-start;gap:16px;border-bottom:1px solid #d5dfcf;text-decoration:none;padding:24px 0}.guide-index h3{font-size:18px;line-height:1.6;margin:0 0 6px}.guide-index p{font-size:13px;margin:0;color:#526a61}.guide-number{font-size:13px;color:#67846e;font-weight:750;padding-top:4px}.guide-arrow{margin-left:auto;padding-top:3px}.guide-index>a:hover h3,.toco-guide-feature:hover h3{text-decoration:underline;text-underline-offset:5px}.contact-link{display:inline-block;border:1px solid currentColor;border-radius:10px;padding:10px 18px;text-decoration:none;font-weight:700}.hero-visual>p>a{font-size:12px}.app-footer>a{color:inherit;text-underline-offset:4px}.site-footer{flex-wrap:wrap}.workspace-menu a{color:inherit}.home-guides a:focus-visible{outline:3px solid #b25b36;outline-offset:5px}
@media(max-width:700px){.site-nav{padding:20px;gap:12px 16px}.site-nav>a:first-child{flex:1 1 auto}.site-nav img{width:190px}.site-nav>a:nth-child(3){margin-left:0}.site-nav .resume-link{margin-left:0}.home-guides{padding:48px 22px}.guide-index{grid-template-columns:1fr}.toco-guide-feature{padding:24px}.toco-guide-feature h3{font-size:24px}.toco-guide-feature p{font-size:13px}.guide-index h3{font-size:17px}.guide-index>a{padding:21px 0}}

/* Keep the public introduction responsive; the editor retains its PC canvas. */
body.home-view{min-width:0;width:100%}body.home-view #home-page{width:100%;min-width:0}
