/* MAGIC-COMMERCE-R37-CLICK-IDEMPOTENCY-CUMULATIVE-RELEASE-20261101 */
/* MSM Site 1.0.714 AI Agent V1.2 production deploy-sync */
/* MSM Site 1.0.620 cumulative Form Node deploy sync — 2026-09-21 */
// MSM Site 1.0.575 premium Light Theme + follower provider clarity — 2026-09-20
.smart-direct-page{--sd-bg:#fbf7f2;--sd-surface:#fffaf5;--sd-surface-2:#f7f0ea;--sd-card:#fffdf9;--sd-text:#252126;--sd-muted:#756d75;--sd-line:rgba(67,47,64,.13);--sd-orange:#f97316;--sd-orange-soft:#fff0e5;--sd-purple:#8b5cf6;--sd-purple-soft:#f1ebff;--sd-yellow:#f4c542;--sd-green:#16a34a;--sd-red:#dc2626;--sd-shadow:0 22px 65px rgba(64,41,25,.10);direction:rtl;color:var(--sd-text);font-size:14px}.smart-direct-page *{box-sizing:border-box}.smart-direct-page button,.smart-direct-page input,.smart-direct-page textarea,.smart-direct-page select{font:inherit}.smart-direct-page button{cursor:pointer}.smart-direct-page [hidden]{display:none!important}.sd-hero{position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,360px);gap:24px;align-items:center;padding:28px 30px;border:1px solid rgba(249,115,22,.22);border-radius:28px;background:linear-gradient(135deg,rgba(255,250,245,.96),rgba(249,244,255,.96));box-shadow:var(--sd-shadow)}.sd-hero-glow{position:absolute;z-index:-1;width:320px;height:320px;border-radius:50%;filter:blur(10px);opacity:.55}.sd-hero-glow-purple{top:-210px;left:8%;background:radial-gradient(circle,rgba(139,92,246,.34),transparent 68%)}.sd-hero-glow-orange{right:-120px;bottom:-230px;background:radial-gradient(circle,rgba(249,115,22,.35),transparent 68%)}.sd-kicker{display:flex;align-items:center;gap:9px;color:#9a4c13;font-size:12px;font-weight:900;letter-spacing:.055em}.sd-kicker i{width:30px;height:3px;border-radius:8px;background:linear-gradient(90deg,var(--sd-orange),var(--sd-yellow))}.sd-hero h1{margin:7px 0 8px;font-size:clamp(28px,3vw,43px);line-height:1.25}.sd-hero-copy>p{max-width:790px;margin:0;color:var(--sd-muted);font-size:14px;line-height:2}.sd-hero-badges{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}.sd-hero-badges span{padding:7px 11px;border:1px solid var(--sd-line);border-radius:999px;background:rgba(255,255,255,.58);color:#655c65;font-size:12px;font-weight:800}.sd-hero-control{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:13px;align-items:center;padding:17px;border:1px solid rgba(139,92,246,.18);border-radius:20px;background:linear-gradient(135deg,rgba(255,255,255,.82),rgba(246,238,255,.72));box-shadow:0 15px 38px rgba(91,64,111,.09)}.sd-hero-control-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(145deg,#f3e8ff,#fff0e5);color:var(--sd-purple);font-size:22px;font-weight:900}.sd-hero-control small,.sd-hero-control span:not(.sd-hero-control-icon){display:block;color:var(--sd-muted);font-size:12px}.sd-hero-control strong{display:block;margin:2px 0;color:var(--sd-text);font-size:15px}.sd-status-pulse{width:11px;height:11px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 6px rgba(34,197,94,.11)}.sd-mode-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:15px 0}.sd-mode-tabs button{display:flex;align-items:center;gap:12px;min-height:68px;padding:12px 15px;border:1px solid var(--sd-line);border-radius:18px;background:var(--sd-card);color:var(--sd-text);text-align:right;transition:.18s ease}.sd-mode-tabs button:hover{transform:translateY(-1px);border-color:rgba(139,92,246,.26)}.sd-mode-tabs button.active{border-color:rgba(249,115,22,.36);background:linear-gradient(135deg,var(--sd-orange-soft),var(--sd-purple-soft));box-shadow:0 12px 30px rgba(249,115,22,.08)}.sd-mode-icon{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;border-radius:13px;background:#f5efe8;color:var(--sd-orange);font-size:21px}.sd-mode-tabs button:nth-child(2) .sd-mode-icon{background:#f0eaff;color:var(--sd-purple)}.sd-mode-tabs b{display:block;font-size:14px}.sd-mode-tabs small{display:block;margin-top:3px;color:var(--sd-muted);font-size:12px;line-height:1.5}.sd-toolbar,.sd-dm-toolbar{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--sd-line);border-radius:18px;background:rgba(255,253,249,.86);box-shadow:0 10px 30px rgba(76,53,37,.05)}.sd-search{display:flex;align-items:center;gap:8px;min-width:240px;flex:1;height:45px;padding:0 12px;border:1px solid var(--sd-line);border-radius:13px;background:#fff}.sd-search span{color:var(--sd-purple);font-size:20px}.sd-search input{width:100%;border:0;outline:0;background:transparent;color:var(--sd-text);font-size:13px}.sd-filter{display:flex;gap:4px;padding:4px;border:1px solid var(--sd-line);border-radius:12px;background:#f7f1eb}.sd-filter button{height:35px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:var(--sd-muted);font-size:12px;font-weight:800}.sd-filter button.active{background:#fff;color:#a64e0c;box-shadow:0 4px 12px rgba(55,42,31,.08)}.sd-refresh,.sd-primary-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:43px;padding:0 15px;border:1px solid rgba(249,115,22,.28);border-radius:13px;background:linear-gradient(135deg,#fff0e6,#f3ebff);color:#8c410d;font-size:12px;font-weight:900}.sd-refresh:disabled{opacity:.55}.sd-shell{display:grid;grid-template-columns:minmax(300px,360px) minmax(0,1fr);gap:12px;margin-top:12px}.sd-library,.sd-builder{min-height:510px;border:1px solid var(--sd-line);border-radius:21px;background:var(--sd-card);box-shadow:0 12px 35px rgba(68,46,31,.05)}.sd-library{overflow:hidden}.sd-library>header{display:flex;align-items:center;justify-content:space-between;padding:16px 17px;border-bottom:1px solid var(--sd-line)}.sd-library>header small,.sd-dm-toolbar small{color:var(--sd-purple);font-size:11px;font-weight:900;letter-spacing:.035em}.sd-library>header h2,.sd-dm-toolbar h2{margin:3px 0 0;font-size:17px}.sd-library>header>b{min-width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:var(--sd-orange-soft);color:#a8470b;font-size:13px}.sd-library-list{max-height:600px;overflow:auto;padding:9px}.sd-media-item{position:relative;width:100%;display:grid;grid-template-columns:66px minmax(0,1fr) 8px;gap:11px;align-items:center;margin-bottom:7px;padding:8px;border:1px solid transparent;border-radius:14px;background:transparent;color:var(--sd-text);text-align:right}.sd-media-item:hover{background:#faf5f0}.sd-media-item.active{border-color:rgba(249,115,22,.32);background:linear-gradient(135deg,#fff2e8,#f6efff)}.sd-media-thumb{position:relative;width:66px;height:66px;overflow:hidden;display:grid;place-items:center;border-radius:11px;background:#efe8e2;color:var(--sd-purple);font-size:22px}.sd-media-thumb img,.sd-media-thumb video{width:100%;height:100%;object-fit:cover}.sd-media-thumb .sd-play{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:21px;text-shadow:0 2px 10px rgba(0,0,0,.7);pointer-events:none}.sd-media-copy{min-width:0}.sd-media-copy small{display:block;color:#a95413;font-size:11px;font-weight:900}.sd-media-copy strong{display:block;margin:2px 0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sd-media-copy p{margin:0;color:var(--sd-muted);font-size:12px;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sd-rule-dot{width:8px;height:8px;border-radius:50%;background:#d6cfc8}.sd-media-item.is-enabled .sd-rule-dot{background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.11)}.sd-builder{display:grid;place-items:center;padding:18px}.sd-empty{text-align:center;max-width:510px}.sd-empty-art{position:relative;width:92px;height:72px;margin:0 auto 12px;display:grid;place-items:center}.sd-empty-art i{width:58px;height:58px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(145deg,#f4eaff,#fff0e5);color:var(--sd-purple);font-size:27px;font-style:normal;box-shadow:0 10px 30px rgba(139,92,246,.12)}.sd-empty h2{margin:0;font-size:19px}.sd-empty p{color:var(--sd-muted);font-size:13px;line-height:1.9}.sd-selection{width:100%}.sd-selected-card{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:17px;align-items:center;padding:17px;border:1px solid rgba(139,92,246,.18);border-radius:20px;background:linear-gradient(135deg,#fffaf5,#f7f0ff)}.sd-selected-thumb{position:relative;width:120px;height:120px;overflow:hidden;display:grid;place-items:center;border-radius:17px;background:#ebe3dc;color:var(--sd-purple);font-size:28px}.sd-selected-thumb img,.sd-selected-thumb video{width:100%;height:100%;object-fit:cover}.sd-selected-copy{min-width:0}.sd-selected-copy small{color:#a84d0b;font-size:11px;font-weight:900}.sd-selected-copy h2{margin:4px 0 5px;font-size:18px}.sd-selected-copy p{max-width:720px;margin:0;color:var(--sd-muted);font-size:13px;line-height:1.8}.sd-selected-copy a{display:inline-block;margin-top:7px;color:#7c3aed;font-size:12px;font-weight:800;text-decoration:none}.sd-selection-actions{display:flex;flex-direction:column;gap:9px;align-items:stretch}.sd-selection-state{min-width:135px;padding:9px 12px;border-radius:11px;background:#f1ece6;color:#756a62;text-align:center;font-size:12px;font-weight:900}.sd-selection-state.is-enabled{background:#e9f9ef;color:#168044}.sd-primary-action{min-height:45px;background:linear-gradient(135deg,#f97316,#9a58e8);border:0;color:#fff;box-shadow:0 10px 24px rgba(139,70,26,.17)}.sd-selection-note{display:flex;gap:12px;align-items:flex-start;margin-top:11px;padding:14px;border:1px dashed rgba(139,92,246,.26);border-radius:15px;background:#faf5ff}.sd-selection-note i{font-size:22px;color:var(--sd-purple)}.sd-selection-note b{font-size:13px}.sd-selection-note p{margin:3px 0 0;color:var(--sd-muted);font-size:12px;line-height:1.7}.sd-dm-toolbar{justify-content:space-between;margin-bottom:12px;padding:17px}.sd-dm-toolbar p{margin:4px 0 0;color:var(--sd-muted);font-size:13px}.sd-dm-flow-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.sd-dm-flow-card,.sd-dm-empty{padding:16px;border:1px solid var(--sd-line);border-radius:18px;background:var(--sd-card);box-shadow:0 10px 28px rgba(76,53,37,.05)}.sd-dm-flow-card.is-enabled{border-color:rgba(34,197,94,.25)}.sd-dm-flow-card header{display:flex;gap:10px;align-items:center}.sd-dm-flow-icon{width:39px;height:39px;display:grid;place-items:center;border-radius:12px;background:var(--sd-purple-soft);color:var(--sd-purple);font-size:20px}.sd-dm-flow-card header small{font-size:11px;color:var(--sd-purple);font-weight:900}.sd-dm-flow-card h3{margin:2px 0 0;font-size:15px}.sd-dm-flow-card>p{min-height:42px;color:var(--sd-muted);font-size:12px;line-height:1.7}.sd-keyword-chips{display:flex;flex-wrap:wrap;gap:5px}.sd-keyword-chips span,.sd-keyword-chips b{padding:5px 8px;border-radius:999px;background:#f3eee9;color:#6c6268;font-size:11px}.sd-dm-flow-card footer{display:flex;justify-content:space-between;align-items:center;margin-top:13px;padding-top:11px;border-top:1px solid var(--sd-line)}.sd-dm-flow-card footer>span{font-size:12px;font-weight:900}.sd-dm-flow-card footer button,.sd-dm-empty button{border:0;background:transparent;color:#7c3aed;font-size:12px;font-weight:900}.sd-dm-empty{grid-column:1/-1;text-align:center;padding:44px}.sd-dm-empty>span{font-size:34px;color:var(--sd-purple)}.sd-dm-empty h3{font-size:18px}.sd-dm-empty p{color:var(--sd-muted);font-size:13px}.sd-loading,.sd-library-empty{padding:28px;text-align:center;color:var(--sd-muted);font-size:12px;line-height:1.8}.sd-loading{display:flex;justify-content:center;align-items:center;gap:10px}.sd-loading i{width:17px;height:17px;border:2px solid rgba(139,92,246,.18);border-top-color:var(--sd-purple);border-radius:50%;animation:sdSpin .7s linear infinite}@keyframes sdSpin{to{transform:rotate(360deg)}}

.sd-studio-modal{position:fixed;inset:0;z-index:100000;width:100dvw;height:100dvh;display:flex;flex-direction:column;background:var(--sd-bg);color:var(--sd-text);direction:rtl}.sd-studio-header{min-height:78px;display:flex;justify-content:space-between;align-items:center;gap:18px;padding:11px 18px;border-bottom:1px solid var(--sd-line);background:rgba(255,250,245,.95);backdrop-filter:blur(18px)}.sd-studio-heading{display:flex;align-items:center;gap:11px;min-width:0}.sd-studio-close{width:42px;height:42px;border:1px solid var(--sd-line);border-radius:13px;background:#fff;color:#5e5358;font-size:24px}.sd-studio-brand{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(135deg,var(--sd-orange),var(--sd-purple));color:#fff;font-size:19px}.sd-studio-heading small{color:var(--sd-purple);font-size:11px;font-weight:900}.sd-studio-heading h2{margin:2px 0;font-size:18px}.sd-studio-heading p{margin:0;color:var(--sd-muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:680px}.sd-studio-header-actions{display:flex;align-items:center;gap:10px}.sd-master-switch{display:flex;align-items:center;gap:9px;padding:7px 10px;border:1px solid var(--sd-line);border-radius:14px;background:#fff}.sd-master-switch input{position:absolute;opacity:0;pointer-events:none}.sd-switch-track{position:relative;width:44px;height:25px;border-radius:999px;background:#d9d2cc;transition:.18s}.sd-switch-track i{position:absolute;width:19px;height:19px;top:3px;right:3px;border-radius:50%;background:#fff;box-shadow:0 2px 7px rgba(0,0,0,.16);transition:.18s}.sd-master-switch input:checked+.sd-switch-track{background:linear-gradient(90deg,#22c55e,#16a34a)}.sd-master-switch input:checked+.sd-switch-track i{right:22px}.sd-master-switch b{display:block;font-size:12px}.sd-master-switch small{display:block;color:var(--sd-muted);font-size:11px}.sd-studio-save,.sd-save-secondary{height:43px;padding:0 16px;border:0;border-radius:13px;background:linear-gradient(135deg,var(--sd-orange),var(--sd-purple));color:#fff;font-size:12px;font-weight:900;box-shadow:0 8px 22px rgba(139,80,39,.16)}.sd-studio-save{display:flex;align-items:center;gap:9px}.sd-studio-toolbar{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 15px;border-bottom:1px solid var(--sd-line);background:#fffdf9}.sd-flow-context{display:flex;align-items:center;gap:9px;min-width:0}.sd-flow-context>span{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:var(--sd-orange-soft);color:var(--sd-orange);font-size:18px}.sd-flow-context b{display:block;font-size:12px}.sd-flow-context small{display:block;color:var(--sd-muted);font-size:11px;max-width:620px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sd-toolbar-actions{display:flex;align-items:center;gap:8px}.sd-add-node-button{height:38px;padding:0 12px;border:1px solid rgba(139,92,246,.22);border-radius:11px;background:var(--sd-purple-soft);color:#6d3bc1;font-size:12px;font-weight:900}.sd-canvas-tools{display:flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--sd-line);border-radius:11px;background:#f7f1eb}.sd-canvas-tools button{width:31px;height:29px;border:0;border-radius:8px;background:transparent;color:#5f565c;font-size:16px;font-weight:900}.sd-canvas-tools button:hover{background:#fff}.sd-canvas-tools span{min-width:46px;text-align:center;color:#5f565c;font-size:12px;font-weight:900}.sd-studio-grid{direction:ltr;display:grid;grid-template-columns:minmax(0,1fr) 365px;grid-template-areas:"canvas inspector";min-height:0;flex:1}.sd-canvas-shell{grid-area:canvas;direction:rtl;position:relative;min-width:0;overflow:hidden;background:linear-gradient(180deg,#faf6f1,#f5efe9)}.sd-canvas-grid{position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(rgba(96,72,86,.14) 1px,transparent 1px);background-size:22px 22px}.sd-canvas-scroll{direction:ltr;position:absolute;inset:0 0 43px;overflow:auto}.sd-flow{position:relative;width:1480px;height:820px;transform-origin:top left;transform:scale(var(--sd-flow-scale));direction:ltr;user-select:none}.sd-canvas-legend{position:absolute;z-index:4;right:12px;left:12px;bottom:8px;min-height:31px;display:flex;align-items:center;gap:13px;padding:6px 10px;border:1px solid rgba(255,255,255,.76);border-radius:12px;background:rgba(255,253,249,.85);backdrop-filter:blur(12px);color:var(--sd-muted);font-size:11px}.sd-canvas-legend span{display:flex;align-items:center;gap:5px}.sd-canvas-legend i{width:7px;height:7px;border-radius:50%;background:#22c55e}.sd-canvas-legend i.is-branch{background:var(--sd-yellow)}.sd-canvas-legend i.is-media{background:var(--sd-purple)}.sd-canvas-legend b{margin-right:auto;color:#655c63;font-size:11px}.sd-inspector{grid-area:inspector;direction:rtl;min-width:0;overflow:auto;padding:14px;border-left:1px solid var(--sd-line);background:#fffaf5}.sd-inspector-head{display:flex;align-items:flex-start;gap:10px;padding-bottom:12px;border-bottom:1px solid var(--sd-line)}.sd-inspector-head>span{width:41px;height:41px;display:grid;place-items:center;flex:0 0 auto;border-radius:13px;background:linear-gradient(145deg,var(--sd-purple-soft),var(--sd-orange-soft));color:var(--sd-purple);font-size:20px}.sd-inspector-head small{color:var(--sd-purple);font-size:11px;font-weight:900}.sd-inspector-head h3{margin:2px 0;font-size:16px}.sd-inspector-head p{margin:0;color:var(--sd-muted);font-size:12px;line-height:1.6}.sd-flow-fields{display:grid;gap:10px;margin-top:13px;padding:12px;border:1px solid var(--sd-line);border-radius:15px;background:#fff}.sd-flow-fields label,.sd-node-editor label{display:grid;gap:6px}.sd-flow-fields label>span,.sd-node-editor label>span,.sd-field-title{font-size:12px;font-weight:900;color:#51494e}.sd-flow-fields input,.sd-flow-fields textarea,.sd-node-editor input,.sd-node-editor textarea,.sd-node-editor select{width:100%;border:1px solid var(--sd-line);border-radius:11px;background:#fffdf9;color:var(--sd-text);outline:none;padding:9px 10px;font-size:12px;line-height:1.7}.sd-flow-fields input:focus,.sd-flow-fields textarea:focus,.sd-node-editor input:focus,.sd-node-editor textarea:focus,.sd-node-editor select:focus{border-color:rgba(139,92,246,.45);box-shadow:0 0 0 3px rgba(139,92,246,.08)}.sd-node-editor{display:grid;gap:11px;margin-top:11px}.sd-editor-card{display:grid;gap:10px;padding:12px;border:1px solid var(--sd-line);border-radius:15px;background:#fff}.sd-editor-note{padding:10px;border:1px dashed rgba(139,92,246,.24);border-radius:11px;background:#faf5ff;color:#685d69;font-size:11px;line-height:1.7}.sd-inline-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sd-list-editor{display:grid;gap:8px}.sd-list-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) auto;gap:6px;align-items:center}.sd-list-row button,.sd-mini-button{height:34px;border:1px solid var(--sd-line);border-radius:9px;background:#f7f1eb;color:#6d6269;font-size:11px;font-weight:900}.sd-mini-button{padding:0 10px}.sd-carousel-card-editor{padding:10px;border:1px solid var(--sd-line);border-radius:12px;background:#fbf7f2}.sd-carousel-card-editor header{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.sd-carousel-card-editor header b{font-size:12px}.sd-carousel-card-editor header button{border:0;background:transparent;color:var(--sd-red);font-size:11px;font-weight:900}.sd-feedback{min-height:22px;margin-top:10px;color:var(--sd-muted);font-size:12px;line-height:1.6}.sd-feedback.is-success{color:#15803d}.sd-feedback.is-error{color:var(--sd-red)}.sd-inspector-actions{display:flex;gap:8px;position:sticky;bottom:-14px;padding:12px 0 0;background:linear-gradient(transparent,#fffaf5 25%)}.sd-inspector-actions button{flex:1}.sd-danger-action{height:43px;border:1px solid rgba(220,38,38,.2);border-radius:13px;background:#fff1f2;color:#be123c;font-size:12px;font-weight:900}.sd-node{position:absolute;width:188px;min-height:112px;border:1px solid rgba(68,52,66,.17);border-radius:15px;background:#fffdf9;box-shadow:0 13px 28px rgba(61,42,52,.11);direction:rtl;transition:box-shadow .15s,border-color .15s;touch-action:none}.sd-node:hover{box-shadow:0 18px 38px rgba(61,42,52,.15)}.sd-node.is-selected{border-color:rgba(139,92,246,.6);box-shadow:0 0 0 3px rgba(139,92,246,.1),0 18px 38px rgba(61,42,52,.15)}.sd-node.is-dragging{z-index:8;box-shadow:0 24px 54px rgba(61,42,52,.2)}.sd-node-stripe{height:5px;border-radius:15px 15px 0 0;background:var(--node-color,var(--sd-purple))}.sd-node-body{padding:10px 11px 11px}.sd-node-head{display:flex;align-items:center;gap:8px}.sd-node-icon{width:31px;height:31px;display:grid;place-items:center;border-radius:10px;background:color-mix(in srgb,var(--node-color,var(--sd-purple)) 12%,#fff);color:var(--node-color,var(--sd-purple));font-size:16px}.sd-node-copy{min-width:0}.sd-node-copy b{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sd-node-copy small{display:block;margin-top:2px;color:var(--sd-muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sd-node-preview{margin-top:8px;padding:7px 8px;border-radius:9px;background:#f7f2ed;color:#675e64;font-size:11px;line-height:1.55;min-height:31px;overflow:hidden}.sd-node-badge{position:absolute;top:10px;left:9px;padding:3px 6px;border-radius:999px;background:#f4eee8;color:#786e74;font-size:11px;font-weight:900}.sd-port{position:absolute;z-index:12;width:16px;height:16px;border:3px solid #fff;border-radius:50%;background:var(--node-color,var(--sd-purple));box-shadow:0 0 0 1px rgba(62,46,58,.18);cursor:crosshair}.sd-port-in{right:-9px;top:50%;transform:translateY(-50%)}.sd-port-out{left:-9px;top:50%;transform:translateY(-50%)}.sd-port-out.is-yes{top:41%;background:#22c55e}.sd-port-out.is-no{top:70%;background:#ef4444}.sd-port-label{position:absolute;left:13px;color:#71666d;font-size:11px;font-weight:900;white-space:nowrap}.sd-port-label.is-yes{top:31%}.sd-port-label.is-no{top:61%}.sd-edge-layer{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.sd-edge{fill:none;stroke:#a69aa2;stroke-width:2.5;opacity:.88;pointer-events:stroke;cursor:pointer}.sd-edge.is-branch-yes{stroke:#22c55e}.sd-edge.is-branch-no{stroke:#ef4444}.sd-edge.is-selected{stroke:var(--sd-orange);stroke-width:3.5}.sd-edge-hit{fill:none;stroke:transparent;stroke-width:14;pointer-events:stroke;cursor:pointer}.sd-edge-preview{fill:none;stroke:var(--sd-purple);stroke-width:2.5;stroke-dasharray:7 6}.sd-node-menu{position:absolute;z-index:30;width:264px;max-height:min(530px,70dvh);overflow:auto;padding:8px;border:1px solid var(--sd-line);border-radius:16px;background:rgba(255,253,249,.98);box-shadow:0 25px 65px rgba(53,35,48,.2);backdrop-filter:blur(18px);direction:rtl}.sd-node-menu-head{padding:7px 8px 9px}.sd-node-menu-head b{display:block;font-size:13px}.sd-node-menu-head small{color:var(--sd-muted);font-size:11px}.sd-node-menu button{width:100%;display:grid;grid-template-columns:36px minmax(0,1fr);gap:9px;align-items:center;padding:8px;border:0;border-radius:11px;background:transparent;color:var(--sd-text);text-align:right}.sd-node-menu button:hover{background:#f7f0ea}.sd-node-menu button>span{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:var(--item-soft,#f2ebff);color:var(--item-color,var(--sd-purple));font-size:18px}.sd-node-menu button b{display:block;font-size:12px}.sd-node-menu button small{display:block;margin-top:2px;color:var(--sd-muted);font-size:11px}.sd-studio-open{overflow:hidden!important}

html[data-theme="dark"] .smart-direct-page{--sd-bg:#141116;--sd-surface:#19151b;--sd-surface-2:#211b22;--sd-card:#1b171d;--sd-text:#f5eff5;--sd-muted:#aea2ae;--sd-line:rgba(255,255,255,.10);--sd-orange-soft:rgba(249,115,22,.12);--sd-purple-soft:rgba(139,92,246,.14);--sd-shadow:0 24px 70px rgba(0,0,0,.34)}html[data-theme="dark"] .sd-hero{background:linear-gradient(135deg,#1d171c,#16131a)}html[data-theme="dark"] .sd-hero-badges span,html[data-theme="dark"] .sd-master-switch,html[data-theme="dark"] .sd-studio-toolbar,html[data-theme="dark"] .sd-flow-fields,html[data-theme="dark"] .sd-editor-card,html[data-theme="dark"] .sd-node,html[data-theme="dark"] .sd-node-menu{background:#1d181e;color:var(--sd-text)}html[data-theme="dark"] .sd-hero-control{background:linear-gradient(135deg,#201921,#211a28)}html[data-theme="dark"] .sd-search,html[data-theme="dark"] .sd-filter,html[data-theme="dark"] .sd-toolbar,html[data-theme="dark"] .sd-dm-toolbar{background:#1b171d}html[data-theme="dark"] .sd-filter button.active{background:#282129;color:#ffb070}html[data-theme="dark"] .sd-library,html[data-theme="dark"] .sd-builder,html[data-theme="dark"] .sd-dm-flow-card,html[data-theme="dark"] .sd-dm-empty{background:#1b171d}html[data-theme="dark"] .sd-media-item:hover,html[data-theme="dark"] .sd-node-preview,html[data-theme="dark"] .sd-list-row button{background:#241e24}html[data-theme="dark"] .sd-media-item.active,html[data-theme="dark"] .sd-selected-card{background:linear-gradient(135deg,rgba(249,115,22,.10),rgba(139,92,246,.11))}html[data-theme="dark"] .sd-canvas-shell{background:linear-gradient(180deg,#141116,#181419)}html[data-theme="dark"] .sd-canvas-grid{background-image:radial-gradient(rgba(255,255,255,.09) 1px,transparent 1px)}html[data-theme="dark"] .sd-canvas-legend{background:rgba(28,23,29,.88);border-color:rgba(255,255,255,.08)}html[data-theme="dark"] .sd-inspector{background:#181419;border-color:var(--sd-line)}html[data-theme="dark"] .sd-inspector-actions{background:linear-gradient(transparent,#181419 25%)}html[data-theme="dark"] .sd-flow-fields input,html[data-theme="dark"] .sd-flow-fields textarea,html[data-theme="dark"] .sd-node-editor input,html[data-theme="dark"] .sd-node-editor textarea,html[data-theme="dark"] .sd-node-editor select{background:#151216;color:var(--sd-text)}html[data-theme="dark"] .sd-carousel-card-editor{background:#171318}html[data-theme="dark"] .sd-studio-header{background:rgba(24,20,25,.95)}html[data-theme="dark"] .sd-studio-close{background:#211b22;color:#e9e0e7}html[data-theme="dark"] .sd-switch-track{background:#51484f}

@media(max-width:1100px){.sd-shell{grid-template-columns:300px minmax(0,1fr)}.sd-dm-flow-grid{grid-template-columns:repeat(2,1fr)}.sd-studio-grid{grid-template-columns:minmax(0,1fr) 330px}.sd-selected-card{grid-template-columns:100px minmax(0,1fr)}.sd-selected-thumb{width:100px;height:100px}.sd-selection-actions{grid-column:1/-1;flex-direction:row}.sd-selection-actions>*{flex:1}}
@media(max-width:800px){.sd-hero{grid-template-columns:1fr;padding:21px}.sd-mode-tabs{grid-template-columns:1fr 1fr}.sd-toolbar{flex-wrap:wrap}.sd-search{min-width:100%;order:1}.sd-filter{flex:1;order:2}.sd-refresh{order:3}.sd-shell{grid-template-columns:1fr}.sd-library{min-height:0}.sd-library-list{max-height:300px}.sd-builder{min-height:360px}.sd-dm-flow-grid{grid-template-columns:1fr}.sd-studio-header{align-items:flex-start}.sd-studio-heading p{max-width:46vw}.sd-master-switch div{display:none}.sd-studio-grid{display:flex;flex-direction:column}.sd-inspector{order:1;flex:0 0 auto;max-height:44dvh;border-left:0;border-bottom:1px solid var(--sd-line)}.sd-canvas-shell{order:2;flex:1;min-height:50dvh}.sd-studio-toolbar{flex-wrap:wrap}.sd-flow-context{min-width:100%}.sd-toolbar-actions{width:100%;justify-content:space-between}.sd-inline-grid{grid-template-columns:1fr}}
@media(max-width:560px){.smart-direct-page{font-size:13px}.sd-hero{padding:18px;border-radius:21px}.sd-hero h1{font-size:28px}.sd-mode-tabs{grid-template-columns:1fr}.sd-mode-tabs button{min-height:62px}.sd-toolbar{padding:9px}.sd-filter{width:100%}.sd-filter button{flex:1;padding:0 6px}.sd-refresh{width:100%}.sd-selected-card{grid-template-columns:78px minmax(0,1fr);padding:12px}.sd-selected-thumb{width:78px;height:78px}.sd-selected-copy h2{font-size:15px}.sd-selection-actions{flex-direction:column}.sd-dm-toolbar{align-items:flex-start;flex-direction:column}.sd-dm-toolbar .sd-primary-action{width:100%}.sd-studio-header{padding:8px}.sd-studio-brand{display:none}.sd-studio-heading h2{font-size:15px}.sd-studio-heading p{display:none}.sd-studio-save{padding:0 11px}.sd-studio-save i{display:none}.sd-studio-toolbar{padding:7px 9px}.sd-add-node-button{flex:1}.sd-inspector{max-height:46dvh;padding:11px}.sd-canvas-legend b{display:none}.sd-node-menu{width:min(258px,calc(100vw - 24px))}}

/* 1.0.414 final readability + multi-flow/event/report surfaces */
.smart-direct-page{font-size:15px}.smart-direct-page small{font-size:12px}.sd-kicker,.sd-hero-control small,.sd-hero-control span:not(.sd-hero-control-icon),.sd-hero-badges span,.sd-mode-tabs small,.sd-filter button,.sd-refresh,.sd-primary-action,.sd-media-copy p,.sd-selected-copy a,.sd-selection-state,.sd-selection-note p,.sd-editor-note,.sd-list-row button,.sd-mini-button,.sd-feedback,.sd-danger-action,.sd-node-copy small,.sd-node-preview,.sd-node-badge,.sd-port-label,.sd-node-menu-head small,.sd-node-menu button small{font-size:12px}.sd-mode-tabs b,.sd-media-copy strong,.sd-selection-note b,.sd-node-menu button b,.sd-node-copy b{font-size:13px}.sd-media-copy small,.sd-selected-copy small,.sd-library>header small,.sd-dm-toolbar small{font-size:12px}.sd-search input,.sd-dm-toolbar p,.sd-empty p,.sd-selected-copy p{font-size:13px}.sd-refresh,.sd-primary-action,.sd-studio-save,.sd-save-secondary,.sd-add-node-button{font-size:13px;min-height:46px}.sd-mode-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}.sd-mode-tabs button{min-height:74px}.sd-mode-tabs button:nth-child(3) .sd-mode-icon{background:#e8fbf4;color:#0f9f75}.sd-mode-tabs button:nth-child(4) .sd-mode-icon{background:#fff6d7;color:#a76f00}
.sd-feature-strip{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 4px}.sd-feature-strip span{padding:8px 11px;border:1px solid var(--sd-line);border-radius:999px;background:var(--sd-card);font-size:12px;font-weight:850;color:#5f565d}.sd-feature-strip .is-pending{border-style:dashed;color:#7c3aed;background:var(--sd-purple-soft)}
.sd-comment-flow-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;padding:13px 14px;border:1px solid var(--sd-line);border-radius:15px 15px 8px 8px;background:var(--sd-surface-2)}.sd-comment-flow-head b{display:block;font-size:14px}.sd-comment-flow-head small{display:block;margin-top:3px;color:var(--sd-muted);font-size:12px}.sd-comment-flow-head button,.sd-event-card>button{min-height:40px;padding:0 13px;border:0;border-radius:11px;background:linear-gradient(135deg,var(--sd-orange),var(--sd-purple));color:#fff;font-size:13px;font-weight:900}.sd-comment-flow-list,.sd-event-flow-list{display:grid;gap:8px;padding:9px;border:1px solid var(--sd-line);border-top:0;border-radius:0 0 15px 15px;background:var(--sd-card)}.sd-mini-flow-card{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;border:1px solid var(--sd-line);border-radius:12px;background:var(--sd-surface)}.sd-mini-flow-card.is-enabled{border-color:rgba(34,197,94,.24);background:linear-gradient(135deg,rgba(34,197,94,.06),var(--sd-surface))}.sd-mini-flow-card>div:first-child{min-width:0}.sd-mini-flow-card small{display:inline-block;color:var(--sd-muted);font-size:12px}.sd-mini-flow-card b{display:block;margin:2px 0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sd-mini-flow-card span{color:var(--sd-muted);font-size:12px}.sd-mini-flow-card>div:last-child{display:flex;gap:6px;flex:0 0 auto}.sd-mini-flow-card button{min-height:35px;padding:0 10px;border:1px solid var(--sd-line);border-radius:9px;background:#fff;color:#5b5159;font-size:12px;font-weight:850}.sd-mini-flow-card button.is-danger{color:#be123c;background:#fff1f2;border-color:rgba(190,18,60,.14)}.sd-flow-empty-mini{padding:16px;color:var(--sd-muted);text-align:center;font-size:13px}
.sd-event-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.sd-event-card{padding:16px;border:1px solid var(--sd-line);border-radius:19px;background:var(--sd-card);box-shadow:0 12px 32px rgba(55,38,28,.05)}.sd-event-card>header{display:flex;align-items:center;gap:11px}.sd-event-card>header>span{width:46px;height:46px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(145deg,var(--sd-orange-soft),var(--sd-purple-soft));color:var(--sd-purple);font-size:20px;font-weight:900}.sd-event-card small{color:var(--sd-purple);font-size:12px;font-weight:900}.sd-event-card h2{margin:3px 0 0;font-size:17px}.sd-event-card>p{min-height:66px;color:var(--sd-muted);font-size:13px;line-height:1.8}.sd-event-card>button{width:100%;margin-bottom:10px}.sd-event-card.is-pending{border-style:dashed}.sd-event-card.is-pending>button{background:linear-gradient(135deg,#7c6f79,#9f8fa1)}
.sd-report-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px;border:1px solid var(--sd-line);border-radius:18px;background:var(--sd-card)}.sd-report-toolbar small{color:var(--sd-purple);font-weight:900}.sd-report-toolbar h2{margin:3px 0;font-size:18px}.sd-report-toolbar p{margin:0;color:var(--sd-muted);font-size:13px}.sd-report-toolbar select{min-width:120px;height:42px;padding:0 11px;border:1px solid var(--sd-line);border-radius:11px;background:var(--sd-surface);color:var(--sd-text);font-size:13px}.sd-report-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin:11px 0}.sd-report-kpis article{padding:13px;border:1px solid var(--sd-line);border-radius:14px;background:var(--sd-card)}.sd-report-kpis small{display:block;color:var(--sd-muted);font-size:12px}.sd-report-kpis b{display:block;margin-top:5px;font-size:22px}.sd-report-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.sd-report-grid>section{overflow:hidden;border:1px solid var(--sd-line);border-radius:17px;background:var(--sd-card)}.sd-report-grid>section>header{padding:13px 14px;border-bottom:1px solid var(--sd-line)}.sd-report-grid h3{margin:0;font-size:15px}.sd-report-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;border-bottom:1px solid var(--sd-line)}.sd-report-row:last-child{border-bottom:0}.sd-report-row b{display:block;font-size:13px}.sd-report-row small{display:block;margin-top:2px;color:var(--sd-muted);font-size:12px}.sd-report-row>span{color:var(--sd-muted);font-size:12px;text-align:left}.sd-report-row .is-completed{color:#15803d}.sd-report-row .is-failed{color:#be123c}.sd-report-row .is-queued{color:#b45309}
.sd-studio-grid{direction:ltr;grid-template-columns:minmax(0,1fr) 370px;grid-template-areas:"canvas inspector"}.sd-canvas-shell{grid-area:canvas;direction:rtl}.sd-inspector{grid-area:inspector;direction:rtl}.sd-node{width:176px;min-height:104px}.sd-node-copy b{font-size:13px}.sd-node-copy small,.sd-node-preview{font-size:12px}.sd-flow-fields label>span,.sd-node-editor label>span,.sd-field-title{font-size:13px}.sd-flow-fields input,.sd-flow-fields textarea,.sd-node-editor input,.sd-node-editor textarea,.sd-node-editor select{font-size:13px}
html[data-theme="dark"] .sd-mini-flow-card button{background:#211b22;color:#eee6ec}html[data-theme="dark"] .sd-comment-flow-head,html[data-theme="dark"] .sd-report-toolbar{background:#201b21}
@media(max-width:1100px){.sd-mode-tabs{grid-template-columns:repeat(2,1fr)}.sd-event-grid{grid-template-columns:1fr 1fr}.sd-report-kpis{grid-template-columns:repeat(3,1fr)}.sd-studio-grid{grid-template-columns:minmax(0,1fr) 340px}}
@media(max-width:800px){.sd-event-grid,.sd-report-grid{grid-template-columns:1fr}.sd-report-kpis{grid-template-columns:repeat(2,1fr)}.sd-studio-grid{display:flex;direction:rtl}.sd-inspector{order:1}.sd-canvas-shell{order:2}}
@media(max-width:560px){.smart-direct-page{font-size:14px}.sd-mode-tabs{grid-template-columns:1fr}.sd-report-kpis{grid-template-columns:1fr 1fr}.sd-mini-flow-card{align-items:flex-start;flex-direction:column}.sd-mini-flow-card>div:last-child{width:100%}.sd-mini-flow-card button{flex:1}}


/* MSM 1.0.415 — Smart Direct mobile-first + rich node UX hotfix */
.smart-direct-page{max-width:100%;min-width:0;overflow-x:clip}
.sd-shell,.sd-library,.sd-builder,.sd-selection,.sd-selected-card,.sd-selected-copy,.sd-mode-panel{min-width:0;max-width:100%}
.sd-selected-card{overflow:hidden}
.sd-selected-copy h2{max-width:100%;margin:4px 0 5px;font-size:15px!important;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.sd-selected-copy p{max-width:100%;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.sd-selection-actions{min-width:0}
.sd-node-menu button.is-disabled,.sd-node-menu button:disabled{opacity:.46;cursor:not-allowed;filter:saturate(.45)}
.sd-node-menu button.is-disabled:hover,.sd-node-menu button:disabled:hover{background:transparent}
.sd-node-menu{overscroll-behavior:contain}
.sd-card-buttons{margin-top:10px;padding-top:10px;border-top:1px dashed var(--sd-line)}
.sd-carousel-card-editor .sd-list-row,.sd-editor-card>.sd-list-editor .sd-list-row{grid-template-columns:minmax(90px,.85fr) minmax(150px,1.4fr) 34px}
.sd-list-row input{min-width:0}
.sd-mini-button{min-height:40px}
.sd-canvas-scroll{min-width:0;max-width:100%;overscroll-behavior:contain;touch-action:pan-x pan-y}
.sd-studio-modal{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;overflow:hidden}
.sd-studio-header,.sd-studio-toolbar,.sd-studio-grid{min-width:0;max-width:100vw}
.sd-studio-grid{min-height:0;overflow:hidden}
.sd-canvas-shell,.sd-inspector{min-width:0}
.sd-node{touch-action:none}
.sd-port{touch-action:none}

@media(max-width:800px){
  .smart-direct-page{padding-inline:0}
  .sd-hero{padding:18px 16px;border-radius:20px}
  .sd-hero h1{font-size:26px}
  .sd-hero-copy>p{font-size:13px;line-height:1.8}
  .sd-mode-tabs{gap:8px}
  .sd-mode-tabs button{min-width:0}
  .sd-toolbar{display:grid;grid-template-columns:1fr;gap:8px}
  .sd-search{min-width:0;width:100%;order:0}
  .sd-filter{width:100%;overflow:auto;justify-content:flex-start}
  .sd-refresh{width:100%}
  .sd-shell{display:flex;flex-direction:column;gap:10px}
  .sd-library{width:100%;min-height:0}
  .sd-library-list{display:flex;gap:8px;max-height:none;overflow-x:auto;overflow-y:hidden;padding:9px;scroll-snap-type:x proximity}
  .sd-media-item{flex:0 0 min(280px,82vw);width:min(280px,82vw);margin:0;scroll-snap-align:start;grid-template-columns:62px minmax(0,1fr) 8px}
  .sd-media-thumb{width:62px;height:62px}
  .sd-builder{width:100%;min-height:310px;padding:12px}
  .sd-selected-card{grid-template-columns:82px minmax(0,1fr);gap:11px;padding:12px}
  .sd-selected-thumb{width:82px;height:82px;border-radius:14px}
  .sd-selection-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
  .sd-selection-state,.sd-primary-action{min-width:0;width:100%}
  .sd-comment-flow-head{align-items:flex-start;gap:10px}
  .sd-comment-flow-head>div{min-width:0}
  .sd-comment-flow-head button{flex:0 0 auto}

  .sd-studio-header{height:auto;min-height:58px;padding:8px 10px;gap:8px}
  .sd-studio-heading{min-width:0;flex:1}
  .sd-studio-heading>div{min-width:0}
  .sd-studio-heading h2{max-width:42vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sd-studio-header-actions{gap:6px;flex:0 0 auto}
  .sd-master-switch{padding:6px}
  .sd-studio-save{min-height:38px;padding:0 10px}
  .sd-studio-toolbar{padding:7px 9px;gap:7px}
  .sd-flow-context{min-width:0!important;flex:1}
  .sd-flow-context>div{min-width:0}
  .sd-flow-context small{max-width:100%!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sd-toolbar-actions{width:auto!important;flex:0 0 auto}
  .sd-add-node-button{min-height:38px;padding:0 10px;white-space:nowrap}
  .sd-canvas-tools{display:none}

  .sd-studio-grid{display:flex!important;flex-direction:column!important;direction:rtl!important;height:calc(100dvh - 116px);overflow-y:auto!important;overflow-x:hidden!important;padding:8px!important}
  .sd-canvas-shell{order:1!important;flex:0 0 54dvh!important;width:100%!important;height:54dvh!important;min-height:330px!important;max-height:56dvh;border-radius:15px}
  .sd-inspector{order:2!important;width:100%!important;max-width:100%!important;max-height:none!important;min-height:0!important;overflow:visible!important;border:1px solid var(--sd-line)!important;border-radius:15px!important;margin-top:8px}
  .sd-inspector-actions{position:sticky;bottom:0;z-index:4}
  .sd-canvas-scroll{width:100%;height:100%;padding:18px 18px 70px!important}
  .sd-flow{transform-origin:top right}
  .sd-canvas-legend{right:8px;left:8px;bottom:8px;padding:7px 9px;gap:9px;overflow:auto;white-space:nowrap}
  .sd-canvas-legend>b{display:none}

  .sd-node-menu{position:fixed!important;z-index:1000!important;left:10px!important;right:10px!important;top:auto!important;bottom:10px!important;width:auto!important;max-height:56dvh!important;padding:9px;border-radius:18px;box-shadow:0 -16px 50px rgba(38,25,36,.24);display:grid;grid-template-columns:1fr 1fr;gap:5px}
  .sd-node-menu[hidden]{display:none!important}
  .sd-node-menu-head{grid-column:1/-1;position:sticky;top:-9px;z-index:1;margin:-9px -9px 3px;padding:11px 12px;background:inherit;border-bottom:1px solid var(--sd-line)}
  .sd-node-menu button{grid-template-columns:34px minmax(0,1fr);padding:7px;min-height:58px}
  .sd-node-menu button>span{width:34px;height:34px;font-size:16px}
  .sd-node-menu button b{font-size:11px}
  .sd-node-menu button small{font-size:10px;line-height:1.45}
  .sd-node-menu button.is-disabled b:after{display:none}

  .sd-list-row{grid-template-columns:1fr!important;gap:6px}
  .sd-list-row button{width:100%;min-height:34px}
  .sd-carousel-card-editor{padding:10px}
  .sd-editor-card{padding:11px}
}
@media(max-width:560px){
  .sd-hero h1{font-size:24px}
  .sd-mode-tabs button{min-height:58px}
  .sd-mode-tabs small{font-size:11px}
  .sd-selected-copy h2{font-size:14px!important}
  .sd-selected-copy p{font-size:12px;-webkit-line-clamp:2}
  .sd-selection-actions{grid-template-columns:1fr}
  .sd-studio-grid{height:calc(100dvh - 110px)}
  .sd-canvas-shell{flex-basis:52dvh!important;height:52dvh!important;min-height:310px!important}
  .sd-node{width:166px}
  .sd-node-copy b{font-size:12px}
  .sd-node-copy small,.sd-node-preview{font-size:11px}
  .sd-node-menu{grid-template-columns:1fr 1fr;max-height:60dvh!important}
}


/* Hotfix 1.0.426 — keep action buttons safely clickable inside comment-flow cards */
.sd-mini-flow-card>div:last-child,.sd-mini-flow-actions{position:relative;z-index:2}
.sd-mini-flow-card button{position:relative;z-index:3;pointer-events:auto}

/* =====================================================================
   MSM 1.0.428 — Smart Direct desktop canvas + floating inspector polish
   ===================================================================== */
.sd-auto-layout-button{height:38px;padding:0 12px;border:1px solid rgba(14,165,233,.20);border-radius:11px;background:rgba(14,165,233,.08);color:#0369a1;font-size:12px;font-weight:900;display:inline-flex;align-items:center;gap:6px}
.sd-auto-layout-button:hover{background:rgba(14,165,233,.14)}
.sd-studio-grid{position:relative;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"canvas"!important}
.sd-canvas-shell{grid-area:canvas!important;width:100%;height:100%;min-width:0}
.sd-canvas-scroll{overflow:hidden!important;cursor:grab;touch-action:none!important;overscroll-behavior:none!important}
.sd-canvas-shell.is-panning .sd-canvas-scroll{cursor:grabbing}
.sd-flow{transform-origin:top left!important;will-change:transform}

/* Floating inspector */
.sd-inspector{position:absolute!important;z-index:26;top:12px;right:12px;left:auto;width:360px;max-width:min(360px,calc(100% - 24px));max-height:calc(100% - 24px);border:1px solid var(--sd-line)!important;border-radius:18px;box-shadow:0 22px 58px rgba(54,39,49,.18);overflow:auto;background:rgba(255,250,245,.97)!important;backdrop-filter:blur(18px);transition:width .18s ease,height .18s ease,box-shadow .18s ease}
.sd-inspector.is-dragging{box-shadow:0 30px 75px rgba(54,39,49,.26);transition:none}
.sd-inspector-head{position:relative;cursor:move;user-select:none;padding-left:42px}
.sd-inspector-heading-copy{min-width:0;flex:1}
.sd-inspector-window-actions{position:absolute;left:0;top:0;display:flex;gap:4px}
.sd-inspector-window-actions button{width:32px;height:32px;border:1px solid var(--sd-line);border-radius:10px;background:var(--sd-surface);color:var(--sd-muted);font-size:18px;font-weight:900;cursor:pointer}
.sd-inspector-window-actions button:hover{color:var(--sd-purple);border-color:rgba(139,92,246,.3)}
.sd-inspector.is-collapsed{width:86px!important;height:72px!important;overflow:hidden!important;padding:10px!important;border-radius:17px}
.sd-inspector.is-collapsed .sd-inspector-head{border:0;padding:0;align-items:center;justify-content:flex-end;gap:5px;height:50px;cursor:move}
.sd-inspector.is-collapsed .sd-inspector-head>span{width:42px;height:42px}
.sd-inspector.is-collapsed .sd-inspector-heading-copy,.sd-inspector.is-collapsed .sd-flow-fields,.sd-inspector.is-collapsed .sd-node-editor,.sd-inspector.is-collapsed .sd-feedback,.sd-inspector.is-collapsed .sd-inspector-actions{display:none!important}
.sd-inspector.is-collapsed .sd-inspector-window-actions{position:static}
.sd-inspector.is-collapsed .sd-inspector-window-actions button{width:28px;height:42px}

/* In-canvas delete affordances */
.sd-node-delete{position:absolute;z-index:15;top:8px;left:8px;width:23px;height:23px;border:1px solid rgba(225,29,72,.18);border-radius:8px;background:rgba(255,241,242,.95);color:#be123c;font-size:16px;font-weight:900;line-height:1;display:grid;place-items:center;opacity:.74;cursor:pointer;box-shadow:0 3px 9px rgba(190,18,60,.08)}
.sd-node:hover .sd-node-delete,.sd-node.is-selected .sd-node-delete{opacity:1}
.sd-edge-delete{pointer-events:all;cursor:pointer;opacity:.78}
.sd-edge-delete circle{fill:#fffaf5;stroke:rgba(225,29,72,.30);stroke-width:1.5;filter:drop-shadow(0 2px 4px rgba(70,48,62,.16))}
.sd-edge-delete text{fill:#be123c;font-size:16px;font-weight:900;text-anchor:middle;dominant-baseline:middle;pointer-events:none}
.sd-edge-delete:hover{opacity:1}
.sd-edge-delete:hover circle{fill:#fff1f2;stroke:#e11d48}

/* MSM Site 1.0.669 — keep Story / Mention / Welcome flow cards stable with 3 actions */
.smart-direct-page .sd-event-flow-list .sd-premium-flow-card{
  grid-template-columns:minmax(0,1fr)!important;
  align-items:stretch!important;
  gap:9px!important;
}
.smart-direct-page .sd-event-flow-list .sd-premium-flow-card .sd-mini-flow-main{
  width:100%;
  min-width:0;
}
.smart-direct-page .sd-event-flow-list .sd-premium-flow-card .sd-mini-flow-actions{
  width:100%;
  min-width:0;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px!important;
  justify-content:stretch!important;
}
.smart-direct-page .sd-event-flow-list .sd-premium-flow-card .sd-mini-flow-actions button{
  width:100%;
  min-width:0;
  min-height:33px!important;
  padding:0 6px!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media(max-width:420px){
  .smart-direct-page .sd-event-flow-list .sd-premium-flow-card .sd-mini-flow-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
  }
  .smart-direct-page .sd-event-flow-list .sd-premium-flow-card .sd-mini-flow-actions button{
    min-height:36px!important;
    padding:0 4px!important;
    font-size:9.5px!important;
  }
}

/* MSM Site 1.0.668 — Flow JSON import/export inside Start node */
.sd-flow-json-tools{margin-top:12px;padding:11px;border:1px solid color-mix(in srgb,var(--sd-purple) 18%,var(--sd-line));border-radius:13px;background:linear-gradient(135deg,color-mix(in srgb,var(--sd-purple) 5%,var(--sd-card)),color-mix(in srgb,var(--sd-orange) 4%,var(--sd-card)));box-shadow:inset 0 1px 0 rgba(255,255,255,.06)}
.sd-flow-json-head{display:flex;align-items:flex-start;gap:9px}
.sd-flow-json-head>span{width:31px;height:31px;display:grid;place-items:center;flex:0 0 31px;border-radius:9px;background:color-mix(in srgb,var(--sd-purple) 11%,var(--sd-card));color:var(--sd-purple);font-size:11px;font-weight:950;direction:ltr}
.sd-flow-json-head b{display:block;font-size:11px;font-weight:900;color:var(--sd-text)}
.sd-flow-json-head small{display:block;margin-top:2px;color:var(--sd-muted);font-size:9px;line-height:1.65}
.sd-flow-json-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}
.sd-flow-json-actions button{min-height:35px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 9px;border:1px solid var(--sd-line);border-radius:10px;background:var(--sd-card);color:var(--sd-text);font-size:10px;font-weight:850;cursor:pointer}
.sd-flow-json-actions button span{font-size:14px;line-height:1}
.sd-flow-json-actions .is-export{border-color:color-mix(in srgb,var(--sd-purple) 20%,var(--sd-line));color:color-mix(in srgb,var(--sd-purple) 75%,var(--sd-text));background:color-mix(in srgb,var(--sd-purple) 6%,var(--sd-card))}
.sd-flow-json-actions .is-import{border-color:color-mix(in srgb,var(--sd-orange) 22%,var(--sd-line));color:color-mix(in srgb,var(--sd-orange) 78%,var(--sd-text));background:color-mix(in srgb,var(--sd-orange) 6%,var(--sd-card))}
.sd-flow-json-actions button:hover{transform:translateY(-1px);filter:saturate(1.05)}
html[data-theme="dark"] .sd-flow-json-tools{background:linear-gradient(135deg,rgba(124,58,237,.08),rgba(249,115,22,.06))}
@media(max-width:420px){.sd-flow-json-actions{grid-template-columns:1fr}.sd-flow-json-actions button{min-height:38px}}

/* MSM Site 1.0.667 — duplicate Flow + Node controls */
.sd-node-duplicate{position:absolute;z-index:16;top:8px;left:39px;width:23px;height:23px;border:1px solid rgba(124,58,237,.18);border-radius:8px;background:rgba(245,243,255,.96);color:#7c3aed;font-size:14px;font-weight:900;line-height:1;display:grid;place-items:center;opacity:.76;cursor:pointer;box-shadow:0 3px 9px rgba(124,58,237,.08)}
.sd-node:hover .sd-node-duplicate,.sd-node.is-selected .sd-node-duplicate{opacity:1}
.sd-node-duplicate:hover{background:#ede9fe;border-color:rgba(124,58,237,.34);transform:translateY(-1px)}
html[data-theme="dark"] .sd-node-duplicate{background:rgba(76,49,116,.90);color:#c4b5fd;border-color:rgba(196,181,253,.22)}
.sd-mini-flow-actions .is-duplicate,.sd-dm-flow-actions .is-duplicate{display:inline-flex!important;align-items:center;justify-content:center;gap:5px!important;color:#6d28d9!important;border-color:rgba(124,58,237,.18)!important;background:rgba(124,58,237,.065)!important}
.sd-mini-flow-actions .is-duplicate:hover,.sd-dm-flow-actions .is-duplicate:hover{background:rgba(124,58,237,.12)!important;border-color:rgba(124,58,237,.30)!important}
html[data-theme="dark"] .sd-mini-flow-actions .is-duplicate,html[data-theme="dark"] .sd-dm-flow-actions .is-duplicate{color:#c4b5fd!important;background:rgba(124,58,237,.14)!important;border-color:rgba(196,181,253,.18)!important}
@media(max-width:800px){.sd-node-duplicate{opacity:1}.sd-dm-flow-actions{flex-wrap:wrap}.sd-dm-flow-actions button{min-height:32px;padding-inline:7px!important}}

/* Only valid node choices are rendered in 1.0.428. */
.sd-node-menu button:disabled,.sd-node-menu .is-disabled{display:none!important}

html[data-theme="dark"] .sd-inspector{background:rgba(24,20,25,.97)!important}
html[data-theme="dark"] .sd-node-delete{background:rgba(70,22,36,.94);color:#fda4af;border-color:rgba(253,164,175,.2)}
html[data-theme="dark"] .sd-edge-delete circle{fill:#211b22;stroke:rgba(251,113,133,.35)}
html[data-theme="dark"] .sd-edge-delete text{fill:#fda4af}
html[data-theme="dark"] .sd-auto-layout-button{background:rgba(14,165,233,.12);color:#7dd3fc}

@media(max-width:800px){
  .sd-studio-grid{display:flex!important;position:static!important;grid-template-areas:none!important}
  .sd-inspector{position:static!important;order:2!important;width:100%!important;max-width:100%!important;max-height:none!important;transform:none!important;overflow:visible!important;box-shadow:none!important;border-radius:15px!important}
  .sd-inspector.is-collapsed{width:100%!important;height:auto!important;padding:11px!important;overflow:visible!important}
  .sd-inspector.is-collapsed .sd-inspector-heading-copy{display:block!important}
  .sd-inspector.is-collapsed .sd-flow-fields,.sd-inspector.is-collapsed .sd-node-editor,.sd-inspector.is-collapsed .sd-feedback,.sd-inspector.is-collapsed .sd-inspector-actions{display:initial!important}
  .sd-inspector-window-actions{display:none!important}
  .sd-inspector-head{cursor:default;padding-left:0}
  .sd-canvas-shell{order:1!important}
  .sd-canvas-scroll{overflow:auto!important;cursor:default;touch-action:pan-x pan-y!important;overscroll-behavior:contain!important}
  .sd-auto-layout-button{min-height:46px;flex:1;justify-content:center}
  .sd-node-delete{opacity:1}
}


/* MSM 1.0.429 — wider virtual canvas / RTL auto-layout hotfix */
.sd-flow{width:6000px!important;height:3600px!important}


/* MSM 1.0.430 — pointer-accurate edge interaction */
.sd-edge-delete-hit{fill:transparent!important;stroke:none!important;pointer-events:all!important}
.sd-edge-delete-dot{fill:#fffaf5;stroke:rgba(225,29,72,.30);stroke-width:1.5;filter:drop-shadow(0 2px 4px rgba(70,48,62,.16));pointer-events:none}
.sd-edge-delete text{pointer-events:none!important}
html[data-theme="dark"] .sd-edge-delete-dot{fill:#211b22;stroke:rgba(251,113,133,.35)}


/* MSM 1.0.434 — compact mobile studio + start-node focus */
@media(max-width:800px){
  .sd-studio-modal{overflow:hidden!important}
  .sd-studio-header{min-height:60px!important;flex:0 0 auto;padding:7px 8px!important;gap:7px!important}
  .sd-studio-heading{gap:7px!important}
  .sd-studio-close{width:38px!important;height:38px!important;border-radius:11px!important;font-size:20px!important}
  .sd-studio-heading h2{font-size:15px!important;line-height:1.25!important}
  .sd-studio-heading small{font-size:9px!important}
  .sd-studio-header-actions{gap:6px!important}
  .sd-master-switch{padding:5px 7px!important}
  .sd-studio-save{height:38px!important;padding:0 10px!important}
  .sd-studio-toolbar{min-height:52px!important;flex:0 0 auto!important;flex-wrap:nowrap!important;padding:6px 8px!important;gap:6px!important}
  .sd-flow-context{min-width:0!important;flex:1 1 auto!important}
  .sd-flow-context small{display:none!important}
  .sd-flow-context>span{width:30px!important;height:30px!important}
  .sd-toolbar-actions{width:auto!important;flex:0 0 auto!important;gap:5px!important}
  .sd-add-node-button,.sd-auto-layout-button{min-height:36px!important;height:36px!important;padding:0 9px!important;font-size:11px!important;flex:0 0 auto!important}
  .sd-canvas-tools{display:none!important}
  .sd-studio-grid{display:flex!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;overflow:hidden!important;padding:6px!important;gap:6px!important;flex-direction:column!important}
  .sd-canvas-shell{order:1!important;flex:1 1 auto!important;width:100%!important;height:auto!important;min-height:220px!important;max-height:none!important;border-radius:14px!important}
  .sd-canvas-scroll{inset:0 0 34px!important;width:100%!important;height:auto!important;padding:0!important;overflow:hidden!important;cursor:grab!important;touch-action:none!important;overscroll-behavior:none!important}
  .sd-canvas-shell.is-panning .sd-canvas-scroll{cursor:grabbing!important}
  .sd-canvas-legend{bottom:5px!important;right:6px!important;left:6px!important;min-height:26px!important;padding:4px 7px!important;gap:8px!important;font-size:9px!important}
  .sd-canvas-legend b{display:none!important}
  .sd-inspector{position:static!important;order:2!important;flex:0 0 min(34dvh,300px)!important;width:100%!important;max-width:100%!important;max-height:min(34dvh,300px)!important;min-height:0!important;margin:0!important;padding:9px!important;overflow:auto!important;transform:none!important;box-shadow:none!important;border-radius:14px!important}
  .sd-inspector.is-collapsed{flex:0 0 58px!important;width:100%!important;height:58px!important;max-height:58px!important;padding:7px 9px!important;overflow:hidden!important}
  .sd-inspector.is-collapsed .sd-inspector-head{height:43px!important;min-height:43px!important;padding:0!important;border:0!important;align-items:center!important;justify-content:flex-start!important;cursor:pointer!important}
  .sd-inspector.is-collapsed .sd-inspector-head>span{width:36px!important;height:36px!important;flex:0 0 36px!important}
  .sd-inspector.is-collapsed .sd-inspector-heading-copy{display:block!important;min-width:0!important}
  .sd-inspector.is-collapsed .sd-inspector-heading-copy p{display:none!important}
  .sd-inspector.is-collapsed .sd-flow-fields,.sd-inspector.is-collapsed .sd-node-editor,.sd-inspector.is-collapsed .sd-feedback,.sd-inspector.is-collapsed .sd-inspector-actions{display:none!important}
  .sd-inspector-window-actions{display:none!important}
  .sd-inspector-head{cursor:default!important;padding-left:0!important}
  .sd-inspector-actions{position:sticky!important;bottom:-9px!important;z-index:4!important}
}
@media(max-width:560px){
  .sd-studio-header{min-height:56px!important}
  .sd-studio-toolbar{min-height:48px!important}
  .sd-studio-grid{padding:5px!important;gap:5px!important}
  .sd-canvas-shell{min-height:210px!important}
  .sd-inspector{flex-basis:min(32dvh,270px)!important;max-height:min(32dvh,270px)!important}
  .sd-inspector.is-collapsed{flex-basis:54px!important;height:54px!important;max-height:54px!important}
}

/* 1.0.435 personalization */
.sd-personalization-tags{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:7px}.sd-personalization-tags>span{font-size:11px;font-weight:900;color:var(--sd-muted);margin-inline-end:2px}.sd-personalization-tags button{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:5px 9px;border:1px solid rgba(139,92,246,.20);border-radius:10px;background:rgba(139,92,246,.07);color:var(--sd-text);cursor:pointer;font:inherit}.sd-personalization-tags button:hover{border-color:rgba(139,92,246,.38);background:rgba(139,92,246,.12)}.sd-personalization-tags code{direction:ltr;unicode-bidi:isolate;font-size:11px;color:#7c3aed}.sd-personalization-tags b{font-size:11px;font-weight:850}.sd-personalization-note{margin-top:0!important}html[data-theme="dark"] .sd-personalization-tags button{background:rgba(139,92,246,.12);border-color:rgba(167,139,250,.22)}html[data-theme="dark"] .sd-personalization-tags code{color:#c4b5fd}@media(max-width:560px){.sd-personalization-tags{gap:5px}.sd-personalization-tags button{min-height:30px;padding:4px 7px}.sd-personalization-tags b{font-size:10px}}

/* 1.0.436 — Direct flow delete + Smart Direct media uploader */
.sd-dm-flow-actions{display:flex;align-items:center;gap:8px}.sd-dm-flow-actions .is-danger{color:#be123c!important;padding:6px 9px;border:1px solid rgba(190,18,60,.16)!important;border-radius:9px!important;background:#fff1f2!important}.sd-dm-flow-actions .is-danger:hover{background:#ffe4e6!important}
.sd-media-uploader{display:grid;gap:9px;padding:10px;border:1px solid rgba(139,92,246,.18);border-radius:13px;background:linear-gradient(135deg,rgba(139,92,246,.045),rgba(249,115,22,.035))}.sd-upload-empty{min-height:72px;display:flex;align-items:center;justify-content:center;gap:9px;border:1px dashed rgba(139,92,246,.24);border-radius:11px;color:var(--sd-muted);background:rgba(255,255,255,.58)}.sd-upload-empty>span{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:var(--sd-purple-soft);color:var(--sd-purple);font-size:18px}.sd-upload-empty b{font-size:11px}.sd-upload-preview{overflow:hidden;border:1px solid var(--sd-line);border-radius:11px;background:#f5efe9}.sd-upload-preview.is-image{height:130px}.sd-upload-preview.is-image img,.sd-upload-preview.is-video video{width:100%;height:100%;display:block;object-fit:cover}.sd-upload-preview.is-video{height:150px}.sd-upload-preview.is-audio{display:grid;gap:8px;padding:13px}.sd-upload-preview.is-audio audio{width:100%;height:34px}.sd-audio-wave{height:34px;display:flex;align-items:center;justify-content:center;gap:4px}.sd-audio-wave i{display:block;width:4px;border-radius:99px;background:linear-gradient(180deg,var(--sd-purple),var(--sd-orange))}.sd-audio-wave i:nth-child(1){height:12px}.sd-audio-wave i:nth-child(2){height:25px}.sd-audio-wave i:nth-child(3){height:17px}.sd-audio-wave i:nth-child(4){height:30px}.sd-audio-wave i:nth-child(5){height:20px}.sd-audio-wave i:nth-child(6){height:14px}.sd-upload-actions{display:flex;align-items:center;gap:10px;justify-content:space-between}.sd-upload-actions small{color:var(--sd-muted);font-size:10px}.sd-upload-button{min-height:39px;display:inline-flex!important;align-items:center;justify-content:center;gap:7px;padding:0 12px;border:1px solid rgba(139,92,246,.24);border-radius:11px;background:linear-gradient(135deg,#fff0e6,#f2ebff);color:#7140bd;font-weight:900;cursor:pointer;white-space:nowrap}.sd-upload-button span{font-size:16px}.sd-upload-button b{font-size:11px}.sd-upload-progress{display:grid;gap:7px;padding:10px;border-radius:11px;background:#fff;border:1px solid var(--sd-line)}.sd-upload-progress-head{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:var(--sd-muted)}.sd-upload-progress-head b{color:var(--sd-purple);font-size:11px}.sd-upload-track{height:7px;overflow:hidden;border-radius:99px;background:#eee6f0}.sd-upload-track i{display:block;width:0;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--sd-orange),var(--sd-purple));transition:width .14s linear}.sd-upload-timeline{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.sd-upload-timeline span{position:relative;padding-top:10px;color:#a098a0;font-size:9px;text-align:center}.sd-upload-timeline span:before{content:"";position:absolute;top:0;right:50%;transform:translateX(50%);width:7px;height:7px;border-radius:50%;background:#d8d0d8;box-shadow:0 0 0 3px #f5f1f5}.sd-upload-timeline span.is-active{color:#6d42ba;font-weight:900}.sd-upload-timeline span.is-active:before{background:var(--sd-purple);box-shadow:0 0 0 3px rgba(139,92,246,.12)}
.sd-node-media-thumb{display:grid;grid-template-columns:48px minmax(0,1fr);gap:7px;align-items:center;min-height:46px}.sd-node-media-thumb img,.sd-node-media-thumb video{width:48px;height:42px;display:block;object-fit:cover;border-radius:7px;background:#e8e1e7;pointer-events:none}.sd-node-media-thumb span{font-size:10px;font-weight:900;color:#655c65}.sd-node-media-thumb.is-audio{grid-template-columns:1fr;gap:4px}.sd-node-wave{height:20px;display:flex;align-items:center;justify-content:center;gap:3px}.sd-node-wave i{width:3px;border-radius:9px;background:var(--sd-purple)}.sd-node-wave i:nth-child(1){height:8px}.sd-node-wave i:nth-child(2){height:16px}.sd-node-wave i:nth-child(3){height:11px}.sd-node-wave i:nth-child(4){height:18px}.sd-node-wave i:nth-child(5){height:10px}.sd-node-media-thumb.is-audio b{font-size:10px;text-align:center;color:#625a62}
html[data-theme="dark"] .sd-upload-progress,html[data-theme="dark"] .sd-upload-empty{background:#1d181e}html[data-theme="dark"] .sd-upload-preview{background:#171318}html[data-theme="dark"] .sd-dm-flow-actions .is-danger{background:rgba(190,18,60,.12)!important;color:#fb7185!important}
@media(max-width:800px){.sd-upload-actions{align-items:stretch;flex-direction:column}.sd-upload-button{width:100%}.sd-dm-flow-actions{gap:5px}.sd-upload-preview.is-video{height:125px}.sd-upload-preview.is-image{height:115px}}


/* 1.0.437 — rotating text + inline emoji picker */
.sd-emoji-wrap{position:relative;display:flex;justify-content:flex-start;margin-top:-2px}.sd-emoji-toggle{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:5px 10px;border:1px solid rgba(249,115,22,.20);border-radius:10px;background:rgba(249,115,22,.07);color:var(--sd-text);cursor:pointer;font:inherit}.sd-emoji-toggle span{font-size:16px}.sd-emoji-toggle b{font-size:11px;font-weight:900}.sd-emoji-picker{position:absolute;z-index:40;top:40px;right:0;width:min(272px,calc(100vw - 48px));display:grid;grid-template-columns:repeat(6,1fr);gap:5px;padding:9px;border:1px solid var(--sd-line);border-radius:14px;background:#fffdf9;box-shadow:0 16px 42px rgba(45,30,42,.18)}.sd-emoji-picker[hidden]{display:none!important}.sd-emoji-picker button{display:grid;place-items:center;min-width:0;height:34px;padding:0;border:0;border-radius:8px;background:transparent;font-size:19px;cursor:pointer}.sd-emoji-picker button:hover{background:var(--sd-orange-soft);transform:translateY(-1px)}html[data-theme="dark"] .sd-emoji-toggle{background:rgba(249,115,22,.11);border-color:rgba(251,146,60,.20)}html[data-theme="dark"] .sd-emoji-picker{background:#211b22}@media(max-width:560px){.sd-emoji-picker{position:fixed;right:12px;left:12px;top:auto;bottom:18px;width:auto;grid-template-columns:repeat(6,1fr);z-index:1003}.sd-emoji-picker button{height:38px;font-size:21px}}


/* v1.0.438 — quick personalization toolbar above message editors */
.sd-personalization-top{margin:0 0 8px;gap:6px;padding:7px 8px;border:1px solid rgba(139,92,246,.13);border-radius:12px;background:linear-gradient(135deg,rgba(139,92,246,.055),rgba(249,115,22,.035))}
.sd-personalization-top>span{display:inline-flex;align-items:center;min-height:30px;padding-inline:2px 5px}
.sd-personalization-top button{min-height:34px;border-radius:11px;box-shadow:0 5px 14px rgba(84,51,125,.045)}
.sd-personalization-top button i{display:grid;place-items:center;width:20px;height:20px;border-radius:7px;background:rgba(139,92,246,.10);font-style:normal;font-size:13px;line-height:1}
.sd-personalization-top button code{font-size:10px;opacity:.72}
.sd-personalization-note{margin:-3px 0 8px!important;line-height:1.75}
html[data-theme="dark"] .sd-personalization-top{background:linear-gradient(135deg,rgba(139,92,246,.12),rgba(249,115,22,.045));border-color:rgba(167,139,250,.18)}
@media(max-width:560px){.sd-personalization-top{padding:6px;gap:5px}.sd-personalization-top>span{width:100%;min-height:22px}.sd-personalization-top button{flex:1 1 auto;justify-content:center;padding:5px 7px}.sd-personalization-top button code{display:none}.sd-personalization-top button i{width:18px;height:18px}.sd-personalization-note{font-size:10px}}
\n\n/* 1.0.440 — compact text tools: name / user / mention + emoji on one clean row */
.sd-text-tools{position:relative;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px;direction:rtl}
.sd-personalization-compact{display:flex;align-items:center;gap:5px;min-width:0}
.sd-personalization-compact button{display:inline-flex;align-items:center;justify-content:center;min-width:50px;height:34px;padding:0 10px;border:1px solid rgba(139,92,246,.20);border-radius:10px;background:rgba(139,92,246,.07);color:var(--sd-text);font:inherit;font-size:11px;font-weight:900;line-height:1;cursor:pointer;white-space:nowrap;transition:.16s ease}
.sd-personalization-compact button:hover{transform:translateY(-1px);border-color:rgba(139,92,246,.38);background:rgba(139,92,246,.12)}
.sd-text-tools .sd-emoji-wrap{margin:0;flex:0 0 auto}
.sd-text-tools .sd-emoji-toggle{width:54px;height:34px;min-height:34px;padding:0 8px;justify-content:center;border-radius:10px}
.sd-text-tools .sd-emoji-toggle span{font-size:16px}
.sd-text-tools .sd-emoji-toggle b{font-size:10px}
.sd-text-tools .sd-emoji-picker{top:40px;right:auto;left:0}
html[data-theme="dark"] .sd-personalization-compact button{background:rgba(139,92,246,.12);border-color:rgba(167,139,250,.22)}
@media(max-width:560px){.sd-text-tools{gap:5px}.sd-personalization-compact{gap:4px;flex:1 1 auto}.sd-personalization-compact button{flex:1 1 0;min-width:0;height:32px;padding:0 6px;font-size:10px}.sd-text-tools .sd-emoji-toggle{width:44px;height:32px;min-height:32px;padding:0}.sd-text-tools .sd-emoji-toggle b{display:none}.sd-text-tools .sd-emoji-picker{position:fixed;right:12px;left:12px;top:auto;bottom:18px}}

/* legacy media UI rules retained for compatibility */
.sd-upload-action-buttons{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.sd-record-button{min-height:39px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border:1px solid rgba(14,165,233,.24);border-radius:11px;background:linear-gradient(135deg,#e8f8ff,#f1ebff);color:#087ca8;font:inherit;font-weight:900;cursor:pointer}.sd-record-button span{font-size:13px;color:#ef4444}.sd-record-button b{font-size:11px}.sd-record-button.is-recording{background:linear-gradient(135deg,#fff1f2,#ffe4e6);border-color:rgba(239,68,68,.32);color:#b91c1c;box-shadow:0 0 0 4px rgba(239,68,68,.07)}.sd-record-button.is-recording span{animation:sdRecPulse .85s ease-in-out infinite}.sd-record-status{width:100%;padding-top:2px;color:var(--sd-muted);font-size:10px}.sd-video-ready{display:block;padding:6px 9px;background:rgba(34,197,94,.08);color:#15803d;font-size:10px;font-weight:900;text-align:center}.sd-upload-preview.is-video{display:grid;grid-template-rows:minmax(0,1fr) auto}.sd-upload-preview.is-video video{min-height:0}@keyframes sdRecPulse{0%,100%{opacity:.35;transform:scale(.86)}50%{opacity:1;transform:scale(1.12)}}
html[data-theme="dark"] .sd-record-button{background:linear-gradient(135deg,rgba(14,165,233,.14),rgba(139,92,246,.14));border-color:rgba(56,189,248,.22);color:#7dd3fc}html[data-theme="dark"] .sd-record-button.is-recording{background:rgba(239,68,68,.14);color:#fca5a5}html[data-theme="dark"] .sd-video-ready{background:rgba(34,197,94,.12);color:#86efac}
@media(max-width:800px){.sd-upload-action-buttons{display:grid;grid-template-columns:1fr 1fr;width:100%}.sd-upload-action-buttons .sd-upload-button,.sd-upload-action-buttons .sd-record-button{width:100%}.sd-upload-actions>small{width:100%}}

/* 1.0.442 — compact text tools + global flow limit in header */
.sd-master-stack{display:grid;gap:5px;min-width:178px}
.sd-header-max{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 8px;border:1px solid var(--sd-line);border-radius:11px;background:#fff;color:var(--sd-text)}
.sd-header-max>span{font-size:10px;font-weight:900;white-space:nowrap;color:var(--sd-muted)}
.sd-header-max input{width:52px;height:28px;padding:0 5px;border:1px solid var(--sd-line);border-radius:8px;background:#fffdf9;color:var(--sd-text);text-align:center;font:inherit;font-size:11px;font-weight:900;outline:none}
.sd-header-max input:focus{border-color:rgba(139,92,246,.45);box-shadow:0 0 0 3px rgba(139,92,246,.08)}
.sd-text-tools{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;align-items:center!important;gap:5px!important;width:100%;margin:0 0 8px!important;direction:rtl}
.sd-text-tools .sd-personalization-compact{display:contents!important}
.sd-text-tools .sd-personalization-compact button,.sd-text-tools .sd-emoji-toggle{width:100%!important;min-width:0!important;height:34px!important;min-height:34px!important;padding:0 7px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;border-radius:10px!important;overflow:hidden;white-space:nowrap}
.sd-text-tools .sd-personalization-compact button{border:1px solid rgba(139,92,246,.20);background:linear-gradient(180deg,rgba(139,92,246,.08),rgba(139,92,246,.045));color:var(--sd-text);box-shadow:0 4px 12px rgba(84,51,125,.04)}
.sd-text-tools .sd-personalization-compact button:hover{border-color:rgba(139,92,246,.38);background:rgba(139,92,246,.12);transform:translateY(-1px)}
.sd-text-tools .sd-personalization-compact button b{font-size:10px;font-weight:900;line-height:1}
.sd-text-tools .sd-tool-icon{display:grid;place-items:center;width:16px;height:16px;flex:0 0 16px;font-size:12px;line-height:1}
.sd-text-tools .sd-emoji-wrap{position:relative;display:block!important;width:100%;margin:0!important;min-width:0}
.sd-text-tools .sd-emoji-toggle{border:1px solid rgba(249,115,22,.22);background:linear-gradient(180deg,rgba(249,115,22,.09),rgba(249,115,22,.045));color:var(--sd-text)}
.sd-text-tools .sd-emoji-toggle span{display:grid;place-items:center;width:16px;height:16px;flex:0 0 16px;font-size:15px!important;line-height:1!important}
.sd-text-tools .sd-emoji-toggle b{font-size:10px!important;font-weight:900;line-height:1}
.sd-text-tools .sd-emoji-picker{top:40px!important;right:auto!important;left:0!important}
html[data-theme="dark"] .sd-header-max{background:#1d181e}
html[data-theme="dark"] .sd-header-max input{background:#151216}
html[data-theme="dark"] .sd-text-tools .sd-personalization-compact button{background:rgba(139,92,246,.12);border-color:rgba(167,139,250,.22)}
@media(max-width:800px){.sd-master-stack{min-width:122px}.sd-header-max{padding:4px 6px}.sd-header-max>span{font-size:9px}.sd-header-max input{width:42px;height:26px;font-size:10px}}
@media(max-width:560px){.sd-studio-header-actions{align-items:stretch!important}.sd-master-stack{min-width:116px;gap:4px}.sd-header-max{padding:3px 5px}.sd-header-max>span{font-size:8px}.sd-header-max input{width:38px;height:24px;padding:0 3px}.sd-text-tools{gap:4px!important}.sd-text-tools .sd-personalization-compact button,.sd-text-tools .sd-emoji-toggle{height:32px!important;min-height:32px!important;padding:0 4px!important;gap:3px!important}.sd-text-tools .sd-personalization-compact button b,.sd-text-tools .sd-emoji-toggle b{font-size:9px!important}.sd-text-tools .sd-tool-icon,.sd-text-tools .sd-emoji-toggle span{width:14px;height:14px;flex-basis:14px;font-size:12px!important}.sd-text-tools .sd-emoji-picker{position:fixed!important;right:12px!important;left:12px!important;top:auto!important;bottom:18px!important}}


/* 1.0.443 — media controls parity with Communication Center */
.sd-upload-actions{display:block!important}
.sd-upload-action-buttons{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:nowrap!important;width:100%!important}
.sd-upload-action-buttons .sd-upload-button,.sd-upload-action-buttons .sd-record-button{flex:1 1 0!important;width:auto!important;min-width:0!important;height:40px!important;min-height:40px!important;padding:0 10px!important}
.sd-upload-action-buttons .sd-upload-button b,.sd-upload-action-buttons .sd-record-button b{font-size:11px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
.sd-upload-action-buttons .sd-record-button span{font-size:15px!important;line-height:1!important}
.sd-record-status{display:block;width:100%;margin-top:7px;text-align:center;color:var(--sd-muted);font-size:10px;font-weight:800}
.sd-record-status[hidden]{display:none!important}
@media(max-width:800px){.sd-upload-action-buttons{display:flex!important;grid-template-columns:none!important;gap:6px!important}.sd-upload-action-buttons .sd-upload-button,.sd-upload-action-buttons .sd-record-button{width:auto!important;min-width:0!important;height:38px!important;min-height:38px!important;padding:0 8px!important}.sd-upload-actions>small{display:none!important}}

/* 1.0.445 — media upload resilience + inline status */
.sd-media-uploader .sd-upload-actions{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;flex-wrap:nowrap!important;width:100%!important}
.sd-media-uploader .sd-upload-action-buttons{display:flex!important;align-items:center!important;gap:7px!important;flex:0 1 auto!important;flex-wrap:nowrap!important;min-width:0!important;width:auto!important}
.sd-media-uploader .sd-upload-action-buttons .sd-upload-button,.sd-media-uploader .sd-upload-action-buttons .sd-record-button{flex:0 1 auto!important;width:auto!important;min-width:0!important;height:39px!important;min-height:39px!important;padding:0 9px!important;border-radius:11px!important}
.sd-media-uploader .sd-upload-action-buttons .sd-upload-button b,.sd-media-uploader .sd-upload-action-buttons .sd-record-button b{font-size:10.5px!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important}
.sd-media-inline-status{display:inline-flex;align-items:center;min-width:0;max-width:170px;height:32px;padding:0 9px;border-radius:9px;border:1px solid rgba(100,116,139,.18);background:rgba(100,116,139,.07);color:var(--sd-muted);font-size:10px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1}
.sd-media-inline-status[hidden]{display:none!important}.sd-media-inline-status.is-error{border-color:rgba(239,68,68,.28);background:rgba(239,68,68,.09);color:#b91c1c}.sd-media-inline-status.is-success{border-color:rgba(34,197,94,.28);background:rgba(34,197,94,.09);color:#15803d}.sd-media-inline-status.is-recording{border-color:rgba(14,165,233,.25);background:rgba(14,165,233,.08);color:#087ca8}
html[data-theme="dark"] .sd-media-inline-status.is-error{color:#fca5a5;background:rgba(239,68,68,.13)}html[data-theme="dark"] .sd-media-inline-status.is-success{color:#86efac;background:rgba(34,197,94,.12)}html[data-theme="dark"] .sd-media-inline-status.is-recording{color:#7dd3fc;background:rgba(14,165,233,.12)}
@media(max-width:800px){.sd-media-uploader .sd-upload-actions{gap:5px!important}.sd-media-uploader .sd-upload-action-buttons{gap:5px!important}.sd-media-uploader .sd-upload-action-buttons .sd-upload-button,.sd-media-uploader .sd-upload-action-buttons .sd-record-button{height:37px!important;min-height:37px!important;padding:0 7px!important}.sd-media-inline-status{max-width:116px;padding:0 6px;font-size:9px}}

/* MSM 1.0.446 — Studio header: one compact RTL control row */
.sd-studio-header-actions{
  direction:rtl;
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:flex-start;
  gap:8px!important;
  min-width:0;
  white-space:nowrap;
}
.sd-master-stack{display:contents!important}
.sd-header-max,
.sd-master-switch,
.sd-studio-save{
  flex:0 0 auto;
  min-width:0;
  margin:0!important;
}
.sd-header-max{
  direction:rtl;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  height:42px;
  padding:5px 8px!important;
  border:1px solid var(--sd-line);
  border-radius:13px;
  background:#fff;
  color:var(--sd-text);
  font-family:inherit!important;
}
.sd-header-max input{
  order:0;
  width:48px!important;
  height:30px!important;
  flex:0 0 48px;
  margin:0!important;
  padding:0 5px!important;
  text-align:center!important;
  direction:ltr;
  font-family:inherit!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1!important;
}
.sd-header-max>span{
  order:1;
  margin:0!important;
  color:var(--sd-muted)!important;
  font-family:inherit!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.sd-master-switch{
  direction:rtl;
  height:42px;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  padding:5px 8px!important;
  white-space:nowrap!important;
}
.sd-master-switch>b{
  display:block!important;
  margin:0!important;
  font-family:inherit!important;
  font-size:11px!important;
  font-weight:900!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.sd-master-switch small{display:none!important}
.sd-switch-track{flex:0 0 44px}
.sd-studio-save{
  height:42px!important;
  min-height:42px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  padding:0 13px!important;
  font-family:inherit!important;
  font-size:11px!important;
  white-space:nowrap!important;
}
html[data-theme="dark"] .sd-header-max{background:#1d181e}

@media(max-width:800px){
  .sd-studio-header{gap:7px!important;padding:7px 8px!important;align-items:center!important}
  .sd-studio-header-actions{gap:5px!important;margin-inline-start:auto}
  .sd-header-max,.sd-master-switch,.sd-studio-save{height:38px!important;min-height:38px!important}
  .sd-header-max{gap:4px!important;padding:3px 5px!important}
  .sd-header-max input{width:39px!important;flex-basis:39px;height:26px!important;font-size:10px!important;padding:0 2px!important}
  .sd-header-max>span{font-size:8.5px!important}
  .sd-master-switch{gap:4px!important;padding:3px 5px!important}
  .sd-master-switch>b{font-size:9.5px!important}
  .sd-switch-track{width:36px!important;height:22px!important;flex-basis:36px!important}
  .sd-switch-track i{width:16px!important;height:16px!important;top:3px!important;right:3px!important}
  .sd-master-switch input:checked+.sd-switch-track i{right:17px!important}
  .sd-studio-save{gap:4px!important;padding:0 8px!important;font-size:9.5px!important}
  .sd-studio-save i{font-size:10px!important}
}
@media(max-width:560px){
  .sd-studio-header{min-height:54px!important;flex-flow:row nowrap!important}
  .sd-studio-heading{flex:0 0 auto!important;gap:0!important}
  .sd-studio-heading .sd-studio-brand,
  .sd-studio-heading>div{display:none!important}
  .sd-studio-close{width:34px!important;height:34px!important;min-width:34px!important;border-radius:10px!important;font-size:20px!important}
  .sd-studio-header-actions{flex:1 1 auto!important;width:auto!important;max-width:calc(100vw - 58px);overflow:visible!important;justify-content:flex-end!important;gap:4px!important}
  .sd-header-max{flex:1 1 98px!important;max-width:112px!important;min-width:92px!important;padding:2px 4px!important}
  .sd-header-max input{width:34px!important;flex-basis:34px!important;height:25px!important;font-size:9.5px!important}
  .sd-header-max>span{font-size:7.8px!important;letter-spacing:-.02em}
  .sd-master-switch{flex:0 0 74px!important;padding:2px 4px!important}
  .sd-master-switch>b{font-size:9px!important}
  .sd-switch-track{width:31px!important;height:20px!important;flex-basis:31px!important}
  .sd-switch-track i{width:14px!important;height:14px!important;top:3px!important;right:3px!important}
  .sd-master-switch input:checked+.sd-switch-track i{right:14px!important}
  .sd-studio-save{flex:0 0 79px!important;width:79px!important;padding:0 5px!important;font-size:9px!important}
  .sd-studio-save i{display:inline!important;font-size:9px!important}
}
@media(max-width:390px){
  .sd-studio-header{padding-inline:5px!important;gap:3px!important}
  .sd-studio-close{width:31px!important;height:31px!important;min-width:31px!important}
  .sd-studio-header-actions{max-width:calc(100vw - 43px);gap:3px!important}
  .sd-header-max{flex:1 1 88px!important;min-width:84px!important;max-width:102px!important}
  .sd-header-max>span{font-size:7.2px!important}
  .sd-header-max input{width:31px!important;flex-basis:31px!important}
  .sd-master-switch{flex-basis:68px!important}
  .sd-studio-save{flex-basis:72px!important;width:72px!important;font-size:8.5px!important}
}


/* MSM 1.0.487 — Smart Direct premium light/dark visual closure.
   Presentation only: no graph/runtime/business logic changes. */
.smart-direct-page{
  --sd-cyan:#06b6d4;
  --sd-gold:#eab308;
}
.smart-direct-page .sd-mode-tabs button{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border-color:rgba(67,47,64,.15);
  box-shadow:0 12px 28px rgba(57,38,29,.055);
}
.smart-direct-page .sd-mode-tabs button::after{
  content:"";
  position:absolute;
  inset:auto 14px 0 14px;
  height:3px;
  border-radius:999px 999px 0 0;
  opacity:.88;
  transform:scaleX(.84);
  transform-origin:center;
  transition:transform .18s ease,opacity .18s ease,box-shadow .18s ease;
  pointer-events:none;
}
.smart-direct-page .sd-mode-tabs button:nth-child(1)::after{
  background:linear-gradient(90deg,#f97316,#fb923c);
  box-shadow:0 0 18px rgba(249,115,22,.26);
}
.smart-direct-page .sd-mode-tabs button:nth-child(2)::after{
  background:linear-gradient(90deg,#7c3aed,#a78bfa);
  box-shadow:0 0 18px rgba(139,92,246,.26);
}
.smart-direct-page .sd-mode-tabs button:nth-child(3)::after{
  background:linear-gradient(90deg,#0891b2,#22d3ee);
  box-shadow:0 0 18px rgba(6,182,212,.25);
}
.smart-direct-page .sd-mode-tabs button:nth-child(4)::after{
  background:linear-gradient(90deg,#ca8a04,#facc15);
  box-shadow:0 0 18px rgba(234,179,8,.24);
}
.smart-direct-page .sd-mode-tabs button:hover::after,
.smart-direct-page .sd-mode-tabs button.active::after{
  transform:scaleX(1);
  opacity:1;
}
.smart-direct-page .sd-mode-tabs button.active{
  transform:translateY(-1px);
  box-shadow:0 15px 34px rgba(79,46,28,.09);
}
.smart-direct-page .sd-mode-tabs button:nth-child(1).active{border-color:rgba(249,115,22,.42)}
.smart-direct-page .sd-mode-tabs button:nth-child(2).active{border-color:rgba(139,92,246,.42)}
.smart-direct-page .sd-mode-tabs button:nth-child(3).active{border-color:rgba(6,182,212,.40)}
.smart-direct-page .sd-mode-tabs button:nth-child(4).active{border-color:rgba(234,179,8,.40)}

.smart-direct-page .sd-event-card,
.smart-direct-page .sd-dm-flow-card,
.smart-direct-page .sd-report-kpis article{
  position:relative;
  overflow:hidden;
}
.smart-direct-page .sd-event-card::after,
.smart-direct-page .sd-dm-flow-card::after,
.smart-direct-page .sd-report-kpis article::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:0;
  height:2px;
  border-radius:999px 999px 0 0;
  background:linear-gradient(90deg,rgba(249,115,22,.85),rgba(139,92,246,.88));
  opacity:.72;
  pointer-events:none;
}
.smart-direct-page .sd-event-card:nth-child(2n)::after,
.smart-direct-page .sd-dm-flow-card:nth-child(2n)::after,
.smart-direct-page .sd-report-kpis article:nth-child(2n)::after{
  background:linear-gradient(90deg,rgba(6,182,212,.86),rgba(139,92,246,.82));
}
.smart-direct-page .sd-event-card:nth-child(3n)::after,
.smart-direct-page .sd-dm-flow-card:nth-child(3n)::after,
.smart-direct-page .sd-report-kpis article:nth-child(3n)::after{
  background:linear-gradient(90deg,rgba(234,179,8,.85),rgba(249,115,22,.84));
}

/* Consistent scrollbars inside Smart Direct only. */
.smart-direct-page,
.smart-direct-page *{
  scrollbar-width:thin;
  scrollbar-color:rgba(139,92,246,.55) rgba(127,127,127,.10);
}
.smart-direct-page *::-webkit-scrollbar{width:8px;height:8px}
.smart-direct-page *::-webkit-scrollbar-track{background:rgba(127,127,127,.08);border-radius:999px}
.smart-direct-page *::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,rgba(139,92,246,.72),rgba(249,115,22,.70));
  border-radius:999px;
  border:2px solid transparent;
  background-clip:padding-box;
}
.smart-direct-page *::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,rgba(167,139,250,.92),rgba(251,146,60,.90));
  background-clip:padding-box;
}

/* Dark mode: eliminate white control islands while keeping contrast. */
html[data-theme="dark"] .smart-direct-page .sd-mode-tabs button{
  background:linear-gradient(145deg,#201a21,#19151b);
  border-color:rgba(255,255,255,.11);
  box-shadow:0 14px 34px rgba(0,0,0,.24);
}
html[data-theme="dark"] .smart-direct-page .sd-mode-tabs button.active{
  background:linear-gradient(135deg,rgba(249,115,22,.14),rgba(139,92,246,.16));
}
html[data-theme="dark"] .smart-direct-page .sd-search,
html[data-theme="dark"] .smart-direct-page .sd-filter button.active,
html[data-theme="dark"] .smart-direct-page .sd-studio-close,
html[data-theme="dark"] .smart-direct-page .sd-master-switch,
html[data-theme="dark"] .smart-direct-page .sd-mini-flow-card button,
html[data-theme="dark"] .smart-direct-page .sd-header-max,
html[data-theme="dark"] .smart-direct-page .sd-upload-progress{
  background:#211b22;
  color:var(--sd-text);
  border-color:rgba(255,255,255,.11);
}
html[data-theme="dark"] .smart-direct-page .sd-mini-flow-card button:hover,
html[data-theme="dark"] .smart-direct-page .sd-filter button.active:hover{
  background:#2a222c;
  border-color:rgba(167,139,250,.28);
}
html[data-theme="dark"] .smart-direct-page .sd-canvas-tools button:hover{
  background:#29222a;
}
html[data-theme="dark"] .smart-direct-page .sd-danger-action,
html[data-theme="dark"] .smart-direct-page .sd-mini-flow-card button.is-danger{
  background:rgba(190,18,60,.13);
  color:#fda4af;
  border-color:rgba(251,113,133,.22);
}
html[data-theme="dark"] .smart-direct-page .sd-mode-tabs button::after{
  height:3px;
  filter:saturate(1.2);
}
html[data-theme="dark"] .smart-direct-page .sd-event-card::after,
html[data-theme="dark"] .smart-direct-page .sd-dm-flow-card::after,
html[data-theme="dark"] .smart-direct-page .sd-report-kpis article::after{
  height:3px;
  opacity:.92;
  box-shadow:0 -3px 18px rgba(139,92,246,.10);
}


/* MSM 1.0.488 — Smart Direct vivid chips/cards + dark studio white-island cleanup */
.smart-direct-page .sd-feature-strip span{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  color:#f6fff8;
  border-color:rgba(34,197,94,.24);
  background:linear-gradient(135deg,rgba(15,23,42,.86),rgba(17,24,39,.78));
  box-shadow:0 10px 24px rgba(15,23,42,.12), inset 0 0 0 1px rgba(34,197,94,.06);
}
.smart-direct-page .sd-feature-strip span::before{
  content:"✓";
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  flex:0 0 18px;
  border-radius:999px;
  background:linear-gradient(135deg,#22c55e,#16a34a);
  color:#fff;
  font-size:11px;
  font-weight:900;
  box-shadow:0 0 0 4px rgba(34,197,94,.12), 0 8px 18px rgba(22,163,74,.18);
}
.smart-direct-page .sd-feature-strip .is-pending{
  color:#fff4ff;
  border-style:solid;
  border-color:rgba(168,85,247,.24);
  background:linear-gradient(135deg,rgba(88,28,135,.82),rgba(76,29,149,.74));
}
.smart-direct-page .sd-feature-strip .is-pending::before{
  content:"✦";
  background:linear-gradient(135deg,#a855f7,#7c3aed);
  box-shadow:0 0 0 4px rgba(168,85,247,.12), 0 8px 18px rgba(124,58,237,.18);
}
html[data-theme="light"] .smart-direct-page .sd-feature-strip span,
html[data-theme="light"] .smart-direct-page .sd-feature-strip span{
  color:#0f172a;
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(243,250,244,.94));
}
html[data-theme="light"] .smart-direct-page .sd-feature-strip .is-pending,
html[data-theme="light"] .smart-direct-page .sd-feature-strip .is-pending{
  color:#581c87;
  background:linear-gradient(135deg,rgba(250,245,255,.96),rgba(245,243,255,.94));
}

.smart-direct-page .sd-mode-icon{
  color:#fff;
  box-shadow:0 14px 28px rgba(15,23,42,.10), inset 0 1px 0 rgba(255,255,255,.18);
}
.smart-direct-page .sd-mode-tabs button:nth-child(1) .sd-mode-icon{background:linear-gradient(135deg,#f97316,#fb923c)}
.smart-direct-page .sd-mode-tabs button:nth-child(2) .sd-mode-icon{background:linear-gradient(135deg,#7c3aed,#a78bfa)}
.smart-direct-page .sd-mode-tabs button:nth-child(3) .sd-mode-icon{background:linear-gradient(135deg,#059669,#14b8a6)}
.smart-direct-page .sd-mode-tabs button:nth-child(4) .sd-mode-icon{background:linear-gradient(135deg,#eab308,#f59e0b)}

html[data-theme="dark"] .smart-direct-page .sd-selection-note{
  background:linear-gradient(135deg,rgba(139,92,246,.14),rgba(249,115,22,.08));
  border-color:rgba(167,139,250,.24);
  color:var(--sd-text);
}
html[data-theme="dark"] .smart-direct-page .sd-selection-note p{color:#d6cbd6}
html[data-theme="dark"] .smart-direct-page .sd-selection-note i{color:#c4b5fd}

html[data-theme="dark"] .smart-direct-page .sd-studio-toolbar,
html[data-theme="dark"] .smart-direct-page .sd-flow-context>span,
html[data-theme="dark"] .smart-direct-page .sd-canvas-tools,
html[data-theme="dark"] .smart-direct-page .sd-canvas-tools span,
html[data-theme="dark"] .smart-direct-page .sd-flow-fields,
html[data-theme="dark"] .smart-direct-page .sd-editor-card,
html[data-theme="dark"] .smart-direct-page .sd-editor-note,
html[data-theme="dark"] .smart-direct-page .sd-list-row button,
html[data-theme="dark"] .smart-direct-page .sd-mini-button,
html[data-theme="dark"] .smart-direct-page .sd-inspector-window-actions button,
html[data-theme="dark"] .smart-direct-page .sd-node-badge,
html[data-theme="dark"] .smart-direct-page .sd-carousel-card-editor{
  background:#211b22;
  color:var(--sd-text);
  border-color:rgba(255,255,255,.11);
}
html[data-theme="dark"] .smart-direct-page .sd-flow-context>span{
  background:linear-gradient(135deg,rgba(249,115,22,.22),rgba(139,92,246,.22));
  color:#f7c27b;
}
html[data-theme="dark"] .smart-direct-page .sd-canvas-tools{background:#1f1a20}
html[data-theme="dark"] .smart-direct-page .sd-canvas-tools span{background:transparent;color:#f2e9f1}
html[data-theme="dark"] .smart-direct-page .sd-canvas-tools button{color:#f2e9f1}
html[data-theme="dark"] .smart-direct-page .sd-canvas-tools button:hover{background:#2f2631}
html[data-theme="dark"] .smart-direct-page .sd-auto-layout-button{
  background:linear-gradient(135deg,rgba(14,165,233,.16),rgba(139,92,246,.14));
  border-color:rgba(125,211,252,.22);
  color:#b5e8ff;
}
html[data-theme="dark"] .smart-direct-page .sd-add-node-button{
  background:linear-gradient(135deg,rgba(124,58,237,.24),rgba(139,92,246,.18));
  border-color:rgba(167,139,250,.22);
  color:#f1eaff;
}
html[data-theme="dark"] .smart-direct-page .sd-header-max,
html[data-theme="dark"] .smart-direct-page .sd-master-switch,
html[data-theme="dark"] .smart-direct-page .sd-studio-close,
html[data-theme="dark"] .smart-direct-page .sd-upload-progress,
html[data-theme="dark"] .smart-direct-page .sd-search,
html[data-theme="dark"] .smart-direct-page .sd-mini-flow-card button,
html[data-theme="dark"] .smart-direct-page .sd-flow-fields input,
html[data-theme="dark"] .smart-direct-page .sd-flow-fields textarea,
html[data-theme="dark"] .smart-direct-page .sd-node-editor input,
html[data-theme="dark"] .smart-direct-page .sd-node-editor textarea,
html[data-theme="dark"] .smart-direct-page .sd-node-editor select,
html[data-theme="dark"] .smart-direct-page .sd-header-max input{
  background:#1a151b;
  color:var(--sd-text);
  border-color:rgba(255,255,255,.11);
}
html[data-theme="dark"] .smart-direct-page .sd-editor-note{background:linear-gradient(135deg,rgba(124,58,237,.12),rgba(249,115,22,.06));color:#ded5df}
html[data-theme="dark"] .smart-direct-page .sd-inspector-window-actions button:hover,
html[data-theme="dark"] .smart-direct-page .sd-list-row button:hover,
html[data-theme="dark"] .smart-direct-page .sd-mini-button:hover,
html[data-theme="dark"] .smart-direct-page .sd-header-max:hover,
html[data-theme="dark"] .smart-direct-page .sd-master-switch:hover,
html[data-theme="dark"] .smart-direct-page .sd-studio-close:hover,
html[data-theme="dark"] .smart-direct-page .sd-search:hover{
  background:#2a222c;
  border-color:rgba(167,139,250,.28);
}
html[data-theme="dark"] .smart-direct-page .sd-node-badge{
  background:rgba(249,115,22,.14);
  color:#ffd39e;
}
html[data-theme="dark"] .smart-direct-page .sd-port{border-color:#1b171d}
html[data-theme="dark"] .smart-direct-page .sd-node-copy small,
html[data-theme="dark"] .smart-direct-page .sd-port-label,
html[data-theme="dark"] .smart-direct-page .sd-flow-context small,
html[data-theme="dark"] .smart-direct-page .sd-comment-flow-head small,
html[data-theme="dark"] .smart-direct-page .sd-feedback{color:#c9bdc9}


/* MSM 1.0.489 — final dark chip/icon visibility correction */
html[data-theme="dark"] .smart-direct-page .sd-feature-strip span{
  color:#f4f7f5!important;
  background:linear-gradient(135deg,#171c19,#111613)!important;
  border-color:rgba(34,197,94,.30)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.22),inset 0 0 0 1px rgba(34,197,94,.07)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-feature-strip span::before{
  background:linear-gradient(135deg,#22c55e,#15803d)!important;
  color:#fff!important;
  box-shadow:0 0 0 4px rgba(34,197,94,.13),0 8px 18px rgba(22,163,74,.20)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-feature-strip .is-pending{
  color:#eadcff!important;
  background:linear-gradient(135deg,#21172b,#18111f)!important;
  border-color:rgba(168,85,247,.34)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-feature-strip .is-pending::before{
  background:linear-gradient(135deg,#a855f7,#7c3aed)!important;
  color:#fff!important;
}
.smart-direct-page .sd-mode-icon{
  width:46px!important;
  height:46px!important;
  font-size:25px!important;
  font-weight:950!important;
  line-height:1!important;
  color:#fff!important;
  text-shadow:0 1px 2px rgba(0,0,0,.22)!important;
}
.smart-direct-page .sd-mode-tabs button:nth-child(1) .sd-mode-icon,
.smart-direct-page .sd-mode-tabs button:nth-child(2) .sd-mode-icon,
.smart-direct-page .sd-mode-tabs button:nth-child(3) .sd-mode-icon,
.smart-direct-page .sd-mode-tabs button:nth-child(4) .sd-mode-icon{color:#fff!important}


/* MSM 1.0.490 — final dark controls + mode-accent switch thumb */
.smart-direct-page{--sd-mode-accent:#f97316}
.smart-direct-page .sd-switch-track i{
  background:var(--sd-mode-accent)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--sd-mode-accent) 28%,transparent),0 3px 9px rgba(0,0,0,.24)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-switch-track i{background:var(--sd-mode-accent)!important;border:0!important}
html[data-theme="dark"] .smart-direct-page .sd-master-switch input:checked+.sd-switch-track{
  background:color-mix(in srgb,var(--sd-mode-accent) 34%,#241d25)!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sd-mode-accent) 42%,transparent)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-studio-toolbar,
html[data-theme="dark"] .smart-direct-page .sd-header-max,
html[data-theme="dark"] .smart-direct-page .sd-master-switch,
html[data-theme="dark"] .smart-direct-page .sd-studio-close,
html[data-theme="dark"] .smart-direct-page .sd-canvas-tools,
html[data-theme="dark"] .smart-direct-page .sd-canvas-tools button,
html[data-theme="dark"] .smart-direct-page .sd-inspector-window-actions button,
html[data-theme="dark"] .smart-direct-page .sd-flow-fields,
html[data-theme="dark"] .smart-direct-page .sd-editor-card,
html[data-theme="dark"] .smart-direct-page .sd-editor-note,
html[data-theme="dark"] .smart-direct-page .sd-list-row button,
html[data-theme="dark"] .smart-direct-page .sd-mini-button,
html[data-theme="dark"] .smart-direct-page .sd-mini-flow-card button,
html[data-theme="dark"] .smart-direct-page .sd-upload-button,
html[data-theme="dark"] .smart-direct-page .sd-upload-progress,
html[data-theme="dark"] .smart-direct-page .sd-upload-empty,
html[data-theme="dark"] .smart-direct-page .sd-emoji-toggle,
html[data-theme="dark"] .smart-direct-page .sd-personalization-compact button,
html[data-theme="dark"] .smart-direct-page .sd-personalization-tags button,
html[data-theme="dark"] .smart-direct-page .sd-node-menu,
html[data-theme="dark"] .smart-direct-page .sd-node-menu button,
html[data-theme="dark"] .smart-direct-page .sd-carousel-card-editor{
  background:#211b22!important;color:var(--sd-text)!important;border-color:rgba(255,255,255,.11)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-flow-fields input,
html[data-theme="dark"] .smart-direct-page .sd-flow-fields textarea,
html[data-theme="dark"] .smart-direct-page .sd-node-editor input,
html[data-theme="dark"] .smart-direct-page .sd-node-editor textarea,
html[data-theme="dark"] .smart-direct-page .sd-node-editor select,
html[data-theme="dark"] .smart-direct-page .sd-header-max input{
  background:#151216!important;color:#f6eef6!important;border-color:rgba(255,255,255,.12)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-auto-layout-button{background:linear-gradient(135deg,rgba(14,165,233,.18),rgba(8,145,178,.12))!important;color:#b9edff!important;border-color:rgba(125,211,252,.26)!important}
html[data-theme="dark"] .smart-direct-page .sd-add-node-button{background:linear-gradient(135deg,rgba(124,58,237,.26),rgba(139,92,246,.16))!important;color:#f0e8ff!important;border-color:rgba(167,139,250,.28)!important}
html[data-theme="dark"] .smart-direct-page .sd-danger-action,
html[data-theme="dark"] .smart-direct-page .sd-mini-flow-card button.is-danger{background:rgba(190,18,60,.15)!important;color:#fda4af!important;border-color:rgba(253,164,175,.24)!important}
html[data-theme="dark"] .smart-direct-page .sd-node-menu button:hover,
html[data-theme="dark"] .smart-direct-page .sd-canvas-tools button:hover,
html[data-theme="dark"] .smart-direct-page .sd-inspector-window-actions button:hover,
html[data-theme="dark"] .smart-direct-page .sd-list-row button:hover,
html[data-theme="dark"] .smart-direct-page .sd-mini-button:hover,
html[data-theme="dark"] .smart-direct-page .sd-mini-flow-card button:hover{background:#302731!important}


/* MSM 1.0.492 — Dark-mode final white-control closure + mode-synced status icon/account badge. */
.smart-direct-page .sd-hero-control-icon{
  width:50px!important;height:50px!important;min-width:50px!important;
  display:grid!important;place-items:center!important;border-radius:15px!important;
  background:var(--sd-mode-accent)!important;color:#fff!important;
  font-size:27px!important;font-weight:950!important;line-height:1!important;
  text-shadow:0 1px 3px rgba(0,0,0,.25)!important;
  box-shadow:0 10px 24px color-mix(in srgb,var(--sd-mode-accent) 28%,transparent),inset 0 1px 0 rgba(255,255,255,.20)!important;
  transition:background-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.smart-direct-page #sdHeroAccount{
  width:max-content;max-width:100%;display:inline-flex!important;align-items:center!important;gap:6px!important;
  margin-top:7px!important;padding:6px 10px!important;border-radius:10px!important;
  border:1px solid color-mix(in srgb,var(--sd-mode-accent) 26%,transparent)!important;
  background:color-mix(in srgb,var(--sd-mode-accent) 9%,transparent)!important;
  color:var(--sd-text)!important;font-size:11px!important;line-height:1.25!important;
}
.smart-direct-page #sdHeroAccount .sd-active-account-caption{color:var(--sd-muted)!important;font-weight:700!important;font-size:10px!important}
.smart-direct-page #sdHeroAccount .sd-active-account-value{color:var(--sd-text)!important;font-weight:950!important;font-size:12px!important;direction:ltr;unicode-bidi:isolate}

html[data-theme="dark"] .smart-direct-page .sd-refresh{
  background:linear-gradient(135deg,color-mix(in srgb,var(--sd-mode-accent) 18%,#211b22),#1a161b)!important;
  color:#f7eef7!important;border-color:color-mix(in srgb,var(--sd-mode-accent) 32%,rgba(255,255,255,.10))!important;
  box-shadow:0 8px 22px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.045)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-refresh:hover{
  background:linear-gradient(135deg,color-mix(in srgb,var(--sd-mode-accent) 25%,#282029),#201a21)!important;
  border-color:color-mix(in srgb,var(--sd-mode-accent) 46%,rgba(255,255,255,.10))!important;
}
html[data-theme="dark"] .smart-direct-page .sd-selection-state{
  background:#211b22!important;color:#c9bec9!important;border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-selection-state.is-enabled{
  background:rgba(34,197,94,.13)!important;color:#7ee7a4!important;border-color:rgba(34,197,94,.26)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-hero-control-icon{
  background:var(--sd-mode-accent)!important;color:#fff!important;border:1px solid rgba(255,255,255,.13)!important;
}
html[data-theme="dark"] .smart-direct-page #sdHeroAccount{
  background:color-mix(in srgb,var(--sd-mode-accent) 11%,#171318)!important;
  border-color:color-mix(in srgb,var(--sd-mode-accent) 34%,rgba(255,255,255,.08))!important;
}
/* Explicitly beat legacy light declarations that are earlier in the same bundle. */
html[data-theme="dark"] .smart-direct-page .sd-toolbar .sd-refresh,
html[data-theme="dark"] .smart-direct-page .sd-selection-actions .sd-selection-state,
html[data-theme="dark"] .smart-direct-page .sd-hero .sd-hero-control .sd-hero-control-icon{
  -webkit-appearance:none!important;appearance:none!important;
}


/* MSM Site 1.0.542 — Like + Global Follow Gate + studio clarity */
.sd-studio-modal[hidden]{display:none!important;visibility:hidden!important;pointer-events:none!important;filter:none!important;backdrop-filter:none!important}
body:not(.sd-studio-open) .sd-studio-modal{filter:none!important;backdrop-filter:none!important}
body.sd-studio-open .sd-flow,body.sd-studio-open .sd-canvas-shell,body.sd-studio-open .sd-canvas-scroll{filter:none!important}
body.sd-studio-open .sd-inspector{
  background:var(--sd-surface)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html[data-theme="dark"] body.sd-studio-open .sd-inspector{background:#211b22!important}
.sd-like-editor{display:flex!important;align-items:center;gap:13px;padding:14px!important;border-color:rgba(244,63,94,.18)!important;background:linear-gradient(145deg,rgba(244,63,94,.07),var(--sd-surface))!important}
.sd-like-heart{width:52px;height:52px;flex:0 0 52px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(135deg,#fb7185,#e11d48);color:#fff;font-size:27px;line-height:1;box-shadow:0 12px 26px rgba(225,29,72,.20)}
.sd-like-editor b{display:block;font-size:14px}.sd-like-editor p{margin:5px 0 0;color:var(--sd-muted);font-size:12px;line-height:1.8}

.sd-global-follow-card{
  margin:0 0 14px;padding:16px;border:1px solid rgba(34,197,94,.20);border-radius:20px;
  background:radial-gradient(420px 180px at 100% 0,rgba(34,197,94,.10),transparent 70%),linear-gradient(145deg,var(--sd-card),var(--sd-surface-2));
  box-shadow:0 14px 34px rgba(31,41,55,.055);transition:.2s ease
}
.sd-global-follow-card.is-enabled{border-color:rgba(34,197,94,.38);box-shadow:0 16px 38px rgba(22,163,74,.08)}
.sd-global-follow-head{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:12px}
.sd-global-follow-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:linear-gradient(135deg,#4ade80,#16a34a);color:#fff;font-size:20px;font-weight:1000;box-shadow:0 10px 24px rgba(22,163,74,.17)}
.sd-global-follow-head small{display:block;color:#16a34a;font-size:10px;font-weight:950;letter-spacing:.08em}
.sd-global-follow-head h2{margin:3px 0 2px;font-size:17px}
.sd-global-follow-head p{margin:0;color:var(--sd-muted);font-size:12px;line-height:1.7}
.sd-global-follow-switch{display:flex;align-items:center;gap:8px;padding:7px 9px;border:1px solid var(--sd-line);border-radius:13px;background:var(--sd-surface);cursor:pointer}
.sd-global-follow-switch input{position:absolute;opacity:0;pointer-events:none}
.sd-global-follow-switch>span{position:relative;width:42px;height:24px;border-radius:999px;background:#d7dce2;transition:.18s}
.sd-global-follow-switch>span i{position:absolute;top:3px;right:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 2px 7px rgba(0,0,0,.18);transition:.18s}
.sd-global-follow-switch input:checked+span{background:linear-gradient(90deg,#22c55e,#16a34a)}
.sd-global-follow-switch input:checked+span i{right:21px}
.sd-global-follow-switch b{font-size:11px;white-space:nowrap}
.sd-global-follow-body{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:14px;padding-top:14px;border-top:1px dashed var(--sd-line)}
.sd-global-follow-body label{display:grid;gap:6px}
.sd-global-follow-body label>span{font-size:11px;font-weight:900}
.sd-global-follow-body textarea{width:100%;min-height:76px;resize:vertical;padding:10px;border:1px solid var(--sd-line);border-radius:12px;background:var(--sd-surface);color:var(--sd-text);font:inherit;font-size:12px;line-height:1.8;outline:0}
.sd-global-follow-body textarea:focus{border-color:rgba(34,197,94,.48);box-shadow:0 0 0 3px rgba(34,197,94,.08)}
.sd-global-follow-body small{color:var(--sd-muted);font-size:10px;line-height:1.65}
.sd-global-follow-card footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px}
.sd-global-follow-status{min-height:20px;color:var(--sd-muted);font-size:10.5px;font-weight:800;line-height:1.6}
.sd-global-follow-status.is-success{color:#15803d}.sd-global-follow-status.is-error{color:#dc2626}
#sdGlobalFollowSave{min-height:40px;padding:0 14px;border:0;border-radius:11px;background:linear-gradient(135deg,#22c55e,#15803d);color:#fff;font:inherit;font-size:11.5px;font-weight:950;box-shadow:0 9px 22px rgba(22,163,74,.14);cursor:pointer}
#sdGlobalFollowSave:disabled{opacity:.55;cursor:not-allowed}
html[data-theme="dark"] .sd-global-follow-card{background:radial-gradient(420px 180px at 100% 0,rgba(34,197,94,.11),transparent 70%),linear-gradient(145deg,#211b22,#191519)}
html[data-theme="dark"] .sd-global-follow-switch,html[data-theme="dark"] .sd-global-follow-body textarea{background:#211b22}

@media(max-width:800px){
  .sd-global-follow-card{padding:13px;border-radius:17px}
  .sd-global-follow-head{grid-template-columns:42px minmax(0,1fr);align-items:start}
  .sd-global-follow-icon{width:42px;height:42px;border-radius:13px}
  .sd-global-follow-switch{grid-column:1/-1;width:100%;justify-content:space-between}
  .sd-global-follow-body{grid-template-columns:1fr}
  .sd-global-follow-card footer{align-items:stretch;flex-direction:column}
  #sdGlobalFollowSave{width:100%;min-height:44px}
}


/* MSM Site 1.0.543 — Smart Direct layout/follow/clarity hotfix */
[data-ajax-page="smart-direct"]{
  min-width:0!important;
  max-width:100%!important;
  overflow-x:hidden!important;
}
.smart-direct-page,
.smart-direct-page>.sd-mode-panel,
.smart-direct-page .sd-global-follow-card,
.smart-direct-page .sd-dm-toolbar,
.smart-direct-page .sd-dm-flow-grid{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
.smart-direct-page{overflow-x:hidden!important;contain:inline-size}

.sd-global-follow-card:not(.is-enabled) .sd-global-follow-body{
  display:none!important;
}
.sd-global-follow-card .sd-global-follow-body{
  animation:sd543FollowOpen .18s ease-out;
}
@keyframes sd543FollowOpen{
  from{opacity:0;transform:translateY(-4px)}
  to{opacity:1;transform:translateY(0)}
}
.sd-global-follow-body textarea{
  font-family:inherit!important;
  font-size:12.5px!important;
  font-weight:500!important;
  line-height:1.8!important;
  letter-spacing:0!important;
}
.sd-global-follow-body label>span{font-weight:850!important}

.sd-flow{
  will-change:auto!important;
  backface-visibility:visible!important;
  -webkit-font-smoothing:auto!important;
  text-rendering:optimizeLegibility!important;
}
.sd-node,.sd-node *{
  -webkit-font-smoothing:auto!important;
  text-rendering:optimizeLegibility!important;
}
body.sd-studio-open .sd-flow{filter:none!important}

@media(max-width:800px){
  .smart-direct-page{overflow-x:hidden!important}
  .sd-global-follow-card{overflow:hidden}
  .sd-global-follow-body textarea{
    font-size:12px!important;
    font-weight:500!important;
    line-height:1.75!important;
    min-height:72px!important;
  }
  .sd-global-follow-body label>span{font-size:11px!important;font-weight:800!important}
  .sd-global-follow-body small{font-size:9.5px!important;line-height:1.55!important}
}


/* MSM Site 1.0.544 — Follow Gate template editor */
.sd-follow-template-summary{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(220px,.8fr) auto;gap:14px;align-items:center;width:100%;padding:12px;border:1px solid var(--sd-line);border-radius:16px;background:var(--sd-surface)}
.sd-follow-template-mini-flow{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;overflow:hidden}
.sd-follow-template-mini-flow>span{min-width:0;display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid rgba(139,92,246,.16);border-radius:11px;background:var(--sd-card)}
.sd-follow-template-mini-flow i{width:26px;height:26px;display:grid;place-items:center;flex:0 0 26px;border-radius:8px;background:var(--sd-purple-soft);color:var(--sd-purple);font-style:normal;font-size:12px}
.sd-follow-template-mini-flow b{font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sd-follow-template-mini-flow em{color:var(--sd-muted);font-style:normal}
.sd-follow-template-summary-copy b{display:block;font-size:12.5px}.sd-follow-template-summary-copy p{margin:3px 0;color:var(--sd-muted);font-size:10.5px;line-height:1.65}.sd-follow-template-summary-copy small{display:block;color:#15803d;font-size:9.5px;line-height:1.55}
#sdGlobalFollowTemplateEdit{min-height:40px;padding:0 12px;border:1px solid rgba(139,92,246,.24);border-radius:11px;background:linear-gradient(135deg,rgba(139,92,246,.11),rgba(249,115,22,.07));color:var(--sd-text);font:inherit;font-size:11px;font-weight:900;white-space:nowrap;cursor:pointer}

.sd-follow-template-modal{position:fixed;inset:0;z-index:2147483200;display:grid;place-items:center;padding:16px;background:rgba(8,6,9,.64);backdrop-filter:blur(7px)}
.sd-follow-template-modal[hidden]{display:none!important}
body.sd-follow-template-open{overflow:hidden!important}
.sd-follow-template-window{width:min(1120px,calc(100vw - 28px));height:min(720px,calc(100dvh - 28px));display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--sd-line);border-radius:23px;background:var(--sd-bg);box-shadow:0 34px 110px rgba(0,0,0,.32)}
.sd-follow-template-window>header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border-bottom:1px solid var(--sd-line);background:var(--sd-surface)}
.sd-follow-template-window>header small{color:var(--sd-green);font-size:9.5px;font-weight:950;letter-spacing:.08em}.sd-follow-template-window>header h2{margin:2px 0;font-size:17px}.sd-follow-template-window>header p{margin:0;color:var(--sd-muted);font-size:10.5px}
#sdFollowTemplateClose{width:38px;height:38px;flex:0 0 38px;border:1px solid var(--sd-line);border-radius:11px;background:var(--sd-card);color:var(--sd-text);font-size:22px;cursor:pointer}
.sd-follow-template-layout{display:grid;grid-template-columns:minmax(0,1fr) 370px;min-height:0;flex:1}
.sd-follow-template-canvas{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:65px;padding:28px;background-color:#18141a;background-image:radial-gradient(rgba(255,255,255,.10) 1px,transparent 1px);background-size:22px 22px;direction:rtl}
.sd-follow-flow-line{position:absolute;left:18%;right:18%;top:50%;height:2px;background:linear-gradient(90deg,#8b5cf6,#22c55e,#f97316);opacity:.55}
.sd-follow-flow-node{position:relative;z-index:2;width:190px;min-height:112px;padding:12px;display:flex;align-items:flex-start;gap:9px;border:1px solid rgba(255,255,255,.13);border-radius:17px;background:#241e26;color:#f7f2f7;box-shadow:0 15px 35px rgba(0,0,0,.24)}
.sd-follow-flow-node>i{width:36px;height:36px;display:grid;place-items:center;flex:0 0 36px;border-radius:11px;background:rgba(139,92,246,.18);color:#c4b5fd;font-style:normal}.sd-follow-flow-node small{display:block;color:#a99ca8;font-size:8.5px;font-weight:900}.sd-follow-flow-node b{display:block;margin-top:2px;font-size:11.5px}.sd-follow-flow-node span{display:block;margin-top:7px;color:#c8bec7;font-size:9.5px;line-height:1.55;max-height:44px;overflow:hidden}
.sd-follow-flow-node.is-card{border-color:rgba(249,115,22,.38)}.sd-follow-flow-node.is-card>i{background:rgba(249,115,22,.16);color:#fb923c}.sd-follow-flow-node.is-check{border-color:rgba(34,197,94,.34)}.sd-follow-flow-node.is-check>i{background:rgba(34,197,94,.15);color:#4ade80}
.sd-follow-template-inspector{overflow:auto;padding:14px;border-inline-start:1px solid var(--sd-line);background:var(--sd-surface)}
.sd-follow-template-inspector label{display:grid;gap:5px;margin-bottom:10px}.sd-follow-template-inspector label>span{font-size:10.5px;font-weight:900;color:var(--sd-muted)}
.sd-follow-template-limit{margin:0 0 12px;padding:10px 11px;border:1px solid rgba(34,197,94,.18);border-radius:12px;background:rgba(34,197,94,.055)}
.sd-follow-template-limit label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 5px}
.sd-follow-template-limit label>span{color:var(--sd-text);font-size:10.5px;font-weight:950}
.sd-follow-template-limit input{width:82px!important;min-height:36px!important;flex:0 0 82px;text-align:center;font-weight:950!important}
.sd-follow-template-limit small{display:block;color:var(--sd-muted);font-size:9.5px;line-height:1.65}
.sd-follow-template-inspector input,.sd-follow-template-inspector textarea{width:100%;padding:9px 10px;border:1px solid var(--sd-line);border-radius:11px;background:var(--sd-card);color:var(--sd-text);outline:0;font:inherit;font-size:11.5px;font-weight:500;line-height:1.75;resize:vertical}
.sd-follow-template-inspector input:focus,.sd-follow-template-inspector textarea:focus{border-color:rgba(139,92,246,.44);box-shadow:0 0 0 3px rgba(139,92,246,.07)}
.sd-follow-template-two{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sd-follow-personalization{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:4px 0 10px;padding:8px;border:1px dashed rgba(139,92,246,.22);border-radius:11px}.sd-follow-personalization>span{width:100%;font-size:9.5px;font-weight:900;color:var(--sd-muted)}.sd-follow-personalization button{min-height:29px;padding:3px 7px;border:1px solid rgba(139,92,246,.20);border-radius:8px;background:rgba(139,92,246,.08);color:var(--sd-purple);font:inherit;font-size:9.5px;font-weight:850;cursor:pointer}
.sd-follow-template-note{padding:9px 10px;border:1px solid rgba(34,197,94,.16);border-radius:11px;background:rgba(34,197,94,.06);color:#15803d;font-size:9.5px;line-height:1.65}
.sd-follow-template-save{width:100%;min-height:43px;margin-top:11px;border:0;border-radius:12px;background:linear-gradient(135deg,#22c55e,#15803d);color:#fff;font:inherit;font-size:11.5px;font-weight:950;cursor:pointer;box-shadow:0 10px 24px rgba(22,163,74,.14)}
html[data-theme="dark"] .sd-follow-template-window,html[data-theme="dark"] .sd-follow-template-inspector{background:#191519}html[data-theme="dark"] .sd-follow-template-window>header,html[data-theme="dark"] .sd-follow-template-summary{background:#211b22}

@media(max-width:900px){.sd-follow-template-summary{grid-template-columns:1fr auto}.sd-follow-template-mini-flow{grid-column:1/-1}.sd-follow-template-layout{grid-template-columns:1fr 330px}.sd-follow-template-canvas{gap:24px}.sd-follow-flow-node{width:160px}}
@media(max-width:700px){
  .sd-follow-template-summary{grid-template-columns:1fr}.sd-follow-template-mini-flow{justify-content:flex-start;overflow:auto;padding-bottom:2px}.sd-follow-template-mini-flow>span{flex:0 0 auto}.sd-follow-template-summary #sdGlobalFollowTemplateEdit{width:100%}
  .sd-follow-template-modal{padding:0;align-items:end}.sd-follow-template-window{width:100%;height:min(92dvh,760px);border-radius:22px 22px 0 0}.sd-follow-template-window>header{padding:12px}.sd-follow-template-window>header p{display:none}
  .sd-follow-template-layout{display:flex;flex-direction:column;overflow:auto}.sd-follow-template-canvas{flex:0 0 220px;min-height:220px;gap:15px;padding:14px;overflow-x:auto;justify-content:flex-start}.sd-follow-flow-line{display:none}.sd-follow-flow-node{flex:0 0 145px;width:145px;min-height:104px}
  .sd-follow-template-inspector{overflow:visible;border-inline-start:0;border-top:1px solid var(--sd-line);padding:12px}.sd-follow-template-two{grid-template-columns:1fr}.sd-follow-template-inspector input,.sd-follow-template-inspector textarea{font-size:11px!important;font-weight:500!important}
}


/* MSM Site 1.0.544 — Follow Gate template light-theme polish */
html[data-theme="light"] .sd-follow-template-modal{
  background:rgba(34,28,32,.28)!important;
}
html[data-theme="light"] .sd-follow-template-window{
  background:#ffffff!important;
  color:#241f23!important;
  border-color:#e8e1e6!important;
  box-shadow:0 32px 90px rgba(66,45,57,.16)!important;
}
html[data-theme="light"] .sd-follow-template-window>header{
  background:linear-gradient(180deg,#ffffff,#fbf8fa)!important;
  border-bottom-color:#ece5ea!important;
}
html[data-theme="light"] .sd-follow-template-window>header h2{color:#241f23!important}
html[data-theme="light"] .sd-follow-template-window>header p{color:#7e727a!important}
html[data-theme="light"] #sdFollowTemplateClose{
  background:#fff!important;
  color:#40363d!important;
  border-color:#e7dfe5!important;
}
html[data-theme="light"] .sd-follow-template-canvas{
  background-color:#f8f6f9!important;
  background-image:radial-gradient(rgba(112,95,107,.15) 1px,transparent 1px)!important;
}
html[data-theme="light"] .sd-follow-flow-node{
  background:#ffffff!important;
  color:#251f23!important;
  border-color:#e6dfe4!important;
  box-shadow:0 13px 30px rgba(61,42,53,.10)!important;
}
html[data-theme="light"] .sd-follow-flow-node small{color:#92858e!important}
html[data-theme="light"] .sd-follow-flow-node span{color:#746a71!important}
html[data-theme="light"] .sd-follow-flow-node>i{
  background:#f2ecff!important;
  color:#7c3aed!important;
}
html[data-theme="light"] .sd-follow-flow-node.is-card{
  border-color:rgba(249,115,22,.34)!important;
  background:linear-gradient(145deg,#fff,#fffaf6)!important;
}
html[data-theme="light"] .sd-follow-flow-node.is-card>i{
  background:#fff1e7!important;
  color:#ea580c!important;
}
html[data-theme="light"] .sd-follow-flow-node.is-check{
  border-color:rgba(34,197,94,.30)!important;
  background:linear-gradient(145deg,#fff,#f7fff9)!important;
}
html[data-theme="light"] .sd-follow-flow-node.is-check>i{
  background:#eafbf0!important;
  color:#16a34a!important;
}
html[data-theme="light"] .sd-follow-template-inspector{
  background:#ffffff!important;
  color:#241f23!important;
  border-color:#ece5ea!important;
}
html[data-theme="light"] .sd-follow-template-inspector label>span,
html[data-theme="light"] .sd-follow-personalization>span{color:#6f646b!important}
html[data-theme="light"] .sd-follow-template-inspector input,
html[data-theme="light"] .sd-follow-template-inspector textarea{
  background:#fbfafb!important;
  color:#241f23!important;
  border-color:#e4dce2!important;
}
html[data-theme="light"] .sd-follow-template-inspector input:focus,
html[data-theme="light"] .sd-follow-template-inspector textarea:focus{
  background:#fff!important;
  border-color:rgba(139,92,246,.48)!important;
}
html[data-theme="light"] .sd-follow-personalization{
  background:#fbf8ff!important;
  border-color:rgba(139,92,246,.20)!important;
}
html[data-theme="light"] .sd-follow-personalization button{
  background:#f2ecff!important;
  color:#6d28d9!important;
  border-color:#ddd0ff!important;
}
html[data-theme="light"] .sd-follow-template-note{
  background:#f2fff6!important;
  color:#15803d!important;
  border-color:#ccefd7!important;
}


/* MSM Site 1.0.544 — Follow Gate output preview */
.sd-follow-template-canvas{
  display:grid!important;
  place-items:center!important;
  padding:24px!important;
  overflow:auto!important;
}
.sd-follow-output-preview{
  width:min(430px,100%);
  border:1px solid rgba(255,255,255,.10);
  border-radius:26px;
  overflow:hidden;
  background:#111015;
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}
.sd-follow-output-top{
  display:flex;align-items:center;gap:10px;
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:#18151b;
  color:#f8f4f7;
}
.sd-follow-output-avatar{
  width:38px;height:38px;display:grid;place-items:center;flex:0 0 38px;
  border-radius:50%;
  background:linear-gradient(135deg,#f97316,#8b5cf6);
  color:#fff;font-weight:1000;
}
.sd-follow-output-top b{display:block;font-size:12px}
.sd-follow-output-top small{display:block;margin-top:2px;color:#a89da5;font-size:9.5px}
.sd-follow-output-chat{
  padding:18px;
  background:
    radial-gradient(circle at 15% 15%,rgba(139,92,246,.10),transparent 28%),
    radial-gradient(circle at 85% 85%,rgba(249,115,22,.08),transparent 30%),
    #0f0d11;
}
.sd-follow-output-card{
  margin-inline-start:auto;
  width:min(330px,92%);
  border:1px solid rgba(255,255,255,.10);
  border-radius:20px 20px 7px 20px;
  background:#211c22;
  color:#f9f5f8;
  overflow:hidden;
  box-shadow:0 14px 30px rgba(0,0,0,.20);
}
.sd-follow-output-card>header{
  display:flex;align-items:center;gap:9px;
  padding:12px 13px 8px;
}
.sd-follow-output-card>header>span{
  width:32px;height:32px;display:grid;place-items:center;flex:0 0 32px;
  border-radius:10px;background:rgba(34,197,94,.16);color:#4ade80;font-weight:1000
}
.sd-follow-output-card>header small{
  display:block;color:#8f828b;font-size:8px;font-weight:950;letter-spacing:.07em
}
.sd-follow-output-card>header b{
  display:block;margin-top:2px;font-size:12.5px;line-height:1.45
}
.sd-follow-output-card>p{
  margin:0;padding:0 13px 12px;color:#d5cdd2;
  font-size:11.5px;font-weight:500;line-height:1.85;white-space:pre-wrap
}
.sd-follow-output-buttons{
  display:grid;
  border-top:1px solid rgba(255,255,255,.08)
}
.sd-follow-output-buttons button{
  min-height:43px;border:0;border-bottom:1px solid rgba(255,255,255,.08);
  background:transparent;color:#a78bfa;
  font:inherit;font-size:11.5px;font-weight:900;cursor:default
}
.sd-follow-output-buttons button:last-child{border-bottom:0}
.sd-follow-output-buttons button.is-check{color:#4ade80}
.sd-follow-output-after{
  width:min(280px,84%);
  margin:13px 0 0 auto;
  display:flex;align-items:center;gap:7px;
  padding:8px 10px;border-radius:12px;
  background:rgba(34,197,94,.08);
  color:#86efac;
}
.sd-follow-output-after span{font-size:15px}
.sd-follow-output-after small{font-size:9.5px;line-height:1.6}

html[data-theme="light"] .sd-follow-output-preview{
  border-color:#e6dfe4!important;
  background:#fff!important;
  box-shadow:0 24px 60px rgba(66,45,57,.12)!important;
}
html[data-theme="light"] .sd-follow-output-top{
  background:#fff!important;
  color:#251f23!important;
  border-bottom-color:#eee7eb!important;
}
html[data-theme="light"] .sd-follow-output-top small{color:#8a7e86!important}
html[data-theme="light"] .sd-follow-output-chat{
  background:
    radial-gradient(circle at 15% 15%,rgba(139,92,246,.06),transparent 28%),
    radial-gradient(circle at 85% 85%,rgba(249,115,22,.06),transparent 30%),
    #f7f5f7!important;
}
html[data-theme="light"] .sd-follow-output-card{
  background:#fff!important;
  color:#241f23!important;
  border-color:#e6dfe4!important;
  box-shadow:0 13px 28px rgba(61,42,53,.09)!important;
}
html[data-theme="light"] .sd-follow-output-card>header small{color:#948891!important}
html[data-theme="light"] .sd-follow-output-card>p{color:#665c63!important}
html[data-theme="light"] .sd-follow-output-buttons{border-top-color:#ece5e9!important}
html[data-theme="light"] .sd-follow-output-buttons button{
  border-bottom-color:#ece5e9!important;
  color:#7c3aed!important;
}
html[data-theme="light"] .sd-follow-output-buttons button.is-check{color:#16a34a!important}
html[data-theme="light"] .sd-follow-output-after{
  background:#effcf3!important;color:#15803d!important
}
@media(max-width:700px){
  .sd-follow-template-canvas{padding:12px!important}
  .sd-follow-output-preview{width:100%;border-radius:20px}
  .sd-follow-output-chat{padding:12px}
  .sd-follow-output-card{width:94%}
}


/* MSM Site 1.0.545 — Follow box containment and route overflow fix */
[data-ajax-page="smart-direct"],
[data-ajax-page="smart-direct"] #smartDirectPage{
  min-width:0!important;
  max-width:100%!important;
  overflow-x:clip!important;
}
[data-ajax-page="smart-direct"] .sd-mode-panel,
[data-ajax-page="smart-direct"] .sd-global-follow-card,
[data-ajax-page="smart-direct"] .sd-global-follow-body,
[data-ajax-page="smart-direct"] .sd-follow-template-summary,
[data-ajax-page="smart-direct"] .sd-dm-toolbar,
[data-ajax-page="smart-direct"] .sd-dm-flow-grid{
  min-width:0!important;
  max-width:100%!important;
}
.sd-global-follow-body{
  grid-template-columns:minmax(0,1fr)!important;
}
.sd-global-follow-body>footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
  min-width:0;
  margin-top:2px;
  padding-top:12px;
  border-top:1px dashed var(--sd-line);
}
.sd-global-follow-card:not(.is-enabled) .sd-global-follow-body{
  display:none!important;
}
@media(max-width:800px){
  [data-ajax-page="smart-direct"]{overflow-x:hidden!important}
  .sd-global-follow-body>footer{align-items:stretch;flex-direction:column}
  .sd-global-follow-body>footer #sdGlobalFollowSave{width:100%}
}


/* MSM Site 1.0.553 — Smart Direct light-theme studio contrast closure */
html[data-theme="light"] .smart-direct-page .sd-studio-modal{
  background:#fbf8f5!important;color:#2d2730!important;
}
html[data-theme="light"] .smart-direct-page .sd-studio-header{
  background:linear-gradient(180deg,#fffdfb,#faf5f1)!important;
  color:#2d2730!important;border-bottom-color:#e5ddd7!important;
  box-shadow:0 5px 18px rgba(74,50,38,.045)!important;
}
html[data-theme="light"] .smart-direct-page .sd-studio-heading small{color:#7c3aed!important}
html[data-theme="light"] .smart-direct-page .sd-studio-heading h2{color:#2d2730!important}
html[data-theme="light"] .smart-direct-page .sd-studio-heading p{color:#756d75!important}
html[data-theme="light"] .smart-direct-page .sd-studio-close,
html[data-theme="light"] .smart-direct-page .sd-header-max,
html[data-theme="light"] .smart-direct-page .sd-master-switch{
  background:#fff!important;color:#332d34!important;border-color:#e5dde3!important;
  box-shadow:0 5px 14px rgba(64,44,55,.055)!important;
}
html[data-theme="light"] .smart-direct-page .sd-header-max>span,
html[data-theme="light"] .smart-direct-page .sd-master-switch>b{color:#4c444c!important}
html[data-theme="light"] .smart-direct-page .sd-header-max input{
  background:#f8f4f7!important;color:#29232a!important;border-color:#ddd4db!important;
}
html[data-theme="light"] .smart-direct-page .sd-studio-save{
  background:linear-gradient(135deg,#f97316,#8b5cf6)!important;color:#fff!important;
  border:0!important;box-shadow:0 9px 22px rgba(139,80,39,.20)!important;opacity:1!important;
}
html[data-theme="light"] .smart-direct-page .sd-studio-save span,
html[data-theme="light"] .smart-direct-page .sd-studio-save i{color:#fff!important}
html[data-theme="light"] .smart-direct-page .sd-studio-toolbar{
  background:#fffdfb!important;color:#302a31!important;border-bottom-color:#e7dfda!important;
  box-shadow:0 4px 14px rgba(70,48,36,.035)!important;
}
html[data-theme="light"] .smart-direct-page .sd-flow-context b{color:#302a31!important}
html[data-theme="light"] .smart-direct-page .sd-flow-context small{color:#756d75!important}
html[data-theme="light"] .smart-direct-page .sd-auto-layout-button{
  background:linear-gradient(135deg,#edf8ff,#f4fbff)!important;color:#0369a1!important;
  border-color:#bae6fd!important;box-shadow:none!important;
}
html[data-theme="light"] .smart-direct-page .sd-add-node-button{
  background:linear-gradient(135deg,#f5efff,#fbf8ff)!important;color:#6d3bc1!important;
  border-color:#ddd0fb!important;box-shadow:none!important;
}
html[data-theme="light"] .smart-direct-page .sd-canvas-tools{
  background:#f7f2ee!important;border-color:#e3dbd5!important;color:#504850!important;
}
html[data-theme="light"] .smart-direct-page .sd-canvas-tools button,
html[data-theme="light"] .smart-direct-page .sd-canvas-tools span{color:#504850!important}
html[data-theme="light"] .smart-direct-page .sd-canvas-tools button:hover{background:#fff!important}
html[data-theme="light"] .smart-direct-page .sd-inspector{
  background:rgba(255,252,249,.985)!important;color:#2d2730!important;
  border-color:#dfd6dc!important;box-shadow:0 20px 52px rgba(62,42,53,.13)!important;
}
html[data-theme="light"] .smart-direct-page .sd-inspector-head{
  background:linear-gradient(180deg,#fff,#fbf8fa)!important;
  border:1px solid #eee6eb!important;border-radius:13px!important;
  padding:9px 42px 9px 9px!important;margin-bottom:10px!important;
}
html[data-theme="light"] .smart-direct-page .sd-inspector-head>span{
  background:linear-gradient(145deg,#f1ebff,#fff0e5)!important;color:#7c3aed!important;
}
html[data-theme="light"] .smart-direct-page .sd-inspector-heading-copy small{color:#7c3aed!important}
html[data-theme="light"] .smart-direct-page .sd-inspector-heading-copy h3{color:#2d2730!important}
html[data-theme="light"] .smart-direct-page .sd-inspector-heading-copy p{color:#756d75!important}
html[data-theme="light"] .smart-direct-page .sd-inspector-window-actions button{
  background:#fff!important;color:#5f5660!important;border-color:#e1d8df!important;
  box-shadow:0 3px 9px rgba(68,47,59,.06)!important;
}
html[data-theme="light"] .smart-direct-page .sd-flow-fields,
html[data-theme="light"] .smart-direct-page .sd-editor-card{
  background:#fff!important;color:#2d2730!important;border-color:#e6dde4!important;
}
html[data-theme="light"] .smart-direct-page .sd-flow-fields label>span,
html[data-theme="light"] .smart-direct-page .sd-node-editor label>span,
html[data-theme="light"] .smart-direct-page .sd-field-title{color:#51494e!important}
html[data-theme="light"] .smart-direct-page .sd-flow-fields input,
html[data-theme="light"] .smart-direct-page .sd-flow-fields textarea,
html[data-theme="light"] .smart-direct-page .sd-node-editor input,
html[data-theme="light"] .smart-direct-page .sd-node-editor textarea,
html[data-theme="light"] .smart-direct-page .sd-node-editor select{
  background:#fffdfb!important;color:#2d2730!important;border-color:#ded5dc!important;
}
html[data-theme="light"] .smart-direct-page .sd-inspector-actions{
  background:linear-gradient(transparent,#fffaf7 26%)!important;
}

/* MSM Site 1.0.566 — native Follow dialog + isolated Follow Gate card */

/* Smart Direct owns only its own route box. Never mutate app-shell geometry. */
[data-ajax-page="smart-direct"],
[data-ajax-page="smart-direct"]>#smartDirectPage{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  overflow-x:clip!important;
}
#smartDirectPage .sd-mode-panel{
  min-width:0!important;
  max-width:100%!important;
}

/* Structural containment: Follow Gate can never enlarge or shift the page. */
.sd-follow-gate-slot{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:clip!important;
  contain:layout inline-size paint!important;
  box-sizing:border-box!important;
}
.sd-follow-gate-slot>#sdGlobalFollowCard{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  box-sizing:border-box!important;
  overflow:clip!important;
}
#sdGlobalFollowCard .sd-global-follow-head,
#sdGlobalFollowCard .sd-global-follow-body,
#sdGlobalFollowCard .sd-follow-template-summary,
#sdGlobalFollowCard .sd-follow-template-summary-copy{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
#sdGlobalFollowCard .sd-follow-template-summary{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
}
#sdGlobalFollowCard .sd-follow-template-summary-copy{
  flex:1 1 320px!important;
}
#sdGlobalFollowCard #sdGlobalFollowTemplateEdit{
  flex:0 0 auto!important;
  max-width:100%!important;
  white-space:normal!important;
}

/* Dark DM chips */
html[data-theme="dark"] .smart-direct-page .sd-keyword-chips span,
html[data-theme="dark"] .smart-direct-page .sd-keyword-chips b{
  background:#2a242b!important;
  color:#e8dfe6!important;
  border:1px solid rgba(255,255,255,.09)!important;
  box-shadow:none!important;
}

/* Native dialog: browser Top Layer owns centering and page isolation. */
#sdFollowTemplateModal{
  border:0!important;
  padding:0!important;
  background:transparent!important;
  color:var(--sd-text)!important;
  width:min(92vw,1120px)!important;
  max-width:1120px!important;
  height:auto!important;
  max-height:88dvh!important;
  margin:0!important;
  overflow:visible!important;
  direction:rtl!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
#sdFollowTemplateModal[open]{
  position:fixed!important;
  inset:auto!important;
  top:50%!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  transform:translate(-50%,-50%)!important;
  display:block!important;
  place-items:initial!important;
}
#sdFollowTemplateModal:not([open]){
  display:none!important;
}
#sdFollowTemplateModal::backdrop{
  background:rgba(8,6,9,.72);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
#sdFollowTemplateModal>.sd-follow-template-window{
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  max-height:88dvh!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#sdFollowTemplateModal .sd-follow-template-layout{
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
}
#sdFollowTemplateModal .sd-follow-template-canvas,
#sdFollowTemplateModal .sd-follow-template-inspector{
  min-width:0!important;
  max-width:100%!important;
}
#sdFollowTemplateModal .sd-follow-template-footer{
  padding:10px 12px 12px!important;
  border-top:1px solid var(--sd-line)!important;
  background:var(--sd-surface)!important;
}
#sdFollowTemplateModal .sd-follow-template-footer #sdFollowTemplateSave{
  position:static!important;
  width:100%!important;
  min-height:44px!important;
  margin:0!important;
}

/* Studio remains separately portalled; keep its giant virtual canvas contained. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]){
  overflow:hidden!important;
  contain:layout paint style!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-grid,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-canvas-shell{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-canvas-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
}

@media(max-width:800px){
  /* Follow Gate card: simple one-column mobile contract. */
  .sd-follow-gate-slot{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  #sdGlobalFollowCard{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:12px!important;
    border-radius:17px!important;
  }
  #sdGlobalFollowCard .sd-global-follow-head{
    display:grid!important;
    grid-template-columns:40px minmax(0,1fr)!important;
    align-items:start!important;
    gap:10px!important;
    width:100%!important;
  }
  #sdGlobalFollowCard .sd-global-follow-icon{
    width:40px!important;
    height:40px!important;
    margin:0!important;
  }
  #sdGlobalFollowCard .sd-global-follow-head>div{
    min-width:0!important;
    max-width:100%!important;
  }
  #sdGlobalFollowCard .sd-global-follow-head h2,
  #sdGlobalFollowCard .sd-global-follow-head p{
    max-width:100%!important;
    overflow-wrap:anywhere!important;
  }
  #sdGlobalFollowCard .sd-global-follow-switch{
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    justify-content:space-between!important;
  }
  #sdGlobalFollowCard .sd-global-follow-body{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  #sdGlobalFollowCard:not(.is-enabled) .sd-global-follow-body{
    display:none!important;
  }
  #sdGlobalFollowCard .sd-follow-template-summary{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    width:100%!important;
  }
  #sdGlobalFollowCard .sd-follow-template-summary-copy{
    width:100%!important;
    flex:0 1 auto!important;
  }
  #sdGlobalFollowCard #sdGlobalFollowTemplateEdit{
    width:100%!important;
  }

  /* Native mobile dialog: fluid, centered, no fixed pixel sizing. */
  #sdFollowTemplateModal{
    width:min(90vw,420px)!important;
    max-width:90vw!important;
    max-height:84dvh!important;
    margin:auto!important;
  }
  #sdFollowTemplateModal>.sd-follow-template-window{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    max-height:84dvh!important;
    min-height:0!important;
    border-radius:18px!important;
    overflow:hidden!important;
  }
  #sdFollowTemplateModal .sd-follow-template-window>header{
    padding:10px 12px!important;
  }
  #sdFollowTemplateModal .sd-follow-template-window>header p{
    display:none!important;
  }

  /* One scrollable body: preview + editor. Footer stays fixed. */
  #sdFollowTemplateModal .sd-follow-template-layout{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
  }
  #sdFollowTemplateModal .sd-follow-template-canvas{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:0!important;
    padding:9px!important;
    overflow:visible!important;
  }
  #sdFollowTemplateModal .sd-follow-output-preview{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    max-height:none!important;
    margin:0!important;
    border-radius:16px!important;
    overflow:hidden!important;
  }
  #sdFollowTemplateModal .sd-follow-output-chat{
    padding:8px!important;
  }
  #sdFollowTemplateModal .sd-follow-output-card{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  #sdFollowTemplateModal .sd-follow-output-card>p{
    max-height:none!important;
    overflow:visible!important;
  }
  #sdFollowTemplateModal .sd-follow-output-buttons{
    display:grid!important;
  }
  #sdFollowTemplateModal .sd-follow-output-after{
    display:flex!important;
  }

  #sdFollowTemplateModal .sd-follow-template-inspector{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:10px 11px 14px!important;
    border-inline-start:0!important;
    border-top:1px solid var(--sd-line)!important;
    overflow:visible!important;
  }
  #sdFollowTemplateModal .sd-follow-template-inspector>*,
  #sdFollowTemplateModal .sd-follow-template-inspector label,
  #sdFollowTemplateModal .sd-follow-template-inspector input,
  #sdFollowTemplateModal .sd-follow-template-inspector textarea,
  #sdFollowTemplateModal .sd-follow-template-inspector button{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  #sdFollowTemplateModal .sd-follow-template-two{
    grid-template-columns:minmax(0,1fr)!important;
  }
  #sdFollowTemplateModal .sd-follow-template-limit label{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 72px!important;
    align-items:center!important;
    gap:8px!important;
  }
  #sdFollowTemplateModal .sd-follow-template-limit input{
    width:72px!important;
  }
}


/* MSM Site 1.0.567 — Flow inspector rebuild for desktop + mobile */

/* Desktop/tablet: keep the Inspector frame fixed; only long node content may scroll. */
@media(min-width:801px){
  .sd-inspector{
    display:flex!important;
    flex-direction:column!important;
    min-height:0!important;
    height:100%!important;
    max-height:100%!important;
    overflow:hidden!important;
    padding:14px!important;
  }
  .sd-inspector-head{
    flex:0 0 auto!important;
  }
  .sd-flow-fields{
    flex:0 0 auto!important;
  }
  .sd-node-editor{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    padding-inline-end:2px!important;
    scrollbar-width:none!important;
  }
  .sd-node-editor::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }
  .sd-feedback{
    flex:0 0 auto!important;
  }
  .sd-inspector-actions{
    flex:0 0 auto!important;
    position:static!important;
    bottom:auto!important;
    margin-top:8px!important;
    padding-top:10px!important;
  }
}

/* Dark theme: no white cards/fields inside the Flow inspector. */
html[data-theme="dark"] .sd-inspector{
  background:#181419!important;
  color:#f3edf2!important;
  border-color:rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] .sd-inspector-head{
  border-color:rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] .sd-inspector-head h3,
html[data-theme="dark"] .sd-flow-fields label>span,
html[data-theme="dark"] .sd-node-editor label>span,
html[data-theme="dark"] .sd-field-title{
  color:#f3edf2!important;
}
html[data-theme="dark"] .sd-inspector-head p,
html[data-theme="dark"] .sd-editor-note,
html[data-theme="dark"] .sd-feedback{
  color:#b7acb4!important;
}
html[data-theme="dark"] .sd-flow-fields,
html[data-theme="dark"] .sd-editor-card,
html[data-theme="dark"] .sd-carousel-card-editor{
  background:#211b22!important;
  color:#f3edf2!important;
  border-color:rgba(255,255,255,.09)!important;
}
html[data-theme="dark"] .sd-editor-note{
  background:#1d181e!important;
  border-color:rgba(167,139,250,.20)!important;
}
html[data-theme="dark"] .sd-flow-fields input,
html[data-theme="dark"] .sd-flow-fields textarea,
html[data-theme="dark"] .sd-node-editor input,
html[data-theme="dark"] .sd-node-editor textarea,
html[data-theme="dark"] .sd-node-editor select{
  background:#151216!important;
  color:#f8f3f7!important;
  border-color:rgba(255,255,255,.11)!important;
}
html[data-theme="dark"] .sd-list-row button,
html[data-theme="dark"] .sd-mini-button{
  background:#282129!important;
  color:#eee6ec!important;
  border-color:rgba(255,255,255,.09)!important;
}
html[data-theme="dark"] .sd-inspector-actions{
  background:#181419!important;
}

/* Mobile: bigger, cleaner bottom Inspector with fixed header/actions. */
@media(max-width:800px){
  .sd-studio-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:minmax(180px,1fr) minmax(250px,42dvh)!important;
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    gap:7px!important;
    overflow:hidden!important;
    padding:6px!important;
  }
  .sd-canvas-shell{
    order:initial!important;
    grid-row:1!important;
    min-height:180px!important;
    height:auto!important;
    max-height:none!important;
  }
  .sd-inspector{
    order:initial!important;
    grid-row:2!important;
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:250px!important;
    height:auto!important;
    max-height:none!important;
    margin:0!important;
    padding:0 11px 0!important;
    overflow:hidden!important;
    border:1px solid var(--sd-line)!important;
    border-radius:18px 18px 14px 14px!important;
    box-shadow:0 -10px 28px rgba(0,0,0,.08)!important;
    background:var(--sd-surface)!important;
  }
  html[data-theme="dark"] .sd-inspector{
    background:#181419!important;
  }
  .sd-inspector::before{
    content:"";
    display:block!important;
    flex:0 0 auto!important;
    width:42px!important;
    height:4px!important;
    margin:7px auto 3px!important;
    border-radius:999px!important;
    background:color-mix(in srgb,var(--sd-muted) 35%,transparent)!important;
  }
  .sd-inspector-head{
    position:static!important;
    flex:0 0 auto!important;
    margin:0 -2px 8px!important;
    padding:7px 2px 10px!important;
    min-height:58px!important;
    align-items:center!important;
    cursor:default!important;
    background:var(--sd-surface)!important;
    border-bottom:1px solid var(--sd-line)!important;
  }
  html[data-theme="dark"] .sd-inspector-head{
    background:#181419!important;
  }
  .sd-inspector-head>span{
    width:43px!important;
    height:43px!important;
    flex:0 0 43px!important;
    border-radius:13px!important;
  }
  .sd-inspector-heading-copy h3{
    margin:1px 0 2px!important;
    font-size:15px!important;
    line-height:1.45!important;
  }
  .sd-inspector-heading-copy p{
    margin:0!important;
    font-size:10.5px!important;
    line-height:1.55!important;
  }
  .sd-flow-fields{
    flex:0 0 auto!important;
    margin-top:0!important;
    padding:11px!important;
    border-radius:14px!important;
  }
  .sd-node-editor{
    flex:1 1 auto!important;
    min-height:0!important;
    margin-top:9px!important;
    padding:0 1px 8px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
  }
  .sd-editor-card{
    border-radius:14px!important;
  }
  .sd-feedback{
    flex:0 0 auto!important;
  }
  .sd-inspector-actions{
    flex:0 0 auto!important;
    position:static!important;
    z-index:9!important;
    margin:0 -11px!important;
    padding:10px 11px calc(11px + env(safe-area-inset-bottom))!important;
    background:var(--sd-surface)!important;
    border-top:1px solid var(--sd-line)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  html[data-theme="dark"] .sd-inspector-actions{
    background:#181419!important;
  }
  .sd-inspector-actions button{
    min-height:46px!important;
    border-radius:12px!important;
  }
  .sd-inspector.is-collapsed{
    grid-row:2!important;
    min-height:58px!important;
    height:58px!important;
    max-height:58px!important;
    padding:7px 9px!important;
    overflow:hidden!important;
  }
  .sd-inspector.is-collapsed::before{display:none!important}
  .sd-inspector.is-collapsed .sd-inspector-head{
    margin:0!important;
    min-height:43px!important;
    height:43px!important;
    padding:0!important;
    border:0!important;
  }
}

@media(max-width:560px){
  .sd-studio-grid{
    grid-template-rows:minmax(165px,1fr) minmax(260px,44dvh)!important;
    padding:5px!important;
    gap:6px!important;
  }
  .sd-canvas-shell{
    min-height:165px!important;
  }
  .sd-inspector{
    min-height:260px!important;
    padding-inline:10px!important;
  }
  .sd-inspector-actions{
    margin-inline:-10px!important;
    padding-inline:10px!important;
  }
}


/* MSM Site 1.0.568 — Flow inspector visual closure, Light + Dark */

/* Light: remove stark white rollback surfaces from Studio header controls. */
html[data-theme="light"] .smart-direct-page .sd-studio-close{
  background:#f4eef2!important;
  color:#51474f!important;
  border-color:#ddd3da!important;
  box-shadow:none!important;
}
html[data-theme="light"] .smart-direct-page .sd-header-max,
html[data-theme="light"] .smart-direct-page .sd-master-switch{
  background:#f5eff3!important;
  color:#332d34!important;
  border-color:#ddd3da!important;
  box-shadow:none!important;
}
html[data-theme="light"] .smart-direct-page .sd-header-max>span,
html[data-theme="light"] .smart-direct-page .sd-master-switch>b{
  color:#554b53!important;
}
html[data-theme="light"] .smart-direct-page .sd-header-max input{
  background:#fffaf7!important;
  color:#29232a!important;
  border-color:#d9cfd6!important;
  box-shadow:none!important;
}

/* Light: Inspector is one coherent surface, not stacked white cards. */
html[data-theme="light"] .smart-direct-page .sd-inspector{
  background:#f8f3ef!important;
  color:#2d2730!important;
  border-color:#ded4da!important;
  box-shadow:0 16px 38px rgba(62,42,53,.08)!important;
}
html[data-theme="light"] .smart-direct-page .sd-inspector-head{
  background:transparent!important;
  border:0!important;
  border-bottom:1px solid #e3d9df!important;
  border-radius:0!important;
  padding:0 0 12px 42px!important;
  margin:0 0 10px!important;
  box-shadow:none!important;
}
html[data-theme="light"] .smart-direct-page .sd-inspector-head>span{
  background:linear-gradient(145deg,#eee7ff,#fff0e5)!important;
  color:#7c3aed!important;
}
html[data-theme="light"] .smart-direct-page .sd-inspector-window-actions button{
  background:#eee8f1!important;
  color:#5c515a!important;
  border-color:#dcd2d9!important;
  box-shadow:none!important;
}
html[data-theme="light"] .smart-direct-page .sd-flow-fields,
html[data-theme="light"] .smart-direct-page .sd-editor-card,
html[data-theme="light"] .smart-direct-page .sd-carousel-card-editor{
  background:#f2ebe7!important;
  color:#2d2730!important;
  border-color:#ddd3d9!important;
  box-shadow:none!important;
}
html[data-theme="light"] .smart-direct-page .sd-editor-note{
  background:#f6f0fb!important;
  color:#625865!important;
  border-color:rgba(139,92,246,.20)!important;
}
html[data-theme="light"] .smart-direct-page .sd-flow-fields input,
html[data-theme="light"] .smart-direct-page .sd-flow-fields textarea,
html[data-theme="light"] .smart-direct-page .sd-node-editor input,
html[data-theme="light"] .smart-direct-page .sd-node-editor textarea,
html[data-theme="light"] .smart-direct-page .sd-node-editor select{
  background:#fffaf7!important;
  color:#2d2730!important;
  border-color:#d9cfd6!important;
}
html[data-theme="light"] .smart-direct-page .sd-list-row button,
html[data-theme="light"] .smart-direct-page .sd-mini-button{
  background:#ece5e9!important;
  color:#594e56!important;
  border-color:#d8ced5!important;
}
html[data-theme="light"] .smart-direct-page .sd-inspector-actions{
  background:#f8f3ef!important;
  border-top-color:#ded4da!important;
}
html[data-theme="light"] .smart-direct-page .sd-inspector-actions .sd-save-secondary{
  background:linear-gradient(135deg,#f97316,#8b5cf6)!important;
  color:#fff!important;
  border:0!important;
  box-shadow:0 8px 18px rgba(139,80,39,.16)!important;
}
html[data-theme="light"] .smart-direct-page .sd-inspector-actions .sd-danger-action{
  background:#fff0f2!important;
  color:#be123c!important;
  border-color:rgba(190,18,60,.18)!important;
}

/* Dark: keep all Inspector cards/buttons genuinely dark and consistent. */
html[data-theme="dark"] .smart-direct-page .sd-inspector{
  background:#181419!important;
  color:#f3edf2!important;
  border-color:rgba(255,255,255,.08)!important;
  box-shadow:0 16px 38px rgba(0,0,0,.20)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-inspector-head{
  background:transparent!important;
  border:0!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  border-radius:0!important;
  padding:0 0 12px 42px!important;
  margin:0 0 10px!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .smart-direct-page .sd-inspector-window-actions button{
  background:#282129!important;
  color:#d7ccd4!important;
  border-color:rgba(255,255,255,.10)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .smart-direct-page .sd-inspector-actions .sd-save-secondary{
  background:linear-gradient(135deg,#f97316,#8b5cf6)!important;
  color:#fff!important;
  border:0!important;
}
html[data-theme="dark"] .smart-direct-page .sd-inspector-actions .sd-danger-action{
  background:#331c23!important;
  color:#fda4af!important;
  border-color:rgba(253,164,175,.18)!important;
}

/* Mobile-specific head alignment: no desktop 42px reserve, controls are hidden there. */
@media(max-width:800px){
  html[data-theme="light"] .smart-direct-page .sd-inspector-head,
  html[data-theme="dark"] .smart-direct-page .sd-inspector-head{
    padding:7px 2px 10px!important;
    margin:0 -2px 8px!important;
    border-radius:0!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-inspector{
    background:#f8f3ef!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-inspector-actions{
    background:#f8f3ef!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-inspector-actions{
    background:#181419!important;
  }
}

/* System/auto theme parity for dark systems without explicit data-theme=dark. */
@media(prefers-color-scheme:dark){
  html:not([data-theme="light"]) .smart-direct-page .sd-flow-fields,
  html:not([data-theme="light"]) .smart-direct-page .sd-editor-card,
  html:not([data-theme="light"]) .smart-direct-page .sd-carousel-card-editor{
    background:#211b22!important;
    color:#f3edf2!important;
    border-color:rgba(255,255,255,.09)!important;
  }
  html:not([data-theme="light"]) .smart-direct-page .sd-flow-fields input,
  html:not([data-theme="light"]) .smart-direct-page .sd-flow-fields textarea,
  html:not([data-theme="light"]) .smart-direct-page .sd-node-editor input,
  html:not([data-theme="light"]) .smart-direct-page .sd-node-editor textarea,
  html:not([data-theme="light"]) .smart-direct-page .sd-node-editor select{
    background:#151216!important;
    color:#f8f3f7!important;
    border-color:rgba(255,255,255,.11)!important;
  }
}


/* MSM Site 1.0.569 — desktop Studio/Inspector closure only */

/* Smart Direct Studio must always use Vazirmatn, including textareas/buttons. */
.sd-studio-modal,
.sd-studio-modal *{
  font-family:'Vazirmatn',Tahoma,Arial,sans-serif!important;
}

@media(min-width:801px){
  /* No browser scrollbars around the Studio canvas. Pan/drag remains the navigation model. */
  .sd-studio-modal,
  .sd-studio-grid,
  .sd-canvas-shell,
  .sd-canvas-scroll{
    overflow:hidden!important;
    overscroll-behavior:none!important;
  }
  .sd-canvas-scroll{
    scrollbar-width:none!important;
  }
  .sd-canvas-scroll::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }

  /* Correct floating Inspector geometry: top + exact remaining height, never 100% + top offset. */
  .sd-inspector{
    position:absolute!important;
    z-index:26!important;
    top:12px!important;
    right:12px!important;
    left:auto;
    bottom:auto!important;
    width:360px!important;
    max-width:min(360px,calc(100% - 24px))!important;
    height:calc(100% - 24px)!important;
    min-height:0!important;
    max-height:calc(100% - 24px)!important;
    display:block!important;
    padding:14px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    scrollbar-width:none!important;
    border-radius:18px!important;
  }
  .sd-inspector::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }

  /* One scroll context only: no nested/locked node editor. */
  .sd-node-editor{
    display:grid!important;
    flex:none!important;
    min-height:0!important;
    overflow:visible!important;
    padding-inline-end:0!important;
    scrollbar-width:auto!important;
  }
  .sd-node-editor::-webkit-scrollbar{
    display:none!important;
  }

  /* Header and actions stay reachable while the inspector itself scrolls. */
  .sd-inspector-head{
    position:sticky!important;
    top:-14px!important;
    z-index:7!important;
    cursor:move!important;
    padding-top:14px!important;
  }
  .sd-inspector-actions{
    position:sticky!important;
    bottom:-14px!important;
    z-index:8!important;
    margin-top:10px!important;
    padding:12px 0 14px!important;
  }

  /* Explicit desktop theme contract — Light. */
  html[data-theme="light"] .smart-direct-page .sd-studio-header{
    background:#fbf7f3!important;
    color:#2d2730!important;
    border-bottom-color:#e3d9df!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-studio-toolbar{
    background:#f7f1ed!important;
    color:#302a31!important;
    border-bottom-color:#e3d9df!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-studio-close,
  html[data-theme="light"] .smart-direct-page .sd-header-max,
  html[data-theme="light"] .smart-direct-page .sd-master-switch,
  html[data-theme="light"] .smart-direct-page .sd-canvas-tools{
    background:#eee8e4!important;
    color:#443b42!important;
    border-color:#d8ced4!important;
    box-shadow:none!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-header-max input{
    background:#fffaf7!important;
    color:#29232a!important;
    border-color:#d8ced4!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-auto-layout-button{
    background:#eaf7fc!important;
    color:#036985!important;
    border-color:#bee6f1!important;
    box-shadow:none!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-add-node-button{
    background:#f0eafb!important;
    color:#6d3bc1!important;
    border-color:#d8c9f1!important;
    box-shadow:none!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-studio-save,
  html[data-theme="light"] .smart-direct-page .sd-studio-save:disabled,
  html[data-theme="light"] .smart-direct-page .sd-save-secondary,
  html[data-theme="light"] .smart-direct-page .sd-save-secondary:disabled{
    background:linear-gradient(135deg,#f97316,#8b5cf6)!important;
    color:#fff!important;
    border:0!important;
    box-shadow:0 8px 20px rgba(139,80,39,.16)!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-studio-save:disabled,
  html[data-theme="light"] .smart-direct-page .sd-save-secondary:disabled{
    opacity:.58!important;
  }

  html[data-theme="light"] .smart-direct-page .sd-inspector{
    background:#f7f1ed!important;
    color:#2d2730!important;
    border-color:#dcd2d8!important;
    box-shadow:0 18px 44px rgba(62,42,53,.11)!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-inspector-head{
    background:#f7f1ed!important;
    border:0!important;
    border-bottom:1px solid #dfd5db!important;
    border-radius:0!important;
    margin:0 0 10px!important;
    padding-right:0!important;
    padding-bottom:12px!important;
    padding-left:42px!important;
    box-shadow:none!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-flow-fields,
  html[data-theme="light"] .smart-direct-page .sd-editor-card,
  html[data-theme="light"] .smart-direct-page .sd-carousel-card-editor{
    background:#eee7e3!important;
    color:#2d2730!important;
    border-color:#d8ced4!important;
    box-shadow:none!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-editor-note{
    background:#f4eef9!important;
    color:#625865!important;
    border-color:rgba(139,92,246,.20)!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-flow-fields input,
  html[data-theme="light"] .smart-direct-page .sd-flow-fields textarea,
  html[data-theme="light"] .smart-direct-page .sd-node-editor input,
  html[data-theme="light"] .smart-direct-page .sd-node-editor textarea,
  html[data-theme="light"] .smart-direct-page .sd-node-editor select{
    background:#fffaf7!important;
    color:#2d2730!important;
    border-color:#d7cdd3!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-inspector-actions{
    background:linear-gradient(180deg,rgba(247,241,237,.72),#f7f1ed 24%)!important;
    border-top:1px solid #dfd5db!important;
  }

  /* Explicit desktop theme contract — Dark. */
  html[data-theme="dark"] .smart-direct-page .sd-studio-header{
    background:#181419!important;
    color:#f3edf2!important;
    border-bottom-color:rgba(255,255,255,.08)!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-studio-toolbar{
    background:#1c171d!important;
    color:#f3edf2!important;
    border-bottom-color:rgba(255,255,255,.08)!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-studio-close,
  html[data-theme="dark"] .smart-direct-page .sd-header-max,
  html[data-theme="dark"] .smart-direct-page .sd-master-switch,
  html[data-theme="dark"] .smart-direct-page .sd-canvas-tools{
    background:#252027!important;
    color:#eee6ec!important;
    border-color:rgba(255,255,255,.10)!important;
    box-shadow:none!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-header-max input{
    background:#151216!important;
    color:#f8f3f7!important;
    border-color:rgba(255,255,255,.11)!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-auto-layout-button{
    background:rgba(14,165,233,.12)!important;
    color:#7dd3fc!important;
    border-color:rgba(125,211,252,.18)!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-add-node-button{
    background:rgba(139,92,246,.15)!important;
    color:#c4b5fd!important;
    border-color:rgba(196,181,253,.18)!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-studio-save,
  html[data-theme="dark"] .smart-direct-page .sd-studio-save:disabled,
  html[data-theme="dark"] .smart-direct-page .sd-save-secondary,
  html[data-theme="dark"] .smart-direct-page .sd-save-secondary:disabled{
    background:linear-gradient(135deg,#f97316,#8b5cf6)!important;
    color:#fff!important;
    border:0!important;
    box-shadow:0 8px 20px rgba(0,0,0,.18)!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-studio-save:disabled,
  html[data-theme="dark"] .smart-direct-page .sd-save-secondary:disabled{
    opacity:.58!important;
  }

  html[data-theme="dark"] .smart-direct-page .sd-inspector{
    background:#181419!important;
    color:#f3edf2!important;
    border-color:rgba(255,255,255,.09)!important;
    box-shadow:0 18px 44px rgba(0,0,0,.30)!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-inspector-head{
    background:#181419!important;
    border:0!important;
    border-bottom:1px solid rgba(255,255,255,.08)!important;
    border-radius:0!important;
    margin:0 0 10px!important;
    padding-right:0!important;
    padding-bottom:12px!important;
    padding-left:42px!important;
    box-shadow:none!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-flow-fields,
  html[data-theme="dark"] .smart-direct-page .sd-editor-card,
  html[data-theme="dark"] .smart-direct-page .sd-carousel-card-editor{
    background:#211b22!important;
    color:#f3edf2!important;
    border-color:rgba(255,255,255,.09)!important;
    box-shadow:none!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-editor-note{
    background:#1d181e!important;
    color:#b7acb4!important;
    border-color:rgba(167,139,250,.20)!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-flow-fields input,
  html[data-theme="dark"] .smart-direct-page .sd-flow-fields textarea,
  html[data-theme="dark"] .smart-direct-page .sd-node-editor input,
  html[data-theme="dark"] .smart-direct-page .sd-node-editor textarea,
  html[data-theme="dark"] .smart-direct-page .sd-node-editor select{
    background:#151216!important;
    color:#f8f3f7!important;
    border-color:rgba(255,255,255,.11)!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-inspector-actions{
    background:linear-gradient(180deg,rgba(24,20,25,.72),#181419 24%)!important;
    border-top:1px solid rgba(255,255,255,.08)!important;
  }

  /* Selected canvas block must remain legible in both themes. */
  html[data-theme="light"] .smart-direct-page .sd-node.is-selected{
    background:#fffaf7!important;
    border-color:#8b5cf6!important;
    box-shadow:0 0 0 3px rgba(139,92,246,.11),0 16px 34px rgba(61,42,52,.12)!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-node.is-selected{
    background:#211b22!important;
    border-color:#a78bfa!important;
    box-shadow:0 0 0 3px rgba(167,139,250,.13),0 16px 34px rgba(0,0,0,.28)!important;
  }
  html[data-theme="light"] .smart-direct-page .sd-node-preview{
    background:#f1ebe7!important;
    color:#685e65!important;
  }
  html[data-theme="dark"] .smart-direct-page .sd-node-preview{
    background:#171318!important;
    color:#b9adb5!important;
  }
}


/* MSM Site 1.0.570 — mobile Studio RTL + expanded Inspector contract */
@media(max-width:800px){
  .sd-studio-modal{
    direction:rtl!important;
    text-align:right!important;
    overflow:hidden!important;
  }
  .sd-studio-header,
  .sd-studio-toolbar{
    direction:rtl!important;
    text-align:right!important;
    width:100%!important;
    min-width:0!important;
  }
  .sd-studio-heading,
  .sd-flow-context{
    direction:rtl!important;
    text-align:right!important;
    min-width:0!important;
  }
  .sd-studio-header-actions,
  .sd-toolbar-actions{
    direction:rtl!important;
  }

  .sd-studio-grid{
    position:relative!important;
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    direction:rtl!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:0!important;
    height:auto!important;
    padding:5px!important;
    gap:6px!important;
    overflow:hidden!important;
  }
  .sd-canvas-shell{
    position:relative!important;
    order:1!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:205px!important;
    height:auto!important;
    max-height:none!important;
    margin:0!important;
    border-radius:14px!important;
    overflow:hidden!important;
    direction:rtl!important;
  }
  .sd-canvas-scroll{
    position:absolute!important;
    inset:0 0 32px!important;
    width:auto!important;
    height:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    direction:ltr!important;
    cursor:grab!important;
    touch-action:none!important;
    overscroll-behavior:none!important;
    scrollbar-width:none!important;
  }
  .sd-canvas-scroll::-webkit-scrollbar{
    display:none!important;
    width:0!important;
    height:0!important;
  }
  .sd-canvas-shell.is-panning .sd-canvas-scroll{cursor:grabbing!important}

  .sd-flow{
    direction:ltr!important;
    transform-origin:top left!important;
  }
  .sd-node,
  .sd-node-body,
  .sd-node-head,
  .sd-node-copy,
  .sd-node-preview{
    direction:rtl!important;
    text-align:right!important;
  }
  /* Node width/height are owned by nodeSize() + inline geometry.
     Do not override them here: SVG edge anchors use the same geometry. */

  .sd-inspector,
  .sd-inspector.is-collapsed{
    position:static!important;
    order:2!important;
    flex:0 0 min(38dvh,286px)!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:220px!important;
    height:auto!important;
    max-height:min(38dvh,286px)!important;
    margin:0!important;
    padding:0 10px!important;
    transform:none!important;
    direction:rtl!important;
    text-align:right!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
    border:1px solid var(--sd-line)!important;
    border-radius:15px!important;
    box-shadow:none!important;
  }
  .sd-inspector::-webkit-scrollbar{
    display:none!important;
    width:0!important;
    height:0!important;
  }
  .sd-inspector.is-collapsed .sd-flow-fields,
  .sd-inspector.is-collapsed .sd-node-editor,
  .sd-inspector.is-collapsed .sd-feedback,
  .sd-inspector.is-collapsed .sd-inspector-actions{
    display:initial!important;
  }
  .sd-inspector-window-actions{
    display:none!important;
  }
  .sd-inspector-head,
  .sd-inspector.is-collapsed .sd-inspector-head{
    position:sticky!important;
    top:0!important;
    z-index:6!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-height:56px!important;
    height:auto!important;
    margin:0!important;
    padding:8px 0 9px!important;
    gap:9px!important;
    direction:rtl!important;
    text-align:right!important;
    cursor:default!important;
    border:0!important;
    border-bottom:1px solid var(--sd-line)!important;
  }
  .sd-inspector-head>span,
  .sd-inspector.is-collapsed .sd-inspector-head>span{
    order:0!important;
    width:38px!important;
    height:38px!important;
    flex:0 0 38px!important;
    margin:0!important;
  }
  .sd-inspector-heading-copy,
  .sd-inspector.is-collapsed .sd-inspector-heading-copy{
    order:1!important;
    display:block!important;
    flex:1 1 auto!important;
    min-width:0!important;
    text-align:right!important;
  }
  .sd-inspector-heading-copy h3{
    margin:1px 0!important;
    font-size:14px!important;
    line-height:1.4!important;
  }
  .sd-inspector-heading-copy p{
    display:block!important;
    margin:0!important;
    font-size:10px!important;
    line-height:1.45!important;
  }
  .sd-flow-fields,
  .sd-node-editor,
  .sd-editor-card,
  .sd-feedback{
    direction:rtl!important;
    text-align:right!important;
  }
  .sd-flow-fields{
    margin-top:8px!important;
    padding:10px!important;
  }
  .sd-node-editor{
    display:grid!important;
    min-height:0!important;
    margin-top:8px!important;
    padding:0 0 8px!important;
    overflow:visible!important;
  }
  .sd-inspector-actions{
    position:sticky!important;
    bottom:0!important;
    z-index:7!important;
    display:flex!important;
    direction:rtl!important;
    gap:7px!important;
    margin:8px -10px 0!important;
    padding:9px 10px calc(9px + env(safe-area-inset-bottom))!important;
    border-top:1px solid var(--sd-line)!important;
  }
  .sd-inspector-actions button{
    min-height:42px!important;
    border-radius:11px!important;
  }

  .sd-canvas-legend{
    direction:rtl!important;
    justify-content:flex-start!important;
    right:5px!important;
    left:5px!important;
    bottom:4px!important;
    min-height:25px!important;
    padding:4px 7px!important;
    gap:7px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    font-size:9px!important;
  }
  .sd-canvas-legend b{display:none!important}
}

@media(max-width:560px){
  .sd-studio-header{
    min-height:54px!important;
    padding:6px 7px!important;
  }
  .sd-studio-toolbar{
    min-height:46px!important;
    padding:5px 7px!important;
  }
  .sd-studio-grid{
    padding:4px!important;
    gap:5px!important;
  }
  .sd-canvas-shell{
    min-height:190px!important;
  }
  .sd-inspector,
  .sd-inspector.is-collapsed{
    flex-basis:min(39dvh,270px)!important;
    min-height:215px!important;
    max-height:min(39dvh,270px)!important;
    padding-inline:9px!important;
  }
  .sd-inspector-actions{
    margin-inline:-9px!important;
    padding-inline:9px!important;
  }
}


/* MSM Site 1.0.571 — desktop Studio portal premium closure
   Root cause: Studio is portalled under body, so .smart-direct-page-scoped rules do not apply while open. */
@media(min-width:801px){

  /* ---------- Portal base ---------- */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]){
    --sdp-bg:#171318;
    --sdp-surface:#1d181e;
    --sdp-surface-2:#241e25;
    --sdp-card:#211b22;
    --sdp-card-2:#2a232b;
    --sdp-text:#f7f1f5;
    --sdp-muted:#b9adb5;
    --sdp-line:rgba(255,255,255,.09);
    --sdp-soft:rgba(255,255,255,.045);
    --sdp-orange:#f97316;
    --sdp-purple:#8b5cf6;
    --sdp-green:#22c55e;
    --sdp-red:#ef476f;
    direction:rtl!important;
    color:var(--sdp-text)!important;
    background:var(--sdp-bg)!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]){
    --sdp-bg:#f4efeb;
    --sdp-surface:#fbf7f3;
    --sdp-surface-2:#f1eae6;
    --sdp-card:#f6efeb;
    --sdp-card-2:#ede5e1;
    --sdp-text:#2d2730;
    --sdp-muted:#776c74;
    --sdp-line:#ddd3d9;
    --sdp-soft:rgba(73,52,65,.045);
    --sdp-orange:#ea670e;
    --sdp-purple:#7c3aed;
    --sdp-green:#169b50;
    --sdp-red:#be123c;
    background:var(--sdp-bg)!important;
    color:var(--sdp-text)!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]),
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) *{
    font-family:'Vazirmatn',Tahoma,Arial,sans-serif!important;
    box-sizing:border-box!important;
  }

  /* ---------- Header / toolbar ---------- */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-header{
    background:var(--sdp-surface)!important;
    color:var(--sdp-text)!important;
    border-bottom:1px solid var(--sdp-line)!important;
    box-shadow:0 8px 28px rgba(0,0,0,.08)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-toolbar{
    background:var(--sdp-surface-2)!important;
    color:var(--sdp-text)!important;
    border-bottom:1px solid var(--sdp-line)!important;
    box-shadow:0 5px 18px rgba(0,0,0,.045)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-heading h2,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-heading small,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-context b{
    color:var(--sdp-text)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-heading p,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-context small{
    color:var(--sdp-muted)!important;
  }

  /* ---------- Unified premium buttons ---------- */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) button{
    font-family:'Vazirmatn',Tahoma,Arial,sans-serif!important;
    transition:transform .16s ease,filter .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) button:not(:disabled):hover{
    transform:translateY(-1px)!important;
    filter:brightness(1.035)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) button:disabled{
    cursor:not-allowed!important;
    opacity:.52!important;
    transform:none!important;
    filter:saturate(.72)!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-close,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-header-max,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-master-switch,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-canvas-tools{
    background:var(--sdp-card)!important;
    color:var(--sdp-text)!important;
    border:1px solid var(--sdp-line)!important;
    box-shadow:0 7px 18px rgba(0,0,0,.055)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-close{
    display:grid!important;
    place-items:center!important;
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    padding:0!important;
    border-radius:13px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-header-max,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-master-switch{
    min-height:42px!important;
    border-radius:13px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-header-max>span,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-master-switch>b{
    color:var(--sdp-text)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-header-max input{
    background:var(--sdp-bg)!important;
    color:var(--sdp-text)!important;
    border:1px solid var(--sdp-line)!important;
    border-radius:10px!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-save,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-save-secondary{
    background:linear-gradient(135deg,#ff7a18 0%,#f15a24 34%,#8b5cf6 100%)!important;
    color:#fff!important;
    border:0!important;
    box-shadow:0 10px 24px rgba(139,80,39,.22)!important;
    font-weight:900!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-save *,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-save-secondary *{
    color:#fff!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-add-node-button{
    background:linear-gradient(135deg,rgba(124,58,237,.14),rgba(139,92,246,.08))!important;
    color:#c4b5fd!important;
    border:1px solid rgba(167,139,250,.25)!important;
    box-shadow:0 7px 18px rgba(98,66,150,.10)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-auto-layout-button{
    background:linear-gradient(135deg,rgba(14,165,233,.13),rgba(6,182,212,.07))!important;
    color:#7dd3fc!important;
    border:1px solid rgba(125,211,252,.22)!important;
    box-shadow:0 7px 18px rgba(14,165,233,.08)!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-add-node-button{
    background:linear-gradient(135deg,#eee7fb,#f5f0ff)!important;
    color:#6d3bc1!important;
    border-color:#d4c5ee!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-auto-layout-button{
    background:linear-gradient(135deg,#e7f5fa,#eefafe)!important;
    color:#036985!important;
    border-color:#b9dfe9!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-canvas-tools button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-window-actions button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-mini-button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-list-row button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-personalization-compact button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-personalization-tags button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-emoji-toggle{
    background:var(--sdp-card-2)!important;
    color:var(--sdp-text)!important;
    border:1px solid var(--sdp-line)!important;
    box-shadow:none!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-danger-action{
    background:rgba(239,71,111,.11)!important;
    color:#fda4af!important;
    border:1px solid rgba(253,164,175,.20)!important;
    box-shadow:none!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-danger-action{
    background:#fff0f2!important;
    color:#be123c!important;
    border-color:rgba(190,18,60,.18)!important;
  }

  /* ---------- Inspector geometry ---------- */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector{
    position:absolute!important;
    z-index:26!important;
    top:12px!important;
    right:12px!important;
    left:auto!important;
    bottom:auto!important;
    width:360px!important;
    max-width:min(360px,calc(100% - 24px))!important;
    height:calc(100% - 24px)!important;
    max-height:calc(100% - 24px)!important;
    min-height:0!important;
    padding:14px!important;
    direction:rtl!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    scrollbar-width:none!important;
    background:var(--sdp-surface)!important;
    color:var(--sdp-text)!important;
    border:1px solid var(--sdp-line)!important;
    border-radius:20px!important;
    box-shadow:0 24px 64px rgba(0,0,0,.22)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }

  /* Explicit non-overlapping inspector header: icon | copy | minimize */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-head{
    position:sticky!important;
    top:-14px!important;
    z-index:10!important;
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) 34px!important;
    grid-template-areas:"icon copy actions"!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
    min-height:76px!important;
    margin:0 0 12px!important;
    padding:14px 0 12px!important;
    direction:rtl!important;
    cursor:move!important;
    background:var(--sdp-surface)!important;
    border:0!important;
    border-bottom:1px solid var(--sdp-line)!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-head>span{
    grid-area:icon!important;
    display:grid!important;
    place-items:center!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    margin:0!important;
    border-radius:14px!important;
    background:linear-gradient(145deg,rgba(249,115,22,.18),rgba(139,92,246,.18))!important;
    color:#f59e62!important;
    font-size:19px!important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-head>span{
    background:linear-gradient(145deg,#fff0e5,#eee8ff)!important;
    color:#7c3aed!important;
    box-shadow:inset 0 0 0 1px rgba(124,58,237,.08)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-heading-copy{
    grid-area:copy!important;
    display:grid!important;
    gap:1px!important;
    min-width:0!important;
    text-align:right!important;
    overflow:hidden!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-heading-copy small{
    display:block!important;
    margin:0!important;
    color:var(--sdp-muted)!important;
    font-size:9px!important;
    font-weight:900!important;
    line-height:1.35!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-heading-copy h3{
    display:block!important;
    max-width:100%!important;
    margin:1px 0!important;
    color:var(--sdp-text)!important;
    font-size:18px!important;
    font-weight:950!important;
    line-height:1.35!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-heading-copy p{
    display:block!important;
    max-width:100%!important;
    margin:0!important;
    color:var(--sdp-muted)!important;
    font-size:10px!important;
    line-height:1.45!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-window-actions{
    grid-area:actions!important;
    position:static!important;
    inset:auto!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    width:34px!important;
    height:34px!important;
    margin:0!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-window-actions button{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    padding:0!important;
    border-radius:11px!important;
    font-size:17px!important;
  }

  /* ---------- Inspector cards / fields ---------- */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-editor-card,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-carousel-card-editor{
    background:var(--sdp-card)!important;
    color:var(--sdp-text)!important;
    border:1px solid var(--sdp-line)!important;
    border-radius:15px!important;
    box-shadow:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields{
    padding:12px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields label>span,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor label>span,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-field-title{
    color:var(--sdp-text)!important;
    font-weight:900!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields input,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields textarea,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor input,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor textarea,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor select{
    width:100%!important;
    max-width:100%!important;
    background:var(--sdp-bg)!important;
    color:var(--sdp-text)!important;
    border:1px solid var(--sdp-line)!important;
    border-radius:12px!important;
    outline:none!important;
    box-shadow:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields input:focus,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields textarea:focus,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor input:focus,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor textarea:focus,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor select:focus{
    border-color:rgba(139,92,246,.55)!important;
    box-shadow:0 0 0 3px rgba(139,92,246,.10)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-editor-note{
    background:var(--sdp-soft)!important;
    color:var(--sdp-muted)!important;
    border:1px solid var(--sdp-line)!important;
    border-radius:12px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor{
    overflow:visible!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-actions{
    position:sticky!important;
    bottom:-14px!important;
    z-index:12!important;
    display:flex!important;
    gap:9px!important;
    margin:12px -14px -14px!important;
    padding:12px 14px 14px!important;
    background:linear-gradient(180deg,color-mix(in srgb,var(--sdp-surface) 15%,transparent),var(--sdp-surface) 35%)!important;
    border-top:1px solid var(--sdp-line)!important;
    backdrop-filter:blur(10px)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-actions button{
    flex:1 1 0!important;
    min-height:46px!important;
    border-radius:13px!important;
  }

  /* ---------- Canvas / selected block ---------- */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-canvas-shell{
    background:var(--sdp-bg)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node{
    background:var(--sdp-card)!important;
    color:var(--sdp-text)!important;
    border-color:var(--sdp-line)!important;
    box-shadow:0 12px 28px rgba(0,0,0,.10)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-copy b{
    color:var(--sdp-text)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-copy small{
    color:var(--sdp-muted)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-preview{
    background:var(--sdp-bg)!important;
    color:var(--sdp-muted)!important;
    border-color:var(--sdp-line)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.is-selected{
    border-color:#a78bfa!important;
    box-shadow:0 0 0 3px rgba(167,139,250,.14),0 18px 38px rgba(0,0,0,.20)!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.is-selected{
    border-color:#7c3aed!important;
    box-shadow:0 0 0 3px rgba(124,58,237,.11),0 16px 34px rgba(61,42,52,.10)!important;
  }

  /* Light portal button/card polish */
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-canvas-tools button,
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-window-actions button,
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-mini-button,
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-list-row button,
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-personalization-compact button,
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-personalization-tags button,
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-emoji-toggle{
    background:#ece5e1!important;
    color:#4d434a!important;
    border-color:#d8ced4!important;
  }

  /* System/auto dark when no explicit data-theme is present. */
  @media(prefers-color-scheme:dark){
    html:not([data-theme="light"]) body>#sdStudioModal.sd-direct-body-portal:not([hidden]){
      --sdp-bg:#171318;
      --sdp-surface:#1d181e;
      --sdp-surface-2:#241e25;
      --sdp-card:#211b22;
      --sdp-card-2:#2a232b;
      --sdp-text:#f7f1f5;
      --sdp-muted:#b9adb5;
      --sdp-line:rgba(255,255,255,.09);
      --sdp-soft:rgba(255,255,255,.045);
    }
  }
}


/* MSM Site 1.0.572 — compact one-line mobile Inspector header + premium controls */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]){
    --sdm-panel:#181419;
    --sdm-card:#211b22;
    --sdm-card-2:#2a232b;
    --sdm-text:#f7f1f5;
    --sdm-muted:#b9adb5;
    --sdm-line:rgba(255,255,255,.09);
    --sdm-orange:#fb923c;
    --sdm-purple:#c4b5fd;
    --sdm-red:#fda4af;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]){
    --sdm-panel:#f8f3ef;
    --sdm-card:#f1eae6;
    --sdm-card-2:#e9e1dd;
    --sdm-text:#2d2730;
    --sdm-muted:#756b73;
    --sdm-line:#ddd3d9;
    --sdm-orange:#c2410c;
    --sdm-purple:#6d28d9;
    --sdm-red:#be123c;
  }

  /* Compact single-line heading:
     Flow settings > current block */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-head,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-head{
    position:sticky!important;
    top:0!important;
    z-index:9!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-height:38px!important;
    height:38px!important;
    margin:0 0 6px!important;
    padding:4px 1px 5px!important;
    gap:0!important;
    background:var(--sdm-panel)!important;
    border:0!important;
    border-bottom:1px solid var(--sdm-line)!important;
    border-radius:0!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-head>span,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-head>span{
    display:none!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-heading-copy,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-heading-copy{
    display:flex!important;
    flex:1 1 auto!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-width:0!important;
    max-width:100%!important;
    gap:0!important;
    overflow:hidden!important;
    direction:rtl!important;
    white-space:nowrap!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-heading-copy small{
    display:inline-flex!important;
    align-items:center!important;
    flex:0 1 auto!important;
    min-width:0!important;
    max-width:58%!important;
    margin:0!important;
    color:var(--sdm-orange)!important;
    font-size:10px!important;
    font-weight:850!important;
    line-height:1.2!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-heading-copy small::after{
    content:"›";
    flex:0 0 auto!important;
    margin-inline:6px!important;
    color:var(--sdm-muted)!important;
    font-size:14px!important;
    font-weight:700!important;
    line-height:1!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-heading-copy h3{
    display:block!important;
    flex:0 1 auto!important;
    min-width:0!important;
    max-width:42%!important;
    margin:0!important;
    color:var(--sdm-purple)!important;
    font-size:12.5px!important;
    font-weight:850!important;
    line-height:1.25!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-heading-copy p{
    display:none!important;
  }

  /* Mobile Inspector form typography: smaller and normal-weight. */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields input,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields textarea,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor input,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor textarea,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor select{
    font-size:12px!important;
    font-weight:400!important;
    line-height:1.65!important;
    letter-spacing:0!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields input::placeholder,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-fields textarea::placeholder,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor input::placeholder,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor textarea::placeholder{
    font-size:11.5px!important;
    font-weight:400!important;
    color:var(--sdm-muted)!important;
    opacity:.82!important;
  }

  /* Premium action bar. */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-actions{
    background:linear-gradient(180deg,color-mix(in srgb,var(--sdm-panel) 12%,transparent),var(--sdm-panel) 32%)!important;
    border-top:1px solid var(--sdm-line)!important;
    gap:8px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-actions button{
    min-height:42px!important;
    border-radius:12px!important;
    font-size:12px!important;
    font-weight:900!important;
    border:1px solid transparent!important;
    box-shadow:0 7px 18px rgba(0,0,0,.10)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-actions .sd-save-secondary{
    background:linear-gradient(135deg,#ff7a18 0%,#f15a24 34%,#8b5cf6 100%)!important;
    color:#fff!important;
    border-color:transparent!important;
    box-shadow:0 9px 22px rgba(139,80,39,.20)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-actions .sd-danger-action{
    background:color-mix(in srgb,var(--sdm-red) 12%,var(--sdm-card))!important;
    color:var(--sdm-red)!important;
    border-color:color-mix(in srgb,var(--sdm-red) 24%,transparent)!important;
    box-shadow:none!important;
  }

  /* Premium secondary buttons inside node editors. */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor .sd-mini-button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor .sd-list-row button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor .sd-personalization-compact button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor .sd-personalization-tags button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor .sd-emoji-toggle{
    min-height:34px!important;
    padding:5px 9px!important;
    border-radius:10px!important;
    background:var(--sdm-card-2)!important;
    color:var(--sdm-text)!important;
    border:1px solid var(--sdm-line)!important;
    box-shadow:0 4px 12px rgba(0,0,0,.055)!important;
    font-size:11px!important;
    font-weight:800!important;
  }
}


/* MSM Site 1.0.573 — desktop node menu + true collapse + mobile settings badge */
@media(min-width:801px){
  /* Node menu lives inside the portalled Studio: style the real runtime location directly. */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu{
    z-index:80!important;
    width:min(310px,calc(100% - 20px))!important;
    max-width:310px!important;
    max-height:min(540px,calc(100% - 20px))!important;
    padding:8px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    direction:rtl!important;
    background:var(--sdp-surface,#1d181e)!important;
    color:var(--sdp-text,#f7f1f5)!important;
    border:1px solid var(--sdp-line,rgba(255,255,255,.09))!important;
    border-radius:17px!important;
    box-shadow:0 24px 60px rgba(0,0,0,.32)!important;
    backdrop-filter:blur(16px)!important;
    -webkit-backdrop-filter:blur(16px)!important;
    scrollbar-width:thin!important;
    scrollbar-color:#554756 #171318!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu::-webkit-scrollbar{
    width:7px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu::-webkit-scrollbar-track{
    background:#171318!important;
    border-radius:999px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu::-webkit-scrollbar-thumb{
    background:#554756!important;
    border:1px solid #171318!important;
    border-radius:999px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu::-webkit-scrollbar-thumb:hover{
    background:#6a5969!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu-head{
    position:sticky!important;
    top:-8px!important;
    z-index:3!important;
    margin:-8px -8px 5px!important;
    padding:12px 12px 10px!important;
    background:linear-gradient(180deg,var(--sdp-surface,#1d181e) 78%,color-mix(in srgb,var(--sdp-surface,#1d181e) 92%,transparent))!important;
    border-bottom:1px solid var(--sdp-line,rgba(255,255,255,.09))!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu-head b{
    color:var(--sdp-text,#f7f1f5)!important;
    font-size:13px!important;
    font-weight:950!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu-head small{
    color:var(--sdp-muted,#b9adb5)!important;
    font-size:10.5px!important;
    line-height:1.6!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu button{
    min-height:58px!important;
    padding:8px!important;
    gap:9px!important;
    color:var(--sdp-text,#f7f1f5)!important;
    background:transparent!important;
    border:1px solid transparent!important;
    border-radius:12px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu button:hover{
    background:var(--sdp-card-2,#2a232b)!important;
    border-color:var(--sdp-line,rgba(255,255,255,.09))!important;
    transform:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu button>span{
    background:color-mix(in srgb,var(--item-color,#8b5cf6) 14%,var(--sdp-card,#211b22))!important;
    color:var(--item-color,#c4b5fd)!important;
    border:1px solid color-mix(in srgb,var(--item-color,#8b5cf6) 22%,transparent)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu button b{
    color:var(--sdp-text,#f7f1f5)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu button small{
    color:var(--sdp-muted,#b9adb5)!important;
  }

  /* Light menu + scrollbar. */
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu{
    scrollbar-color:#c9bcc5 #f4efeb!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu::-webkit-scrollbar-track{
    background:#f4efeb!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu::-webkit-scrollbar-thumb{
    background:#c9bcc5!important;
    border-color:#f4efeb!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu::-webkit-scrollbar-thumb:hover{
    background:#b5a5b0!important;
  }

  /* True collapsed state: override the full-height portal Inspector contract. */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed{
    width:84px!important;
    max-width:84px!important;
    min-width:84px!important;
    height:60px!important;
    max-height:60px!important;
    min-height:60px!important;
    padding:8px!important;
    overflow:hidden!important;
    border-radius:16px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-flow-fields,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-node-editor,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-feedback,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-actions,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-heading-copy{
    display:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-head{
    position:static!important;
    display:grid!important;
    grid-template-columns:34px 34px!important;
    grid-template-areas:"icon actions"!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    width:100%!important;
    min-height:42px!important;
    height:42px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    cursor:default!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-head>span{
    grid-area:icon!important;
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    border-radius:11px!important;
    font-size:15px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions{
    grid-area:actions!important;
    display:flex!important;
    width:34px!important;
    height:34px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions button{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
  }
}

/* Mobile: a small premium settings badge before the one-line Inspector title. */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-head{
    padding-inline-start:8px!important;
    padding-inline-end:8px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-heading-copy small::before{
    content:"⚙"!important;
    display:inline-grid!important;
    place-items:center!important;
    flex:0 0 24px!important;
    width:24px!important;
    height:24px!important;
    margin-inline-end:7px!important;
    border-radius:8px!important;
    background:color-mix(in srgb,var(--sdm-orange) 14%,var(--sdm-card))!important;
    color:var(--sdm-orange)!important;
    border:1px solid color-mix(in srgb,var(--sdm-orange) 22%,transparent)!important;
    font-size:13px!important;
    line-height:1!important;
    box-shadow:0 4px 12px rgba(0,0,0,.06)!important;
  }
}


/* MSM Site 1.0.574 — Like is a real SVG sticker node, not a card */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like{
  width:116px!important;height:116px!important;min-width:116px!important;min-height:116px!important;
  padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;overflow:visible!important;display:grid!important;place-items:center!important;
  isolation:isolate!important;cursor:grab!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like:hover,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like.is-selected,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like.is-selected{
  background:transparent!important;border:0!important;box-shadow:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like.is-dragging{cursor:grabbing!important;z-index:10!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like .sd-like-sticker{
  position:relative!important;z-index:2!important;width:96px!important;height:96px!important;display:grid!important;place-items:center!important;
  transform:rotate(-4deg)!important;transition:transform .18s ease,filter .18s ease!important;
  filter:drop-shadow(0 14px 18px rgba(244,63,94,.22)) drop-shadow(0 3px 5px rgba(0,0,0,.20))!important;pointer-events:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like:hover .sd-like-sticker{
  transform:rotate(-2deg) scale(1.045)!important;
  filter:drop-shadow(0 18px 24px rgba(244,63,94,.30)) drop-shadow(0 4px 7px rgba(0,0,0,.22))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like.is-selected .sd-like-sticker{
  transform:rotate(-2deg) scale(1.07)!important;
  filter:drop-shadow(0 0 8px rgba(255,106,139,.45)) drop-shadow(0 18px 26px rgba(244,63,94,.34)) drop-shadow(0 4px 7px rgba(0,0,0,.24))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-like-heart-svg{width:96px!important;height:90px!important;overflow:visible!important;display:block!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-like-heart-outline{
  fill:#fff8fb!important;stroke:#fff!important;stroke-width:9!important;stroke-linejoin:round!important;paint-order:stroke fill!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-like-heart-outline{fill:#fff6fa!important;stroke:#2b2028!important;stroke-width:10!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-like-heart-main{stroke:rgba(255,255,255,.35)!important;stroke-width:1.6!important;stroke-linejoin:round!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-like-heart-gloss{fill:rgba(255,255,255,.52)!important;filter:blur(.2px)!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like .sd-port{
  z-index:7!important;width:18px!important;height:18px!important;border-width:3px!important;background:#fb4f79!important;
  box-shadow:0 0 0 3px rgba(251,79,121,.12),0 4px 10px rgba(0,0,0,.16)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like .sd-port-in{right:-10px!important;left:auto!important;top:50%!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like .sd-port-out{left:-10px!important;right:auto!important;top:50%!important}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like .sd-port{border-color:#211820!important}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like .sd-port{border-color:#fffaf7!important}

body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-like-editor{
  display:grid!important;grid-template-columns:52px minmax(0,1fr)!important;align-items:center!important;gap:12px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-like-editor .sd-like-heart{
  width:52px!important;height:52px!important;display:grid!important;place-items:center!important;border-radius:17px!important;
  background:linear-gradient(145deg,rgba(255,71,120,.18),rgba(255,107,87,.10))!important;color:#ff557d!important;
  font-size:28px!important;box-shadow:inset 0 0 0 1px rgba(255,85,125,.12)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-like-editor b{display:block!important;color:inherit!important;font-weight:900!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-like-editor p{
  margin:4px 0 0!important;color:var(--sdp-muted,var(--sd-muted))!important;font-size:11px!important;line-height:1.75!important;
}
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like{
    width:104px!important;height:104px!important;min-width:104px!important;min-height:104px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-like .sd-like-sticker,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-like-heart-svg{width:86px!important;height:82px!important}
}


/* MSM Site 1.0.575 — premium Light Theme closure for Smart Direct page */
html[data-theme="light"] .smart-direct-page{
  --sd-bg:#f7f1ec!important;
  --sd-surface:#fffaf6!important;
  --sd-surface-2:#f3ebe6!important;
  --sd-card:#fffdfb!important;
  --sd-text:#292329!important;
  --sd-muted:#746a72!important;
  --sd-line:rgba(88,62,78,.12)!important;
  --sd-orange:#f97316!important;
  --sd-orange-soft:#fff0e5!important;
  --sd-purple:#8254e8!important;
  --sd-purple-soft:#f2ecff!important;
  --sd-green:#16a34a!important;
  --sd-shadow:0 18px 46px rgba(80,52,68,.09)!important;
  padding:2px 0 20px!important;
  background:
    radial-gradient(900px 340px at 88% -120px,rgba(249,115,22,.07),transparent 68%),
    radial-gradient(760px 320px at 8% 14%,rgba(130,84,232,.055),transparent 70%),
    linear-gradient(180deg,#fffaf7 0%,#f8f2ed 100%)!important;
}

/* Hero */
html[data-theme="light"] .smart-direct-page .sd-hero{
  border:1px solid rgba(230,132,69,.20)!important;
  background:
    radial-gradient(420px 220px at 92% 0,rgba(249,115,22,.10),transparent 72%),
    radial-gradient(420px 220px at 8% 100%,rgba(130,84,232,.08),transparent 72%),
    linear-gradient(145deg,#fffdfb,#f8f0ec)!important;
  box-shadow:0 22px 54px rgba(84,55,70,.10)!important;
}
html[data-theme="light"] .smart-direct-page .sd-hero-badges span{
  background:rgba(255,255,255,.78)!important;
  color:#625760!important;
  border-color:rgba(88,62,78,.11)!important;
  box-shadow:0 5px 14px rgba(75,54,66,.04)!important;
}
html[data-theme="light"] .smart-direct-page .sd-hero-control{
  background:linear-gradient(145deg,#fff,#f5edfb)!important;
  border-color:rgba(130,84,232,.18)!important;
  box-shadow:0 14px 32px rgba(94,66,112,.10)!important;
}

/* Feature chips */
html[data-theme="light"] .smart-direct-page .sd-feature-strip span{
  background:linear-gradient(145deg,#fffdfb,#f4eee9)!important;
  color:#514850!important;
  border-color:rgba(74,58,68,.11)!important;
  box-shadow:0 6px 16px rgba(70,48,62,.045)!important;
}
html[data-theme="light"] .smart-direct-page .sd-feature-strip span::before{
  box-shadow:0 0 0 3px rgba(34,197,94,.10),0 5px 12px rgba(22,163,74,.10)!important;
}
html[data-theme="light"] .smart-direct-page .sd-feature-strip .is-pending{
  background:linear-gradient(145deg,#f6efff,#eee5fb)!important;
  color:#7040bd!important;
  border-color:rgba(130,84,232,.22)!important;
}

/* Main mode tabs */
html[data-theme="light"] .smart-direct-page .sd-mode-tabs{
  gap:12px!important;
}
html[data-theme="light"] .smart-direct-page .sd-mode-tabs button{
  position:relative!important;
  overflow:hidden!important;
  background:linear-gradient(145deg,#fffdfb,#f5eee9)!important;
  border-color:rgba(86,61,77,.11)!important;
  box-shadow:0 11px 28px rgba(75,52,65,.065)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mode-tabs button::after{
  content:""!important;
  position:absolute!important;
  right:14px!important;
  left:14px!important;
  bottom:0!important;
  height:3px!important;
  border-radius:999px 999px 0 0!important;
  opacity:.72!important;
}
html[data-theme="light"] .smart-direct-page .sd-mode-tabs button:hover{
  transform:translateY(-2px)!important;
  border-color:rgba(130,84,232,.20)!important;
  box-shadow:0 15px 34px rgba(75,52,65,.09)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mode-tabs button.active{
  background:linear-gradient(145deg,#fff8f1,#f4edff)!important;
  border-color:rgba(249,115,22,.28)!important;
  box-shadow:0 16px 38px rgba(112,70,52,.10)!important;
}

/* Toolbars / search */
html[data-theme="light"] .smart-direct-page .sd-toolbar,
html[data-theme="light"] .smart-direct-page .sd-dm-toolbar,
html[data-theme="light"] .smart-direct-page .sd-report-toolbar{
  background:linear-gradient(145deg,#fffdfb,#f4ede8)!important;
  border:1px solid rgba(84,59,74,.10)!important;
  border-radius:18px!important;
  box-shadow:0 12px 30px rgba(75,52,65,.06)!important;
}
html[data-theme="light"] .smart-direct-page .sd-search,
html[data-theme="light"] .smart-direct-page .sd-filter{
  background:#fffaf6!important;
  border-color:rgba(84,59,74,.12)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;
}
html[data-theme="light"] .smart-direct-page .sd-filter button{
  color:#6e626b!important;
}
html[data-theme="light"] .smart-direct-page .sd-filter button.active{
  background:linear-gradient(135deg,#fff0e5,#efe8ff)!important;
  color:#7040bd!important;
  box-shadow:0 5px 14px rgba(111,71,133,.08)!important;
}
html[data-theme="light"] .smart-direct-page .sd-refresh,
html[data-theme="light"] .smart-direct-page .sd-primary-action,
html[data-theme="light"] .smart-direct-page .sd-comment-flow-head button,
html[data-theme="light"] .smart-direct-page .sd-event-card>button,
html[data-theme="light"] .smart-direct-page .sd-dm-empty button{
  background:linear-gradient(135deg,#ff7a18 0%,#f15b2a 42%,#8b5cf6 100%)!important;
  color:#fff!important;
  border:0!important;
  box-shadow:0 10px 24px rgba(159,83,60,.18)!important;
}

/* Comment library / builder */
html[data-theme="light"] .smart-direct-page .sd-library,
html[data-theme="light"] .smart-direct-page .sd-builder,
html[data-theme="light"] .smart-direct-page .sd-selected-card{
  background:linear-gradient(145deg,#fffdfb,#f7f0eb)!important;
  border-color:rgba(84,59,74,.11)!important;
  box-shadow:0 14px 34px rgba(75,52,65,.06)!important;
}
html[data-theme="light"] .smart-direct-page .sd-media-item{
  background:#fffaf6!important;
  border-color:rgba(84,59,74,.10)!important;
}
html[data-theme="light"] .smart-direct-page .sd-media-item:hover,
html[data-theme="light"] .smart-direct-page .sd-media-item.active{
  background:linear-gradient(145deg,#fff6ec,#f4edff)!important;
  border-color:rgba(130,84,232,.22)!important;
  box-shadow:0 8px 22px rgba(89,61,77,.07)!important;
}
html[data-theme="light"] .smart-direct-page .sd-selection-note,
html[data-theme="light"] .smart-direct-page .sd-comment-flow-head{
  background:linear-gradient(145deg,#f6efe9,#f0e9f8)!important;
  border-color:rgba(96,69,85,.11)!important;
}

/* Flow lists / cards */
html[data-theme="light"] .smart-direct-page .sd-comment-flow-list,
html[data-theme="light"] .smart-direct-page .sd-event-flow-list{
  background:linear-gradient(180deg,#f8f2ee,#f3ece7)!important;
  border-color:rgba(84,59,74,.10)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mini-flow-card,
html[data-theme="light"] .smart-direct-page .sd-dm-flow-card{
  position:relative!important;
  overflow:hidden!important;
  background:linear-gradient(145deg,#fffdfb,#f5eee9)!important;
  color:#2d2730!important;
  border:1px solid rgba(84,59,74,.11)!important;
  box-shadow:0 12px 28px rgba(75,52,65,.065)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mini-flow-card::before,
html[data-theme="light"] .smart-direct-page .sd-dm-flow-card::before{
  content:""!important;
  position:absolute!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  width:3px!important;
  background:linear-gradient(180deg,#f97316,#8b5cf6)!important;
  opacity:.75!important;
}
html[data-theme="light"] .smart-direct-page .sd-mini-flow-card.is-enabled,
html[data-theme="light"] .smart-direct-page .sd-dm-flow-card.is-enabled{
  background:linear-gradient(145deg,#f7fff9,#fffaf6)!important;
  border-color:rgba(22,163,74,.19)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mini-flow-card.is-enabled::before,
html[data-theme="light"] .smart-direct-page .sd-dm-flow-card.is-enabled::before{
  background:linear-gradient(180deg,#22c55e,#16a34a)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mini-flow-card.is-provider-pending{
  background:linear-gradient(145deg,#fffaf0,#f7f0ff)!important;
  border-color:rgba(217,119,6,.18)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mini-flow-card.is-provider-pending::before{
  background:linear-gradient(180deg,#f59e0b,#8b5cf6)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mini-flow-card>div:last-child button,
html[data-theme="light"] .smart-direct-page .sd-dm-flow-actions button{
  min-height:36px!important;
  padding:0 12px!important;
  border-radius:10px!important;
  background:linear-gradient(145deg,#f0e9fb,#e9e1f7)!important;
  color:#6d3bc1!important;
  border:1px solid rgba(130,84,232,.16)!important;
  box-shadow:0 5px 13px rgba(100,70,120,.06)!important;
  font-weight:850!important;
}
html[data-theme="light"] .smart-direct-page .sd-mini-flow-card button.is-danger,
html[data-theme="light"] .smart-direct-page .sd-dm-flow-actions button.is-danger{
  background:#fff0f2!important;
  color:#be123c!important;
  border-color:rgba(190,18,60,.14)!important;
}

/* DM cards */
html[data-theme="light"] .smart-direct-page .sd-dm-flow-icon{
  background:linear-gradient(145deg,#eee7ff,#fff0e5)!important;
  color:#7c3aed!important;
  box-shadow:inset 0 0 0 1px rgba(124,58,237,.08)!important;
}
html[data-theme="light"] .smart-direct-page .sd-keyword-chips span,
html[data-theme="light"] .smart-direct-page .sd-keyword-chips b{
  background:#eee8e4!important;
  color:#5b5057!important;
  border:1px solid rgba(84,59,74,.08)!important;
}

/* Event cards */
html[data-theme="light"] .smart-direct-page .sd-event-grid{
  gap:14px!important;
}
html[data-theme="light"] .smart-direct-page .sd-event-card{
  position:relative!important;
  overflow:hidden!important;
  background:
    radial-gradient(260px 140px at 100% 0,rgba(249,115,22,.055),transparent 72%),
    linear-gradient(145deg,#fffdfb,#f6efea)!important;
  color:#2d2730!important;
  border:1px solid rgba(84,59,74,.11)!important;
  border-radius:20px!important;
  box-shadow:0 16px 38px rgba(75,52,65,.075)!important;
}
html[data-theme="light"] .smart-direct-page .sd-event-card::after{
  content:""!important;
  position:absolute!important;
  right:16px!important;
  left:16px!important;
  bottom:0!important;
  height:3px!important;
  border-radius:999px 999px 0 0!important;
  background:linear-gradient(90deg,#14b8a6,#8b5cf6)!important;
}
html[data-theme="light"] .smart-direct-page .sd-event-card header>span{
  background:linear-gradient(145deg,#f1eaff,#fff0e5)!important;
  color:#7545c6!important;
  box-shadow:inset 0 0 0 1px rgba(117,69,198,.08)!important;
}
html[data-theme="light"] .smart-direct-page .sd-event-card.is-pending{
  background:
    radial-gradient(260px 140px at 100% 0,rgba(245,158,11,.08),transparent 72%),
    linear-gradient(145deg,#fffbf2,#f7f0eb)!important;
  border-style:solid!important;
  border-color:rgba(217,119,6,.20)!important;
}
html[data-theme="light"] .smart-direct-page .sd-event-card.is-pending::before{
  content:"در انتظار اتصال رویداد"!important;
  position:absolute!important;
  top:12px!important;
  left:12px!important;
  padding:5px 8px!important;
  border-radius:999px!important;
  background:#fff3d8!important;
  color:#9a5a00!important;
  border:1px solid rgba(217,119,6,.16)!important;
  font-size:9.5px!important;
  font-weight:900!important;
}
html[data-theme="light"] .smart-direct-page .sd-event-card.is-pending::after{
  background:linear-gradient(90deg,#f59e0b,#8b5cf6)!important;
}

/* Follow Gate */
html[data-theme="light"] .smart-direct-page .sd-global-follow-card{
  background:
    radial-gradient(420px 180px at 100% 0,rgba(34,197,94,.09),transparent 70%),
    linear-gradient(145deg,#fffdfb,#f3eee9)!important;
  border-color:rgba(22,163,74,.22)!important;
  box-shadow:0 16px 38px rgba(50,80,58,.065)!important;
}
html[data-theme="light"] .smart-direct-page .sd-global-follow-switch,
html[data-theme="light"] .smart-direct-page .sd-follow-template-summary{
  background:#fffaf6!important;
  border-color:rgba(84,59,74,.11)!important;
}

/* Reports */
html[data-theme="light"] .smart-direct-page .sd-report-toolbar select{
  background:#fffaf6!important;
  color:#362f35!important;
  border-color:rgba(84,59,74,.13)!important;
}
html[data-theme="light"] .smart-direct-page .sd-report-kpis article{
  position:relative!important;
  overflow:hidden!important;
  background:linear-gradient(145deg,#fffdfb,#f4ede8)!important;
  color:#2d2730!important;
  border:1px solid rgba(84,59,74,.10)!important;
  border-radius:16px!important;
  box-shadow:0 11px 26px rgba(75,52,65,.055)!important;
}
html[data-theme="light"] .smart-direct-page .sd-report-kpis article::after{
  content:""!important;
  position:absolute!important;
  right:12px!important;
  left:12px!important;
  bottom:0!important;
  height:2px!important;
  border-radius:999px 999px 0 0!important;
  background:linear-gradient(90deg,#f97316,#8b5cf6)!important;
  opacity:.78!important;
}
html[data-theme="light"] .smart-direct-page .sd-report-kpis article b{
  color:#332b31!important;
}
html[data-theme="light"] .smart-direct-page .sd-report-grid>section{
  background:linear-gradient(145deg,#fffdfb,#f6efea)!important;
  border:1px solid rgba(84,59,74,.10)!important;
  border-radius:18px!important;
  box-shadow:0 13px 30px rgba(75,52,65,.055)!important;
}
html[data-theme="light"] .smart-direct-page .sd-report-row{
  background:#fffaf6!important;
  border:1px solid rgba(84,59,74,.085)!important;
  border-radius:12px!important;
  margin:7px 0!important;
  padding:10px 12px!important;
}
html[data-theme="light"] .smart-direct-page .sd-report-row:hover{
  background:linear-gradient(145deg,#fff6ed,#f5efff)!important;
  border-color:rgba(130,84,232,.16)!important;
}
html[data-theme="light"] .smart-direct-page .sd-report-row .is-completed{
  color:#15803d!important;
}
html[data-theme="light"] .smart-direct-page .sd-report-row .is-failed{
  color:#be123c!important;
}

/* Empty/loading states */
html[data-theme="light"] .smart-direct-page .sd-flow-empty-mini,
html[data-theme="light"] .smart-direct-page .sd-library-empty,
html[data-theme="light"] .smart-direct-page .sd-dm-empty{
  background:linear-gradient(145deg,#fffdfb,#f4eee9)!important;
  color:#746a72!important;
  border-color:rgba(84,59,74,.10)!important;
}

/* Pending follower-welcome studio: visibly draft-only, not a broken toggle. */
body>#sdStudioModal.sd-direct-body-portal.is-follower-provider-pending:not([hidden]) .sd-master-switch{
  border-style:dashed!important;
  border-color:rgba(245,158,11,.30)!important;
  background:color-mix(in srgb,#f59e0b 8%,var(--sdp-card,#211b22))!important;
}
body>#sdStudioModal.sd-direct-body-portal.is-follower-provider-pending:not([hidden]) .sd-master-switch b{
  color:#d97706!important;
}


/* 1.0.577 — mobile inspector fixed footer + follower welcome card containment */
.sd-inspector-scroll{display:contents}

.sd-event-card[data-event-card="instagram_follower_welcome"] .sd-mini-flow-card{
  flex-direction:column;
  align-items:stretch;
}
.sd-event-card[data-event-card="instagram_follower_welcome"] .sd-mini-flow-card>div:last-child{
  width:100%;
  min-width:0;
  flex:0 1 auto;
}
.sd-event-card[data-event-card="instagram_follower_welcome"] .sd-mini-flow-card>div:last-child button{
  flex:1 1 0;
  min-width:0;
}

@media(max-width:800px){
  .sd-studio-modal .sd-inspector{
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }
  .sd-studio-modal .sd-inspector-scroll{
    display:block!important;
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
    padding-bottom:8px!important;
  }
  .sd-studio-modal .sd-inspector-actions{
    position:static!important;
    bottom:auto!important;
    z-index:6!important;
    flex:0 0 auto!important;
    margin:0 -9px -9px!important;
    padding:9px!important;
    border-top:1px solid var(--sd-line)!important;
    background:#fffaf5!important;
    box-shadow:0 -10px 24px rgba(61,42,52,.10)!important;
  }
  html[data-theme="dark"] .sd-studio-modal .sd-inspector-actions{
    background:#181419!important;
    box-shadow:0 -10px 24px rgba(0,0,0,.24)!important;
  }
  .sd-studio-modal .sd-inspector.is-collapsed .sd-inspector-scroll{
    display:none!important;
  }
}


/* 1.0.590 — Inline Button -> Node routing */
.sd-node.has-inline-buttons{overflow:visible}
.sd-node-buttons{position:absolute;top:117px;right:10px;left:10px;display:grid;gap:5px}
.sd-node-inline-button{position:relative;height:26px;display:flex;align-items:center;gap:6px;padding:0 7px;border:1px solid rgba(139,92,246,.16);border-radius:8px;background:linear-gradient(135deg,rgba(139,92,246,.06),rgba(249,115,22,.05));color:#554a52;min-width:0}
.sd-node-inline-button.has-target{border-color:rgba(124,58,237,.32);background:linear-gradient(135deg,rgba(124,58,237,.10),rgba(249,115,22,.07))}
.sd-node-inline-button.is-invalid{border-color:rgba(220,38,38,.46);background:rgba(220,38,38,.06)}
.sd-node-button-kind{flex:0 0 auto;min-width:28px;font-size:10px;font-weight:1000;color:var(--node-color,var(--sd-purple));direction:ltr;text-align:center}
.sd-node-inline-button-copy{display:flex;align-items:center;gap:4px;min-width:0;flex:1}
.sd-node-inline-button-copy small{flex:0 0 auto;padding:1px 4px;border-radius:5px;background:rgba(107,92,103,.08);color:#877a83;font-size:8px;font-weight:900}
.sd-node-inline-button-copy b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:900}
.sd-port-button{left:-20px!important;top:50%!important;transform:translateY(-50%);width:13px;height:13px;border-width:2px;background:#8b5cf6}
.sd-port-button.is-connected{background:#f97316;box-shadow:0 0 0 2px rgba(249,115,22,.12)}
.sd-edge.is-button-edge{stroke:#8b5cf6;stroke-width:2.7;stroke-dasharray:5 3}
.sd-edge.is-button-edge.is-selected{stroke:#f97316;stroke-width:3.5;stroke-dasharray:none}
.sd-edge-preview.is-button-edge{stroke:#8b5cf6;stroke-width:3;stroke-dasharray:5 4}
.sd-edge-label{fill:#6d5d70;font-size:9px;font-weight:900;paint-order:stroke;stroke:#fffdf9;stroke-width:4px;stroke-linejoin:round;pointer-events:none}
.sd-button-list-editor{gap:10px}
.sd-button-editor-row{display:grid;gap:8px;padding:10px;border:1px solid rgba(139,92,246,.16);border-radius:12px;background:linear-gradient(145deg,#fff,#fbf7ff)}
.sd-button-editor-row label{display:grid;gap:5px}
.sd-button-editor-row label>span{font-size:10px;font-weight:900;color:var(--sd-muted)}
.sd-button-editor-head{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:6px;align-items:center}
.sd-button-editor-head button{width:34px;height:34px;border:1px solid rgba(220,38,38,.16);border-radius:9px;background:#fff1f2;color:#be123c;font-weight:1000}
.sd-button-url-field[hidden]{display:none!important}
.sd-button-editor-row .sd-editor-note{padding:7px 8px;font-size:10px}
html[data-theme="dark"] .sd-node-inline-button{background:linear-gradient(135deg,rgba(139,92,246,.13),rgba(249,115,22,.08));border-color:rgba(167,139,250,.20);color:#eee6ed}
html[data-theme="dark"] .sd-node-inline-button.has-target{border-color:rgba(167,139,250,.38);background:linear-gradient(135deg,rgba(124,58,237,.20),rgba(249,115,22,.10))}
html[data-theme="dark"] .sd-node-inline-button.is-invalid{border-color:rgba(248,113,113,.52);background:rgba(220,38,38,.12)}
html[data-theme="dark"] .sd-node-inline-button-copy small{background:rgba(255,255,255,.08);color:#b9adb5}
html[data-theme="dark"] .sd-edge-label{fill:#d9cddd;stroke:#181419}
html[data-theme="dark"] .sd-button-editor-row{background:linear-gradient(145deg,#211b22,#1b171d);border-color:rgba(167,139,250,.20)}
html[data-theme="dark"] .sd-button-editor-head button{background:rgba(190,18,60,.12);color:#fb7185;border-color:rgba(251,113,133,.16)}
@media(max-width:800px){.sd-node-button-kind{min-width:26px}.sd-button-editor-row{padding:9px}}


/* MSM 1.0.592 — Contact State + Button / Branch Analytics */
.sd-report-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.sd-report-buttons-panel{margin-top:11px;overflow:hidden;border:1px solid var(--sd-line);border-radius:17px;background:var(--sd-card)}
.sd-report-buttons-panel>header{padding:14px 15px;border-bottom:1px solid var(--sd-line);background:linear-gradient(135deg,rgba(15,118,110,.06),rgba(139,92,246,.05))}
.sd-report-buttons-panel>header small{display:block;color:#0f766e;font-size:10px;font-weight:1000;letter-spacing:.08em}
.sd-report-buttons-panel>header h3{margin:3px 0 2px;font-size:15px}
.sd-report-buttons-panel>header p{margin:0;color:var(--sd-muted);font-size:12px;line-height:1.8}
.sd-button-analytics-row>span{min-width:260px}
.sd-button-analytics-row>span>b{display:inline;color:var(--sd-text);font-size:13px}
html[data-theme="dark"] .sd-report-buttons-panel>header{background:linear-gradient(135deg,rgba(20,184,166,.10),rgba(139,92,246,.08))}
html[data-theme="dark"] .sd-report-buttons-panel>header small{color:#5eead4}
@media(max-width:800px){.sd-button-analytics-row{align-items:flex-start;flex-direction:column}.sd-button-analytics-row>span{min-width:0;width:100%;text-align:right}.sd-report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* MSM Site 1.0.598 — global flow title in header + description above inspector actions */
.sd-header-title{
  display:flex;
  align-items:center;
  gap:8px;
  width:clamp(190px,22vw,290px);
  min-width:180px;
  min-height:42px;
  padding:5px 8px;
  border:1px solid var(--sd-line);
  border-radius:13px;
  background:var(--sd-card,#fff);
  color:var(--sd-text);
  box-shadow:0 7px 18px rgba(0,0,0,.05);
}
.sd-header-title>span{
  flex:0 0 auto;
  color:var(--sd-muted);
  font-size:10px;
  font-weight:900;
  white-space:nowrap;
}
.sd-header-title input{
  min-width:0;
  flex:1 1 auto;
  width:100%;
  height:30px;
  padding:0 9px;
  border:1px solid var(--sd-line);
  border-radius:9px;
  outline:none;
  background:var(--sd-bg,#fffdf9);
  color:var(--sd-text);
  font:800 11px 'Vazirmatn',Tahoma,Arial,sans-serif;
}
.sd-header-title input:focus{
  border-color:rgba(139,92,246,.52);
  box-shadow:0 0 0 3px rgba(139,92,246,.10);
}
.sd-flow-description-bottom{
  flex:0 0 auto;
  padding:9px 0 0;
  direction:rtl;
  text-align:right;
}
.sd-flow-description-bottom label{
  display:grid;
  gap:6px;
}
.sd-flow-description-bottom label>span{
  color:var(--sd-muted);
  font-size:11px;
  font-weight:900;
}
.sd-flow-description-bottom textarea{
  display:block;
  width:100%;
  min-height:54px;
  max-height:88px;
  resize:vertical;
  padding:9px 10px;
  border:1px solid var(--sd-line);
  border-radius:11px;
  outline:none;
  background:var(--sd-bg,#fffdf9);
  color:var(--sd-text);
  font:inherit;
  font-size:11px;
  line-height:1.7;
}
.sd-flow-description-bottom textarea:focus{
  border-color:rgba(139,92,246,.52);
  box-shadow:0 0 0 3px rgba(139,92,246,.09);
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-header-title{
  background:var(--sdp-card,#211b22)!important;
  color:var(--sdp-text,#f7f1f5)!important;
  border-color:var(--sdp-line,rgba(255,255,255,.09))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-header-title>span,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-description-bottom label>span{
  color:var(--sdp-muted,#b9adb5)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-header-title input,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-description-bottom textarea{
  background:var(--sdp-bg,#171318)!important;
  color:var(--sdp-text,#f7f1f5)!important;
  border-color:var(--sdp-line,rgba(255,255,255,.09))!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-header-title{
  background:#fff!important;
  border-color:#ddd3d9!important;
  box-shadow:0 7px 18px rgba(64,44,55,.055)!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-header-title input,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-description-bottom textarea{
  background:#fffdfb!important;
  color:#2d2730!important;
  border-color:#ddd3d9!important;
}

/* Mobile-first: title gets its own clean first row; global controls stay directly below it. */
@media(max-width:800px){
  .sd-studio-header{
    min-height:94px!important;
    align-items:flex-start!important;
    padding:6px 8px!important;
    gap:6px!important;
  }
  .sd-studio-heading{
    flex:0 0 auto!important;
    padding-top:1px!important;
  }
  .sd-studio-header-actions{
    display:grid!important;
    grid-template-columns:minmax(94px,1fr) 76px 84px!important;
    grid-template-areas:
      "title title title"
      "max toggle save"!important;
    align-items:center!important;
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    gap:5px!important;
    margin-inline-start:0!important;
    overflow:visible!important;
  }
  .sd-header-title{
    grid-area:title;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:35px!important;
    height:35px!important;
    padding:3px 6px!important;
    border-radius:10px!important;
    gap:6px!important;
  }
  .sd-header-title>span{font-size:9px!important}
  .sd-header-title input{
    height:27px!important;
    padding-inline:7px!important;
    font-size:10px!important;
  }
  .sd-header-max{
    grid-area:max;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  .sd-master-switch{
    grid-area:toggle;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  .sd-studio-save{
    grid-area:save;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  .sd-studio-modal .sd-flow-description-bottom{
    padding:7px 0 8px!important;
  }
  .sd-studio-modal .sd-flow-description-bottom textarea{
    min-height:48px!important;
    max-height:66px!important;
    resize:none!important;
  }
  .sd-studio-modal .sd-inspector-actions{
    margin-top:0!important;
  }
}
@media(max-width:560px){
  .sd-studio-header{
    min-height:92px!important;
    flex-flow:row nowrap!important;
  }
  .sd-studio-header-actions{
    grid-template-columns:minmax(90px,1fr) 72px 80px!important;
    max-width:calc(100vw - 50px)!important;
  }
}
@media(max-width:390px){
  .sd-studio-header{
    min-height:90px!important;
    padding-inline:5px!important;
  }
  .sd-studio-header-actions{
    grid-template-columns:minmax(82px,1fr) 67px 72px!important;
    max-width:calc(100vw - 40px)!important;
    gap:3px!important;
  }
  .sd-header-title>span{font-size:8.3px!important}
  .sd-header-title input{font-size:9.4px!important}
}


/* MSM Site 1.0.599 — mobile Studio two-row control bar */
@media(max-width:800px){
  /* Row 1: close + اجرا/مخاطب + فعال + ذخیره نهایی */
  .sd-studio-header{
    min-height:52px!important;
    height:52px!important;
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:6px!important;
    padding:6px 8px!important;
    overflow:hidden!important;
  }
  .sd-studio-heading{
    flex:0 0 34px!important;
    width:34px!important;
    min-width:34px!important;
    padding:0!important;
    gap:0!important;
  }
  .sd-studio-heading .sd-studio-brand,
  .sd-studio-heading>div{
    display:none!important;
  }
  .sd-studio-close{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    border-radius:11px!important;
    font-size:20px!important;
  }
  .sd-studio-header-actions{
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:none!important;
    width:auto!important;
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:5px!important;
    margin:0!important;
    overflow:hidden!important;
  }
  .sd-studio-header-actions>.sd-header-title{
    display:none!important;
  }
  .sd-header-max{
    flex:0 1 112px!important;
    width:auto!important;
    min-width:96px!important;
    max-width:112px!important;
    height:38px!important;
    min-height:38px!important;
    gap:5px!important;
    padding:4px 6px!important;
    border-radius:12px!important;
  }
  .sd-header-max>span{
    flex:1 1 auto!important;
    min-width:0!important;
    font-size:8.7px!important;
    font-weight:950!important;
    letter-spacing:-.02em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
  }
  .sd-header-max input{
    flex:0 0 34px!important;
    width:34px!important;
    height:28px!important;
    padding:0 2px!important;
    border-radius:9px!important;
    font-size:11px!important;
    font-weight:1000!important;
  }
  .sd-master-switch{
    flex:0 0 74px!important;
    width:74px!important;
    min-width:74px!important;
    height:38px!important;
    min-height:38px!important;
    padding:4px 6px!important;
    gap:5px!important;
    border-radius:12px!important;
  }
  .sd-master-switch>b{
    font-size:9.5px!important;
    font-weight:950!important;
    white-space:nowrap!important;
  }
  .sd-switch-track{
    flex:0 0 32px!important;
    width:32px!important;
    height:20px!important;
  }
  .sd-switch-track i{
    width:14px!important;
    height:14px!important;
    top:3px!important;
    right:3px!important;
  }
  .sd-master-switch input:checked+.sd-switch-track i{
    right:15px!important;
  }
  .sd-studio-save{
    position:relative!important;
    isolation:isolate!important;
    overflow:hidden!important;
    flex:0 0 104px!important;
    width:104px!important;
    min-width:104px!important;
    height:38px!important;
    min-height:38px!important;
    padding:0 10px!important;
    gap:5px!important;
    border-radius:12px!important;
    border:1px solid rgba(255,255,255,.18)!important;
    background:linear-gradient(125deg,#ff7a18 0%,#f45135 40%,#8b5cf6 100%)!important;
    color:#fff!important;
    font-size:9.8px!important;
    font-weight:1000!important;
    letter-spacing:-.01em!important;
    box-shadow:0 8px 20px rgba(139,80,39,.28),inset 0 1px 0 rgba(255,255,255,.22)!important;
  }
  .sd-studio-save::before{
    content:""!important;
    position:absolute!important;
    z-index:-1!important;
    inset:-60% auto -60% -32%!important;
    width:36%!important;
    transform:rotate(18deg)!important;
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent)!important;
    pointer-events:none!important;
  }
  .sd-studio-save:active{
    transform:translateY(1px)!important;
    box-shadow:0 5px 13px rgba(139,80,39,.24),inset 0 1px 0 rgba(255,255,255,.16)!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-save{
    border-color:rgba(255,255,255,.44)!important;
    box-shadow:0 8px 20px rgba(153,76,34,.20),inset 0 1px 0 rgba(255,255,255,.36)!important;
  }

  /* Row 2: title input exactly where "جریان دایرکت" used to be + arrange/add */
  .sd-studio-toolbar{
    min-height:50px!important;
    height:50px!important;
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:6px!important;
    padding:6px 8px!important;
    overflow:hidden!important;
  }
  .sd-flow-context{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    display:flex!important;
    align-items:center!important;
    gap:0!important;
    overflow:hidden!important;
  }
  .sd-flow-context>span,
  .sd-flow-context>div{
    display:none!important;
  }
  .sd-flow-context>.sd-header-title{
    display:flex!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:38px!important;
    min-height:38px!important;
    padding:4px 6px!important;
    gap:0!important;
    border-radius:12px!important;
  }
  .sd-flow-context>.sd-header-title>span{
    display:none!important;
  }
  .sd-flow-context>.sd-header-title input{
    width:100%!important;
    min-width:0!important;
    height:28px!important;
    padding:0 8px!important;
    border-radius:8px!important;
    font-size:10.5px!important;
    font-weight:900!important;
    text-align:right!important;
  }
  .sd-toolbar-actions{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    gap:5px!important;
    overflow:visible!important;
  }
  .sd-auto-layout-button,
  .sd-add-node-button{
    flex:0 0 auto!important;
    min-width:0!important;
    height:38px!important;
    min-height:38px!important;
    padding:0 9px!important;
    border-radius:11px!important;
    font-size:9.5px!important;
    white-space:nowrap!important;
  }
  .sd-canvas-tools{
    display:none!important;
  }
}
@media(max-width:560px){
  .sd-studio-header{
    min-height:50px!important;
    height:50px!important;
    padding-inline:6px!important;
    gap:4px!important;
  }
  .sd-studio-heading{
    flex-basis:32px!important;
    width:32px!important;
    min-width:32px!important;
  }
  .sd-studio-close{
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
  }
  .sd-studio-header-actions{gap:4px!important}
  .sd-header-max{
    flex-basis:103px!important;
    min-width:91px!important;
    max-width:103px!important;
    padding-inline:5px!important;
  }
  .sd-header-max>span{font-size:8.2px!important}
  .sd-header-max input{
    flex-basis:31px!important;
    width:31px!important;
  }
  .sd-master-switch{
    flex-basis:69px!important;
    width:69px!important;
    min-width:69px!important;
    padding-inline:5px!important;
  }
  .sd-master-switch>b{font-size:9px!important}
  .sd-studio-save{
    flex-basis:94px!important;
    width:94px!important;
    min-width:94px!important;
    padding-inline:7px!important;
    font-size:9.2px!important;
  }
  .sd-studio-toolbar{
    padding-inline:6px!important;
    gap:4px!important;
  }
  .sd-auto-layout-button,
  .sd-add-node-button{
    padding-inline:7px!important;
    font-size:9px!important;
  }
}
@media(max-width:390px){
  .sd-studio-header{
    padding-inline:5px!important;
    gap:3px!important;
  }
  .sd-studio-heading{
    flex-basis:30px!important;
    width:30px!important;
    min-width:30px!important;
  }
  .sd-studio-close{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    font-size:18px!important;
  }
  .sd-studio-header-actions{gap:3px!important}
  .sd-header-max{
    flex:1 1 90px!important;
    min-width:86px!important;
    max-width:96px!important;
  }
  .sd-header-max>span{font-size:7.7px!important}
  .sd-header-max input{
    flex-basis:29px!important;
    width:29px!important;
    height:26px!important;
    font-size:10px!important;
  }
  .sd-master-switch{
    flex-basis:64px!important;
    width:64px!important;
    min-width:64px!important;
    gap:3px!important;
    padding-inline:4px!important;
  }
  .sd-master-switch>b{font-size:8.5px!important}
  .sd-switch-track{
    flex-basis:29px!important;
    width:29px!important;
  }
  .sd-master-switch input:checked+.sd-switch-track i{right:12px!important}
  .sd-studio-save{
    flex-basis:86px!important;
    width:86px!important;
    min-width:86px!important;
    padding-inline:5px!important;
    font-size:8.7px!important;
  }
  .sd-studio-toolbar{
    padding-inline:5px!important;
    gap:3px!important;
  }
  .sd-flow-context>.sd-header-title{
    height:36px!important;
    min-height:36px!important;
    padding-inline:4px!important;
  }
  .sd-auto-layout-button,
  .sd-add-node-button{
    height:36px!important;
    min-height:36px!important;
    padding-inline:6px!important;
    font-size:8.5px!important;
  }
}


/* MSM Site 1.0.600 — Start trigger owns flow metadata; header keeps only Active + Save */
.sd-trigger-flow-settings{
  display:grid;
  gap:10px;
  margin-top:10px;
  padding:12px;
  border:1px solid var(--sd-line);
  border-radius:15px;
  background:#fff;
  direction:rtl;
  text-align:right;
}
.sd-trigger-flow-settings[hidden]{display:none!important}
.sd-trigger-flow-settings-head{
  display:flex;
  align-items:center;
  gap:9px;
  padding-bottom:9px;
  border-bottom:1px solid var(--sd-line);
}
.sd-trigger-flow-settings-head>span{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:linear-gradient(135deg,var(--sd-orange-soft),var(--sd-purple-soft));
  color:var(--sd-orange);
  font-size:17px;
}
.sd-trigger-flow-settings-head b{
  display:block;
  color:var(--sd-text);
  font-size:12px;
  font-weight:950;
}
.sd-trigger-flow-settings-head small{
  display:block;
  margin-top:2px;
  color:var(--sd-muted);
  font-size:10px;
  line-height:1.55;
}
.sd-trigger-flow-settings label{
  display:grid;
  gap:6px;
}
.sd-trigger-flow-settings label>span{
  color:var(--sd-text);
  font-size:11px;
  font-weight:900;
}
.sd-trigger-flow-settings input,
.sd-trigger-flow-settings textarea{
  width:100%;
  border:1px solid var(--sd-line);
  border-radius:11px;
  background:#fffdf9;
  color:var(--sd-text);
  outline:none;
  padding:9px 10px;
  font:inherit;
  font-size:11px;
  line-height:1.7;
}
.sd-trigger-flow-settings textarea{
  min-height:68px;
  resize:vertical;
}
.sd-trigger-flow-settings input:focus,
.sd-trigger-flow-settings textarea:focus{
  border-color:rgba(139,92,246,.48);
  box-shadow:0 0 0 3px rgba(139,92,246,.09);
}
.sd-trigger-max{
  grid-template-columns:minmax(0,1fr) 70px!important;
  align-items:center;
  gap:10px!important;
}
.sd-trigger-max>span{
  grid-column:1;
  grid-row:1;
}
.sd-trigger-max input{
  grid-column:2;
  grid-row:1;
  height:36px;
  padding:0 6px;
  text-align:center;
  font-weight:950;
}

body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings{
  background:var(--sdp-card,#211b22)!important;
  border-color:var(--sdp-line,rgba(255,255,255,.09))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings-head{
  border-color:var(--sdp-line,rgba(255,255,255,.09))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings-head b,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings label>span{
  color:var(--sdp-text,#f7f1f5)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings-head small{
  color:var(--sdp-muted,#b9adb5)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings input,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings textarea{
  background:var(--sdp-bg,#171318)!important;
  color:var(--sdp-text,#f7f1f5)!important;
  border-color:var(--sdp-line,rgba(255,255,255,.09))!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings{
  background:#fff!important;
  border-color:#ddd3d9!important;
  box-shadow:0 7px 18px rgba(64,44,55,.045)!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings input,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings textarea{
  background:#fffdfb!important;
  color:#2d2730!important;
  border-color:#ddd3d9!important;
}

/* Give the lower block inspector a little more room on mobile. */
@media(max-width:800px){
  .sd-studio-modal .sd-inspector,
  .sd-studio-modal .sd-inspector.is-collapsed{
    flex-basis:min(46dvh,350px)!important;
    min-height:250px!important;
    max-height:min(46dvh,350px)!important;
  }
  .sd-trigger-flow-settings{
    margin-top:8px!important;
    padding:10px!important;
    gap:9px!important;
    border-radius:13px!important;
  }
  .sd-trigger-flow-settings textarea{
    min-height:62px!important;
    max-height:92px!important;
    resize:none!important;
  }
  .sd-trigger-max{
    grid-template-columns:minmax(0,1fr) 62px!important;
  }
  .sd-trigger-max input{
    height:34px!important;
    font-size:11px!important;
  }
}
@media(max-width:560px){
  .sd-studio-modal .sd-inspector,
  .sd-studio-modal .sd-inspector.is-collapsed{
    flex-basis:min(47dvh,330px)!important;
    min-height:245px!important;
    max-height:min(47dvh,330px)!important;
  }
}


/* MSM Site 1.0.601 — mobile-only single-row Studio controls + roomier inspector */
@media(max-width:800px){
  /* Desktop layout remains untouched. On mobile the toolbar actions are moved into this one header row by JS. */
  .sd-studio-header{
    min-height:48px!important;
    height:48px!important;
    padding:5px 7px!important;
    gap:5px!important;
    direction:rtl!important;
    align-items:center!important;
    justify-content:space-between!important;
    overflow:hidden!important;
  }
  .sd-studio-heading{
    flex:0 0 30px!important;
    width:30px!important;
    min-width:30px!important;
    padding:0!important;
    gap:0!important;
  }
  .sd-studio-heading .sd-studio-brand,
  .sd-studio-heading>div{
    display:none!important;
  }
  .sd-studio-close{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    border-radius:10px!important;
    font-size:18px!important;
  }
  .sd-studio-header-actions{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    display:flex!important;
    flex-flow:row nowrap!important;
    direction:ltr!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:4px!important;
    margin:0!important;
    overflow:hidden!important;
  }
  .sd-studio-header-actions>.sd-studio-save{order:1!important}
  .sd-studio-header-actions>.sd-master-switch{order:2!important}
  .sd-studio-header-actions>.sd-toolbar-actions{order:3!important}

  .sd-studio-header-actions .sd-toolbar-actions{
    display:flex!important;
    flex:0 1 auto!important;
    min-width:0!important;
    width:auto!important;
    gap:4px!important;
    direction:rtl!important;
    align-items:center!important;
    overflow:hidden!important;
  }
  .sd-studio-header-actions .sd-auto-layout-button,
  .sd-studio-header-actions .sd-add-node-button{
    flex:0 1 auto!important;
    min-width:0!important;
    height:36px!important;
    min-height:36px!important;
    padding:0 7px!important;
    border-radius:10px!important;
    font-size:8.8px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  .sd-studio-header-actions .sd-auto-layout-button span,
  .sd-studio-header-actions .sd-add-node-button span{
    font-size:10px!important;
  }
  .sd-studio-header-actions .sd-canvas-tools{
    display:none!important;
  }
  .sd-master-switch{
    flex:0 0 65px!important;
    width:65px!important;
    min-width:65px!important;
    height:36px!important;
    min-height:36px!important;
    padding:3px 5px!important;
    gap:4px!important;
    border-radius:10px!important;
    direction:rtl!important;
  }
  .sd-master-switch>b{
    font-size:8.8px!important;
    font-weight:950!important;
    white-space:nowrap!important;
  }
  .sd-switch-track{
    flex:0 0 29px!important;
    width:29px!important;
    height:19px!important;
  }
  .sd-switch-track i{
    width:13px!important;
    height:13px!important;
    top:3px!important;
    right:3px!important;
  }
  .sd-master-switch input:checked+.sd-switch-track i{
    right:13px!important;
  }
  .sd-studio-save{
    flex:0 0 88px!important;
    width:88px!important;
    min-width:88px!important;
    height:36px!important;
    min-height:36px!important;
    padding:0 6px!important;
    gap:4px!important;
    border-radius:10px!important;
    font-size:8.8px!important;
    font-weight:1000!important;
  }

  /* The old second control row is gone on mobile after its action group is moved into the header. */
  .sd-studio-toolbar{
    display:none!important;
    min-height:0!important;
    height:0!important;
    padding:0!important;
    border:0!important;
  }

  /* More vertical space for block settings. */
  .sd-studio-modal .sd-inspector,
  .sd-studio-modal .sd-inspector.is-collapsed{
    flex-basis:min(49dvh,372px)!important;
    min-height:268px!important;
    max-height:min(49dvh,372px)!important;
  }
  .sd-canvas-shell{
    min-height:165px!important;
  }

  /* Start trigger metadata is intentionally compact. */
  .sd-trigger-flow-settings{
    margin-top:6px!important;
    padding:9px!important;
    gap:7px!important;
  }
  .sd-trigger-flow-settings-head{
    gap:7px!important;
    padding-bottom:7px!important;
  }
  .sd-trigger-flow-settings-head>span{
    width:30px!important;
    height:30px!important;
    flex-basis:30px!important;
    font-size:15px!important;
  }
  .sd-trigger-flow-settings-head b{
    font-size:10.5px!important;
  }
  .sd-trigger-flow-settings-head small{
    font-size:8.8px!important;
    line-height:1.45!important;
  }
  .sd-trigger-flow-settings label{
    gap:4px!important;
  }
  .sd-trigger-flow-settings label>span{
    font-size:9.5px!important;
    line-height:1.35!important;
  }
  .sd-trigger-flow-settings input,
  .sd-trigger-flow-settings textarea{
    padding:7px 8px!important;
    border-radius:9px!important;
    font-size:9.8px!important;
    line-height:1.55!important;
  }
  .sd-trigger-flow-settings input::placeholder,
  .sd-trigger-flow-settings textarea::placeholder{
    font-size:9.3px!important;
  }
  .sd-trigger-flow-settings textarea{
    min-height:54px!important;
    max-height:78px!important;
  }
  .sd-trigger-max{
    grid-template-columns:minmax(0,1fr) 56px!important;
    gap:7px!important;
  }
  .sd-trigger-max>span{
    color:#3e3540!important;
    font-size:9.7px!important;
    font-weight:1000!important;
  }
  .sd-trigger-max input{
    height:31px!important;
    font-size:10px!important;
    font-weight:1000!important;
  }
  html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-max>span{
    color:#f4edf2!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-max>span{
    color:#302832!important;
  }
}
@media(max-width:390px){
  .sd-studio-header{
    padding-inline:4px!important;
    gap:3px!important;
  }
  .sd-studio-heading{
    flex-basis:28px!important;
    width:28px!important;
    min-width:28px!important;
  }
  .sd-studio-close{
    width:28px!important;
    height:28px!important;
    min-width:28px!important;
    font-size:17px!important;
  }
  .sd-studio-header-actions{
    gap:3px!important;
  }
  .sd-studio-header-actions .sd-toolbar-actions{
    gap:3px!important;
  }
  .sd-studio-header-actions .sd-auto-layout-button,
  .sd-studio-header-actions .sd-add-node-button{
    height:34px!important;
    min-height:34px!important;
    padding-inline:5px!important;
    font-size:8.1px!important;
  }
  .sd-master-switch{
    flex-basis:59px!important;
    width:59px!important;
    min-width:59px!important;
    height:34px!important;
    min-height:34px!important;
    padding-inline:4px!important;
  }
  .sd-master-switch>b{font-size:8.1px!important}
  .sd-studio-save{
    flex-basis:80px!important;
    width:80px!important;
    min-width:80px!important;
    height:34px!important;
    min-height:34px!important;
    padding-inline:4px!important;
    font-size:8.1px!important;
  }
  .sd-studio-modal .sd-inspector,
  .sd-studio-modal .sd-inspector.is-collapsed{
    flex-basis:min(50dvh,360px)!important;
    min-height:260px!important;
    max-height:min(50dvh,360px)!important;
  }
}


/* MSM Site 1.0.602 — slightly larger Start trigger typography on mobile only */
@media(max-width:800px){
  .sd-trigger-flow-settings-head b{
    font-size:11.5px!important;
  }
  .sd-trigger-flow-settings-head small{
    font-size:9.6px!important;
  }
  .sd-trigger-flow-settings label>span{
    font-size:10.3px!important;
  }
  .sd-trigger-flow-settings input,
  .sd-trigger-flow-settings textarea{
    font-size:10.6px!important;
  }
  .sd-trigger-flow-settings input::placeholder,
  .sd-trigger-flow-settings textarea::placeholder{
    font-size:10px!important;
  }
  .sd-trigger-max>span{
    font-size:10.4px!important;
  }
  .sd-trigger-max input{
    font-size:10.7px!important;
  }
}


/* MSM Site 1.0.603 — mobile Start trigger readability refinement */
@media(max-width:800px){
  .sd-trigger-flow-settings-head b{
    font-size:12px!important;
  }
  .sd-trigger-flow-settings-head small{
    font-size:10px!important;
  }
  .sd-trigger-flow-settings label>span{
    font-size:10.8px!important;
    font-weight:950!important;
  }
  .sd-trigger-flow-settings input,
  .sd-trigger-flow-settings textarea{
    font-size:11.4px!important;
  }
  .sd-trigger-flow-settings input::placeholder,
  .sd-trigger-flow-settings textarea::placeholder{
    font-size:10.7px!important;
  }
  .sd-trigger-max>span{
    font-size:10.9px!important;
  }
  .sd-trigger-max input{
    font-size:11.2px!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings-head b,
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings label>span,
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-max>span{
    color:#2b232a!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings-head small{
    color:#665a62!important;
  }
}


/* MSM Site 1.0.619 Form Node */
.sd-form-editor-card{position:relative;overflow:hidden}
.sd-form-editor-card:before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:3px;background:linear-gradient(180deg,#2563eb,#8b5cf6);opacity:.9}
.sd-form-options{display:grid;gap:8px;padding:10px;border:1px solid rgba(37,99,235,.14);border-radius:13px;background:linear-gradient(135deg,rgba(37,99,235,.045),rgba(139,92,246,.035))}
.sd-form-choice-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 34px;gap:6px;align-items:center}
.sd-form-choice-row button{width:34px;height:34px;border:1px solid rgba(239,68,68,.15);border-radius:9px;background:#fff1f2;color:#be123c;font-size:17px;font-weight:900;cursor:pointer}
.sd-form-add-choice{justify-self:start}
.sd-form-route-note{border-color:rgba(37,99,235,.22);background:rgba(37,99,235,.045)}
html[data-theme="dark"] .sd-form-options{background:linear-gradient(135deg,rgba(37,99,235,.10),rgba(139,92,246,.08));border-color:rgba(96,165,250,.16)}
html[data-theme="dark"] .sd-form-choice-row button{background:rgba(190,24,93,.12);color:#fda4af;border-color:rgba(251,113,133,.16)}
@media(max-width:800px){
  .sd-form-choice-row{grid-template-columns:minmax(0,1fr) 34px}
  .sd-form-choice-row input:nth-child(2){grid-column:1/-1;grid-row:2}
  .sd-form-choice-row button{grid-column:2;grid-row:1}
  .sd-form-editor-card .sd-inline-grid{grid-template-columns:1fr}
}


/* MSM Site 1.0.624 — Form Builder node preview cleanup */
.sd-node-form{
  overflow:visible;
}
.sd-node-form .sd-node-body{
  padding:10px 12px 12px;
}
.sd-node-form .sd-node-head{
  padding-inline-start:2px;
}
.sd-node-form .sd-node-preview{
  margin-top:9px;
  min-height:84px;
  padding:0;
  overflow:visible;
  background:transparent;
}
.sd-form-node-summary{
  display:grid;
  gap:5px;
  min-width:0;
}
.sd-form-node-row{
  min-width:0;
  display:grid;
  grid-template-columns:64px minmax(0,1fr);
  align-items:center;
  gap:7px;
  min-height:24px;
  padding:4px 7px;
  border:1px solid rgba(37,99,235,.12);
  border-radius:8px;
  background:linear-gradient(135deg,rgba(37,99,235,.055),rgba(139,92,246,.035));
}
.sd-form-node-row>span{
  color:#746a72;
  font-size:9.5px;
  font-weight:850;
  white-space:nowrap;
}
.sd-form-node-row>b{
  min-width:0;
  display:block;
  color:#342d33;
  font-size:10.2px;
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sd-form-node-row.is-question{
  grid-template-columns:64px minmax(0,1fr);
}
.sd-node-form .sd-port-label{
  left:-14px;
  z-index:13;
  transform:translateX(-100%) translateY(-50%);
  padding:2px 6px;
  border:1px solid rgba(68,52,66,.10);
  border-radius:999px;
  background:rgba(255,253,249,.96);
  box-shadow:0 3px 9px rgba(61,42,52,.07);
  font-size:9.5px;
  line-height:1.35;
}
.sd-node-form .sd-port-label.is-yes{
  top:41%;
  color:#16803d;
}
.sd-node-form .sd-port-label.is-no{
  top:70%;
  color:#c24141;
}
html[data-theme="dark"] .sd-form-node-row{
  background:linear-gradient(135deg,rgba(37,99,235,.14),rgba(139,92,246,.10));
  border-color:rgba(96,165,250,.16);
}
html[data-theme="dark"] .sd-form-node-row>span{
  color:#aaa0a8;
}
html[data-theme="dark"] .sd-form-node-row>b{
  color:#f2ebf1;
}
html[data-theme="dark"] .sd-node-form .sd-port-label{
  background:rgba(29,24,30,.96);
  border-color:rgba(255,255,255,.10);
  box-shadow:0 3px 10px rgba(0,0,0,.22);
}

/* MSM Site 1.0.628 — execution policy */
.sd-execution-policy-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;align-items:end}
.sd-trigger-flow-settings select{width:100%;border:1px solid var(--sd-line);border-radius:11px;background:#fffdf9;color:var(--sd-text);outline:none;padding:9px 10px;font:inherit;font-size:11px;line-height:1.7}
.sd-trigger-flow-settings select:focus{border-color:rgba(139,92,246,.48);box-shadow:0 0 0 3px rgba(139,92,246,.09)}
.sd-execution-policy-grid .sd-trigger-max{display:grid!important;grid-template-columns:minmax(0,1fr) 70px!important}
.sd-trigger-max.is-disabled{opacity:.48}
.sd-trigger-max input:disabled{cursor:not-allowed}
.sd-execution-policy-hint{display:block;margin-top:-2px;color:var(--sd-muted);font-size:9.5px;line-height:1.65}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings select{background:var(--sdp-bg,#171318)!important;color:var(--sdp-text,#f7f1f5)!important;border-color:var(--sdp-line,rgba(255,255,255,.09))!important}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-trigger-flow-settings select{background:#fffdfb!important;color:#2d2730!important;border-color:#ddd3d9!important}
@media(max-width:800px){.sd-execution-policy-grid{grid-template-columns:1fr 1fr;gap:7px}.sd-execution-policy-grid .sd-trigger-max{grid-template-columns:minmax(0,1fr) 58px!important}}

/* MSM Site 1.0.629 — compact execution policy controls */
.sd-execution-policy-block{display:grid;gap:6px}
.sd-execution-policy-title{display:block;color:var(--sd-text);font-size:11px;font-weight:900}
.sd-execution-policy-row{
  display:flex;
  direction:rtl;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  min-width:0;
}
.sd-execution-policy-row .sd-trigger-max{
  display:block!important;
  flex:0 0 72px;
  width:72px;
  min-width:72px;
  opacity:1;
}
.sd-execution-policy-row .sd-trigger-max input{
  width:100%!important;
  height:36px;
  padding:0 6px!important;
  margin:0;
  text-align:center;
  font-size:11px;
  font-weight:950;
  line-height:1;
  border-radius:10px;
  outline:0!important;
}
.sd-execution-policy-divider{
  flex:0 0 auto;
  color:var(--sd-muted);
  font-size:14px;
  font-weight:800;
  line-height:1;
}
.sd-execution-policy-select{
  display:block!important;
  flex:1 1 auto;
  min-width:0;
}
.sd-execution-policy-select select{
  width:100%;
  height:36px;
  padding:0 30px 0 9px!important;
  margin:0;
  border-radius:10px!important;
  font-size:10.5px!important;
  font-weight:850;
  line-height:1!important;
  outline:0!important;
  box-shadow:none!important;
  -webkit-appearance:auto;
  appearance:auto;
}
.sd-execution-policy-row input:focus,
.sd-execution-policy-row input:focus-visible,
.sd-execution-policy-row select:focus,
.sd-execution-policy-row select:focus-visible{
  outline:0!important;
  border-color:rgba(139,92,246,.55)!important;
  box-shadow:0 0 0 2px rgba(139,92,246,.10)!important;
}
.sd-execution-policy-row .sd-trigger-max.is-disabled{
  opacity:.42;
}
.sd-execution-policy-row .sd-trigger-max.is-disabled + .sd-execution-policy-divider{
  opacity:.42;
}
@media(max-width:800px){
  .sd-execution-policy-block{gap:5px}
  .sd-execution-policy-title{font-size:9.5px!important}
  .sd-execution-policy-row{gap:5px}
  .sd-execution-policy-row .sd-trigger-max{
    flex-basis:58px;
    width:58px;
    min-width:58px;
  }
  .sd-execution-policy-row .sd-trigger-max input{
    height:32px!important;
    font-size:10px!important;
    border-radius:9px!important;
  }
  .sd-execution-policy-divider{
    font-size:12px!important;
  }
  .sd-execution-policy-select select{
    height:32px!important;
    min-height:32px!important;
    padding-top:0!important;
    padding-bottom:0!important;
    font-size:9.5px!important;
    border-radius:9px!important;
  }
  .sd-execution-policy-hint{
    font-size:8.3px!important;
    line-height:1.5!important;
  }
}

/* 1.0.640 — Premium compact variable/emoji tools, shared by every Smart Direct flow editor.
   Mobile-first: icon-only one-line rail + clear custom tooltip on hover/focus/tap. */
.sd-text-tools{
  position:relative!important;display:flex!important;grid-template-columns:none!important;align-items:center!important;
  gap:4px!important;width:100%;margin:0 0 8px!important;direction:rtl;overflow:visible!important
}
.sd-text-tools .sd-personalization-compact{
  display:flex!important;flex:1 1 auto!important;align-items:center!important;gap:4px!important;min-width:0;overflow:visible!important
}
.sd-text-tools .sd-personalization-compact button,.sd-text-tools .sd-emoji-toggle{
  position:relative!important;flex:1 1 0!important;width:auto!important;min-width:28px!important;max-width:38px!important;
  height:32px!important;min-height:32px!important;padding:0!important;display:inline-grid!important;place-items:center!important;
  border-radius:10px!important;overflow:visible!important;isolation:isolate;-webkit-tap-highlight-color:transparent;
  transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease!important
}
.sd-text-tools .sd-personalization-compact button{
  border:1px solid rgba(139,92,246,.22)!important;background:linear-gradient(180deg,rgba(139,92,246,.11),rgba(139,92,246,.055))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.38),0 5px 16px rgba(99,63,155,.08)!important;color:var(--sd-text)!important
}
.sd-text-tools .sd-personalization-compact button:hover,.sd-text-tools .sd-personalization-compact button:focus-visible,
.sd-text-tools .sd-personalization-compact button.is-tooltip-visible{
  transform:translateY(-1px)!important;border-color:rgba(139,92,246,.52)!important;
  background:linear-gradient(180deg,rgba(139,92,246,.17),rgba(139,92,246,.09))!important;
  box-shadow:0 7px 20px rgba(99,63,155,.14),0 0 0 2px rgba(139,92,246,.08)!important;outline:none!important
}
.sd-text-tools .sd-tool-icon,.sd-text-tools .sd-emoji-toggle span{
  display:grid!important;place-items:center!important;width:18px!important;height:18px!important;flex:0 0 18px!important;
  font-size:14px!important;line-height:1!important;font-weight:900
}
.sd-text-tools .sd-emoji-wrap{
  position:relative;display:block!important;flex:0 0 32px!important;width:32px!important;min-width:32px!important;margin:0!important;overflow:visible!important
}
.sd-text-tools .sd-emoji-toggle{
  width:32px!important;max-width:32px!important;border:1px solid rgba(249,115,22,.26)!important;
  background:linear-gradient(180deg,rgba(249,115,22,.13),rgba(249,115,22,.06))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.38),0 5px 16px rgba(249,115,22,.08)!important;color:var(--sd-text)!important
}
.sd-text-tools .sd-emoji-toggle:hover,.sd-text-tools .sd-emoji-toggle:focus-visible,.sd-text-tools .sd-emoji-toggle.is-tooltip-visible,
.sd-text-tools .sd-emoji-toggle[aria-expanded="true"]{
  transform:translateY(-1px)!important;border-color:rgba(249,115,22,.54)!important;
  background:linear-gradient(180deg,rgba(249,115,22,.20),rgba(249,115,22,.10))!important;
  box-shadow:0 7px 20px rgba(249,115,22,.13),0 0 0 2px rgba(249,115,22,.07)!important;outline:none!important
}
.sd-text-tools [data-sd-tooltip]::after{
  content:attr(data-sd-tooltip);position:absolute;z-index:1205;top:calc(100% + 8px);inset-inline-start:50%;
  transform:translate(-50%,-4px);width:max-content;max-width:min(230px,calc(100vw - 28px));padding:7px 9px;
  border:1px solid rgba(139,92,246,.22);border-radius:10px;background:rgba(255,255,255,.96);color:#2d2332;
  box-shadow:0 12px 30px rgba(34,24,39,.18);backdrop-filter:blur(14px) saturate(145%);-webkit-backdrop-filter:blur(14px) saturate(145%);
  font-family:inherit;font-size:10px;font-weight:800;line-height:1.55;letter-spacing:0;white-space:normal;text-align:center;pointer-events:none;
  opacity:0;visibility:hidden;transition:opacity .14s ease,transform .14s ease,visibility .14s ease
}
.sd-text-tools [data-sd-tooltip]::before{
  content:"";position:absolute;z-index:1206;top:calc(100% + 4px);inset-inline-start:50%;width:8px;height:8px;
  border-inline-start:1px solid rgba(139,92,246,.22);border-top:1px solid rgba(139,92,246,.22);background:rgba(255,255,255,.96);
  transform:translateX(-50%) rotate(45deg);pointer-events:none;opacity:0;visibility:hidden;transition:opacity .14s ease,visibility .14s ease
}
.sd-text-tools [data-sd-tooltip]:hover::after,.sd-text-tools [data-sd-tooltip]:hover::before,
.sd-text-tools [data-sd-tooltip]:focus-visible::after,.sd-text-tools [data-sd-tooltip]:focus-visible::before,
.sd-text-tools [data-sd-tooltip].is-tooltip-visible::after,.sd-text-tools [data-sd-tooltip].is-tooltip-visible::before{opacity:1;visibility:visible}
.sd-text-tools [data-sd-tooltip]:hover::after,.sd-text-tools [data-sd-tooltip]:focus-visible::after,
.sd-text-tools [data-sd-tooltip].is-tooltip-visible::after{transform:translate(-50%,0)}
.sd-text-tools .sd-personalization-compact button:first-child::after{inset-inline-start:0;transform:translate(0,-4px)}
.sd-text-tools .sd-personalization-compact button:first-child:hover::after,
.sd-text-tools .sd-personalization-compact button:first-child:focus-visible::after,
.sd-text-tools .sd-personalization-compact button:first-child.is-tooltip-visible::after{transform:translate(0,0)}
.sd-text-tools .sd-emoji-toggle::after{inset-inline-start:auto;inset-inline-end:0;transform:translate(0,-4px)}
.sd-text-tools .sd-emoji-toggle:hover::after,.sd-text-tools .sd-emoji-toggle:focus-visible::after,
.sd-text-tools .sd-emoji-toggle.is-tooltip-visible::after{transform:translate(0,0)}
.sd-text-tools .sd-emoji-picker{
  top:40px!important;right:auto!important;left:0!important;width:min(286px,calc(100vw - 32px))!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:6px!important;padding:10px!important;
  border:1px solid rgba(139,92,246,.18)!important;border-radius:16px!important;background:rgba(255,255,255,.97)!important;
  box-shadow:0 20px 50px rgba(35,24,42,.20)!important;backdrop-filter:blur(18px) saturate(145%);
  -webkit-backdrop-filter:blur(18px) saturate(145%)
}
.sd-text-tools .sd-emoji-picker button{
  height:36px!important;border:1px solid transparent!important;border-radius:10px!important;background:rgba(139,92,246,.035)!important;
  font-size:20px!important;transition:transform .14s ease,background .14s ease,border-color .14s ease!important
}
.sd-text-tools .sd-emoji-picker button:hover,.sd-text-tools .sd-emoji-picker button:focus-visible{
  transform:translateY(-1px) scale(1.04)!important;border-color:rgba(139,92,246,.18)!important;
  background:rgba(139,92,246,.10)!important;outline:none!important
}
html[data-theme="dark"] .sd-text-tools .sd-personalization-compact button{
  border-color:rgba(196,181,253,.20)!important;background:linear-gradient(180deg,rgba(139,92,246,.18),rgba(139,92,246,.09))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 5px 16px rgba(0,0,0,.16)!important
}
html[data-theme="dark"] .sd-text-tools [data-sd-tooltip]::after{
  border-color:rgba(196,181,253,.20);background:rgba(29,24,32,.96);color:#f8f5fb;box-shadow:0 14px 34px rgba(0,0,0,.42)
}
html[data-theme="dark"] .sd-text-tools [data-sd-tooltip]::before{border-color:rgba(196,181,253,.20);background:rgba(29,24,32,.96)}
html[data-theme="dark"] .sd-text-tools .sd-emoji-toggle{
  border-color:rgba(251,146,60,.22)!important;background:linear-gradient(180deg,rgba(249,115,22,.18),rgba(249,115,22,.09))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 5px 16px rgba(0,0,0,.16)!important
}
html[data-theme="dark"] .sd-text-tools .sd-emoji-picker{
  border-color:rgba(196,181,253,.18)!important;background:rgba(29,24,32,.97)!important;box-shadow:0 22px 54px rgba(0,0,0,.48)!important
}
html[data-theme="dark"] .sd-text-tools .sd-emoji-picker button{background:rgba(255,255,255,.035)!important}
@media(max-width:560px){
  .sd-text-tools .sd-emoji-picker{
    position:fixed!important;right:12px!important;left:12px!important;top:auto!important;bottom:18px!important;
    width:auto!important;max-width:none!important;z-index:1208!important
  }
}
@media(min-width:561px){
  .sd-text-tools{gap:5px!important}.sd-text-tools .sd-personalization-compact{gap:5px!important}
  .sd-text-tools .sd-personalization-compact button,.sd-text-tools .sd-emoji-toggle{height:34px!important;min-height:34px!important;max-width:40px!important}
  .sd-text-tools .sd-emoji-wrap{flex-basis:34px!important;width:34px!important;min-width:34px!important}
  .sd-text-tools .sd-emoji-toggle{width:34px!important;max-width:34px!important}
}

/* 1.0.641 — fixed one-row Flow text tools: premium, readable, no scroll, lighter typography. */
.sd-text-tools{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  gap:3px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:visible!important;
}
.sd-text-tools .sd-personalization-compact{
  display:flex!important;
  flex:1 1 auto!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  gap:3px!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  overflow:visible!important;
}
.sd-text-tools .sd-personalization-compact button,
.sd-text-tools .sd-emoji-toggle{
  flex:1 1 0!important;
  width:0!important;
  min-width:0!important;
  max-width:none!important;
  height:42px!important;
  min-height:42px!important;
  padding:4px 1px 3px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:2px!important;
  border-radius:11px!important;
  white-space:nowrap!important;
  overflow:visible!important;
  line-height:1!important;
  box-sizing:border-box!important;
}
.sd-text-tools .sd-emoji-wrap{
  display:flex!important;
  flex:0 1 calc((100% - 24px)/9)!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  overflow:visible!important;
}
.sd-text-tools .sd-emoji-toggle{
  width:100%!important;
  max-width:none!important;
}
.sd-text-tools .sd-tool-icon,
.sd-text-tools .sd-emoji-toggle .sd-tool-icon{
  width:16px!important;
  height:16px!important;
  flex:0 0 16px!important;
  font-size:13px!important;
  line-height:16px!important;
  font-weight:600!important;
}
.sd-text-tools .sd-tool-label{
  display:block!important;
  width:100%;
  min-width:0;
  overflow:hidden;
  text-overflow:clip;
  white-space:nowrap;
  text-align:center;
  color:inherit;
  font-family:inherit;
  font-size:7.6px!important;
  font-weight:600!important;
  line-height:1.15!important;
  letter-spacing:-.08px;
}
.sd-text-tools .sd-personalization-compact button{
  border:1px solid rgba(124,92,191,.24)!important;
  background:
    radial-gradient(circle at 50% 0,rgba(255,255,255,.72),transparent 52%),
    linear-gradient(180deg,rgba(139,92,246,.105),rgba(139,92,246,.045))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.62),0 4px 12px rgba(70,45,106,.07)!important;
}
.sd-text-tools .sd-personalization-compact button:hover,
.sd-text-tools .sd-personalization-compact button:focus-visible,
.sd-text-tools .sd-personalization-compact button.is-tooltip-visible{
  transform:translateY(-1px)!important;
  border-color:rgba(124,92,191,.48)!important;
  background:
    radial-gradient(circle at 50% 0,rgba(255,255,255,.78),transparent 52%),
    linear-gradient(180deg,rgba(139,92,246,.16),rgba(139,92,246,.075))!important;
  box-shadow:0 6px 18px rgba(80,50,120,.12),inset 0 1px 0 rgba(255,255,255,.68)!important;
}
.sd-text-tools .sd-emoji-toggle{
  border:1px solid rgba(249,115,22,.26)!important;
  background:
    radial-gradient(circle at 50% 0,rgba(255,255,255,.72),transparent 52%),
    linear-gradient(180deg,rgba(249,115,22,.115),rgba(249,115,22,.05))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.62),0 4px 12px rgba(140,71,22,.07)!important;
}
.sd-text-tools .sd-emoji-toggle:hover,
.sd-text-tools .sd-emoji-toggle:focus-visible,
.sd-text-tools .sd-emoji-toggle.is-tooltip-visible,
.sd-text-tools .sd-emoji-toggle[aria-expanded="true"]{
  border-color:rgba(249,115,22,.52)!important;
  background:
    radial-gradient(circle at 50% 0,rgba(255,255,255,.78),transparent 52%),
    linear-gradient(180deg,rgba(249,115,22,.18),rgba(249,115,22,.08))!important;
  box-shadow:0 6px 18px rgba(140,71,22,.12),inset 0 1px 0 rgba(255,255,255,.68)!important;
}
.sd-text-tools [data-sd-tooltip]::after{
  z-index:1255!important;
  top:calc(100% + 7px)!important;
  max-width:min(236px,calc(100vw - 30px))!important;
  padding:7px 10px!important;
  border-radius:11px!important;
  font-family:inherit!important;
  font-size:9.5px!important;
  font-weight:500!important;
  line-height:1.65!important;
  letter-spacing:0!important;
  background:rgba(255,255,255,.975)!important;
  border:1px solid rgba(124,92,191,.20)!important;
  color:#3c3340!important;
  box-shadow:0 16px 38px rgba(35,24,42,.17)!important;
  backdrop-filter:blur(18px) saturate(150%)!important;
  -webkit-backdrop-filter:blur(18px) saturate(150%)!important;
}
.sd-text-tools [data-sd-tooltip]::before{
  z-index:1256!important;
  background:rgba(255,255,255,.975)!important;
  border-color:rgba(124,92,191,.20)!important;
}
html[data-theme="dark"] .sd-text-tools .sd-personalization-compact button{
  border-color:rgba(196,181,253,.20)!important;
  background:
    radial-gradient(circle at 50% 0,rgba(255,255,255,.09),transparent 55%),
    linear-gradient(180deg,rgba(139,92,246,.16),rgba(139,92,246,.075))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.065),0 5px 16px rgba(0,0,0,.16)!important;
}
html[data-theme="dark"] .sd-text-tools .sd-emoji-toggle{
  border-color:rgba(251,146,60,.22)!important;
  background:
    radial-gradient(circle at 50% 0,rgba(255,255,255,.08),transparent 55%),
    linear-gradient(180deg,rgba(249,115,22,.16),rgba(249,115,22,.075))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 5px 16px rgba(0,0,0,.16)!important;
}
html[data-theme="dark"] .sd-text-tools [data-sd-tooltip]::after{
  background:rgba(27,22,30,.98)!important;
  border-color:rgba(196,181,253,.20)!important;
  color:#f4eef8!important;
  box-shadow:0 18px 42px rgba(0,0,0,.46)!important;
}
html[data-theme="dark"] .sd-text-tools [data-sd-tooltip]::before{
  background:rgba(27,22,30,.98)!important;
  border-color:rgba(196,181,253,.20)!important;
}
@media(max-width:560px){
  .sd-text-tools{gap:2px!important}
  .sd-text-tools .sd-personalization-compact{gap:2px!important}
  .sd-text-tools .sd-personalization-compact button,
  .sd-text-tools .sd-emoji-toggle{
    height:40px!important;
    min-height:40px!important;
    padding:3px 0 2px!important;
    border-radius:10px!important;
  }
  .sd-text-tools .sd-tool-icon,
  .sd-text-tools .sd-emoji-toggle .sd-tool-icon{
    width:15px!important;height:15px!important;flex-basis:15px!important;font-size:12px!important;line-height:15px!important
  }
  .sd-text-tools .sd-tool-label{
    font-size:7px!important;
    font-weight:550!important;
    letter-spacing:-.1px;
  }
}
@media(min-width:561px){
  .sd-text-tools .sd-personalization-compact button,
  .sd-text-tools .sd-emoji-toggle{height:42px!important;min-height:42px!important;max-width:none!important}
}

/* 1.0.642 — tooltip alignment + orange premium tooltip + balanced emoji label. */
.sd-text-tools [data-sd-tooltip]::after{
  left:50%!important;
  right:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:auto!important;
  top:calc(100% + 8px)!important;
  transform:translate(-50%,-4px)!important;
  min-width:86px;
  max-width:min(210px,calc(100vw - 28px))!important;
  padding:7px 10px!important;
  border:1px solid rgba(251,146,60,.55)!important;
  border-radius:11px!important;
  background:linear-gradient(180deg,rgba(255,247,237,.985),rgba(255,237,213,.985))!important;
  color:#7c2d12!important;
  box-shadow:0 14px 32px rgba(234,88,12,.18),inset 0 1px 0 rgba(255,255,255,.85)!important;
  font-size:9.5px!important;
  font-weight:500!important;
  line-height:1.6!important;
  text-align:center!important;
}
.sd-text-tools [data-sd-tooltip]::before{
  left:50%!important;
  right:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:auto!important;
  top:calc(100% + 4px)!important;
  transform:translateX(-50%) rotate(45deg)!important;
  border-color:rgba(251,146,60,.55)!important;
  background:rgba(255,242,225,.99)!important;
}
.sd-text-tools [data-sd-tooltip]:hover::after,
.sd-text-tools [data-sd-tooltip]:focus-visible::after,
.sd-text-tools [data-sd-tooltip].is-tooltip-visible::after{
  transform:translate(-50%,0)!important;
}
/* Rightmost token: keep the tooltip inside the inspector while the arrow stays on the clicked icon. */
.sd-text-tools .sd-personalization-compact button:first-child::after{
  left:auto!important;
  right:0!important;
  transform:translate(0,-4px)!important;
}
.sd-text-tools .sd-personalization-compact button:first-child:hover::after,
.sd-text-tools .sd-personalization-compact button:first-child:focus-visible::after,
.sd-text-tools .sd-personalization-compact button:first-child.is-tooltip-visible::after{
  transform:translate(0,0)!important;
}
/* Emoji is visually the leftmost tool in RTL. */
.sd-text-tools .sd-emoji-toggle::after{
  left:0!important;
  right:auto!important;
  transform:translate(0,-4px)!important;
}
.sd-text-tools .sd-emoji-toggle:hover::after,
.sd-text-tools .sd-emoji-toggle:focus-visible::after,
.sd-text-tools .sd-emoji-toggle.is-tooltip-visible::after{
  transform:translate(0,0)!important;
}
html[data-theme="dark"] .sd-text-tools [data-sd-tooltip]::after{
  border-color:rgba(251,146,60,.48)!important;
  background:linear-gradient(180deg,rgba(67,38,24,.985),rgba(48,30,24,.985))!important;
  color:#ffedd5!important;
  box-shadow:0 16px 36px rgba(0,0,0,.42),0 0 0 1px rgba(249,115,22,.06) inset!important;
}
html[data-theme="dark"] .sd-text-tools [data-sd-tooltip]::before{
  border-color:rgba(251,146,60,.48)!important;
  background:rgba(58,34,24,.99)!important;
}
/* Emoji title must not visually overpower the variable labels. */
.sd-text-tools .sd-emoji-toggle .sd-tool-label{
  font-size:7px!important;
  font-weight:500!important;
  letter-spacing:-.08px!important;
}
@media(max-width:560px){
  .sd-text-tools [data-sd-tooltip]::after{
    max-width:min(190px,calc(100vw - 24px))!important;
    font-size:9px!important;
    padding:6px 9px!important;
  }
  .sd-text-tools .sd-emoji-toggle .sd-tool-label{
    font-size:6.7px!important;
  }
}

/* 1.0.643 — Message textarea focus must not draw the brown/orange outer box.
   Keep the field visually stable in both themes; cursor focus remains fully functional. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor textarea:focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor textarea:focus-visible{
  outline:none!important;
  border-color:var(--sdp-line)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor textarea:focus,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor textarea:focus-visible,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor textarea:focus,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-editor textarea:focus-visible{
  outline:none!important;
  border-color:var(--sdp-line)!important;
  box-shadow:none!important;
}

/* 1.0.644 — Compact Smart Direct hero: feature chips live inside the hero; redundant hero badges removed. */
.smart-direct-page .sd-hero{
  row-gap:16px!important;
}
.smart-direct-page .sd-hero-copy{
  min-width:0;
}
.smart-direct-page .sd-hero-feature-strip{
  grid-column:1/-1;
  display:flex!important;
  align-items:center;
  flex-wrap:wrap;
  gap:6px!important;
  margin:0!important;
  padding:12px 0 0!important;
  border-top:1px solid color-mix(in srgb,var(--sd-line) 72%,transparent);
  min-width:0;
}
.smart-direct-page .sd-hero-feature-strip span{
  min-height:28px;
  padding:5px 9px!important;
  gap:6px!important;
  border-radius:999px!important;
  font-size:10.5px!important;
  font-weight:650!important;
  line-height:1.25!important;
  box-shadow:0 5px 14px rgba(15,23,42,.07),inset 0 1px 0 rgba(255,255,255,.06)!important;
}
.smart-direct-page .sd-hero-feature-strip span::before{
  width:15px!important;
  height:15px!important;
  flex:0 0 15px!important;
  font-size:9px!important;
  font-weight:800!important;
  box-shadow:0 0 0 3px rgba(34,197,94,.09),0 4px 10px rgba(22,163,74,.12)!important;
}
.smart-direct-page .sd-hero-feature-strip .is-pending::before{
  box-shadow:0 0 0 3px rgba(168,85,247,.09),0 4px 10px rgba(124,58,237,.12)!important;
}
html[data-theme="light"] .smart-direct-page .sd-hero-feature-strip{
  border-top-color:rgba(88,62,78,.10)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-hero-feature-strip{
  border-top-color:rgba(255,255,255,.08)!important;
}
@media(max-width:800px){
  .smart-direct-page .sd-hero{
    gap:12px!important;
    padding:15px 14px!important;
  }
  .smart-direct-page .sd-hero h1{
    margin:5px 0 6px!important;
    font-size:25px!important;
  }
  .smart-direct-page .sd-hero-copy>p{
    font-size:12.5px!important;
    line-height:1.72!important;
  }
  .smart-direct-page .sd-hero-control{
    padding:11px 12px!important;
    gap:10px!important;
    border-radius:16px!important;
  }
  .smart-direct-page .sd-hero-control-icon{
    width:38px!important;
    height:38px!important;
    border-radius:12px!important;
    font-size:19px!important;
  }
  .smart-direct-page .sd-hero-control strong{
    font-size:13px!important;
  }
  .smart-direct-page .sd-hero-control small,
  .smart-direct-page .sd-hero-control span:not(.sd-hero-control-icon){
    font-size:10.5px!important;
  }
  .smart-direct-page .sd-hero-feature-strip{
    flex-wrap:nowrap!important;
    gap:5px!important;
    margin:0 -2px!important;
    padding:9px 2px 1px!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    overscroll-behavior-inline:contain;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .smart-direct-page .sd-hero-feature-strip::-webkit-scrollbar{
    display:none;
  }
  .smart-direct-page .sd-hero-feature-strip span{
    flex:0 0 auto!important;
    min-height:26px!important;
    padding:4px 8px!important;
    font-size:9.5px!important;
    scroll-snap-align:start;
  }
  .smart-direct-page .sd-hero-feature-strip span::before{
    width:14px!important;
    height:14px!important;
    flex-basis:14px!important;
    font-size:8px!important;
  }
}
@media(max-width:560px){
  .smart-direct-page .sd-hero{
    padding:13px 12px!important;
    border-radius:18px!important;
  }
  .smart-direct-page .sd-kicker{
    font-size:10px!important;
  }
  .smart-direct-page .sd-kicker i{
    width:22px!important;
  }
  .smart-direct-page .sd-hero h1{
    font-size:23px!important;
  }
  .smart-direct-page .sd-hero-copy>p{
    font-size:12px!important;
    line-height:1.65!important;
  }
  .smart-direct-page .sd-hero-feature-strip{
    padding-top:8px!important;
  }
}

/* 1.0.645 — Mobile mode tabs: compact 2×2 grid instead of four stacked cards. */
@media(max-width:620px){
  .smart-direct-page .sd-mode-tabs{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    margin:10px 0!important;
    width:100%!important;
  }
  .smart-direct-page .sd-mode-tabs button{
    min-width:0!important;
    min-height:72px!important;
    height:auto!important;
    padding:9px 10px!important;
    display:grid!important;
    grid-template-columns:36px minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    border-radius:15px!important;
    text-align:right!important;
    overflow:hidden!important;
  }
  .smart-direct-page .sd-mode-tabs .sd-mode-icon{
    width:36px!important;
    height:36px!important;
    flex:0 0 36px!important;
    border-radius:11px!important;
    font-size:19px!important;
  }
  .smart-direct-page .sd-mode-tabs button>div{
    min-width:0!important;
  }
  .smart-direct-page .sd-mode-tabs b{
    display:block!important;
    margin:0!important;
    font-size:11.5px!important;
    font-weight:750!important;
    line-height:1.35!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .smart-direct-page .sd-mode-tabs small{
    display:block!important;
    margin-top:3px!important;
    font-size:9.5px!important;
    font-weight:400!important;
    line-height:1.35!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}
@media(max-width:380px){
  .smart-direct-page .sd-mode-tabs{
    gap:6px!important;
  }
  .smart-direct-page .sd-mode-tabs button{
    grid-template-columns:32px minmax(0,1fr)!important;
    min-height:68px!important;
    padding:8px!important;
    gap:6px!important;
  }
  .smart-direct-page .sd-mode-tabs .sd-mode-icon{
    width:32px!important;
    height:32px!important;
    flex-basis:32px!important;
    font-size:17px!important;
  }
  .smart-direct-page .sd-mode-tabs b{
    font-size:10.5px!important;
  }
  .smart-direct-page .sd-mode-tabs small{
    font-size:8.8px!important;
  }
}

/* 1.0.646 — Mobile mode navigation lands cleanly on the selected panel. */
@media(max-width:620px){
  .smart-direct-page [data-sd-mode-panel]{
    scroll-margin-top:12px;
  }
}

/* 1.0.647 — Mode cards keep their own identity color.
   Changing mode must never recolor the other three cards. */
.smart-direct-page .sd-mode-tabs button:nth-child(1)::after{
  background:linear-gradient(90deg,#f97316,#fb923c)!important;
}
.smart-direct-page .sd-mode-tabs button:nth-child(2)::after{
  background:linear-gradient(90deg,#7c3aed,#a78bfa)!important;
}
.smart-direct-page .sd-mode-tabs button:nth-child(3)::after{
  background:linear-gradient(90deg,#0891b2,#22d3ee)!important;
}
.smart-direct-page .sd-mode-tabs button:nth-child(4)::after{
  background:linear-gradient(90deg,#ca8a04,#facc15)!important;
}

/* Light: only the selected card gets its own subtle tint. */
html[data-theme="light"] .smart-direct-page .sd-mode-tabs button:nth-child(1).active{
  background:linear-gradient(145deg,#fff8f1,#fff3e8)!important;
  border-color:rgba(249,115,22,.38)!important;
  box-shadow:0 15px 34px rgba(249,115,22,.10)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mode-tabs button:nth-child(2).active{
  background:linear-gradient(145deg,#fbf8ff,#f3edff)!important;
  border-color:rgba(139,92,246,.38)!important;
  box-shadow:0 15px 34px rgba(139,92,246,.10)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mode-tabs button:nth-child(3).active{
  background:linear-gradient(145deg,#f5fdff,#eafbff)!important;
  border-color:rgba(6,182,212,.36)!important;
  box-shadow:0 15px 34px rgba(6,182,212,.09)!important;
}
html[data-theme="light"] .smart-direct-page .sd-mode-tabs button:nth-child(4).active{
  background:linear-gradient(145deg,#fffdf3,#fff8d9)!important;
  border-color:rgba(234,179,8,.38)!important;
  box-shadow:0 15px 34px rgba(234,179,8,.09)!important;
}

/* Dark: same rule, each active card uses only its own accent. */
html[data-theme="dark"] .smart-direct-page .sd-mode-tabs button:nth-child(1).active{
  background:linear-gradient(145deg,rgba(249,115,22,.16),#1d1718)!important;
  border-color:rgba(249,115,22,.42)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-mode-tabs button:nth-child(2).active{
  background:linear-gradient(145deg,rgba(139,92,246,.17),#1c1821)!important;
  border-color:rgba(139,92,246,.42)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-mode-tabs button:nth-child(3).active{
  background:linear-gradient(145deg,rgba(6,182,212,.15),#171d20)!important;
  border-color:rgba(6,182,212,.40)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-mode-tabs button:nth-child(4).active{
  background:linear-gradient(145deg,rgba(234,179,8,.15),#1f1d17)!important;
  border-color:rgba(234,179,8,.40)!important;
}

/* Hover also respects each card instead of the current global mode accent. */
.smart-direct-page .sd-mode-tabs button:nth-child(1):hover{border-color:rgba(249,115,22,.30)!important}
.smart-direct-page .sd-mode-tabs button:nth-child(2):hover{border-color:rgba(139,92,246,.30)!important}
.smart-direct-page .sd-mode-tabs button:nth-child(3):hover{border-color:rgba(6,182,212,.29)!important}
.smart-direct-page .sd-mode-tabs button:nth-child(4):hover{border-color:rgba(234,179,8,.30)!important}

/* 1.0.648 — Restore per-card mode colors.
   The light-theme pseudo line must use each card's nth-child color, not the global active-mode accent. */

/* 1.0.649 — Reports: premium 10-row pagination + exact execution time chip. */
.sd-report-pagination{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 11px;
  border-top:1px solid var(--sd-line);
  background:linear-gradient(180deg,color-mix(in srgb,var(--sd-card) 94%,transparent),color-mix(in srgb,var(--sd-gold,#eab308) 4%,var(--sd-card)));
}
.sd-report-range{
  color:var(--sd-muted);
  font-size:10.5px;
  font-weight:600;
  white-space:nowrap;
}
.sd-report-page-controls{
  display:flex;
  align-items:center;
  gap:5px;
}
.sd-report-page-controls button{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--sd-line);
  border-radius:9px;
  background:var(--sd-card);
  color:var(--sd-text);
  font-size:11px;
  font-weight:650;
  line-height:1;
  box-shadow:0 4px 12px rgba(55,42,31,.045);
  transition:transform .14s ease,border-color .14s ease,background .14s ease,box-shadow .14s ease;
}
.sd-report-page-controls button:hover:not(:disabled){
  transform:translateY(-1px);
  border-color:rgba(234,179,8,.40);
  box-shadow:0 7px 17px rgba(202,138,4,.10);
}
.sd-report-page-controls button.is-current{
  border-color:rgba(234,179,8,.55);
  background:linear-gradient(145deg,#fff7c7,#fde68a);
  color:#713f12;
  box-shadow:0 7px 18px rgba(202,138,4,.16),inset 0 1px 0 rgba(255,255,255,.75);
}
.sd-report-page-controls button.is-nav{
  font-size:17px;
  font-weight:500;
}
.sd-report-page-controls button:disabled{
  opacity:.35;
  cursor:default;
  box-shadow:none;
}
.sd-report-execution-side{
  display:flex!important;
  flex-direction:column;
  align-items:flex-end;
  gap:5px;
  min-width:154px;
}
.sd-report-time{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:25px;
  padding:4px 8px;
  border:1px solid rgba(234,179,8,.26);
  border-radius:999px;
  background:linear-gradient(145deg,rgba(254,249,195,.85),rgba(255,247,237,.92));
  color:#854d0e;
  font-size:9.5px;
  font-weight:550;
  line-height:1.25;
  white-space:nowrap;
  font-style:normal;
  box-shadow:0 4px 12px rgba(202,138,4,.08);
}
.sd-report-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:23px;
  padding:3px 8px;
  border-radius:999px;
  font-size:9.5px;
  font-weight:650;
  font-style:normal;
  line-height:1;
}
.sd-report-status.is-completed{background:rgba(34,197,94,.11);color:#15803d;border:1px solid rgba(34,197,94,.18)}
.sd-report-status.is-failed{background:rgba(244,63,94,.10);color:#be123c;border:1px solid rgba(244,63,94,.17)}
.sd-report-status.is-queued{background:rgba(245,158,11,.11);color:#b45309;border:1px solid rgba(245,158,11,.18)}
.sd-report-status.is-running{background:rgba(14,165,233,.10);color:#0369a1;border:1px solid rgba(14,165,233,.18)}
html[data-theme="dark"] .sd-report-pagination{
  background:linear-gradient(180deg,#1c181d,#211d18);
}
html[data-theme="dark"] .sd-report-page-controls button{
  background:#211b22;
  color:#f3edf2;
  border-color:rgba(255,255,255,.10);
  box-shadow:0 5px 14px rgba(0,0,0,.18);
}
html[data-theme="dark"] .sd-report-page-controls button.is-current{
  background:linear-gradient(145deg,rgba(234,179,8,.28),rgba(161,98,7,.18));
  border-color:rgba(250,204,21,.42);
  color:#fef3c7;
}
html[data-theme="dark"] .sd-report-time{
  background:linear-gradient(145deg,rgba(234,179,8,.16),rgba(120,53,15,.12));
  border-color:rgba(250,204,21,.24);
  color:#fde68a;
  box-shadow:0 5px 14px rgba(0,0,0,.16);
}
html[data-theme="dark"] .sd-report-status.is-completed{color:#86efac;background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.20)}
html[data-theme="dark"] .sd-report-status.is-failed{color:#fda4af;background:rgba(244,63,94,.12);border-color:rgba(244,63,94,.20)}
html[data-theme="dark"] .sd-report-status.is-queued{color:#fcd34d;background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.20)}
html[data-theme="dark"] .sd-report-status.is-running{color:#7dd3fc;background:rgba(14,165,233,.12);border-color:rgba(14,165,233,.20)}
@media(max-width:800px){
  .sd-report-recent-row{
    align-items:flex-start!important;
  }
  .sd-report-execution-side{
    min-width:0;
    align-items:flex-start;
  }
}
@media(max-width:560px){
  .sd-report-pagination{
    min-height:45px;
    padding:7px 8px;
    gap:7px;
  }
  .sd-report-page-controls{
    gap:3px;
  }
  .sd-report-page-controls button{
    width:27px;
    height:27px;
    border-radius:8px;
    font-size:10px;
  }
  .sd-report-page-controls button.is-nav{
    font-size:15px;
  }
  .sd-report-range{
    font-size:9px;
  }
  .sd-report-recent-row{
    flex-direction:column!important;
    gap:8px!important;
  }
  .sd-report-execution-side{
    width:100%;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
  }
  .sd-report-time{
    font-size:9px;
    padding:4px 7px;
  }
}

/* 1.0.650 — Premium collapsed-inspector restore icon + clearer report time chip. */
.sd-inspector-window-actions button.is-expand{
  position:relative!important;
  display:grid!important;
  place-items:center!important;
  font-size:0!important;
  color:#a78bfa!important;
  border-color:rgba(167,139,250,.30)!important;
  background:
    radial-gradient(circle at 30% 20%,rgba(255,255,255,.16),transparent 46%),
    linear-gradient(145deg,rgba(139,92,246,.15),rgba(249,115,22,.08))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 8px 20px rgba(76,45,112,.16)!important;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease!important;
}
.sd-inspector-window-actions button.is-expand::before,
.sd-inspector-window-actions button.is-expand::after{
  content:"";
  position:absolute;
  width:8px;
  height:8px;
  border-style:solid;
  border-color:currentColor;
  opacity:.98;
  pointer-events:none;
}
.sd-inspector-window-actions button.is-expand::before{
  top:8px;
  right:8px;
  border-width:1.8px 1.8px 0 0;
  border-radius:0 2px 0 0;
}
.sd-inspector-window-actions button.is-expand::after{
  left:8px;
  bottom:8px;
  border-width:0 0 1.8px 1.8px;
  border-radius:0 0 0 2px;
}
.sd-inspector-window-actions button.is-expand:hover,
.sd-inspector-window-actions button.is-expand:focus-visible{
  transform:translateY(-1px) scale(1.035)!important;
  color:#c4b5fd!important;
  border-color:rgba(167,139,250,.52)!important;
  background:
    radial-gradient(circle at 30% 20%,rgba(255,255,255,.22),transparent 46%),
    linear-gradient(145deg,rgba(139,92,246,.22),rgba(249,115,22,.10))!important;
  box-shadow:0 10px 24px rgba(92,52,139,.22),inset 0 1px 0 rgba(255,255,255,.12)!important;
}
html[data-theme="light"] .sd-inspector-window-actions button.is-expand{
  color:#6d28d9!important;
  border-color:rgba(109,40,217,.22)!important;
  background:linear-gradient(145deg,#faf7ff,#f4edff)!important;
  box-shadow:0 7px 18px rgba(109,40,217,.10),inset 0 1px 0 rgba(255,255,255,.90)!important;
}
html[data-theme="light"] .sd-inspector-window-actions button.is-expand:hover,
html[data-theme="light"] .sd-inspector-window-actions button.is-expand:focus-visible{
  color:#5b21b6!important;
  border-color:rgba(109,40,217,.40)!important;
  background:linear-gradient(145deg,#f7f1ff,#efe5ff)!important;
}

/* Report execution date/time should be easier to scan without becoming heavy. */
.sd-report-time{
  min-height:28px!important;
  padding:5px 10px!important;
  font-size:10.8px!important;
  font-weight:650!important;
  letter-spacing:.01em;
  border-color:rgba(234,179,8,.34)!important;
  box-shadow:0 6px 16px rgba(202,138,4,.11)!important;
}
html[data-theme="dark"] .sd-report-time{
  color:#fef3c7!important;
  border-color:rgba(250,204,21,.32)!important;
  background:linear-gradient(145deg,rgba(234,179,8,.20),rgba(120,53,15,.15))!important;
  box-shadow:0 7px 18px rgba(0,0,0,.20)!important;
}
@media(max-width:560px){
  .sd-report-time{
    min-height:27px!important;
    padding:5px 8px!important;
    font-size:10.2px!important;
    font-weight:650!important;
  }
}

/* 1.0.651 — Clear numeric metric chips for flow runs and button analytics. */
.sd-report-metrics{
  display:flex!important;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
  color:inherit!important;
  text-align:inherit!important;
}
.sd-report-metric{
  min-width:58px;
  min-height:42px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  padding:5px 8px;
  border:1px solid rgba(139,92,246,.15);
  border-radius:11px;
  background:linear-gradient(145deg,rgba(255,255,255,.78),rgba(247,242,249,.88));
  box-shadow:0 5px 14px rgba(67,47,64,.055),inset 0 1px 0 rgba(255,255,255,.74);
}
.sd-report-metric>b{
  display:block!important;
  margin:0!important;
  color:var(--sd-text);
  font-size:15.5px!important;
  font-weight:800!important;
  line-height:1!important;
  font-variant-numeric:tabular-nums;
}
.sd-report-metric>small{
  display:block!important;
  margin:0!important;
  color:var(--sd-muted)!important;
  font-size:8.8px!important;
  font-weight:600!important;
  line-height:1.15!important;
  white-space:nowrap;
}
.sd-report-metric.is-runs{
  border-color:rgba(249,115,22,.26);
  background:linear-gradient(145deg,rgba(255,247,237,.96),rgba(255,237,213,.82));
}
.sd-report-metric.is-runs>b{color:#c2410c}
.sd-report-metric.is-success{
  border-color:rgba(34,197,94,.22);
  background:linear-gradient(145deg,rgba(240,253,244,.96),rgba(220,252,231,.80));
}
.sd-report-metric.is-success>b{color:#15803d}
.sd-report-metric.is-error{
  border-color:rgba(244,63,94,.20);
  background:linear-gradient(145deg,rgba(255,241,242,.96),rgba(255,228,230,.80));
}
.sd-report-metric.is-error>b{color:#be123c}
.sd-report-metric.is-clicks{
  min-width:66px;
  border-color:rgba(14,165,233,.28);
  background:linear-gradient(145deg,rgba(240,249,255,.98),rgba(224,242,254,.86));
  box-shadow:0 7px 18px rgba(14,165,233,.10),inset 0 1px 0 rgba(255,255,255,.80);
}
.sd-report-metric.is-clicks>b{
  color:#0369a1;
  font-size:17px!important;
}
.sd-report-metric.is-branch{border-color:rgba(139,92,246,.22)}
.sd-report-metric.is-branch>b{color:#7c3aed}
.sd-report-metric.is-impressions{border-color:rgba(249,115,22,.20)}
.sd-report-metric.is-impressions>b{color:#c2410c}
.sd-report-metric.is-ctr{border-color:rgba(234,179,8,.22)}
.sd-report-metric.is-ctr>b{color:#a16207}
.sd-report-metric.is-unique{border-color:rgba(20,184,166,.22)}
.sd-report-metric.is-unique>b{color:#0f766e}

html[data-theme="dark"] .sd-report-metric{
  background:linear-gradient(145deg,#241e25,#1c181d);
  border-color:rgba(255,255,255,.10);
  box-shadow:0 6px 16px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.04);
}
html[data-theme="dark"] .sd-report-metric>b{color:#f5eff5}
html[data-theme="dark"] .sd-report-metric>small{color:#bfb2bd!important}
html[data-theme="dark"] .sd-report-metric.is-runs{border-color:rgba(249,115,22,.28);background:linear-gradient(145deg,rgba(249,115,22,.15),#1d181b)}
html[data-theme="dark"] .sd-report-metric.is-runs>b{color:#fdba74}
html[data-theme="dark"] .sd-report-metric.is-success{border-color:rgba(34,197,94,.25);background:linear-gradient(145deg,rgba(34,197,94,.13),#181d1a)}
html[data-theme="dark"] .sd-report-metric.is-success>b{color:#86efac}
html[data-theme="dark"] .sd-report-metric.is-error{border-color:rgba(244,63,94,.24);background:linear-gradient(145deg,rgba(244,63,94,.13),#1e181b)}
html[data-theme="dark"] .sd-report-metric.is-error>b{color:#fda4af}
html[data-theme="dark"] .sd-report-metric.is-clicks{border-color:rgba(56,189,248,.30);background:linear-gradient(145deg,rgba(14,165,233,.18),#171d21)}
html[data-theme="dark"] .sd-report-metric.is-clicks>b{color:#7dd3fc}
html[data-theme="dark"] .sd-report-metric.is-branch>b{color:#c4b5fd}
html[data-theme="dark"] .sd-report-metric.is-impressions>b{color:#fdba74}
html[data-theme="dark"] .sd-report-metric.is-ctr>b{color:#fde68a}
html[data-theme="dark"] .sd-report-metric.is-unique>b{color:#5eead4}

@media(max-width:800px){
  .sd-report-row>.sd-report-metrics{
    width:100%;
    justify-content:flex-start;
  }
  .sd-report-metric{
    flex:1 1 72px;
    min-width:66px;
  }
}
@media(max-width:560px){
  .sd-report-metrics{
    gap:5px;
  }
  .sd-report-metric{
    min-height:39px;
    padding:4px 6px;
    border-radius:10px;
  }
  .sd-report-metric>b{
    font-size:14.5px!important;
  }
  .sd-report-metric.is-clicks>b{
    font-size:16px!important;
  }
  .sd-report-metric>small{
    font-size:8.2px!important;
  }
}

/* 1.0.652 — anchored canvas zoom + premium collapsed Inspector expand control. */
.sd-inspector-window-actions button.is-expand{
  overflow:visible!important;
  border-radius:11px!important;
  color:#d8ccff!important;
  border:1px solid rgba(196,181,253,.30)!important;
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.18),transparent 38%),
    linear-gradient(145deg,rgba(124,58,237,.24),rgba(91,33,182,.16))!important;
  box-shadow:
    0 8px 24px rgba(76,29,149,.22),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 0 0 1px rgba(255,255,255,.03)!important;
}
.sd-inspector-window-actions button.is-expand::before,
.sd-inspector-window-actions button.is-expand::after{
  content:none!important;
}
.sd-inspector-window-actions button.is-expand .sd-expand-icon{
  width:18px!important;
  height:18px!important;
  display:block!important;
  overflow:visible!important;
  filter:drop-shadow(0 2px 5px rgba(76,29,149,.28));
}
.sd-inspector-window-actions button.is-expand .sd-expand-icon path{
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.65!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  vector-effect:non-scaling-stroke;
}
.sd-inspector-window-actions button.is-expand:hover,
.sd-inspector-window-actions button.is-expand:focus-visible{
  transform:translateY(-1px) scale(1.045)!important;
  color:#f2ecff!important;
  border-color:rgba(196,181,253,.50)!important;
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.22),transparent 38%),
    linear-gradient(145deg,rgba(139,92,246,.34),rgba(109,40,217,.22))!important;
  box-shadow:
    0 11px 27px rgba(76,29,149,.30),
    0 0 0 3px rgba(139,92,246,.08),
    inset 0 1px 0 rgba(255,255,255,.14)!important;
}
html[data-theme="light"] .sd-inspector-window-actions button.is-expand{
  color:#6d28d9!important;
  border-color:rgba(109,40,217,.22)!important;
  background:
    radial-gradient(circle at 30% 20%,#fff,transparent 38%),
    linear-gradient(145deg,#fbf8ff,#eee7ff)!important;
  box-shadow:
    0 8px 20px rgba(109,40,217,.12),
    inset 0 1px 0 rgba(255,255,255,.95)!important;
}
html[data-theme="light"] .sd-inspector-window-actions button.is-expand:hover,
html[data-theme="light"] .sd-inspector-window-actions button.is-expand:focus-visible{
  color:#5b21b6!important;
  border-color:rgba(109,40,217,.38)!important;
  background:linear-gradient(145deg,#faf5ff,#e9ddff)!important;
  box-shadow:
    0 10px 24px rgba(109,40,217,.16),
    0 0 0 3px rgba(109,40,217,.06),
    inset 0 1px 0 rgba(255,255,255,.95)!important;
}

/* Make the collapsed pair read as a deliberate mini control dock. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed{
  border-color:color-mix(in srgb,var(--sd-mode-accent) 28%,var(--sdm-line))!important;
  background:
    radial-gradient(circle at 82% 18%,color-mix(in srgb,var(--sd-mode-accent) 11%,transparent),transparent 46%),
    var(--sdm-panel)!important;
  box-shadow:0 16px 38px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed{
  box-shadow:0 14px 34px rgba(72,48,64,.11),inset 0 1px 0 rgba(255,255,255,.92)!important;
}

/* 1.0.654 — Minimal collapsed Inspector: one premium expand control, no outer frame. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed{
  flex:0 0 52px!important;
  flex-basis:52px!important;
  width:52px!important;
  min-width:52px!important;
  max-width:52px!important;
  height:52px!important;
  min-height:52px!important;
  max-height:52px!important;
  padding:4px!important;
  overflow:visible!important;
  border:0!important;
  border-radius:16px!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed::before,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed::after{
  content:none!important;
  display:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-head{
  position:static!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:44px!important;
  min-width:44px!important;
  max-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  margin:0!important;
  padding:0!important;
  gap:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  cursor:default!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-head>span,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-heading-copy{
  display:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions{
  position:static!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:44px!important;
  min-width:44px!important;
  max-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  margin:0!important;
  padding:0!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions button.is-expand{
  width:44px!important;
  min-width:44px!important;
  max-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  padding:0!important;
  border:0!important;
  border-radius:14px!important;
  color:#fff!important;
  background:
    radial-gradient(circle at 28% 22%,rgba(255,255,255,.28),transparent 34%),
    linear-gradient(145deg,#7c3aed 0%,#9b5cf6 48%,#f97316 120%)!important;
  box-shadow:
    0 10px 28px rgba(91,33,182,.28),
    0 2px 8px rgba(249,115,22,.14),
    inset 0 1px 0 rgba(255,255,255,.24)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions button.is-expand .sd-expand-icon{
  width:19px!important;
  height:19px!important;
  filter:drop-shadow(0 2px 5px rgba(44,18,77,.28))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions button.is-expand .sd-expand-icon path{
  stroke-width:1.75!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions button.is-expand:hover,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions button.is-expand:focus-visible{
  transform:translateY(-2px) scale(1.045)!important;
  background:
    radial-gradient(circle at 28% 22%,rgba(255,255,255,.34),transparent 34%),
    linear-gradient(145deg,#6d28d9 0%,#8b5cf6 50%,#fb923c 125%)!important;
  box-shadow:
    0 14px 34px rgba(91,33,182,.34),
    0 4px 12px rgba(249,115,22,.18),
    inset 0 1px 0 rgba(255,255,255,.28)!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions button.is-expand{
  color:#6d28d9!important;
  background:
    radial-gradient(circle at 28% 18%,rgba(255,255,255,.98),rgba(255,255,255,.40) 34%,transparent 35%),
    linear-gradient(145deg,#f8f3ff 0%,#eee5ff 52%,#fff0e5 120%)!important;
  box-shadow:
    0 10px 26px rgba(109,40,217,.16),
    0 3px 10px rgba(249,115,22,.08),
    inset 0 1px 0 rgba(255,255,255,.95)!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions button.is-expand:hover,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions button.is-expand:focus-visible{
  color:#5b21b6!important;
  background:
    radial-gradient(circle at 28% 18%,#fff,rgba(255,255,255,.44) 34%,transparent 35%),
    linear-gradient(145deg,#f5efff 0%,#e8ddff 55%,#ffe7d4 125%)!important;
  box-shadow:
    0 13px 30px rgba(109,40,217,.20),
    0 4px 12px rgba(249,115,22,.10),
    inset 0 1px 0 rgba(255,255,255,.98)!important;
}
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed{
    flex:0 0 50px!important;
    flex-basis:50px!important;
    width:50px!important;
    min-width:50px!important;
    max-width:50px!important;
    height:50px!important;
    min-height:50px!important;
    max-height:50px!important;
    padding:3px!important;
  }
}

/* 1.0.656 — Premium colored component chips for Direct Flow cards. */
.smart-direct-page .sd-flow-node-chips{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:6px!important;
  min-height:31px;
  margin-top:3px;
}
.smart-direct-page .sd-flow-node-chips .sd-flow-node-chip,
.smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip,
.smart-direct-page .sd-flow-node-chips .sd-flow-node-more{
  --sd-chip:#64748b;
  position:relative;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-height:29px;
  padding:4px 8px 4px 6px!important;
  border:1px solid color-mix(in srgb,var(--sd-chip) 28%,transparent)!important;
  border-radius:10px!important;
  background:
    radial-gradient(circle at 18% 14%,rgba(255,255,255,.90),transparent 36%),
    color-mix(in srgb,var(--sd-chip) 8%,#fff)!important;
  color:color-mix(in srgb,var(--sd-chip) 84%,#211a20)!important;
  box-shadow:
    0 5px 14px color-mix(in srgb,var(--sd-chip) 10%,transparent),
    inset 0 1px 0 rgba(255,255,255,.82)!important;
  font-size:10px!important;
  font-weight:650!important;
  line-height:1!important;
  white-space:nowrap;
  overflow:hidden;
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease,background .14s ease;
}
.smart-direct-page .sd-flow-node-chips .sd-flow-node-chip>i,
.smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip>i{
  width:18px;
  height:18px;
  flex:0 0 18px;
  display:grid;
  place-items:center;
  border-radius:6px;
  background:color-mix(in srgb,var(--sd-chip) 14%,#fff);
  color:var(--sd-chip);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sd-chip) 14%,transparent);
  font-size:10px;
  font-weight:800;
  font-style:normal;
  line-height:1;
}
.smart-direct-page .sd-flow-node-chips .sd-flow-node-chip>b,
.smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip>b{
  min-width:0;
  max-width:110px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:inherit!important;
  font-size:inherit!important;
  font-weight:650!important;
}
.smart-direct-page .sd-flow-node-chips .sd-flow-node-chip:hover{
  transform:translateY(-1px);
  border-color:color-mix(in srgb,var(--sd-chip) 44%,transparent)!important;
  background:
    radial-gradient(circle at 18% 14%,rgba(255,255,255,.96),transparent 38%),
    color-mix(in srgb,var(--sd-chip) 12%,#fff)!important;
  box-shadow:
    0 8px 18px color-mix(in srgb,var(--sd-chip) 14%,transparent),
    inset 0 1px 0 rgba(255,255,255,.90)!important;
}
.smart-direct-page .sd-flow-node-chips .sd-flow-node-more{
  --sd-chip:#8b5cf6;
  min-width:30px;
  padding-inline:8px!important;
  font-weight:800!important;
}
.smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip{
  --sd-chip:#64748b;
}
html[data-theme="dark"] .smart-direct-page .sd-flow-node-chips .sd-flow-node-chip,
html[data-theme="dark"] .smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip,
html[data-theme="dark"] .smart-direct-page .sd-flow-node-chips .sd-flow-node-more{
  border-color:color-mix(in srgb,var(--sd-chip) 31%,rgba(255,255,255,.07))!important;
  background:
    radial-gradient(circle at 18% 12%,rgba(255,255,255,.08),transparent 38%),
    color-mix(in srgb,var(--sd-chip) 14%,#1d181e)!important;
  color:color-mix(in srgb,var(--sd-chip) 45%,#f7f3f6)!important;
  box-shadow:
    0 6px 16px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.06)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-flow-node-chips .sd-flow-node-chip>i,
html[data-theme="dark"] .smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip>i{
  background:color-mix(in srgb,var(--sd-chip) 20%,#211b22);
  color:color-mix(in srgb,var(--sd-chip) 66%,#fff);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sd-chip) 22%,transparent);
}
html[data-theme="light"] .smart-direct-page .sd-flow-node-chips .sd-flow-node-chip,
html[data-theme="light"] .smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip,
html[data-theme="light"] .smart-direct-page .sd-flow-node-chips .sd-flow-node-more{
  box-shadow:
    0 5px 14px color-mix(in srgb,var(--sd-chip) 9%,transparent),
    inset 0 1px 0 rgba(255,255,255,.94)!important;
}
@media(max-width:800px){
  .smart-direct-page .sd-flow-node-chips{
    gap:5px!important;
  }
  .smart-direct-page .sd-flow-node-chips .sd-flow-node-chip,
  .smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip,
  .smart-direct-page .sd-flow-node-chips .sd-flow-node-more{
    min-height:28px;
    padding:4px 7px 4px 5px!important;
    border-radius:9px!important;
    font-size:9.6px!important;
  }
  .smart-direct-page .sd-flow-node-chips .sd-flow-node-chip>b,
  .smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip>b{
    max-width:96px;
  }
}
@media(max-width:420px){
  .smart-direct-page .sd-flow-node-chips{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:5px!important;
  }
  .smart-direct-page .sd-flow-node-chips .sd-flow-node-chip,
  .smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip{
    width:100%;
    justify-content:flex-start!important;
    min-width:0;
  }
  .smart-direct-page .sd-flow-node-chips .sd-flow-node-chip>b,
  .smart-direct-page .sd-flow-node-chips .sd-flow-keyword-chip>b{
    max-width:none;
    flex:1 1 auto;
  }
  .smart-direct-page .sd-flow-node-chips .sd-flow-node-more{
    justify-self:start;
  }
}

/* 1.0.657 — Premium cards for Comment / Story / Mention / Welcome flow lists. */
.smart-direct-page .sd-premium-flow-card{
  --flow-accent:#8b5cf6;
  --flow-accent-rgb:139,92,246;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center!important;
  gap:12px!important;
  min-width:0;
  padding:12px!important;
  border:1px solid color-mix(in srgb,var(--flow-accent) 22%,var(--sd-line))!important;
  border-radius:15px!important;
  background:
    radial-gradient(circle at 92% 8%,color-mix(in srgb,var(--flow-accent) 9%,transparent),transparent 38%),
    linear-gradient(145deg,color-mix(in srgb,var(--flow-accent) 3%,var(--sd-card)),var(--sd-card))!important;
  box-shadow:
    0 9px 24px color-mix(in srgb,var(--flow-accent) 6%,transparent),
    inset 0 1px 0 rgba(255,255,255,.04)!important;
}
.smart-direct-page .sd-premium-flow-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  border-radius:3px 0 0 3px;
  background:linear-gradient(180deg,var(--flow-accent),color-mix(in srgb,var(--flow-accent) 58%,#f97316));
  opacity:.88;
  pointer-events:none;
}
.smart-direct-page .sd-premium-flow-card.is-comment{
  --flow-accent:#f97316;
}
.smart-direct-page .sd-premium-flow-card.is-story{
  --flow-accent:#8b5cf6;
}
.smart-direct-page .sd-premium-flow-card.is-mention{
  --flow-accent:#06b6d4;
}
.smart-direct-page .sd-premium-flow-card.is-welcome{
  --flow-accent:#22c55e;
}
.smart-direct-page .sd-premium-flow-card.is-enabled{
  border-color:color-mix(in srgb,var(--flow-accent) 34%,var(--sd-line))!important;
  background:
    radial-gradient(circle at 92% 8%,color-mix(in srgb,var(--flow-accent) 13%,transparent),transparent 40%),
    linear-gradient(145deg,color-mix(in srgb,var(--flow-accent) 5%,var(--sd-card)),var(--sd-card))!important;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-main{
  min-width:0;
  display:grid;
  gap:8px;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-title-row{
  min-width:0;
  display:grid;
  grid-template-columns:36px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-kind-icon{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:color-mix(in srgb,var(--flow-accent) 13%,var(--sd-card));
  border:1px solid color-mix(in srgb,var(--flow-accent) 20%,transparent);
  color:var(--flow-accent);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
  font-size:16px!important;
  font-weight:850;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-title{
  min-width:0;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-title>b{
  display:block;
  margin:3px 0 0!important;
  color:var(--sd-text)!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1.45;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-status{
  display:inline-flex!important;
  align-items:center;
  gap:5px;
  color:var(--sd-muted)!important;
  font-size:9.5px!important;
  font-weight:650!important;
  line-height:1!important;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-status>i{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#a9a0a7;
  box-shadow:0 0 0 3px rgba(148,163,184,.07);
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-status.is-active{
  color:#16a34a!important;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-status.is-active>i{
  background:#22c55e;
  box-shadow:0 0 0 3px rgba(34,197,94,.10);
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-count{
  min-width:52px;
  min-height:36px;
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1px;
  padding:4px 7px;
  border:1px solid color-mix(in srgb,var(--flow-accent) 18%,var(--sd-line));
  border-radius:10px;
  background:color-mix(in srgb,var(--flow-accent) 6%,var(--sd-card));
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-count strong{
  color:var(--flow-accent);
  font-size:13px;
  font-weight:850;
  line-height:1;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-count small{
  margin:1px 0 0!important;
  color:var(--sd-muted)!important;
  font-size:7.8px!important;
  font-weight:600!important;
  line-height:1!important;
  white-space:nowrap;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-chips{
  margin-top:0!important;
  min-height:0!important;
  gap:5px!important;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-chips .sd-flow-node-chip,
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-chips .sd-flow-node-more{
  min-height:26px;
  border-radius:9px!important;
  padding:3px 7px 3px 5px!important;
  font-size:9px!important;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-chips .sd-flow-node-chip>i{
  width:16px;
  height:16px;
  flex-basis:16px;
  border-radius:5px;
  font-size:8.5px;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-chips .sd-flow-node-chip>b{
  max-width:88px;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions{
  display:flex!important;
  align-items:center;
  justify-content:flex-end;
  gap:6px!important;
  flex:0 0 auto;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button,
.smart-direct-page .sd-premium-flow-card>div:last-child button{
  min-height:34px!important;
  padding:0 10px!important;
  border:1px solid color-mix(in srgb,var(--flow-accent) 18%,var(--sd-line))!important;
  border-radius:10px!important;
  background:color-mix(in srgb,var(--flow-accent) 5%,var(--sd-card))!important;
  color:color-mix(in srgb,var(--flow-accent) 72%,var(--sd-text))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  font-size:10px!important;
  font-weight:750!important;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button:hover,
.smart-direct-page .sd-premium-flow-card>div:last-child button:hover{
  transform:translateY(-1px);
  border-color:color-mix(in srgb,var(--flow-accent) 34%,var(--sd-line))!important;
  background:color-mix(in srgb,var(--flow-accent) 9%,var(--sd-card))!important;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button.is-danger,
.smart-direct-page .sd-premium-flow-card>div:last-child button.is-danger{
  border-color:rgba(244,63,94,.18)!important;
  background:rgba(244,63,94,.08)!important;
  color:#e11d48!important;
}
html[data-theme="dark"] .smart-direct-page .sd-premium-flow-card{
  background:
    radial-gradient(circle at 92% 8%,color-mix(in srgb,var(--flow-accent) 10%,transparent),transparent 38%),
    linear-gradient(145deg,color-mix(in srgb,var(--flow-accent) 4%,#1b171d),#1b171d)!important;
  box-shadow:0 10px 26px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.025)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-premium-flow-card .sd-mini-flow-kind-icon{
  background:color-mix(in srgb,var(--flow-accent) 15%,#211b22);
}
html[data-theme="dark"] .smart-direct-page .sd-premium-flow-card .sd-mini-flow-count{
  background:color-mix(in srgb,var(--flow-accent) 10%,#211b22);
}
html[data-theme="dark"] .smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button,
html[data-theme="dark"] .smart-direct-page .sd-premium-flow-card>div:last-child button{
  background:color-mix(in srgb,var(--flow-accent) 8%,#211b22)!important;
}
@media(max-width:700px){
  .smart-direct-page .sd-premium-flow-card{
    grid-template-columns:1fr!important;
    gap:9px!important;
    padding:10px!important;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions{
    width:100%;
    justify-content:stretch!important;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button,
  .smart-direct-page .sd-premium-flow-card>div:last-child button{
    flex:1 1 0!important;
  }
}
@media(max-width:420px){
  .smart-direct-page .sd-premium-flow-card{
    border-radius:13px!important;
    padding:9px!important;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-title-row{
    grid-template-columns:32px minmax(0,1fr) 46px;
    gap:7px;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-kind-icon{
    width:32px;
    height:32px;
    border-radius:9px;
    font-size:14px!important;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-title>b{
    font-size:12px!important;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-count{
    min-width:46px;
    min-height:32px;
    padding-inline:5px;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-count strong{
    font-size:12px;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-count small{
    font-size:7px!important;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-chips{
    display:flex!important;
    flex-wrap:wrap!important;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-chips .sd-flow-node-chip{
    width:auto!important;
    min-width:0;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-chips .sd-flow-node-chip>b{
    max-width:78px;
  }
}



/* MSM Site 1.0.672 — Premium Flow Simulator + Template Library */
.sd-premium-tool-button{min-height:38px;border:1px solid var(--sd-line);border-radius:12px;padding:0 13px;display:inline-flex;align-items:center;gap:7px;background:var(--sd-card);color:var(--sd-text);font:800 11px/1 inherit;cursor:pointer;box-shadow:0 5px 18px rgba(15,23,42,.06);transition:.18s ease}
.sd-premium-tool-button:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(15,23,42,.10)}
.sd-premium-tool-button.is-template{border-color:color-mix(in srgb,var(--sd-purple) 26%,var(--sd-line));background:linear-gradient(135deg,color-mix(in srgb,var(--sd-purple) 8%,var(--sd-card)),var(--sd-card));color:color-mix(in srgb,var(--sd-purple) 78%,var(--sd-text))}
.sd-premium-tool-button.is-simulator{border-color:color-mix(in srgb,#10b981 30%,var(--sd-line));background:linear-gradient(135deg,color-mix(in srgb,#10b981 8%,var(--sd-card)),var(--sd-card));color:color-mix(in srgb,#059669 82%,var(--sd-text))}
.sd-studio-overlay-panel{position:absolute;z-index:120;inset:132px 18px 18px;border:1px solid var(--sd-line);border-radius:22px;background:color-mix(in srgb,var(--sd-card) 97%,transparent);box-shadow:0 30px 90px rgba(15,23,42,.24);backdrop-filter:blur(20px);overflow:hidden;display:flex;flex-direction:column}
.sd-studio-overlay-panel[hidden]{display:none!important}
.sd-studio-overlay-panel:before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--sd-orange),var(--sd-purple),#10b981);opacity:.9}
.sd-overlay-panel-head{position:relative;z-index:2;display:flex;align-items:center;gap:14px;padding:18px 20px;border-bottom:1px solid var(--sd-line);background:linear-gradient(180deg,color-mix(in srgb,var(--sd-card) 98%,transparent),color-mix(in srgb,var(--sd-surface-2) 65%,var(--sd-card)))}
.sd-overlay-panel-title{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.sd-overlay-panel-title>span{width:43px;height:43px;border-radius:14px;display:grid;place-items:center;font-size:18px;font-weight:950;box-shadow:inset 0 1px 0 rgba(255,255,255,.35)}
.sd-overlay-panel-title>span.is-template{color:#7c3aed;background:rgba(124,58,237,.11);border:1px solid rgba(124,58,237,.18)}
.sd-overlay-panel-title>span.is-simulator{color:#059669;background:rgba(16,185,129,.11);border:1px solid rgba(16,185,129,.18)}
.sd-overlay-panel-title small{display:block;color:var(--sd-muted);font-size:9px;font-weight:850;letter-spacing:.04em}
.sd-overlay-panel-title h3{margin:2px 0 0;color:var(--sd-text);font-size:17px;font-weight:950}
.sd-overlay-panel-title p{margin:3px 0 0;color:var(--sd-muted);font-size:10px;line-height:1.7}
.sd-overlay-close{width:38px;height:38px;border-radius:12px;border:1px solid var(--sd-line);background:var(--sd-card);color:var(--sd-muted);font-size:21px;cursor:pointer}
.sd-template-toolbar{display:flex;gap:10px;padding:13px 18px;border-bottom:1px solid var(--sd-line);background:color-mix(in srgb,var(--sd-surface-2) 52%,var(--sd-card))}
.sd-template-search{flex:1;display:flex;align-items:center;gap:8px;min-width:0;padding:0 12px;border:1px solid var(--sd-line);border-radius:12px;background:var(--sd-card)}
.sd-template-search span{color:var(--sd-purple);font-size:16px}.sd-template-search input{width:100%;min-height:38px;border:0!important;outline:0;background:transparent!important;color:var(--sd-text);font:700 11px inherit}
.sd-template-save-current{min-height:40px;border:0;border-radius:12px;padding:0 15px;color:#fff;background:linear-gradient(135deg,#f97316,#a855f7);font:850 10.5px inherit;cursor:pointer;box-shadow:0 8px 20px rgba(168,85,247,.16)}
.sd-template-save-box{margin:12px 18px 0;padding:13px;border:1px solid rgba(124,58,237,.17);border-radius:16px;background:linear-gradient(135deg,rgba(124,58,237,.06),rgba(249,115,22,.04))}
.sd-template-save-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.sd-template-save-head b{display:block;color:var(--sd-text);font-size:12px}.sd-template-save-head small{display:block;color:var(--sd-muted);font-size:9px;margin-top:2px}.sd-template-save-head>span{color:#f59e0b;font-size:20px}
.sd-template-save-fields{display:grid;grid-template-columns:.8fr 1.2fr;gap:9px;margin-top:10px}.sd-template-save-fields label span{display:block;color:var(--sd-muted);font-size:9px;font-weight:800;margin:0 2px 5px}.sd-template-save-fields input,.sd-template-save-fields textarea{width:100%;box-sizing:border-box;border:1px solid var(--sd-line);border-radius:10px;background:var(--sd-card);color:var(--sd-text);padding:9px 10px;font:700 10.5px inherit;resize:vertical}
.sd-template-save-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:9px}.sd-template-save-actions button{min-height:34px;border:1px solid var(--sd-line);border-radius:9px;padding:0 12px;background:var(--sd-card);color:var(--sd-text);font:800 10px inherit;cursor:pointer}.sd-template-save-actions .is-primary{border:0;color:#fff;background:linear-gradient(135deg,#f97316,#a855f7)}
.sd-template-content{overflow:auto;padding:15px 18px 22px}.sd-template-section+ .sd-template-section{margin-top:18px;padding-top:17px;border-top:1px solid var(--sd-line)}.sd-template-section>header{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:10px}.sd-template-section>header div{display:flex;align-items:center;gap:7px}.sd-template-section>header span{color:var(--sd-purple);font-size:15px}.sd-template-section>header b{color:var(--sd-text);font-size:12px}.sd-template-section>header small{color:var(--sd-muted);font-size:9px}
.sd-template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.sd-template-card{position:relative;min-width:0;padding:13px;border:1px solid var(--sd-line);border-radius:16px;background:var(--sd-card);box-shadow:0 8px 24px rgba(15,23,42,.055);overflow:hidden}.sd-template-card:before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:linear-gradient(180deg,var(--sd-orange),var(--sd-purple))}.sd-template-card.is-custom:before{background:linear-gradient(180deg,#10b981,#0ea5e9)}.sd-template-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.sd-template-card-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:rgba(124,58,237,.09);color:#7c3aed;font-size:15px}.sd-template-card.is-custom .sd-template-card-icon{background:rgba(16,185,129,.09);color:#059669}.sd-template-card-badge{padding:4px 7px;border-radius:999px;background:var(--sd-surface-2);color:var(--sd-muted);font-size:8px;font-weight:850}.sd-template-card h4{margin:9px 0 4px;color:var(--sd-text);font-size:12px;font-weight:950}.sd-template-card p{min-height:34px;margin:0;color:var(--sd-muted);font-size:9px;line-height:1.8}.sd-template-card-meta{display:flex;gap:5px;flex-wrap:wrap;margin-top:9px}.sd-template-card-meta span{padding:4px 6px;border:1px solid var(--sd-line);border-radius:7px;color:var(--sd-muted);font-size:8px}.sd-template-card-actions{display:flex;gap:6px;margin-top:11px}.sd-template-card-actions button{flex:1;min-height:34px;border:1px solid rgba(124,58,237,.18);border-radius:9px;background:rgba(124,58,237,.065);color:#7c3aed;font:850 9.5px inherit;cursor:pointer}.sd-template-card-actions .is-delete{flex:0 0 34px;color:#e11d48;border-color:rgba(225,29,72,.16);background:rgba(225,29,72,.055)}.sd-template-empty{grid-column:1/-1;padding:22px;border:1px dashed var(--sd-line);border-radius:14px;text-align:center;color:var(--sd-muted);font-size:10px;background:var(--sd-surface-2)}
.sd-simulator-safe-badge{display:flex;align-items:center;gap:6px;margin-inline-start:auto;padding:7px 10px;border-radius:999px;background:rgba(16,185,129,.08);border:1px solid rgba(16,185,129,.16);color:#059669;font-size:9px;font-weight:850}.sd-simulator-safe-badge i{width:7px;height:7px;border-radius:50%;background:#10b981;box-shadow:0 0 0 4px rgba(16,185,129,.09)}
.sd-simulator-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);min-height:0;flex:1}.sd-simulator-scenario{overflow:auto;padding:16px;border-inline-end:1px solid var(--sd-line);background:color-mix(in srgb,var(--sd-surface-2) 58%,var(--sd-card))}.sd-sim-card-head{display:flex;align-items:center;gap:9px;margin-bottom:13px}.sd-sim-card-head>span{width:31px;height:31px;border-radius:10px;display:grid;place-items:center;background:rgba(16,185,129,.09);color:#059669}.sd-sim-card-head b{display:block;color:var(--sd-text);font-size:12px}.sd-sim-card-head small{display:block;color:var(--sd-muted);font-size:8.5px;margin-top:2px}.sd-simulator-scenario>label,.sd-sim-two label{display:block;margin-bottom:9px}.sd-simulator-scenario label>span{display:block;margin:0 2px 5px;color:var(--sd-muted);font-size:8.5px;font-weight:850}.sd-simulator-scenario input,.sd-simulator-scenario textarea,.sd-simulator-scenario select{width:100%;box-sizing:border-box;border:1px solid var(--sd-line);border-radius:10px;background:var(--sd-card);color:var(--sd-text);padding:8px 9px;font:700 10px inherit;outline:none;resize:vertical}.sd-simulator-scenario label>small{display:block;margin-top:4px;color:var(--sd-muted);font-size:8px;line-height:1.6}.sd-sim-two{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sd-sim-actions{display:flex;gap:7px;margin-top:4px}.sd-sim-actions button{min-height:38px;border:1px solid var(--sd-line);border-radius:11px;background:var(--sd-card);color:var(--sd-text);font:850 10px inherit;cursor:pointer}.sd-sim-actions button:first-child{flex:0 0 85px}.sd-sim-actions .is-run{flex:1;border:0;color:#fff;background:linear-gradient(135deg,#10b981,#0ea5e9);box-shadow:0 8px 20px rgba(16,185,129,.16)}
.sd-simulator-results{min-width:0;overflow:auto;padding:16px;background:radial-gradient(circle at 80% 0,rgba(124,58,237,.055),transparent 34%),var(--sd-card)}.sd-sim-summary{display:flex;align-items:center;gap:10px;padding:12px 13px;border:1px solid var(--sd-line);border-radius:14px;background:var(--sd-surface-2)}.sd-sim-summary>span{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:rgba(16,185,129,.09);color:#059669}.sd-sim-summary b{display:block;color:var(--sd-text);font-size:11px}.sd-sim-summary small{display:block;color:var(--sd-muted);font-size:8.5px;margin-top:2px}.sd-sim-summary.is-done{border-color:rgba(16,185,129,.20);background:rgba(16,185,129,.055)}.sd-sim-summary.is-wait{border-color:rgba(245,158,11,.22);background:rgba(245,158,11,.055)}.sd-sim-summary.is-error{border-color:rgba(239,68,68,.20);background:rgba(239,68,68,.05)}
.sd-sim-result-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.sd-sim-result-grid>section{min-width:0;border:1px solid var(--sd-line);border-radius:15px;background:var(--sd-card);overflow:hidden}.sd-sim-result-grid>section>header{display:flex;align-items:center;gap:7px;padding:10px 11px;border-bottom:1px solid var(--sd-line);background:var(--sd-surface-2)}.sd-sim-result-grid>section>header span{color:var(--sd-purple)}.sd-sim-result-grid>section>header b{color:var(--sd-text);font-size:10px}.sd-sim-result-grid>section>header em{margin-inline-start:auto;min-width:22px;padding:3px 6px;border-radius:999px;background:var(--sd-card);color:var(--sd-muted);font-size:8px;font-style:normal;text-align:center}.sd-sim-trace,.sd-sim-outputs{padding:8px;display:flex;flex-direction:column;gap:6px;min-height:190px}.sd-sim-trace-item,.sd-sim-output-item{display:flex;align-items:flex-start;gap:8px;padding:8px 9px;border:1px solid var(--sd-line);border-radius:10px;background:var(--sd-surface-2)}.sd-sim-trace-item>span,.sd-sim-output-item>span{width:25px;height:25px;flex:0 0 25px;border-radius:8px;display:grid;place-items:center;background:var(--sd-card);color:var(--sd-purple);font-size:10px}.sd-sim-trace-item b,.sd-sim-output-item b{display:block;color:var(--sd-text);font-size:9px}.sd-sim-trace-item small,.sd-sim-output-item small{display:block;margin-top:2px;color:var(--sd-muted);font-size:8px;line-height:1.6;word-break:break-word}.sd-sim-trace-item.is-yes{border-color:rgba(16,185,129,.16)}.sd-sim-trace-item.is-no{border-color:rgba(239,68,68,.14)}.sd-sim-empty{display:grid;place-items:center;min-height:160px;color:var(--sd-muted);font-size:9px;text-align:center}.sd-sim-choices{margin:0 8px 8px;padding:9px;border:1px solid rgba(245,158,11,.20);border-radius:11px;background:rgba(245,158,11,.055)}.sd-sim-choices b{display:block;margin-bottom:6px;color:#b45309;font-size:9px}.sd-sim-choice-list{display:flex;flex-wrap:wrap;gap:6px}.sd-sim-choice-list button{min-height:31px;padding:0 9px;border:1px solid rgba(124,58,237,.18);border-radius:9px;background:rgba(124,58,237,.07);color:#7c3aed;font:850 8.5px inherit;cursor:pointer}
.sd-node.is-simulated{box-shadow:0 0 0 3px rgba(16,185,129,.13),0 10px 30px rgba(16,185,129,.12)!important}.sd-node.is-sim-current{box-shadow:0 0 0 4px rgba(245,158,11,.18),0 10px 34px rgba(245,158,11,.18)!important;animation:sdSimPulse 1.2s ease-in-out infinite alternate}@keyframes sdSimPulse{to{filter:saturate(1.08) brightness(1.02)}}
html[data-theme="dark"] .sd-studio-overlay-panel{background:rgba(20,18,28,.97)}html[data-theme="dark"] .sd-template-card,html[data-theme="dark"] .sd-sim-result-grid>section{box-shadow:0 10px 28px rgba(0,0,0,.18)}
@media(max-width:980px){.sd-template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sd-simulator-layout{grid-template-columns:300px minmax(0,1fr)}}
@media(max-width:800px){.sd-premium-tool-button{min-height:35px;padding:0 9px;font-size:9px}.sd-studio-overlay-panel{position:fixed;z-index:120250;inset:64px 8px 8px;border-radius:18px}.sd-overlay-panel-head{padding:13px 12px}.sd-overlay-panel-title p{display:none}.sd-overlay-panel-title>span{width:37px;height:37px}.sd-simulator-safe-badge{display:none}.sd-template-toolbar{padding:10px;flex-wrap:wrap}.sd-template-search{flex:1 1 180px}.sd-template-save-current{flex:1 1 auto}.sd-template-save-fields{grid-template-columns:1fr}.sd-template-content{padding:12px}.sd-template-grid{grid-template-columns:1fr}.sd-simulator-layout{display:block;overflow:auto}.sd-simulator-scenario{overflow:visible;border-inline-end:0;border-bottom:1px solid var(--sd-line)}.sd-simulator-results{overflow:visible}.sd-sim-result-grid{grid-template-columns:1fr}.sd-sim-two{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.sd-premium-tool-button{font-size:0;width:35px;padding:0;justify-content:center}.sd-premium-tool-button span{font-size:14px}.sd-sim-two{grid-template-columns:1fr}.sd-overlay-panel-title h3{font-size:14px}.sd-template-card p{min-height:0}}


/* MSM Site 1.0.673 — Premium Flow Health Check + Subflow */
.sd-premium-tool-button.is-health{border-color:color-mix(in srgb,#0ea5e9 30%,var(--sd-line));background:linear-gradient(135deg,color-mix(in srgb,#0ea5e9 8%,var(--sd-card)),var(--sd-card));color:color-mix(in srgb,#0284c7 82%,var(--sd-text))}
.sd-premium-tool-button.is-health:hover{border-color:rgba(14,165,233,.38);box-shadow:0 8px 24px rgba(14,165,233,.12)}
.sd-overlay-panel-title>span.is-health{color:#0284c7;background:rgba(14,165,233,.11);border:1px solid rgba(14,165,233,.18)}
.sd-flow-role-card{margin:10px 0;padding:11px;border:1px solid color-mix(in srgb,#0891b2 22%,var(--sd-line));border-radius:14px;background:linear-gradient(135deg,color-mix(in srgb,#0891b2 7%,var(--sd-card)),var(--sd-card));display:flex;align-items:center;justify-content:space-between;gap:10px;box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.sd-flow-role-card>div{display:flex;align-items:center;gap:9px;min-width:0}.sd-flow-role-card>div>span{width:31px;height:31px;border-radius:10px;display:grid;place-items:center;background:rgba(8,145,178,.10);color:#0891b2;font-weight:950}.sd-flow-role-card b{display:block;color:var(--sd-text);font-size:10.5px}.sd-flow-role-card small{display:block;color:var(--sd-muted);font-size:8px;margin-top:2px;line-height:1.55}.sd-flow-role-card select{min-width:138px;min-height:36px;border:1px solid var(--sd-line);border-radius:10px;background:var(--sd-card);color:var(--sd-text);font:850 9px inherit;padding:0 9px;outline:0}
.sd-subflow-start-card{border-color:rgba(8,145,178,.22)!important;background:linear-gradient(135deg,rgba(8,145,178,.07),var(--sd-card))!important}.sd-subflow-editor-head{display:flex;align-items:center;gap:9px;margin-bottom:11px}.sd-subflow-editor-head>span{width:35px;height:35px;border-radius:11px;display:grid;place-items:center;background:rgba(8,145,178,.10);color:#0891b2;font-size:17px;font-weight:950}.sd-subflow-editor-head b{display:block;color:var(--sd-text);font-size:11px}.sd-subflow-editor-head small{display:block;color:var(--sd-muted);font-size:8px;margin-top:2px;line-height:1.55}
.sd-health-body{overflow:auto;padding:16px 18px 22px;background:radial-gradient(circle at 90% 0,rgba(14,165,233,.055),transparent 30%),var(--sd-card)}
.sd-health-score-card{display:flex;align-items:center;gap:14px;padding:15px;border:1px solid var(--sd-line);border-radius:18px;background:linear-gradient(135deg,var(--sd-card),var(--sd-surface-2));box-shadow:0 12px 32px rgba(15,23,42,.06)}
.sd-health-score-card.is-good{border-color:rgba(16,185,129,.22);background:linear-gradient(135deg,rgba(16,185,129,.06),var(--sd-card))}.sd-health-score-card.is-bad{border-color:rgba(239,68,68,.20);background:linear-gradient(135deg,rgba(239,68,68,.05),var(--sd-card))}
.sd-health-ring{width:64px;height:64px;flex:0 0 64px;border-radius:50%;display:flex;align-items:baseline;justify-content:center;padding-top:19px;box-sizing:border-box;background:conic-gradient(var(--health-color,#10b981) 0 var(--health-score,100%),var(--sd-line) var(--health-score,100%));box-shadow:inset 0 0 0 7px var(--sd-card),0 7px 18px rgba(16,185,129,.08)}.sd-health-ring strong{font-size:17px;color:var(--sd-text);font-weight:950}.sd-health-ring small{font-size:8px;color:var(--sd-muted)}
.sd-health-score-card>div:nth-child(2){min-width:0;flex:1}.sd-health-score-card b{display:block;color:var(--sd-text);font-size:13px}.sd-health-score-card p{margin:4px 0 0;color:var(--sd-muted);font-size:9px;line-height:1.7}.sd-health-score-card>button{min-height:36px;padding:0 12px;border:1px solid var(--sd-line);border-radius:10px;background:var(--sd-card);color:#0284c7;font:850 9px inherit;cursor:pointer}
.sd-health-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:11px}.sd-health-kpis article{display:flex;align-items:center;gap:9px;padding:11px;border:1px solid var(--sd-line);border-radius:13px;background:var(--sd-card);box-shadow:0 7px 20px rgba(15,23,42,.04)}.sd-health-kpis article>span{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;font-weight:950}.sd-health-kpis .is-error>span{background:rgba(239,68,68,.09);color:#dc2626}.sd-health-kpis .is-warning>span{background:rgba(245,158,11,.10);color:#d97706}.sd-health-kpis .is-info>span{background:rgba(14,165,233,.09);color:#0284c7}.sd-health-kpis b{display:block;color:var(--sd-text);font-size:13px}.sd-health-kpis small{display:block;color:var(--sd-muted);font-size:8px}
.sd-health-list{display:flex;flex-direction:column;gap:7px;margin-top:12px}.sd-health-issue{display:flex;align-items:center;gap:9px;padding:10px 11px;border:1px solid var(--sd-line);border-radius:12px;background:var(--sd-card);transition:.16s ease}.sd-health-issue[data-health-node]{cursor:pointer}.sd-health-issue[data-health-node]:hover{transform:translateX(-2px);box-shadow:0 8px 20px rgba(15,23,42,.07)}.sd-health-issue.is-error{border-inline-start:3px solid #ef4444}.sd-health-issue.is-warning{border-inline-start:3px solid #f59e0b}.sd-health-issue.is-info{border-inline-start:3px solid #0ea5e9}.sd-health-issue-icon{width:28px;height:28px;flex:0 0 28px;border-radius:8px;display:grid;place-items:center;background:var(--sd-surface-2);font-weight:950}.sd-health-issue.is-error .sd-health-issue-icon{color:#dc2626}.sd-health-issue.is-warning .sd-health-issue-icon{color:#d97706}.sd-health-issue.is-info .sd-health-issue-icon{color:#0284c7}.sd-health-issue>div{min-width:0;flex:1}.sd-health-issue b{display:block;color:var(--sd-text);font-size:10px}.sd-health-issue small{display:block;margin-top:2px;color:var(--sd-muted);font-size:8px;word-break:break-word}.sd-health-issue em{font-style:normal;color:var(--sd-purple);font-size:15px}
.sd-health-perfect{display:grid;place-items:center;text-align:center;padding:34px;border:1px dashed rgba(16,185,129,.25);border-radius:16px;background:rgba(16,185,129,.04)}.sd-health-perfect>span{width:47px;height:47px;border-radius:15px;display:grid;place-items:center;background:rgba(16,185,129,.10);color:#059669;font-size:22px;font-weight:950}.sd-health-perfect b{margin-top:9px;color:var(--sd-text);font-size:12px}.sd-health-perfect small{margin-top:3px;color:var(--sd-muted);font-size:9px}
html[data-theme="dark"] .sd-flow-role-card{background:linear-gradient(135deg,rgba(8,145,178,.10),rgba(20,18,28,.92))}html[data-theme="dark"] .sd-health-body{background:radial-gradient(circle at 90% 0,rgba(14,165,233,.08),transparent 30%),rgba(20,18,28,.97)}
@media(max-width:800px){.sd-flow-role-card{align-items:flex-start;flex-direction:column}.sd-flow-role-card select{width:100%}.sd-health-body{padding:12px}.sd-health-score-card{align-items:flex-start;flex-wrap:wrap}.sd-health-score-card>button{margin-inline-start:auto}.sd-health-kpis{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.sd-health-kpis article{padding:8px;gap:6px}.sd-health-kpis article>span{width:25px;height:25px}.sd-health-kpis small{font-size:7px}}
@media(max-width:430px){.sd-health-kpis{grid-template-columns:1fr}.sd-health-score-card{gap:10px}.sd-health-ring{width:56px;height:56px;flex-basis:56px;padding-top:16px}}


/* MSM Site 1.0.674 — Premium flow cards + Simulator/Templates typography polish */
.smart-direct-page .sd-flow-list-card{
  --flow-role-accent:#8b5cf6;
  --flow-role-soft:rgba(139,92,246,.08);
  position:relative!important;
  isolation:isolate;
  border-radius:18px!important;
  border:1px solid color-mix(in srgb,var(--flow-role-accent) 16%,var(--sd-line))!important;
  background:
    radial-gradient(240px 130px at 100% 0,color-mix(in srgb,var(--flow-role-accent) 7%,transparent),transparent 72%),
    linear-gradient(145deg,color-mix(in srgb,var(--flow-role-accent) 2%,var(--sd-card)),var(--sd-card))!important;
  box-shadow:0 12px 32px rgba(15,23,42,.065),inset 0 1px 0 rgba(255,255,255,.38)!important;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease!important;
}
.smart-direct-page .sd-flow-list-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--flow-role-accent) 28%,var(--sd-line))!important;box-shadow:0 17px 40px rgba(15,23,42,.10),inset 0 1px 0 rgba(255,255,255,.42)!important}
.smart-direct-page .sd-flow-list-card.is-subflow{--flow-role-accent:#0891b2;--flow-role-soft:rgba(8,145,178,.09)}
.smart-direct-page .sd-flow-list-card:after{content:"";position:absolute;z-index:-1;inset:auto 14px 0;height:3px;border-radius:999px 999px 0 0;background:linear-gradient(90deg,var(--flow-role-accent),color-mix(in srgb,var(--flow-role-accent) 58%,#a855f7));opacity:.86}
.smart-direct-page .sd-flow-list-card.is-subflow:before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:linear-gradient(180deg,#06b6d4,#0891b2);opacity:.78}
.smart-direct-page .sd-flow-role-badge{display:inline-flex!important;align-items:center;gap:4px;width:max-content;max-width:100%;min-height:22px;padding:0 7px;border:1px solid color-mix(in srgb,var(--flow-role-accent) 18%,var(--sd-line));border-radius:999px;background:var(--flow-role-soft);color:color-mix(in srgb,var(--flow-role-accent) 82%,var(--sd-text));font-size:9.5px!important;font-weight:850;line-height:1;white-space:nowrap}
.smart-direct-page .sd-flow-role-badge i{font-style:normal;font-size:10px;line-height:1}.smart-direct-page .sd-flow-role-badge b{font-size:inherit!important;font-weight:900!important;color:inherit!important;overflow:hidden;text-overflow:ellipsis}
.smart-direct-page .sd-flow-role-badge.is-main i{font-size:7px}.smart-direct-page .sd-flow-role-badge.is-subflow{border-color:rgba(8,145,178,.20);background:rgba(8,145,178,.09);color:#07809d}
.smart-direct-page .sd-dm-flow-card{padding:15px!important;min-height:0!important}.smart-direct-page .sd-dm-flow-card header{display:grid!important;grid-template-columns:42px minmax(0,1fr) auto;align-items:start!important;gap:10px!important}.smart-direct-page .sd-dm-flow-card .sd-dm-flow-icon{width:42px!important;height:42px!important;border-radius:13px!important;font-size:17px!important}.smart-direct-page .sd-dm-flow-heading{min-width:0}.smart-direct-page .sd-flow-card-kicker{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-height:22px}.smart-direct-page .sd-flow-card-kicker>small{font-size:10.5px!important;font-weight:850!important;color:var(--sd-muted)!important}.smart-direct-page .sd-dm-flow-heading h3{margin:5px 0 0!important;font-size:15px!important;line-height:1.65!important;font-weight:950!important;color:var(--sd-text)!important;overflow-wrap:anywhere}.smart-direct-page .sd-dm-flow-card>p{min-height:40px;margin:12px 0 10px!important;font-size:11.5px!important;line-height:1.85!important;color:var(--sd-muted)!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.smart-direct-page .sd-flow-list-card .sd-flow-node-chips{gap:6px!important;align-content:flex-start}.smart-direct-page .sd-flow-list-card .sd-flow-node-chip{min-height:29px!important;padding:0 8px!important;border-radius:9px!important}.smart-direct-page .sd-flow-list-card .sd-flow-node-chip i{font-size:10px!important}.smart-direct-page .sd-flow-list-card .sd-flow-node-chip b{font-size:9.5px!important;font-weight:850!important;max-width:105px!important}
.smart-direct-page .sd-dm-flow-card footer{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin-top:12px!important;padding-top:11px!important;border-top:1px solid color-mix(in srgb,var(--flow-role-accent) 10%,var(--sd-line))!important}.smart-direct-page .sd-flow-card-state{display:inline-flex!important;align-items:center;gap:5px;flex:0 0 auto;font-size:10px!important;font-weight:900!important;color:var(--sd-muted)!important}.smart-direct-page .sd-flow-card-state i{width:7px;height:7px;border-radius:50%;background:#94a3b8}.smart-direct-page .sd-flow-card-state.is-active{color:#15803d!important}.smart-direct-page .sd-flow-card-state.is-active i{background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.10)}
.smart-direct-page .sd-flow-card-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important;min-width:min(100%,250px);margin-inline-start:auto}.smart-direct-page .sd-flow-card-actions button{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;min-width:0!important;min-height:36px!important;padding:0 8px!important;border-radius:10px!important;font-size:10.5px!important;font-weight:850!important;line-height:1!important;white-space:nowrap;overflow:hidden;box-sizing:border-box;transition:.16s ease!important}.smart-direct-page .sd-flow-card-actions button span{font-size:13px;line-height:1;flex:0 0 auto}.smart-direct-page .sd-flow-card-actions button b{font:inherit!important;color:inherit!important;overflow:hidden;text-overflow:ellipsis}.smart-direct-page .sd-flow-card-actions .is-edit{border-color:rgba(139,92,246,.20)!important;background:rgba(139,92,246,.075)!important;color:#7c3aed!important}.smart-direct-page .sd-flow-card-actions .is-duplicate{border-color:rgba(14,165,233,.18)!important;background:rgba(14,165,233,.065)!important;color:#0284c7!important}.smart-direct-page .sd-flow-card-actions .is-danger{border-color:rgba(225,29,72,.16)!important;background:rgba(225,29,72,.055)!important;color:#e11d48!important}.smart-direct-page .sd-flow-card-actions button:hover{transform:translateY(-1px);filter:saturate(1.05)}
.smart-direct-page .sd-premium-flow-card{padding:13px!important;gap:10px!important}.smart-direct-page .sd-premium-flow-card .sd-mini-flow-title-row{grid-template-columns:38px minmax(0,1fr) 50px!important;gap:9px!important;align-items:start!important}.smart-direct-page .sd-premium-flow-card .sd-mini-flow-kind-icon{width:38px!important;height:38px!important;border-radius:12px!important;font-size:16px!important}.smart-direct-page .sd-premium-flow-card .sd-mini-flow-title{display:flex!important;align-items:center;gap:5px!important;flex-wrap:wrap;min-width:0}.smart-direct-page .sd-premium-flow-card .sd-mini-flow-status{font-size:9px!important;min-height:21px!important;padding:0 6px!important}.smart-direct-page .sd-premium-flow-card .sd-mini-flow-title>b{flex-basis:100%;margin-top:1px;font-size:13px!important;line-height:1.6!important;font-weight:950!important;color:var(--sd-text)!important;overflow-wrap:anywhere}.smart-direct-page .sd-premium-flow-card .sd-mini-flow-count{min-width:50px!important;min-height:38px!important;border-radius:11px!important;padding:4px 6px!important}.smart-direct-page .sd-premium-flow-card .sd-mini-flow-count strong{font-size:13px!important}.smart-direct-page .sd-premium-flow-card .sd-mini-flow-count small{font-size:8px!important}.smart-direct-page .sd-premium-flow-card .sd-mini-flow-chips{margin-top:9px!important}.smart-direct-page .sd-premium-flow-card .sd-flow-card-actions{width:100%;min-width:0!important;padding-top:10px;border-top:1px solid color-mix(in srgb,var(--flow-role-accent) 10%,var(--sd-line))}
html[data-theme="dark"] .smart-direct-page .sd-flow-list-card{background:radial-gradient(260px 145px at 100% 0,color-mix(in srgb,var(--flow-role-accent) 11%,transparent),transparent 72%),linear-gradient(145deg,color-mix(in srgb,var(--flow-role-accent) 4%,#1b171d),#1b171d)!important;border-color:color-mix(in srgb,var(--flow-role-accent) 22%,rgba(255,255,255,.08))!important;box-shadow:0 12px 34px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.03)!important}
html[data-theme="dark"] .smart-direct-page .sd-flow-role-badge{background:color-mix(in srgb,var(--flow-role-accent) 13%,#211b22);border-color:color-mix(in srgb,var(--flow-role-accent) 25%,rgba(255,255,255,.08));color:color-mix(in srgb,var(--flow-role-accent) 72%,#fff)}
html[data-theme="dark"] .smart-direct-page .sd-flow-card-actions .is-edit{background:rgba(139,92,246,.11)!important;color:#c4b5fd!important}html[data-theme="dark"] .smart-direct-page .sd-flow-card-actions .is-duplicate{background:rgba(14,165,233,.10)!important;color:#7dd3fc!important}html[data-theme="dark"] .smart-direct-page .sd-flow-card-actions .is-danger{background:rgba(225,29,72,.10)!important;color:#fda4af!important}

/* Template Library — normalized premium typography */
.sd-template-panel .sd-overlay-panel-head{padding:16px 18px}.sd-template-panel .sd-overlay-panel-title small{font-size:10px!important}.sd-template-panel .sd-overlay-panel-title h3{font-size:16px!important;line-height:1.4}.sd-template-panel .sd-overlay-panel-title p{font-size:11.5px!important;line-height:1.75}.sd-template-toolbar{padding:12px 16px!important;gap:9px!important}.sd-template-search input{min-height:40px!important;font-size:12px!important;font-weight:650!important}.sd-template-save-current{min-height:40px!important;padding:0 14px!important;font-size:11.5px!important;border-radius:11px!important}.sd-template-save-head b{font-size:13px!important}.sd-template-save-head small{font-size:10.5px!important;line-height:1.65}.sd-template-save-fields label span{font-size:10.5px!important}.sd-template-save-fields input,.sd-template-save-fields textarea{font-size:12px!important;line-height:1.65!important;min-height:39px}.sd-template-save-actions button{min-height:36px!important;font-size:11px!important}.sd-template-section>header b{font-size:13px!important}.sd-template-section>header small{font-size:10.5px!important;line-height:1.6}.sd-template-grid{gap:12px!important}.sd-template-card{padding:14px!important;border-radius:16px!important;box-shadow:0 10px 28px rgba(15,23,42,.06)!important;transition:.18s ease}.sd-template-card:hover{transform:translateY(-2px);border-color:rgba(124,58,237,.20);box-shadow:0 16px 36px rgba(15,23,42,.09)!important}.sd-template-card-icon{width:38px!important;height:38px!important;border-radius:12px!important;font-size:16px!important}.sd-template-card-badge{padding:5px 8px!important;font-size:9.5px!important}.sd-template-card h4{margin:10px 0 5px!important;font-size:13.5px!important;line-height:1.55!important}.sd-template-card p{min-height:42px!important;font-size:11px!important;line-height:1.8!important}.sd-template-card-meta{gap:6px!important;margin-top:10px!important}.sd-template-card-meta span{padding:5px 7px!important;font-size:9.5px!important;border-radius:8px!important}.sd-template-card-actions{gap:7px!important;margin-top:12px!important}.sd-template-card-actions button{min-height:37px!important;border-radius:10px!important;font-size:11px!important}.sd-template-card-actions .is-delete{flex-basis:38px!important}.sd-template-empty{font-size:11px!important;line-height:1.8!important}

/* Simulator — readable and balanced typography */
.sd-simulator-panel .sd-overlay-panel-head{padding:16px 18px}.sd-simulator-panel .sd-overlay-panel-title small{font-size:10px!important}.sd-simulator-panel .sd-overlay-panel-title h3{font-size:16px!important}.sd-simulator-panel .sd-overlay-panel-title p{font-size:11.5px!important;line-height:1.75}.sd-simulator-safe-badge{font-size:10px!important;padding:7px 10px!important}.sd-simulator-layout{grid-template-columns:minmax(310px,365px) minmax(0,1fr)!important}.sd-simulator-scenario{padding:15px!important}.sd-sim-card-head{margin-bottom:14px!important}.sd-sim-card-head>span{width:36px!important;height:36px!important;border-radius:11px!important;font-size:15px}.sd-sim-card-head b{font-size:13px!important}.sd-sim-card-head small{font-size:10px!important;line-height:1.55}.sd-simulator-scenario>label,.sd-sim-two label{margin-bottom:10px!important}.sd-simulator-scenario label>span{font-size:10.5px!important;margin-bottom:6px!important}.sd-simulator-scenario input,.sd-simulator-scenario textarea,.sd-simulator-scenario select{padding:9px 10px!important;border-radius:10px!important;font-size:12px!important;line-height:1.55!important;min-height:39px!important}.sd-simulator-scenario label>small{font-size:9.5px!important;line-height:1.7!important}.sd-sim-actions{gap:8px!important;margin-top:7px!important}.sd-sim-actions button{min-height:40px!important;font-size:11.5px!important}.sd-simulator-results{padding:15px!important}.sd-sim-summary{padding:12px 13px!important;border-radius:14px!important}.sd-sim-summary>span{width:38px!important;height:38px!important;border-radius:11px!important;font-size:15px}.sd-sim-summary b{font-size:12.5px!important}.sd-sim-summary small{font-size:10px!important;line-height:1.6}.sd-sim-result-grid{gap:11px!important;margin-top:11px!important}.sd-sim-result-grid>section{border-radius:14px!important}.sd-sim-result-grid>section>header{padding:10px 11px!important}.sd-sim-result-grid>section>header b{font-size:11.5px!important}.sd-sim-result-grid>section>header em{font-size:9.5px!important;padding:4px 7px!important}.sd-sim-trace,.sd-sim-outputs{padding:9px!important;gap:7px!important}.sd-sim-trace-item,.sd-sim-output-item{gap:9px!important;padding:9px 10px!important;border-radius:11px!important}.sd-sim-trace-item>span,.sd-sim-output-item>span{width:29px!important;height:29px!important;flex-basis:29px!important;border-radius:9px!important;font-size:11px!important}.sd-sim-trace-item b,.sd-sim-output-item b{font-size:10.5px!important;line-height:1.5}.sd-sim-trace-item small,.sd-sim-output-item small{font-size:9.5px!important;line-height:1.7!important}.sd-sim-empty{font-size:10.5px!important}.sd-sim-choices{padding:10px!important}.sd-sim-choices b{font-size:10.5px!important}.sd-sim-choice-list button{min-height:34px!important;padding:0 10px!important;font-size:10.5px!important;border-radius:9px!important}
html[data-theme="dark"] .sd-template-card{background:linear-gradient(145deg,rgba(124,58,237,.035),rgba(28,24,31,.97))!important;border-color:rgba(255,255,255,.08)!important}html[data-theme="dark"] .sd-template-card:hover{border-color:rgba(139,92,246,.24)!important}html[data-theme="dark"] .sd-simulator-scenario{background:linear-gradient(180deg,rgba(16,185,129,.035),rgba(28,24,31,.96))!important}

/* Responsive polish */
@media(max-width:800px){
  .smart-direct-page .sd-dm-flow-card{padding:12px!important;border-radius:16px!important}
  .smart-direct-page .sd-dm-flow-card header{grid-template-columns:38px minmax(0,1fr) auto;gap:8px!important}
  .smart-direct-page .sd-dm-flow-card .sd-dm-flow-icon{width:38px!important;height:38px!important;border-radius:11px!important}
  .smart-direct-page .sd-dm-flow-heading h3{font-size:13.5px!important}
  .smart-direct-page .sd-dm-flow-card>p{min-height:0;font-size:11px!important;margin:9px 0!important}
  .smart-direct-page .sd-dm-flow-card footer{align-items:stretch!important;flex-direction:column!important;gap:8px!important}
  .smart-direct-page .sd-flow-card-actions{width:100%!important;min-width:0!important}
  .smart-direct-page .sd-flow-card-actions button{min-height:38px!important;font-size:10.5px!important}
  .smart-direct-page .sd-premium-flow-card{padding:11px!important}
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-title-row{grid-template-columns:35px minmax(0,1fr) 47px!important;gap:7px!important}
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-kind-icon{width:35px!important;height:35px!important}
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-title>b{font-size:12.5px!important}
  .sd-template-content{padding:12px!important}.sd-template-card{padding:13px!important}.sd-template-card h4{font-size:13px!important}.sd-template-card p{font-size:10.5px!important;min-height:0!important}
  .sd-simulator-layout{display:block!important}.sd-simulator-scenario,.sd-simulator-results{padding:12px!important}.sd-sim-result-grid{grid-template-columns:1fr!important}.sd-sim-two{grid-template-columns:1fr 1fr!important}
}
@media(max-width:430px){
  .smart-direct-page .sd-flow-role-badge{min-height:20px;padding:0 6px;font-size:8.8px!important}
  .smart-direct-page .sd-flow-card-actions{gap:5px!important}
  .smart-direct-page .sd-flow-card-actions button{min-height:37px!important;padding:0 5px!important;font-size:10px!important}
  .smart-direct-page .sd-flow-card-actions button span{font-size:12px}
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-title-row{grid-template-columns:33px minmax(0,1fr) 44px!important}
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-kind-icon{width:33px!important;height:33px!important}
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-count{min-width:44px!important;min-height:34px!important}
  .sd-template-toolbar{padding:9px!important}.sd-template-save-current{font-size:11px!important}.sd-template-card-badge,.sd-template-card-meta span{font-size:9px!important}
  .sd-sim-two{grid-template-columns:1fr!important}.sd-simulator-scenario label>span{font-size:10px!important}.sd-simulator-scenario input,.sd-simulator-scenario textarea,.sd-simulator-scenario select{font-size:11.5px!important}.sd-sim-trace-item b,.sd-sim-output-item b{font-size:10.5px!important}.sd-sim-trace-item small,.sd-sim-output-item small{font-size:9.5px!important}
}


/* MSM Site 1.0.675 — readable flow actions + strict card containment */
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions,
.smart-direct-page .sd-mini-flow-card.is-comment .sd-mini-flow-actions{
  grid-column:1 / -1!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  gap:6px!important;
  justify-content:stretch!important;
  align-items:stretch!important;
  box-sizing:border-box!important;
  overflow:visible!important;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button,
.smart-direct-page .sd-mini-flow-card.is-comment .sd-mini-flow-actions button{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:37px!important;
  padding:0 7px!important;
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:10.5px!important;
  line-height:1!important;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button b,
.smart-direct-page .sd-mini-flow-card.is-comment .sd-mini-flow-actions button b{
  min-width:0!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
  font:inherit!important;
  color:inherit!important;
}
.smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button span,
.smart-direct-page .sd-mini-flow-card.is-comment .sd-mini-flow-actions button span{
  flex:0 0 auto!important;
  font-size:12px!important;
}

/* DM cards: state gets its own row, actions always stay inside the card */
.smart-direct-page .sd-dm-flow-card{
  overflow:hidden!important;
}
.smart-direct-page .sd-dm-flow-card footer{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.smart-direct-page .sd-dm-flow-card .sd-flow-card-state{
  align-self:flex-start!important;
  max-width:100%!important;
}
.smart-direct-page .sd-dm-flow-card .sd-dm-flow-actions,
.smart-direct-page .sd-dm-flow-card .sd-flow-card-actions{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  gap:6px!important;
  flex:none!important;
  box-sizing:border-box!important;
}
.smart-direct-page .sd-dm-flow-card .sd-dm-flow-actions button,
.smart-direct-page .sd-dm-flow-card .sd-flow-card-actions button{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:37px!important;
  padding:0 7px!important;
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  font-size:10.5px!important;
  line-height:1!important;
}
.smart-direct-page .sd-dm-flow-card .sd-dm-flow-actions button b,
.smart-direct-page .sd-dm-flow-card .sd-flow-card-actions button b{
  min-width:0!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
  font:inherit!important;
  color:inherit!important;
}
.smart-direct-page .sd-dm-flow-card .sd-dm-flow-actions button span,
.smart-direct-page .sd-dm-flow-card .sd-flow-card-actions button span{
  flex:0 0 auto!important;
  font-size:12px!important;
}

/* Light/Dark containment polish */
html[data-theme="dark"] .smart-direct-page .sd-dm-flow-card footer,
html[data-theme="dark"] .smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions{
  border-color:rgba(255,255,255,.07)!important;
}

/* Mobile: keep all three labels readable; do not collapse or hide text */
@media(max-width:800px){
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions,
  .smart-direct-page .sd-mini-flow-card.is-comment .sd-mini-flow-actions,
  .smart-direct-page .sd-dm-flow-card .sd-dm-flow-actions,
  .smart-direct-page .sd-dm-flow-card .sd-flow-card-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button,
  .smart-direct-page .sd-mini-flow-card.is-comment .sd-mini-flow-actions button,
  .smart-direct-page .sd-dm-flow-card .sd-dm-flow-actions button,
  .smart-direct-page .sd-dm-flow-card .sd-flow-card-actions button{
    min-height:38px!important;
    padding-inline:6px!important;
    font-size:10.3px!important;
  }
}
@media(max-width:430px){
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button,
  .smart-direct-page .sd-mini-flow-card.is-comment .sd-mini-flow-actions button,
  .smart-direct-page .sd-dm-flow-card .sd-dm-flow-actions button,
  .smart-direct-page .sd-dm-flow-card .sd-flow-card-actions button{
    min-height:38px!important;
    padding-inline:4px!important;
    gap:3px!important;
    font-size:9.8px!important;
  }
  .smart-direct-page .sd-premium-flow-card .sd-mini-flow-actions button span,
  .smart-direct-page .sd-mini-flow-card.is-comment .sd-mini-flow-actions button span,
  .smart-direct-page .sd-dm-flow-card .sd-dm-flow-actions button span,
  .smart-direct-page .sd-dm-flow-card .sd-flow-card-actions button span{
    font-size:11px!important;
  }
}


/* MSM Site 1.0.678 — Inspector collapse closure + premium JSON tools */

/* Canonical collapse rule: hide the whole scroll/body layer, including all future Start settings. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-scroll,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-trigger-flow-settings,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-flow-fields,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-node-editor,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-feedback,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-actions{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* Keep collapsed Inspector as the single expand affordance only. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed{
  overflow:hidden!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-head{
  overflow:hidden!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions{
  display:flex!important;
  visibility:visible!important;
  pointer-events:auto!important;
}

/* Premium Import / Export JSON card */
.smart-direct-page .sd-flow-json-tools{
  position:relative;
  overflow:hidden;
  margin-top:14px!important;
  padding:13px!important;
  border:1px solid color-mix(in srgb,var(--sd-purple) 22%,var(--sd-line))!important;
  border-radius:16px!important;
  background:
    radial-gradient(190px 95px at 100% 0,color-mix(in srgb,var(--sd-purple) 10%,transparent),transparent 72%),
    radial-gradient(170px 90px at 0 100%,color-mix(in srgb,var(--sd-orange) 8%,transparent),transparent 75%),
    linear-gradient(145deg,color-mix(in srgb,var(--sd-purple) 4%,var(--sd-card)),var(--sd-card))!important;
  box-shadow:
    0 10px 28px rgba(38,25,48,.055),
    inset 0 1px 0 rgba(255,255,255,.30)!important;
}
.smart-direct-page .sd-flow-json-tools:before{
  content:"";
  position:absolute;
  inset:0 auto auto 14px;
  width:72px;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,#8b5cf6,#f97316);
  opacity:.72;
}
.smart-direct-page .sd-flow-json-head{
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr);
  align-items:center!important;
  gap:10px!important;
}
.smart-direct-page .sd-flow-json-head>span{
  width:38px!important;
  height:38px!important;
  border-radius:12px!important;
  background:
    radial-gradient(circle at 28% 22%,rgba(255,255,255,.80),transparent 38%),
    linear-gradient(145deg,color-mix(in srgb,var(--sd-purple) 16%,var(--sd-card)),color-mix(in srgb,var(--sd-orange) 10%,var(--sd-card)))!important;
  color:#7c3aed!important;
  border:1px solid color-mix(in srgb,var(--sd-purple) 20%,var(--sd-line));
  box-shadow:0 6px 16px rgba(124,58,237,.08),inset 0 1px 0 rgba(255,255,255,.58);
  font-size:11px!important;
  font-weight:950!important;
}
.smart-direct-page .sd-flow-json-head b{
  font-size:11.5px!important;
  font-weight:950!important;
  line-height:1.45!important;
}
.smart-direct-page .sd-flow-json-head small{
  margin-top:3px!important;
  font-size:9.5px!important;
  line-height:1.7!important;
}
.smart-direct-page .sd-flow-json-actions{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
  margin-top:11px!important;
}
.smart-direct-page .sd-flow-json-actions button{
  position:relative;
  min-width:0!important;
  min-height:40px!important;
  padding:0 11px!important;
  border-radius:11px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  font-size:10.5px!important;
  font-weight:900!important;
  letter-spacing:0!important;
  cursor:pointer!important;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease!important;
}
.smart-direct-page .sd-flow-json-actions button span{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:grid!important;
  place-items:center!important;
  border-radius:7px;
  font-size:14px!important;
  font-weight:950;
  line-height:1!important;
}
.smart-direct-page .sd-flow-json-actions .is-export{
  color:#6d28d9!important;
  border-color:rgba(124,58,237,.22)!important;
  background:linear-gradient(135deg,rgba(124,58,237,.10),rgba(99,102,241,.055))!important;
  box-shadow:0 6px 15px rgba(124,58,237,.07)!important;
}
.smart-direct-page .sd-flow-json-actions .is-export span{
  color:#7c3aed;
  background:rgba(124,58,237,.10);
  box-shadow:inset 0 0 0 1px rgba(124,58,237,.10);
}
.smart-direct-page .sd-flow-json-actions .is-import{
  color:#c2410c!important;
  border-color:rgba(249,115,22,.22)!important;
  background:linear-gradient(135deg,rgba(249,115,22,.10),rgba(236,72,153,.045))!important;
  box-shadow:0 6px 15px rgba(249,115,22,.07)!important;
}
.smart-direct-page .sd-flow-json-actions .is-import span{
  color:#ea580c;
  background:rgba(249,115,22,.10);
  box-shadow:inset 0 0 0 1px rgba(249,115,22,.10);
}
.smart-direct-page .sd-flow-json-actions button:hover{
  transform:translateY(-2px)!important;
  filter:none!important;
}
.smart-direct-page .sd-flow-json-actions .is-export:hover{
  border-color:rgba(124,58,237,.36)!important;
  background:linear-gradient(135deg,rgba(124,58,237,.15),rgba(99,102,241,.075))!important;
  box-shadow:0 10px 22px rgba(124,58,237,.12)!important;
}
.smart-direct-page .sd-flow-json-actions .is-import:hover{
  border-color:rgba(249,115,22,.36)!important;
  background:linear-gradient(135deg,rgba(249,115,22,.15),rgba(236,72,153,.065))!important;
  box-shadow:0 10px 22px rgba(249,115,22,.12)!important;
}
.smart-direct-page .sd-flow-json-actions button:focus-visible{
  outline:2px solid color-mix(in srgb,currentColor 45%,transparent)!important;
  outline-offset:2px!important;
}

/* Dark theme JSON controls */
html[data-theme="dark"] .smart-direct-page .sd-flow-json-tools{
  border-color:rgba(167,139,250,.18)!important;
  background:
    radial-gradient(190px 95px at 100% 0,rgba(124,58,237,.12),transparent 72%),
    radial-gradient(170px 90px at 0 100%,rgba(249,115,22,.08),transparent 75%),
    linear-gradient(145deg,#211b22,#1b171d)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.17),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-flow-json-head>span{
  color:#c4b5fd!important;
  border-color:rgba(196,181,253,.15)!important;
  background:linear-gradient(145deg,rgba(124,58,237,.18),rgba(249,115,22,.10))!important;
  box-shadow:0 6px 16px rgba(0,0,0,.14),inset 0 1px 0 rgba(255,255,255,.05)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-flow-json-actions .is-export{
  color:#c4b5fd!important;
  border-color:rgba(167,139,250,.20)!important;
  background:linear-gradient(135deg,rgba(124,58,237,.17),rgba(99,102,241,.08))!important;
}
html[data-theme="dark"] .smart-direct-page .sd-flow-json-actions .is-import{
  color:#fdba74!important;
  border-color:rgba(251,146,60,.20)!important;
  background:linear-gradient(135deg,rgba(249,115,22,.15),rgba(236,72,153,.065))!important;
}
html[data-theme="dark"] .smart-direct-page .sd-flow-json-actions .is-export span{color:#ddd6fe;background:rgba(124,58,237,.18)}
html[data-theme="dark"] .smart-direct-page .sd-flow-json-actions .is-import span{color:#fed7aa;background:rgba(249,115,22,.16)}

@media(max-width:560px){
  .smart-direct-page .sd-flow-json-tools{padding:11px!important;border-radius:14px!important}
  .smart-direct-page .sd-flow-json-head{grid-template-columns:34px minmax(0,1fr);gap:8px!important}
  .smart-direct-page .sd-flow-json-head>span{width:34px!important;height:34px!important;border-radius:10px!important}
  .smart-direct-page .sd-flow-json-actions{grid-template-columns:1fr 1fr!important;gap:6px!important}
  .smart-direct-page .sd-flow-json-actions button{min-height:39px!important;padding-inline:7px!important;font-size:10px!important}
  .smart-direct-page .sd-flow-json-actions button span{width:20px;height:20px;flex-basis:20px;font-size:13px!important}
}
@media(max-width:360px){
  .smart-direct-page .sd-flow-json-actions{grid-template-columns:1fr!important}
}


/* MSM Site 1.0.679 — Premium Studio Toolbar with inline SVG icons */
.smart-direct-page .sd-studio-toolbar .sd-toolbar-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action{
  --tb-accent:#8b5cf6;
  position:relative!important;
  min-height:42px!important;
  height:42px!important;
  min-width:0!important;
  padding:0 14px!important;
  border-radius:13px!important;
  border:1px solid color-mix(in srgb,var(--tb-accent) 25%,var(--sd-line))!important;
  background:
    radial-gradient(circle at 22% 16%,rgba(255,255,255,.20),transparent 32%),
    linear-gradient(145deg,color-mix(in srgb,var(--tb-accent) 7%,var(--sd-card)),var(--sd-card))!important;
  color:color-mix(in srgb,var(--tb-accent) 72%,var(--sd-text))!important;
  box-shadow:0 7px 20px rgba(15,23,42,.055),inset 0 1px 0 rgba(255,255,255,.34)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1!important;
  white-space:nowrap!important;
  cursor:pointer!important;
  overflow:hidden!important;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease!important;
}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action.is-template{--tb-accent:#8b5cf6}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action.is-simulator{--tb-accent:#10b981}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action.is-health{--tb-accent:#0ea5e9}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action.is-layout{--tb-accent:#06b6d4}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action.is-add{--tb-accent:#a855f7}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action.is-add{
  background:
    radial-gradient(circle at 22% 16%,rgba(255,255,255,.22),transparent 32%),
    linear-gradient(135deg,color-mix(in srgb,#8b5cf6 16%,var(--sd-card)),color-mix(in srgb,#a855f7 8%,var(--sd-card)))!important;
}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action:hover{
  transform:translateY(-1px)!important;
  border-color:color-mix(in srgb,var(--tb-accent) 38%,var(--sd-line))!important;
  box-shadow:0 11px 26px rgba(15,23,42,.09),inset 0 1px 0 rgba(255,255,255,.42)!important;
}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action:active{
  transform:translateY(0)!important;
  box-shadow:0 5px 15px rgba(15,23,42,.055),inset 0 1px 0 rgba(255,255,255,.30)!important;
}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action:focus-visible{
  outline:2px solid color-mix(in srgb,var(--tb-accent) 48%,transparent)!important;
  outline-offset:2px!important;
}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action-icon{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:currentColor!important;
}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action-icon svg{
  width:18px!important;
  height:18px!important;
  display:block!important;
  overflow:visible!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.smart-direct-page .sd-studio-toolbar .sd-toolbar-action-label{
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:inherit!important;
  font:inherit!important;
  line-height:1!important;
}
html[data-theme="dark"] .smart-direct-page .sd-studio-toolbar .sd-toolbar-action{
  background:
    radial-gradient(circle at 22% 16%,rgba(255,255,255,.055),transparent 32%),
    linear-gradient(145deg,color-mix(in srgb,var(--tb-accent) 13%,#1d181f),#1d181f)!important;
  border-color:color-mix(in srgb,var(--tb-accent) 27%,rgba(255,255,255,.08))!important;
  color:color-mix(in srgb,var(--tb-accent) 58%,#fff)!important;
  box-shadow:0 9px 23px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme="dark"] .smart-direct-page .sd-studio-toolbar .sd-toolbar-action.is-add{
  background:linear-gradient(135deg,rgba(124,58,237,.20),rgba(168,85,247,.10))!important;
}

/* Mobile: compact icon-first buttons; SVG stays plain with no inner chip/border. */
@media(max-width:800px){
  .smart-direct-page .sd-studio-toolbar .sd-toolbar-actions{
    gap:6px!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding-block:1px!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch;
  }
  .smart-direct-page .sd-studio-toolbar .sd-toolbar-actions::-webkit-scrollbar{display:none!important}
  .smart-direct-page .sd-studio-toolbar .sd-toolbar-action{
    flex:0 0 auto!important;
    min-height:39px!important;
    height:39px!important;
    padding:0 11px!important;
    border-radius:12px!important;
    gap:6px!important;
    font-size:11px!important;
  }
  .smart-direct-page .sd-studio-toolbar .sd-toolbar-action-icon,
  .smart-direct-page .sd-studio-toolbar .sd-toolbar-action-icon svg{
    width:17px!important;
    height:17px!important;
    min-width:17px!important;
    min-height:17px!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
}
@media(max-width:560px){
  .smart-direct-page .sd-studio-toolbar .sd-toolbar-action{
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    padding:0!important;
    border-radius:12px!important;
    gap:0!important;
  }
  .smart-direct-page .sd-studio-toolbar .sd-toolbar-action-label{display:none!important}
  .smart-direct-page .sd-studio-toolbar .sd-toolbar-action-icon,
  .smart-direct-page .sd-studio-toolbar .sd-toolbar-action-icon svg{
    width:19px!important;
    height:19px!important;
    min-width:19px!important;
    min-height:19px!important;
  }
}

/* MSM Site 1.0.680 — premium shared image uploader */
.smart-direct-page .sd-media-uploader[data-media-uploader="image"]{
  position:relative;overflow:hidden;display:grid!important;gap:10px!important;margin:8px 0 12px!important;padding:11px!important;
  border:1px solid color-mix(in srgb,#8b5cf6 20%,var(--sd-line))!important;border-radius:16px!important;
  background:radial-gradient(180px 95px at 100% 0,rgba(139,92,246,.09),transparent 72%),radial-gradient(150px 85px at 0 100%,rgba(249,115,22,.06),transparent 74%),linear-gradient(145deg,color-mix(in srgb,#8b5cf6 3%,var(--sd-card)),var(--sd-card))!important;
  box-shadow:0 9px 26px rgba(35,24,44,.055),inset 0 1px 0 rgba(255,255,255,.34)!important;
}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"]:before{content:"";position:absolute;top:0;inset-inline-start:14px;width:68px;height:2px;border-radius:999px;background:linear-gradient(90deg,#8b5cf6,#f97316);opacity:.72}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-empty{
  min-height:112px!important;padding:14px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:8px!important;
  border:1px dashed color-mix(in srgb,#8b5cf6 28%,var(--sd-line))!important;border-radius:13px!important;
  background:radial-gradient(circle at 50% 10%,rgba(139,92,246,.07),transparent 44%),color-mix(in srgb,var(--sd-card) 95%,transparent)!important;color:var(--sd-muted)!important;
}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-empty>span{width:42px!important;height:42px!important;display:grid!important;place-items:center!important;border-radius:13px!important;color:#7c3aed!important;background:linear-gradient(145deg,rgba(139,92,246,.12),rgba(249,115,22,.07))!important;border:1px solid rgba(139,92,246,.13)!important;box-shadow:0 7px 18px rgba(124,58,237,.08),inset 0 1px 0 rgba(255,255,255,.45)!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-empty b{font-size:10.5px!important;font-weight:850!important;line-height:1.55!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-preview.is-image{height:148px!important;overflow:hidden!important;border:1px solid color-mix(in srgb,#8b5cf6 18%,var(--sd-line))!important;border-radius:13px!important;background:var(--sd-surface-2)!important;box-shadow:0 7px 20px rgba(15,23,42,.07)!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-preview.is-image img{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-actions{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;width:100%!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-action-buttons{display:block!important;width:100%!important;min-width:0!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-button{width:100%!important;min-width:0!important;height:41px!important;min-height:41px!important;padding:0 13px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;border:1px solid rgba(139,92,246,.22)!important;border-radius:11px!important;background:linear-gradient(135deg,rgba(139,92,246,.11),rgba(249,115,22,.065))!important;color:#6d28d9!important;box-shadow:0 6px 16px rgba(124,58,237,.07),inset 0 1px 0 rgba(255,255,255,.40)!important;cursor:pointer!important;transition:.16s ease!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-button:hover{transform:translateY(-1px)!important;border-color:rgba(139,92,246,.36)!important;background:linear-gradient(135deg,rgba(139,92,246,.16),rgba(249,115,22,.09))!important;box-shadow:0 10px 22px rgba(124,58,237,.11)!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-button-icon{width:22px!important;height:22px!important;min-width:22px!important;display:grid!important;place-items:center!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:currentColor!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-button-icon svg{width:19px!important;height:19px!important;display:block!important;fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-button b{font-size:10.8px!important;font-weight:900!important;line-height:1!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-media-inline-status{max-width:132px!important;height:32px!important;border-radius:9px!important;font-size:9.5px!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-progress{padding:10px!important;border-radius:11px!important;border:1px solid color-mix(in srgb,#8b5cf6 16%,var(--sd-line))!important;background:color-mix(in srgb,var(--sd-card) 96%,#8b5cf6)!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-track{height:6px!important;background:color-mix(in srgb,var(--sd-line) 82%,transparent)!important}
.smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-track i{background:linear-gradient(90deg,#f97316,#a855f7,#7c3aed)!important}
html[data-theme="dark"] .smart-direct-page .sd-media-uploader[data-media-uploader="image"]{border-color:rgba(167,139,250,.17)!important;background:radial-gradient(180px 95px at 100% 0,rgba(124,58,237,.12),transparent 72%),radial-gradient(150px 85px at 0 100%,rgba(249,115,22,.07),transparent 74%),linear-gradient(145deg,#211b22,#1b171d)!important;box-shadow:0 10px 26px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.035)!important}
html[data-theme="dark"] .smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-empty{background:rgba(255,255,255,.018)!important;border-color:rgba(167,139,250,.20)!important}
html[data-theme="dark"] .smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-button{color:#ddd6fe!important;border-color:rgba(167,139,250,.20)!important;background:linear-gradient(135deg,rgba(124,58,237,.17),rgba(249,115,22,.08))!important;box-shadow:0 7px 18px rgba(0,0,0,.14)!important}
html[data-theme="dark"] .smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-progress{background:#1a151b!important;border-color:rgba(255,255,255,.08)!important}
@media(max-width:560px){
  .smart-direct-page .sd-media-uploader[data-media-uploader="image"]{padding:9px!important;border-radius:14px!important}
  .smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-preview.is-image{height:126px!important}
  .smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-empty{min-height:98px!important}
  .smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-upload-actions{grid-template-columns:1fr!important}
  .smart-direct-page .sd-media-uploader[data-media-uploader="image"] .sd-media-inline-status{max-width:100%!important;width:100%!important;justify-content:center!important}
}


/* MSM Site 1.0.682 — Portal-safe Studio action toolbar
   Studio is moved under body while open; these rules intentionally target the live portal. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action{
  --tb-accent:#8b5cf6;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action.is-template{--tb-accent:#a855f7}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action.is-simulator{--tb-accent:#10b981}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action.is-health{--tb-accent:#0ea5e9}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action.is-layout{--tb-accent:#06b6d4}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action.is-add{--tb-accent:#8b5cf6}

@media(min-width:801px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-toolbar{
    min-height:60px!important;
    height:auto!important;
    padding:8px 12px!important;
    gap:10px!important;
    overflow:visible!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-context{
    flex:1 1 150px!important;
    min-width:90px!important;
    max-width:280px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions{
    display:flex!important;
    flex:0 0 auto!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:7px!important;
    width:auto!important;
    min-width:0!important;
    overflow:visible!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action{
    position:relative!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:max-content!important;
    max-width:none!important;
    height:40px!important;
    min-height:40px!important;
    padding:0 13px!important;
    gap:7px!important;
    border:1px solid color-mix(in srgb,var(--tb-accent) 28%,var(--sdp-line,rgba(0,0,0,.12)))!important;
    border-radius:12px!important;
    background:
      radial-gradient(circle at 18% 12%,rgba(255,255,255,.24),transparent 34%),
      linear-gradient(145deg,color-mix(in srgb,var(--tb-accent) 10%,var(--sdp-card,#fff)),var(--sdp-card,#fff))!important;
    color:color-mix(in srgb,var(--tb-accent) 76%,var(--sdp-text,#2f2830))!important;
    box-shadow:0 7px 18px rgba(15,23,42,.06),inset 0 1px 0 rgba(255,255,255,.32)!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    white-space:nowrap!important;
    overflow:visible!important;
    font-size:11.5px!important;
    font-weight:900!important;
    line-height:1!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action:hover{
    transform:translateY(-1px)!important;
    border-color:color-mix(in srgb,var(--tb-accent) 44%,var(--sdp-line,rgba(0,0,0,.12)))!important;
    box-shadow:0 10px 24px rgba(15,23,42,.10),inset 0 1px 0 rgba(255,255,255,.40)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action-icon{
    width:19px!important;
    height:19px!important;
    min-width:19px!important;
    min-height:19px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    color:currentColor!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action-icon svg{
    width:19px!important;
    height:19px!important;
    display:block!important;
    overflow:visible!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.9!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action-label{
    display:inline-block!important;
    width:auto!important;
    min-width:max-content!important;
    max-width:none!important;
    height:auto!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:inherit!important;
    font:inherit!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:visible!important;
    opacity:1!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action.is-add{
    padding-inline:15px!important;
    background:
      radial-gradient(circle at 18% 12%,rgba(255,255,255,.27),transparent 34%),
      linear-gradient(135deg,color-mix(in srgb,#8b5cf6 18%,var(--sdp-card,#fff)),color-mix(in srgb,#a855f7 9%,var(--sdp-card,#fff)))!important;
  }
  html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-action{
    background:
      radial-gradient(circle at 18% 12%,rgba(255,255,255,.055),transparent 34%),
      linear-gradient(145deg,color-mix(in srgb,var(--tb-accent) 14%,#211b22),#211b22)!important;
    border-color:color-mix(in srgb,var(--tb-accent) 30%,rgba(255,255,255,.10))!important;
    color:color-mix(in srgb,var(--tb-accent) 55%,#fff)!important;
    box-shadow:0 8px 20px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.035)!important;
  }
}

/* Mobile: the action group is moved into the header by JS.
   Five actions are icon-only, with no chip, border or surrounding box. */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-header-actions{
    min-width:0!important;
    gap:4px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions{
    display:flex!important;
    flex:1 1 auto!important;
    min-width:0!important;
    width:auto!important;
    align-items:center!important;
    justify-content:center!important;
    gap:2px!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions .sd-toolbar-action{
    flex:0 0 26px!important;
    width:26px!important;
    min-width:26px!important;
    max-width:26px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    padding:0!important;
    margin:0!important;
    gap:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    outline:0!important;
    overflow:visible!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    color:var(--tb-accent)!important;
    filter:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions .sd-toolbar-action:hover,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions .sd-toolbar-action:active{
    transform:none!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    filter:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions .sd-toolbar-action-label{
    display:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions .sd-toolbar-action-icon{
    width:20px!important;
    height:20px!important;
    min-width:20px!important;
    min-height:20px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    color:currentColor!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions .sd-toolbar-action-icon svg{
    width:20px!important;
    height:20px!important;
    min-width:20px!important;
    min-height:20px!important;
    display:block!important;
    overflow:visible!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:2!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }
  html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions .sd-toolbar-action{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
}
@media(max-width:390px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions{
    gap:1px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions .sd-toolbar-action{
    flex-basis:24px!important;
    width:24px!important;
    min-width:24px!important;
    max-width:24px!important;
    height:32px!important;
    min-height:32px!important;
    max-height:32px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions .sd-toolbar-action-icon,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-toolbar-actions.is-mobile-header-actions .sd-toolbar-action-icon svg{
    width:18px!important;
    height:18px!important;
    min-width:18px!important;
    min-height:18px!important;
  }
}


/* MSM Site 1.0.684 — mobile node geometry + intentional Inspector collapse */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed){
    position:static!important;
    overflow:hidden!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) .sd-inspector-head{
    position:relative!important;
    top:auto!important;
    overflow:visible!important;
    padding-top:36px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) .sd-inspector-window-actions{
    position:absolute!important;
    z-index:20!important;
    top:5px!important;
    left:50%!important;
    right:auto!important;
    width:auto!important;
    height:25px!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:translateX(-50%)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) #sdInspectorMinimize.is-mobile-collapse{
    width:58px!important;
    min-width:58px!important;
    max-width:58px!important;
    height:25px!important;
    min-height:25px!important;
    max-height:25px!important;
    padding:0!important;
    border:1px solid color-mix(in srgb,#8b5cf6 28%,var(--sd-line))!important;
    border-radius:999px!important;
    color:#c4b5fd!important;
    background:
      radial-gradient(circle at 30% 18%,rgba(255,255,255,.20),transparent 38%),
      linear-gradient(135deg,rgba(124,58,237,.24),rgba(249,115,22,.15))!important;
    box-shadow:
      0 8px 20px rgba(76,29,149,.18),
      inset 0 1px 0 rgba(255,255,255,.12)!important;
    display:grid!important;
    place-items:center!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspectorMinimize .sd-collapse-icon{
    width:18px!important;
    height:18px!important;
    display:block!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.9!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }
  html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) #sdInspectorMinimize.is-mobile-collapse{
    color:#6d28d9!important;
    border-color:rgba(109,40,217,.18)!important;
    background:
      radial-gradient(circle at 30% 18%,#fff,rgba(255,255,255,.42) 36%,transparent 37%),
      linear-gradient(135deg,#f5efff,#fff0e5)!important;
    box-shadow:
      0 7px 18px rgba(109,40,217,.12),
      inset 0 1px 0 rgba(255,255,255,.92)!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed{
    align-self:center!important;
    flex:0 0 50px!important;
    flex-basis:50px!important;
    width:50px!important;
    min-width:50px!important;
    max-width:50px!important;
    height:50px!important;
    min-height:50px!important;
    max-height:50px!important;
    margin:0 auto 2px!important;
    padding:3px!important;
    overflow:visible!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-head{
    overflow:visible!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-collapsed .sd-inspector-window-actions{
    display:flex!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
}


/* MSM Site 1.0.685 — interactive Form simulation + dark Simulator polish */
.sd-sim-form-prompt{display:grid;gap:10px;padding:12px;border:1px solid rgba(37,99,235,.18);border-radius:14px;background:linear-gradient(145deg,rgba(37,99,235,.07),rgba(139,92,246,.055));box-shadow:0 10px 24px rgba(30,41,59,.07)}
.sd-sim-form-prompt-head{display:flex;align-items:center;gap:9px}
.sd-sim-form-prompt-head>span{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(145deg,rgba(37,99,235,.16),rgba(139,92,246,.10));color:#2563eb;font-size:14px;font-weight:950}
.sd-sim-form-prompt-head small{display:block;color:#2563eb;font-size:9px;font-weight:950}
.sd-sim-form-prompt-head b{display:block;margin-top:2px;color:var(--sd-text);font-size:11.5px;line-height:1.65}
.sd-sim-form-prompt label{display:grid;gap:6px}
.sd-sim-form-prompt label>span{color:var(--sd-muted);font-size:9.5px;font-weight:900}
.sd-sim-form-prompt input,.sd-sim-form-prompt textarea,.sd-sim-form-prompt select{width:100%;min-height:40px;padding:9px 10px;border:1px solid var(--sd-line);border-radius:10px;background:var(--sd-card);color:var(--sd-text);font:inherit;font-size:11px;outline:none!important;box-shadow:none!important}
.sd-sim-form-prompt textarea{resize:vertical;min-height:72px}
.sd-sim-form-prompt input:focus,.sd-sim-form-prompt input:focus-visible,.sd-sim-form-prompt textarea:focus,.sd-sim-form-prompt textarea:focus-visible,.sd-sim-form-prompt select:focus,.sd-sim-form-prompt select:focus-visible{outline:none!important;border-color:rgba(139,92,246,.48)!important;box-shadow:none!important}
.sd-sim-form-error{padding:7px 9px;border-radius:9px;background:rgba(239,68,68,.08);color:#dc2626;font-size:9.5px;font-weight:850}
.sd-sim-form-actions{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:7px}
.sd-sim-form-actions button{min-height:38px;border-radius:10px;font-size:10px;font-weight:900;cursor:pointer}
.sd-sim-form-actions .is-timeout{border:1px solid rgba(245,158,11,.20);background:rgba(245,158,11,.08);color:#b45309}
.sd-sim-form-actions .is-continue{border:1px solid rgba(16,185,129,.20);background:linear-gradient(135deg,rgba(16,185,129,.14),rgba(14,165,233,.10));color:#047857}
.sd-sim-form-prompt>em{font-style:normal;color:var(--sd-muted);font-size:8.8px;line-height:1.7}

/* Simulator fields: never show the old brown/orange outer focus frame. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel input:focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel input:focus-visible,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel textarea:focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel textarea:focus-visible,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel select:focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel select:focus-visible{
  outline:none!important;
  box-shadow:none!important;
  border-color:rgba(139,92,246,.42)!important;
}

/* Dark Simulator scrollbars */
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-layout,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-results,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-outputs{
  scrollbar-width:thin;
  scrollbar-color:rgba(167,139,250,.58) rgba(255,255,255,.035);
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel::-webkit-scrollbar,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-layout::-webkit-scrollbar,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario::-webkit-scrollbar,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-results::-webkit-scrollbar,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace::-webkit-scrollbar,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-outputs::-webkit-scrollbar{width:9px;height:9px}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel::-webkit-scrollbar-track,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-layout::-webkit-scrollbar-track,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario::-webkit-scrollbar-track,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-results::-webkit-scrollbar-track,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace::-webkit-scrollbar-track,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-outputs::-webkit-scrollbar-track{background:rgba(255,255,255,.025);border-radius:999px}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel::-webkit-scrollbar-thumb,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-layout::-webkit-scrollbar-thumb,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario::-webkit-scrollbar-thumb,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-results::-webkit-scrollbar-thumb,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace::-webkit-scrollbar-thumb,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-outputs::-webkit-scrollbar-thumb{background:linear-gradient(180deg,rgba(167,139,250,.72),rgba(124,58,237,.46));border:2px solid #1b171d;border-radius:999px}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-layout::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-results::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#a78bfa,#7c3aed)}
@media(max-width:560px){.sd-sim-form-actions{grid-template-columns:1fr}.sd-sim-form-prompt{padding:10px}}


/* MSM Site 1.0.686 — Simulator typography readability bump */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel .sd-overlay-panel-title small{
  font-size:11px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel .sd-overlay-panel-title p{
  font-size:12px!important;
  line-height:1.8!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-safe-badge{
  font-size:10.8px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-card-head small{
  font-size:10.8px!important;
  line-height:1.65!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario label>span{
  font-size:11.2px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario label>small{
  font-size:10.2px!important;
  line-height:1.75!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario input,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario textarea,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario select{
  font-size:12.6px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-summary small{
  font-size:10.8px!important;
  line-height:1.7!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item b,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-item b{
  font-size:11px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item small,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-item small{
  font-size:10.2px!important;
  line-height:1.75!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choices b{
  font-size:11px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choice-list button{
  font-size:11px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt-head small{
  font-size:10px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt-head b{
  font-size:12px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt label>span{
  font-size:10.5px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt input,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt textarea,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt select{
  font-size:11.8px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt>em{
  font-size:9.6px!important;
  line-height:1.75!important;
}
@media(max-width:560px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel .sd-overlay-panel-title small{font-size:10.5px!important}
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario label>span{font-size:10.8px!important}
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item small,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-item small{font-size:9.9px!important}
}


/* MSM Site 1.0.687 — mobile Inspector collapse control lives outside the panel */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed){
    position:relative!important;
    overflow:visible!important;
    margin-top:32px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) .sd-inspector-head{
    position:static!important;
    overflow:hidden!important;
    padding-top:12px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) .sd-inspector-window-actions{
    position:absolute!important;
    z-index:30!important;
    top:-29px!important;
    left:50%!important;
    right:auto!important;
    width:auto!important;
    height:25px!important;
    margin:0!important;
    padding:0!important;
    transform:translateX(-50%)!important;
    pointer-events:auto!important;
    overflow:visible!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) #sdInspectorMinimize.is-mobile-collapse{
    margin:0!important;
    box-shadow:0 8px 20px rgba(76,29,149,.16),inset 0 1px 0 rgba(255,255,255,.10)!important;
  }
}


/* MSM Site 1.0.688 — mobile collapse handle centered on Inspector top border */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed){
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    transform:none!important;
    overflow:visible!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) .sd-inspector-scroll{
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) .sd-inspector-head{
    position:sticky!important;
    top:0!important;
    overflow:hidden!important;
    padding:8px 0 9px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) .sd-inspector-window-actions{
    position:absolute!important;
    z-index:90!important;
    top:0!important;
    left:50%!important;
    right:auto!important;
    width:auto!important;
    height:25px!important;
    margin:0!important;
    padding:0!important;
    transform:translate(-50%,-50%)!important;
    overflow:visible!important;
    pointer-events:auto!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector:not(.is-collapsed) #sdInspectorMinimize.is-mobile-collapse{
    position:relative!important;
    z-index:91!important;
    margin:0!important;
  }
}


/* MSM Site 1.0.689 — mobile Inspector handle uses the real panel as its anchor */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-grid{
    overflow:hidden!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed){
    position:relative!important;
    align-self:stretch!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    flex:0 0 min(39dvh,270px)!important;
    flex-basis:min(39dvh,270px)!important;
    height:min(39dvh,270px)!important;
    min-height:0!important;
    max-height:min(39dvh,270px)!important;
    margin:0!important;
    padding:0 9px!important;
    transform:none!important;
    overflow:visible!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-window-actions{
    position:absolute!important;
    z-index:120!important;
    top:-3px!important;
    left:50%!important;
    right:auto!important;
    width:auto!important;
    height:25px!important;
    margin:0!important;
    padding:0!important;
    transform:translate(-50%,-50%)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
    pointer-events:auto!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-window-actions #sdInspectorMinimize{
    position:relative!important;
    z-index:121!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-head{
    position:relative!important;
    top:auto!important;
    flex:0 0 auto!important;
    min-height:56px!important;
    padding:8px 0 9px!important;
    overflow:hidden!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-scroll{
    display:block!important;
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    padding-bottom:8px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-actions{
    position:static!important;
    flex:0 0 auto!important;
    width:100%!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:9px 0 calc(9px + env(safe-area-inset-bottom))!important;
    overflow:hidden!important;
  }
}
@media(max-width:560px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed){
    flex-basis:min(39dvh,270px)!important;
    height:min(39dvh,270px)!important;
    max-height:min(39dvh,270px)!important;
  }
}

/* MSM Site 1.0.690 — deploy sync marker for mobile inspector fix */


/* MSM Site 1.0.691 — final mobile Inspector layout contract */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-grid{
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    min-height:0!important;
    height:auto!important;
    box-sizing:border-box!important;
    padding:5px!important;
    gap:5px!important;
    overflow:hidden!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-canvas-shell{
    order:1!important;
    flex:1 1 auto!important;
    min-height:165px!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    margin:0!important;
    overflow:hidden!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed){
    order:2!important;
    position:relative!important;
    display:flex!important;
    flex:0 0 clamp(260px,46dvh,315px)!important;
    flex-direction:column!important;
    align-self:stretch!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    height:clamp(260px,46dvh,315px)!important;
    min-height:260px!important;
    max-height:315px!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:0 10px!important;
    overflow:visible!important;
    transform:none!important;
    border-radius:15px!important;
  }

  /* The old grey drag nub is replaced by the actual collapse control. */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)::before{
    display:none!important;
    content:none!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-window-actions{
    position:absolute!important;
    z-index:140!important;
    top:0!important;
    left:50%!important;
    right:auto!important;
    width:auto!important;
    height:26px!important;
    margin:0!important;
    padding:0!important;
    transform:translate(-50%,-62%)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
    pointer-events:auto!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-window-actions #sdInspectorMinimize{
    position:relative!important;
    z-index:141!important;
    width:60px!important;
    min-width:60px!important;
    max-width:60px!important;
    height:26px!important;
    min-height:26px!important;
    max-height:26px!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-head{
    position:relative!important;
    top:auto!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-height:56px!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:8px 0 9px!important;
    overflow:hidden!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-scroll{
    display:block!important;
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    box-sizing:border-box!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    padding:0 0 8px!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-actions{
    position:static!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:9px 0 calc(9px + env(safe-area-inset-bottom))!important;
    overflow:hidden!important;
    border-top:1px solid var(--sd-line)!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-actions button{
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  /* Collapsed means one compact expand control only. */
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector.is-collapsed{
    order:2!important;
    position:relative!important;
    flex:0 0 42px!important;
    align-self:center!important;
    width:64px!important;
    min-width:64px!important;
    max-width:64px!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    margin:0 auto!important;
    padding:0!important;
    overflow:visible!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector.is-collapsed::before,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector.is-collapsed>.sd-inspector-head,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector.is-collapsed>.sd-inspector-scroll,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector.is-collapsed>.sd-inspector-actions{
    display:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector.is-collapsed>.sd-inspector-window-actions{
    position:absolute!important;
    inset:0!important;
    z-index:140!important;
    width:64px!important;
    height:42px!important;
    margin:0!important;
    display:grid!important;
    place-items:center!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector.is-collapsed #sdInspectorMinimize{
    width:60px!important;
    min-width:60px!important;
    height:30px!important;
    min-height:30px!important;
    border-radius:999px!important;
  }
}

@media(max-width:560px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed){
    flex-basis:clamp(260px,46dvh,305px)!important;
    height:clamp(260px,46dvh,305px)!important;
    max-height:305px!important;
  }
}


/* MSM Site 1.0.692 — mobile Inspector alignment/height + portal-safe JSON tools */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-grid{
    box-sizing:border-box!important;
    padding:5px!important;
    gap:2px!important;
    overflow:hidden!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-canvas-legend{
    bottom:2px!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed){
    align-self:center!important;
    flex:0 0 clamp(300px,54dvh,360px)!important;
    flex-basis:clamp(300px,54dvh,360px)!important;
    width:calc(100% - 4px)!important;
    min-width:0!important;
    max-width:calc(100% - 4px)!important;
    height:clamp(300px,54dvh,360px)!important;
    min-height:300px!important;
    max-height:360px!important;
    margin-inline:2px!important;
    margin-block:0!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-window-actions{
    top:-1px!important;
    transform:translate(-50%,-68%)!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-scroll{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed)>.sd-inspector-actions{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    margin:0!important;
    overflow:hidden!important;
  }
}
@media(max-width:560px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed){
    flex-basis:clamp(300px,54dvh,350px)!important;
    height:clamp(300px,54dvh,350px)!important;
    max-height:350px!important;
  }
}

/* Studio is portalled to body while open; keep JSON tools premium there too. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-tools{
  position:relative!important;
  overflow:hidden!important;
  margin-top:14px!important;
  padding:13px!important;
  border:1px solid color-mix(in srgb,#8b5cf6 24%,var(--sdp-line))!important;
  border-radius:16px!important;
  background:
    radial-gradient(180px 90px at 100% 0,rgba(124,58,237,.11),transparent 72%),
    radial-gradient(150px 82px at 0 100%,rgba(249,115,22,.08),transparent 75%),
    linear-gradient(145deg,color-mix(in srgb,#8b5cf6 5%,var(--sdp-card)),var(--sdp-card))!important;
  box-shadow:0 10px 26px rgba(0,0,0,.10),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-tools::before{
  content:""!important;
  position:absolute!important;
  top:0!important;
  right:14px!important;
  width:72px!important;
  height:2px!important;
  border-radius:999px!important;
  background:linear-gradient(90deg,#8b5cf6,#f97316)!important;
  opacity:.8!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-head{
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-head>span{
  width:38px!important;
  height:38px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(167,139,250,.18)!important;
  border-radius:12px!important;
  color:#c4b5fd!important;
  background:linear-gradient(145deg,rgba(124,58,237,.18),rgba(249,115,22,.10))!important;
  box-shadow:0 6px 16px rgba(0,0,0,.14),inset 0 1px 0 rgba(255,255,255,.05)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-head b{
  color:var(--sdp-text)!important;
  font-size:11.5px!important;
  font-weight:950!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-head small{
  display:block!important;
  margin-top:3px!important;
  color:var(--sdp-muted)!important;
  font-size:9.8px!important;
  line-height:1.7!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
  margin-top:11px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions button{
  min-width:0!important;
  min-height:41px!important;
  padding:0 10px!important;
  border-radius:11px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  font-size:10.5px!important;
  font-weight:900!important;
  cursor:pointer!important;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,background .15s ease!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions button span{
  width:22px!important;
  height:22px!important;
  flex:0 0 22px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:7px!important;
  font-size:14px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions .is-export{
  color:#c4b5fd!important;
  border:1px solid rgba(167,139,250,.24)!important;
  background:linear-gradient(135deg,rgba(124,58,237,.18),rgba(99,102,241,.085))!important;
  box-shadow:0 7px 17px rgba(76,29,149,.12)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions .is-export span{
  color:#ddd6fe!important;
  background:rgba(124,58,237,.19)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions .is-import{
  color:#fdba74!important;
  border:1px solid rgba(251,146,60,.24)!important;
  background:linear-gradient(135deg,rgba(249,115,22,.17),rgba(236,72,153,.07))!important;
  box-shadow:0 7px 17px rgba(154,52,18,.10)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions .is-import span{
  color:#fed7aa!important;
  background:rgba(249,115,22,.17)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions button:hover{
  transform:translateY(-1px)!important;
  filter:none!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-tools{
  background:
    radial-gradient(180px 90px at 100% 0,rgba(124,58,237,.08),transparent 72%),
    radial-gradient(150px 82px at 0 100%,rgba(249,115,22,.06),transparent 75%),
    linear-gradient(145deg,#fffafc,#f8f2f6)!important;
  box-shadow:0 10px 24px rgba(61,42,52,.07),inset 0 1px 0 rgba(255,255,255,.82)!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions .is-export{
  color:#6d28d9!important;
  border-color:rgba(124,58,237,.20)!important;
  background:linear-gradient(135deg,rgba(124,58,237,.10),rgba(99,102,241,.05))!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions .is-import{
  color:#c2410c!important;
  border-color:rgba(249,115,22,.20)!important;
  background:linear-gradient(135deg,rgba(249,115,22,.10),rgba(236,72,153,.04))!important;
}
@media(max-width:560px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-tools{
    padding:11px!important;
    border-radius:14px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-head{
    grid-template-columns:34px minmax(0,1fr)!important;
    gap:8px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-head>span{
    width:34px!important;
    height:34px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions{
    gap:6px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-json-actions button{
    min-height:39px!important;
    padding-inline:7px!important;
    font-size:10px!important;
  }
}


/* MSM Site 1.0.693 — taller centered mobile Inspector + premium Flow Role dropdown */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-grid{
    padding-inline:6px!important;
    padding-block:4px!important;
    gap:2px!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed){
    align-self:stretch!important;
    flex:0 0 clamp(335px,59dvh,405px)!important;
    flex-basis:clamp(335px,59dvh,405px)!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:clamp(335px,59dvh,405px)!important;
    min-height:335px!important;
    max-height:405px!important;
    margin:0!important;
    box-sizing:border-box!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector.is-collapsed{
    transform:translateY(-7px)!important;
  }
}
@media(max-width:560px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed){
    flex-basis:clamp(330px,59dvh,395px)!important;
    height:clamp(330px,59dvh,395px)!important;
    min-height:330px!important;
    max-height:395px!important;
  }
}

/* Native select remains the source of truth; this controlled dropdown owns the visual UI. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-card{
  position:relative!important;
  overflow:visible!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-card select.is-premium-source{
  position:absolute!important;
  inline-size:1px!important;
  block-size:1px!important;
  min-width:0!important;
  min-height:0!important;
  opacity:0!important;
  pointer-events:none!important;
  clip-path:inset(50%)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-premium{
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  z-index:12!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-trigger{
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  padding:0 12px!important;
  border:1px solid color-mix(in srgb,#0891b2 30%,var(--sdp-line))!important;
  border-radius:12px!important;
  background:
    radial-gradient(circle at 18% 12%,rgba(255,255,255,.05),transparent 35%),
    linear-gradient(145deg,color-mix(in srgb,#0891b2 12%,var(--sdp-card)),var(--sdp-card))!important;
  color:var(--sdp-text)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  font-size:11px!important;
  font-weight:900!important;
  line-height:1!important;
  box-shadow:0 7px 18px rgba(8,145,178,.08),inset 0 1px 0 rgba(255,255,255,.04)!important;
  cursor:pointer!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-trigger i{
  flex:0 0 24px!important;
  width:24px!important;
  height:24px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:8px!important;
  background:rgba(8,145,178,.12)!important;
  color:#22d3ee!important;
  font-size:13px!important;
  font-style:normal!important;
  transition:transform .16s ease!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-premium.is-open .sd-flow-role-trigger{
  border-color:rgba(34,211,238,.34)!important;
  box-shadow:0 0 0 2px rgba(34,211,238,.07),0 10px 24px rgba(8,145,178,.12)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-premium.is-open .sd-flow-role-trigger i{
  transform:rotate(180deg)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-menu{
  position:absolute!important;
  z-index:120!important;
  top:calc(100% + 6px)!important;
  inset-inline:0!important;
  display:none!important;
  padding:6px!important;
  border:1px solid color-mix(in srgb,#8b5cf6 24%,var(--sdp-line))!important;
  border-radius:13px!important;
  background:linear-gradient(145deg,#211b22,#181419)!important;
  box-shadow:0 18px 38px rgba(0,0,0,.30),inset 0 1px 0 rgba(255,255,255,.04)!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-premium.is-open .sd-flow-role-menu{
  display:grid!important;
  gap:4px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-menu button{
  width:100%!important;
  min-height:38px!important;
  padding:0 10px!important;
  border:1px solid transparent!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#ddd6df!important;
  text-align:right!important;
  font-size:10.5px!important;
  font-weight:850!important;
  cursor:pointer!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-menu button:hover{
  border-color:rgba(167,139,250,.16)!important;
  background:rgba(124,58,237,.10)!important;
  color:#fff!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-menu button.is-active{
  border-color:rgba(34,211,238,.20)!important;
  background:linear-gradient(135deg,rgba(8,145,178,.16),rgba(124,58,237,.09))!important;
  color:#a5f3fc!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-menu{
  background:linear-gradient(145deg,#fffafc,#f3edf3)!important;
  box-shadow:0 16px 34px rgba(61,42,52,.15),inset 0 1px 0 rgba(255,255,255,.86)!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-menu button{
  color:#3e3540!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-menu button:hover{
  background:rgba(124,58,237,.07)!important;
  color:#4c1d95!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-menu button.is-active{
  background:linear-gradient(135deg,rgba(8,145,178,.10),rgba(124,58,237,.06))!important;
  color:#0e7490!important;
}
@media(max-width:560px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-trigger{
    min-height:40px!important;
    padding-inline:10px!important;
    font-size:10px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-menu button{
    min-height:36px!important;
    font-size:9.8px!important;
  }
}


/* MSM Site 1.0.694 — root mobile alignment fix + premium execution policy + subtle focus */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-studio-grid{
    padding-left:7px!important;
    padding-right:7px!important;
    padding-top:4px!important;
    padding-bottom:4px!important;
    box-sizing:border-box!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector{
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    inset-inline:auto!important;
  }

  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdInspector.sd-inspector:not(.is-collapsed){
    align-self:stretch!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    margin-inline:0!important;
    box-sizing:border-box!important;
  }
}

/* Execution policy becomes a real custom premium dropdown while the original select stays as data source. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-block{
  position:relative!important;
  display:grid!important;
  gap:7px!important;
  margin-top:10px!important;
  padding:11px!important;
  border:1px solid color-mix(in srgb,#8b5cf6 18%,var(--sdp-line))!important;
  border-radius:14px!important;
  background:
    radial-gradient(170px 85px at 100% 0,rgba(139,92,246,.075),transparent 72%),
    linear-gradient(145deg,color-mix(in srgb,#8b5cf6 5%,var(--sdp-card)),var(--sdp-card))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-title{
  color:var(--sdp-text)!important;
  font-size:11.5px!important;
  font-weight:950!important;
  line-height:1.5!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row{
  gap:7px!important;
  align-items:center!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max{
  flex:0 0 64px!important;
  width:64px!important;
  min-width:64px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max input{
  height:42px!important;
  min-height:42px!important;
  border-radius:12px!important;
  font-size:11.5px!important;
  font-weight:900!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-select{
  position:relative!important;
  display:block!important;
  flex:1 1 auto!important;
  min-width:0!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-select select.is-premium-source{
  position:absolute!important;
  inline-size:1px!important;
  block-size:1px!important;
  min-width:0!important;
  min-height:0!important;
  opacity:0!important;
  pointer-events:none!important;
  clip-path:inset(50%)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-premium{
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  z-index:18!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-trigger,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-trigger{
  min-height:42px!important;
  height:42px!important;
  padding:0 12px!important;
  border-radius:12px!important;
  font-size:11.5px!important;
  font-weight:900!important;
  line-height:1!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-trigger{
  width:100%!important;
  min-width:0!important;
  border:1px solid color-mix(in srgb,#8b5cf6 26%,var(--sdp-line))!important;
  background:
    radial-gradient(circle at 18% 12%,rgba(255,255,255,.05),transparent 35%),
    linear-gradient(145deg,color-mix(in srgb,#8b5cf6 11%,var(--sdp-card)),var(--sdp-card))!important;
  color:var(--sdp-text)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  box-shadow:0 7px 18px rgba(76,29,149,.07),inset 0 1px 0 rgba(255,255,255,.04)!important;
  cursor:pointer!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-trigger i{
  flex:0 0 24px!important;
  width:24px!important;
  height:24px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:8px!important;
  background:rgba(139,92,246,.13)!important;
  color:#c4b5fd!important;
  font-size:13px!important;
  font-style:normal!important;
  transition:transform .16s ease!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-premium.is-open .sd-execution-policy-trigger{
  border-color:rgba(167,139,250,.38)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-premium.is-open .sd-execution-policy-trigger i{
  transform:rotate(180deg)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-menu{
  position:absolute!important;
  z-index:140!important;
  top:calc(100% + 6px)!important;
  inset-inline:0!important;
  display:none!important;
  padding:6px!important;
  border:1px solid color-mix(in srgb,#8b5cf6 25%,var(--sdp-line))!important;
  border-radius:13px!important;
  background:linear-gradient(145deg,#211b22,#181419)!important;
  box-shadow:0 18px 38px rgba(0,0,0,.30),inset 0 1px 0 rgba(255,255,255,.04)!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-premium.is-open .sd-execution-policy-menu{
  display:grid!important;
  gap:4px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-menu button{
  width:100%!important;
  min-height:38px!important;
  padding:0 10px!important;
  border:1px solid transparent!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#ddd6df!important;
  text-align:right!important;
  font-size:10.8px!important;
  font-weight:850!important;
  cursor:pointer!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-menu button:hover{
  border-color:rgba(167,139,250,.16)!important;
  background:rgba(124,58,237,.10)!important;
  color:#fff!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-menu button.is-active{
  border-color:rgba(167,139,250,.20)!important;
  background:linear-gradient(135deg,rgba(124,58,237,.16),rgba(8,145,178,.07))!important;
  color:#ddd6fe!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-hint{
  font-size:9.4px!important;
  line-height:1.65!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-menu{
  background:linear-gradient(145deg,#fffafc,#f3edf3)!important;
  box-shadow:0 16px 34px rgba(61,42,52,.15),inset 0 1px 0 rgba(255,255,255,.86)!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-menu button{
  color:#3e3540!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-menu button.is-active{
  color:#6d28d9!important;
  background:linear-gradient(135deg,rgba(124,58,237,.09),rgba(8,145,178,.05))!important;
}

/* Focus: one restrained premium line only; never the old brown/orange frame. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector input:not([type="checkbox"]):not([type="radio"]):focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector input:not([type="checkbox"]):not([type="radio"]):focus-visible,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector textarea:focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector textarea:focus-visible,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector select:focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector select:focus-visible{
  outline:none!important;
  border-color:rgba(139,92,246,.46)!important;
  box-shadow:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector label:focus-within{
  outline:none!important;
  box-shadow:none!important;
}

@media(max-width:560px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-title{
    font-size:10.5px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-trigger,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-trigger{
    min-height:41px!important;
    height:41px!important;
    font-size:11.2px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max input{
    height:41px!important;
    min-height:41px!important;
    font-size:11.2px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-menu button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow-role-menu button{
    font-size:10.6px!important;
  }
}


/* MSM Site 1.0.696 — compact premium execution count */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row{
  gap:6px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max{
  flex:0 0 50px!important;
  width:50px!important;
  min-width:50px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max input{
  width:50px!important;
  min-width:50px!important;
  max-width:50px!important;
  height:36px!important;
  min-height:36px!important;
  padding:0 6px!important;
  margin:0!important;
  box-sizing:border-box!important;
  border:1px solid rgba(167,139,250,.28)!important;
  border-radius:11px!important;
  background:
    radial-gradient(circle at 28% 18%,rgba(249,115,22,.09),transparent 42%),
    linear-gradient(145deg,rgba(139,92,246,.11),rgba(255,255,255,.018))!important;
  color:var(--sdp-text)!important;
  text-align:center!important;
  font-size:11.5px!important;
  font-weight:950!important;
  line-height:1!important;
  outline:none!important;
  box-shadow:
    0 0 0 1px rgba(139,92,246,.025),
    0 6px 16px rgba(124,58,237,.10),
    0 3px 12px rgba(249,115,22,.055),
    inset 0 1px 0 rgba(255,255,255,.05)!important;
  appearance:textfield!important;
  -moz-appearance:textfield!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max input::-webkit-outer-spin-button,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max input::-webkit-inner-spin-button{
  -webkit-appearance:none!important;
  margin:0!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max input:focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max input:focus-visible{
  outline:none!important;
  border-color:rgba(167,139,250,.48)!important;
  box-shadow:
    0 0 0 1px rgba(139,92,246,.10),
    0 7px 17px rgba(124,58,237,.11),
    0 3px 12px rgba(249,115,22,.06)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-run-unit{
  flex:0 0 auto!important;
  color:var(--sdp-text)!important;
  font-size:10.8px!important;
  font-weight:850!important;
  line-height:1!important;
  white-space:nowrap!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-divider{
  margin-inline:1px!important;
  color:var(--sdp-muted)!important;
  font-size:13px!important;
  font-weight:850!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max input{
  border-color:rgba(124,58,237,.22)!important;
  background:
    radial-gradient(circle at 28% 18%,rgba(249,115,22,.08),transparent 42%),
    linear-gradient(145deg,#fff,#f7f1ff)!important;
  color:#2d2730!important;
  box-shadow:
    0 6px 15px rgba(124,58,237,.07),
    0 3px 10px rgba(249,115,22,.045),
    inset 0 1px 0 rgba(255,255,255,.88)!important;
}
@media(max-width:560px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row{
    gap:5px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max{
    flex-basis:48px!important;
    width:48px!important;
    min-width:48px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-row .sd-trigger-max input{
    width:48px!important;
    min-width:48px!important;
    max-width:48px!important;
    height:35px!important;
    min-height:35px!important;
    font-size:11.5px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-execution-policy-run-unit{
    font-size:10.5px!important;
  }
}


/* MSM Site 1.0.697 — Simulator mobile auto-follow + glass message/button previews */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-item{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  align-items:start!important;
  gap:9px!important;
  padding:10px 11px!important;
  border:1px solid rgba(167,139,250,.16)!important;
  border-radius:13px!important;
  background:
    radial-gradient(120px 70px at 100% 0,rgba(139,92,246,.10),transparent 72%),
    radial-gradient(110px 65px at 0 100%,rgba(249,115,22,.07),transparent 75%),
    linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.018))!important;
  box-shadow:
    0 9px 24px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.055)!important;
  backdrop-filter:blur(13px)!important;
  -webkit-backdrop-filter:blur(13px)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-item::before{
  content:""!important;
  position:absolute!important;
  inset-inline:13px!important;
  top:0!important;
  height:1px!important;
  background:linear-gradient(90deg,transparent,rgba(167,139,250,.55),rgba(249,115,22,.32),transparent)!important;
  opacity:.72!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-icon{
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(167,139,250,.16)!important;
  border-radius:10px!important;
  background:linear-gradient(145deg,rgba(139,92,246,.13),rgba(249,115,22,.07))!important;
  color:var(--sdp-text,#f7f1f5)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05)!important;
  font-size:11px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-preview{
  min-width:0!important;
  padding:1px 0!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-preview b{
  color:var(--sdp-text,#f7f1f5)!important;
  font-size:10.8px!important;
  font-weight:900!important;
  line-height:1.55!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-preview small{
  display:block!important;
  margin-top:4px!important;
  padding:8px 9px!important;
  border:1px solid rgba(255,255,255,.055)!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.026)!important;
  color:var(--sdp-text,#f7f1f5)!important;
  font-size:10px!important;
  line-height:1.75!important;
  word-break:break-word!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-item.is-card{
  border-color:rgba(34,211,238,.18)!important;
  background:
    radial-gradient(150px 80px at 100% 0,rgba(34,211,238,.09),transparent 72%),
    radial-gradient(120px 70px at 0 100%,rgba(139,92,246,.09),transparent 74%),
    linear-gradient(145deg,rgba(255,255,255,.046),rgba(255,255,255,.016))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-item.is-button{
  border-color:rgba(16,185,129,.17)!important;
}

/* Choice buttons: neutral text, color belongs to glass/halo instead of typography. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choices{
  position:relative!important;
  overflow:hidden!important;
  border:1px solid rgba(167,139,250,.16)!important;
  border-radius:13px!important;
  background:
    radial-gradient(150px 80px at 100% 0,rgba(139,92,246,.10),transparent 72%),
    linear-gradient(145deg,rgba(255,255,255,.04),rgba(255,255,255,.016))!important;
  box-shadow:0 9px 24px rgba(0,0,0,.11),inset 0 1px 0 rgba(255,255,255,.05)!important;
  backdrop-filter:blur(12px)!important;
  -webkit-backdrop-filter:blur(12px)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choices>b{
  color:var(--sdp-text,#f7f1f5)!important;
  font-weight:900!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choice-list{
  gap:7px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choice-list button{
  min-height:36px!important;
  padding:0 12px!important;
  border:1px solid rgba(167,139,250,.20)!important;
  border-radius:10px!important;
  background:
    radial-gradient(circle at 22% 10%,rgba(255,255,255,.08),transparent 34%),
    linear-gradient(135deg,rgba(139,92,246,.12),rgba(249,115,22,.055))!important;
  color:var(--sdp-text,#f7f1f5)!important;
  box-shadow:0 6px 16px rgba(124,58,237,.08),inset 0 1px 0 rgba(255,255,255,.05)!important;
  font-size:10.5px!important;
  font-weight:900!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choice-list button:hover,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choice-list button:focus-visible{
  color:var(--sdp-text,#f7f1f5)!important;
  border-color:rgba(167,139,250,.36)!important;
  outline:none!important;
  box-shadow:0 8px 20px rgba(124,58,237,.12),0 0 0 1px rgba(249,115,22,.055)!important;
}

/* Form prompt follows the same glass language. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt{
  border-color:rgba(34,211,238,.17)!important;
  background:
    radial-gradient(170px 90px at 100% 0,rgba(34,211,238,.085),transparent 72%),
    radial-gradient(130px 75px at 0 100%,rgba(139,92,246,.085),transparent 74%),
    linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.016))!important;
  box-shadow:0 10px 25px rgba(0,0,0,.12),inset 0 1px 0 rgba(255,255,255,.05)!important;
  backdrop-filter:blur(13px)!important;
  -webkit-backdrop-filter:blur(13px)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt-head>span{
  color:var(--sdp-text,#f7f1f5)!important;
  background:linear-gradient(145deg,rgba(34,211,238,.12),rgba(139,92,246,.08))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-actions button{
  color:var(--sdp-text,#f7f1f5)!important;
  border-radius:10px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-actions .is-timeout{
  border-color:rgba(249,115,22,.19)!important;
  background:linear-gradient(135deg,rgba(249,115,22,.10),rgba(255,255,255,.025))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-actions .is-continue{
  border-color:rgba(34,211,238,.18)!important;
  background:linear-gradient(135deg,rgba(34,211,238,.10),rgba(139,92,246,.065))!important;
}

/* Latest step receives only a very short, subtle visual cue. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .is-sim-latest{
  animation:sdSimLatestGlass .62s ease-out both!important;
}
@keyframes sdSimLatestGlass{
  0%{box-shadow:0 0 0 2px rgba(167,139,250,.16),0 12px 30px rgba(124,58,237,.13)}
  100%{box-shadow:inherit}
}

html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-item,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choices,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt{
  background:
    radial-gradient(150px 80px at 100% 0,rgba(139,92,246,.075),transparent 72%),
    radial-gradient(120px 70px at 0 100%,rgba(249,115,22,.05),transparent 74%),
    linear-gradient(145deg,rgba(255,255,255,.94),rgba(248,242,247,.90))!important;
  box-shadow:0 9px 22px rgba(61,42,52,.075),inset 0 1px 0 rgba(255,255,255,.90)!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-preview b,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-preview small,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choice-list button,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-choices>b,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-actions button{
  color:#312933!important;
}

@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-layout{
    scroll-behavior:smooth!important;
    overscroll-behavior:contain!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-item{
    grid-template-columns:32px minmax(0,1fr)!important;
    padding:9px 10px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-preview small{
    font-size:10.2px!important;
  }
}


/* MSM Site 1.0.699 — Simulator Form continuation compatibility + clean select focus */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel select,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt select{
  outline:none!important;
  box-shadow:none!important;
  -webkit-tap-highlight-color:transparent!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  background-image:
    linear-gradient(45deg,transparent 50%,rgba(196,181,253,.82) 50%),
    linear-gradient(135deg,rgba(196,181,253,.82) 50%,transparent 50%)!important;
  background-position:
    calc(14px) 50%,
    calc(10px) 50%!important;
  background-size:4px 4px,4px 4px!important;
  background-repeat:no-repeat!important;
  padding-inline-end:30px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel select:focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel select:focus-visible,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel select:active,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt select:focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt select:focus-visible,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt select:active{
  outline:none!important;
  box-shadow:none!important;
  border-color:rgba(139,92,246,.34)!important;
  filter:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt label:focus-within,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-scenario label:focus-within{
  outline:none!important;
  box-shadow:none!important;
  border-color:transparent!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel select,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt select{
  background-image:
    linear-gradient(45deg,transparent 50%,rgba(109,40,217,.68) 50%),
    linear-gradient(135deg,rgba(109,40,217,.68) 50%,transparent 50%)!important;
}


/* MSM Site 1.0.700 — mobile Simulator trace accordion + true line breaks */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item small,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-output-preview small,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-form-prompt-head b{
  white-space:pre-wrap!important;
  overflow-wrap:anywhere!important;
}

/* Colorful, polished execution-path icons without coloring the copy itself. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item>span{
  border:1px solid rgba(167,139,250,.18)!important;
  color:#e9e3ee!important;
  background:linear-gradient(145deg,rgba(139,92,246,.15),rgba(255,255,255,.035))!important;
  box-shadow:0 5px 14px rgba(0,0,0,.12),inset 0 1px 0 rgba(255,255,255,.06)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-trigger>span{
  border-color:rgba(249,115,22,.24)!important;
  color:#fdba74!important;
  background:linear-gradient(145deg,rgba(249,115,22,.20),rgba(245,158,11,.08))!important;
  box-shadow:0 5px 15px rgba(249,115,22,.10),inset 0 1px 0 rgba(255,255,255,.06)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-condition>span{
  border-color:rgba(234,179,8,.24)!important;
  color:#fde047!important;
  background:linear-gradient(145deg,rgba(234,179,8,.18),rgba(249,115,22,.07))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-form>span{
  border-color:rgba(59,130,246,.24)!important;
  color:#93c5fd!important;
  background:linear-gradient(145deg,rgba(37,99,235,.20),rgba(34,211,238,.07))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-text>span,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-random_text>span{
  border-color:rgba(167,139,250,.25)!important;
  color:#c4b5fd!important;
  background:linear-gradient(145deg,rgba(124,58,237,.20),rgba(236,72,153,.06))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-image>span,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-card>span,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-carousel>span{
  border-color:rgba(236,72,153,.23)!important;
  color:#f9a8d4!important;
  background:linear-gradient(145deg,rgba(236,72,153,.18),rgba(139,92,246,.07))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-video>span,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-like>span{
  border-color:rgba(244,63,94,.24)!important;
  color:#fda4af!important;
  background:linear-gradient(145deg,rgba(244,63,94,.18),rgba(249,115,22,.06))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-audio>span{
  border-color:rgba(14,165,233,.24)!important;
  color:#7dd3fc!important;
  background:linear-gradient(145deg,rgba(14,165,233,.18),rgba(34,211,238,.06))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-follow_gate>span,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-contact_state>span{
  border-color:rgba(16,185,129,.24)!important;
  color:#6ee7b7!important;
  background:linear-gradient(145deg,rgba(16,185,129,.18),rgba(14,165,233,.06))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-delay>span,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-item.is-type-followup>span{
  border-color:rgba(245,158,11,.24)!important;
  color:#fcd34d!important;
  background:linear-gradient(145deg,rgba(245,158,11,.18),rgba(249,115,22,.06))!important;
}

body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-chevron{
  display:none;
  margin-inline-start:2px;
  width:24px;
  height:24px;
  border:1px solid rgba(167,139,250,.16);
  border-radius:8px;
  place-items:center;
  color:#c4b5fd;
  background:rgba(124,58,237,.08);
  font-style:normal;
  font-size:13px;
  transition:transform .16s ease,border-color .16s ease,background .16s ease;
}

@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-card>header[data-sim-trace-toggle]{
    cursor:pointer!important;
    user-select:none!important;
    -webkit-user-select:none!important;
    -webkit-tap-highlight-color:transparent!important;
    transition:background .16s ease,border-color .16s ease!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-card>header[data-sim-trace-toggle]:active{
    background:linear-gradient(135deg,rgba(124,58,237,.075),rgba(249,115,22,.035))!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-head-icon{
    width:27px!important;
    height:27px!important;
    display:grid!important;
    place-items:center!important;
    border:1px solid rgba(167,139,250,.20)!important;
    border-radius:9px!important;
    color:#c4b5fd!important;
    background:linear-gradient(145deg,rgba(124,58,237,.16),rgba(249,115,22,.07))!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-chevron{
    display:grid!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-card:not(.is-mobile-collapsed) .sd-sim-trace-chevron{
    transform:rotate(180deg)!important;
    border-color:rgba(167,139,250,.30)!important;
    background:rgba(124,58,237,.13)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-card.is-mobile-collapsed .sd-sim-trace{
    display:none!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-card.is-mobile-collapsed{
    min-height:0!important;
  }
}

@media(min-width:801px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-sim-trace-card .sd-sim-trace{
    display:flex!important;
  }
}

/* MSM Site 1.0.701 — premium dark glass icons + carousel image uploader */
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu button>span{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  background:
    linear-gradient(145deg,
      color-mix(in srgb,var(--item-color,#8b5cf6) 30%,rgba(255,255,255,.11)),
      color-mix(in srgb,var(--item-color,#8b5cf6) 10%,rgba(17,14,20,.90))
    )!important;
  color:color-mix(in srgb,var(--item-color,#c4b5fd) 76%,#fff)!important;
  border:1px solid color-mix(in srgb,var(--item-color,#8b5cf6) 40%,rgba(255,255,255,.10))!important;
  box-shadow:
    0 7px 18px color-mix(in srgb,var(--item-color,#8b5cf6) 18%,transparent),
    inset 0 1px 0 rgba(255,255,255,.20),
    inset 0 -10px 22px rgba(0,0,0,.13)!important;
  text-shadow:0 0 12px color-mix(in srgb,var(--item-color,#8b5cf6) 48%,transparent)!important;
  -webkit-backdrop-filter:blur(12px) saturate(1.35)!important;
  backdrop-filter:blur(12px) saturate(1.35)!important;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,filter .16s ease!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu button>span:after{
  content:""!important;
  position:absolute!important;
  inset:1px 2px auto 2px!important;
  height:42%!important;
  border-radius:8px 8px 50% 50%!important;
  background:linear-gradient(180deg,rgba(255,255,255,.18),transparent)!important;
  pointer-events:none!important;
  opacity:.72!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node-menu button:hover>span{
  transform:translateY(-1px)!important;
  border-color:color-mix(in srgb,var(--item-color,#8b5cf6) 58%,rgba(255,255,255,.16))!important;
  box-shadow:
    0 9px 24px color-mix(in srgb,var(--item-color,#8b5cf6) 24%,transparent),
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 -10px 22px rgba(0,0,0,.10)!important;
  filter:saturate(1.12) brightness(1.06)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-carousel-card-editor .sd-media-uploader[data-media-field^="card_image_"]{
  margin-top:-1px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-carousel-card-editor .sd-media-uploader[data-media-field^="card_image_"] .sd-upload-preview.is-image{
  height:118px!important;
}

/* MSM Site 1.0.702 — unified premium image uploader for Image / Card / Carousel */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"]{
  position:relative!important;
  overflow:hidden!important;
  gap:10px!important;
  padding:11px!important;
  border:1px solid rgba(124,58,237,.16)!important;
  border-radius:16px!important;
  background:
    radial-gradient(circle at 12% 0%,rgba(139,92,246,.10),transparent 42%),
    radial-gradient(circle at 88% 100%,rgba(249,115,22,.08),transparent 40%),
    rgba(255,255,255,.76)!important;
  box-shadow:
    0 10px 30px rgba(66,42,78,.07),
    inset 0 1px 0 rgba(255,255,255,.86)!important;
  -webkit-backdrop-filter:blur(16px) saturate(1.14)!important;
  backdrop-filter:blur(16px) saturate(1.14)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"]:before{
  content:""!important;
  position:absolute!important;
  inset:0 0 auto 0!important;
  height:1px!important;
  background:linear-gradient(90deg,transparent,rgba(139,92,246,.32),rgba(249,115,22,.24),transparent)!important;
  pointer-events:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-empty{
  min-height:82px!important;
  border:1px dashed rgba(124,58,237,.24)!important;
  border-radius:13px!important;
  background:linear-gradient(145deg,rgba(255,255,255,.72),rgba(248,245,255,.62))!important;
  color:#756b78!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-empty>span{
  width:38px!important;
  height:38px!important;
  border:1px solid rgba(124,58,237,.18)!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,rgba(139,92,246,.14),rgba(249,115,22,.10))!important;
  color:#7c3aed!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.90),0 7px 18px rgba(124,58,237,.08)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-preview{
  overflow:hidden!important;
  border:1px solid rgba(124,58,237,.15)!important;
  border-radius:13px!important;
  background:#f8f5fb!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.80)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-preview.is-image{
  height:138px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-carousel-card-editor .sd-media-uploader[data-media-uploader="image"] .sd-upload-preview.is-image{
  height:118px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-button{
  min-height:41px!important;
  padding:0 13px!important;
  gap:8px!important;
  border:1px solid rgba(124,58,237,.20)!important;
  border-radius:12px!important;
  background:
    linear-gradient(135deg,rgba(124,58,237,.11),rgba(249,115,22,.09)),
    rgba(255,255,255,.72)!important;
  color:#5f35aa!important;
  box-shadow:0 7px 18px rgba(91,63,124,.08),inset 0 1px 0 rgba(255,255,255,.92)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  backdrop-filter:blur(10px)!important;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-button:hover{
  transform:translateY(-1px)!important;
  border-color:rgba(124,58,237,.34)!important;
  background:
    linear-gradient(135deg,rgba(124,58,237,.16),rgba(249,115,22,.12)),
    rgba(255,255,255,.82)!important;
  box-shadow:0 10px 24px rgba(91,63,124,.12),inset 0 1px 0 rgba(255,255,255,.96)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-button:focus-visible{
  outline:none!important;
  border-color:rgba(99,102,241,.52)!important;
  box-shadow:0 0 0 3px rgba(99,102,241,.12),0 9px 22px rgba(91,63,124,.10)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-button-icon{
  width:27px!important;
  height:27px!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 27px!important;
  border:1px solid rgba(124,58,237,.16)!important;
  border-radius:9px!important;
  background:linear-gradient(145deg,rgba(124,58,237,.14),rgba(249,115,22,.10))!important;
  color:#6d3fbd!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-button-icon svg{
  width:15px!important;
  height:15px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-progress{
  border:1px solid rgba(124,58,237,.14)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.66)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.80)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-track{
  background:rgba(124,58,237,.10)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-track i{
  background:linear-gradient(90deg,#7c3aed,#8b5cf6,#f97316)!important;
  box-shadow:0 0 14px rgba(139,92,246,.20)!important;
}

/* Dark image uploader: colored glass, never a white tile. */
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"]{
  border-color:rgba(167,139,250,.18)!important;
  background:
    radial-gradient(circle at 12% 0%,rgba(124,58,237,.16),transparent 44%),
    radial-gradient(circle at 88% 100%,rgba(249,115,22,.10),transparent 42%),
    rgba(31,25,33,.78)!important;
  box-shadow:
    0 14px 36px rgba(0,0,0,.20),
    inset 0 1px 0 rgba(255,255,255,.055)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-empty{
  border-color:rgba(167,139,250,.22)!important;
  background:linear-gradient(145deg,rgba(139,92,246,.085),rgba(255,255,255,.025))!important;
  color:#b9adb7!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-empty>span{
  border-color:rgba(167,139,250,.22)!important;
  background:linear-gradient(145deg,rgba(124,58,237,.22),rgba(249,115,22,.10))!important;
  color:#c4b5fd!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 8px 20px rgba(124,58,237,.12)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-preview{
  border-color:rgba(255,255,255,.08)!important;
  background:#181419!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-button{
  border-color:rgba(167,139,250,.23)!important;
  background:
    linear-gradient(135deg,rgba(124,58,237,.22),rgba(249,115,22,.10)),
    rgba(39,31,42,.82)!important;
  color:#e9ddff!important;
  box-shadow:0 9px 22px rgba(0,0,0,.17),inset 0 1px 0 rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-button:hover{
  border-color:rgba(196,181,253,.34)!important;
  background:
    linear-gradient(135deg,rgba(124,58,237,.30),rgba(249,115,22,.14)),
    rgba(45,35,48,.88)!important;
  box-shadow:0 12px 28px rgba(0,0,0,.23),0 0 22px rgba(124,58,237,.08),inset 0 1px 0 rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-button-icon{
  border-color:rgba(196,181,253,.20)!important;
  background:linear-gradient(145deg,rgba(139,92,246,.24),rgba(249,115,22,.11))!important;
  color:#d8c8ff!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-progress{
  border-color:rgba(255,255,255,.08)!important;
  background:rgba(22,18,24,.62)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-track{
  background:rgba(255,255,255,.07)!important;
}
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"]{
    padding:9px!important;
    border-radius:14px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-preview.is-image{
    height:122px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-carousel-card-editor .sd-media-uploader[data-media-uploader="image"] .sd-upload-preview.is-image{
    height:108px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="image"] .sd-upload-button{
    min-height:39px!important;
    padding:0 10px!important;
  }
}

/* MSM Site 1.0.703 — premium video uploader + visible upload progress */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"]{
  position:relative!important;overflow:hidden!important;gap:10px!important;padding:11px!important;
  border:1px solid rgba(14,165,233,.17)!important;border-radius:16px!important;
  background:radial-gradient(circle at 12% 0%,rgba(14,165,233,.10),transparent 42%),radial-gradient(circle at 88% 100%,rgba(139,92,246,.09),transparent 40%),rgba(255,255,255,.76)!important;
  box-shadow:0 10px 30px rgba(43,76,105,.07),inset 0 1px 0 rgba(255,255,255,.86)!important;
  -webkit-backdrop-filter:blur(16px) saturate(1.14)!important;backdrop-filter:blur(16px) saturate(1.14)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"]:before{
  content:""!important;position:absolute!important;inset:0 0 auto 0!important;height:1px!important;pointer-events:none!important;
  background:linear-gradient(90deg,transparent,rgba(14,165,233,.34),rgba(139,92,246,.27),transparent)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-empty{
  min-height:82px!important;border:1px dashed rgba(14,165,233,.25)!important;border-radius:13px!important;
  background:linear-gradient(145deg,rgba(255,255,255,.74),rgba(242,249,255,.64))!important;color:#687681!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-empty>span{
  width:38px!important;height:38px!important;border:1px solid rgba(14,165,233,.18)!important;border-radius:12px!important;
  background:linear-gradient(145deg,rgba(14,165,233,.14),rgba(139,92,246,.10))!important;color:#0284c7!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92),0 7px 18px rgba(14,165,233,.08)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-preview{
  overflow:hidden!important;border:1px solid rgba(14,165,233,.15)!important;border-radius:13px!important;background:#f1f7fb!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-preview.is-video{height:158px!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-button{
  min-height:41px!important;padding:0 13px!important;gap:8px!important;border:1px solid rgba(14,165,233,.21)!important;border-radius:12px!important;
  background:linear-gradient(135deg,rgba(14,165,233,.11),rgba(139,92,246,.09)),rgba(255,255,255,.74)!important;color:#096fa0!important;
  box-shadow:0 7px 18px rgba(43,76,105,.08),inset 0 1px 0 rgba(255,255,255,.92)!important;
  -webkit-backdrop-filter:blur(10px)!important;backdrop-filter:blur(10px)!important;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-button:hover{
  transform:translateY(-1px)!important;border-color:rgba(14,165,233,.37)!important;
  background:linear-gradient(135deg,rgba(14,165,233,.16),rgba(139,92,246,.13)),rgba(255,255,255,.84)!important;
  box-shadow:0 10px 24px rgba(43,76,105,.12),inset 0 1px 0 rgba(255,255,255,.96)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-button:focus-visible{
  outline:none!important;border-color:rgba(59,130,246,.52)!important;box-shadow:0 0 0 3px rgba(59,130,246,.12),0 9px 22px rgba(43,76,105,.10)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-button-icon{
  width:27px!important;height:27px!important;display:grid!important;place-items:center!important;flex:0 0 27px!important;
  border:1px solid rgba(14,165,233,.17)!important;border-radius:9px!important;background:linear-gradient(145deg,rgba(14,165,233,.15),rgba(139,92,246,.10))!important;color:#087cad!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-button-icon svg{
  width:15px!important;height:15px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;stroke-linecap:round!important;stroke-linejoin:round!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-progress{
  border:1px solid rgba(14,165,233,.14)!important;border-radius:12px!important;background:rgba(255,255,255,.68)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 9px 24px rgba(43,76,105,.06)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-track{background:rgba(14,165,233,.10)!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-track i{
  background:linear-gradient(90deg,#0ea5e9,#3b82f6,#8b5cf6)!important;box-shadow:0 0 14px rgba(14,165,233,.20)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"]{
  border-color:rgba(56,189,248,.18)!important;
  background:radial-gradient(circle at 12% 0%,rgba(14,165,233,.16),transparent 44%),radial-gradient(circle at 88% 100%,rgba(124,58,237,.12),transparent 42%),rgba(27,28,35,.80)!important;
  box-shadow:0 14px 36px rgba(0,0,0,.21),inset 0 1px 0 rgba(255,255,255,.055)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-empty{
  border-color:rgba(56,189,248,.22)!important;background:linear-gradient(145deg,rgba(14,165,233,.09),rgba(124,58,237,.045))!important;color:#b2bec7!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-empty>span{
  border-color:rgba(56,189,248,.22)!important;background:linear-gradient(145deg,rgba(14,165,233,.22),rgba(124,58,237,.13))!important;color:#bae6fd!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 8px 20px rgba(14,165,233,.12)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-preview{
  border-color:rgba(255,255,255,.08)!important;background:#12171d!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-button{
  border-color:rgba(56,189,248,.23)!important;background:linear-gradient(135deg,rgba(14,165,233,.22),rgba(124,58,237,.13)),rgba(31,37,46,.84)!important;color:#d9f1ff!important;
  box-shadow:0 9px 22px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-button:hover{
  border-color:rgba(125,211,252,.34)!important;background:linear-gradient(135deg,rgba(14,165,233,.30),rgba(124,58,237,.17)),rgba(36,43,54,.90)!important;
  box-shadow:0 12px 28px rgba(0,0,0,.23),0 0 22px rgba(14,165,233,.08),inset 0 1px 0 rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-button-icon{
  border-color:rgba(125,211,252,.20)!important;background:linear-gradient(145deg,rgba(14,165,233,.25),rgba(124,58,237,.13))!important;color:#c8efff!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-progress{
  border-color:rgba(255,255,255,.08)!important;background:rgba(17,22,28,.64)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 10px 26px rgba(0,0,0,.14)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-track{background:rgba(255,255,255,.07)!important}
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"]{padding:9px!important;border-radius:14px!important}
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-preview.is-video{height:142px!important}
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="video"] .sd-upload-button{min-height:39px!important;padding:0 10px!important}
}

/* MSM Site 1.0.704 — premium audio uploader + recorder */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"]{
  position:relative!important;overflow:hidden!important;gap:10px!important;padding:11px!important;
  border:1px solid rgba(139,92,246,.17)!important;border-radius:16px!important;
  background:radial-gradient(circle at 12% 0%,rgba(139,92,246,.10),transparent 42%),radial-gradient(circle at 88% 100%,rgba(14,165,233,.08),transparent 40%),rgba(255,255,255,.76)!important;
  box-shadow:0 10px 30px rgba(66,42,78,.07),inset 0 1px 0 rgba(255,255,255,.86)!important;
  -webkit-backdrop-filter:blur(16px) saturate(1.14)!important;backdrop-filter:blur(16px) saturate(1.14)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"]:before{
  content:""!important;position:absolute!important;inset:0 0 auto 0!important;height:1px!important;pointer-events:none!important;
  background:linear-gradient(90deg,transparent,rgba(139,92,246,.34),rgba(14,165,233,.24),transparent)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-empty{
  min-height:78px!important;border:1px dashed rgba(139,92,246,.24)!important;border-radius:13px!important;
  background:linear-gradient(145deg,rgba(255,255,255,.74),rgba(247,244,255,.64))!important;color:#716a78!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-empty>span{
  width:38px!important;height:38px!important;border:1px solid rgba(139,92,246,.18)!important;border-radius:12px!important;
  background:linear-gradient(145deg,rgba(139,92,246,.15),rgba(14,165,233,.09))!important;color:#7c3aed!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92),0 7px 18px rgba(139,92,246,.08)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-preview.is-audio{
  gap:10px!important;padding:13px!important;border:1px solid rgba(139,92,246,.15)!important;border-radius:13px!important;
  background:linear-gradient(145deg,#fbf9ff,#f4f8ff)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.85)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-audio-wave{
  height:38px!important;gap:5px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-audio-wave i{
  width:4px!important;background:linear-gradient(180deg,#8b5cf6,#0ea5e9)!important;box-shadow:0 0 9px rgba(139,92,246,.12)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-action-buttons{
  width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-button,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-record-button{
  width:100%!important;min-height:41px!important;padding:0 12px!important;gap:8px!important;border-radius:12px!important;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-button{
  border:1px solid rgba(139,92,246,.21)!important;
  background:linear-gradient(135deg,rgba(139,92,246,.11),rgba(14,165,233,.08)),rgba(255,255,255,.74)!important;color:#6436ae!important;
  box-shadow:0 7px 18px rgba(66,42,78,.08),inset 0 1px 0 rgba(255,255,255,.92)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-record-button{
  border:1px solid rgba(244,63,94,.20)!important;
  background:linear-gradient(135deg,rgba(244,63,94,.09),rgba(139,92,246,.08)),rgba(255,255,255,.74)!important;color:#a52b55!important;
  box-shadow:0 7px 18px rgba(118,48,79,.07),inset 0 1px 0 rgba(255,255,255,.92)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-button:hover,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-record-button:hover{
  transform:translateY(-1px)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-button:hover{
  border-color:rgba(139,92,246,.36)!important;box-shadow:0 10px 24px rgba(66,42,78,.12),inset 0 1px 0 rgba(255,255,255,.96)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-record-button:hover{
  border-color:rgba(244,63,94,.34)!important;box-shadow:0 10px 24px rgba(118,48,79,.11),inset 0 1px 0 rgba(255,255,255,.96)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-record-button.is-recording{
  border-color:rgba(239,68,68,.42)!important;background:linear-gradient(135deg,rgba(239,68,68,.16),rgba(244,63,94,.11)),rgba(255,255,255,.78)!important;
  color:#b91c1c!important;box-shadow:0 0 0 3px rgba(239,68,68,.08),0 10px 26px rgba(239,68,68,.10)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-button-icon{
  width:27px!important;height:27px!important;display:grid!important;place-items:center!important;flex:0 0 27px!important;
  border:1px solid rgba(139,92,246,.17)!important;border-radius:9px!important;background:linear-gradient(145deg,rgba(139,92,246,.15),rgba(14,165,233,.08))!important;color:#7441c2!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-button-icon svg{
  width:15px!important;height:15px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;stroke-linecap:round!important;stroke-linejoin:round!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-progress{
  border:1px solid rgba(139,92,246,.14)!important;border-radius:12px!important;background:rgba(255,255,255,.68)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 9px 24px rgba(66,42,78,.06)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-track{background:rgba(139,92,246,.10)!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-track i{
  background:linear-gradient(90deg,#8b5cf6,#6366f1,#0ea5e9)!important;box-shadow:0 0 14px rgba(139,92,246,.18)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"]{
  border-color:rgba(167,139,250,.18)!important;
  background:radial-gradient(circle at 12% 0%,rgba(124,58,237,.16),transparent 44%),radial-gradient(circle at 88% 100%,rgba(14,165,233,.10),transparent 42%),rgba(29,25,34,.80)!important;
  box-shadow:0 14px 36px rgba(0,0,0,.21),inset 0 1px 0 rgba(255,255,255,.055)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-empty{
  border-color:rgba(167,139,250,.22)!important;background:linear-gradient(145deg,rgba(124,58,237,.10),rgba(14,165,233,.04))!important;color:#b9b0c1!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-empty>span{
  border-color:rgba(196,181,253,.20)!important;background:linear-gradient(145deg,rgba(139,92,246,.24),rgba(14,165,233,.10))!important;color:#d8c8ff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 8px 20px rgba(124,58,237,.12)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-preview.is-audio{
  border-color:rgba(255,255,255,.08)!important;background:linear-gradient(145deg,#19151d,#151a20)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-button{
  border-color:rgba(167,139,250,.23)!important;background:linear-gradient(135deg,rgba(124,58,237,.22),rgba(14,165,233,.10)),rgba(34,30,40,.84)!important;color:#eadfff!important;
  box-shadow:0 9px 22px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-record-button{
  border-color:rgba(251,113,133,.22)!important;background:linear-gradient(135deg,rgba(244,63,94,.15),rgba(124,58,237,.12)),rgba(34,30,40,.84)!important;color:#fecdd3!important;
  box-shadow:0 9px 22px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-record-button.is-recording{
  border-color:rgba(252,165,165,.34)!important;background:linear-gradient(135deg,rgba(239,68,68,.23),rgba(159,18,57,.16)),rgba(42,28,34,.90)!important;
  color:#fecaca!important;box-shadow:0 0 0 3px rgba(239,68,68,.08),0 12px 28px rgba(0,0,0,.23)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-progress{
  border-color:rgba(255,255,255,.08)!important;background:rgba(19,16,23,.64)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 10px 26px rgba(0,0,0,.14)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-track{background:rgba(255,255,255,.07)!important}
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"]{padding:9px!important;border-radius:14px!important}
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-action-buttons{gap:6px!important}
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-upload-button,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-media-uploader[data-media-uploader="audio"] .sd-record-button{min-height:39px!important;padding:0 8px!important}
}
/* MSM Site 1.0.705 deploy sync — preserve premium image/video/audio uploaders */
/* MSM Site 1.0.706 deploy sync — preserve premium media uploaders. */

/* MSM Site 1.0.707 — mobile connection visibility and fan-out touch priority */
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-canvas-shell.is-mobile-connecting .sd-edge-preview{
    stroke:#8b5cf6!important;
    stroke-width:4!important;
    stroke-dasharray:10 7!important;
    opacity:1!important;
    filter:drop-shadow(0 0 7px rgba(139,92,246,.42))!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.is-connect-source{
    z-index:14!important;
    border-color:color-mix(in srgb,var(--node-color,#8b5cf6) 72%,#ffffff)!important;
    box-shadow:
      0 0 0 4px color-mix(in srgb,var(--node-color,#8b5cf6) 18%,transparent),
      0 0 24px color-mix(in srgb,var(--node-color,#8b5cf6) 22%,transparent),
      0 18px 38px rgba(61,42,52,.15)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.is-connect-target{
    z-index:14!important;
    border-color:rgba(34,197,94,.72)!important;
    box-shadow:
      0 0 0 4px rgba(34,197,94,.13),
      0 0 24px rgba(34,197,94,.16),
      0 18px 38px rgba(61,42,52,.15)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.is-connect-source .sd-port-out.is-connect-port{
    transform:translateY(-50%) scale(1.28)!important;
    box-shadow:
      0 0 0 5px color-mix(in srgb,var(--node-color,#8b5cf6) 20%,transparent),
      0 0 16px color-mix(in srgb,var(--node-color,#8b5cf6) 42%,transparent)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.is-connect-target .sd-port-in.is-connect-port{
    transform:translateY(-50%) scale(1.28)!important;
    background:#22c55e!important;
    box-shadow:0 0 0 5px rgba(34,197,94,.18),0 0 16px rgba(34,197,94,.34)!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-port-out{
    cursor:crosshair!important;
  }
  html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.is-connect-source{
    box-shadow:
      0 0 0 4px color-mix(in srgb,var(--node-color,#8b5cf6) 22%,transparent),
      0 0 28px color-mix(in srgb,var(--node-color,#8b5cf6) 26%,transparent),
      0 18px 38px rgba(0,0,0,.28)!important;
  }
  html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.is-connect-target{
    box-shadow:0 0 0 4px rgba(34,197,94,.16),0 0 28px rgba(34,197,94,.20),0 18px 38px rgba(0,0,0,.28)!important;
  }
}

/* MSM Site 1.0.708 — connected Magic AI node */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-editor-card{
  position:relative!important;overflow:hidden!important;
  border-color:rgba(168,85,247,.18)!important;
  background:radial-gradient(circle at 10% 0%,rgba(168,85,247,.09),transparent 40%),var(--sd-card,#fffdf9)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-runtime-badge{
  display:flex!important;align-items:center!important;gap:10px!important;margin:0 0 11px!important;padding:10px 11px!important;
  border:1px solid rgba(168,85,247,.16)!important;border-radius:13px!important;background:rgba(168,85,247,.065)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-runtime-badge>span{
  width:34px!important;height:34px!important;display:grid!important;place-items:center!important;flex:0 0 34px!important;
  border-radius:11px!important;background:linear-gradient(135deg,#a855f7,#7c3aed)!important;color:#fff!important;
  box-shadow:0 8px 20px rgba(124,58,237,.20)!important;font-size:18px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-runtime-badge>div{min-width:0!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-runtime-badge b{display:block!important;font-size:11px!important;font-weight:900!important;color:var(--sd-text)!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-runtime-badge small{display:block!important;margin-top:2px!important;font-size:9.5px!important;line-height:1.65!important;color:var(--sd-muted)!important}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-editor-card{
  border-color:rgba(196,181,253,.16)!important;
  background:radial-gradient(circle at 10% 0%,rgba(124,58,237,.15),transparent 42%),#1d181e!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-runtime-badge{
  border-color:rgba(196,181,253,.15)!important;background:rgba(124,58,237,.12)!important;
}
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-runtime-badge{padding:9px!important;gap:8px!important}
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-runtime-badge>span{width:31px!important;height:31px!important;flex-basis:31px!important}
}

/* MSM Site 1.0.709 — AI conversation memory controls */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-panel{
  margin-top:12px!important;padding:12px!important;border:1px solid rgba(168,85,247,.15)!important;border-radius:14px!important;
  background:rgba(168,85,247,.045)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-head{
  display:flex!important;align-items:center!important;gap:9px!important;margin-bottom:10px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-head>span{
  width:30px!important;height:30px!important;display:grid!important;place-items:center!important;border-radius:10px!important;
  background:rgba(168,85,247,.12)!important;color:#7c3aed!important;font-weight:900!important;font-size:16px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-head>div{min-width:0!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-head b{display:block!important;font-size:11px!important;font-weight:900!important;color:var(--sd-text)!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-head small{display:block!important;margin-top:2px!important;font-size:9.5px!important;line-height:1.6!important;color:var(--sd-muted)!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-grid{
  display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-grid label{margin:0!important}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-panel{
  border-color:rgba(196,181,253,.14)!important;background:rgba(124,58,237,.10)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-head>span{
  background:rgba(167,139,250,.14)!important;color:#c4b5fd!important;
}
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-grid{grid-template-columns:1fr 1fr!important;gap:7px!important}
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-ai-memory-panel{padding:10px!important}
}


/* MSM Site 1.0.940 — AI Subflow allow-list */
.sd-ai-subflows-master{width:100%;margin-bottom:10px}
.sd-ai-subflow-list{display:grid;gap:8px;margin-top:4px}
.sd-ai-subflow-list[hidden]{display:none}
.sd-ai-subflow-choice{width:100%;display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px 10px;border:1px solid var(--sd-line);border-radius:13px;background:var(--sd-surface-2);color:var(--sd-text);text-align:start;transition:.16s ease}
.sd-ai-subflow-choice:hover:not(:disabled){transform:translateY(-1px);border-color:rgba(168,85,247,.32);box-shadow:0 7px 18px rgba(66,43,65,.06)}
.sd-ai-subflow-choice.is-selected{border-color:rgba(34,197,94,.34);background:rgba(34,197,94,.07)}
.sd-ai-subflow-choice.is-disabled{opacity:.5;cursor:not-allowed}
.sd-ai-subflow-check{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:rgba(168,85,247,.10);color:#7e22ce;font-weight:950}
.sd-ai-subflow-choice.is-selected .sd-ai-subflow-check{background:rgba(34,197,94,.14);color:#15803d}
.sd-ai-subflow-copy{min-width:0;display:grid;gap:2px}.sd-ai-subflow-copy b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sd-ai-subflow-copy small{font-size:10px;line-height:1.5;color:var(--sd-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sd-ai-subflow-choice>em{font-size:9px;font-style:normal;font-weight:850;color:var(--sd-muted)}
html[data-theme="dark"] .sd-ai-subflow-choice{background:#171318}
@media(max-width:800px){.sd-ai-subflow-choice{grid-template-columns:30px minmax(0,1fr)}.sd-ai-subflow-choice>em{grid-column:2}}

/* MSM AI Agent V1.2 premium node editor */
.sd-ai-agent-editor,.sd-contact-save-editor{display:grid;gap:12px}
.sd-ai-agent-editor .sd-editor-card,.sd-contact-save-editor .sd-editor-card{border:1px solid var(--sd-line);border-radius:18px;background:linear-gradient(145deg,var(--sd-card),var(--sd-surface));box-shadow:0 10px 28px rgba(66,43,65,.06)}
.sd-ai-hero-card{position:relative;overflow:hidden}
.sd-ai-hero-card:before{content:"";position:absolute;inset:auto -42px -62px auto;width:150px;height:150px;border-radius:50%;background:radial-gradient(circle,rgba(168,85,247,.18),transparent 68%);pointer-events:none}
.sd-ai-runtime-badge,.sd-ai-section-title{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.sd-ai-runtime-badge>span,.sd-ai-section-title>span{width:34px;height:34px;display:grid;place-items:center;flex:0 0 auto;border:1px solid rgba(168,85,247,.2);border-radius:11px;background:linear-gradient(145deg,#f5eaff,#fff0e5);color:#9333ea;font-weight:950}
.sd-ai-runtime-badge b,.sd-ai-section-title b{display:block;font-size:13px;color:var(--sd-text)}
.sd-ai-runtime-badge small,.sd-ai-section-title small{display:block;margin-top:2px;color:var(--sd-muted);font-size:11px;line-height:1.55}
.sd-ai-agent-editor label>span,.sd-contact-save-editor label>span{font-weight:850;color:var(--sd-text)}
.sd-ai-agent-editor input,.sd-ai-agent-editor textarea,.sd-ai-agent-editor select,.sd-contact-save-editor input,.sd-contact-save-editor select{border:1px solid var(--sd-line)!important;border-radius:12px!important;background:var(--sd-card)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.5);transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.sd-ai-agent-editor input:focus,.sd-ai-agent-editor textarea:focus,.sd-ai-agent-editor select:focus,.sd-contact-save-editor input:focus,.sd-contact-save-editor select:focus{border-color:rgba(168,85,247,.48)!important;box-shadow:0 0 0 3px rgba(168,85,247,.10)!important;outline:0}
.sd-ai-settings-card .sd-inline-grid{align-items:end}
.sd-ai-toggle-box{display:grid;gap:7px}
.sd-ai-toggle-box>span{font-size:12px;font-weight:850;color:var(--sd-text)}
.sd-ai-switch{height:42px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 11px;border:1px solid var(--sd-line);border-radius:12px;background:var(--sd-surface-2);color:var(--sd-muted)}
.sd-ai-switch i{position:relative;width:36px;height:20px;border-radius:999px;background:#c9c1c8;transition:.18s}
.sd-ai-switch i:after{content:"";position:absolute;top:3px;right:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.14);transition:.18s}
.sd-ai-switch.is-on{border-color:rgba(34,197,94,.32);background:rgba(34,197,94,.08);color:#15803d}
.sd-ai-switch.is-on i{background:#22c55e}
.sd-ai-switch.is-on i:after{transform:translateX(-16px)}
.sd-ai-voice-card .sd-inline-grid{grid-template-columns:1fr;gap:9px;align-items:stretch}
.sd-ai-voice-card .sd-ai-toggle-box{gap:8px;padding:10px;border:1px solid var(--sd-line);border-radius:13px;background:var(--sd-surface-2)}
.sd-ai-voice-card .sd-ai-toggle-box>span{line-height:1.45}
.sd-ai-voice-output-row{display:grid;grid-template-columns:1fr;gap:7px;align-items:stretch;min-width:0;width:100%}
.sd-ai-voice-output-row .sd-ai-switch{width:100%;min-width:0}
.sd-ai-voice-picker{display:grid;grid-template-columns:1fr;gap:5px;min-width:0;width:100%;padding-top:1px}
.sd-ai-voice-picker>span{font-size:11px;font-weight:850;color:var(--sd-muted);line-height:1.4}
.sd-ai-voice-picker select{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;height:40px;padding:0 10px!important;font-size:11px!important;font-weight:800;text-overflow:ellipsis}

.sd-ai-extract-list,.sd-contact-save-list{display:grid;gap:8px}
.sd-ai-extract-row{display:grid;grid-template-columns:28px minmax(0,1fr) 34px;gap:7px;align-items:center;padding:7px;border:1px solid var(--sd-line);border-radius:13px;background:var(--sd-surface-2)}
.sd-ai-extract-index{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:rgba(168,85,247,.10);color:#7e22ce;font-size:11px;font-weight:900}
.sd-ai-extract-row button,.sd-contact-save-row-head button{width:32px;height:32px;border:0;border-radius:9px;background:rgba(220,38,38,.08);color:#dc2626;font-size:18px}
.sd-ai-add-row{width:100%;min-height:39px;margin-top:9px;border:1px dashed rgba(168,85,247,.34);border-radius:12px;background:rgba(168,85,247,.06);color:#7e22ce;font-weight:900}
.sd-ai-add-row:hover:not(:disabled){transform:translateY(-1px);background:rgba(168,85,247,.10)}
.sd-ai-add-row:disabled{opacity:.45;cursor:not-allowed}
.sd-ai-empty-state{padding:14px;border:1px dashed var(--sd-line);border-radius:12px;background:var(--sd-surface-2);color:var(--sd-muted);font-size:12px;text-align:center}
.sd-ai-output-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.sd-ai-output-chips span{min-height:34px;display:flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid var(--sd-line);border-radius:10px;font-size:11px;font-weight:900}
.sd-ai-output-chips .is-success{background:rgba(34,197,94,.08);color:#15803d}.sd-ai-output-chips .is-not-achieved{background:rgba(249,115,22,.09);color:#b45309}.sd-ai-output-chips .is-timeout{background:rgba(100,116,139,.09);color:#475569}.sd-ai-output-chips .is-handoff{background:rgba(139,92,246,.09);color:#7c3aed}
.sd-ai-billing-note{padding:9px 11px;border-radius:11px;background:linear-gradient(135deg,rgba(249,115,22,.07),rgba(139,92,246,.07))}
.sd-contact-save-row{display:grid;gap:8px;padding:10px;border:1px solid var(--sd-line);border-radius:14px;background:var(--sd-surface-2)}
.sd-contact-save-row-head{display:flex;align-items:center;justify-content:space-between}.sd-contact-save-row-head>span{min-width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:rgba(13,148,136,.10);color:#0f766e;font-weight:900}
.sd-node .sd-port-ai{left:-8px}.sd-node .sd-port-ai.is-success{top:22%}.sd-node .sd-port-ai.is-not-achieved{top:40%}.sd-node .sd-port-ai.is-timeout{top:61%}.sd-node .sd-port-ai.is-handoff{top:80%}
.sd-node .sd-port-ai-label{left:10px;right:auto;transform:translateY(-50%);max-width:150px;padding:2px 6px;border-radius:7px;background:var(--sd-card);box-shadow:0 3px 10px rgba(0,0,0,.06);font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sd-node .sd-port-ai-label.is-success{top:22%;color:#15803d}.sd-node .sd-port-ai-label.is-not-achieved{top:40%;color:#b45309}.sd-node .sd-port-ai-label.is-timeout{top:61%;color:#64748b}.sd-node .sd-port-ai-label.is-handoff{top:80%;color:#7c3aed}
.sd-edge.is-branch-timeout{stroke:#64748b}.sd-edge.is-branch-handoff{stroke:#8b5cf6}
html[data-theme="dark"] .sd-ai-runtime-badge>span,html[data-theme="dark"] .sd-ai-section-title>span{background:linear-gradient(145deg,rgba(139,92,246,.16),rgba(249,115,22,.10));color:#c4b5fd}
html[data-theme="dark"] .sd-ai-switch{background:#171318}html[data-theme="dark"] .sd-ai-switch.is-on{background:rgba(34,197,94,.10);color:#86efac}
html[data-theme="dark"] .sd-ai-extract-row,html[data-theme="dark"] .sd-contact-save-row,html[data-theme="dark"] .sd-ai-empty-state{background:#171318}
html[data-theme="dark"] .sd-node .sd-port-ai-label{background:#1d181e}
@media(max-width:800px){.sd-ai-output-chips{grid-template-columns:1fr}.sd-ai-agent-editor .sd-inline-grid{grid-template-columns:1fr}.sd-node .sd-port-ai-label{display:block;left:8px;max-width:142px;font-size:8px;padding:2px 5px}}


/* MSM Site 1.0.730 — Smart Direct canvas undo/redo overlay */
.sd-canvas-history-tools{
  position:absolute;
  z-index:12;
  top:12px;
  left:12px;
  display:flex;
  align-items:center;
  gap:5px;
  padding:4px;
  border:1px solid rgba(255,255,255,.78);
  border-radius:13px;
  background:rgba(255,252,248,.82);
  box-shadow:0 10px 28px rgba(50,35,45,.12);
  backdrop-filter:blur(14px) saturate(1.15);
  -webkit-backdrop-filter:blur(14px) saturate(1.15);
  direction:ltr;
}
.sd-canvas-history-tools button{
  width:35px;
  height:35px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  color:#665b64;
  cursor:pointer;
  transition:transform .16s ease,background .16s ease,color .16s ease,border-color .16s ease,opacity .16s ease,box-shadow .16s ease;
}
.sd-canvas-history-tools button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sd-canvas-history-tools button:not(:disabled):hover{
  transform:translateY(-1px);
  color:#7c3aed;
  border-color:rgba(124,58,237,.16);
  background:rgba(124,58,237,.08);
  box-shadow:0 5px 14px rgba(124,58,237,.12);
}
.sd-canvas-history-tools button:not(:disabled):active{transform:translateY(0) scale(.96)}
.sd-canvas-history-tools button:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(124,58,237,.15)}
.sd-canvas-history-tools button:disabled{opacity:.28;cursor:default;box-shadow:none}
html[data-theme="dark"] .sd-canvas-history-tools{
  border-color:rgba(255,255,255,.09);
  background:rgba(28,23,29,.84);
  box-shadow:0 12px 30px rgba(0,0,0,.28);
}
html[data-theme="dark"] .sd-canvas-history-tools button{color:#cfc3cd}
html[data-theme="dark"] .sd-canvas-history-tools button:not(:disabled):hover{color:#c4a7ff;background:rgba(139,92,246,.14);border-color:rgba(167,139,250,.2)}
@media(max-width:800px){
  .sd-canvas-history-tools{top:9px;left:9px;padding:3px;border-radius:12px}
  .sd-canvas-history-tools button{width:33px;height:33px;border-radius:9px}
  .sd-canvas-history-tools button svg{width:18px;height:18px}
}

/* MSM 1.0.774 — Contact State multi-action editor */
.sd-contact-state-editor .sd-editor-card{display:grid;gap:12px}
.sd-contact-state-action-list{display:grid;gap:10px}
.sd-contact-state-action-row{display:grid;gap:9px;padding:11px;border:1px solid var(--sd-line,rgba(148,163,184,.18));border-radius:14px;background:rgba(255,255,255,.035)}
.sd-contact-state-action-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.sd-contact-state-action-head>span{display:grid;place-items:center;min-width:26px;height:26px;padding:0 7px;border-radius:999px;background:rgba(15,118,110,.14);font-size:11px;font-weight:900}
.sd-contact-state-action-head>button{width:28px;height:28px;border:1px solid rgba(244,63,94,.25);border-radius:9px;background:rgba(244,63,94,.08);color:#fb7185;font-size:18px;line-height:1;cursor:pointer}
.sd-contact-state-add-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sd-contact-state-add-row .sd-ai-add-row{margin:0;min-width:0}
html[data-theme="light"] .sd-contact-state-action-row{background:rgba(15,118,110,.035)}
@media(max-width:800px){.sd-contact-state-add-row{grid-template-columns:1fr}.sd-contact-state-action-row{padding:10px}}


/* MSM 1.0.777 — AI Simulator Live Test + Debug Trace */
.sd-sim-ai-live-card{display:grid;gap:10px;padding:12px;border:1px solid rgba(168,85,247,.25);border-radius:16px;background:linear-gradient(145deg,rgba(168,85,247,.09),rgba(59,130,246,.045))}
.sd-sim-ai-live-card>header{display:flex;align-items:center;gap:9px}
.sd-sim-ai-live-card>header>span{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:rgba(168,85,247,.16);font-weight:900}
.sd-sim-ai-live-card>header>div{display:grid;gap:1px;min-width:0;flex:1}
.sd-sim-ai-live-card>header b{font-size:12px}.sd-sim-ai-live-card>header small{font-size:10px;opacity:.7}
.sd-sim-ai-live-card>header em{font-style:normal;font-size:9px;font-weight:900;letter-spacing:.08em;padding:5px 7px;border-radius:999px;background:rgba(168,85,247,.14)}
.sd-sim-ai-live-meta{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:10px}.sd-sim-ai-live-meta>span{font-weight:800}.sd-sim-ai-live-meta small{opacity:.66;text-align:end}
#sdSimAiLiveRun{border:0;border-radius:12px;padding:10px 12px;background:linear-gradient(135deg,#7c3aed,#a855f7);color:#fff;font-weight:900;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:7px}
#sdSimAiLiveRun:disabled{opacity:.45;cursor:not-allowed}.sd-sim-ai-live-safe{font-size:10px;line-height:1.65;opacity:.72}
.sd-sim-ai-debug-card{margin-top:12px;border:1px solid rgba(168,85,247,.22);border-radius:18px;background:rgba(15,23,42,.18);overflow:hidden}
.sd-sim-ai-debug-card>header{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid rgba(148,163,184,.12)}
.sd-sim-ai-debug-card>header>span{display:grid;place-items:center;width:32px;height:32px;border-radius:11px;background:rgba(168,85,247,.16)}
.sd-sim-ai-debug-card>header>div{display:grid;gap:1px;flex:1}.sd-sim-ai-debug-card>header b{font-size:13px}.sd-sim-ai-debug-card>header small{font-size:10px;opacity:.68}
.sd-sim-ai-debug-card>header em{font-style:normal;font-size:9px;font-weight:900;padding:5px 8px;border-radius:999px;background:rgba(59,130,246,.12)}
.sd-sim-ai-debug{display:grid;gap:10px;padding:12px}
.sd-sim-ai-debug-route{display:flex;align-items:center;gap:9px;padding:10px 12px;border-radius:13px;background:rgba(148,163,184,.08)}
.sd-sim-ai-debug-route>span{font-size:14px}.sd-sim-ai-debug-route>div{display:grid}.sd-sim-ai-debug-route small{font-size:9px;opacity:.62}.sd-sim-ai-debug-route b{font-size:12px}
.sd-sim-ai-debug-route.is-success{background:rgba(34,197,94,.10)}.sd-sim-ai-debug-route.is-not_achieved{background:rgba(245,158,11,.10)}.sd-sim-ai-debug-route.is-human_handoff{background:rgba(59,130,246,.10)}.sd-sim-ai-debug-route.is-active{background:rgba(168,85,247,.10)}
.sd-sim-ai-debug-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.sd-sim-ai-debug-kpis article{display:grid;gap:4px;padding:9px;border:1px solid rgba(148,163,184,.12);border-radius:12px;min-width:0}.sd-sim-ai-debug-kpis small{font-size:9px;opacity:.62}.sd-sim-ai-debug-kpis b{font-size:11px;overflow-wrap:anywhere}
.sd-sim-ai-debug-block{display:grid;gap:7px;padding:10px;border:1px solid rgba(148,163,184,.12);border-radius:13px}.sd-sim-ai-debug-block>header{display:flex;justify-content:space-between;gap:8px}.sd-sim-ai-debug-block>header b{font-size:11px}.sd-sim-ai-debug-block>header em{font-style:normal;font-size:10px;opacity:.65}.sd-sim-ai-debug-block p{margin:0;font-size:11px;line-height:1.75;white-space:pre-wrap}
.sd-sim-ai-debug pre{margin:0;max-height:220px;overflow:auto;padding:9px;border-radius:10px;background:rgba(2,6,23,.32);font:10px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace;direction:ltr;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}
.sd-sim-ai-extracted{display:flex;flex-wrap:wrap;gap:7px}.sd-sim-ai-extracted>span{display:grid;gap:2px;padding:7px 9px;border-radius:10px;background:rgba(13,148,136,.09)}.sd-sim-ai-extracted small{font-size:8px;opacity:.64}.sd-sim-ai-extracted b{font-size:10px}.sd-sim-ai-extracted>i{font-style:normal;font-size:10px;opacity:.58}
.sd-sim-ai-debug-details{border:1px dashed rgba(168,85,247,.24);border-radius:13px;padding:9px}.sd-sim-ai-debug-details summary{cursor:pointer;font-size:10px;font-weight:900}.sd-sim-ai-debug-details>div{display:flex;justify-content:space-between;gap:10px;margin-top:7px;font-size:9px}.sd-sim-ai-debug-details code{direction:ltr;overflow-wrap:anywhere}
.sd-sim-ai-debug-error{display:grid;gap:4px;padding:10px 12px;border-radius:12px;background:rgba(244,63,94,.10);border:1px solid rgba(244,63,94,.20)}.sd-sim-ai-debug-error b{font-size:11px}.sd-sim-ai-debug-error span{font-size:10px}
.sd-sim-trace-item.is-debuggable{cursor:pointer}.sd-sim-trace-item.is-debuggable:hover{outline:1px solid rgba(168,85,247,.28)}.sd-sim-trace-item.is-debuggable>em{margin-inline-start:auto;font-style:normal;font-size:11px;opacity:.65}
html[data-theme="light"] .sd-sim-ai-debug-card{background:#fff}.sd-sim-ai-debug-card[hidden]{display:none!important}
@media(max-width:800px){.sd-sim-ai-debug-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.sd-sim-ai-live-meta{align-items:flex-start;flex-direction:column}.sd-sim-ai-debug{padding:10px}}


/* MSM 1.0.781 — Inline conversational AI Live Test */
.sd-sim-ai-live-chat{min-height:136px;max-height:310px;overflow:auto;display:grid;align-content:start;gap:9px;padding:10px;border:1px solid rgba(148,163,184,.14);border-radius:14px;background:rgba(2,6,23,.16);scroll-behavior:smooth;overscroll-behavior:contain}
.sd-sim-ai-live-empty{min-height:112px;display:grid;place-items:center;text-align:center;align-content:center;gap:4px;padding:12px;opacity:.72}.sd-sim-ai-live-empty>span{font-size:18px}.sd-sim-ai-live-empty>b{font-size:11px}.sd-sim-ai-live-empty>small{font-size:9px;line-height:1.65}
.sd-sim-ai-live-bubble{width:min(92%,420px);display:grid;gap:3px;padding:9px 11px;border-radius:14px;transition:.18s ease}.sd-sim-ai-live-bubble small{font-size:8px;font-weight:900;opacity:.58}.sd-sim-ai-live-bubble p{margin:0;font-size:11px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.sd-sim-ai-live-bubble.is-user{justify-self:end;background:linear-gradient(135deg,rgba(124,58,237,.88),rgba(168,85,247,.82));color:#fff;border-end-end-radius:5px}.sd-sim-ai-live-bubble.is-ai{justify-self:start;background:rgba(148,163,184,.10);border:1px solid rgba(148,163,184,.12);border-end-start-radius:5px}.sd-sim-ai-live-bubble.is-error{justify-self:start;background:rgba(244,63,94,.09);border:1px solid rgba(244,63,94,.20);border-end-start-radius:5px}
.sd-sim-ai-live-bubble.is-latest{transform:translateY(-1px)}.sd-sim-ai-live-bubble.is-typing p{display:flex;gap:4px;padding:4px 0}.sd-sim-ai-live-bubble.is-typing i{width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.45;animation:sdAiTyping 1s infinite ease-in-out}.sd-sim-ai-live-bubble.is-typing i:nth-child(2){animation-delay:.15s}.sd-sim-ai-live-bubble.is-typing i:nth-child(3){animation-delay:.3s}@keyframes sdAiTyping{0%,60%,100%{transform:translateY(0);opacity:.3}30%{transform:translateY(-4px);opacity:.9}}
.sd-sim-ai-live-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}.sd-sim-ai-live-composer textarea{min-height:44px;max-height:110px;resize:vertical;border-radius:12px!important}.sd-sim-ai-live-composer #sdSimAiLiveRun{min-width:82px;height:44px;padding:0 12px}.sd-sim-ai-live-composer #sdSimAiLiveRun b{font-size:10px}.sd-sim-ai-live-composer #sdSimAiLiveRun>span{font-size:14px}
.sd-sim-ai-live-final{display:grid;gap:9px;padding:11px;border:1px solid rgba(34,197,94,.22);border-radius:14px;background:linear-gradient(145deg,rgba(34,197,94,.09),rgba(13,148,136,.05))}
.sd-sim-ai-live-final[hidden]{display:none!important}.sd-sim-ai-live-final>header{display:flex;align-items:center;gap:8px}.sd-sim-ai-live-final>header>span{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:rgba(34,197,94,.14);font-weight:900}.sd-sim-ai-live-final>header>div{display:grid}.sd-sim-ai-live-final>header small{font-size:8px;opacity:.6}.sd-sim-ai-live-final>header b{font-size:12px}
.sd-sim-ai-live-final-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.sd-sim-ai-live-final-kpis>span{display:grid;gap:2px;padding:7px 8px;border-radius:10px;background:rgba(255,255,255,.045)}.sd-sim-ai-live-final-kpis small{font-size:8px;opacity:.62}.sd-sim-ai-live-final-kpis b{font-size:10px}
.sd-sim-ai-live-final-summary{display:grid;gap:3px;padding:8px 9px;border-radius:10px;background:rgba(255,255,255,.035)}.sd-sim-ai-live-final-summary small{font-size:8px;opacity:.62}.sd-sim-ai-live-final-summary p{margin:0;font-size:10px;line-height:1.75;white-space:pre-wrap}
.sd-sim-ai-live-final-data{display:flex;flex-wrap:wrap;gap:6px}.sd-sim-ai-live-final-data>span{display:grid;gap:2px;padding:6px 8px;border-radius:9px;background:rgba(13,148,136,.10)}.sd-sim-ai-live-final-data small{font-size:8px;opacity:.6}.sd-sim-ai-live-final-data b{font-size:10px}
html[data-theme="light"] .sd-sim-ai-live-chat{background:rgba(248,250,252,.9)}html[data-theme="light"] .sd-sim-ai-live-bubble.is-ai{background:#fff}html[data-theme="light"] .sd-sim-ai-live-final-kpis>span,html[data-theme="light"] .sd-sim-ai-live-final-summary{background:rgba(255,255,255,.72)}
@media(max-width:800px){.sd-sim-ai-live-chat{max-height:260px}.sd-sim-ai-live-composer{grid-template-columns:1fr}.sd-sim-ai-live-composer #sdSimAiLiveRun{width:100%}.sd-sim-ai-live-final-kpis{grid-template-columns:1fr 1fr 1fr}}


/* MSM 1.0.782 — Contact State reliable multi-action + premium add buttons */
.sd-contact-state-add-row{gap:10px}
.sd-contact-state-add-btn{
 position:relative;isolation:isolate;overflow:hidden;min-height:44px;border:1px solid rgba(196,181,253,.30);border-radius:14px;
 display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 13px;cursor:pointer;
 color:#fff!important;background:linear-gradient(135deg,rgba(91,33,182,.82),rgba(124,58,237,.68) 48%,rgba(168,85,247,.58));
 box-shadow:0 10px 26px rgba(124,58,237,.20),inset 0 1px 0 rgba(255,255,255,.20);
 backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,filter .18s ease
}
.sd-contact-state-add-btn::before{content:"";position:absolute;inset:-45% 28% 35% -18%;z-index:-1;border-radius:999px;background:rgba(216,180,254,.30);filter:blur(17px);pointer-events:none}
.sd-contact-state-add-btn::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(115deg,rgba(255,255,255,.14),transparent 38%,rgba(255,255,255,.05));pointer-events:none}
.sd-contact-state-add-btn>span{display:grid;place-items:center;width:25px;height:25px;border-radius:9px;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.14);font-size:12px;font-weight:950;color:#fff}
.sd-contact-state-add-btn>b{font-size:11px;font-weight:900;color:#fff!important;text-shadow:0 1px 8px rgba(30,10,70,.25)}
.sd-contact-state-add-btn:hover{transform:translateY(-1px);border-color:rgba(221,214,254,.52);box-shadow:0 13px 30px rgba(124,58,237,.27),0 0 24px rgba(168,85,247,.12),inset 0 1px 0 rgba(255,255,255,.24)}
.sd-contact-state-add-btn:active{transform:translateY(0) scale(.99)}
.sd-contact-state-add-btn:focus-visible{outline:2px solid rgba(196,181,253,.72);outline-offset:2px}
.sd-contact-state-add-btn:disabled{opacity:.42;cursor:not-allowed;transform:none;filter:saturate(.6)}
.sd-contact-state-add-btn.is-tag{background:linear-gradient(135deg,rgba(76,29,149,.86),rgba(109,40,217,.72) 48%,rgba(147,51,234,.60))}
html[data-theme="light"] .sd-contact-state-add-btn{
 color:#fff!important;border-color:rgba(109,40,217,.24);
 background:linear-gradient(135deg,rgba(88,28,135,.90),rgba(124,58,237,.82) 48%,rgba(147,51,234,.72));
 box-shadow:0 10px 26px rgba(109,40,217,.18),inset 0 1px 0 rgba(255,255,255,.25)
}
html[data-theme="light"] .sd-contact-state-add-btn>b,html[data-theme="light"] .sd-contact-state-add-btn>span{color:#fff!important}
@media(max-width:800px){.sd-contact-state-add-btn{width:100%;min-height:45px}}


/* MSM 1.0.783 — AI Live Test contextual top placement + isolated sessions */
.sd-sim-ai-live-card[hidden]{display:none!important}
.sd-simulator-panel>.sd-sim-ai-live-card{
 margin:12px 16px 0;
 flex:0 0 auto;
 box-shadow:0 12px 30px rgba(124,58,237,.10),inset 0 1px 0 rgba(255,255,255,.04)
}
.sd-simulator-panel>.sd-sim-ai-live-card .sd-sim-ai-live-chat{max-height:250px}
.sd-simulator-panel>.sd-sim-ai-live-card .sd-sim-ai-live-composer{max-width:none}
@media(max-width:800px){
 .sd-simulator-panel>.sd-sim-ai-live-card{margin:10px 12px 0}
 .sd-simulator-panel>.sd-sim-ai-live-card .sd-sim-ai-live-chat{max-height:230px}
}


/* MSM 1.0.785 — unified Simulator modal + premium AI controls */
.sd-simulator-panel{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
.sd-simulator-body{
  min-height:0!important;
  flex:1 1 auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
}
.sd-simulator-body>.sd-sim-ai-live-card{
  position:relative!important;
  inset:auto!important;
  z-index:auto!important;
  width:auto!important;
  max-width:none!important;
  margin:12px 16px 0!important;
  box-sizing:border-box!important;
  flex:none!important;
}
.sd-simulator-body>.sd-simulator-layout{
  min-height:0!important;
}

/* Premium AI node selector */
.sd-sim-ai-node-field{
  position:relative;
  display:grid!important;
  gap:6px!important;
  margin:0!important;
}
.sd-sim-ai-node-field>span{
  margin:0 2px!important;
  color:var(--sd-muted)!important;
  font-size:10px!important;
  line-height:1.5!important;
  font-weight:850!important;
}
.sd-sim-ai-node-field::after{
  content:"⌄";
  position:absolute;
  inset-inline-end:13px;
  bottom:11px;
  z-index:2;
  pointer-events:none;
  color:#a78bfa;
  font-size:13px;
  font-weight:950;
  line-height:1;
}
.sd-sim-ai-node-field>select{
  appearance:none!important;
  -webkit-appearance:none!important;
  width:100%!important;
  min-height:42px!important;
  padding:9px 36px 9px 12px!important;
  border:1px solid color-mix(in srgb,#8b5cf6 32%,var(--sd-line))!important;
  border-radius:13px!important;
  background:linear-gradient(135deg,color-mix(in srgb,#7c3aed 7%,var(--sd-card)),var(--sd-card))!important;
  color:var(--sd-text)!important;
  font:800 11px/1.45 'Vazirmatn',Tahoma,Arial,sans-serif!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  outline:none!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 7px 20px rgba(124,58,237,.08)!important;
  cursor:pointer!important;
}
.sd-sim-ai-node-field>select:hover{
  border-color:rgba(139,92,246,.48)!important;
  box-shadow:0 9px 24px rgba(124,58,237,.12)!important;
}
.sd-sim-ai-node-field>select:focus,
.sd-sim-ai-node-field>select:focus-visible{
  border-color:#8b5cf6!important;
  outline:none!important;
  box-shadow:0 0 0 3px rgba(139,92,246,.12),0 9px 24px rgba(124,58,237,.12)!important;
}
.sd-sim-ai-node-field>select option{
  background:var(--sd-card)!important;
  color:var(--sd-text)!important;
  font-size:11px!important;
}

/* Live AI composer: theme-correct, compact typography */
#sdSimAiLiveInput{
  width:100%!important;
  box-sizing:border-box!important;
  min-height:44px!important;
  max-height:110px!important;
  padding:10px 12px!important;
  border:1px solid color-mix(in srgb,#8b5cf6 26%,var(--sd-line))!important;
  border-radius:13px!important;
  background:var(--sd-card)!important;
  color:var(--sd-text)!important;
  caret-color:#a78bfa!important;
  font:700 11px/1.65 'Vazirmatn',Tahoma,Arial,sans-serif!important;
  letter-spacing:0!important;
  outline:none!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;
}
#sdSimAiLiveInput::placeholder{
  color:var(--sd-muted)!important;
  opacity:.72!important;
  font-size:11px!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdSimAiLiveInput{
  background:#171319!important;
  color:#f6f1f5!important;
  border-color:rgba(167,139,250,.22)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdSimAiLiveInput::placeholder{
  color:#9f939d!important;
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) #sdSimAiLiveInput{
  background:#fffaf7!important;
  color:#2d2730!important;
  border-color:rgba(124,58,237,.18)!important;
}

/* Desktop: Templates + Simulator open from the top of Studio, full-height. */
@media(min-width:801px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-panel,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel{
    inset:10px 14px 14px!important;
    max-height:none!important;
    height:auto!important;
    border-radius:18px!important;
    z-index:160!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-panel .sd-overlay-panel-head,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-simulator-panel .sd-overlay-panel-head{
    flex:0 0 auto!important;
  }
}

/* Mobile: one modal, one scroll surface — never a second floating window. */
@media(max-width:800px){
  .sd-simulator-panel{
    overflow:hidden!important;
  }
  .sd-simulator-body{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:0!important;
  }
  .sd-simulator-body>.sd-sim-ai-live-card{
    position:static!important;
    width:auto!important;
    max-width:none!important;
    margin:10px 10px 0!important;
    border-radius:16px!important;
    box-shadow:0 10px 26px rgba(124,58,237,.08)!important;
  }
  .sd-simulator-body>.sd-simulator-layout{
    display:block!important;
    overflow:visible!important;
    min-height:0!important;
  }
  .sd-simulator-body .sd-simulator-scenario,
  .sd-simulator-body .sd-simulator-results{
    overflow:visible!important;
  }
  .sd-sim-ai-node-field>span{
    font-size:9px!important;
  }
  .sd-sim-ai-node-field>select{
    min-height:40px!important;
    padding:8px 34px 8px 10px!important;
    border-radius:12px!important;
    font-size:10px!important;
    line-height:1.45!important;
  }
  .sd-sim-ai-node-field::after{
    inset-inline-end:12px;
    bottom:10px;
    font-size:12px;
  }
  #sdSimAiLiveInput{
    min-height:42px!important;
    padding:9px 10px!important;
    border-radius:12px!important;
    font-size:10.5px!important;
    line-height:1.6!important;
  }
  #sdSimAiLiveInput::placeholder{
    font-size:10.5px!important;
  }
  .sd-sim-ai-live-composer #sdSimAiLiveRun{
    min-height:42px!important;
    height:42px!important;
  }
  .sd-sim-ai-live-composer #sdSimAiLiveRun b{
    font-size:10px!important;
  }
}


/* MSM 1.0.787 — Premium Template Gallery */
.sd-template-panel{
  background:
    radial-gradient(circle at 90% -8%,rgba(139,92,246,.12),transparent 30%),
    radial-gradient(circle at 8% 104%,rgba(249,115,22,.08),transparent 28%),
    var(--sd-card)!important;
}
.sd-template-panel .sd-overlay-panel-head{
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg,color-mix(in srgb,var(--sd-card) 94%,#8b5cf6),var(--sd-card))!important;
}
.sd-template-panel .sd-overlay-panel-head::after{
  content:"";position:absolute;inset:auto -5% -45% 55%;height:110px;border-radius:999px;
  background:rgba(139,92,246,.09);filter:blur(24px);pointer-events:none
}
.sd-template-toolbar{
  position:relative;z-index:2;gap:10px!important;padding:12px 16px!important;
  background:color-mix(in srgb,var(--sd-surface-2) 78%,transparent)!important;
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--sd-line)!important
}
.sd-template-search{
  min-height:44px!important;border:1px solid color-mix(in srgb,#8b5cf6 22%,var(--sd-line))!important;
  border-radius:14px!important;background:color-mix(in srgb,var(--sd-card) 88%,transparent)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 8px 24px rgba(124,58,237,.06)!important
}
.sd-template-search>span{color:#a78bfa!important;font-size:14px!important}
.sd-template-search input{font-size:11px!important;color:var(--sd-text)!important}
.sd-template-search:focus-within{border-color:rgba(139,92,246,.48)!important;box-shadow:0 0 0 3px rgba(139,92,246,.09),0 10px 28px rgba(124,58,237,.09)!important}
.sd-template-save-current{
  min-height:44px!important;border:1px solid rgba(216,180,254,.26)!important;border-radius:14px!important;
  padding:0 15px!important;color:#fff!important;
  background:linear-gradient(135deg,#f97316 0%,#d946ef 58%,#8b5cf6 100%)!important;
  box-shadow:0 10px 26px rgba(139,92,246,.20),inset 0 1px 0 rgba(255,255,255,.22)!important;
  font-weight:900!important
}
.sd-template-save-current:hover{box-shadow:0 14px 32px rgba(139,92,246,.28),0 0 25px rgba(217,70,239,.10)!important;filter:brightness(1.04)}
.sd-template-content{
  padding:18px 20px 26px!important;
  background:linear-gradient(180deg,transparent,rgba(124,58,237,.018))!important;
  scrollbar-width:thin;
  scrollbar-color:rgba(139,92,246,.62) color-mix(in srgb,var(--sd-card) 92%,transparent)
}
.sd-template-content::-webkit-scrollbar{width:9px;height:9px}
.sd-template-content::-webkit-scrollbar-track{background:color-mix(in srgb,var(--sd-card) 92%,transparent);border-radius:999px}
.sd-template-content::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,rgba(167,139,250,.78),rgba(124,58,237,.52));
  border:2px solid color-mix(in srgb,var(--sd-card) 94%,transparent);border-radius:999px
}
.sd-template-content::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#c4b5fd,#8b5cf6)}
.sd-template-section+.sd-template-section{margin-top:22px!important;padding-top:20px!important}
.sd-template-section>header{margin-bottom:12px!important}
.sd-template-section>header div{gap:8px!important}
.sd-template-section>header span{
  width:28px;height:28px;border-radius:9px;display:grid!important;place-items:center;
  background:rgba(139,92,246,.10);border:1px solid rgba(139,92,246,.14);color:#a78bfa!important
}
.sd-template-section>header b{font-size:12px!important;font-weight:950!important}
.sd-template-section>header small{font-size:9px!important;opacity:.76}
.sd-template-grid{gap:14px!important}
.sd-template-card{
  isolation:isolate;padding:15px!important;border:1px solid color-mix(in srgb,#8b5cf6 14%,var(--sd-line))!important;
  border-radius:20px!important;
  background:linear-gradient(145deg,color-mix(in srgb,var(--sd-card) 97%,#8b5cf6),var(--sd-card))!important;
  box-shadow:0 12px 30px rgba(15,23,42,.07),inset 0 1px 0 rgba(255,255,255,.045)!important;
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease!important
}
.sd-template-card::before{width:3px!important;border-radius:0 999px 999px 0!important;opacity:.9}
.sd-template-card:hover{
  transform:translateY(-3px)!important;border-color:rgba(139,92,246,.30)!important;
  box-shadow:0 18px 42px rgba(124,58,237,.13),0 0 30px rgba(139,92,246,.06),inset 0 1px 0 rgba(255,255,255,.07)!important
}
.sd-template-card.is-custom{border-color:color-mix(in srgb,#14b8a6 15%,var(--sd-line))!important}
.sd-template-card.is-custom:hover{border-color:rgba(20,184,166,.30)!important;box-shadow:0 18px 42px rgba(20,184,166,.10),0 0 28px rgba(14,165,233,.05)!important}
.sd-template-card-glow{
  position:absolute;z-index:-1;inset:-30% 44% 52% -18%;border-radius:999px;
  background:rgba(139,92,246,.12);filter:blur(26px);pointer-events:none
}
.sd-template-card.is-custom .sd-template-card-glow{background:rgba(20,184,166,.10)}
.sd-template-card-head{align-items:center!important}
.sd-template-card-icon{
  width:40px!important;height:40px!important;border-radius:13px!important;
  background:linear-gradient(135deg,rgba(124,58,237,.15),rgba(168,85,247,.07))!important;
  border:1px solid rgba(139,92,246,.15)!important;color:#a78bfa!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06)!important
}
.sd-template-card.is-custom .sd-template-card-icon{background:linear-gradient(135deg,rgba(16,185,129,.13),rgba(14,165,233,.07))!important;border-color:rgba(16,185,129,.15)!important;color:#2dd4bf!important}
.sd-template-card-badge{
  padding:5px 8px!important;border:1px solid var(--sd-line)!important;
  background:color-mix(in srgb,var(--sd-surface-2) 84%,transparent)!important;
  font-size:8px!important;font-weight:900!important;backdrop-filter:blur(10px)
}
.sd-template-card-copy h4{margin:11px 0 4px!important;font-size:12.5px!important;line-height:1.65!important}
.sd-template-card-copy p{min-height:38px!important;font-size:9px!important;line-height:1.85!important}
.sd-template-card-meta{margin-top:10px!important;gap:6px!important}
.sd-template-card-meta span{
  display:inline-flex!important;align-items:center;gap:4px;padding:5px 7px!important;border-radius:9px!important;
  background:color-mix(in srgb,var(--sd-surface-2) 78%,transparent)!important;font-size:8px!important
}
.sd-template-card-meta i{font-style:normal;color:#a78bfa;font-size:8px}

/* Real node preview */
.sd-template-node-preview{
  margin-top:11px;padding:9px 8px;border:1px solid color-mix(in srgb,#8b5cf6 12%,var(--sd-line));
  border-radius:13px;background:color-mix(in srgb,var(--sd-surface-2) 68%,transparent);overflow:hidden
}
.sd-template-node-rail{
  display:flex;align-items:center;gap:5px;min-width:0;overflow-x:auto;overflow-y:hidden;
  scrollbar-width:none;padding:1px 0 2px
}
.sd-template-node-rail::-webkit-scrollbar{display:none}
.sd-template-mini-node{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:118px;
  padding:5px 7px;border:1px solid color-mix(in srgb,var(--tpl-node-color) 24%,var(--sd-line));
  border-radius:9px;background:linear-gradient(135deg,color-mix(in srgb,var(--tpl-node-color) 8%,var(--sd-card)),var(--sd-card));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)
}
.sd-template-mini-node i{
  width:21px;height:21px;flex:0 0 21px;display:grid;place-items:center;border-radius:7px;
  background:color-mix(in srgb,var(--tpl-node-color) 13%,transparent);color:var(--tpl-node-color);
  font-style:normal;font-size:9px;font-weight:950
}
.sd-template-mini-node b{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--sd-text);
  font-size:8px!important;font-weight:850!important
}
.sd-template-mini-link{flex:0 0 auto;color:var(--sd-muted);font-style:normal;font-size:11px;opacity:.65}
.sd-template-node-more{
  flex:0 0 auto;display:grid;place-items:center;min-width:27px;height:27px;padding:0 6px;border-radius:9px;
  background:rgba(139,92,246,.10);border:1px solid rgba(139,92,246,.14);color:#a78bfa;font-size:8px;font-weight:950
}
.sd-template-card-actions{margin-top:12px!important;gap:7px!important}
.sd-template-card-actions .is-use{
  min-height:38px!important;border:1px solid rgba(196,181,253,.24)!important;border-radius:11px!important;
  display:flex;align-items:center;justify-content:center;gap:6px!important;color:#fff!important;
  background:linear-gradient(135deg,rgba(109,40,217,.94),rgba(139,92,246,.88),rgba(168,85,247,.80))!important;
  box-shadow:0 9px 22px rgba(124,58,237,.18),inset 0 1px 0 rgba(255,255,255,.17)!important
}
.sd-template-card-actions .is-use span{width:21px;height:21px;display:grid;place-items:center;border-radius:7px;background:rgba(255,255,255,.12);font-size:11px}
.sd-template-card-actions .is-use b{font:900 9.5px/1 'Vazirmatn',Tahoma,Arial,sans-serif!important;color:#fff!important}
.sd-template-card-actions .is-use:hover{box-shadow:0 12px 28px rgba(124,58,237,.27),0 0 20px rgba(168,85,247,.09)!important}
.sd-template-card-actions .is-delete{
  flex:0 0 38px!important;min-height:38px!important;border-radius:11px!important;
  color:#fb7185!important;border-color:rgba(244,63,94,.20)!important;background:rgba(244,63,94,.07)!important
}
.sd-template-card-actions .is-delete span{font-size:15px;line-height:1}
.sd-template-empty{
  padding:28px!important;border-radius:17px!important;background:color-mix(in srgb,var(--sd-surface-2) 78%,transparent)!important
}

/* Save-current box */
.sd-template-save-box{
  margin:12px 16px 0!important;border-radius:17px!important;
  border-color:rgba(139,92,246,.20)!important;
  background:linear-gradient(145deg,color-mix(in srgb,var(--sd-card) 96%,#8b5cf6),var(--sd-card))!important;
  box-shadow:0 12px 30px rgba(124,58,237,.08),inset 0 1px 0 rgba(255,255,255,.04)!important
}
.sd-template-save-fields input,.sd-template-save-fields textarea{
  border-radius:12px!important;background:var(--sd-card)!important;border-color:color-mix(in srgb,#8b5cf6 16%,var(--sd-line))!important
}
.sd-template-save-actions button{border-radius:11px!important}
.sd-template-save-actions .is-primary{box-shadow:0 8px 22px rgba(139,92,246,.16)!important}

/* Light theme */
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-card{
  background:linear-gradient(145deg,#fffdfa,#fbf7f4)!important;
  box-shadow:0 12px 30px rgba(90,65,78,.08),inset 0 1px 0 rgba(255,255,255,.9)!important
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-node-preview{
  background:rgba(124,58,237,.025)!important
}
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-mini-node{
  background:#fff!important
}

/* Dark theme */
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-card{
  background:linear-gradient(145deg,#201a22,#19151b)!important;
  border-color:rgba(167,139,250,.13)!important;
  box-shadow:0 15px 34px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.035)!important
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-card:hover{border-color:rgba(167,139,250,.30)!important}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-node-preview{
  background:rgba(255,255,255,.025)!important;border-color:rgba(167,139,250,.10)!important
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-mini-node{
  background:linear-gradient(135deg,color-mix(in srgb,var(--tpl-node-color) 7%,#1c171d),#1c171d)!important
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-content::-webkit-scrollbar-track{background:#171318}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-template-content::-webkit-scrollbar-thumb{border-color:#171318}

/* Mobile */
@media(max-width:800px){
  .sd-template-toolbar{padding:10px!important;gap:8px!important}
  .sd-template-search{flex:1 1 100%!important;min-height:42px!important}
  .sd-template-save-current{flex:1 1 100%!important;min-height:42px!important;font-size:10px!important}
  .sd-template-content{padding:12px 10px 20px!important}
  .sd-template-section+.sd-template-section{margin-top:17px!important;padding-top:16px!important}
  .sd-template-section>header{align-items:flex-start!important}
  .sd-template-grid{grid-template-columns:1fr!important;gap:11px!important}
  .sd-template-card{padding:13px!important;border-radius:18px!important}
  .sd-template-card:hover{transform:none!important}
  .sd-template-card-copy h4{font-size:12px!important}
  .sd-template-card-copy p{min-height:0!important;font-size:9px!important}
  .sd-template-node-preview{margin-top:9px;padding:8px 7px!important}
  .sd-template-node-rail{padding-bottom:3px!important}
  .sd-template-mini-node{max-width:104px;padding:5px 6px!important}
  .sd-template-mini-node b{font-size:7.7px!important}
  .sd-template-card-actions .is-use,.sd-template-card-actions .is-delete{min-height:39px!important}
}
@media(max-width:430px){
  .sd-template-card-icon{width:36px!important;height:36px!important}
  .sd-template-card-meta{gap:5px!important}
  .sd-template-mini-node{max-width:94px}
}

/* MSM Site 1.0.807 — Telegram Direct glass action node */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram{width:116px!important;height:116px!important;min-width:116px!important;min-height:116px!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;display:grid!important;place-items:center!important;isolation:isolate!important;cursor:grab!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram:hover,body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram.is-selected{background:transparent!important;border:0!important;box-shadow:none!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-glass{position:relative!important;z-index:2!important;width:94px!important;height:94px!important;display:grid!important;place-items:center!important;border-radius:31px!important;filter:drop-shadow(0 15px 20px rgba(34,158,217,.26)) drop-shadow(0 4px 7px rgba(0,0,0,.18))!important;transform:rotate(-3deg)!important;transition:transform .18s ease,filter .18s ease!important;pointer-events:none!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-glass::before{content:"";position:absolute;inset:7px;border-radius:27px;border:1px solid rgba(255,255,255,.55);box-shadow:inset 0 1px 0 rgba(255,255,255,.72),inset 0 -8px 18px rgba(0,94,148,.16),0 0 0 4px rgba(255,255,255,.42);pointer-events:none}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-glass svg{width:94px;height:94px;overflow:visible}.sd-telegram-plane{fill:#fff;filter:drop-shadow(0 3px 4px rgba(0,76,119,.20))}.sd-telegram-gloss{fill:rgba(255,255,255,.28)}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram:hover .sd-telegram-glass{transform:rotate(-1deg) scale(1.045)!important;filter:drop-shadow(0 19px 26px rgba(34,158,217,.34)) drop-shadow(0 5px 8px rgba(0,0,0,.20))!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram.is-selected .sd-telegram-glass{transform:rotate(-1deg) scale(1.07)!important;filter:drop-shadow(0 0 9px rgba(75,190,242,.50)) drop-shadow(0 20px 28px rgba(34,158,217,.38))!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-port{z-index:7!important;width:18px!important;height:18px!important;border-width:3px!important;background:#229ED9!important;box-shadow:0 0 0 3px rgba(34,158,217,.14),0 4px 10px rgba(0,0,0,.16)!important}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-port-in{right:-10px!important;left:auto!important;top:50%!important}body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-port-out{left:-10px!important;right:auto!important;top:50%!important}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-port{border-color:#171d22!important}html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-port{border-color:#fff!important}
.sd-telegram-editor{display:grid;gap:10px}.sd-telegram-editor-head{grid-template-columns:52px minmax(0,1fr)!important;align-items:center!important;background:linear-gradient(145deg,rgba(34,158,217,.08),var(--sd-surface))!important;border-color:rgba(34,158,217,.20)!important}.sd-telegram-mini{width:52px;height:52px;display:grid;place-items:center;border-radius:17px;background:linear-gradient(145deg,rgba(80,197,245,.24),rgba(34,158,217,.12));color:#1688c7;font-size:27px;box-shadow:inset 0 0 0 1px rgba(34,158,217,.16),0 8px 20px rgba(34,158,217,.08)}.sd-telegram-editor-head b{display:block;font-size:14px}.sd-telegram-editor-head p{margin:4px 0 0;color:var(--sd-muted);font-size:11px;line-height:1.75}
@media(max-width:800px){body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram{width:104px!important;height:104px!important;min-width:104px!important;min-height:104px!important}body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-glass,body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-glass svg{width:86px!important;height:86px!important}}


/* MSM Site 1.0.809 — Telegram sticker + compact Inspector polish */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram{
  width:116px!important;height:116px!important;min-width:116px!important;min-height:116px!important;
  background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-glass{
  width:100px!important;height:100px!important;border-radius:50%!important;background:transparent!important;
  filter:drop-shadow(0 16px 21px rgba(34,158,217,.28)) drop-shadow(0 4px 7px rgba(0,0,0,.16))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-glass::before{
  content:""!important;position:absolute!important;inset:7px!important;border-radius:50%!important;
  border:1px solid rgba(255,255,255,.62)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82),inset 0 -10px 20px rgba(0,91,145,.12),0 0 0 3px rgba(255,255,255,.44)!important;
  pointer-events:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-glass svg{
  width:100px!important;height:100px!important;display:block!important;overflow:visible!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-orb-outline{
  fill:rgba(255,255,255,.96)!important;
  filter:drop-shadow(0 3px 4px rgba(0,76,119,.14))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-orb{
  stroke:rgba(255,255,255,.30)!important;stroke-width:1!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-plane{
  fill:#fff!important;stroke:rgba(255,255,255,.18)!important;stroke-width:.4!important;
  filter:drop-shadow(0 2px 3px rgba(0,76,119,.18))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-gloss{
  fill:rgba(255,255,255,.34)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram:hover .sd-telegram-glass{
  transform:rotate(-1deg) scale(1.045)!important;
  filter:drop-shadow(0 19px 27px rgba(34,158,217,.34)) drop-shadow(0 5px 8px rgba(0,0,0,.18))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram.is-selected .sd-telegram-glass{
  transform:rotate(-1deg) scale(1.065)!important;
  filter:drop-shadow(0 0 10px rgba(75,190,242,.42)) drop-shadow(0 20px 28px rgba(34,158,217,.34))!important;
}

/* Telegram Inspector: same visual rhythm as the polished Smart Direct panels. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-telegram-node{
  padding:12px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-telegram-node .sd-inspector-head{
  gap:9px!important;padding-bottom:10px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-telegram-node .sd-inspector-head>span{
  width:36px!important;height:36px!important;flex-basis:36px!important;border-radius:11px!important;
  background:linear-gradient(145deg,rgba(103,212,255,.20),rgba(42,171,238,.10))!important;
  color:#1688c7!important;font-size:17px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-telegram-node .sd-inspector-head small{
  font-size:9.5px!important;line-height:1.45!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-telegram-node .sd-inspector-head h3{
  margin:1px 0!important;font-size:14px!important;line-height:1.5!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-telegram-node .sd-inspector-head p{
  font-size:10.3px!important;line-height:1.55!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor{
  gap:8px!important;margin-top:0!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor .sd-editor-card{
  gap:8px!important;padding:11px 12px!important;border-radius:14px!important;
  border-color:color-mix(in srgb,#229ED9 14%,var(--sd-line))!important;
  background:linear-gradient(145deg,color-mix(in srgb,#229ED9 2.5%,var(--sd-card)),var(--sd-card))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor-head{
  grid-template-columns:42px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-mini{
  width:42px!important;height:42px!important;border-radius:50%!important;
  background:linear-gradient(145deg,#67d4ff,#2aabee 56%,#1688c7)!important;
  color:#fff!important;font-size:20px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 -7px 14px rgba(0,91,145,.14),0 7px 18px rgba(34,158,217,.16)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor-head b{
  font-size:12.5px!important;line-height:1.55!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor-head p{
  margin:2px 0 0!important;font-size:9.8px!important;line-height:1.65!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor label{
  gap:5px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor label>span,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor .sd-field-title{
  font-size:10px!important;line-height:1.5!important;font-weight:900!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor input,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor select,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor textarea{
  min-height:38px!important;padding:8px 9px!important;border-radius:10px!important;
  font-size:11.3px!important;line-height:1.65!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor textarea{
  min-height:96px!important;resize:vertical!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor .sd-editor-note{
  padding:8px 9px!important;border-radius:10px!important;font-size:9.4px!important;line-height:1.65!important;
}
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram{
    width:104px!important;height:104px!important;min-width:104px!important;min-height:104px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-glass,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-glass svg{
    width:88px!important;height:88px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-telegram-node{
    padding:10px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-telegram-node .sd-inspector-head>span{
    width:34px!important;height:34px!important;flex-basis:34px!important;font-size:16px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-telegram-node .sd-inspector-head h3{
    font-size:13.5px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector.is-telegram-node .sd-inspector-head p{
    font-size:10px!important;line-height:1.5!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor .sd-editor-card{
    padding:10px!important;gap:7px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor-head{
    grid-template-columns:38px minmax(0,1fr)!important;gap:8px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-mini{
    width:38px!important;height:38px!important;font-size:18px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor-head b{
    font-size:12px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor-head p{
    font-size:9.4px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor label>span{
    font-size:9.8px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor input,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor select,
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor textarea{
    font-size:11px!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor .sd-editor-note{
    font-size:9.2px!important;
  }
}


/* MSM Site 1.0.810 — Telegram final sticker selection + data picker */
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram:hover,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram.is-selected,
html[data-theme="light"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram.is-dragging,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram:hover,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram.is-selected,
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram.is-dragging{
  background:transparent!important;
  border:0!important;
  border-color:transparent!important;
  box-shadow:none!important;
  outline:0!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram:focus,
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram:focus-visible{
  outline:0!important;box-shadow:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-plane-wrap{
  transform-box:view-box;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-data-picker{
  margin:-1px 0 1px;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-data-picker select{
  width:100%!important;
  min-height:36px!important;
  padding:7px 9px!important;
  border:1px dashed rgba(34,158,217,.28)!important;
  border-radius:10px!important;
  background:color-mix(in srgb,#229ED9 5%,var(--sd-card))!important;
  color:var(--sd-text)!important;
  font-size:10.5px!important;
  font-weight:800!important;
  outline:none!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-data-picker select:focus{
  border-style:solid!important;
  border-color:rgba(34,158,217,.48)!important;
  box-shadow:0 0 0 3px rgba(34,158,217,.08)!important;
}
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-data-picker select{
    min-height:35px!important;font-size:10.2px!important;
  }
}


/* MSM Site 1.0.811 — Telegram Live Reply Bridge */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-bridge-box{
  display:grid;gap:8px;padding:9px;border:1px solid rgba(34,158,217,.18);border-radius:12px;
  background:color-mix(in srgb,#229ED9 5%,var(--sd-card));
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-bridge-box label{display:grid;gap:5px}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram.is-live-bridge .sd-port-out{
  background:#f59e0b!important;box-shadow:0 0 0 3px rgba(245,158,11,.16),0 4px 10px rgba(0,0,0,.16)!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-timeout-label{
  position:absolute;left:-11px;top:calc(50% + 16px);transform:translateX(-50%);
  min-width:58px;padding:3px 6px;border:1px solid rgba(245,158,11,.22);border-radius:999px;
  background:var(--sd-card);color:#b45309;font-size:9px;font-weight:900;white-space:nowrap;z-index:8;
  box-shadow:0 4px 10px rgba(0,0,0,.07);
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-timeout-label{color:#fbbf24}
@media(max-width:800px){
 body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-timeout-label{font-size:8.5px;left:-8px}
}

/* MSM Site 1.0.812 — cumulative deploy sync marker for Telegram Live Reply Bridge. */


/* MSM Site 1.0.815 — Telegram Live Reply settings always visible */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor .sd-telegram-bridge-box.is-prominent{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
  position:relative!important;
  gap:9px!important;
  padding:10px!important;
  margin:2px 0 1px!important;
  min-height:0!important;
  border:1px solid rgba(34,158,217,.24)!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,rgba(34,158,217,.08),color-mix(in srgb,#229ED9 3%,var(--sd-card)))!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-bridge-title{
  display:grid!important;
  gap:2px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-bridge-title b{
  font-size:11px!important;
  line-height:1.5!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-bridge-title small{
  color:var(--sd-muted)!important;
  font-size:9.2px!important;
  line-height:1.55!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-bridge-fields{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-bridge-fields select:disabled{
  opacity:.55!important;
  cursor:not-allowed!important;
}
@media(max-width:800px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-bridge-fields{
    grid-template-columns:1fr!important;
  }
}


/* MSM Site 1.0.816 — larger Flow canvas + multi-select */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow{
  min-width:9000px;
  min-height:6400px;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-marquee-select{
  position:absolute;
  z-index:40;
  pointer-events:none;
  border:1px solid rgba(139,92,246,.62);
  border-radius:10px;
  background:rgba(139,92,246,.09);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.45);
  backdrop-filter:blur(1px);
}

/* MSM Site 1.0.817 — cumulative deploy marker: canvas multi-select + CRM Contact State filter. */


/* MSM Site 1.0.818 — Start-node owner command toggle */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-owner-command-toggle{
  display:flex!important;
  align-items:flex-start!important;
  gap:9px!important;
  margin-top:12px!important;
  padding:10px 11px!important;
  border:1px solid rgba(16,185,129,.20)!important;
  border-radius:12px!important;
  background:rgba(16,185,129,.045)!important;
  cursor:pointer!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-owner-command-toggle>input{
  width:17px!important;
  height:17px!important;
  min-width:17px!important;
  margin:2px 0 0!important;
  accent-color:#10b981!important;
  cursor:pointer!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-owner-command-toggle>span{
  display:grid!important;
  gap:2px!important;
  min-width:0!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-owner-command-toggle b{
  font-size:10.8px!important;
  line-height:1.55!important;
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-owner-command-toggle small{
  color:var(--sd-muted)!important;
  font-size:9.2px!important;
  line-height:1.55!important;
}

/* MSM Site 1.0.822 — Telegram Live Bridge dual outputs */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram.is-live-bridge .sd-port-out.is-telegram-continue{
  top:34%!important;background:#22c55e!important;box-shadow:0 0 0 3px rgba(34,197,94,.14),0 4px 10px rgba(0,0,0,.16)!important
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram.is-live-bridge .sd-port-out.is-telegram-timeout{
  top:70%!important;background:#ef4444!important;box-shadow:0 0 0 3px rgba(239,68,68,.14),0 4px 10px rgba(0,0,0,.16)!important
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-port-label{
  position:absolute;z-index:8;left:-82px;min-width:64px;padding:3px 6px;border-radius:999px;
  background:rgba(255,255,255,.94);border:1px solid rgba(90,75,85,.12);box-shadow:0 5px 14px rgba(35,25,32,.10);
  color:#62575e;font-size:9px;font-weight:900;text-align:center;white-space:nowrap;pointer-events:none
}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-port-label.is-continue{top:20%;color:#16803d}
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-port-label.is-timeout{top:57%;color:#c73737}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-port-label{
  background:rgba(29,24,30,.95);border-color:rgba(255,255,255,.12);color:#d9ced6
}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-port-label.is-continue{color:#7ee2a4}
html[data-theme="dark"] body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.sd-node-telegram .sd-telegram-port-label.is-timeout{color:#ff9393}


/* MSM Site 1.0.848 — Telegram Bot Token is not a login password; mask visually without password-manager interception. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-telegram-editor input.sd-secret-text{
  -webkit-text-security:disc;
  text-security:disc;
  letter-spacing:.08em;
}


/* MSM Site 1.0.850 — reusable Custom Telegram bot + premium inline test */
.sd-telegram-custom-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:2px}
.sd-telegram-test-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:8px 14px;border:1px solid rgba(42,171,238,.38);border-radius:12px;background:linear-gradient(135deg,rgba(42,171,238,.18),rgba(15,23,42,.12));color:inherit;cursor:pointer;font:inherit;box-shadow:0 8px 24px rgba(42,171,238,.10),inset 0 1px 0 rgba(255,255,255,.08);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.sd-telegram-test-btn:hover{transform:translateY(-1px);border-color:rgba(42,171,238,.68);box-shadow:0 11px 28px rgba(42,171,238,.16),inset 0 1px 0 rgba(255,255,255,.10)}
.sd-telegram-test-btn:disabled{opacity:.58;cursor:wait;transform:none}
.sd-telegram-test-btn>span{width:24px;height:24px;display:grid;place-items:center;border-radius:8px;background:rgba(42,171,238,.16);box-shadow:0 0 18px rgba(42,171,238,.18)}
.sd-telegram-test-btn>b{font-size:11px;font-weight:800}
.sd-telegram-test-status{font-size:10.5px;line-height:1.7;padding:7px 10px;border-radius:10px;background:rgba(148,163,184,.08);border:1px solid rgba(148,163,184,.14)}
.sd-telegram-test-status.is-success{color:#22c55e;border-color:rgba(34,197,94,.30);background:rgba(34,197,94,.08)}
.sd-telegram-test-status.is-error{color:#ef4444;border-color:rgba(239,68,68,.30);background:rgba(239,68,68,.08)}
@media(max-width:720px){.sd-telegram-custom-actions{align-items:stretch}.sd-telegram-test-btn{width:100%}.sd-telegram-test-status{width:100%;box-sizing:border-box}}


/* MSM Site 1.0.1144 — Flow Builder launched from Smart Agent stays above workspace. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]){
  z-index:120900!important;
}


/* MSM Site 1.0.1202 — desktop Flow Builder render-performance closure. */
@media(min-width:801px){
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow{
    will-change:transform!important;
    backface-visibility:hidden!important;
    contain:layout paint style!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-node.is-dragging{
    transition:none!important;
    will-change:left,top!important;
  }
  body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-inspector-actions{
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    background:var(--sdp-surface)!important;
  }
}


/* MSM Site 1.0.1203 — dynamic Flow canvas; baseline fits ~15 nodes and expands on demand. */
body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow{
  min-width:0!important;
  min-height:0!important;
}


/* MSM Site 1.0.1206 — selected Smart Direct content starts at the top; keep empty state centered. */
.sd-builder>.sd-selection:not([hidden]){
  align-self:start!important;
  justify-self:stretch!important;
}

/* MSM 1.0.1539 — robust emoji fallback inside Smart Direct Flow copy */
#sdStudioModal .sd-node-preview,
#sdStudioModal .sd-node-editor textarea,
#sdStudioModal .sd-node-editor input,
#sdStudioModal .sd-inspector textarea,
#sdStudioModal .sd-inspector input{
  font-family:'Vazirmatn','Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji',Tahoma,Arial,sans-serif!important;
}

/* MSM 1.0.1541 — Planner content-scoped Flow Builder must sit above Planner Preview. */
body>#sdStudioModal.sd-direct-body-portal.is-planner-content-flow:not([hidden]){z-index:121500!important}


/* MSM 1.0.1543 — account-wide comment flow */
.sd-global-comment-card{display:flex;align-items:center;gap:14px;padding:18px;margin:0 0 16px;border:1px solid rgba(168,85,247,.24);border-radius:22px;background:linear-gradient(115deg,rgba(168,85,247,.1),rgba(249,115,22,.08));box-shadow:0 8px 28px rgba(168,85,247,.08)}
.sd-global-comment-icon{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border-radius:15px;background:linear-gradient(135deg,#9333ea,#f97316);color:#fff;font-size:26px;box-shadow:0 5px 18px rgba(147,51,234,.22)}
.sd-global-comment-copy{flex:1;min-width:0}.sd-global-comment-copy h2{margin:0 0 5px;font-size:16px;color:inherit}.sd-global-comment-copy p{margin:0;font-size:12px;line-height:1.9;color:inherit;opacity:.72}
.sd-global-comment-status{flex-shrink:0;padding:5px 11px;border-radius:999px;font-size:11px;background:rgba(120,113,108,.12);color:inherit}.sd-global-comment-status.is-active{background:rgba(16,185,129,.15);color:#059669}
#sdGlobalCommentBtn{flex-shrink:0;background:linear-gradient(135deg,#9333ea,#c026d3);color:#fff;border:1px solid rgba(168,85,247,.35);border-radius:14px;box-shadow:0 6px 20px rgba(147,51,234,.2);transition:transform .2s,box-shadow .2s}
#sdGlobalCommentBtn:hover{transform:translateY(-2px);box-shadow:0 9px 25px rgba(147,51,234,.3)}#sdGlobalCommentBtn:focus-visible{outline:3px solid #c084fc;outline-offset:3px}#sdGlobalCommentBtn:disabled{opacity:.6;cursor:wait}
@media(max-width:720px){.sd-global-comment-card{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:10px;padding:14px;border-radius:18px}.sd-global-comment-icon{width:40px;height:40px;font-size:23px}.sd-global-comment-copy h2{font-size:14px}.sd-global-comment-copy p{font-size:11px}.sd-global-comment-status{font-size:10px;padding:4px 8px}#sdGlobalCommentBtn{grid-column:1/-1;justify-content:center;width:100%;min-height:42px;font-size:12px}}
/* MSM 1.0.1544 — historical unanswered comment runs */
.smart-direct-page .sd-mini-flow-actions .is-backfill{color:#059669!important;border-color:rgba(16,185,129,.3)!important;background:linear-gradient(135deg,rgba(16,185,129,.13),rgba(132,204,22,.08))!important}
.smart-direct-page .sd-mini-flow-actions .is-backfill:disabled{opacity:.45;cursor:not-allowed}
.smart-direct-page .sd-mini-flow-card.is-comment .sd-mini-flow-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.sd-comment-backfill-modal{width:min(620px,92vw);max-height:90dvh;padding:22px;border:1px solid rgba(168,85,247,.25);border-radius:22px;color:var(--text,#292524);background:var(--surface,#fafafa);font-family:inherit;z-index:121600;box-shadow:0 25px 90px #0003}
.sd-comment-backfill-modal::backdrop{background:#0006;backdrop-filter:blur(6px)}
.sd-comment-backfill-modal header,.sd-comment-backfill-modal footer{display:flex;justify-content:space-between;align-items:center;gap:12px}.sd-comment-backfill-modal h2{font-size:18px;margin:0}.sd-comment-backfill-modal p{font-size:12px;line-height:1.9;opacity:.8}.sd-comment-backfill-modal header button{border:0;background:transparent;color:inherit;font-size:26px;cursor:pointer}
.sd-comment-backfill-modal footer{justify-content:flex-start}.sd-comment-backfill-modal footer button{border:1px solid #9333ea55;border-radius:12px;padding:11px 20px;font:inherit;font-size:12px;background:linear-gradient(135deg,#9333ea,#c026d3);color:white;cursor:pointer}.sd-comment-backfill-modal footer button:disabled{opacity:.5}.sd-comment-backfill-modal button[hidden]{display:none}
.sd-comment-backfill-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.sd-comment-backfill-stats span{display:grid;gap:7px;text-align:center;padding:13px 6px;background:rgba(168,85,247,.07);border:1px solid rgba(168,85,247,.12);border-radius:14px}.sd-comment-backfill-stats small{font-size:10px}.sd-comment-backfill-stats b{font-size:20px}
@media(max-width:620px){.sd-comment-backfill-modal{padding:16px}.sd-comment-backfill-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.smart-direct-page .sd-mini-flow-card.is-comment .sd-mini-flow-actions button b{font-size:10px!important;white-space:normal!important}}

/* MSM MCP → Planner Flow: all attached drafts and active flows, RTL-first. */
.sd-studio-modal .sd-planner-flow-picker{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:9px 18px;direction:rtl;border-bottom:1px solid var(--sd-line);background:linear-gradient(110deg,rgba(147,51,234,.08),rgba(6,182,212,.04));z-index:3}
.sd-planner-flow-picker label{font-size:12px;font-weight:800;color:var(--sd-text)}
.sd-planner-flow-picker label small{font-size:11px;font-weight:600;color:var(--sd-muted);margin-inline-start:6px}
.sd-planner-flow-picker select{min-width:min(100%,240px);width:min(100%,440px);min-height:38px;padding:7px 12px;border:1px solid var(--sd-line);border-radius:12px;background:var(--sd-bg);color:var(--sd-text);font:inherit;font-size:12px;font-weight:700;cursor:pointer}
@media(max-width:600px){.sd-studio-modal .sd-planner-flow-picker{padding:8px 12px}.sd-planner-flow-picker select{width:100%}}


/* MSM Mobile Flow Builder: larger touch target + visible dashed live preview.
   Visual port positions, graph math, and desktop stay unchanged. */
@media(max-width:800px){
 body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow .sd-port-out{
   touch-action:none!important;
   -webkit-user-select:none!important;
   user-select:none!important;
   -webkit-tap-highlight-color:transparent;
 }
 body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-flow .sd-port-out::before{
   content:"";
   position:absolute;
   inset:-12px;
   border-radius:50%;
   pointer-events:auto;
   touch-action:none;
 }
 body>#sdStudioModal.sd-direct-body-portal:not([hidden]) .sd-canvas-shell.is-mobile-connecting .sd-edge-preview{
   fill:none!important;
   stroke:#8b5cf6!important;
   stroke-width:4!important;
   stroke-dasharray:10 7!important;
   stroke-linecap:round!important;
   opacity:1!important;
 }
}

/* Catalog R17: premium multi-product Smart Direct order node inspector. */
#sdStudioModal .sd-catalog-order-editor{min-width:0}
#sdStudioModal .sd-order-list{display:grid;gap:9px;max-height:310px;overflow:auto;padding:5px 3px;margin:12px 0}
#sdStudioModal .sd-order-product{display:flex;align-items:center;gap:10px;min-width:0;min-height:66px;padding:10px;border-radius:13px;border:1px solid rgba(151,151,151,.2);background:rgba(135,135,135,.06);transition:background .18s,border-color .18s;cursor:pointer}
#sdStudioModal .sd-order-product.is-selected{border-color:rgba(215,113,32,.58);background:rgba(215,113,32,.10);box-shadow:inset 0 0 25px rgba(215,113,32,.035)}
#sdStudioModal .sd-order-product>input[type="checkbox"]{accent-color:#d97723;width:17px;height:17px;flex-shrink:0}
#sdStudioModal .sd-order-product-main{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0;overflow-wrap:anywhere}
#sdStudioModal .sd-order-product-main b{font-size:13px;line-height:1.5}
#sdStudioModal .sd-order-product-main small{font-size:11px;opacity:.72}
#sdStudioModal .sd-order-product-qty{display:flex;flex-direction:column;gap:2px;align-items:center;flex:0 0 68px}
#sdStudioModal .sd-order-product-qty input{width:65px;min-height:37px;text-align:center;padding:4px;border:1px solid rgba(155,155,155,.25);border-radius:9px;background:rgba(128,128,128,.08);color:inherit}
#sdStudioModal .sd-order-product-qty input:disabled{opacity:.38}
#sdStudioModal .sd-order-summary{display:flex;flex-direction:column;gap:8px;padding:11px 13px;border:1px solid rgba(215,113,32,.22);border-radius:12px;background:rgba(215,113,32,.07);font-size:12px}
#sdStudioModal .sd-order-summary strong{font-weight:700;font-size:14px}
#sdStudioModal .sd-order-note{display:flex;flex-direction:column;gap:7px;margin:13px 0}
#sdStudioModal .sd-order-note textarea{width:100%;background:rgba(128,128,128,.07);border:1px solid rgba(128,128,128,.25);border-radius:11px;color:inherit;font:inherit;padding:10px;resize:vertical}
#sdStudioModal .sd-order-loading{display:flex;flex-wrap:wrap;align-items:center;gap:9px;padding:16px;border-radius:12px;background:rgba(128,128,128,.07);line-height:1.5}
#sdStudioModal .sd-catalog-order-editor :is(input,textarea,button):focus-visible{outline:2px solid #df832b;outline-offset:2px}
@media(max-width:600px){#sdStudioModal .sd-order-list{max-height:40dvh}#sdStudioModal .sd-order-product{gap:8px;padding:9px}#sdStudioModal .sd-order-product-qty{flex-basis:59px}#sdStudioModal .sd-order-product-qty input{width:57px}}
@media(prefers-reduced-motion:reduce){#sdStudioModal .sd-order-product{transition:none}}


/* Catalog R17.1: AI-node-consistent order picker. Scoped to the Catalog node only. */
#sdStudioModal .sd-catalog-order-editor{font-family:Vazirmatn,inherit;font-size:13px;line-height:1.7;min-width:0;color:var(--sd-text)}
#sdStudioModal .sd-order-editor-card{padding:15px!important;gap:11px!important;border-radius:17px!important}
#sdStudioModal .sd-order-hero{display:flex;align-items:center;gap:10px;min-width:0}
#sdStudioModal .sd-order-hero-icon{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:12px;border:1px solid rgba(216,105,46,.2);background:linear-gradient(135deg,rgba(251,146,60,.16),rgba(139,92,246,.12));color:#c05b24;font-size:20px}
#sdStudioModal .sd-order-hero-content{display:flex;flex-direction:column;min-width:0;gap:1px}
#sdStudioModal .sd-order-hero-content b{font-size:14px;line-height:1.6;font-weight:800;letter-spacing:-.1px}
#sdStudioModal .sd-order-hero-content small{font-size:11.5px;color:var(--sd-muted);line-height:1.55}
#sdStudioModal .sd-order-help{margin:0;padding:10px 12px;border:1px solid rgba(168,85,247,.14);background:linear-gradient(145deg,rgba(168,85,247,.055),rgba(249,115,22,.035));border-radius:12px;color:var(--sd-muted);font-size:12px;line-height:1.85}
#sdStudioModal .sd-order-list{margin:2px 0;max-height:min(320px,40dvh);padding:3px 2px;gap:8px;scrollbar-width:thin}
#sdStudioModal .sd-order-product{min-height:59px;border-radius:12px;padding:9px 10px;gap:10px;box-shadow:none}
#sdStudioModal .sd-order-product.is-selected{border-color:rgba(217,113,35,.48);background:linear-gradient(125deg,rgba(249,115,22,.09),rgba(168,85,247,.045));box-shadow:0 4px 14px rgba(126,66,33,.045)}
#sdStudioModal .sd-order-product-main b{font-size:12.8px;font-weight:760;line-height:1.65}
#sdStudioModal .sd-order-product-main small{font-size:11.5px;opacity:.8}
#sdStudioModal .sd-order-product-qty{flex-basis:64px;gap:2px}
#sdStudioModal .sd-order-product-qty small{font-size:11px}
#sdStudioModal .sd-order-product-qty input{width:62px;min-height:36px;font-size:12.5px;font-family:inherit}
#sdStudioModal .sd-order-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;min-height:144px;padding:17px 12px;border:1px solid var(--sd-line);border-radius:15px;background:linear-gradient(145deg,rgba(168,85,247,.045),rgba(249,115,22,.045))}
#sdStudioModal .sd-order-state strong{font-size:13.5px;line-height:1.6;font-weight:800}
#sdStudioModal .sd-order-state p{margin:0;color:var(--sd-muted);font-size:12px;line-height:1.75;max-width:31ch}
#sdStudioModal .sd-order-state-icon{display:grid;place-items:center;width:33px;height:33px;border-radius:11px;color:#bc632d;background:rgba(240,123,51,.10);border:1px solid rgba(240,123,51,.18);font-size:17px;font-weight:800}
#sdStudioModal .sd-order-state-error{border-color:rgba(225,137,74,.2)}
#sdStudioModal .sd-order-retry{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:37px;padding:7px 17px;border:1px solid rgba(226,111,44,.3)!important;border-radius:11px!important;background:linear-gradient(115deg,#e8742b,#c96068)!important;color:#fff!important;font-family:inherit!important;font-size:12.5px!important;font-weight:750!important;line-height:1.6;box-shadow:0 4px 13px rgba(203,91,52,.13);cursor:pointer;transition:filter .16s,transform .16s}
#sdStudioModal .sd-order-retry:hover{filter:brightness(1.06);transform:translateY(-1px)}
#sdStudioModal .sd-order-retry:active{transform:translateY(0)}
#sdStudioModal .sd-order-retry span{font-size:16px;line-height:1}
#sdStudioModal .sd-order-skeleton{display:grid;gap:8px;width:min(100%,280px)}
#sdStudioModal .sd-order-skeleton i{display:block;height:12px;border-radius:6px;background:linear-gradient(100deg,rgba(163,138,179,.12),rgba(236,157,116,.26),rgba(163,138,179,.12));background-size:250% 100%;animation:sd-order-shimmer 1.6s ease-in-out infinite}
#sdStudioModal .sd-order-skeleton i:nth-child(2){width:85%}#sdStudioModal .sd-order-skeleton i:nth-child(3){width:66%}
@keyframes sd-order-shimmer{to{background-position-x:-250%}}
#sdStudioModal .sd-order-summary{gap:5px;padding:11px 13px;border-radius:12px;font-size:11.5px;line-height:1.65}
#sdStudioModal .sd-order-summary strong{font-size:13px;line-height:1.65}
#sdStudioModal .sd-order-summary strong bdi{font-size:13px;white-space:nowrap;unicode-bidi:isolate}
#sdStudioModal .sd-order-note{gap:7px;margin:2px 0}
#sdStudioModal .sd-order-note>span{font-size:12.5px;font-weight:750}
#sdStudioModal .sd-order-note textarea{font-size:12.5px!important;line-height:1.7!important;min-height:65px;border-radius:12px;padding:10px 11px}
#sdStudioModal .sd-order-footnote{font-size:11.5px;color:var(--sd-muted);line-height:1.7;margin:0}
html[data-theme="dark"] #sdStudioModal .sd-order-hero-icon{color:#fdba74}
@media(max-width:600px){
 #sdStudioModal .sd-order-editor-card{padding:11px!important;gap:9px!important}
 #sdStudioModal .sd-order-hero-content b{font-size:13.5px}
 #sdStudioModal .sd-order-hero-content small{font-size:11px}
 #sdStudioModal .sd-order-help{font-size:12px;padding:9px 10px;line-height:1.75}
 #sdStudioModal .sd-order-list{max-height:32dvh}
 #sdStudioModal .sd-order-product{min-height:57px;padding:8px}
 #sdStudioModal .sd-order-state{min-height:130px;padding:12px 10px;gap:8px}
 #sdStudioModal .sd-order-state p{font-size:11.7px}
 #sdStudioModal .sd-order-summary strong{font-size:12.5px}
}
@media(prefers-reduced-motion:reduce){#sdStudioModal .sd-order-skeleton i{animation:none}#sdStudioModal .sd-order-retry{transition:none}}


/* R18 shared catalog picker: compact, native searchable multi/single-select. */
#sdStudioModal .sd-product-picker-editor{min-width:0;font-family:Vazirmatn,inherit}
#sdStudioModal .sd-pp-search-wrap{display:flex;align-items:center;gap:9px;min-height:42px;padding:0 12px;border:1px solid color-mix(in srgb,#aa71d9 28%,var(--sd-line));border-radius:12px;background:color-mix(in srgb,#a855f7 3%,var(--sd-card));transition:border-color .15s,box-shadow .15s}
#sdStudioModal .sd-pp-search-wrap:focus-within{border-color:rgba(174,95,222,.66);box-shadow:0 0 0 3px rgba(168,85,247,.075)}
#sdStudioModal .sd-pp-search-wrap input{flex:1;min-width:0;width:100%;border:0!important;box-shadow:none!important;outline:0!important;background:transparent!important;color:var(--sd-text)!important;font:inherit!important;font-size:12.8px!important;padding:10px 0!important}
#sdStudioModal .sd-pp-search-icon{font-size:22px;color:#ad63db;line-height:1}
#sdStudioModal .sd-pp-search-chevron{color:var(--sd-muted);font-size:19px}
#sdStudioModal .sd-pp-dropdown{border:1px solid var(--sd-line);border-radius:14px;background:var(--sd-card);box-shadow:0 12px 36px rgba(66,35,72,.12);overflow:hidden;max-height:340px;overflow-y:auto;scrollbar-width:thin}
#sdStudioModal .sd-pp-dropdown-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 12px;border-bottom:1px solid var(--sd-line);font-size:11.5px;font-weight:700;color:var(--sd-muted)}
#sdStudioModal .sd-pp-dropdown-head button{appearance:none;display:grid;place-items:center;width:28px;height:28px;min-height:28px;border:0;border-radius:9px;background:rgba(149,128,156,.08);color:var(--sd-muted);font-size:17px;cursor:pointer}
#sdStudioModal .sd-pp-option{display:flex;align-items:center;gap:9px;margin:0;padding:9px 11px;border-bottom:1px solid color-mix(in srgb,var(--sd-line) 55%,transparent);background:transparent;min-height:59px;cursor:pointer;transition:background .15s}
#sdStudioModal .sd-pp-option:hover,#sdStudioModal .sd-pp-option.is-picked{background:linear-gradient(105deg,rgba(168,85,247,.065),rgba(249,115,22,.05))}
#sdStudioModal .sd-pp-option>input[type="checkbox"]{width:17px;height:17px;flex-shrink:0;accent-color:#b96a46}
#sdStudioModal .sd-pp-thumb{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;overflow:hidden;border-radius:10px;background:linear-gradient(135deg,rgba(168,85,247,.11),rgba(249,115,22,.1));color:#9966c5;font-size:19px}
#sdStudioModal .sd-pp-thumb img{width:100%;height:100%;object-fit:cover}
#sdStudioModal .sd-pp-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere}
#sdStudioModal .sd-pp-info b{font-size:12.6px;line-height:1.5;font-weight:750}
#sdStudioModal .sd-pp-info small{font-size:11px;line-height:1.5;color:var(--sd-muted)}
#sdStudioModal .sd-pp-price{font-size:11px;color:var(--sd-muted);white-space:nowrap}
#sdStudioModal .sd-pp-selected{display:grid;gap:8px}
#sdStudioModal .sd-pp-selected-head{display:flex;justify-content:space-between;gap:8px;font-size:12px;align-items:center}
#sdStudioModal .sd-pp-selected-head span{font-size:11px;color:var(--sd-muted)}
#sdStudioModal .sd-pp-selected-row{display:flex;align-items:center;gap:9px;padding:9px;border:1px solid color-mix(in srgb,#b96bcb 20%,var(--sd-line));border-radius:12px;background:linear-gradient(110deg,rgba(168,85,247,.035),rgba(249,115,22,.035));min-width:0}
#sdStudioModal .sd-pp-remove{appearance:none;display:grid;place-items:center;flex-shrink:0;width:30px;height:30px;min-height:30px;border-radius:9px;border:1px solid rgba(232,94,114,.15);background:rgba(226,83,95,.07);color:#bd5262;font-size:17px;cursor:pointer}
#sdStudioModal .sd-pp-qty{display:flex;flex:0 0 61px;flex-direction:column;gap:3px;align-items:center}
#sdStudioModal .sd-pp-qty span{font-size:10.5px;color:var(--sd-muted)}
#sdStudioModal .sd-pp-qty input{width:59px;min-height:34px;text-align:center;border:1px solid var(--sd-line);border-radius:9px;background:rgba(134,118,137,.06);color:var(--sd-text);font-size:12px}
#sdStudioModal .sd-pp-empty-selected,#sdStudioModal .sd-pp-empty,#sdStudioModal .sd-pp-loader{margin:0;padding:14px 12px;border-radius:11px;background:rgba(151,131,157,.05);color:var(--sd-muted);font-size:12px;text-align:center}
#sdStudioModal .sd-pp-failure{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;padding:15px;font-size:12px;color:var(--sd-muted)}
#sdStudioModal .sd-pp-field{display:grid;gap:6px}
#sdStudioModal .sd-pp-field>span{font-size:12px;font-weight:700}
#sdStudioModal .sd-pp-field>small{font-size:11px;color:var(--sd-muted)}
#sdStudioModal .sd-pp-field input{width:100%;min-width:0;min-height:38px;border:1px solid var(--sd-line);border-radius:10px;background:rgba(130,121,134,.055);font-size:12.5px;color:var(--sd-text);padding:9px}
#sdStudioModal .sd-pp-selected-row :is(input,button):focus-visible,#sdStudioModal .sd-pp-dropdown :is(input,button):focus-visible{outline:2px solid #a855f7;outline-offset:2px}
@media(max-width:600px){#sdStudioModal .sd-pp-dropdown{max-height:30dvh}#sdStudioModal .sd-pp-option{padding:8px}#sdStudioModal .sd-pp-price{font-size:10.5px}#sdStudioModal .sd-pp-thumb{width:38px;height:38px;flex-basis:38px}#sdStudioModal .sd-pp-selected-row{gap:7px;padding:8px}#sdStudioModal .sd-pp-search-wrap input{font-size:12px!important}}
@media(prefers-reduced-motion:reduce){#sdStudioModal .sd-pp-option{transition:none}}

/* Catalog R19: independent card actions, compact and touch friendly. */
#sdStudioModal .sd-pp-selected-entry{display:grid;gap:0;min-width:0;overflow:hidden;border:1px solid color-mix(in srgb,#b96bcb 22%,var(--sd-line));border-radius:13px;background:linear-gradient(115deg,rgba(168,85,247,.035),rgba(249,115,22,.025))}
#sdStudioModal .sd-pp-selected-entry>.sd-pp-selected-row{border:0;border-radius:0;background:transparent}
#sdStudioModal .sd-pp-card-settings{display:grid;gap:9px;padding:0 11px 12px;min-width:0}
#sdStudioModal .sd-pp-card-settings-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;padding-block:7px;border-top:1px solid var(--sd-line)}
#sdStudioModal .sd-pp-card-settings-head strong{font-size:11.5px;font-weight:750;color:var(--sd-text)}
#sdStudioModal .sd-pp-no-photo{font-size:10px;color:#b36c26;padding:3px 7px;border-radius:9px;background:rgba(235,153,46,.09)}
#sdStudioModal .sd-pp-card-settings .sd-pp-field{min-width:0}
#sdStudioModal .sd-pp-card-settings .sd-pp-field input{min-height:39px}
@media(min-width:720px){#sdStudioModal .sd-pp-card-settings{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);column-gap:10px}#sdStudioModal .sd-pp-card-settings-head{grid-column:1/-1}}
@media(max-width:600px){#sdStudioModal .sd-pp-card-settings{padding:0 9px 10px}#sdStudioModal .sd-pp-card-settings .sd-pp-field input{font-size:12px!important}}

/* MAGIC COMMERCE R35 — accessible opt-in inline cart actions on product cards. */
#sdStudioModal .sd-pp-cart-toggle{display:flex;align-items:center;gap:10px;margin:12px 4px 2px;padding:11px 13px;border:1px solid rgba(227,132,48,.23);border-radius:12px;background:rgba(227,132,48,.065);color:inherit;font:750 12px/1.7 Vazirmatn,Tahoma,sans-serif;cursor:pointer}
#sdStudioModal .sd-pp-cart-toggle input{inline-size:19px;block-size:19px;min-inline-size:19px;accent-color:#d78030;cursor:pointer}
#sdStudioModal .sd-pp-cart-toggle:focus-within{outline:2px solid #dc883c;outline-offset:2px}
@media(max-width:600px){#sdStudioModal .sd-pp-cart-toggle{font-size:11.5px;padding:10px;line-height:1.6}}
