/* استوديو الشاطر على تصميم المنصة (tokens.css + app.css) */
.kc{max-width:560px;margin:0 auto}
.kc *{-webkit-tap-highlight-color:transparent}
.kc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
html.kc-page{--promo-h:0px!important}
html.kc-page .promo-bar,html.kc-page .smq,html.kc-page .copy-fixed,html.kc-page .site-foot{display:none!important}
html.kc-page .main,html.kc-page .main-public{padding-top:calc(var(--topbar-h,68px) + var(--promo-h,0px) + 4px)!important;padding-bottom:0!important;min-height:0!important}
html.kc-page .content{padding-bottom:0!important}
html.kc-page .content .main{padding-top:0!important}
html.kc-page .kc>.kc-card,html.kc-page .kc>.kc-tip{display:none}
.cs2{display:flex;flex-direction:column;gap:4px;height:calc(100dvh - 72px - 108px);min-height:440px}
.cs-cats{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;flex:0 0 28px}
.cs-cat{font-family:inherit;font-weight:800;font-size:12px;border:1px solid var(--line,#e6e9f2);background:#fff;color:var(--brand-700,#3b17b3);border-radius:10px;cursor:pointer;padding:0 2px;touch-action:manipulation}
.cs-cat.on{background:var(--brand-500,#5b2eff);color:#fff;border-color:var(--brand-500,#5b2eff)}
.cs-lib{flex:0 0 60px;display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:1px 0}
.cs-lib::-webkit-scrollbar{display:none}
.lib-it{flex:0 0 76px;white-space:nowrap;height:58px;background:#fff;border:1px solid var(--line,#e6e9f2);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-weight:800;font-size:11px;color:var(--ink-2,#26304a);touch-action:pan-x;cursor:grab;user-select:none;-webkit-user-select:none;box-shadow:0 1px 4px rgba(30,11,92,.07)}
.lib-it img{pointer-events:none;display:block}
#kc-stage{position:relative;flex:0 0 auto;border:2px solid var(--brand-300,#a892ff);border-radius:16px;overflow:hidden;background:#eaf5ff;line-height:0}
#kc-stage.hot{border-color:var(--gold,#f2a516);box-shadow:0 0 0 3px rgba(242,165,22,.35)}
#kc-cv{display:block;touch-action:none;user-select:none;-webkit-user-select:none}
.kc-msg{position:absolute;left:6px;bottom:6px;right:6px;line-height:1.4;font-weight:800;font-size:12px;padding:3px 10px;border-radius:10px;background:rgba(255,255,255,.92);border:1px solid var(--line,#e6e9f2);color:var(--ink-2,#26304a);pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kc-msg.ok{background:#e6f9ea;color:#0b6b2a}.kc-msg.bad{background:#fff0ee;color:#a3291b}
#cs-tools{flex:0 0 36px;display:flex;gap:4px;align-items:stretch}
#cs-name{flex:1 1 auto;min-width:0;display:flex;align-items:center;font-weight:900;font-size:13px;color:var(--brand-800,#2c1186);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cs-tools button{flex:0 0 42px;font-family:inherit;font-weight:800;font-size:17px;border:1px solid var(--brand-300,#a892ff);background:#fff;color:var(--brand-700,#3b17b3);border-radius:10px;cursor:pointer;padding:0;touch-action:manipulation;line-height:1.1}
#cs-tools button:disabled{opacity:.4}
.kc-pal{flex:0 0 40px;display:flex;gap:5px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;align-items:center}
.kc-pal::-webkit-scrollbar{display:none}
.cs-tabs{flex:0 0 30px;display:grid;grid-template-columns:1fr 1fr 78px;gap:4px}
.cs-codebtn{font-family:Consolas,monospace!important;font-weight:800;font-size:12px;border:1px solid #2c1186;background:#2c1186;color:#ffd45e;border-radius:10px;cursor:pointer;touch-action:manipulation;direction:ltr}
.cs-tab{font-family:inherit;font-weight:800;font-size:12px;border:1px solid var(--line,#e6e9f2);background:#fff;color:var(--brand-700,#3b17b3);border-radius:10px 10px 0 0;cursor:pointer;touch-action:manipulation}
.cs-tab.on{background:var(--brand-50,#f2efff);border-color:var(--brand-300,#a892ff);color:var(--brand-800,#2c1186)}
.kc-prog-area{flex:1 1 0;min-height:80px;overflow-y:auto;overflow-x:hidden;background:#fff;border:2px dashed var(--brand-300,#a892ff);border-radius:0 0 14px 14px;padding:6px;margin-top:-4px;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.kc-prog-area.off{opacity:.7}
.slot{min-height:30px;display:flex;flex-direction:column;gap:5px}
.slot.hot{outline:2px solid var(--gold,#f2a516);outline-offset:2px;border-radius:10px}
.slot:empty::before{content:attr(data-ph);color:var(--muted,#65708a);font-size:12px;font-weight:700;padding:6px 8px;border:1px dashed var(--line,#e6e9f2);border-radius:8px;text-align:center}
.blk{display:flex;flex-direction:column;align-items:stretch;gap:0;border-radius:11px;color:#fff;font-weight:800;font-size:13px;padding:2px 10px 4px;min-height:36px;user-select:none;-webkit-user-select:none;box-shadow:0 2px 0 rgba(0,0,0,.18);flex:0 0 auto;white-space:nowrap}
.blk.pal-b{touch-action:pan-x;cursor:grab}
.blk.mv{background:#3d7bff}.blk.ct{background:#f08a00}.blk.lk{background:#8e44ff}.blk.sc{background:#12a150}.blk.sd{background:#e0306b}
.blk .ic{font-size:16px;line-height:1}
.blk .x,.cblk .hd .x{margin-inline-start:auto;border:0;background:rgba(255,255,255,.25);color:#fff;border-radius:8px;width:28px;height:28px;font-size:14px;font-family:inherit;cursor:pointer;touch-action:manipulation;flex:0 0 28px}
.grip{touch-action:none;cursor:grab;padding:8px 6px;margin:0 -4px;font-size:15px;line-height:1;letter-spacing:-3px;opacity:.85}
.slot .blk{flex-wrap:nowrap}
.cblk{border-radius:13px;padding:3px 6px 6px;box-shadow:0 2px 0 rgba(0,0,0,.18)}
.cblk.ct{background:#f08a00}
.cblk .hd{display:flex;align-items:center;gap:6px;color:#fff;font-weight:800;font-size:13px;min-height:34px;user-select:none;-webkit-user-select:none}
.cblk .in{background:rgba(255,255,255,.92);border-radius:10px;padding:5px;margin:2px 0 0}
.cnt{display:inline-flex;align-items:center;gap:1px;background:rgba(255,255,255,.95);border-radius:10px;color:#2c1186}
.cnt button{border:0;background:none;font-family:inherit;font-weight:900;font-size:18px;color:#2c1186;width:30px;height:28px;cursor:pointer;touch-action:manipulation}
.cnt span{min-width:20px;text-align:center;font-weight:900}
input.say{width:92px;min-width:0;border:0;border-radius:8px;padding:4px 6px;font:700 16px Cairo,sans-serif;height:28px;color:#26304a}
.drag-ghost{position:fixed;z-index:2147483000;pointer-events:none;opacity:.94;transform:translate(-50%,-60%);box-shadow:0 8px 20px rgba(0,0,0,.3)}
.drag-ghost.lib{box-shadow:none;filter:drop-shadow(0 8px 10px rgba(0,0,0,.3))}
.ph{height:7px;border-radius:6px;background:var(--gold,#f2a516)}
body.kc-drag{overflow:hidden;touch-action:none}
.cs-run{position:fixed;left:0;right:0;bottom:calc(62px + env(safe-area-inset-bottom,0px));z-index:40;display:flex;gap:6px;padding:0 14px;max-width:560px;margin:0 auto}
.cs-run button{font-family:inherit;font-weight:900;font-size:14px;border-radius:12px;height:44px;border:1px solid var(--brand-300,#a892ff);background:#fff;color:var(--brand-700,#3b17b3);cursor:pointer;touch-action:manipulation;box-shadow:0 3px 10px rgba(30,11,92,.16)}
.cs-run button:disabled{opacity:.45}
#kc-run{flex:2.2;background:#12a150;color:#fff;border-color:#12a150;font-size:16px}
#kc-stop{flex:.7}#kc-reset{flex:1.2}#cs-save{flex:1.4}.cs-run button{white-space:nowrap;padding:0 4px}
.cs-modal{position:fixed;inset:0;z-index:2147483100;background:rgba(20,10,60,.55);display:flex;align-items:center;justify-content:center;padding:16px}
.cs-modal[hidden]{display:none}
.cs-mbox{background:#fff;border-radius:18px;padding:14px;width:100%;max-width:340px;max-height:80dvh;overflow:auto;box-shadow:0 12px 40px rgba(0,0,0,.35)}
.cs-mbox h2{margin:0 0 8px;font-size:16px;font-weight:900;color:var(--brand-800,#2c1186)}
.cs-mrow{display:flex;gap:6px;margin-bottom:8px}
.cs-mrow input{flex:1;min-width:0;border:1px solid var(--brand-300,#a892ff);border-radius:10px;padding:6px 10px;font:700 16px Cairo,sans-serif;height:40px}
.cs-mbox button{font-family:inherit;font-weight:800;font-size:13px;border:1px solid var(--brand-300,#a892ff);background:#fff;color:var(--brand-700,#3b17b3);border-radius:10px;min-height:38px;padding:0 12px;cursor:pointer}
.cs-mbox button.pri{background:var(--brand-500,#5b2eff);color:#fff;border-color:var(--brand-500,#5b2eff)}
.cs-srow{display:flex;align-items:center;gap:6px;padding:4px 0;border-top:1px solid var(--line,#e6e9f2);font-weight:800;font-size:13px}
.cs-srow span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cs-srow .del{color:#c0392b;border-color:#f0a59c}
.cs-none{font-size:12px;color:var(--muted,#65708a);margin:4px 0}
.cs-mfoot{display:flex;gap:6px;margin-top:10px}.cs-mfoot button{flex:1}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.blk .r1,.cblk .r1{display:flex;align-items:center;gap:6px;min-height:32px}
.ex{font-size:11px;font-weight:700;opacity:.92;line-height:1.35;padding:0 2px 2px;white-space:normal}
.cblk .hd{flex-direction:column;align-items:stretch;gap:0}
.code{font-family:Consolas,"Courier New",monospace;font-weight:700;font-size:13px;direction:ltr;unicode-bidi:isolate;white-space:nowrap}
.blk.pal-b{flex-direction:row;align-items:center;gap:5px;padding:2px 9px;min-height:38px}
.pal-b .pl{display:flex;flex-direction:column;line-height:1.15}.pal-b .pl>span:first-child{font-size:12px}.pal-b .pl .code{font-size:9.5px;opacity:.85}
.cs-hat{display:flex;flex-direction:column;background:#f2b705;color:#3b2400;border-radius:11px 11px 4px 4px;padding:3px 10px 4px;margin-bottom:5px;box-shadow:0 2px 0 rgba(0,0,0,.18)}
.cs-hat .code{font-size:13px;font-weight:800}
.cs-hat .ex{font-size:11px;opacity:1}
.cs-cbox{max-width:360px}
#cs-pre{background:#1b1038;color:#e8e2ff;border-radius:12px;padding:10px;margin:0;font:12px/1.55 Consolas,"Courier New",monospace;overflow:auto;max-height:56dvh;white-space:pre;direction:ltr;text-align:left}

.blk .r1,.cblk .r1{direction:ltr}
.blk .r1 .x,.cblk .r1 .x{margin-inline-start:0;margin-left:auto}
.cnt{direction:ltr}
.ex{direction:rtl;text-align:right}
#cs-tools button{flex:0 0 38px}

/* ===== v12: شكل سكراتش: الأقسام على شمال الشاشة ===== */
.cs3{display:flex;gap:6px;height:calc(100dvh - 72px - 64px);min-height:430px}
.cs-main{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:4px}
.cs-side{flex:0 0 64px;display:flex;flex-direction:column;gap:5px;overflow-y:auto;scrollbar-width:none}
.cs-side::-webkit-scrollbar{display:none}
#cs-secs{display:flex;flex-direction:column;gap:5px}
.cs-sec{flex:0 0 66px;border:0;border-radius:14px;background:var(--c);color:#fff;font-family:inherit;font-weight:800;font-size:11px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;opacity:.82;touch-action:manipulation;box-shadow:0 2px 0 rgba(0,0,0,.18);padding:0}
.cs-sec i{font-style:normal;font-size:24px;line-height:1}
.cs-sec.on{opacity:1;outline:3px solid #fff;box-shadow:0 0 0 2px var(--c),0 4px 10px rgba(0,0,0,.25)}
#cs-add{flex:0 0 52px;border:2px dashed var(--brand-300,#a892ff);background:#fff;color:var(--brand-700,#3b17b3);border-radius:14px;font-family:inherit;font-weight:800;font-size:11px;cursor:pointer;touch-action:manipulation;line-height:1.2}
.cs-bar{flex:0 0 34px;display:flex;gap:4px;align-items:center}
.cs-bar .sp{flex:1}
.cs-bar button{flex:0 0 34px;height:34px;border-radius:50%;border:1px solid var(--brand-300,#a892ff);background:#fff;color:var(--brand-700,#3b17b3);font-family:inherit;font-weight:900;font-size:16px;cursor:pointer;padding:0;touch-action:manipulation;line-height:1}
.cs-bar button:disabled{opacity:.4}
#kc-run{background:#12a150;border-color:#0b7a3a;color:#fff;font-size:20px;box-shadow:0 2px 0 rgba(0,0,0,.2)}
#kc-stop{background:#e23b3b;border-color:#b32020;color:#fff;box-shadow:0 2px 0 rgba(0,0,0,.2)}
#cs-tools{display:contents}
#cs-tools button{flex:0 0 34px!important;font-size:15px!important}
.cs-items{flex:0 0 44px;display:flex;gap:4px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.cs-items::-webkit-scrollbar{display:none}
.cs-item{flex:0 0 42px;height:42px;border-radius:11px;border:1px solid var(--line,#e6e9f2);background:#fff;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;touch-action:pan-x}
.cs-item.on{border:2px solid var(--brand-500,#5b2eff);background:var(--brand-50,#f2efff)}
.cs-item img{pointer-events:none}
.cs3 .kc-pal{flex:0 0 46px}
.cs-soon{flex:0 0 auto;font-size:11px;font-weight:800;color:var(--muted,#65708a);padding:0 8px;white-space:nowrap}
.blk.hat{background:#f2b705;color:#3b2400;cursor:pointer}
.cs3 .cs-tabs{grid-template-columns:1fr 1fr 34px 34px;flex:0 0 32px}
.cs-ibtn{font-family:inherit;font-weight:900;font-size:14px;border:1px solid var(--brand-300,#a892ff);background:#fff;color:var(--brand-700,#3b17b3);border-radius:10px;cursor:pointer;padding:0;touch-action:manipulation}
.cs-tab{font-size:11px;padding:0 2px}
.cs-lmodal .cs-mbox{max-width:340px}
.cs-cats{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-bottom:8px}
.cs-cat{font-family:inherit;font-weight:800;font-size:12px;border:1px solid var(--line,#e6e9f2);background:#fff;color:var(--brand-700,#3b17b3);border-radius:10px;cursor:pointer;padding:6px 2px;touch-action:manipulation}
.cs-cat.on{background:var(--brand-500,#5b2eff);color:#fff;border-color:var(--brand-500,#5b2eff)}
#cs-lib{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;overflow:visible}
.lib-it{flex:none;height:auto;min-height:76px;padding:6px 2px;touch-action:manipulation;white-space:normal;font-family:inherit;cursor:pointer}
.cs3{margin:0 -8px;height:calc(100dvh - 136px);min-height:430px;overflow:hidden}
.cs-bar button{flex-shrink:0;min-width:34px}
.kc-pal,#kc-pal{direction:rtl}
html.kc-page,html.kc-page body{height:100dvh!important;min-height:0!important;overflow:hidden!important}

/* ===== v15: بلوكات سكراتش ===== */
.cs3{--ink:#26304a}
.cs-sec{flex:1 0 46px!important;min-height:46px;font-size:10px!important;gap:0!important;border-radius:12px!important;padding:2px 0!important;color:#fff}
.cs-sec i{font-size:19px!important}
.cs-sec[data-id=events],.cs-sec[data-id=control]{color:#3a2600}
.cs-side{flex-basis:68px!important}
#cs-secs{flex:1 1 auto;gap:4px!important;min-height:0}
#cs-add{flex:0 0 44px!important}
.cs-bar2{flex:0 0 30px;display:flex;gap:4px;align-items:center}
.cs-iname{flex:1;font-weight:900;font-size:12px;color:var(--brand-800,#2c1186);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cs-bar2 .cs-ibtn{height:28px;padding:0 10px;font-size:12px;white-space:nowrap}
.kc-prog-area{margin-top:0!important;border-radius:14px!important;padding:6px!important;position:relative}
.kc-prog-area.hot{border-color:var(--gold,#f2a516)}
.cs3 .kc-pal{flex:0 0 52px!important;gap:5px}
.pb{flex:0 0 auto;position:relative;display:flex;flex-direction:column;justify-content:center;gap:1px;background:var(--c);color:#fff;border-radius:10px;padding:3px 24px 3px 10px;min-height:44px;max-width:210px;font-weight:800;font-size:12px;line-height:1.25;touch-action:pan-x;cursor:grab;user-select:none;-webkit-user-select:none;box-shadow:0 2px 0 rgba(0,0,0,.2)}
.pb .pt{white-space:nowrap}
.pb .pc{font:700 10px/1.2 Consolas,monospace;opacity:.92;white-space:nowrap;direction:ltr;text-align:left;overflow:hidden;text-overflow:ellipsis}
.pb .pa{position:absolute;inset-inline-end:4px;top:50%;transform:translateY(-50%);width:17px;height:17px;border-radius:50%;background:rgba(255,255,255,.35);font-size:12px;display:flex;align-items:center;justify-content:center;line-height:1}
.pb-hat{border-radius:16px 16px 8px 8px;padding-top:6px}
.pb-c{border-inline-start:7px solid rgba(0,0,0,.22)}
.pb-rep{border-radius:20px}
.pb-bool{border-radius:6px;clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,10px 100%,0 50%);padding-inline:16px 28px;box-shadow:none}
.pb[style*="FFBF00"],.pb[style*="FFAB19"],.sb[style*="FFBF00"],.sb[style*="FFAB19"],.cb[style*="FFAB19"]{color:#3a2600}
.cs-newvar{flex:0 0 auto;border:2px dashed #FF8C1A;background:#fff;color:#a85500;border-radius:10px;font-family:inherit;font-weight:800;font-size:12px;min-height:44px;padding:0 10px;cursor:pointer;white-space:nowrap}
.cs-none{margin:8px;color:var(--muted,#65708a);font-weight:700;font-size:13px;text-align:center;line-height:1.6}
.stk{margin-bottom:12px}
.stk>.slot{margin-top:2px;min-height:12px}
.sb,.cb{--c:#4C97FF;background:var(--c);color:#fff;border-radius:8px;font-weight:800;font-size:13px;padding:3px 8px 4px;box-shadow:0 2px 0 rgba(0,0,0,.2);position:relative}
.sb.s-events,.cb.s-control,.sb.s-control{color:#3a2600}
.sb.hat{border-radius:18px 18px 8px 8px;padding-top:7px}
.sb .hd,.cb .hd,.cb .hd2{display:flex;align-items:center;gap:5px;min-height:32px;flex-wrap:wrap}
.cb .hd2{min-height:24px;padding:0 4px}
.rl{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap;flex:1 1 0;min-width:0}
.lt{white-space:nowrap}
.sb .x,.cb .hd>.x{margin-inline-start:auto;border:0;background:rgba(0,0,0,.18);color:inherit;border-radius:8px;width:26px;height:26px;font-size:13px;font-family:inherit;cursor:pointer;padding:0;touch-action:manipulation;flex:0 0 26px}
.cb{border-inline-start:0;padding-bottom:7px}
.cb>.in{background:rgba(255,255,255,.9);border-radius:6px;padding:5px;margin:2px 0 2px 0;margin-inline-start:14px;color:var(--ink)}
.cb>.in>.slot{min-height:26px}
.cb .slot:empty::before{padding:3px 6px}
.ex{display:block;font-size:11px;font-weight:700;opacity:.95;line-height:1.5;padding:0 2px 1px}
.ex .cd{font:700 10.5px Consolas,monospace;background:rgba(0,0,0,.22);border-radius:5px;padding:0 5px;display:inline-block;direction:ltr;unicode-bidi:isolate}
.grip{touch-action:none;cursor:grab;padding:8px 4px;margin:-4px -2px;font-size:14px;line-height:1;letter-spacing:-3px;opacity:.9;user-select:none}
.ps{display:inline-flex;align-items:center}
.ps-bool{min-width:34px;height:22px;background:rgba(0,0,0,.22);clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,8px 100%,0 50%)}
.ps-bool.sel{background:rgba(255,255,255,.7)}
.ps.hot{outline:3px solid #fff;outline-offset:1px;border-radius:8px;box-shadow:0 0 0 5px var(--gold,#f2a516)}
.ps-bool.hot{outline:0;background:#fff}
.pin{width:50px;height:24px;border:0;border-radius:12px;padding:0 6px;font:800 14px Cairo,sans-serif;color:var(--ink);background:#fff;text-align:center;min-width:0}
.ps-txt .pin{width:84px}
.psel{height:24px;border:0;border-radius:12px;padding:0 4px;font:800 12px Cairo,sans-serif;color:var(--ink);background:#fff;max-width:110px}
.rp{--c:#59C059;display:inline-flex;align-items:center;gap:3px;background:var(--c);color:#fff;border-radius:14px;padding:1px 4px;box-shadow:inset 0 0 0 2px rgba(0,0,0,.16);font-size:12px;line-height:1.2}
.rp-bool{border-radius:4px;padding:1px 10px;clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,8px 100%,0 50%)}
.rp .rl{gap:3px;flex-wrap:nowrap}
.rp .pin{width:38px;height:20px;font-size:12px}
.rp .ps-txt .pin{width:60px}
.rp .psel{height:20px;font-size:11px}
.rp .grip{padding:6px 2px;margin:-2px 0}
.rp .x{border:0;background:rgba(0,0,0,.2);color:#fff;border-radius:50%;width:18px;height:18px;font-size:12px;line-height:1;cursor:pointer;padding:0;font-family:inherit;touch-action:manipulation}
.drag-ghost.pb{transform:translate(-50%,-60%);padding-inline-end:12px}
.ph{height:7px;border-radius:6px;background:var(--gold,#f2a516);margin:2px 0}
.cs-mbox h3{margin:10px 0 5px;font-size:12px;font-weight:900;color:var(--muted,#65708a)}
.cs-presets{display:flex;flex-direction:column;gap:5px}
.cs-preset,.cs-wide{width:100%;text-align:start;min-height:42px!important;background:var(--brand-50,#f2efff)!important}
#cs-link{width:100%;margin-top:6px;font-size:12px;border:1px solid var(--line,#e6e9f2);border-radius:8px;padding:6px;box-sizing:border-box}
.ex{display:flex!important;align-items:baseline;gap:5px;font-size:10.5px!important;line-height:1.35!important}
.ex .cd{flex:0 1 auto;max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px!important}
.sb .hd,.cb .hd{min-height:28px!important}
.sb.hat{padding-top:5px!important}
.sb .x,.cb .hd>.x{width:22px!important;height:22px!important;flex-basis:22px!important}
.ps-txt .pin{width:70px!important}.pin{width:42px!important}
.pb{max-width:270px!important}.pb .pt{overflow:hidden;text-overflow:ellipsis}
.ex{display:block!important}
.ex .cd{display:block!important;max-width:100%!important;white-space:pre-wrap!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;text-align:left;unicode-bidi:isolate;margin-bottom:2px;padding:1px 6px!important}
.ex .et{display:block;unicode-bidi:plaintext}
.pin[dir=rtl]{unicode-bidi:plaintext}
#cs-pre{white-space:pre-wrap!important;overflow-wrap:anywhere}
/* v22: أيقونات SVG + شيل الكود الخام من جوه البلوكات (الكود في زر </>) */
svg.ic{width:1em;height:1em;vertical-align:-.14em;flex:none;display:inline-block}
.cs-sec i{display:flex;align-items:center;justify-content:center}
.cs-sec i svg.ic{width:22px;height:22px}
#cs-tools button svg.ic,#kc-run svg.ic,#kc-stop svg.ic,#kc-reset svg.ic{width:20px;height:20px}
#cs-add svg.ic,#cs-save svg.ic,#cs-share svg.ic{width:18px;height:18px}
.grip svg.ic{width:16px;height:22px;display:block}
.lt svg.ic{width:1.2em;height:1.2em}
.ex .cd{display:none!important}
.ex .et{display:block!important}
.pb .pc{display:none!important}
/* v24: شرائح أضيق (سطرين) عشان أكتر من شريحة تبان، والتلميح يختفي */
.pb{max-width:132px!important;padding-inline:8px 26px!important}
.pb .pt{white-space:normal!important;overflow:visible!important;font-size:11.5px;line-height:1.25}
.kc-msg{transition:opacity .5s}
.kc-msg.fade{opacity:0;pointer-events:none}
/* ---- وضع الدروس (/codestudio/learn/) ---- */
.lv-mis{flex:0 0 auto;background:#fff;border:2px solid var(--brand-300,#a892ff);border-radius:12px;padding:5px 10px;margin-bottom:4px;line-height:1.3}
.lv-mis .lv-t b{font-size:12px;color:var(--brand-700,#3b17b3)}
.lv-mis .lv-g{font-size:13px;font-weight:800;color:#222}
.lv-mis.bad{border-color:#e5484d;background:#fff1f1}
.lv-mis.good{border-color:#12a150;background:#effaf3}
.lv-on #cs-add,.lv-on #cs-tools,.lv-on #cs-save,.lv-on #cs-iname{display:none!important}
.lv-noitems #cs-items{display:none!important}
#lv-check{background:#12a150!important;border-color:#0b7a3a!important;color:#fff!important;flex:1}
#lv-list-btn{flex:0 0 auto}
.lv-row{display:flex;align-items:center;gap:10px;width:100%;margin:6px 0;padding:10px 12px;border:2px solid var(--brand-300,#a892ff);border-radius:12px;background:#fff;font:800 15px inherit;font-family:inherit;text-align:right;cursor:pointer}
.lv-row b{flex:0 0 28px;height:28px;border-radius:50%;background:var(--brand-700,#3b17b3);color:#fff;display:flex;align-items:center;justify-content:center}
.lv-row span{flex:1}.lv-row.ok{border-color:#12a150;background:#effaf3}.lv-row i{color:#12a150;font-style:normal;font-size:18px}
.lv-free{display:block;text-align:center;margin:8px 0;font-weight:800;color:var(--brand-700,#3b17b3)}
.lv-win{color:#12a150}
.lv-next{background:#12a150!important;color:#fff!important}
.lv-on .cs-sec{max-height:84px;flex:0 0 auto}
.lv-on .kc-msg{display:none!important}
.lv-proj .lv-g{display:none}
.lv-proj .lv-mis{padding:3px 10px}
.lv-proj #kc-stage{width:218px;margin-inline:auto}
