:root{font-family:'Segoe UI','Malgun Gothic',sans-serif;color:#24364b;background:#edf2f8;font-size:13px}*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden}button,select,input{font:inherit}button,select{height:34px;border:1px solid #d9e1ed;border-radius:8px;background:white;color:#34465e;padding:0 12px}button{cursor:pointer;font-weight:600;white-space:nowrap}button:hover{background:#edf3ff;border-color:#a6bfe6}button:disabled{opacity:.45;cursor:wait}button:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #78a9f0;outline-offset:2px}.primary{background:#2769da;color:white;border-color:#2769da}.primary:hover{background:#1d56bb}header{height:70px;flex-shrink:0;display:flex;align-items:center;gap:28px;background:white;border-bottom:1px solid #dde5f0;padding:0 22px}.brand{display:flex;align-items:center;gap:10px}.mark{display:grid;place-items:center;background:#225cba;border-radius:12px;color:white;width:38px;height:38px;font-size:18px}.brand strong{font-size:16px}.brand small{display:block;letter-spacing:2px;font-size:9px;color:#8291a5;margin-top:3px}.connection{display:flex;gap:8px;align-items:center;font-size:12px}.connection select{width:116px}.connection button{width:32px;padding:0}.header-actions{margin-left:auto;display:flex;gap:8px}.toolbar{height:52px;flex-shrink:0;display:flex;gap:12px;align-items:center;padding:0 18px;background:#f8fafd;border-bottom:1px solid #dae3ef}.group{display:flex;gap:6px;border-right:1px solid #dce4ed;padding-right:12px}.toolbar select{max-width:220px}.spacer{flex:1}.muted{color:#738198}main{display:flex;flex:1;min-height:0;gap:0}.workspace-panel{position:relative;flex:1;min-width:0}#blocks{position:absolute;inset:0}.workspace-tools{position:absolute;right:20px;bottom:20px;display:flex;align-items:center;gap:4px;background:white;border:1px solid #dbe4ef;border-radius:12px;padding:5px;box-shadow:0 4px 20px #21365012}.workspace-tools button{border:0;padding:0 10px}.workspace-tools i{height:22px;border-right:1px solid #dde5f0}.workspace-tag{position:absolute;right:22px;top:15px;color:#8998aa;font-size:11px;pointer-events:none}#code-panel{flex:0 0 40%;min-width:0;border-left:1px solid #d4deeb;display:flex;flex-direction:column;background:white}#code-panel[hidden]{display:none}.code-heading{display:flex;align-items:center;gap:10px;padding:13px 16px}.code-heading select{margin-left:auto}.code-note{color:#7b8a9e;margin:0;padding:0 16px 12px;font-size:12px}#code{flex:1;min-height:0;resize:none;border:0;border-top:1px solid #edf1f7;border-bottom:1px solid #edf1f7;padding:18px;background:#f9fbff;color:#25456d;font:13px/1.8 Consolas,monospace;tab-size:2;outline:none}.code-footer{padding:10px 16px;display:flex;gap:8px}footer{height:38px;display:flex;align-items:center;gap:8px;padding:0 18px;background:white;border-top:1px solid #dae3ee;flex-shrink:0}footer button{border:0;height:28px}.dot{width:7px;height:7px;border-radius:50%;background:#34b58a}#status{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#log-panel{height:190px;flex-shrink:0;background:#15243a;color:#d8e7ff;padding:10px 18px;overflow:auto}#log-panel[hidden]{display:none}#close-log{float:right}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.6 Consolas,monospace}dialog{border:1px solid #d5dfeb;border-radius:18px;width:min(680px,90vw);max-height:85vh;padding:22px;box-shadow:0 20px 90px #10264340}dialog::backdrop{background:#18304b55}.dialog-heading{display:flex;align-items:center;justify-content:space-between}.dialog-heading h2{font-size:19px;margin:0 0 16px}.dialog-heading button{border:0}.row{display:flex;align-items:center;gap:8px;padding:12px 0;border-bottom:1px solid #edf1f7}.row .grow{flex:1}.row input{min-width:0;flex:1;height:34px;border:1px solid #d7e0ec;border-radius:6px;padding:8px}.help{line-height:1.7;color:#748398}.badge{font-size:11px;border-radius:5px;background:#eef4fd;padding:4px 7px}.blocklyToolbox{background:#f6f8fc!important;border-right:1px solid #e0e6ef!important}.blocklyToolboxCategory{min-height:38px;padding:3px 10px;border-radius:8px}.blocklyToolboxCategoryLabel{font-family:'Segoe UI','Malgun Gothic',sans-serif!important;font-size:12px!important}.blocklyFlyoutBackground{fill:#f8faff!important;fill-opacity:1!important}.blocklyText{font-family:'Segoe UI','Malgun Gothic',sans-serif!important;font-size:12px!important}.blocklyMainBackground{stroke:none}.blocklyTreeSelected,.blocklyToolboxSelected{background:#e4edfa!important} @media(max-width:1100px){header{gap:12px;padding:0 12px}.connection>span:first-child{display:none}.toolbar{gap:6px;padding:0 10px}.toolbar button{padding:0 8px}.group{gap:4px;padding-right:6px}.workspace-tag{display:none}.toolbar select{max-width:150px}}@media(max-width:740px){header{height:auto;min-height:65px;flex-wrap:wrap;padding:8px}.brand small{display:none}.header-actions{gap:4px}.toolbar{overflow-x:auto}.toolbar .spacer{display:none}#code-panel{position:absolute;inset:118px 0 38px 25%;z-index:10;box-shadow:-8px 0 25px #1232}#surface{min-height:230px}}
:root[data-theme="dark"]{color:#d6e3f5;background:#172538}html[data-theme="dark"] header,html[data-theme="dark"] footer,html[data-theme="dark"] #code-panel,html[data-theme="dark"] dialog,html[data-theme="dark"] .workspace-tools{background:#1c2c42;border-color:#35465e}html[data-theme="dark"] .toolbar{background:#203148;border-color:#35465e}html[data-theme="dark"] button,html[data-theme="dark"] select,html[data-theme="dark"] input{color:#d6e3f5;background:#263951;border-color:#425773}html[data-theme="dark"] button:hover{background:#314a6c}html[data-theme="dark"] button.primary{background:#3578e4;color:white}html[data-theme="dark"] #code{background:#132237;color:#c6dcff;border-color:#35465e}html[data-theme="dark"] .blocklyToolbox{background:#192a40!important;border-color:#35465e!important}html[data-theme="dark"] .blocklyFlyoutBackground{fill:#203149!important}html[data-theme="dark"] .blocklyToolboxCategoryLabel{color:#d8e7fa!important}html[data-theme="dark"] .blocklyToolboxSelected{background:#385171!important}html[data-theme="dark"] .group,html[data-theme="dark"] .row{border-color:#35465e}html[data-theme="dark"] .badge{background:#314767}.workspace-tools{right:80px}.blocklyToolboxSelected .blocklyToolboxCategoryLabel{color:#174475!important}.blocklyText{font-size:14px!important}
.workspace-tools{right:16px;bottom:95px;max-width:280px;flex-wrap:wrap}.workspace-tools button{font-size:12px;padding:0 7px}

#upload-target{flex-shrink:0;font-weight:600;padding-right:12px;border-right:1px solid #b8c8db;white-space:nowrap}

/* Creator links fill the available header space without covering controls. */
header{gap:14px}
.creator-links{display:flex;flex:1;justify-content:center;align-items:center;gap:12px;white-space:nowrap;min-width:180px}
.creator-links a{display:inline-flex;align-items:center;gap:5px;color:#49627c;font-size:13px;font-weight:650;text-decoration:none;padding:8px 2px;border-bottom:2px solid transparent}
.creator-links a span{font-size:11px;opacity:.65}
.creator-links a:hover{color:#245ddd;border-bottom-color:#245ddd}
.creator-links a:focus-visible{outline:3px solid #78a9f0;outline-offset:3px;border-radius:4px}
.creator-divider{width:1px;height:14px;background:#cbd6e3}
.header-actions{margin-left:0;flex-shrink:0}
html[data-theme="dark"] .creator-links a{color:#c1d3ec}
html[data-theme="dark"] .creator-links a:hover{color:#8fbcff;border-bottom-color:#8fbcff}
html[data-theme="dark"] .creator-divider{background:#4c617d}
@media(max-width:1300px){header{height:auto;min-height:70px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px;gap:8px 14px}.header-actions{margin-left:auto}.creator-links{min-width:180px}}
