:root{color-scheme:dark;--bg:#050611;--panel:#0e1227;--panel2:#121832;--line:#ffffff14;--muted:#9ba5c2;--text:#f5f6ff;--indigo:#6366f1;--purple:#a855f7}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:radial-gradient(circle at 12% -5%,#25205a 0,transparent 32%),radial-gradient(circle at 95% 8%,#321744 0,transparent 28%),var(--bg)}
button,input,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}.topbar{height:auto;min-height:72px;padding:12px clamp(14px,3vw,32px);display:flex;justify-content:space-between;align-items:center;gap:15px;border-bottom:1px solid var(--line);background:#050611e8;backdrop-filter:blur(18px);position:sticky;top:0;z-index:10}.brand{display:flex;align-items:center;gap:11px;font-size:19px;font-weight:900;white-space:nowrap}.brand b{color:#c4b5fd}.brand small{display:block;margin-top:2px;color:#8c96b5;font-size:9px;letter-spacing:1.8px;font-weight:800}.brand-mark{width:39px;height:39px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,var(--indigo),var(--purple));box-shadow:0 7px 22px #6366f144}.top-actions,.toolbar,.toolbar-actions,.mode-switch,.workspace-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.account-label{font-size:12px;color:#c4b5fd;font-weight:750;margin-right:5px}.btn{border:1px solid var(--line);background:#ffffff08;color:#eef0ff;border-radius:10px;padding:9px 12px;font-size:12px;font-weight:800;transition:.18s ease;display:inline-flex;align-items:center;justify-content:center;gap:6px}.btn:hover{background:#ffffff12;border-color:#a5b4fc55;transform:translateY(-1px)}.btn.primary{border:0;background:linear-gradient(135deg,#6366f1,#9333ea);box-shadow:0 7px 22px #6366f12b}.btn.small{padding:7px 9px;font-size:11px}.btn.danger{color:#fecaca}.wrap{width:min(1600px,calc(100% - 32px));margin:27px auto 48px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 0 22px}.eyebrow,.panel-kicker{font-size:10px;letter-spacing:1.7px;text-transform:uppercase;font-weight:900;color:#a5b4fc}.page-heading h1{font-size:clamp(30px,4vw,44px);letter-spacing:-1.6px;margin:7px 0}.page-heading p{margin:0;max-width:680px;color:var(--muted);line-height:1.65;font-size:14px}.project-name{min-width:220px}.project-name label{display:block;color:#9da8c4;font-size:11px;font-weight:800;margin-bottom:7px}.project-name input,.search-input{width:100%;border:1px solid var(--line);background:#050816;color:white;border-radius:10px;padding:11px 12px;outline:none}.project-name input:focus,.search-input:focus,#codeEditor:focus{border-color:#818cf8;box-shadow:0 0 0 3px #6366f11c}.toolbar{justify-content:space-between;background:#0c1024c9;border:1px solid var(--line);padding:10px;border-radius:14px;margin-bottom:13px}.mode-switch{background:#070a18;padding:4px;border:1px solid var(--line);border-radius:11px}.mode-btn{border:0;background:transparent;color:#9da7c2;padding:9px 12px;border-radius:8px;font-size:12px;font-weight:850}.mode-btn.active{color:white;background:#29284f;box-shadow:inset 0 0 0 1px #a5b4fc2a}.toolbar-actions #status{font-size:11px;color:#a5b4fc;min-width:70px}.editor-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:13px;align-items:stretch}.panel{min-width:0;background:linear-gradient(145deg,#10152deF,#0b0f20f5);border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 18px 55px #0002}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid var(--line)}.panel-head h2{font-size:16px;margin:4px 0 0;letter-spacing:-.3px}.live-dot{font-size:10px;color:#86efac}.live-dot:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#4ade80;margin:0 6px 1px 0}.file-tabs{display:flex;gap:4px;padding:9px 12px 0;background:#090d1b}.file-tab{border:1px solid transparent;border-bottom:0;border-radius:8px 8px 0 0;padding:9px 12px;color:#8993af;background:transparent;font-size:11px;font-weight:800}.file-tab.active{background:#11172c;color:#dbeafe;border-color:#ffffff13}.editor-caption{display:flex;justify-content:space-between;padding:10px 14px;background:#11172c;border-top:1px solid #ffffff08;color:#8290b2;font:10px ui-monospace,monospace}#codeEditor{display:block;width:100%;height:490px;resize:vertical;border:0;border-top:1px solid var(--line);border-radius:0;outline:none;padding:17px 16px;background:#070a15;color:#e4eaff;font:13px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2;white-space:pre;overflow:auto}#codeEditor:focus{box-shadow:none;border-top-color:#818cf8}#codeEditor::selection{background:#6366f155}.editor-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--line);font-size:10px;color:#818ca9}.editor-footer kbd{border:1px solid #ffffff20;border-radius:4px;padding:2px 4px;color:#cbd5e1}.text-btn{background:none;border:0;color:#c4b5fd;font-size:10px;font-weight:800}.preview-wrap{height:490px;background:#f8fafc;position:relative}.preview-wrap iframe{width:100%;height:100%;border:0;background:white;display:block}.preview-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;color:#59627a;background:#f2f5fb;text-align:center;padding:20px}.preview-empty b{font-size:14px}.preview-empty span{font-size:11px}.preview-icon{width:47px;height:47px;display:grid;place-items:center;border-radius:14px;background:#e0e7ff;color:#6366f1;font-size:24px}.preview-footer{display:flex;align-items:center;gap:8px;padding:12px 15px;color:#8e99b6;font-size:10px;border-top:1px solid var(--line)}.preview-status-dot{width:7px;height:7px;border-radius:50%;background:#6366f1}.blocks-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:13px;align-items:start}.toolbox-panel{padding-bottom:12px}.toolbox-panel>.panel-head{margin-bottom:12px}.search-input{width:calc(100% - 24px);margin:0 12px 10px;font-size:12px}.category-list{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:0 12px 11px}.category{border:1px solid transparent;background:#ffffff06;color:#aab3cd;text-align:left;padding:8px 9px;border-radius:8px;font-size:10px;font-weight:800}.category.active{background:#28234b;color:#f5f3ff;border-color:#8b5cf655}.block-library{display:grid;gap:7px;padding:0 12px;max-height:560px;overflow:auto}.scratch-block{width:100%;min-height:38px;border:0;border-radius:8px;padding:9px 10px;text-align:left;color:#fff;font-size:11px;font-weight:850;box-shadow:inset 0 -3px #0002;cursor:grab}.scratch-block:active{cursor:grabbing}.scratch-block.events,.code-block.events{background:#fbbf24;color:#3f2b00}.scratch-block.output,.code-block.output{background:#a78bfa;color:#201044}.scratch-block.variables,.code-block.variables{background:#fb923c;color:#4a2100}.scratch-block.logic,.code-block.logic{background:#60a5fa;color:#102e59}.scratch-block.loops,.code-block.loops{background:#f59e0b;color:#492900}.scratch-block.web,.code-block.web{background:#4ade80;color:#10391f}.scratch-block.functions,.code-block.functions{background:#64748b;color:#fff}.toolbox-hint{font-size:10px;line-height:1.6;color:#7e89a7;margin:12px 14px 2px}.workspace-panel{min-height:650px}.workspace-hint{font-size:11px;color:#7f8aa7;padding:12px 15px;border-bottom:1px solid var(--line)}.block-workspace{min-height:320px;max-height:510px;overflow:auto;padding:17px;background-color:#f0f4fc;background-image:radial-gradient(#cbd5e1 1px,transparent 1px);background-size:16px 16px}.workspace-empty{min-height:275px;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#64748b;text-align:center;gap:8px}.workspace-empty span{font-size:30px}.workspace-empty b{font-size:13px}.workspace-empty p{font-size:11px;margin:0}.code-block{display:flex;align-items:center;flex-wrap:wrap;gap:7px;width:max-content;max-width:100%;padding:8px 9px;margin-bottom:7px;border-radius:8px;color:white;font-size:11px;font-weight:850;box-shadow:inset 0 -3px #0002;cursor:grab}.code-block input{width:110px;max-width:32vw;border:0;border-radius:6px;background:#fff;color:#172033;padding:6px 8px;font:11px ui-monospace,monospace;outline:2px solid transparent}.code-block input:focus{outline-color:#312e81}.code-block .block-remove{border:0;border-radius:50%;width:23px;height:23px;background:#0002;color:inherit;font-weight:900}.code-block.dragging{opacity:.4}.block-workspace.drop-target{outline:3px dashed #818cf8;outline-offset:-7px}.generated-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px;border-top:1px solid var(--line)}.generated-bar b,.generated-bar small{display:block}.generated-bar b{font-size:12px}.generated-bar small{font-size:10px;color:#8b96b2;margin-top:4px}.generated-code{margin:0;max-height:230px;overflow:auto;padding:14px 16px;background:#070a15;color:#c4b5fd;font:11px/1.6 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;border-top:1px solid var(--line)}.bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.tip-card{display:flex;gap:12px;padding:16px;border-radius:14px;background:#0d1126a8;border:1px solid var(--line)}.tip-icon{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:10px;background:#6366f121;color:#c4b5fd;font-size:17px}.tip-card b{font-size:12px}.tip-card p{font-size:11px;line-height:1.6;color:#8f9ab8;margin:5px 0 0}.block-empty{color:#7c879e;font-size:11px;padding:14px;text-align:center}
[hidden]{display:none!important}
@media(max-width:1050px){.editor-layout{grid-template-columns:1fr}.preview-wrap{height:400px}#codeEditor{height:420px}.blocks-layout{grid-template-columns:220px minmax(0,1fr)}.topbar{align-items:flex-start}.top-actions{justify-content:flex-end}}
@media(max-width:700px){.topbar{position:static;align-items:flex-start;flex-direction:column}.top-actions{width:100%;justify-content:flex-start}.wrap{width:calc(100% - 20px);margin-top:18px}.page-heading{align-items:stretch;flex-direction:column}.project-name{min-width:0}.toolbar{align-items:stretch;flex-direction:column}.toolbar-actions{justify-content:flex-start}.mode-switch{width:100%}.mode-btn{flex:1}.blocks-layout{grid-template-columns:1fr}.block-library{max-height:250px;grid-template-columns:1fr 1fr}.block-workspace{max-height:450px;min-height:270px}.workspace-panel{min-height:0}.bottom-grid{grid-template-columns:1fr}.preview-wrap{height:350px}.panel-head{padding:12px}.workspace-actions{justify-content:flex-end}.code-block{width:100%}.code-block input{flex:1;min-width:70px}.generated-bar{align-items:flex-start;flex-direction:column}}


/* Community Projects browser and creator permission controls */
.community-projects-section{margin:18px 0 44px;padding:clamp(16px,2.5vw,30px);border:1px solid rgba(255,255,255,.1);border-radius:22px;background:radial-gradient(circle at 100% 0%,rgba(168,85,247,.11),transparent 36%),linear-gradient(145deg,rgba(13,17,39,.97),rgba(7,10,22,.98));box-shadow:0 22px 65px #0003}
.community-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:22px}
.community-heading h2{margin:7px 0 5px;font-size:clamp(25px,3vw,34px);letter-spacing:-.8px}
.community-heading p{max-width:780px;margin:0;color:#9ba6c1;font-size:13px;line-height:1.65}
.publish-panel{padding:20px;border:1px solid rgba(129,140,248,.2);border-radius:16px;background:linear-gradient(135deg,rgba(99,102,241,.11),rgba(168,85,247,.055)),#0b1022;margin-bottom:24px}
.publish-title{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.publish-icon{width:40px;height:40px;display:grid;place-items:center;flex:0 0 40px;border-radius:12px;background:#6366f126;color:#c4b5fd;font-size:21px}
.publish-title h3{margin:0 0 4px;font-size:16px}.publish-title p{margin:0;color:#8995b2;font-size:12px;line-height:1.5}
.publish-fields{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.5fr);gap:12px}
.publish-fields label{display:grid;gap:7px;color:#c4cbe0;font-size:11px;font-weight:800}
.publish-fields input,.publish-fields textarea{width:100%;min-width:0;border:1px solid #2b3150;border-radius:10px;background:#070a17;color:#f8faff;padding:11px 12px;font:12px/1.5 inherit;outline:none;resize:vertical}
.publish-fields input:focus,.publish-fields textarea:focus{border-color:#818cf8;box-shadow:0 0 0 3px #6366f11b}
.permission-options{display:flex;gap:12px;flex-wrap:wrap;margin-top:14px}
.permission-option{display:flex;align-items:flex-start;gap:9px;flex:1 1 230px;padding:12px;border:1px solid #ffffff12;border-radius:11px;background:#ffffff05;cursor:pointer}
.permission-option input{accent-color:#8b5cf6;margin:3px 0 0}
.permission-option b,.permission-option small{display:block}.permission-option b{font-size:12px;color:#e5e7f7}.permission-option small{font-size:11px;color:#8995b2;line-height:1.5;margin-top:4px}
.publish-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid #ffffff10}
#communityPublishStatus{font-size:11px;line-height:1.5;color:#8f9ab8}#communityPublishStatus.error{color:#fca5a5}
.community-browser-tools{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.community-search{display:flex;align-items:center;gap:10px;width:min(480px,100%);padding:11px 13px;border:1px solid #2b3150;border-radius:11px;background:#070a17}
.community-search span{font-size:19px;color:#a5b4fc}.community-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#f8faff;font-size:12px}.community-search input::placeholder{color:#737f9e}
.community-count{color:#7f8baa;font-size:11px;white-space:nowrap}
.community-slider-wrap{position:relative;padding:0 16px}
.community-project-slider{display:flex;align-items:stretch;gap:14px;overflow-x:auto;scroll-behavior:smooth;scroll-snap-type:x mandatory;scrollbar-width:thin;padding:4px 3px 15px}
.community-project-card{flex:0 0 min(350px,31vw);min-width:0;min-height:225px;display:flex;flex-direction:column;justify-content:space-between;gap:18px;padding:17px;border:1px solid #272d49;border-radius:15px;background:linear-gradient(145deg,#131a32,#0d1225);scroll-snap-align:start;transition:transform .18s,border-color .18s}
.community-project-card:hover{transform:translateY(-2px);border-color:#6967db}
.community-project-title{margin:0 0 7px;font-size:17px;letter-spacing:-.3px;overflow-wrap:anywhere}
.community-project-description{margin:0;color:#99a4bf;font-size:12px;line-height:1.6;overflow-wrap:anywhere;min-height:38px}
.community-project-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:13px}
.community-tag{font-size:9px;padding:5px 7px;border:1px solid #ffffff13;border-radius:999px;background:#ffffff07;color:#b6bed4}
.community-project-actions{display:flex;gap:7px;flex-wrap:wrap}
.community-project-actions .btn{font-size:11px;padding:8px 10px}
.community-arrow{position:absolute;top:43%;z-index:2;display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid #343b60;border-radius:50%;background:#090d1cf2;color:white;font-size:26px;line-height:1}
.community-arrow.left{left:-2px}.community-arrow.right{right:-2px}
.community-loading{flex:1;min-width:100%;padding:38px 16px;text-align:center;color:#8995b2;font-size:12px;border:1px dashed #303653;border-radius:13px}
.community-footnote{margin-top:7px;color:#6f7b98;font-size:10px;line-height:1.6}
.community-preview-dialog{width:min(1100px,calc(100% - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:0;border:1px solid #353b5b;border-radius:18px;background:#0b1022;color:#f8faff;box-shadow:0 30px 120px #0009;overflow:hidden}
.community-preview-dialog::backdrop{background:#02040ad9;backdrop-filter:blur(7px)}
.community-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding:17px 19px;border-bottom:1px solid #ffffff12}
.community-preview-head h3{margin:5px 0;font-size:20px}.community-preview-head p{margin:0;color:#929db8;font-size:12px;line-height:1.5}
.community-preview-toolbar,.community-preview-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 17px;color:#909bb6;font-size:11px}
.community-preview-actions{display:flex;gap:7px;flex-wrap:wrap}
#communityPreviewFrame{display:block;width:100%;height:min(62dvh,650px);min-height:300px;border:0;background:#fff}
.community-preview-bottom{border-top:1px solid #ffffff12}
@media(max-width:850px){.community-project-card{flex-basis:min(390px,46vw)}.publish-fields{grid-template-columns:1fr}.community-heading{align-items:flex-start;flex-direction:column}.community-heading>.btn{align-self:flex-start}}
@media(max-width:600px){.community-projects-section{padding:14px;border-radius:16px}.publish-panel{padding:14px}.publish-footer{align-items:stretch;flex-direction:column}.publish-footer .btn{width:100%}.community-browser-tools{align-items:stretch;flex-direction:column}.community-search{width:100%}.community-slider-wrap{padding:0}.community-project-card{flex-basis:84vw;min-height:230px}.community-arrow{display:none}.community-preview-head{padding:13px}.community-preview-head h3{font-size:17px}#communityPreviewFrame{height:55dvh;min-height:280px}}

