/* Social Hub owns this layout. Shared canvas/export/project engines stay unchanged. */
body.smart-tool-workspace.demo-social-scope{--social-accent:#6750d7;--social-soft:#eeeafa;--social-line:#dce2ed;--social-paper:#fff;--social-bg:#f5f6fa;--social-ink:#253149;--social-muted:#66728b;background:var(--social-bg)!important}
html[data-theme=dark] body.smart-tool-workspace.demo-social-scope{--social-accent:#b5a5ff;--social-soft:#302943;--social-line:#344057;--social-paper:#1a2232;--social-bg:#121926;--social-ink:#eff3fb;--social-muted:#acb8cd}
body.smart-tool-workspace.demo-social-scope .demo-main{max-width:1920px!important;padding:16px!important}
#socialWorkbench{width:100%!important;margin:0!important;color:var(--social-ink);font-size:14px;isolation:isolate}
#socialWorkbench button,#socialWorkbench input,#socialWorkbench textarea,#socialWorkbench select,#socialWorkbench summary{font:inherit;box-sizing:border-box}
#socialWorkbench button,#socialWorkbench summary{cursor:pointer}
#socialWorkbench button:disabled{cursor:default;opacity:.45}
#socialWorkbench :focus-visible{outline:2px solid var(--social-accent);outline-offset:3px}
#socialWorkbench [hidden]{display:none!important}
#socialWorkbench .social-projectbar{display:flex;align-items:center;flex-wrap:wrap;gap:14px;padding:14px 18px;background:var(--social-paper);border:1px solid var(--social-line);border-radius:16px 16px 0 0}
#socialWorkbench .social-brand{display:flex;align-items:center;gap:10px;flex:none;min-width:160px}
#socialWorkbench .social-brand>span{display:grid;place-items:center;width:42px;height:42px}
#socialWorkbench .social-brand>div{display:grid;gap:2px}
#socialWorkbench .social-brand strong{font-size:17px;letter-spacing:-.4px}
#socialWorkbench .social-brand small{font-size:11px;color:var(--social-muted)}
#socialWorkbench .social-project-label{display:grid;gap:2px;min-width:150px;max-width:320px;flex:1 1 190px}
#socialWorkbench .social-project-label>span{font-size:10px;font-weight:700;color:var(--social-muted)}
#socialWorkbench #socialProject{width:100%;min-height:44px;border:0;border-bottom:1px solid var(--social-line);border-radius:0;background:transparent;color:var(--social-ink);padding:4px 0;text-align:start;font-weight:700}
#socialWorkbench .social-project-actions{margin-inline-start:auto;display:flex!important;align-items:center!important;gap:8px!important;max-width:100%!important;flex-wrap:wrap!important}
#socialWorkbench .social-project-actions>.btn{min-height:44px!important;min-width:44px!important;font-size:12px!important;padding:8px 12px!important;border-radius:9px!important;border:1px solid var(--social-line)!important;background:var(--social-paper)!important;color:var(--social-ink)!important;white-space:nowrap!important}
#socialWorkbench #socialSaveProject{background:var(--social-soft)!important;color:var(--social-accent)!important;border-color:var(--social-soft)!important}
#socialWorkbench .suite-cloud-bar{display:flex;align-items:center;gap:6px;margin:0;padding:0;flex-wrap:wrap}
#socialWorkbench .suite-cloud-choice{height:44px;max-width:170px;min-width:0;font-size:12px;color:var(--social-muted);background:var(--social-paper);border:1px solid var(--social-line);border-radius:9px;padding:8px}
#socialWorkbench .suite-drive-connect{min-height:44px;font-size:12px}
#socialWorkbench .social-commandbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 16px;border:1px solid var(--social-line);border-top:0;background:var(--social-paper);position:relative;z-index:10}
#socialWorkbench .social-history{display:flex;align-items:center;gap:4px;min-width:0}
#socialWorkbench .social-icon-button{width:44px;height:44px;border:0;border-radius:9px;background:transparent;color:var(--social-ink);font-size:22px}
#socialWorkbench .social-icon-button:hover{background:var(--social-soft)}
#socialWorkbench .social-workspace-note{font-size:12px;color:var(--social-muted);margin-inline-start:12px}
#socialWorkbench .social-export{position:relative;flex:none}
#socialWorkbench .social-export summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 18px;border-radius:10px;background:#6750d7;color:white;font-weight:700}
#socialWorkbench .social-export summary::-webkit-details-marker{display:none}
#socialWorkbench .social-export-options{position:absolute;inset-inline-end:0;top:calc(100% + 8px);width:236px;max-width:calc(100vw - 40px);padding:8px;background:var(--social-paper);border:1px solid var(--social-line);border-radius:13px;box-shadow:0 12px 36px #17233b26;display:grid;gap:4px}
#socialWorkbench .social-export-options button{display:flex;justify-content:flex-start;gap:12px;min-height:48px;border:0;border-radius:8px;padding:10px;text-align:start;background:transparent;color:var(--social-ink)}
#socialWorkbench .social-export-options button:hover{background:var(--social-soft)}
#socialWorkbench .social-export-options small{display:block;margin-top:2px;font-size:10px;font-weight:400;color:var(--social-muted)}
#socialWorkbench .social-editor-grid{display:grid;grid-template-columns:76px 312px minmax(0,1fr);grid-template-areas:'rail inspector canvas';min-height:680px;border:1px solid var(--social-line);border-top:0;border-radius:0 0 16px 16px;overflow:clip;background:var(--social-paper)}
#socialWorkbench .social-toolrail{grid-area:rail;display:flex;flex-direction:column;gap:8px;padding:14px 6px;border-inline-end:1px solid var(--social-line)}
#socialWorkbench .social-toolrail button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:68px;width:100%;border:0;border-radius:10px;background:transparent;color:var(--social-muted);font-size:11px;font-weight:600}
#socialWorkbench .social-toolrail button[aria-selected=true]{background:var(--social-soft);color:var(--social-accent)}
#socialWorkbench .social-inspector{grid-area:inspector;min-width:0;padding:18px;border-inline-end:1px solid var(--social-line)}
#socialWorkbench .social-inspector-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:20px}
#socialWorkbench .social-inspector-heading h2{font-size:16px;margin:0;font-weight:800}
#socialWorkbench #socialLayerCount{font-size:10px;background:var(--social-bg);color:var(--social-muted);padding:4px 8px;border-radius:6px;white-space:nowrap}
#socialWorkbench .social-panel{display:flex;flex-direction:column;gap:20px;min-width:0}
#socialWorkbench .social-field-group{display:grid;gap:12px}
#socialWorkbench h3{font-size:12px;margin:0;font-weight:700;color:var(--social-muted)}
#socialWorkbench .form-field{display:grid;gap:7px;margin:0;font-size:12px;text-align:start;color:var(--social-muted)}
#socialWorkbench .form-field :is(input,textarea){width:100%;min-width:0;min-height:46px;padding:11px 12px;background:var(--social-bg);border:1px solid var(--social-line);border-radius:10px;color:var(--social-ink);text-align:start;line-height:1.7}
#socialWorkbench .form-field textarea{min-height:148px;resize:vertical}
#socialWorkbench .social-add-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#socialWorkbench .social-add-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:78px;border:1px solid var(--social-line);border-radius:11px;background:var(--social-paper);color:var(--social-ink);font-size:11px}
#socialWorkbench .social-add-grid button:hover{border-color:var(--social-accent);background:var(--social-soft)}
#socialWorkbench .social-delete{color:#b74755!important}
#socialWorkbench .social-canvas-area{grid-area:canvas;display:flex;flex-direction:column;min-width:0;background:var(--social-bg);position:sticky;top:12px;align-self:start}
#socialWorkbench .social-canvas-heading,#socialWorkbench .social-canvas-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;color:var(--social-muted);font-size:11px}
#socialWorkbench #socialSizeBadge{position:static;display:inline-block;padding:4px 8px;background:var(--social-paper);border:1px solid var(--social-line);border-radius:6px;color:var(--social-ink);font-size:10px;font-weight:600}
body.smart-tool-workspace.demo-social-scope #socialWorkbench #socialStage{display:flex;justify-content:center;align-items:center;position:relative;box-sizing:border-box;height:clamp(440px,66dvh,820px)!important;min-height:0!important;border:0!important;border-radius:0!important;padding:24px!important;overflow:hidden;background:radial-gradient(var(--social-line) .8px,transparent .8px) 0 0/14px 14px,var(--social-bg)!important}
body.smart-tool-workspace.demo-social-scope #socialWorkbench #socialCanvas{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;box-shadow:0 16px 40px #17233b26;border-radius:2px;object-fit:contain;touch-action:none}
#socialWorkbench .social-canvas-footer>span{display:flex;align-items:center;gap:6px;line-height:1.7}
#socialWorkbench #socialFit{display:flex;align-items:center;gap:6px;min-height:44px;padding:6px 10px;border:1px solid var(--social-line);border-radius:8px;background:var(--social-paper);color:var(--social-ink);white-space:nowrap}
#socialWorkbench .social-panel-note{font-size:12px;color:var(--social-muted);line-height:1.8;margin:0}
#socialWorkbench .social-preset-grid,#socialWorkbench .social-pattern-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#socialWorkbench .cre-chip{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:84px;padding:10px 6px;border:1px solid var(--social-line);border-radius:10px;background:var(--social-bg);color:var(--social-ink);text-align:center;font-size:11px;line-height:1.6}
#socialWorkbench .cre-chip.is-active{border-color:var(--social-accent);background:var(--social-soft);box-shadow:0 0 0 1px var(--social-accent)}
#socialWorkbench .social-format-preview{width:44px;height:40px;display:flex;align-items:center;justify-content:center}
#socialWorkbench .social-format-preview i{display:block;border:2px solid currentColor;border-radius:3px;max-width:42px;max-height:38px;background:color-mix(in srgb,currentColor 8%,transparent)}
#socialWorkbench .social-preset-dim{font-size:9px;color:var(--social-muted);font-weight:400;direction:ltr}
#socialWorkbench .social-swatch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#socialWorkbench .social-swatch-grid .cre-chip{min-height:70px;font-size:10px}
#socialWorkbench .cre-chip-swatch{width:32px;height:24px;border-radius:6px;border:1px solid #ffffff55}
#socialWorkbench .cre-chip-pattern{width:100%;height:34px;border-radius:5px}
#socialWorkbench .social-assistant{display:grid;gap:9px;padding:14px;background:var(--social-soft);border-radius:12px}
#socialWorkbench .social-assistant strong{display:flex;gap:7px;align-items:center;font-size:12px}
#socialWorkbench .social-assistant p{font-size:11px;color:var(--social-muted);line-height:1.8;margin:0}
#socialWorkbench .social-assistant button{min-height:44px;background:var(--social-paper);color:var(--social-accent);border:1px solid var(--social-line);border-radius:8px}
#socialWorkbench #socialRibbon .cre-studio-toolbar{padding:0;border:0;margin:0;background:transparent;gap:12px}
#socialWorkbench #socialRibbon .cre-studio-toolbar :is(button,select,input){min-height:44px;height:auto!important;color:var(--social-ink);background:var(--social-bg);border-color:var(--social-line)}
#socialWorkbench #socialRibbon .cre-studio-toolbar button{width:44px;min-width:44px}
#socialWorkbench #socialRibbon .cre-studio-toolbar input[type=color]{padding:4px;min-width:44px;width:44px}
#socialWorkbench #socialRibbon .cre-studio-toolbar input[type=range]{padding:0;min-height:44px}
#socialWorkbench .social-layers-dock{position:static;width:100%;min-width:0}
#socialWorkbench .social-layers-dock .cre-layers-pop{position:static;width:100%;padding:0;background:transparent;border:0;box-shadow:none;direction:inherit}
#socialWorkbench .cre-layers-dnd{max-height:none;gap:10px;overflow:visible}
#socialWorkbench .cre-layers-item{padding:8px;background:var(--social-bg);border-color:var(--social-line);color:var(--social-ink);flex-wrap:wrap;font-size:12px}
#socialWorkbench .cre-layers-label{flex:1;min-width:100px;overflow-wrap:anywhere;line-height:1.7}
#socialWorkbench .cre-layers-actions{display:flex;gap:4px;margin-inline-start:auto}
#socialWorkbench .cre-layer-btn{width:44px;height:44px;background:var(--social-paper);color:var(--social-ink);border:1px solid var(--social-line);border-radius:8px}
#socialWorkbench .cre-layers-hint{font-size:11px;line-height:1.8;color:var(--social-muted)}
@media(min-width:761px){#socialWorkbench .social-inspector{max-height:calc(66dvh + 120px);min-height:680px;overflow-y:auto;scrollbar-width:thin}}
@media(max-width:1100px){#socialWorkbench .social-editor-grid{grid-template-columns:68px 280px minmax(0,1fr)}#socialWorkbench .social-projectbar{gap:10px}#socialWorkbench .social-project-actions{flex:1 1 100%;margin:0}#socialWorkbench .social-inspector{padding:14px}#socialWorkbench .social-canvas-heading,#socialWorkbench .social-canvas-footer{padding:12px}}
@media(max-width:760px){body.smart-tool-workspace.demo-social-scope .demo-main{padding:8px!important}#socialWorkbench .social-projectbar{padding:12px;border-radius:12px 12px 0 0;gap:12px}#socialWorkbench .social-brand{min-width:100px}#socialWorkbench .social-brand strong{font-size:15px}#socialWorkbench .social-brand>span{width:32px;height:32px}#socialWorkbench .social-brand>span svg{width:32px;height:32px}#socialWorkbench .social-project-label{flex:1;min-width:120px}#socialWorkbench .social-project-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%!important;gap:8px!important}#socialWorkbench .social-project-actions>.btn{width:100%!important;justify-content:center!important;font-size:11px!important;padding:8px!important}#socialWorkbench .social-project-actions .suite-cloud-bar{grid-column:1/-1;grid-row:2;display:flex;justify-content:space-between}#socialWorkbench .suite-cloud-choice{flex:1;max-width:100%;font-size:12px}#socialWorkbench .social-commandbar{padding:7px 10px}#socialWorkbench .social-workspace-note{display:none}#socialWorkbench .social-editor-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:'canvas' 'rail' 'inspector';min-height:0}#socialWorkbench .social-toolrail{position:sticky;top:0;z-index:5;flex-direction:row;padding:6px;gap:4px;border:0;border-block:1px solid var(--social-line);background:var(--social-paper)}#socialWorkbench .social-toolrail button{flex:1;min-width:0;min-height:62px;gap:4px}#socialWorkbench .social-inspector{border:0;padding:18px}#socialWorkbench .social-inspector-heading{margin-bottom:16px}#socialWorkbench .social-canvas-area{position:static}body.smart-tool-workspace.demo-social-scope #socialWorkbench #socialStage{height:clamp(260px,36dvh,400px)!important;padding:24px!important}#socialWorkbench .social-canvas-heading{padding:12px}#socialWorkbench .social-canvas-footer{padding:6px 12px;font-size:10px}#socialWorkbench .social-canvas-footer>span{max-width:75%}#socialWorkbench .social-add-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#socialWorkbench .social-preset-grid,#socialWorkbench .social-pattern-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#socialWorkbench .social-swatch-grid{grid-template-columns:repeat(4,minmax(0,1fr))}#socialWorkbench .social-preset-grid .cre-chip{font-size:10px}#socialWorkbench .form-field textarea{min-height:120px}}
@media(max-width:360px){#socialWorkbench .social-brand small{display:none}#socialWorkbench .social-brand{min-width:90px}#socialWorkbench .social-projectbar{gap:8px}#socialWorkbench .social-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#socialWorkbench .social-swatch-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Override the older generic four-command phone grid only for this editor. */
@media(min-width:761px) and (max-width:1100px){#socialWorkbench .social-project-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important}#socialWorkbench .social-project-actions>.btn{width:100%!important;justify-content:center!important}#socialWorkbench .social-project-actions>.suite-cloud-bar{width:100%;justify-content:center}#socialWorkbench .suite-cloud-choice{max-width:100%;width:100%}body.smart-tool-workspace.demo-social-scope #socialWorkbench #socialStage{height:clamp(340px,55dvh,640px)!important}}
@media(max-width:760px){#socialWorkbench .social-project-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
body.demo-social-scope :is(#creShapeModal,#creIconModal) .cre-icon-close{width:44px;height:44px;border-radius:8px}
body.demo-social-scope :is(#creShapeModal,#creIconModal) .cre-icon-dialog{max-height:calc(100dvh - 32px);max-width:calc(100vw - 24px);overflow:auto}
body.demo-social-scope :is(#creShapeModal,#creIconModal) .cre-icon-dialog>header{position:sticky;top:0;background:var(--social-paper);z-index:1}
#socialWorkbench .cre-chip.is-active{background:var(--social-soft)!important;color:var(--social-accent)!important}
#socialWorkbench .cre-chip.is-active .social-preset-dim{color:var(--social-ink)}
body.demo-social-scope :is(#creShapeModal,#creIconModal) .cre-icon-btn{background:#f5f6fa!important;border-color:#dce2ed!important;color:#253149}
