:root{--bg: #faf9f5;--surface: #ffffff;--border: #d3d1c7;--text: #2c2c2a;--muted: #5f5e5a;--primary: #378ADD;--primary-dark: #185FA5;--purple: #7F77DD;--teal: #1D9E75;--coral: #D85A30;--amber: #BA7517;--danger: #A32D2D}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Hiragino Sans,Noto Sans JP,sans-serif;background:var(--bg);color:var(--text)}button{font:inherit;background:var(--surface);border:1px solid var(--border);padding:6px 14px;border-radius:6px;cursor:pointer;color:var(--text)}button:hover:not(:disabled){background:#f1efe8}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--primary);color:#fff;border-color:var(--primary)}button.primary:hover:not(:disabled){background:var(--primary-dark)}input{font:inherit;padding:8px 10px;border:1px solid var(--border);border-radius:6px;background:var(--surface)}input:focus{outline:2px solid var(--primary);outline-offset:-1px}.centered{display:flex;align-items:center;justify-content:center;height:100%}.app-header{display:flex;align-items:center;gap:12px;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--border);height:56px}.app-title{font-weight:600;font-size:16px;flex:0 0 auto}.app-header-right{margin-left:auto;display:flex;gap:10px;align-items:center}.who{font-size:14px;color:var(--muted)}.link-btn,.back-btn{background:transparent;border:none;color:var(--primary);padding:4px 8px}.title-input{flex:1;max-width:400px;font-weight:500}.saved-tag{font-size:12px;color:var(--muted)}.login-view{display:flex;align-items:center;justify-content:center;height:100%;padding:20px}.login-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:40px;max-width:440px;width:100%}.login-card h1{margin:0 0 8px;font-size:22px}.login-sub{color:var(--muted);margin:0 0 24px;font-size:14px}.login-card label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}.login-card input{width:100%;margin-bottom:16px}.login-card button.btn-primary{width:100%;padding:10px;background:var(--primary);color:#fff;border-color:var(--primary)}.login-note{font-size:12px;color:var(--muted);margin-top:20px;line-height:1.6}.error{color:var(--danger);margin-top:10px;font-size:13px}.project-list-view{display:flex;flex-direction:column;height:100%}.project-list-main{padding:24px;max-width:900px;width:100%;margin:0 auto}.new-row{display:flex;gap:12px;margin-bottom:32px}.project-list-main h2{font-size:16px;margin-bottom:12px;color:var(--muted)}.empty{color:var(--muted);padding:40px;text-align:center;background:var(--surface);border-radius:8px}.project-cards{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}.project-card{display:flex;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:14px 18px}.project-card .proj-main{flex:1;cursor:pointer}.project-card:hover{border-color:var(--primary)}.proj-title{font-weight:500}.proj-meta{font-size:12px;color:var(--muted);margin-top:2px}.del-btn{background:transparent;border:none;color:var(--danger);font-size:13px}.editor-view{display:flex;flex-direction:column;height:100%}.share-bar{display:flex;gap:8px;align-items:center;padding:8px 16px;background:#e6f1fb;border-bottom:1px solid var(--border);font-size:13px}.share-bar input{flex:1}.editor-main{flex:1;display:flex;min-height:0;overflow:hidden}.three-pane{flex:1;display:grid;grid-template-columns:1.5fr 1fr .9fr;gap:1px;background:var(--border);min-width:0}.pane{display:flex;flex-direction:column;background:var(--surface);min-width:0;min-height:0}.pane-header{font-size:13px;font-weight:500;padding:8px 14px;border-bottom:1px solid var(--border);background:#f8f7f2}.block-pane .pane-header{background:#eeedfe;color:#3c3489}.code-pane .pane-header{background:#e1f5ee;color:#085041}.flow-pane .pane-header{background:#faece7;color:#712b13}.blockly-area{flex:1;min-height:0}.blockly-area .blocklyToolboxDiv{font-size:14px;min-width:120px;padding:10px 8px!important;background:var(--surface)!important;border-right:1px solid var(--border)!important}.blockly-area .blocklyToolboxCategory{margin-bottom:6px}.blockly-area .blocklyTreeRow{border-left:none!important;padding:10px 14px!important;height:auto!important;line-height:1.4!important;border-radius:8px!important;cursor:pointer}.blockly-area .blocklyTreeIcon{display:none!important}.blockly-area .blocklyTreeLabel{font-size:14px!important;font-weight:500!important;color:#fff!important;padding:0!important}.blockly-area .blocklyToolboxCategory:nth-child(1) .blocklyTreeRow{background:#378add!important}.blockly-area .blocklyToolboxCategory:nth-child(2) .blocklyTreeRow{background:#1d9e75!important}.blockly-area .blocklyToolboxCategory:nth-child(3) .blocklyTreeRow{background:#7f77dd!important}.blockly-area .blocklyToolboxCategory:nth-child(4) .blocklyTreeRow{background:#d85a30!important}.blockly-area .blocklyToolboxCategory[aria-selected=true] .blocklyTreeRow{box-shadow:inset 0 0 0 3px #0000004d!important}.code-pane-inner{flex:1;display:flex;flex-direction:column;min-height:0;position:relative}.codemirror-area{flex:1;overflow:auto}.parse-error{background:#fcebeb;color:#791f1f;padding:6px 12px;font-size:12px;border-top:1px solid #F09595}.flow-area{flex:1;overflow-y:auto;overflow-x:hidden;padding:12px 8px;display:flex;align-items:flex-start;justify-content:center}.flow-area svg{max-width:100%!important;height:auto!important}.flow-area .nodeLabel,.flow-area .edgeLabel{font-size:16px!important;font-weight:500!important}.flow-area foreignObject div{font-size:16px!important;font-weight:500!important}.sim-panel{width:460px;flex:0 0 460px;display:flex;flex-direction:column;border-left:1px solid var(--border);background:var(--surface)}.sim-panel .pane-header{background:#e6f1fb;color:#0c447c}.sim-view{flex:1;display:flex;flex-direction:column;padding:12px;gap:10px}.sim-toolbar{display:flex;gap:6px;align-items:center}.sim-toolbar .goal-tag{margin-left:auto;color:var(--teal);font-weight:600}.sim-canvas{border:1px solid var(--border);align-self:center;background:#fff}.sim-log{flex:1;min-height:60px;max-height:120px;background:#f8f7f2;padding:10px;border-radius:6px;font-size:13px;overflow-y:auto}.sim-log em{color:var(--muted);font-style:normal}.login-legal{margin-top:16px;text-align:center;font-size:12px}.legal-link{background:none;border:none;color:var(--primary);font-size:12px;padding:2px 4px;cursor:pointer;text-decoration:underline}.legal-sep{color:var(--muted);margin:0 4px}.legal-overlay{position:fixed;inset:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px}.legal-modal{background:var(--surface);border-radius:12px;max-width:640px;width:100%;max-height:80vh;display:flex;flex-direction:column;box-shadow:0 10px 40px #0000004d}.legal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border);font-weight:600;font-size:15px}.legal-close{background:none;border:none;font-size:22px;line-height:1;color:var(--muted);cursor:pointer;padding:0 4px}.legal-body{padding:20px;overflow-y:auto;white-space:pre-wrap;font-size:13px;line-height:1.7;color:var(--text)}.home-mode-tabs{display:flex;gap:8px;margin-bottom:24px}.home-tab{padding:10px 20px;border-radius:8px;font-size:14px;font-weight:500;background:var(--surface);border:1px solid var(--border);cursor:pointer;color:var(--muted)}.home-tab-active{background:var(--primary);color:#fff;border-color:var(--primary)}.home-section{animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.home-mode-card{display:flex;align-items:flex-start;gap:16px;padding:16px 20px;border-radius:10px;border:1px solid var(--border);margin-bottom:20px}.mb-mode-card{background:#1a1a2e;border-color:#333}.mb-mode-card .home-mode-title{color:#e0e0ff;font-weight:600;font-size:15px}.mb-mode-card .home-mode-desc{color:#888;font-size:13px;margin-top:4px;line-height:1.6}.char-mode-card{background:#f0f8ff;border-color:#c0d8f0}.char-mode-card .home-mode-title{color:#1a5fa8;font-weight:600;font-size:15px}.char-mode-card .home-mode-desc{color:#5a7a9a;font-size:13px;margin-top:4px;line-height:1.6}.home-mode-icon{font-size:32px;flex-shrink:0}.mb-editor-view{display:flex;flex-direction:column;height:100%;background:#f4f4f8}.mb-editor-view .app-header{background:#fff;border-bottom:1px solid #d0d0e0;color:#1a1a3a}.mb-editor-view .app-header input{background:#f0f0f8;color:#1a1a3a;border-color:#c0c0d8}.mb-editor-view .app-header .saved-tag{color:#666}.mb-editor-view .back-btn{color:#35c}.mb-editor-main{flex:1;display:flex;min-height:0;overflow:auto;background:#f4f4f8}.mb-sim-panel{width:210px;flex:0 0 210px;min-width:0;display:flex;flex-direction:column;background:#f0f0f8;border-right:1px solid #d0d0e0;overflow-x:hidden}.mb-sim-wrap{flex:1;display:flex;flex-direction:column;align-items:center;padding:12px 8px;gap:10px;overflow-y:auto}.mb-body{background:#1a1060;border-radius:12px;padding:12px 10px;width:100%;max-width:170px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:8px;box-shadow:0 4px 20px #00005080;border:2px solid #2a2080}.mb-logo{font-size:10px;color:#6060cc;font-weight:700;letter-spacing:1px;width:100%;text-align:left}.mb-led-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:3px;background:#0a0a20;padding:8px;border-radius:8px;width:100%}.mb-led{aspect-ratio:1;border-radius:50%;background:#1a0a0a;transition:background .15s,box-shadow .15s}.mb-buttons{display:flex;align-items:center;gap:6px;width:100%}.mb-btn{width:36px;height:24px;background:#2a2080;border:2px solid #4040c0;border-radius:6px;color:#aaf;font-size:11px;font-weight:700;cursor:pointer;transition:all .1s;display:flex;align-items:center;justify-content:center}.mb-btn:hover{background:#3a30a0}.mb-btn-pressed{background:#5050e0!important;transform:scale(.95);box-shadow:0 0 8px #6464ff99}.mb-speaker{flex:1;display:flex;justify-content:center;gap:3px}.mb-speaker-hole{width:4px;height:16px;background:#0a0a20;border-radius:2px}.mb-pins{display:flex;justify-content:space-between;width:100%;padding:0 2px}.mb-pin-hole{width:10px;height:10px;background:#0a0a20;border-radius:50%;border:1px solid #2a2080}.mb-pin-label{font-size:8px;color:#6060cc}.mb-log{width:100%;background:#f0f0fa;border-radius:8px;padding:8px;min-height:60px;border:1px solid #c0c0d8}.mb-log-title{font-size:10px;color:#44a;margin-bottom:4px;font-weight:600}.mb-log-empty{font-size:10px;color:#888;font-style:italic}.mb-log-line{font-size:11px;color:#24a;line-height:1.6}.mb-block-pane{flex:1.4}.mb-code-pane{flex:1}.mb-flow-pane{flex:.9}.mb-editor-view .pane{display:flex;flex-direction:column;background:#fafafa;min-width:0;min-height:0;border-right:1px solid #d0d0e0}.mb-editor-view .pane-header{font-size:12px;font-weight:500;padding:8px 12px;border-bottom:1px solid #d0d0e0;display:flex;align-items:center}.mb-editor-view .blockly-area{flex:1;min-height:0}.mb-editor-view .code-pane-inner{flex:1;display:flex;flex-direction:column;min-height:0}.mb-editor-view .codemirror-area{flex:1;overflow:auto}.mb-editor-view .cm-editor{background:#fafafa!important}.mb-editor-view .cm-content{color:#1a1a2a!important}.mb-editor-view .flow-area{flex:1;overflow-y:auto;padding:12px 8px;display:flex;align-items:flex-start;justify-content:center}.mb-editor-view .flow-area svg{max-width:100%!important;height:auto!important}.mb-block-pane .blocklyToolboxDiv{background:#f0f0f8!important;border-right:1px solid #d0d0e0!important;min-width:110px;padding:10px 8px!important}.mb-block-pane .blocklyToolboxCategory{margin-bottom:6px}.mb-block-pane .blocklyTreeRow{border-left:none!important;padding:10px 12px!important;height:auto!important;border-radius:8px!important;cursor:pointer}.mb-block-pane .blocklyTreeIcon{display:none!important}.mb-block-pane .blocklyTreeLabel{font-size:13px!important;font-weight:500!important;color:#fff!important;padding:0!important}.mb-block-pane .blocklyToolboxCategory:nth-child(1) .blocklyTreeRow{background:#378add!important}.mb-block-pane .blocklyToolboxCategory:nth-child(2) .blocklyTreeRow{background:#1d9e75!important}.mb-block-pane .blocklyToolboxCategory:nth-child(3) .blocklyTreeRow{background:#c2185b!important}.mb-block-pane .blocklyToolboxCategory:nth-child(4) .blocklyTreeRow{background:#0097a7!important}.mb-block-pane .blocklyToolboxCategory:nth-child(5) .blocklyTreeRow{background:#ba7517!important}.mb-block-pane .blocklyToolboxCategory:nth-child(6) .blocklyTreeRow{background:#1d9e75!important}.mb-block-pane .blocklyToolboxCategory:nth-child(7) .blocklyTreeRow{background:#7f77dd!important}.mb-block-pane .blocklyToolboxCategory:nth-child(8) .blocklyTreeRow{background:#d85a30!important}.mb-block-pane .blocklyToolboxCategory:nth-child(9) .blocklyTreeRow{background:#ba7517!important}.mb-block-pane .blocklyToolboxCategory[aria-selected=true] .blocklyTreeRow{box-shadow:inset 0 0 0 3px #ffffff4d!important}.mb-sim-container{display:flex;flex-direction:column;align-items:center;gap:4px;padding:0;overflow-y:auto;height:100%}.mb-sim-sticky{position:sticky;top:0;z-index:10;width:100%;background:#f0f0f8;padding:8px 8px 0;display:flex;flex-direction:column;gap:4px}.mb-sim-scroll{width:100%;padding:4px 8px 8px;display:flex;flex-direction:column;gap:4px}.mb-board{background:#1c1c1c;border-radius:10px;padding:10px 10px 0;width:190px;border:1px solid #333;box-shadow:0 4px 16px #0006}.mb-board-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.mb-board-logo{font-size:8px;color:#555;font-weight:700;letter-spacing:1px}.mb-usb{width:22px;height:9px;background:#2a2a2a;border:1px solid #555;border-radius:2px}.mb-board-middle{display:flex;flex-direction:column;gap:6px}.mb-board-indicators{display:flex;gap:6px;justify-content:flex-end;padding-right:2px}.mb-indicator{width:6px;height:6px;border-radius:50%}.mb-indicator-power{background:#ff3030;box-shadow:0 0 4px #ff3c3c99}.mb-indicator-comm{background:#fa0;box-shadow:0 0 4px #fa06}.mb-board-main{display:flex;align-items:center;gap:4px}.mb-hw-btn{width:24px;height:20px;flex-shrink:0;background:#252060;border:2px solid #4040a0;border-radius:5px;cursor:pointer;font-size:10px;font-weight:700;color:#88c;transition:all .1s;display:flex;align-items:center;justify-content:center}.mb-hw-btn:hover{background:#3030a0}.mb-hw-btn-pressed{background:#5050e0!important;transform:scale(.92);box-shadow:0 0 8px #6464ffb3}.mb-led-bezel{flex:1;background:#111;border-radius:8px;padding:7px;border:1px solid #222}.mb-led-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:3px}.mb-led-dot{aspect-ratio:1;border-radius:50%;background:#160404;transition:background .1s,box-shadow .1s}.mb-board-bottom-icons{display:flex;justify-content:space-around;padding:4px 0;border-top:1px solid #2a2a2a;margin-top:2px}.mb-icon-item{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:7px;color:#555}.mb-mic-hole{width:8px;height:8px;border:1px solid #444;border-radius:50%;background:#0a0a0a}.mb-speaker-holes{display:flex;gap:2px}.mb-speaker-dot{width:4px;height:8px;background:#0a0a0a;border-radius:1px;border:1px solid #333}.mb-compass-symbol{font-size:10px}.mb-edge-connector{display:flex;justify-content:space-between;padding:4px 4px 0;border-top:1px solid #2a2a2a;margin-top:6px}.mb-pin{display:flex;flex-direction:column;align-items:center;gap:2px}.mb-pin-contact{width:20px;height:10px;border-radius:2px 2px 0 0}.mb-pin-gold{background:#c8a000}.mb-pin-silver{background:#666}.mb-pin-label{font-size:7px;color:#555;padding-bottom:3px}.mb-sensor-panel{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:8px}.mb-sensor-title{font-size:11px;font-weight:500;color:var(--muted);margin-bottom:8px;letter-spacing:.3px}.mb-sensor-row{display:flex;flex-direction:column;gap:2px;margin-bottom:8px}.mb-sensor-row:last-child{margin-bottom:0}.mb-sensor-label{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--text);margin-bottom:2px}.mb-sensor-label-left{display:flex;align-items:center;gap:4px}.mb-sensor-icon{font-size:12px}.mb-sensor-ctrl{display:flex;align-items:center;gap:6px}.mb-sensor-slider{flex:1;min-width:0}.mb-sensor-val{font-size:12px;font-weight:600;color:var(--primary);min-width:48px;text-align:right;flex-shrink:0}.mb-run-bar{display:flex;align-items:center;gap:6px;width:100%;margin-top:0}.mb-run-btn{background:#1d9e75!important;color:#fff!important;border:none!important;padding:8px 16px!important;border-radius:6px!important;cursor:pointer!important;font-size:13px!important;font-weight:500!important;flex-shrink:0;display:block!important;opacity:1!important;visibility:visible!important;min-width:80px}.mb-run-btn:hover{background:#148060!important}.mb-stop-btn{background:#a32d2d!important;color:#fff!important;border:none!important;padding:8px 16px!important;border-radius:6px!important;cursor:pointer!important;font-size:13px!important;font-weight:500!important;flex-shrink:0;display:block!important;opacity:1!important;visibility:visible!important;min-width:80px}.mb-stop-btn:hover{background:#8a1f1f!important}.mb-run-hint{font-size:11px;color:var(--muted);line-height:1.4}.mb-log-panel{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:8px;min-height:80px;max-height:160px;overflow-y:auto}.mb-log-title{font-size:11px;font-weight:500;color:var(--muted);margin-bottom:4px}.mb-log-empty{font-size:11px;color:var(--muted);font-style:italic}.mb-log-line{font-size:12px;color:var(--text);line-height:1.7}.mb-reset-btn{background:var(--surface)!important;color:var(--text)!important;border:1px solid var(--border)!important;padding:8px 12px!important;border-radius:6px!important;cursor:pointer!important;font-size:13px!important;flex-shrink:0;display:block!important;opacity:1!important;visibility:visible!important}.mb-reset-btn:hover{background:#f1efe8!important}.mb-gesture-panel{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:8px}.mb-gesture-btns{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.mb-gesture-btn{background:#f0f0f8!important;color:var(--text)!important;border:1px solid var(--border)!important;padding:5px 6px!important;border-radius:6px!important;cursor:pointer!important;font-size:11px!important;flex:1 1 calc(50% - 2px)}.mb-gesture-btn:hover{background:#e0e0f0!important}.mb-editor-view .flow-area .nodeLabel{font-size:16px!important}.mb-editor-view .flow-area foreignObject div{font-size:16px!important}.mb-editor-view .flow-area svg{max-width:100%!important}.mb-sim-sticky-log{position:sticky;top:0;z-index:9;width:100%;padding:0 8px 4px;background:#f0f0f8}.mb-sim-sticky-log .mb-log-panel{min-height:60px;max-height:100px}.mb-speaker-active .mb-speaker-dot{background:#fc0!important;box-shadow:0 0 4px #ffc800cc}.cm-highlight-line{background:#ffa50080!important;border-left:4px solid #ff6600!important;display:block!important}.mb-editor-view .cm-highlight-line,.cm-editor .cm-highlight-line,.cm-content .cm-highlight-line{background:#ffa50080!important;border-left:4px solid #ff6600!important}.teacher-entry{text-align:center;margin-top:12px}.teacher-entry-btn{background:none;border:none;color:#35c;font-size:13px;cursor:pointer;text-decoration:underline}.teacher-login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#f4f4f8}.teacher-login-box{background:#fff;border-radius:12px;padding:32px;box-shadow:0 4px 20px #0000001a;width:320px}.teacher-login-box h2{margin:0 0 20px;font-size:20px}.teacher-login-fields{display:flex;flex-direction:column;gap:12px}.teacher-input{padding:10px 12px;border:1px solid #ddd;border-radius:8px;font-size:14px;outline:none}.teacher-input:focus{border-color:#35c}.teacher-login-btn{padding:10px;background:#35c;color:#fff;border:none;border-radius:8px;font-size:14px;cursor:pointer}.teacher-login-btn:hover{background:#24b}.teacher-error{color:#c33;font-size:13px}.teacher-view{display:flex;flex-direction:column;height:100vh}.teacher-title{font-weight:600;font-size:15px}.teacher-logout-btn{margin-left:auto;padding:6px 12px;background:#f0f0f0;border:1px solid #ddd;border-radius:6px;cursor:pointer;font-size:13px}.teacher-body{flex:1;overflow-y:auto;padding:16px}.teacher-breadcrumb{margin-bottom:16px;font-size:14px;color:#666}.teacher-breadcrumb .link{color:#35c;cursor:pointer;text-decoration:underline}.teacher-breadcrumb .active{font-weight:600;color:#333}.teacher-list-header{font-size:15px;font-weight:600;margin-bottom:12px;color:#333}.teacher-table{width:100%;border-collapse:collapse;font-size:14px}.teacher-table th{background:#f4f4f8;padding:10px 12px;text-align:left;border-bottom:2px solid #ddd;font-weight:600}.teacher-table td{padding:10px 12px;border-bottom:1px solid #eee}.teacher-row{cursor:pointer}.teacher-row:hover{background:#f8f8ff}.teacher-del-btn{padding:4px 10px;background:none;border:1px solid #cc3333;color:#c33;border-radius:4px;cursor:pointer;font-size:12px}.teacher-del-btn:hover{background:#fff0f0}.teacher-empty{color:#999;padding:20px;text-align:center}.teacher-code-view{background:#f4f4f8;border-radius:8px;padding:16px;overflow:auto;max-height:60vh}.teacher-code-view pre{margin:0;font-size:12px}.teacher-project-view h3{margin:0 0 12px}.teacher-project-meta{display:flex;gap:16px;margin-bottom:12px;font-size:13px;color:#666}.teacher-project-body{display:flex;gap:16px;align-items:flex-start}.teacher-code-panel,.teacher-flow-panel{flex:1;min-width:0}.teacher-panel-title{font-size:13px;font-weight:600;color:#666;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #eee}.teacher-flow-view{background:#fafafa;border-radius:8px;padding:12px;overflow:auto;max-height:60vh}.login-hint{font-size:11px;color:#999;font-weight:400}.teacher-school-code{font-size:12px;color:#999;font-weight:400}.admin-tabs{display:flex;gap:8px;margin-bottom:16px}.admin-tab{padding:8px 16px;border:1px solid #ddd;border-radius:8px;background:#fff;cursor:pointer;font-size:14px}.admin-tab.active{background:#35c;color:#fff;border-color:#35c}.admin-add-form{background:#f8f8ff;border-radius:8px;padding:16px;margin-bottom:20px}.admin-add-form h3{margin:0 0 12px;font-size:15px}.admin-form-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.admin-form-row .teacher-input{flex:1;min-width:150px}.admin-add-btn{white-space:nowrap;padding:10px 16px!important}.admin-msg{margin-top:8px;font-size:13px;color:#35c}.mb-receiver{width:100%;background:#eef4fb;border:1px solid #c5d8ea;border-radius:8px;padding:8px;transition:box-shadow .2s,border-color .2s}.mb-receiver-active{border-color:#1d9e75;box-shadow:0 0 0 2px #1d9e7559}.mb-receiver-title{font-size:11px;font-weight:600;color:#0c447c;margin-bottom:6px}.mb-receiver-body{display:flex;align-items:flex-start;gap:8px}.mb-receiver-board{background:#1c1c1c;border-radius:8px;padding:6px;width:96px;flex-shrink:0;border:1px solid #333}.mb-receiver-board .mb-led-bezel{padding:5px}.mb-receiver-board .mb-led-grid{gap:2px}.mb-receiver-log{flex:1;background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:6px;min-height:60px;max-height:96px;overflow-y:auto}.teacher-project-view{display:flex;flex-direction:column;height:100%;min-height:0}.teacher-project-meta{display:flex;flex-wrap:wrap;gap:14px;align-items:center;padding:10px 14px;background:#f7f7fb;border-bottom:1px solid #e2e2ec;font-size:14px;color:#555}.teacher-project-name{font-size:17px;font-weight:700;color:#222}.teacher-panes{flex:1;display:flex;min-height:0;overflow:hidden;border-top:1px solid #e2e2ec}.teacher-panes .pane{border-right:1px solid #e2e2ec}.teacher-panes .pane:last-child{border-right:none}.teacher-pane-body{flex:1;overflow:auto;min-height:0;padding:10px}.teacher-panes .teacher-code-view pre{margin:0;font-family:SF Mono,Menlo,Consolas,monospace;font-size:13px;line-height:1.6;white-space:pre-wrap;word-break:break-word}.teacher-flow-view{display:flex;justify-content:center}.teacher-flow-view svg{max-width:100%;height:auto}.teacher-pane-sim .mb-sim-container{width:100%}.teacher-pane-sim .mb-sim-sticky{position:static}.teacher-pane-sim .mb-sensor-panel,.teacher-pane-sim .mb-gesture-panel,.teacher-pane-sim .mb-event-panel{display:none}.teacher-pane-sim .mb-sim-wrap{padding:8px}.teacher-pane-block{flex:0 0 320px;min-width:0}.teacher-block-body{padding:0}.teacher-block-canvas{width:100%;height:100%;min-height:400px}.teacher-pane-sim{flex:0 0 240px}.teacher-pane-code,.teacher-pane-flow{flex:1;min-width:0}.gallery-view{padding:16px}.gallery-class-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:16px}.gallery-label{font-weight:600;color:#444}.gallery-class-btn{padding:8px 16px;border:1px solid #c8c8d8;border-radius:8px;background:#fff;cursor:pointer;font-size:15px}.gallery-class-btn:hover{background:#f0f0f8}.gallery-class-btn.active{background:#3c3489;color:#fff;border-color:#3c3489}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px}.gallery-card{border:1px solid #e2e2ec;border-radius:12px;padding:14px;background:#fff;cursor:pointer;text-align:center;transition:box-shadow .15s,transform .15s}.gallery-card:hover{box-shadow:0 4px 16px #0000001f;transform:translateY(-2px)}.gallery-card-thumb{font-size:48px;height:90px;display:flex;align-items:center;justify-content:center;background:#f7f7fb;border-radius:8px;margin-bottom:10px}.gallery-card-title{font-weight:600;font-size:15px;color:#222;margin-bottom:4px}.gallery-card-meta{font-size:13px;color:#777}.mb-thumb{display:inline-flex;flex-direction:column;gap:2px;background:#1a1a1a;padding:6px;border-radius:6px}.mb-thumb-row{display:flex;gap:2px}.mb-thumb-led{width:9px;height:9px;border-radius:2px;background:#3a1010}.mb-thumb-led.on{background:#ff3b30;box-shadow:0 0 3px #ff3b30}.mb-thumb-empty{font-size:40px;display:flex;align-items:center;justify-content:center}.gallery-projector-note{background:#eef4fc;border:1px solid #cfe0f5;border-radius:8px;padding:10px 14px;margin-bottom:14px;font-size:14px;color:#2c5a8c}.feature-tags{display:flex;flex-wrap:wrap;gap:4px;justify-content:center;margin-top:8px}.feature-tag{font-size:11px;padding:2px 7px;border-radius:10px;background:#eef0f7;color:#4a4a6a;white-space:nowrap}.teacher-reset-btn{padding:4px 10px;margin-right:6px;border:1px solid #3C3489;border-radius:6px;background:#fff;color:#3c3489;cursor:pointer;font-size:13px}.teacher-reset-btn:hover{background:#f0f0f8}
