/* Scoped group surfaces; the original asset cards and their editor are unchanged. */
.canvas-node.cg-group{border:0!important;border-radius:36px!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;padding:0!important;z-index:auto!important;pointer-events:none;outline:none!important}
.cg-group .cg-surface{position:absolute;inset:0;border-radius:36px;background:var(--cg-color);opacity:var(--cg-opacity);border:1px solid rgba(255,255,255,.12);pointer-events:auto;box-sizing:border-box}
.cg-group.selected .cg-surface{border-color:rgba(255,255,255,.42)}
.cg-title{position:absolute;z-index:3;bottom:calc(100% + 8px);left:4px;right:24px;color:rgba(255,255,255,.5);font:400 13px/16px system-ui,sans-serif;transform:scale(var(--cg-title-scale));transform-origin:left bottom;cursor:pointer;pointer-events:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cg-title input{border:0!important;background:transparent!important;border-radius:0!important;padding:0!important;min-height:0!important;outline:0;color:inherit;font:inherit;width:100%}
.cg-label-action{position:absolute;z-index:3;right:0;bottom:calc(100% + 8px);width:18px;height:18px;padding:0;border:0;background:transparent;color:#bdbdbd;pointer-events:auto;opacity:0;transform:scale(var(--cg-title-scale));transform-origin:right bottom}
.cg-label-action svg{width:12px;height:12px}.cg-group:hover .cg-label-action,.cg-group.selected .cg-label-action{opacity:1}
.cg-labelled .cg-surface{border:2px solid var(--cg-label)!important}.cg-labelled .cg-title{display:none}.cg-labels{position:absolute;top:0;left:36px;transform:translateY(-100%);display:flex;gap:2px;font:13px/20px system-ui;color:#161616}.cg-labels span{padding:0 10px;border-radius:14px 14px 0 0}
.cg-collapsed .cg-surface{background:#1c1c1c;opacity:1}.cg-collapsed-body{position:absolute;inset:13px;display:flex;flex-direction:column;gap:8px;pointer-events:auto;color:#ffffffb3}.cg-preview{display:grid;gap:6px;background:#ffffff0a;border-radius:14px;min-height:0;flex:1;overflow:hidden}.cg-preview>div{display:flex;align-items:center;justify-content:center;min-height:0;overflow:hidden;border-radius:14px;color:#ffffff80}.cg-preview svg{width:28px;height:28px}.cg-preview img{width:100%;height:100%;object-fit:cover}.cg-collapsed-body>span{height:24px;display:flex;align-items:center;gap:6px;flex-shrink:0;font:500 12px/16.8px system-ui}.cg-collapsed-body>span svg{width:18px;height:18px}

#cg-tools{position:absolute;inset:0;pointer-events:none;z-index:16}.cg-toolbar{position:absolute;display:flex;align-items:center;gap:8px;transform:translateX(-50%);height:40px;box-sizing:border-box;padding:4px 8px;border-radius:32px;background:#1c1c1c;color:#fff;pointer-events:auto;white-space:nowrap;box-shadow:0 0 0 1px rgba(255,255,255,.08);font:12px/16.8px system-ui,sans-serif}
.cg-toolbar button{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:32px;padding:0 10px;border:0;border-radius:999px;background:transparent;color:#ddd;font:inherit;cursor:pointer;white-space:nowrap}.cg-toolbar button:hover{background:rgba(255,255,255,.08)}.cg-toolbar button:active{background:rgba(255,255,255,.12)}.cg-toolbar button>svg{width:18px;height:18px;flex-shrink:0}.cg-toolbar button[aria-label="排列"],.cg-toolbar button[aria-label="背景色"]{width:32px;padding:0}.cg-toolbar button[aria-label="背景色"]:before{content:'';background:var(--cg-swatch);width:18px;height:18px;border-radius:6px}.cg-toolbar-actions{display:flex}.cg-divider{height:20px;width:1px;background:rgba(255,255,255,.12);margin:0}.cg-toolbar button[aria-label="展开"]{padding-left:28px}
.cg-selection-outline{position:absolute;border:1px solid rgba(255,255,255,.38);border-radius:36px;pointer-events:none;box-sizing:border-box}.cg-resize{position:absolute;width:8px;height:8px;min-height:0;padding:0;background:rgba(38,38,38,.7);border:1px solid #884dff;border-radius:2px;transform:translate(-50%,-50%);pointer-events:auto}
.cg-popover{position:fixed;z-index:3000;background:#262626;color:#eee;border:1px solid #424242;border-radius:16px;padding:8px;box-shadow:0 8px 20px #0005;font:12px/17px system-ui}.cg-popover button{border:0;background:transparent;color:inherit;cursor:pointer;font:inherit}.cg-color-menu{display:flex;gap:12px;padding:12px}.cg-color-menu button{width:40px;height:40px;padding:8px;border-radius:10px}.cg-color-menu button span{display:block;width:24px;height:24px;border-radius:50%;background:var(--cg-swatch)}.cg-color-menu button:hover{background:#ffffff14}.cg-color-menu button[aria-pressed=true]{background:#ffffff1f;outline:1px solid #ffffff4d}.cg-arrange-menu{width:164px}.cg-arrange-menu button{width:100%;height:34px;padding:0 8px;border-radius:8px;display:flex;align-items:center;gap:8px;text-align:left}.cg-arrange-menu button:hover{background:#ffffff14}.cg-arrange-menu svg{width:16px;height:16px}
.cg-toolbox{width:min(960px,calc(100vw - 32px));height:min(720px,calc(100vh - 48px));box-sizing:border-box;margin:auto;border:1px solid #393939;border-radius:24px;background:#262626;color:#e8e8e8;padding:32px;overflow:hidden;font:14px/20px system-ui}.cg-toolbox::backdrop{background:#0009}.cg-dialog-close{position:absolute;right:20px;top:16px;border:0;background:transparent;color:#aaa;font-size:24px}.cg-toolbox-tabs{display:flex;gap:24px;border-bottom:1px solid #ffffff1f;height:48px}.cg-toolbox-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;color:#aaa;font:500 14px/16.1px system-ui;padding:0 0 16px}.cg-toolbox-tabs button[aria-selected=true]{color:white;border-bottom-color:white}.cg-toolbox-content{display:flex;gap:24px;margin-top:20px;height:calc(100% - 156px);overflow:auto}.cg-toolbox-cover{width:436px;flex-shrink:0;position:relative}.cg-cover-preview{height:436px;background:#1c1c1c;border-radius:16px;margin:12px 0;display:flex;align-items:center;justify-content:center;color:#888;overflow:hidden}.cg-cover-preview img{width:100%;height:100%;object-fit:cover}.cg-toolbox button{cursor:pointer}.cg-toolbox-cover>button,.cg-toolbox footer button{height:36px;padding:0 18px;border-radius:999px;border:1px solid #ffffff24;background:transparent;color:#e8e8e8;font:14px system-ui}.cg-toolbox-fields{flex:1}.cg-toolbox-fields label{display:flex;flex-direction:column;gap:8px;margin-bottom:24px}.cg-toolbox input:not([type=radio]),.cg-toolbox textarea{box-sizing:border-box;background:#1c1c1c;border:1px solid #444;border-radius:12px;color:#eee;padding:12px;font:14px/20px system-ui;width:100%;outline:none}.cg-toolbox input:focus,.cg-toolbox textarea:focus{border-color:#999}.cg-toolbox textarea{height:64px;resize:none}.cg-toolbox footer{position:absolute;right:32px;bottom:24px;display:flex;gap:12px}.cg-toolbox footer .cg-submit{background:#eee;color:#161616}.cg-toolbox footer button:disabled{opacity:.35;cursor:default}.cg-toolbox-error{color:#f08080;font-size:12px}.cg-toolbox-empty{margin:auto;text-align:center;display:flex;flex-direction:column;gap:12px;color:#aaa}.cg-toolbox-empty strong{font-size:16px;color:#ccc}.cg-toolbox-existing{width:100%}.cg-toolbox-existing>input{max-width:320px;margin-bottom:20px}.cg-toolbox-row{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #444;border-radius:12px;margin-bottom:10px;cursor:pointer}.cg-toolbox-row img{width:64px;height:64px;object-fit:cover;border-radius:8px}.cg-toolbox-row input{accent-color:#fff}.cg-cover-menu{position:absolute;z-index:2;background:#333;border:1px solid #555;border-radius:12px;padding:6px;box-shadow:0 6px 16px #0005}.cg-cover-menu button{display:block;border:0;background:transparent;color:#ddd;width:190px;text-align:left;padding:10px;border-radius:8px}.cg-cover-menu button:hover{background:#444}
@media(max-width:600px){.cg-toolbox{padding:20px}.cg-toolbox-content{gap:16px}.cg-toolbox-cover{width:180px}.cg-cover-preview{height:180px}.cg-toolbox-fields{min-width:240px}.cg-toolbox footer{right:20px}}

.cg-toolbox-fields input{height:36px;padding:8px 12px!important}.cg-toolbox footer button{min-width:72px;font-size:12px}.cg-toolbox-cover>button{position:absolute;left:12px;bottom:12px;height:32px;font-size:12px;background:#262626}.cg-toolbox-cover{align-self:flex-start}.cg-cover-preview{margin-top:8px;margin-bottom:0}.cg-toolbox-tabs{height:40px}.cg-toolbox-content{margin-top:20px}

.cg-dialog-close{width:28px;height:28px;display:flex;align-items:center;justify-content:center;padding:0}.cg-dialog-close svg{width:16px;height:16px}.cg-color-menu button[aria-pressed=true]{outline:none;background:transparent}.cg-color-menu button span{display:flex;align-items:center;justify-content:center;color:#fff}.cg-color-menu button:first-child span{color:#262626}.cg-color-menu button svg{width:18px;height:18px}

.canvas-node.cg-group.cg-collapsed{z-index:3!important}.cg-title{text-align:center}.cg-toolbar button[aria-label="展开"]{padding-left:10px}.cg-toolbox{background:#1c1c1c;border-radius:32px;padding:36px 32px 32px;border:0;box-shadow:0 0 0 1px #ffffff1f}.cg-toolbox-tabs{border-bottom:0;height:36px}.cg-toolbox-tabs button{padding:0 0 8px}.cg-toolbox-content{margin-top:16px}.cg-toolbox label{font-size:13px;font-weight:500;line-height:18.2px}.cg-toolbox-fields input,.cg-toolbox textarea{background:#333;border-color:#626262}.cg-toolbox-fields input{border-radius:999px}.cg-toolbox-fields textarea{border-radius:16px}.cg-toolbox-fields label{gap:12px;margin-bottom:20px}.cg-cover-preview{margin-top:12px}.cg-toolbox-cover>button{background:#ffffff0a;border-color:#ffffff24;padding:0 14px;font-size:12px}.cg-toolbox footer{right:24px;bottom:24px;gap:8px}.cg-dialog-close{top:18px;right:18px;background:#ffffff0a;border-radius:999px}

.cg-toolbox .cg-toolbox-fields input:not([type=radio]){background:#333;border-color:#626262;border-radius:999px}.cg-toolbox .cg-toolbox-fields textarea{background:#333;border-color:#626262;border-radius:16px}

.cg-collapsed.selected .cg-surface{border-color:rgba(144,89,255,.56);box-shadow:0 8px 40px #00000014,0 0 0 .5px #ffffff14}.cg-selection-outline.is-collapsed{border-color:rgba(144,89,255,.56)}
@media(max-width:600px){.cg-toolbox{padding:36px 32px 32px;height:min(720px,calc(100vh - 32px))}.cg-toolbox-content{flex-direction:column;gap:24px;height:calc(100% - 96px);padding-bottom:14px}.cg-toolbox-cover{width:100%}.cg-cover-preview{height:auto;aspect-ratio:1}.cg-toolbox-fields{min-width:0;flex:none;width:100%}.cg-toolbox footer{right:24px;bottom:24px}.cg-toolbox-tabs{flex-shrink:0}.cg-toolbox-fields textarea{height:68px}}

.cg-cover-preview{background:#333}.cg-toolbox .cg-submit:disabled{background:#ffffff0a;color:#ffffff4d;opacity:1;border-color:transparent}
@media(max-width:600px){.cg-toolbox footer{left:24px;right:24px;flex-direction:column;gap:8px}.cg-toolbox footer button{width:100%;height:36px}.cg-toolbox-content{overflow:auto}.cg-toolbox-tabs button{padding-bottom:0}.cg-toolbox-tabs{align-items:stretch}}

.cg-toolbox{max-width:none}.cg-toolbox-content{scrollbar-width:none}.cg-toolbox-content::-webkit-scrollbar{display:none}.cg-toolbox-cover>label{display:block}

.cg-toolbox label{font-weight:400}.cg-toolbox input::placeholder,.cg-toolbox textarea::placeholder{color:#8f8f8f;opacity:1}

.cg-context-menu{width:220px;box-sizing:border-box;padding:8px;border:0;border-radius:24px;background:rgba(38,38,38,.7);backdrop-filter:blur(20px) saturate(1.08);box-shadow:0 40px 60px #0000000a,inset 0 0 0 1px #ffffff14}.cg-context-menu button{display:flex;width:100%;align-items:center;justify-content:space-between;height:40px;padding:0 12px;border-radius:12px;font:500 13px/18.2px "PingFang SC","Helvetica Neue",Arial,sans-serif;color:white}.cg-context-menu button:hover{background:#ffffff14}.cg-context-menu small{font:400 13px/18.2px inherit;color:#ffffff80}.cg-context-menu svg{width:20px;height:20px}

.cg-delete{box-sizing:border-box;width:min(448px,calc(100vw - 32px));max-width:none;border:0;border-radius:32px;padding:24px;background:#1c1c1c;color:#fff;box-shadow:0 0 0 1px #ffffff14}.cg-delete::backdrop{background:#0008;backdrop-filter:blur(4px)}.cg-delete h2{margin:0;font:500 16px/24px system-ui}.cg-delete p{margin:6px 0 24px;font:400 13px/19.5px system-ui;color:#ffffffb3}.cg-delete footer{display:flex;justify-content:flex-end;gap:8px}.cg-delete button{height:36px;min-width:72px;border:0;border-radius:32px;padding:1px 16px;background:#ffffff14;color:white;font:500 12px/13.8px system-ui;cursor:pointer}.cg-delete button[data-confirm]{background:#e15858}

.cg-context-menu button:first-child{padding-top:8px}.cg-context-menu small{font-family:inherit;font-size:13px;font-weight:400;line-height:18.2px}
.cg-group,.cg-toolbar,.cg-popover,.cg-toolbox,.cg-delete{-webkit-font-smoothing:antialiased}
