/* Background Remover studio. One navigation system, contextual controls, canvas first. */
.bg-workspace{--studio-accent:#369dff;--studio-radius:12px;font-family:Inter,Arial,sans-serif}
.bg-workspace .ah-root{height:54px;min-height:54px;z-index:45}
.bg-workspace .ah-root .wrap.nav{height:54px;min-height:54px;padding:8px 20px;gap:14px;position:relative}
.bg-workspace header .logo img{width:132px;height:auto;max-width:132px}
.bg-workspace header .nav-links,.bg-workspace #settingsBtn{display:none}
.bg-workspace header .ant-nav-actions{margin-left:auto}
.bg-workspace .bg-header-title{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:13px;font-weight:600;letter-spacing:-.02em;white-space:nowrap;pointer-events:none}
.bg-workspace #studioFilename{display:none!important}
.bg-workspace .bg-layout{position:relative;grid-template-columns:82px minmax(0,1fr) 296px;grid-template-rows:minmax(0,1fr);grid-template-areas:'tools canvas inspector';gap:0;isolation:isolate}
.bg-workspace .bg-main{grid-area:canvas;position:relative;min-width:0;min-height:0}
.bg-workspace .bg-toolrail{grid-area:tools;display:block;padding:14px 7px;overflow:auto;border-right:1px solid var(--ant-line);background:var(--ant-surface);z-index:32}
.bg-workspace .bg-inspector-tabs{display:flex;flex-direction:column;position:static;border:0;margin:0;padding:0;background:transparent;gap:8px}
.bg-workspace .bg-inspector-tabs button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:7px;flex:none;width:66px;min-width:0;height:64px;min-height:64px;border:1px solid transparent;padding:8px 2px;margin:0;background:transparent;color:var(--ant-muted);border-radius:12px;font-size:10px;font-weight:500;cursor:pointer}
.bg-workspace .bg-inspector-tabs button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;display:block}
.bg-workspace .bg-inspector-tabs button[aria-selected=true]{background:#369dff18;border-color:#369dff30;color:#76bcff;box-shadow:none}
.bg-workspace .bg-inspector-tabs button:hover:not(:disabled){background:#369dff12;color:var(--ant-ink)}
.bg-workspace .bg-inspector-tabs button:disabled{opacity:.35;cursor:not-allowed}
.bg-workspace .bg-panel{grid-area:inspector;display:flex;flex-direction:column;overflow:hidden;min-height:0;height:auto;max-height:none;border-left:1px solid var(--ant-line);border-top:0;background:var(--ant-surface);padding:0;z-index:30}
.bg-workspace .bg-panel-title{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:12px;min-height:76px;padding:18px 20px;border-bottom:1px solid var(--ant-line)}
.bg-workspace .bg-panel-title h2{font-size:15px;line-height:1.4;letter-spacing:-.025em;margin:0 0 5px}
.bg-workspace .bg-panel-title p{font-size:11px;line-height:1.5;margin:0;max-width:235px;color:var(--ant-muted)}
.bg-workspace .bg-close-panel{display:none}
.bg-workspace .bg-panel>[role=tabpanel]{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;flex:1;min-height:0;padding:0 0 20px;scrollbar-width:thin;scroll-padding:16px}
.bg-workspace .bg-panel-section{min-width:0;border:0;border-radius:0;margin:0;padding:20px!important;border-bottom:1px solid var(--ant-line);background:transparent}
.bg-workspace .bg-panel-section:last-child{border-bottom:0}
.bg-workspace .bg-panel-section h3{font-size:12px;font-weight:600;letter-spacing:0;margin:0 0 14px}
.bg-workspace .bg-panel-section label{font-size:11px;margin:16px 0 8px}
.bg-workspace .bg-panel-section .bg-fineprint{font-size:11px;line-height:1.7;margin:10px 0 0}
.bg-workspace .bg-panel-section input[type=range]{min-height:28px;accent-color:var(--studio-accent);cursor:pointer}
.bg-workspace .bg-panel-section :is(select,input[type=number],input[type=text],textarea){min-height:40px;border-radius:8px;font-size:12px;border-color:var(--ant-line);background-color:var(--ant-bg)}
.bg-workspace .bg-panel-section button{min-height:39px;font-size:11px;border-radius:8px}
.bg-workspace .bg-panel-section .bg-card-content{padding:0;border:0}
.bg-workspace .bg-panel-section summary{font-size:11px;line-height:1.6;cursor:pointer;color:var(--ant-ink)}
.bg-workspace .bg-brush-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:4px;background:var(--ant-bg);border-radius:10px}
.bg-workspace .bg-brush-tools button{display:flex;flex-direction:column;align-items:center;justify-content:center;width:auto;gap:7px;min-height:58px;margin:0;padding:8px 2px;border:1px solid transparent;color:var(--ant-muted);background:transparent;font-size:11px}
.bg-workspace .bg-brush-tools button svg{width:19px;height:19px}
.bg-workspace .bg-brush-tools button.active{border-color:#369dff35;color:#85c5ff;background:#369dff1a}
.bg-workspace .bg-advanced-options{border-top:1px solid var(--ant-line);margin-top:20px;padding-top:16px}
.bg-workspace .bg-advanced-options summary{font-size:11px;font-weight:500}
.bg-workspace .bg-unifiedbar{display:flex;align-items:center;gap:12px;height:62px;min-height:62px;flex-shrink:0;padding:10px 20px;border-bottom:1px solid var(--ant-line);background:var(--ant-surface);overflow:visible;z-index:26}
.bg-document-label{display:flex;flex-direction:column;gap:5px;min-width:0;margin-right:auto}
.bg-document-label strong{font-size:13px;font-weight:600;white-space:nowrap}
.bg-document-label>span{font-size:10px;color:var(--ant-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bg-workspace .bg-heading-actions{display:flex;gap:8px;align-items:center;margin:0;padding:0;position:static;background:transparent;box-shadow:none;flex-shrink:0}
.bg-workspace .bg-heading-actions button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:38px;border-radius:8px;padding:8px 13px;font-size:11px}
.bg-workspace .bg-heading-actions #studioDownload{min-width:90px;color:white;background:#0081fb;border:1px solid #0081fb}
.bg-workspace .bg-heading-actions #studioDownload span{display:inline}
.bg-workspace .bg-heading-actions #studioDownload svg{height:15px;width:15px}
.bg-workspace .bg-heading-actions #studioNewImage{width:auto;min-width:0;font-size:11px}
.bg-workspace #studioNewImage:after{content:none}
.bg-more-actions{position:relative;flex-shrink:0}
.bg-more-actions>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:6px;padding:8px;min-height:38px;border:1px solid var(--ant-line);border-radius:8px;font-size:11px;color:var(--ant-ink)}
.bg-more-actions>summary::-webkit-details-marker{display:none}
.bg-more-actions svg{height:17px;width:17px;fill:none;stroke:currentColor;stroke-width:1.8}
.bg-more-menu{position:absolute;right:0;top:calc(100% + 8px);min-width:200px;border:1px solid var(--ant-line);background:var(--ant-surface);padding:6px;border-radius:12px;box-shadow:0 14px 40px #0005;z-index:45}
.bg-workspace .bg-more-menu .bg-top-action{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:10px;width:100%;min-width:0;height:44px;min-height:44px;border:0;padding:10px 12px;margin:0;font-size:12px;border-radius:7px;background:transparent;color:var(--ant-ink)}
.bg-workspace .bg-more-menu .bg-top-action span{display:inline}
.bg-workspace .bg-more-menu .bg-top-action:hover{background:var(--ant-soft)}
.bg-workspace .bg-more-menu .bg-top-action:disabled{opacity:.4;cursor:not-allowed}
.bg-workspace .bg-toolbar-preview{display:flex;align-items:center;justify-content:center;gap:0;flex-shrink:0;padding:10px 16px;border:0;background:var(--ant-bg);min-height:53px}
.bg-workspace .bg-toolbar-preview .bg-view-switch{display:flex;gap:2px;padding:3px;background:var(--ant-surface);border:1px solid var(--ant-line);border-radius:9px}
.bg-workspace .bg-view-switch button{cursor:pointer;border:0;background:transparent;color:var(--ant-muted);min-width:74px;min-height:30px;padding:6px 12px;font-size:11px;border-radius:6px}
.bg-workspace .bg-view-switch button.active{color:var(--ant-ink);background:var(--ant-soft);box-shadow:0 1px 4px #0002}
.bg-workspace .bg-view-switch button:disabled{opacity:.4;cursor:not-allowed}
.bg-preview-select{display:none!important}
.bg-workspace .bg-viewport{background:radial-gradient(ellipse at 50% 45%,#172d4233,transparent 70%),var(--ant-bg);min-height:0}
.bg-workspace #studioEditor{padding:24px;min-height:100%;display:grid;place-items:center}
.bg-workspace .bg-canvas-stage{border-radius:2px;box-shadow:0 8px 38px #0003}
.bg-canvas-controls{display:flex;align-items:center;justify-content:center;gap:4px;min-height:48px;flex-shrink:0;padding:6px 12px;background:var(--ant-bg)}
.bg-canvas-controls .bg-view-actions{display:flex;gap:4px;align-items:center}
.bg-workspace .bg-canvas-controls button{display:grid;place-items:center;min-width:34px;height:34px;min-height:34px;padding:7px;cursor:pointer;border:1px solid var(--ant-line);border-radius:7px;color:var(--ant-muted);background:var(--ant-surface)}
.bg-workspace .bg-canvas-controls button.active{color:#80c1ff;border-color:#369dff55;background:#369dff15}
.bg-canvas-controls button svg{width:16px;height:16px}
.bg-canvas-controls .bg-tooltip{display:none!important}
.bg-canvas-controls button:disabled{opacity:.35;cursor:not-allowed}
.bg-canvas-controls #studioZoomLabel{font-size:10px;min-width:37px;text-align:center;color:var(--ant-muted)}
.bg-canvas-controls #studioFit{font-size:11px;min-width:38px}
.bg-workspace .bg-statusbar{min-height:28px;max-height:28px;padding:4px 14px;font-size:10px;border-top:1px solid var(--ant-line)}
.bg-workspace .bg-statusbar #studioStatus{font-size:10px}
.bg-workspace .bg-toolbar-alignment{display:flex;flex-wrap:wrap;gap:5px;align-items:center;padding:14px 0 0;border:0}
.bg-workspace .bg-toolbar-alignment button{width:35px;min-width:35px;min-height:38px;height:38px;padding:8px;margin:0;border:1px solid var(--ant-line);background:var(--ant-bg);border-radius:7px;color:var(--ant-ink)}
.bg-toolbar-alignment svg{width:18px;height:18px}
.bg-workspace .bg-toolbar-alignment #studioMultiSelect{display:flex;gap:8px;flex-basis:100%;width:100%;font-size:11px}
.bg-toolbar-alignment #studioMultiSelect[aria-pressed=true]{border-color:#369dff;color:#85c5ff;background:#369dff18}
.bg-toolbar-alignment #studioSelectionCount{display:inline;font-size:11px}
.bg-toolbar-alignment .bg-align-target{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:4px 0 8px;font-size:11px}
.bg-toolbar-alignment .bg-align-target select{width:140px;padding:7px;min-height:36px;font-size:11px}
.bg-layer-multiselect{flex-shrink:0;width:16px!important;height:16px!important;margin:0 0 0 6px;accent-color:var(--studio-accent);cursor:pointer}
.bg-multi-outline:after{display:none}.bg-multi-outline{border-style:dashed;outline:1px solid #fff5}
.bg-workspace .bg-look-grid{gap:8px}
.bg-workspace .bg-look-grid button{display:flex;gap:9px;align-items:center;text-align:left;min-height:54px;margin:0;padding:8px;font-size:10px;background:var(--ant-bg)}
.bg-workspace .bg-look-grid i{width:30px;height:34px}
.bg-workspace .bg-shadow-presets button,.bg-workspace .bg-preview-grid button{min-height:60px}
.bg-workspace .bg-panel-section .bg-swatches{flex-wrap:wrap;gap:9px}
.bg-workspace .bg-panel-section .bg-swatches button{width:28px;height:28px;min-height:28px;margin:0;padding:0}
.bg-sheet-backdrop{display:none}
.bg-workspace:not(.bg-has-image) .bg-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);grid-template-areas:'canvas'}
.bg-workspace:not(.bg-has-image) :is(.bg-toolrail,.bg-panel,.bg-unifiedbar,.bg-toolbar-preview,.bg-canvas-controls,.bg-statusbar){display:none}
.bg-workspace .bg-welcome{max-width:700px;padding:28px 24px}
.bg-workspace .bg-welcome h2{font-size:clamp(32px,4.6vw,54px);margin:18px 0;line-height:1.12;letter-spacing:-.045em}
.bg-workspace .bg-welcome>p{font-size:13px;line-height:1.8;margin-bottom:24px}
.bg-workspace .bg-welcome .bg-drop{min-height:160px;max-width:440px;border-radius:16px;box-shadow:none;background:var(--ant-surface)}
.bg-workspace .bg-welcome-options{max-width:440px;background:transparent;border:0;margin-top:12px}
.bg-workspace .bg-welcome-options>summary{text-align:center;font-size:11px}
.bg-workspace .bg-welcome-steps{margin-top:16px;gap:20px}
.bg-workspace .bg-welcome-pills{display:none}
.bg-workspace .bg-batch-link{font-size:10px;margin-top:18px}
.bg-workspace .ant-buddy{display:none!important}
.bg-workspace .bg-resize-dialog{border-radius:16px;border:1px solid var(--ant-line);max-height:88dvh;overflow-y:auto}
.bg-workspace :is(button,summary,select,input,textarea):focus-visible{outline:2px solid #68b6ff;outline-offset:3px}
@media(max-width:1100px) and (min-width:761px){
 .bg-workspace .bg-layout{grid-template-columns:70px minmax(0,1fr) 266px}
 .bg-workspace .bg-toolrail{padding:10px 5px}.bg-workspace .bg-inspector-tabs button{width:58px;height:59px;min-height:59px;font-size:9px}
 .bg-workspace .bg-panel-section{padding:16px!important}.bg-workspace .bg-panel-title{padding:16px;min-height:74px}
 .bg-workspace .bg-unifiedbar{padding:10px 14px;gap:8px}.bg-document-label>span{display:none}
 .bg-more-actions>summary>span{display:none}.bg-workspace .bg-heading-actions button{padding:8px 10px}
}
@media(max-width:760px){
 .bg-workspace .ah-root,.bg-workspace .ah-root .wrap.nav{height:48px;min-height:48px}
 .bg-workspace .ah-root .wrap.nav{padding:6px 12px}.bg-workspace header .logo img{width:106px;max-width:106px}
 .bg-workspace .bg-header-title{font-size:11px;max-width:145px;overflow:hidden;text-overflow:ellipsis}
 .bg-workspace .bg-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;grid-template-areas:'canvas' 'tools'}
 .bg-workspace .bg-toolrail{padding:5px 6px calc(5px + env(safe-area-inset-bottom));border:0;border-top:1px solid var(--ant-line);overflow:hidden;min-height:65px;z-index:35}
 .bg-workspace .bg-inspector-tabs{flex-direction:row;gap:2px;justify-content:space-between;margin:0;min-height:0}
 .bg-workspace .bg-inspector-tabs button{flex:1;min-width:0;width:auto;height:54px;min-height:54px;font-size:9px;padding:6px 1px;gap:6px;border-radius:9px}
 .bg-workspace .bg-inspector-tabs button svg{width:19px;height:19px}
 .bg-workspace .bg-panel{display:none;position:absolute;left:0;right:0;bottom:calc(65px + env(safe-area-inset-bottom));max-height:47%;height:auto;min-height:0;border:1px solid var(--ant-line);border-bottom:0;border-radius:18px 18px 0 0;box-shadow:0 -12px 40px #0004;z-index:34;grid-area:auto}
 .bg-workspace.bg-inspector-open .bg-panel{display:flex;height:var(--bg-sheet-height);min-height:175px;max-height:47%}
 .bg-workspace.bg-inspector-open .bg-main{margin-bottom:var(--bg-sheet-height)}
 .bg-workspace.bg-inspector-open .bg-statusbar{display:none}
 .bg-workspace .bg-panel-title{padding:14px 18px;min-height:68px;gap:8px}
 .bg-workspace .bg-panel-title h2{font-size:14px}.bg-workspace .bg-panel-title p{font-size:10px;max-width:none}
 .bg-workspace .bg-close-panel{display:flex;align-items:center;justify-content:center;gap:6px;position:static;inset:auto;flex-shrink:0;min-width:60px;width:auto;min-height:36px;height:36px;border:1px solid var(--ant-line);border-radius:8px;padding:8px;font-size:11px;background:var(--ant-soft);color:var(--ant-ink)}
 .bg-close-panel svg{height:14px;width:14px}
 .bg-workspace .bg-panel>[role=tabpanel]:not([hidden]){display:block}
 .bg-workspace .bg-panel-section{padding:16px 18px!important;margin:0;border-right:0;border-bottom:1px solid var(--ant-line);min-width:0}
 .bg-workspace .bg-panel-section :is(button,select){min-height:42px}.bg-workspace .bg-panel-section input[type=range]{min-height:36px}
 .bg-workspace .bg-panel-section label{font-size:12px}.bg-workspace .bg-brush-tools button{flex-direction:row;min-height:42px;gap:7px}
 .bg-workspace .bg-sheet-backdrop{position:absolute;inset:0 0 65px;z-index:33;background:#0002;border:0;border-radius:0;cursor:pointer}
 .bg-workspace.bg-inspector-open .bg-sheet-backdrop{display:none}
 .bg-workspace .bg-unifiedbar{padding:8px 12px;height:56px;min-height:56px;gap:8px}
 .bg-document-label strong{font-size:12px}.bg-document-label>span{display:none}
 .bg-more-actions>summary{min-height:38px;padding:9px}.bg-more-actions>summary>span{display:none}
 .bg-workspace .bg-heading-actions{gap:6px}.bg-workspace .bg-heading-actions button{min-height:38px;padding:8px 10px;font-size:10px}
 .bg-workspace .bg-heading-actions #studioDownload{min-width:75px}.bg-workspace .bg-heading-actions #studioNewImage{font-size:10px}
 .bg-workspace .bg-toolbar-preview{min-height:48px;padding:7px 10px}
 .bg-workspace .bg-view-switch button{min-width:75px;min-height:30px;font-size:10px}
 .bg-workspace .bg-canvas-controls{min-height:45px;padding:5px 10px;gap:5px}
 .bg-workspace .bg-canvas-controls button{min-height:34px;height:34px;width:34px}
 .bg-workspace .bg-statusbar{min-height:26px;max-height:26px;padding:4px 10px}.bg-workspace .bg-statusbar #studioDimensions{display:none}
 .bg-workspace #studioEditor{padding:18px}
 .bg-workspace .bg-welcome{padding:22px 18px}
 .bg-workspace .bg-welcome h2{font-size:36px;margin:16px 0}
 .bg-workspace .bg-welcome>p{font-size:12px;margin-bottom:22px}
 .bg-workspace .bg-welcome-steps{gap:12px;font-size:9px;flex-wrap:wrap;justify-content:center}
 .bg-workspace .bg-welcome-options .bg-two-fields{display:grid;grid-template-columns:1fr 1fr}
 .bg-workspace .bg-welcome .bg-drop{min-height:170px}
}
@media(max-width:360px){
 .bg-workspace .bg-document-label{display:none}.bg-workspace .bg-unifiedbar{justify-content:space-between}.bg-workspace .bg-more-actions{margin-right:auto}
 .bg-workspace .bg-inspector-tabs button{font-size:8px}.bg-workspace .bg-header-title{font-size:10px}.bg-workspace header .logo img{width:90px;max-width:90px}
}
@media(max-height:550px) and (max-width:950px) and (min-width:600px){
 .bg-workspace .bg-layout{grid-template-columns:62px minmax(0,1fr);grid-template-rows:minmax(0,1fr);grid-template-areas:'tools canvas'}
 .bg-workspace .bg-toolrail{padding:5px;border:0;border-right:1px solid var(--ant-line);overflow-y:auto}
 .bg-workspace .bg-inspector-tabs{flex-direction:column;gap:3px}
 .bg-workspace .bg-inspector-tabs button{flex:none;width:50px;height:43px;min-height:43px;gap:3px;font-size:8px;padding:4px}
 .bg-workspace .bg-inspector-tabs button svg{width:17px;height:17px}
 .bg-workspace .bg-panel{display:none;position:absolute;left:auto;right:0;top:0;bottom:0;width:284px;min-height:0;max-height:100%;height:100%;border:0;border-left:1px solid var(--ant-line);border-radius:0;grid-area:auto;z-index:34}
 .bg-workspace.bg-inspector-open .bg-panel{display:flex;height:100%;max-height:100%;min-height:0}
 .bg-workspace.bg-inspector-open .bg-main{margin-bottom:0;margin-right:284px}
 .bg-workspace .bg-close-panel{display:flex;position:static;align-items:center;gap:5px;border:1px solid var(--ant-line);background:var(--ant-soft);color:var(--ant-ink);border-radius:7px;padding:7px;min-height:34px;font-size:10px}
 .bg-workspace .bg-panel-title{padding:12px 16px;min-height:62px}
 .bg-workspace.bg-inspector-open .bg-sheet-backdrop{display:none}
 .bg-workspace .bg-unifiedbar{height:48px;min-height:48px;padding:6px 12px}.bg-workspace .bg-toolbar-preview{min-height:40px;padding:4px 10px}
 .bg-workspace .bg-canvas-controls{min-height:40px;padding:3px 10px}
 .bg-workspace .bg-welcome{padding:12px}.bg-workspace .bg-welcome h2{font-size:28px;margin:8px 0}.bg-workspace .bg-welcome>p{margin-bottom:12px}
 .bg-workspace .bg-welcome .bg-drop{min-height:126px}.bg-workspace .bg-welcome-steps,.bg-workspace .bg-welcome-pills,.bg-workspace .bg-batch-link{display:none}
}
@media(prefers-reduced-motion:reduce){.bg-workspace *{scroll-behavior:auto!important}}

.bg-workspace .bg-transparent-note{padding:14px;margin:14px 0 0;border:1px dashed var(--ant-line);border-radius:9px;color:var(--ant-muted);font-size:11px;line-height:1.8}.bg-workspace .bg-quick-looks summary{font-size:12px;font-weight:600}.bg-workspace .bg-quick-looks .bg-look-grid{margin-top:14px}

/* Keep the shared header compact inside the editor, including its global overrides. */
.bg-workspace header.ah-root .nav-links{display:none!important}.bg-workspace header.ah-root .logo img{width:132px!important;max-width:132px!important;height:auto!important}
@media(max-width:760px){.bg-workspace header.ah-root .logo img{width:96px!important;max-width:96px!important}.bg-workspace .bg-header-title{font-size:11px;max-width:138px}}
@media(max-width:360px){.bg-workspace header.ah-root .logo img{width:78px!important;max-width:78px!important}.bg-workspace .bg-header-title{font-size:10px;max-width:122px}}
/* Move is an independent tool; Refine contains only the two mask brushes. */
.bg-workspace .bg-toolrail{display:flex;flex-direction:column;gap:12px}
.bg-workspace .bg-move-tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;flex-shrink:0;width:66px;height:58px;min-height:58px;margin:0;padding:8px 2px;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--ant-muted);font-size:10px;cursor:pointer}
.bg-workspace .bg-move-tool svg{width:21px;height:21px;display:block}
.bg-workspace .bg-move-tool.active{background:#369dff18;border-color:#369dff30;color:#76bcff}
.bg-workspace .bg-brush-tools{grid-template-columns:repeat(2,1fr)}
.bg-top-alignment{display:none}
@media(min-width:1280px){
 .bg-workspace.bg-has-image.bg-move-active .bg-top-alignment{display:flex;align-items:center;gap:3px;margin-right:auto}
 .bg-workspace.bg-move-active .bg-document-label{display:none}
 .bg-workspace .bg-top-alignment .bg-align-target{display:flex;align-items:center;gap:6px;color:var(--ant-muted);font-size:10px;margin-right:7px;white-space:nowrap}
 .bg-workspace .bg-top-alignment select{width:89px;min-height:32px;height:32px;padding:5px;border:1px solid var(--ant-line);border-radius:6px;color:var(--ant-ink);background:var(--ant-bg);font-size:10px}
 .bg-workspace .bg-top-alignment button{display:grid;place-items:center;width:30px;height:32px;min-height:32px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--ant-ink);padding:5px;cursor:pointer}
 .bg-top-alignment button svg{width:18px;height:18px}
 .bg-workspace .bg-top-alignment button:hover:not(:disabled){background:var(--ant-soft);border-color:var(--ant-line)}
 .bg-top-alignment button:disabled{opacity:.3;cursor:not-allowed}
}
@media(min-width:761px) and (max-width:1100px){.bg-workspace .bg-move-tool{width:58px;height:54px;min-height:54px;font-size:9px}}
@media(max-width:760px){
 .bg-workspace .bg-toolrail{flex-direction:row;gap:5px;align-items:center}
 .bg-workspace .bg-toolrail .bg-inspector-tabs{flex:1;min-width:0}
 .bg-workspace .bg-move-tool{width:43px;height:54px;min-height:54px;gap:6px;font-size:9px;border-radius:9px}
 .bg-workspace .bg-move-tool svg{width:19px;height:19px}
 .bg-workspace .bg-inspector-tabs button{font-size:8px}
}
@media(max-height:550px) and (max-width:950px) and (min-width:600px){
 .bg-workspace .bg-toolrail{flex-direction:column;gap:5px;overflow-y:auto}
 .bg-workspace .bg-move-tool{width:50px;height:43px;min-height:43px;font-size:8px;gap:3px;padding:4px}
 .bg-workspace .bg-move-tool svg{width:17px;height:17px}
}
.bg-workspace #studioTextFont{margin-bottom:8px}
.bg-workspace #studioGoogleFont{margin-top:8px;background:#369dff12;border-color:#369dff35;color:#88c8ff}
/* Selection workspace and editable Pen paths are overlays, never exported pixels. */
.bg-workspace .bg-inspector-tabs{gap:5px}
.bg-workspace .bg-inspector-tabs button{height:54px;min-height:54px}
.bg-workspace .bg-close-panel{display:grid;place-items:center;position:static;flex-shrink:0;width:34px;min-width:34px;height:34px;min-height:34px;padding:7px;border:1px solid var(--ant-line);border-radius:7px;background:var(--ant-soft);color:var(--ant-muted);cursor:pointer}
.bg-close-panel svg,.bg-panel-toggle svg{width:18px;height:18px}
.bg-workspace .bg-heading-actions .bg-panel-toggle{display:none;width:34px;min-width:34px;padding:7px;color:var(--ant-ink);background:var(--ant-soft);border:1px solid var(--ant-line)}
@media(min-width:761px) and (min-height:551px){
 .bg-workspace.bg-panel-collapsed .bg-layout{grid-template-columns:82px minmax(0,1fr);grid-template-areas:'tools canvas'}
 .bg-workspace.bg-panel-collapsed .bg-panel{display:none}
 .bg-workspace.bg-panel-collapsed .bg-heading-actions .bg-panel-toggle{display:flex}
}
.bg-workspace .bg-selection-tool-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:14px}
.bg-workspace .bg-selection-tool-grid button{display:flex;flex-direction:column;gap:7px;justify-content:center;min-height:72px;margin:0;padding:9px 4px;font-size:10px;line-height:1.4;background:var(--ant-bg)}
.bg-selection-tool-grid svg{width:22px!important;height:22px!important;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.bg-workspace :is(.bg-selection-tool-grid,.bg-pen-modes) button[aria-pressed=true]{border-color:#369dff80;background:#369dff18;color:#8dc9ff}
.bg-workspace .bg-pen-modes{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:14px}
.bg-workspace .bg-pen-modes button{margin:0;font-size:10px;min-height:39px}
.bg-workspace .bg-selection-actions .bg-two-fields{gap:6px}
.bg-workspace .bg-selection-primary{background:#0081fb!important;color:#fff;border-color:#0081fb}
.bg-selection-overlay{position:absolute;left:0;top:0;overflow:hidden;pointer-events:none;z-index:9}
.bg-selection-base{stroke:#fff;stroke-width:2.4;stroke-linecap:square}
.bg-selection-ants{stroke:#112033;stroke-width:1.3;stroke-dasharray:5 5;animation:bg-selection-march .8s linear infinite}
.bg-pen-line{stroke:#269bff;stroke-width:1.8}
.bg-pen-anchor{fill:#fff;stroke:#168cff;stroke-width:1.4}.bg-pen-anchor.selected{fill:#168cff;stroke:white}
.bg-pen-handle{fill:#fff;stroke:#168cff;stroke-width:1.3}.bg-pen-handle-line{stroke:#168cff;stroke-width:1}
@keyframes bg-selection-march{to{stroke-dashoffset:-10}}
@media(max-width:760px){
 .bg-workspace .bg-toolrail{overflow-x:auto;overflow-y:hidden;justify-content:flex-start;scrollbar-width:none}
 .bg-workspace .bg-toolrail::-webkit-scrollbar{display:none}
 .bg-workspace .bg-toolrail .bg-inspector-tabs{flex:0 0 auto;gap:3px}
 .bg-workspace .bg-inspector-tabs button{flex:none;min-width:51px;width:51px;font-size:9px}
 .bg-workspace .bg-close-panel{width:34px;min-width:34px}
}
@media(max-height:550px) and (max-width:950px) and (min-width:600px){
 .bg-workspace .bg-toolrail{overflow-y:auto;overflow-x:hidden}
 .bg-workspace .bg-toolrail .bg-inspector-tabs{flex-direction:column;flex:0 0 auto}
 .bg-workspace .bg-inspector-tabs button{height:43px;min-height:43px;width:50px;min-width:50px;font-size:8px}
}
@media(prefers-reduced-motion:reduce){.bg-selection-ants{animation:none}}

.bg-workspace .bg-brush-selection-notice{padding:10px 12px;margin-bottom:14px;border:1px solid #369dff45;border-radius:9px;background:#369dff0d}.bg-workspace .bg-brush-selection-notice .bg-fineprint{margin:0}.bg-workspace .bg-brush-selection-notice button{min-height:30px;margin-top:8px;font-size:10px}

/* Shared Hugeicons geometry, kept local and limited to this workspace. */
.bg-hugeicon{display:inline-block;width:18px;height:18px;flex:0 0 18px;vertical-align:middle;pointer-events:none}
.bg-panel-section button:has(>.bg-hugeicon){display:flex;align-items:center;justify-content:center;gap:6px}
.bg-selection-combine{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:12px 0 6px}
.bg-panel-section .bg-selection-combine button{margin:0;padding:8px 3px;flex-direction:column;font-size:10px}
.bg-selection-combine button[aria-pressed=true]{background:#0081fb25;border-color:#0081fb;color:#8ccaff}
.bg-selection-context{display:flex;flex-shrink:0;align-items:center;gap:6px;padding:7px 12px;background:var(--ant-surface);border-bottom:1px solid var(--ant-line);overflow-x:auto}
.bg-selection-context[hidden]{display:none}
.bg-selection-context>span{font-size:11px;white-space:nowrap;margin-right:auto;color:var(--ant-muted)}
.bg-selection-context button{display:flex;align-items:center;justify-content:center;gap:5px;flex-shrink:0;border:1px solid var(--ant-line);border-radius:7px;background:var(--ant-soft);color:var(--ant-ink);padding:7px 9px;font:inherit;font-size:11px;cursor:pointer;min-height:34px}
.bg-selection-context .bg-selection-primary{background:#0081fb;color:white;border-color:#0081fb}
.bg-selection-context button:disabled{opacity:.4;cursor:default}
.bg-selection-context button:focus-visible{outline:2px solid #81bfff;outline-offset:2px}
.bg-layer-arrows .bg-hugeicon{width:15px;height:15px}
@media(max-width:760px){.bg-selection-context{padding:6px;gap:4px}.bg-selection-context>span{display:none}.bg-selection-context button{flex:1;font-size:10px;padding:6px 4px;gap:3px}.bg-selection-context .bg-hugeicon{width:15px;height:15px;flex-basis:15px}}

/* Keep the primary selection action legible against its blue fill. */
.bg-workspace button.bg-selection-primary,.bg-workspace button.bg-selection-primary:hover:not(:disabled),.bg-workspace button.bg-selection-primary:focus-visible,.bg-workspace button.bg-selection-primary:active{color:#fff}
.bg-workspace button.bg-selection-primary:hover:not(:disabled){background:#0067cf!important;border-color:#0067cf}
.bg-workspace button.bg-selection-primary:focus-visible{outline:2px solid #a8d6ff;outline-offset:2px}
.bg-selection-context button[hidden]{display:none}

.bg-snap-guides{position:absolute;inset:0;pointer-events:none;z-index:8;overflow:visible}.bg-snap-guides[hidden]{display:none}.bg-snap-guides line{stroke:#31c6ff;stroke-width:1;stroke-dasharray:4 3}#studioSnapToggle[aria-pressed=true]{color:#92ceff;border-color:#0081fb;background:#0081fb20}

/* Compact, grouped preset libraries. */
.bg-workspace .bg-preset-library{display:block;margin-top:12px}.bg-preset-category{margin:0 0 10px;border:1px solid var(--ant-line);border-radius:9px;overflow:hidden}.bg-preset-category>summary{padding:11px 12px;cursor:pointer;color:var(--ant-ink);font-size:11px;font-weight:600}.bg-preset-category>.bg-preview-grid{padding:2px 10px 12px}.bg-preview-grid button>canvas{display:block;width:100%;height:100%;pointer-events:none}.bg-panel-section .bg-pattern-presets button{background:#fff}.bg-pattern-presets{margin-top:12px!important}

/* Local Hugeicons cursors. Resize handles keep native directional cursors. */
#studioViewport{cursor:var(--bg-tool-cursor,default)}#studioViewport canvas,#studioTextHits>button,#studioTextHits .bg-selection-move{cursor:var(--bg-tool-cursor,default)}#studioViewport.is-pan{--bg-tool-cursor:url("/assets/ui/cursors/background/hand.svg?v=1") 14 14,grab}#studioViewport.is-panning{--bg-tool-cursor:grabbing}#studioViewport.is-brush canvas{cursor:none}#studioTextHits .bg-handle-rotate{cursor:url("/assets/ui/cursors/background/rotate.svg?v=1") 14 14,grab}.is-processing #studioViewport canvas{cursor:progress}

#studioViewport.is-pan,#studioViewport.is-pan canvas,#studioViewport.is-pan #studioTextHits>button{cursor:url("/assets/ui/cursors/background/hand.svg?v=1") 14 14,grab}#studioViewport.is-panning,#studioViewport.is-panning canvas,#studioViewport.is-panning #studioTextHits>button{cursor:grabbing}
