@import url("./canvas-viewport.css?v=5e51810f");
@import url("./canvas-project-files.css");
/* Scoped asset-library canvas. Generic canvas gestures and layout remain independent. */
body .studio-shell .asset-canvas-mode{--ac-panel:#1e1e1e;--ac-muted:#929292;--ac-line:#363636;--ac-library-width:294px;position:relative;background:#090909;color:var(--text-1);padding:0!important;min-height:0!important;overflow:hidden}
body .studio-shell .asset-canvas-mode .canvas-layout{position:relative;display:flex!important;width:100%;height:100%;gap:0;overflow:hidden!important;min-height:0}
body .studio-shell .asset-canvas-mode .canvas-viewport{position:relative;flex:1;min-width:0;height:100%;border:0;border-radius:0;background:#000;overflow:hidden}
body .studio-shell .asset-canvas-mode .canvas-dots{opacity:.7;background-image:radial-gradient(#343434 .7px,transparent .7px);background-size:16px 16px}
body .studio-shell .asset-canvas-mode .canvas-inspector{display:none!important}
body .studio-shell .asset-canvas-mode .native-canvas-status{top:12px;right:14px;left:auto;background:transparent;color:var(--text-3);border:0;font-size:12px;pointer-events:none}body .studio-shell .asset-canvas-mode .native-canvas-status[data-saved=true]:before{content:"";display:inline-block;width:6px;height:6px;margin-right:5px;border-radius:50%;background:#17cf64;vertical-align:1px}
body .studio-shell .asset-canvas-mode button,body .studio-shell .asset-canvas-mode select,body .studio-shell .asset-canvas-mode input,body .studio-shell .asset-canvas-mode textarea{font-family:inherit}
body .studio-shell .asset-canvas-mode button{cursor:pointer}
body .studio-shell .asset-canvas-mode button:disabled{cursor:default}
body .studio-shell .asset-canvas-mode button:focus-visible,body .studio-shell .asset-canvas-mode a:focus-visible,body .studio-shell .asset-canvas-mode summary:focus-visible{outline:2px solid #dcdcdc;outline-offset:3px}
body .studio-shell .asset-canvas-mode .ac-library{flex:0 0 var(--ac-library-width);width:var(--ac-library-width);min-width:0;display:flex;flex-direction:column;border-right:1px solid #3b3b3b;background:var(--ac-panel);z-index:25;overflow:hidden}
body .studio-shell .asset-canvas-mode .ac-library-heading{display:flex;align-items:center;gap:10px;padding:20px 16px 14px;min-height:62px;flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-library-heading strong{font-size:14px;font-weight:600;white-space:nowrap}
body .studio-shell .asset-canvas-mode .ac-view-switch{display:flex;border:1px solid #444;border-radius:20px;padding:2px;gap:1px}
body .studio-shell .asset-canvas-mode .ac-view-switch button{border:0;padding:3px 6px;color:var(--text-2);background:transparent;border-radius:20px;display:flex;align-items:center}
body .studio-shell .asset-canvas-mode .ac-view-switch button.active{background:#3c3c3c;color:var(--text-1)}
body .studio-shell .asset-canvas-mode .ac-unplaced{margin-left:auto;white-space:nowrap;font-size:12px;color:var(--text-1);border:1px solid #414141;padding:6px 9px;border-radius:20px;background:transparent}
body .studio-shell .asset-canvas-mode .ac-unplaced.active{border-color:#d6d6d6;background:#363636}
body .studio-shell .asset-canvas-mode .ac-library-add{flex:none;display:grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid #414141;border-radius:50%;background:transparent;color:var(--text-1);cursor:pointer}body .studio-shell .asset-canvas-mode .ac-library-add:hover,body .studio-shell .asset-canvas-mode .ac-library-add[aria-expanded=true]{border-color:#d6d6d6;background:#363636;color:#fff}
body .studio-shell .asset-canvas-mode .ac-library-filters{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:0 16px 14px;flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-library-search{min-width:0;flex:1 0 100%;display:flex;align-items:center;border:1px solid #3d3d3d;background:#262626;border-radius:20px;padding:4px 9px;gap:6px;color:var(--text-3)}
body .studio-shell .asset-canvas-mode .ac-library-search .icon{width:13px;height:13px;flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-library-search input{min-width:0;width:100%;padding:0!important;outline:none!important;border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;color:var(--text-1);font-size:12px;line-height:18px}
body .studio-shell .asset-canvas-mode .ac-library-filters select{max-width:98px;width:auto;border:0;background:transparent;color:var(--text-2);font-size:12px;padding:3px 14px 3px 1px;min-height:24px}
body .studio-shell .asset-canvas-mode .ac-library-filters select[data-asset-canvas-kind]{max-width:76px}
.ac-library-filters input.ac-label-filter-trigger{width:auto;min-height:24px;anchor-name:--ac-label-filter;flex:none;white-space:nowrap;background:transparent;border:0;color:var(--text-2);font-size:12px;padding:3px;cursor:pointer}
#ac-library-labels{position:fixed;position-anchor:--ac-label-filter;inset:auto;top:anchor(bottom);bottom:4px;align-self:start;left:clamp(4px,calc(anchor(right) - 160px),calc(100vw - 164px));margin:4px 0 0;padding:8px;width:160px;box-sizing:border-box;max-height:50vh;overflow-y:auto;border:1px solid #424242;border-radius:8px;background:#242424;color:#eee}
#ac-library-labels header,#ac-library-labels label{display:flex;align-items:center;gap:8px;padding:5px}
#ac-library-labels header{justify-content:space-between}
#ac-library-labels header input{width:auto;min-height:24px;background:transparent;border:0;color:inherit;cursor:pointer}
#ac-library-labels label{cursor:pointer;overflow-wrap:anywhere}
body .studio-shell .asset-canvas-mode .ac-library-filters option{background:#242424}
body .studio-shell .asset-canvas-mode .ac-library-scroll{flex:1;overflow-y:auto;overflow-x:hidden;min-height:0;padding:0 12px 16px;scrollbar-width:thin;scrollbar-color:#454545 transparent}
body .studio-shell .asset-canvas-mode .ac-library-group{padding:0;margin:1px 0 7px;border:0;background:transparent}
body .studio-shell .asset-canvas-mode .ac-library-group>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:7px;height:36px;font-size:12px;color:var(--text-1);user-select:none}
body .studio-shell .asset-canvas-mode .ac-library-group>summary::-webkit-details-marker{display:none}
body .studio-shell .asset-canvas-mode .ac-library-group>summary>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body .studio-shell .asset-canvas-mode .ac-library-group>summary>.icon:first-child{width:11px;height:11px;transition:transform .15s;transform:rotate(-90deg);color:var(--text-3)}
body .studio-shell .asset-canvas-mode .ac-library-group[open]>summary>.icon:first-child{transform:rotate(0)}
body .studio-shell .asset-canvas-mode .ac-library-group>summary>.icon:nth-child(2){width:16px;height:16px;flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-group-more{border:0;background:transparent;color:var(--text-2);margin-left:auto;padding:0 4px;font-size:16px;opacity:0}
body .studio-shell .asset-canvas-mode .ac-library-group>summary:hover .ac-group-more,body .studio-shell .asset-canvas-mode .ac-group-more:focus-visible{opacity:1}
body .studio-shell .asset-canvas-mode .ac-library-image{display:flex;align-items:center;gap:10px;width:100%;border:1px solid transparent;text-align:left;background:transparent;border-radius:8px;color:var(--text-2);padding:5px 7px 5px 19px;font-size:12px;min-height:48px}
body .studio-shell .asset-canvas-mode .ac-library-image:hover{background:#292929;color:var(--text-1)}
body .studio-shell .asset-canvas-mode .ac-library-image.selected{background:#333;color:var(--text-1);border-color:#484848}
body .studio-shell .asset-canvas-mode .ac-library-image>span:last-of-type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body .studio-shell .asset-canvas-mode .ac-library-thumb{width:38px;height:40px;flex:0 0 38px;border-radius:6px;overflow:hidden;background:#303030;display:flex;align-items:center;justify-content:center}
body .studio-shell .asset-canvas-mode .ac-library-thumb img{width:100%;height:100%;object-fit:contain}
body .studio-shell .asset-canvas-mode .ac-unplaced-dot{height:5px;width:5px;flex:0 0 5px;margin-left:auto;background:var(--accent-purple);border-radius:50%}
body .studio-shell .asset-canvas-mode .ac-library-pending{margin:0 0 8px 19px;border:0;padding:5px 6px;display:flex;align-items:center;gap:9px;font-size:12px;color:var(--text-3);background:transparent;text-align:left}
body .studio-shell .asset-canvas-mode .ac-library-empty{padding:24px;text-align:center;color:var(--text-3);font-size:12px}
body .studio-shell .asset-canvas-mode .ac-library-grid .ac-library-group-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:3px 4px 9px 15px}
body .studio-shell .asset-canvas-mode .ac-library-grid .ac-library-image{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:7px;padding:5px;min-width:0}
body .studio-shell .asset-canvas-mode .ac-library-grid .ac-library-thumb{width:100%;height:99px;flex:0 0 99px}
body .studio-shell .asset-canvas-mode .ac-library-grid .ac-unplaced-dot{position:absolute;right:9px;top:9px}
body .studio-shell .asset-canvas-mode .ac-library-grid .ac-library-pending{grid-column:1/-1;margin:0}
body .studio-shell .asset-canvas-mode .ac-library-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0;height:48px;border-top:1px solid #353535;padding:0 15px;font-size:12px;color:var(--text-3)}
body .studio-shell .asset-canvas-mode .ac-library-footer button{display:flex;align-items:center;gap:7px;background:transparent;border:0;color:var(--text-2);padding:6px 0;font-size:12px}
body .studio-shell .asset-canvas-mode .ac-library-reopen{position:absolute;left:12px;top:14px;width:34px;height:34px;display:grid;place-items:center;border:1px solid #383838;border-radius:10px;background:#222;color:var(--text-1);z-index:25;box-shadow:0 2px 12px #0003}
body .studio-shell .asset-canvas-mode .ac-image-node{overflow:visible;border:1px solid #292929!important;background:#111!important;border-radius:23px;padding:12px;box-shadow:none!important}
body .studio-shell .asset-canvas-mode .ac-image-node.selected{border-color:#d7d7d7!important;box-shadow:0 0 0 2px #ffffff16!important}
body .studio-shell .asset-canvas-mode .ac-node-group-caption{position:absolute;top:-24px;left:0;width:100%;text-align:center;color:var(--text-2);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .studio-shell .asset-canvas-mode .ac-node-card{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;border:1px solid #363636;border-radius:18px;background:#202020;padding:8px}
body .studio-shell .asset-canvas-mode .ac-node-image{display:block!important;position:static!important;width:100%!important;height:0!important;min-height:0;flex:1;object-fit:contain!important;border-radius:12px!important;background:#151515!important;margin:0!important}
body .studio-shell .asset-canvas-mode .ac-node-image-actions{display:flex;gap:5px;padding:8px 0 5px}
body .studio-shell .asset-canvas-mode .ac-node-image-actions button{display:grid;place-items:center;border:1px solid #3a3a3a;border-radius:7px;background:#2b2b2b;color:var(--text-2);width:25px;height:25px;padding:4px}
body .studio-shell .asset-canvas-mode .ac-node-image-actions button:hover{background:#424242;color:var(--text-1)}
body .studio-shell .asset-canvas-mode .ac-node-image-actions .icon{width:12px;height:12px}
body .studio-shell .asset-canvas-mode .ac-node-name{font-size:12px;color:var(--text-1);line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 2px}
body .studio-shell .asset-canvas-mode .ac-node-episodes{font-size:12px;line-height:1.6;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 2px 2px}
body .studio-shell .asset-canvas-mode .ac-selection{position:absolute;inset:0;pointer-events:none;z-index:20}
body .studio-shell .asset-canvas-mode .ac-selection-tools{position:absolute;top:var(--ac-tools-top,18px);left:var(--ac-tools-left,50%);transform:translateX(-50%);max-width:calc(100% - 34px);display:flex;align-items:center;gap:3px;padding:7px 11px;background:#222;border:1px solid #383838;border-radius:25px;box-shadow:0 8px 22px #0005;pointer-events:auto;white-space:nowrap;z-index:4}
body .studio-shell .asset-canvas-mode .ac-selection-tools>button,body .studio-shell .asset-canvas-mode .ac-selection-tools>a,body .studio-shell .asset-canvas-mode .ac-tool-menu>summary{display:flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:8px;background:transparent;color:var(--text-2);font-size:12px;line-height:24px;padding:3px 7px;text-decoration:none;cursor:pointer;min-height:28px}
body .studio-shell .asset-canvas-mode .ac-selection-tools>button:hover,body .studio-shell .asset-canvas-mode .ac-selection-tools>a:hover,body .studio-shell .asset-canvas-mode .ac-tool-menu>summary:hover,body .studio-shell .asset-canvas-mode .ac-tool-menu[open]>summary{background:#383838;color:var(--text-1)}
body .studio-shell .asset-canvas-mode .ac-selection-tools>button:disabled,body .studio-shell .asset-canvas-mode .ac-selection-tools>button:disabled:hover{color:var(--text-3);background:transparent;opacity:1}
body .studio-shell .asset-canvas-mode .ac-tool-menu{position:relative}
body .studio-shell .asset-canvas-mode .ac-tool-menu>summary{list-style:none;user-select:none}
body .studio-shell .asset-canvas-mode .ac-tool-menu>summary::-webkit-details-marker{display:none}
body .studio-shell .asset-canvas-mode .ac-tool-menu>summary>.icon:last-child{width:12px;height:12px}
body .studio-shell .asset-canvas-mode .ac-tool-menu>summary>.icon:first-child{width:16px;height:16px}
body .studio-shell .asset-canvas-mode .ac-toolbar-divider{height:20px;width:1px;background:#414141;flex:0 0 1px;margin:0 3px}
body .studio-shell .asset-canvas-mode .ac-tool-options{position:absolute;top:calc(100% + 13px);left:0;min-width:174px;border:1px solid #424242;border-radius:13px;padding:6px;background:#292929;box-shadow:0 12px 32px #0006;z-index:6}
body .studio-shell .asset-canvas-mode .ac-more-menu .ac-tool-options{left:auto;right:0}
body .studio-shell .asset-canvas-mode .ac-tool-options button{display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;width:100%;background:transparent;border:0;border-radius:7px;min-height:34px;padding:7px 10px;font-size:12px;color:var(--text-1);white-space:nowrap}
body .studio-shell .asset-canvas-mode .ac-tool-options button:not(:disabled):hover{background:#3d3d3d}
body .studio-shell .asset-canvas-mode .ac-tool-options button:disabled{color:var(--text-3);opacity:1}
body .studio-shell .asset-canvas-mode .ac-tool-options small{font-size:12px;color:var(--text-3)}
body .studio-shell .asset-canvas-mode .ac-image-composer{position:absolute;bottom:88px;left:50%;transform:translateX(-50%);width:min(810px,calc(100% - 60px));max-height:50%;display:flex;flex-direction:column;padding:17px 20px 14px;border:1px solid #363636;border-radius:29px;background:#202020;box-shadow:0 10px 36px #0004;pointer-events:auto;overflow:visible}
body .studio-shell .asset-canvas-mode .ac-composer-top{display:flex;justify-content:flex-end;flex:0 0 10px;height:10px}
body .studio-shell .asset-canvas-mode .ac-composer-top button{display:grid;place-items:center;position:absolute;right:16px;top:14px;background:transparent;border:0;border-radius:5px;color:var(--text-3);width:23px;height:23px;padding:4px}
body .studio-shell .asset-canvas-mode .ac-composer-top button:hover{color:var(--text-1);background:#363636}
body .studio-shell .asset-canvas-mode .ac-image-composer textarea{resize:none!important;min-height:80px!important;height:130px;max-height:240px;flex:1;min-width:0;width:100%;border:0!important;background:transparent!important;padding:9px 8px 7px 0!important;outline:none!important;box-shadow:none!important;color:var(--text-1);font-size:12px;line-height:1.9;overflow:auto;scrollbar-width:thin;scrollbar-color:#4a4a4a transparent}
body .studio-shell .asset-canvas-mode .ac-image-composer textarea::placeholder{color:var(--text-3)}
body .studio-shell .asset-canvas-mode .ac-image-composer.is-expanded{max-height:calc(100% - 164px);height:calc(100% - 164px)}
body .studio-shell .asset-canvas-mode .ac-image-composer.is-expanded textarea{max-height:none}
/* 负责人亲测 C2: the image prompt box keeps one offset below its card; canvas-follow.js places it from its real size. */
body .studio-shell .asset-canvas-mode #ac-selection-host[data-follow] .ac-image-composer:not(.is-expanded){left:var(--ac-follow-left);top:var(--ac-follow-top);bottom:auto;transform:none}
body .studio-shell .asset-canvas-mode .ac-reference-strip{display:flex;flex-wrap:nowrap;gap:9px;max-width:calc(100% - 30px);overflow:auto;padding:2px 3px 8px;min-height:58px}
body .studio-shell .asset-canvas-mode .ac-reference-thumb{width:44px;height:48px;flex:0 0 44px;position:relative;border-radius:6px;background:#303030;border:1px solid #454545}
body .studio-shell .asset-canvas-mode .ac-reference-thumb img{width:100%;height:100%;border-radius:5px;object-fit:contain}
body .studio-shell .asset-canvas-mode .ac-reference-thumb button{position:absolute;top:-4px;right:-4px;background:#414141;border:1px solid #555;color:var(--text-1);font-size:12px;width:15px;height:15px;padding:0;border-radius:50%;line-height:12px}
body .studio-shell .asset-canvas-mode .ac-composer-controls{display:flex;align-items:center;gap:11px;min-height:35px;margin-top:4px;flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-composer-controls :where(ac-image-parameters,.ac-more-panel)>button,body .studio-shell .asset-canvas-mode .ac-composer-controls .ac-optimize{display:flex;align-items:center;justify-content:center;border:0;background:transparent;color:var(--text-2);min-width:20px;height:28px;padding:3px;border-radius:6px}
body .studio-shell .asset-canvas-mode .ac-composer-controls :where(ac-image-parameters,.ac-more-panel)>button:hover{background:#343434;color:var(--text-1)}
body .studio-shell .asset-canvas-mode .ac-model-label{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:210px}
body .studio-shell .asset-canvas-mode .ac-model-label .icon{width:14px;height:14px;flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-composer-controls select{min-height:27px;border:0;border-radius:8px;background:transparent;color:var(--text-1);font-size:12px;padding:3px 15px 3px 4px;width:auto}
body .studio-shell .asset-canvas-mode .ac-composer-controls select option{background:#262626}
body .studio-shell .asset-canvas-mode .ac-composer-controls>.ac-prompt-save{font-size:12px!important;white-space:nowrap;color:var(--text-2)!important;padding:3px 6px!important}
body .studio-shell .asset-canvas-mode .ac-generation-quote{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:12px;color:var(--text-1)}
body .studio-shell .asset-canvas-mode .ac-generation-quote .icon{height:12px;width:12px}
body .studio-shell .asset-canvas-mode .ac-generate{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;background:#f0f0f0;border:0;color:#222;border-radius:50%;padding:10px;box-shadow:0 0 0 3px #aaa0}
body .studio-shell .asset-canvas-mode .ac-generate:not(:disabled):hover{background:#fff;box-shadow:0 0 0 3px var(--accent-purple-soft)}
body .studio-shell .asset-canvas-mode .ac-generate:disabled{background:#383838;color:var(--text-3);opacity:1}
body .studio-shell .asset-canvas-mode .ac-spinner{display:block;border:2px solid #666;border-top-color:#ddd;border-radius:50%;height:16px;width:16px;animation:ac-spin .8s linear infinite}
@keyframes ac-spin{to{transform:rotate(360deg)}}
/* The image composer uses the same compact, upward-opening controls as the canvas. */
body .studio-shell .asset-canvas-mode .ac-composer-controls{gap:9px}
body .studio-shell .asset-canvas-mode ac-image-parameters>.ac-style-button{gap:5px;max-width:190px;min-width:55px;white-space:nowrap;justify-content:flex-start}
body .studio-shell .asset-canvas-mode .ac-style-button>span{overflow:hidden;text-overflow:ellipsis}
body .studio-shell .asset-canvas-mode .ac-composer-controls .icon{width:15px;height:15px;flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-composer-menu{position:relative;min-width:0;flex-shrink:1}
body .studio-shell .asset-canvas-mode .ac-composer-menu>summary{display:flex;align-items:center;gap:5px;max-width:190px;border-radius:6px;color:var(--text-2);cursor:pointer;list-style:none;white-space:nowrap;padding:3px 1px}
body .studio-shell .asset-canvas-mode .ac-composer-controls :is(.ac-style-button,.ac-composer-menu>summary){
  box-sizing:border-box;height:32px;font-size:12px;font-weight:500;line-height:16px;
}
body .studio-shell .asset-canvas-mode ac-image-parameters>[data-action="asset-canvas-reference-add"]{
  flex:0 0 32px;height:32px;padding:0;font-size:16px;font-weight:400;line-height:1;
}
body .studio-shell .asset-canvas-mode ac-image-parameters>[data-action="asset-canvas-reference-add"]>.icon{width:18px;height:18px}
body .studio-shell .asset-canvas-mode .ac-dimension-menu{flex-shrink:0}
body .studio-shell .asset-canvas-mode ac-image-parameters{display:flex;align-items:center;flex:1;min-width:32px;gap:inherit}
body .studio-shell .asset-canvas-mode ac-image-parameters>*{flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-composer-controls .credit-hint.credit-hint{flex-basis:auto;width:auto;min-width:32px;max-width:none}
body .studio-shell .asset-canvas-mode .ac-composer-controls .credit-action-pair:has(.ac-optimize)>.credit-hint{min-width:52px}

body .studio-shell .asset-canvas-mode ac-image-parameters>.ac-composer-menu{flex-shrink:0}
body .studio-shell .asset-canvas-mode ac-image-parameters>[data-action="asset-canvas-prompt-presets"]{margin-left:auto}
.ac-menu-label{display:none}
body .studio-shell .asset-canvas-mode ac-image-parameters>.ac-more-trigger{width:32px;height:32px;font-size:16px}
.ac-more-trigger:not([data-visible]){position:absolute;visibility:hidden;pointer-events:none}
body .studio-shell .asset-canvas-mode .ac-more-panel{
  position:fixed;inset:auto;margin:0;min-width:160px;max-width:calc(100vw - 16px);
  max-height:calc(100dvh - 16px);overflow:auto;padding:6px;
  border:1px solid #414141;border-radius:12px;background:#292929;color:var(--text-1);box-shadow:0 10px 30px #0007;
}
body .studio-shell .asset-canvas-mode .ac-more-panel>button,
body .studio-shell .asset-canvas-mode .ac-more-panel>.ac-composer-menu>summary{
  width:100%;max-width:none;height:34px;padding:4px 8px;gap:6px;justify-content:flex-start;font-size:12px;font-weight:500;
}
.ac-more-panel .ac-menu-label{display:inline}
.ac-more-panel:has(>details[open])>:not(details[open]){display:none!important}
body .studio-shell .asset-canvas-mode .ac-more-panel .ac-composer-popover{
  position:static;min-width:0;width:min(265px,calc(100vw - 52px));border:0;box-shadow:none;padding:0;
}
body .studio-shell .asset-canvas-mode .ac-composer-menu>summary::-webkit-details-marker{display:none}
body .studio-shell .asset-canvas-mode .ac-composer-menu>summary>.icon:last-child,body .studio-shell .asset-canvas-mode .ac-style-button>.icon:last-child{width:11px;height:11px}
body .studio-shell .asset-canvas-mode .ac-composer-menu[open]>summary,body .studio-shell .asset-canvas-mode .ac-composer-menu>summary:hover{background:#333;color:var(--text-1)}
body .studio-shell .asset-canvas-mode .ac-composer-popover{position:absolute;bottom:calc(100% + 12px);left:0;z-index:42;min-width:235px;max-height:min(450px,60vh);overflow:auto;padding:10px;border:1px solid #414141;border-radius:14px;background:#292929;box-shadow:0 10px 30px #0007;color:var(--text-1)}
body .studio-shell .asset-canvas-mode .ac-popover-label{font-size:12px;color:var(--text-2);padding:7px 6px 10px}
body .studio-shell .asset-canvas-mode .ac-model-menu .ac-composer-popover>button{display:flex;align-items:center;width:100%;gap:7px;padding:11px 9px;border:0;border-radius:8px;background:transparent;color:var(--text-1);text-align:left;font-size:12px}
body .studio-shell .asset-canvas-mode .ac-model-menu .ac-composer-popover>button>small{margin-left:auto;color:var(--text-3);font-size:12px;white-space:nowrap}
body .studio-shell .asset-canvas-mode .ac-model-menu .ac-composer-popover>button>b{font-size:12px;font-weight:400}
body .studio-shell .asset-canvas-mode .ac-composer-popover button:hover,body .studio-shell .asset-canvas-mode .ac-composer-popover button.selected{background:#444}
body .studio-shell .asset-canvas-mode .ac-size-options{display:flex;gap:8px;padding:0 5px 7px}
body .studio-shell .asset-canvas-mode .ac-size-options button{flex:1;padding:7px 12px;border:1px solid #484848;border-radius:7px;color:var(--text-1);background:transparent;font-size:12px}
body .studio-shell .asset-canvas-mode .ac-size-options button.selected{border-color:#c5c5c5}
body .studio-shell .asset-canvas-mode .ac-ratio-options{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:0 5px 8px}
body .studio-shell .asset-canvas-mode .ac-ratio-options button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;min-height:63px;border:1px solid #444;border-radius:8px;background:transparent;color:var(--text-2);font-size:12px}
body .studio-shell .asset-canvas-mode .ac-ratio-options button.selected{border-color:#c5c5c5;color:var(--text-1)}
body .studio-shell .asset-canvas-mode .ac-ratio-options i{display:block;height:23px;max-width:42px;border:1px solid currentColor;border-radius:2px}
body .studio-shell .asset-canvas-mode .ac-dimension-menu .ac-composer-popover{left:auto;right:0;width:265px}
.ac-prompt-presets{min-height:260px}.ac-preset-transfer{display:flex;justify-content:flex-end;gap:8px;margin-top:-8px;margin-bottom:14px}.ac-preset-import{cursor:pointer}.ac-preset-search{display:flex;align-items:center;gap:10px;margin-bottom:18px}.ac-preset-search input{flex:1;min-width:0}.ac-preset-search>.btn{white-space:nowrap}.ac-presets-empty{display:grid;place-items:center;min-height:200px;color:var(--text-3);font-size:13px}#ac-preset-results{max-height:52vh;overflow:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#ac-preset-results>.ac-presets-empty{grid-column:1/-1}.ac-saved-preset{display:flex;flex-direction:column;border:1px solid #3b3b3b;border-radius:13px;background:#252525;padding:14px;min-width:0}.ac-saved-preset>div{display:flex;align-items:center;gap:8px}.ac-saved-preset strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ac-saved-preset small{font-size:12px;color:var(--text-2)}.ac-saved-preset>div>button{margin-left:auto;background:none;border:0;color:var(--text-2);padding:0}.ac-saved-preset>div>button[aria-pressed=true]{color:var(--accent-purple)}.ac-saved-preset p{white-space:pre-wrap;overflow:auto;max-height:130px;min-height:60px;line-height:1.7;font-size:12px;color:var(--text-2)}.ac-saved-preset footer{display:flex;align-items:center;gap:6px;margin-top:auto}.ac-saved-preset footer>.btn:last-child{margin-left:auto}.ac-preset-editor{display:grid;gap:14px}.ac-preset-editor label{display:grid;gap:8px;font-size:12px;color:var(--text-2)}.ac-preset-editor textarea{resize:vertical;min-height:180px}
@media(max-width:900px){body .studio-shell .asset-canvas-mode .ac-composer-controls{gap:6px}body .studio-shell .asset-canvas-mode ac-image-parameters>.ac-style-button{max-width:135px}body .studio-shell .asset-canvas-mode .ac-model-menu>summary{max-width:145px}}
@media(max-width:650px){#ac-preset-results{grid-template-columns:1fr}body .studio-shell .asset-canvas-mode .ac-model-menu .ac-composer-popover{left:auto;right:0}}
body .studio-shell .asset-canvas-mode .native-canvas-tools,body .studio-shell .asset-canvas-mode .native-canvas-viewport-tools{bottom:18px;border-radius:24px;border:1px solid #3b3b3b;background:#242424;box-shadow:0 2px 13px #0003;z-index:21}
body .studio-shell .asset-canvas-mode .native-canvas-tools{left:50%;transform:translateX(-50%);gap:6px;padding:7px}
body .studio-shell .asset-canvas-mode .native-canvas-viewport-tools{left:16px;padding:6px 8px;gap:3px}
body .studio-shell .asset-canvas-mode .canvas-empty{pointer-events:none;color:var(--text-3)}
body .studio-shell .asset-canvas-mode .canvas-empty h3{font-weight:500;font-size:16px}
body .studio-shell .asset-canvas-mode .canvas-empty p{font-size:12px;color:var(--text-3)}
@media(max-width:1350px){body .studio-shell .asset-canvas-mode{--ac-library-width:264px}body .studio-shell .asset-canvas-mode .ac-selection-tools{gap:0;padding:6px 8px}body .studio-shell .asset-canvas-mode .ac-tool-menu>summary{font-size:12px;gap:4px;padding:3px 5px}body .studio-shell .asset-canvas-mode .ac-tool-menu>summary>.icon:first-child{display:none}body .studio-shell .asset-canvas-mode .ac-image-composer{width:calc(100% - 36px);padding:15px 16px 13px}body .studio-shell .asset-canvas-mode .ac-composer-controls{gap:7px}body .studio-shell .asset-canvas-mode .ac-model-label{font-size:12px;max-width:158px}body .studio-shell .asset-canvas-mode .ac-prompt-save{display:none!important}}
@media(max-width:1050px){body .studio-shell .asset-canvas-mode{--ac-library-width:235px}body .studio-shell .asset-canvas-mode .ac-library-heading{gap:6px;padding:17px 12px 12px}body .studio-shell .asset-canvas-mode .ac-unplaced{font-size:12px;padding:5px 7px}body .studio-shell .asset-canvas-mode .ac-selection-tools{max-width:calc(100% - 18px);flex-wrap:wrap;justify-content:center;border-radius:17px}body .studio-shell .asset-canvas-mode .ac-image-composer{bottom:80px;border-radius:21px}body .studio-shell .asset-canvas-mode .ac-generation-quote{font-size:12px}body .studio-shell .asset-canvas-mode .ac-model-label{max-width:126px}body .studio-shell .asset-canvas-mode .native-canvas-tools{bottom:18px;left:auto;right:12px;transform:none}body .studio-shell .asset-canvas-mode .native-canvas-viewport-tools{left:10px}body .studio-shell .asset-canvas-mode .native-canvas-viewport-tools .btn{padding:4px;min-width:24px}}
@media(max-width:760px){body .studio-shell .asset-canvas-mode .ac-library{position:absolute;inset:0 auto 0 0;width:270px;box-shadow:14px 0 28px #0005;z-index:29}body .studio-shell .asset-canvas-mode .ac-selection-tools{top:10px}body .studio-shell .asset-canvas-mode .ac-image-composer{width:calc(100% - 24px);bottom:72px}body .studio-shell .asset-canvas-mode .ac-image-composer textarea{height:100px}body .studio-shell .asset-canvas-mode .ac-composer-controls{gap:5px}body .studio-shell .asset-canvas-mode .ac-model-label{max-width:115px}body .studio-shell .asset-canvas-mode .native-canvas-viewport-tools [data-action="native-canvas-edges"],body .studio-shell .asset-canvas-mode .native-canvas-viewport-tools [data-action="native-canvas-map"]{display:none}}
@container canvas-stage (max-width:340px){
  body .studio-shell .asset-canvas-mode .ac-image-composer{width:calc(100% - 12px);padding-inline:10px}
  body .studio-shell .asset-canvas-mode .ac-composer-controls,
  body .studio-shell .asset-canvas-mode .ac-composer-controls .credit-action-pair{gap:3px}
}
@media(prefers-reduced-motion:reduce){body .studio-shell .asset-canvas-mode .ac-spinner{animation:none}body .studio-shell .asset-canvas-mode .ac-library-group>summary>.icon:first-child{transition:none}}

.ac-reference-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;max-height:55vh;overflow:auto}.ac-reference-picker label{display:flex;flex-direction:column;position:relative;gap:8px;cursor:pointer}.ac-reference-picker input{position:absolute;right:8px;top:8px}.ac-reference-picker img{width:100%;height:140px;object-fit:contain;background:#171717;border-radius:12px}.ac-reference-picker span{font-size:12px}.ac-preview-image{display:block;max-width:100%;max-height:70vh;margin:auto;object-fit:contain}.ac-view-presets{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.ac-job-status{position:absolute;right:20px;bottom:68px;color:var(--text-2);background:#292929;border-radius:12px;padding:10px 16px;z-index:22;font-size:12px}body .studio-shell .asset-canvas-mode .ac-image-composer.expanded textarea{height:min(45vh,350px)}

/* Preset actions retain one explicit, price-bearing submission control. */
body .studio-shell .asset-canvas-mode .ac-character-action{position:absolute;bottom:88px;left:50%;transform:translateX(-50%);width:min(640px,calc(100% - 36px));height:64px;display:flex;align-items:center;gap:16px;padding:10px 14px;border:1px solid #363636;border-radius:26px;background:#202020ed;box-shadow:0 10px 30px #0003;pointer-events:auto}
body .studio-shell .asset-canvas-mode .ac-character-action>button:not(.ac-generate){border:0;background:transparent;color:var(--text-2);font-size:20px;padding:4px 8px;flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-character-action input{min-width:0;flex:1;border:0;background:transparent;box-shadow:none;padding:0;color:var(--text-1);font-size:14px;outline:none}
body .studio-shell .asset-canvas-mode .ac-character-action .ac-generation-quote{max-width:180px;overflow:hidden;text-overflow:ellipsis;display:block}
body .studio-shell .asset-canvas-mode .ac-image-job{border:1px solid #777;border-radius:22px;background:radial-gradient(#ffffff24 .6px,transparent .6px),linear-gradient(130deg,#676b6c,#969c9d);background-size:9px 9px,100% 100%;overflow:visible}
body .studio-shell .asset-canvas-mode .ac-job-content{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:var(--text-1);font-size:13px;text-align:center;padding:20px}
body .studio-shell .asset-canvas-mode .ac-job-content button{border:1px solid #bbb;color:var(--text-1);background:transparent;border-radius:18px;padding:3px 12px;font-size:12px}
body .studio-shell .asset-canvas-mode .ac-job-content small{font-size:12px;max-width:100%;overflow-wrap:anywhere}
body .studio-shell .asset-canvas-mode .ac-derived-edge>path:first-child{stroke:var(--accent-purple);stroke-width:2;stroke-dasharray:6 6;fill:none}

.ac-host-style .native-style-panel{position:static;width:100%;min-width:0;box-shadow:none;display:flex;flex-direction:column;gap:20px;height:440px;max-height:65vh;background:#262626;border-radius:18px;padding:18px;overflow:hidden}.ac-host-style .native-style-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.ac-host-style .native-style-body{min-height:0}

/* Subject cards and generated image nodes follow separate canvas controls. */
/* Other image cards keep their existing compact density. Character cards use
   the measured 362 x 468 reference size and unscaled controls. */
body .studio-shell .asset-canvas-mode .ac-image-node{--ac-control-scale:.7;padding:6px;border-radius:28px;background:#222!important}
body .studio-shell .asset-canvas-mode .ac-card-character{--ac-control-scale:1;background:#1c1c1c!important}
body .studio-shell .asset-canvas-mode .ac-node-group-caption{top:-27px;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;overflow:visible}
.ac-node-group-caption>span{overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
body .studio-shell .asset-canvas-mode .ac-node-group-caption>.icon{width:14px;height:14px;flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-node-group-caption button{background:transparent;border:0;border-radius:50%;color:var(--text-2);padding:0;display:grid;place-items:center;width:18px;height:18px;flex:0 0 18px}
body .studio-shell .asset-canvas-mode .ac-node-group-caption button .icon{width:12px;height:12px}
body .studio-shell .asset-canvas-mode .ac-node-card{border:0;padding:0;border-radius:22px;overflow:visible;background:transparent;gap:0}
.ac-node-visual{position:relative;display:flex;flex:1;min-height:0;overflow:hidden;border-radius:22px;background:#111;padding:8px}
body .studio-shell .asset-canvas-mode .ac-node-visual .ac-node-image{height:100%!important;width:100%!important;flex:auto;background:transparent!important;border-radius:4px!important}
.ac-node-corners{position:absolute;left:8px;top:8px;display:flex;flex-direction:column;gap:4px}
body .studio-shell .asset-canvas-mode .ac-node-corners button{border:0;border-radius:50%;width:32px;height:32px;min-width:32px;min-height:32px;padding:0;display:grid;place-items:center;background:#eeeeeef0;color:#333;font-size:16px;line-height:1}
body .studio-shell .asset-canvas-mode .ac-node-corners .icon{width:16px;height:16px}
.ac-node-sources{display:flex;gap:6px;padding:12px 10px 8px;flex-shrink:0}
body .studio-shell .asset-canvas-mode .ac-node-sources button{border:1px solid #3a3a3a;border-radius:16px;background:#292929;color:var(--text-1);width:50px;height:50px;flex:0 0 50px;padding:0;display:grid;place-items:center}
body .studio-shell .asset-canvas-mode .ac-node-sources .icon{width:20px;height:20px}
body .studio-shell .asset-canvas-mode .ac-node-sources [data-action="asset-canvas-card-materials"]{color:var(--text-3)}
body .studio-shell .asset-canvas-mode .ac-node-sources [data-action="asset-canvas-card-materials"] .icon{width:16px;height:16px}
.ac-node-footer{display:flex;gap:8px;align-items:center;padding:8px 10px 12px;min-width:0;flex-shrink:0}
.ac-node-footer>div{min-width:0;flex:1}
body .studio-shell .asset-canvas-mode .ac-node-footer button{border:0;border-radius:8px;background:transparent;color:var(--text-2);width:24px;height:24px;flex:0 0 24px;padding:0;display:grid;place-items:center}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-footer button{width:22px;height:22px;flex-basis:22px}
body .studio-shell .asset-canvas-mode .ac-node-footer button .icon{width:18px;height:18px}
body .studio-shell .asset-canvas-mode .ac-node-footer button:hover{background:#383838}
body .studio-shell .asset-canvas-mode .ac-node-name{font-size:12px}
body .studio-shell .asset-canvas-mode .ac-node-episodes{font-size:12px}
body .studio-shell .asset-canvas-mode .ac-card-image{padding:0;background:#161616!important}
body .studio-shell .asset-canvas-mode .ac-card-image .ac-node-visual{padding:0;background:transparent}
/* Leave room for the full-size selected role card above its prompt editor. */
body .studio-shell .asset-canvas-mode .ac-selection[data-card-kind="character"] .ac-image-composer{bottom:56px}
/* Measured character internals: 309px image well, 50px source strip and 42px footer. */
body .studio-shell .asset-canvas-mode .ac-card-character{padding:8px 8px 24px;border-color:#ffffff0a!important}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-card{gap:16px}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-visual{align-items:center;justify-content:center;background:#0000004d}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-image{width:auto!important;height:auto!important;max-width:100%;max-height:100%;flex:0 1 auto;border:1px solid #ffffff0a}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-sources{padding:0 12px;margin-top:1px}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-sources button{background:#ffffff0a;border-color:#ffffff14;color:var(--text-1);font-size:12px;font-weight:500;line-height:13.8px}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-sources [data-action="asset-canvas-card-materials"]{color:var(--text-3)}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-footer{flex:0 0 42px;align-items:start;gap:12px;padding:0 12px}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-footer>div{display:flex;flex-direction:column;gap:2px}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-name{display:flex;align-items:center;height:22px;font-size:13px;line-height:18.2px;padding:0;color:var(--text-1)}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-episodes{font-size:12px;line-height:16.8px;padding:0;color:var(--text-3)}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-footer button{font-size:13px;line-height:15.3333px;color:var(--text-2)}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-group-caption{top:-23.7143px;left:-1px;width:calc(100% + 2px);height:18px;padding-left:4px;font-size:13px;line-height:16px}
body .studio-shell .asset-canvas-mode .ac-card-character .ac-node-group-caption button{color:var(--text-1);border:1px solid transparent;border-radius:32px;font-size:13px;font-weight:500;line-height:14.95px}
/* Native card controls: source strip/footer persist; corners and tags follow
   hover/selection. Hidden controls cannot intercept image clicks or tab focus. */
body .studio-shell .asset-canvas-mode .ac-node-corners,
body .studio-shell .asset-canvas-mode .ac-node-group-caption button{opacity:0;visibility:hidden;pointer-events:none;transition:opacity .15s ease,visibility .15s}
body .studio-shell .asset-canvas-mode .ac-image-node:is(:hover,.selected,:focus-visible,:has(button:focus-visible)) .ac-node-corners,
body .studio-shell .asset-canvas-mode .ac-image-node:is(:hover,.selected,:focus-visible,:has(button:focus-visible)) .ac-node-group-caption button{opacity:1;visibility:visible;pointer-events:auto}
body .studio-shell .asset-canvas-mode [data-action="asset-canvas-connect"]{position:absolute;top:50%;transform:translateY(-50%);width:68px;height:68px;padding:0;display:grid;place-items:center;border:0;background:transparent;color:var(--text-1);z-index:2;outline-offset:-20px}
body .studio-shell .asset-canvas-mode .ac-node-connector-right{right:-56px}
body .studio-shell .asset-canvas-mode .ac-node-connector-left{left:-56px}
body .studio-shell .asset-canvas-mode .ac-node-connector>span{display:grid;place-items:center;width:24px;height:24px;border:1px solid #373737;border-radius:50%;background:#222;opacity:0;transform:scale(.72);transition:opacity .15s ease,transform .15s ease;pointer-events:none}
body .studio-shell .asset-canvas-mode .ac-node-connector .icon{width:12px;height:12px}
body .studio-shell .asset-canvas-mode .ac-image-node:is(:hover,.selected,:focus-visible,:has(button:focus-visible)) .ac-node-connector>span{opacity:1;transform:scale(1)}
body .studio-shell .asset-canvas-mode :is(.ac-node-corners,.ac-node-sources button,.ac-node-footer button,.ac-node-group-caption button,.ac-node-connector){zoom:var(--ac-control-scale)}
body .studio-shell .asset-canvas-mode .ac-node-group-caption>.icon{zoom:var(--ac-control-scale)}
@media(prefers-reduced-motion:reduce){body .studio-shell .asset-canvas-mode :is(.ac-node-corners,.ac-node-group-caption button,.ac-node-connector>span){transition:none}}
/* Label strokes belong to the existing element, never an added inner frame. */
body .studio-shell .asset-canvas-mode .ac-image-node.ac-has-labels{border-color:var(--ac-tag-color)!important;outline:2px solid var(--ac-tag-color);outline-offset:0}
.ac-node-labels{position:absolute;bottom:calc(100% + 4px);left:36px;display:flex;align-items:flex-end;max-width:calc(100% - 72px);height:20px;min-height:20px;box-sizing:border-box;color:rgba(0,0,0,.8);font:400 13px/16px var(--font-sans);white-space:nowrap;isolation:isolate;z-index:3;pointer-events:none}
.ac-node-label-title,.ac-node-label-tab{position:relative;display:block;flex:0 1 auto;min-width:28px;height:20px;padding:4px 12px 0 8px;box-sizing:border-box;border-radius:14px 14px 0 0;overflow:hidden;text-overflow:ellipsis}
.ac-node-label-title{min-width:48px;background:var(--ac-tag-color);z-index:8}
.ac-node-label-name:before{content:'·';margin:0 4px}
.ac-node-label-title:after{content:'';position:absolute;left:0;right:0;bottom:-3px;height:3px;background:inherit}
.ac-node-label-tab{margin-left:-8px;padding-left:14px;background:var(--label-color);z-index:calc(7 - var(--label-index))}
.ac-node-label-more{flex-shrink:0;background:#d4d4d4}
.ac-label-popover,.ac-label-colors,.ac-label-confirm{font:400 14px/21px var(--font-sans);box-sizing:border-box;color:var(--text-1);-webkit-font-smoothing:antialiased}
.ac-label-popover,.ac-label-colors{position:fixed;z-index:140;width:288px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);background:rgba(38,38,38,.8);border:1px solid rgba(255,255,255,.04);border-radius:24px;padding:8px;box-shadow:0 8px 40px #00000014,0 0 0 .5px #ffffff14;backdrop-filter:blur(24px);outline:none}
.ac-label-popover[hidden]{display:none}
.ac-label-popover *,.ac-label-colors *,.ac-label-confirm *{box-sizing:border-box}
.ac-label-popover button,.ac-label-colors button,.ac-label-confirm button{font:inherit;cursor:pointer;color:inherit;background:none;border:1px solid transparent;padding:0;display:inline-flex;align-items:center;justify-content:center}
.ac-label-popover svg{width:16px;height:16px;flex-shrink:0;pointer-events:none}
.ac-label-popover button:focus-visible,.ac-label-row:focus-visible{outline:2px solid #ffffff80;outline-offset:1px}
.ac-label-options{max-height:288px;overflow:auto;overscroll-behavior:contain;margin:0 -8px;scrollbar-width:thin;scrollbar-color:#ffffff14 transparent}
.ac-label-options>[role=menu]{display:flex;flex-direction:column;gap:4px;padding:0 8px}
.ac-label-row{display:flex;align-items:center;gap:4px;padding:2px 8px;border:1px solid transparent;border-radius:16px;height:38px;min-height:38px;font-size:13px;line-height:19.5px;outline:none;cursor:pointer}
.ac-label-row:hover{background:#ffffff0a}
.ac-label-popover .ac-label-swatch{flex:none;width:32px;height:32px;padding:7px;border:1px solid #ffffff1f;border-radius:32px;background:transparent}
.ac-label-swatch:hover{border-color:#ffffff33}
.ac-label-swatch span{display:block;width:16px;height:16px;border-radius:50%;background:var(--swatch)}
.ac-label-name{min-width:0;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ac-label-name>span{display:block;overflow:hidden;text-overflow:ellipsis}
.ac-label-check{flex:none;display:grid;place-items:center;width:16px;height:16px;border:1px solid #ffffff33;border-radius:5px;background:transparent}
.ac-label-check svg{width:14px;height:14px}
.ac-label-row[aria-checked=true] .ac-label-check{background:#fff;color:#000;border-color:#fff}
.ac-label-popover .ac-label-delete{width:24px;height:24px;flex:none;border-radius:50%;opacity:0;pointer-events:none}
.ac-label-delete svg{width:14px;height:14px}
.ac-label-row:hover .ac-label-delete,.ac-label-delete:focus-visible{opacity:1;pointer-events:auto}
.ac-label-delete:hover{background:#ffffff14}
.ac-label-popover .ac-label-add{margin-top:4px;justify-content:flex-start;gap:8px;width:100%;height:32px;min-height:32px;padding:0 8px;border-radius:16px;font-size:12px;line-height:13.8px;font-weight:500}
.ac-label-add:hover{background:#ffffff0a}
.ac-label-name input{min-width:0;width:100%;border:0;border-radius:0;background:transparent;color:inherit;padding:0;outline:none;box-shadow:none;font:inherit;height:auto}
.ac-label-new .ac-label-name{border:1px solid #ffffff33;border-radius:32px;padding:5px 12px;background:#ffffff14}
.ac-label-new:has(input[aria-invalid=true]) .ac-label-name{border-color:#e15858;box-shadow:0 0 0 4px #e1585833}
.ac-label-error{color:#e15858;font-size:12px;line-height:18px;padding:0 8px 0 44px;margin:0}
.ac-label-colors{z-index:141;padding:16px;display:flex;flex-direction:column;gap:12px;overflow:auto}
.ac-label-palette{display:flex;justify-content:space-between;gap:8px;padding:0 0 12px;border-bottom:1px solid #ffffff1f;margin-bottom:0}
.ac-label-colors .ac-label-palette button{width:24px;height:24px;border-radius:32px;background:var(--swatch);flex:none}
.ac-label-palette button[aria-pressed=true]{outline:2px solid #fff;outline-offset:3px}
.ac-label-sv{position:relative;height:128px;min-height:128px;border:1px solid #ffffff1f;border-radius:20px;touch-action:none;cursor:crosshair;overflow:hidden;outline:none}
.ac-label-sv:before,.ac-label-sv:after{content:"";position:absolute;inset:0;pointer-events:none}
.ac-label-sv:before{background:linear-gradient(to right,rgba(255,255,255,.95),transparent)}
.ac-label-sv:after{background:linear-gradient(to top,rgba(0,0,0,.8),transparent)}
.ac-label-sv i{position:absolute;z-index:2;width:12px;height:12px;border:2px solid #fff;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
.ac-label-hue{display:flex;align-items:center;gap:12px;margin:0;height:28px;min-height:28px}
.ac-label-hue span{width:28px;height:28px;border-radius:50%;flex:none}
.ac-label-hue input{appearance:none;height:12px;min-width:0;border:0;border-radius:32px;width:100%;padding:0;margin:0;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}
.ac-label-hue input::-webkit-slider-thumb{appearance:none;width:14px;height:14px;border:2px solid white;border-radius:50%;background:transparent;box-shadow:0 0 2px #222}
.ac-label-colors .ac-label-hex{width:100%;height:36px;min-height:36px;background:#ffffff14;border:1px solid #ffffff33;border-radius:32px;padding:4px 12px;color:var(--text-1);font:400 14px/16.1px var(--font-sans);outline:none}
.ac-label-hex:focus{border-color:#ffffff66;box-shadow:0 0 0 4px #ffffff14}
.ac-label-colors .ac-label-hex[aria-invalid=true]{border-color:#e15858;box-shadow:0 0 0 4px #e1585833}
.ac-label-colors footer,.ac-label-confirm footer{display:flex;justify-content:flex-end;gap:8px}
.ac-label-colors footer button{min-width:64px;height:32px;padding:1px 14px;border-radius:32px;font-size:12px;line-height:13.8px;font-weight:500}
.ac-label-colors footer button:hover{background:#ffffff0a}
.ac-label-colors [data-label-color-apply]{background:#f4f4f5;color:#000}
.ac-label-colors [data-label-color-apply]:hover{background:#fff}
.ac-label-colors [data-label-color-apply]:disabled{background:#ffffff14;color:var(--text-4);cursor:default}
.ac-label-confirm-backdrop{position:fixed;inset:0;background:#0008;backdrop-filter:blur(4px);z-index:142;display:grid;place-items:center}
.ac-label-confirm{width:448px;max-width:calc(100vw - 32px);padding:24px;background:#1c1c1c;border-radius:32px}
.ac-label-confirm h2{font:500 16px/24px var(--font-sans);margin:0 0 6px}
.ac-label-confirm p{font:400 13px/19.5px var(--font-sans);margin:0;color:var(--text-2)}
.ac-label-confirm footer{margin-top:24px}
.ac-label-confirm button{height:36px;min-width:72px;border-radius:32px;padding:1px 16px;font-size:12px;line-height:13.8px;font-weight:500;background:#ffffff14;border-color:#ffffff0a}
.ac-label-confirm [data-label-confirm-delete]{background:#e15858;border-color:transparent}

.appearance-card-modal{width:min(780px,95vw)}
.ap-card-editor{display:grid;grid-template-columns:240px 1fr;gap:24px}
.ap-card-editor.ap-card-scene{display:block;max-width:500px;margin:auto}
.ap-card-media{min-width:0;color:var(--text-2);font-size:12px;word-break:break-word}
.ap-card-media>button{width:100%;height:280px;position:relative;border:0;background:#151515;border-radius:16px;overflow:hidden;margin-bottom:12px;padding:10px}
.ap-card-media>button img{width:100%;height:100%;object-fit:contain}
.ap-card-media>button span{position:absolute;top:10px;left:10px;background:#303030bb;color:var(--text-1);border-radius:5px;padding:2px 6px}
.ap-card-fields{display:flex;flex-direction:column;gap:15px;min-width:0}
.ap-card-fields>label{display:flex;flex-direction:column;gap:8px;color:var(--text-2);font-size:12px}
.ap-card-fields input:not([type=radio]):not([type=checkbox]),.ap-card-fields textarea,.ap-card-fields select{width:100%;font-size:13px}
.ap-card-episodes{border:1px solid #3b3b3b;border-radius:8px;padding:10px;font-size:12px}
.ap-card-episodes summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none}
.ap-card-episodes summary span{margin-left:auto;color:var(--text-2)}.ap-card-episodes>div{padding:10px;display:flex;gap:12px;flex-wrap:wrap}
.ap-card-voice{border:0;padding:0;margin:0;display:grid;gap:10px}.ap-card-voice legend{color:var(--text-2);font-size:12px;margin-bottom:10px}
.ap-voice-choice{border:1px solid #414141;border-radius:12px;padding:10px;display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0}.ap-voice-choice.selected{border-color:var(--accent-purple)}
.ap-voice-choice textarea{background:transparent!important;border:0!important;resize:vertical}.ap-voice-choice>label{display:flex;align-items:center;gap:5px;font-size:12px}.ap-voice-choice select{width:auto;max-width:190px;margin-left:auto}.ap-voice-choice audio{width:100%;height:36px}.ap-voice-choice .ap-actions{width:100%;justify-content:center}
@media(max-width:640px){.ap-card-editor{grid-template-columns:1fr}.ap-card-media>button{height:180px}}

/* Compact appearance panel measured against the reference at 1671 x 798.
   Explicit save/cancel remains below the 640px content panel. */
#modal.appearance-card-modal:has(.ap-card-character){width:min(880px,calc(100vw - 24px));max-width:880px;max-height:calc(100dvh - 24px);border:0;border-radius:28px;background:#1c1c1c}
.appearance-card-modal:has(.ap-card-character) .modal-head{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;border:0}
.appearance-card-modal:has(.ap-card-character) .modal-body{padding:0;overflow:visible;max-height:none;flex:0 0 auto}
.appearance-card-modal:has(.ap-card-character) .modal-head button{display:none}
.appearance-card-modal:has(.ap-card-character) .modal-foot{min-height:56px;padding:8px 20px;border-top:1px solid #ffffff14;background:#1c1c1c}
.ap-card-editor.ap-card-character{display:grid;grid-template-columns:392px minmax(0,1fr);gap:16px;height:min(640px,calc(100dvh - 80px));padding:20px;font-family:var(--font-sans);font-size:12px;font-weight:400;line-height:18px}
.ap-card-character .ap-card-media{min-width:0;min-height:0;display:flex;flex-direction:column;padding:16px;background:#0a0a0a;border-radius:24px;color:var(--text-2);font-size:14px;line-height:20px;overflow:auto}
.ap-card-character .ap-card-media>button{width:172px;height:230px;flex:none;position:relative;border:1px solid #ffffff1f;background:#1c1c1c;border-radius:14px;overflow:hidden;margin:0 0 4px;padding:0}
.ap-card-character .ap-card-media>button img{width:100%;height:100%;object-fit:contain}
.ap-card-character .ap-card-media>button span{position:absolute;top:8px;left:8px;background:#0009;color:var(--text-1);border-radius:31px;min-width:36px;padding:0 5px;font-size:12px;line-height:20px}
.ap-card-character .ap-card-media>button+div{width:172px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ap-card-character .ap-card-media-spacer{flex:1}
.ap-card-character .ap-card-fields{display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0;overflow:auto;padding:20px 22px 20px 20px;background:#0a0a0a;border-radius:24px}
.ap-card-character .ap-card-fields>label{display:flex;flex-direction:column;gap:8px;margin:0;color:var(--text-3);font-size:12px;line-height:16px}
.ap-card-character .ap-card-fields input:not([type=radio]):not([type=checkbox]),.ap-card-character .ap-card-fields select{width:100%;height:36px;padding:8px 12px;font-size:12px;font-weight:500;line-height:18px;background:#161616;border:1px solid #ffffff26;border-radius:20px}
.ap-card-character .ap-card-episodes{border:0;padding:0;border-radius:0;font-size:12px;line-height:16px;color:var(--text-3)}
.ap-card-character .ap-card-episodes summary{display:flex;flex-wrap:wrap;align-items:center;cursor:pointer;list-style:none;gap:8px}
.ap-card-character .ap-card-episodes summary span{margin-left:0;display:block;order:2;flex-basis:100%;height:36px;padding:8px 12px;background:#161616;border:1px solid #ffffff26;border-radius:20px;color:var(--text-1)}
.ap-card-character .ap-card-episodes summary svg{margin-left:auto;width:12px;height:12px}.ap-card-character .ap-card-episodes>div{padding:10px;display:flex;gap:12px;flex-wrap:wrap}
.ap-card-voice{border:0;padding:0;margin:0;display:grid;gap:8px;min-width:0}.ap-card-voice legend{color:var(--text-3);font-size:12px;line-height:18px;margin-bottom:14px}
.ap-voice-choice{border:0;border-radius:20px;padding:4px;display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;background:#222;color:var(--text-3)}
.ap-voice-choice:focus-within{outline:1px solid #ffffff40}
.ap-card-character .ap-card-fields .ap-voice-choice textarea{width:100%;height:108px;min-height:108px;padding:10px 12px;background:#ffffff14!important;border:0!important;border-radius:16px;resize:none;font:400 12px/18px var(--font-sans);letter-spacing:normal;color:var(--text-2)}
.ap-voice-choice>label{display:flex;align-items:center;gap:8px;font-size:12px;line-height:18px;cursor:pointer}.ap-voice-choice input[type=radio]{margin:0;width:16px;height:16px;accent-color:var(--accent-purple)}.ap-voice-choice.selected>label{color:var(--text-2)}
.ap-card-character .ap-card-fields .ap-voice-choice select{width:auto;max-width:190px;margin-left:auto;height:18px;padding:0 4px;border:0;border-radius:4px;background:transparent;font-weight:400;color:var(--text-2)}
.ap-voice-choice audio{width:100%;height:36px}.ap-voice-choice .ap-actions,.ap-audio-unavailable{width:100%;height:128px;border:1px solid #ffffff1f;border-radius:20px;background:#1c1c1c;display:flex;align-items:center;justify-content:center;gap:16px}
.ap-audio-unavailable{flex-direction:column;gap:6px;color:var(--text-1)}.ap-audio-unavailable small{font-size:12px;color:var(--text-3)}
@media(max-width:760px){.ap-card-editor.ap-card-character{grid-template-columns:minmax(160px,40%) minmax(0,1fr);gap:12px;padding:12px}.ap-card-character .ap-card-media,.ap-card-character .ap-card-fields{padding:12px}.ap-card-character .ap-card-media>button{width:100%;height:auto;aspect-ratio:3/4}}
@media(max-width:560px){.ap-card-editor.ap-card-character{grid-template-columns:1fr;height:auto;max-height:calc(100dvh - 80px);overflow:auto}.ap-card-character .ap-card-media{min-height:190px;flex-direction:row;gap:12px;align-items:start}.ap-card-character .ap-card-media>button{width:110px;height:147px}.ap-card-character .ap-card-media>button+div{width:auto;flex:1;white-space:normal}.ap-card-character .ap-card-media-spacer{display:none}.ap-card-character .ap-card-fields{overflow:visible}.ap-voice-choice select{max-width:160px}}

.appearance-voice-modal{width:min(680px,95vw)}.ap-voice-studio>label{display:flex;flex-direction:column;gap:10px;color:var(--text-2);font-size:13px}.ap-voice-studio textarea{width:100%}.ap-voice-studio .music-options{display:flex;gap:16px;align-items:center;margin:16px 0}.ap-voice-studio .music-options label{display:flex;align-items:center;gap:8px;font-size:12px}.ap-voice-studio input[type=number]{width:65px}.ap-voice-studio select{width:auto}.ap-voice-studio .music-result audio{width:100%}.ap-voice-studio .music-actions{display:flex;gap:8px;flex-wrap:wrap}.ap-voice-studio .music-result{margin-top:16px}

/* Role candidates are previews; viewing never changes the current appearance. */
.ap-card-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:16px;min-height:0;overflow:auto;flex:1}
.ap-card-gallery figure{min-width:0;margin:0}
.ap-card-image{position:relative;min-width:0}
.ap-card-gallery .ap-card-set-main{position:absolute;right:8px;bottom:8px;display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:72px;height:28px;min-height:28px;margin:0;padding:0 10px;border:1px solid #ffffff40;border-radius:14px;background:#202022eb;color:var(--text-1);font-size:12px;font-weight:500;line-height:18px;white-space:nowrap;box-shadow:0 1px 4px #0003}
.ap-card-gallery .ap-card-set-main:hover:not(:disabled){background:#404044;border-color:#ffffff80}
.ap-card-gallery .ap-card-set-main:disabled{cursor:wait}
.ap-card-gallery .ap-card-preview{display:block;position:relative;width:100%;height:230px;padding:0;border:1px solid #ffffff1f;border-radius:14px;background:#1c1c1c;overflow:hidden;cursor:pointer}
.ap-card-gallery img{width:100%;height:100%;object-fit:contain}.ap-card-gallery .ap-card-main-badge{position:absolute;top:8px;left:8px;background:#0009;color:var(--text-1);border-radius:31px;padding:0 7px;font-size:12px;line-height:20px}
.ap-card-gallery figcaption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:6px;font-size:12px;line-height:20px}.ap-card-gallery button:focus-visible{outline:2px solid rgba(255,255,255,.64);outline-offset:2px}
.ap-card-media-actions{display:flex;gap:12px;flex:none;padding-top:16px}.ap-card-media-actions>*{flex:1;text-align:center}.ap-card-empty{grid-column:1/-1;display:grid;place-items:center;gap:12px;min-height:200px;color:var(--text-3)}.ap-card-empty svg{width:40px;height:40px}
@media(max-width:760px){.ap-card-gallery{grid-template-columns:1fr}.ap-card-gallery .ap-card-preview{height:200px}}
@media(max-width:560px){.ap-card-character .ap-card-media{flex-direction:column;align-items:stretch;gap:0}.ap-card-gallery{grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;flex:none}.ap-card-gallery .ap-card-preview{height:160px}}

/* Only the content of an empty image surface changes; the card/tag border stays owned by ac-node-card. */
.ac-empty-appearance{height:100%;width:100%;min-height:0;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:0 16px;color:var(--text-1)}
.ac-empty-placeholder{display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex:0 0 44px;--xyq-node-placeholder-fill:rgba(255,255,255,.16)}
.ac-empty-placeholder>svg{display:block;width:44px;height:44px}
.ac-empty-actions{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:24px}
body .studio-shell .asset-canvas-mode .ac-empty-actions button{box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex-shrink:0;gap:4px;min-width:40px;height:24px;padding:1px 10px;border:1px solid transparent;border-radius:32px;background:transparent;color:var(--text-1);font:500 12px/13.8px var(--font-sans);white-space:nowrap}
body .studio-shell .asset-canvas-mode .ac-empty-actions button:hover{background:rgba(255,255,255,.08)}
body .studio-shell .asset-canvas-mode .ac-empty-actions button:active{background:rgba(255,255,255,.12);transform:translateY(1px)}
.ac-empty-actions button>svg{display:block;width:12px;height:12px;flex:0 0 12px}
.ac-empty-upload-status{font-size:12px;line-height:24px;color:var(--text-2)}
.ac-background-filter{display:flex;align-items:center;gap:6px;padding:0 16px 10px;color:var(--text-2);font-size:12px}.ac-appearance-status{font-size:12px;color:var(--text-2)}.ac-selection-tools>strong{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ac-library-thumb>.icon{width:20px;height:20px}

body .studio-shell .asset-canvas-mode .ac-image-composer textarea[data-asset-appearance-prompt]{flex:0 0 auto;height:168px;min-height:min(168px,25vh)!important;max-height:240px;resize:vertical!important}body .studio-shell .asset-canvas-mode .ac-image-composer [data-action="asset-canvas-appearance-save"],body .studio-shell .asset-canvas-mode .ac-image-composer [data-action="asset-canvas-asset-open"]{font-size:13px;padding:8px 12px;border-radius:20px;background:#303030;white-space:nowrap}

body .studio-shell .asset-canvas-mode .ac-image-tool-return{position:absolute;top:78px;left:50%;transform:translateX(-50%);z-index:30;display:flex;align-items:center;gap:12px;pointer-events:auto;color:var(--text-2);font-size:12px;background:#242424;border:1px solid #444;border-radius:24px;padding:7px 14px}.ac-image-tool-return button{color:var(--text-1);background:transparent;border:0;font-size:12px}

.ac-appearance-error{position:absolute;bottom:350px;left:50%;transform:translateX(-50%);padding:8px 16px;border-radius:12px;background:#432c2c;color:#ffc9c9;pointer-events:auto;max-width:80%}

body .studio-shell .asset-canvas-mode .ac-has-labels .ac-node-group-caption>span{visibility:hidden}
body .studio-shell .asset-canvas-mode .ac-node-group-caption button>svg{width:12px;height:12px}
/* Empty-card resource picker; does not restyle the shared resource manager. */
dialog.ac-resource-picker{box-sizing:border-box;width:min(960px,calc(100vw - 64px));max-width:none;height:calc(100dvh - 64px);max-height:900px;margin:auto;padding:24px;border:1px solid #393939;border-radius:32px;background:#1e1e1e;color:var(--text-1);font:14px/1.5 var(--font-sans);overflow:visible}
dialog.ac-resource-picker[open]{display:flex;flex-direction:column;gap:16px}
dialog.ac-resource-picker::backdrop{background:#0008;backdrop-filter:blur(8px)}
.ac-resource-picker button,.ac-resource-picker summary{border:1px solid #3d3d3d;border-radius:24px;background:transparent;color:inherit;padding:6px 14px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;cursor:pointer;white-space:nowrap}
.ac-resource-picker button:hover,.ac-resource-picker summary:hover{background:#ffffff0f}
.ac-resource-picker button:disabled{cursor:default;color:var(--text-3);background:#292929;border-color:transparent}
.ac-resource-picker .icon{width:12px;height:12px;vertical-align:middle}
.ac-resource-picker header{display:flex;align-items:center;justify-content:space-between;gap:24px;background:none;border:0;padding:0}
.ac-resource-picker header [role=tablist]{display:flex;gap:24px;padding:0 8px}
.ac-resource-picker header [role=tab]{border:0;border-radius:0;padding:8px 0;color:var(--text-2);font-size:14px}
.ac-resource-picker header [role=tab][aria-selected=true]{border-bottom:2px solid #fff;color:var(--text-1)}
.ac-resource-search{display:flex;align-items:center;gap:10px;background:#292929;border-radius:24px;width:240px;padding:8px 12px}
.ac-resource-search input{min-width:0;width:100%;padding:0;border:0!important;box-shadow:none!important;background:transparent!important;color:var(--text-1);font-family:inherit;font-size:12px;line-height:20px;outline:0}
.ac-resource-controls{display:flex;align-items:center;gap:16px}
.ac-resource-controls [role=tablist]{display:flex;gap:8px}
.ac-resource-controls [aria-selected=true]{background:#353535;border-color:transparent}
.ac-resource-controls details{position:relative}.ac-resource-controls summary{display:flex;align-items:center;gap:6px;list-style:none}.ac-resource-controls summary::-webkit-details-marker{display:none}
.ac-resource-controls [role=menu]{position:absolute;right:0;top:calc(100% + 8px);z-index:2;min-width:165px;padding:6px;background:#292929;border:1px solid #444;border-radius:12px;box-shadow:0 8px 28px #0006}
.ac-resource-controls [role=menu] button{display:block;text-align:left;border:0;width:100%;border-radius:8px}.ac-resource-controls [role=menu] small,.ac-resource-controls [role=menu] label{display:block;padding:6px 10px}
.ac-resource-content{flex:1;min-height:0;overflow:auto;scrollbar-width:thin}.ac-resource-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--text-3);font-size:14px}.ac-resource-content h3{font-size:14px;font-weight:500}
.ac-resource-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
.ac-resource-item{position:relative;min-width:0}.ac-resource-item>button:first-child{width:100%;padding:0;border:0;text-align:left;display:flex;flex-direction:column;gap:8px;border-radius:12px;font-weight:400}.ac-resource-item>button:first-child>span:first-child{position:relative;width:100%;aspect-ratio:1;border:1px solid transparent;border-radius:12px;overflow:hidden;background:#292929;display:flex;align-items:center;justify-content:center}.ac-resource-item img{width:100%;height:100%;object-fit:contain}.ac-resource-item [aria-pressed=true]>span:first-child{border-color:#fff!important}.ac-resource-item [aria-pressed=true] .icon{position:absolute;right:8px;top:8px;background:#fff;color:#111;border-radius:50%;padding:3px;width:20px;height:20px}.ac-resource-item>button>span:last-child{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.ac-resource-item .ac-resource-preview{position:absolute;right:6px;bottom:32px;padding:5px;opacity:0;background:#111a}.ac-resource-item:hover .ac-resource-preview,.ac-resource-preview:focus-visible{opacity:1}
.ac-resource-picker footer{display:flex;align-items:center;gap:8px;border:0;padding:0;background:none}.ac-resource-picker footer button{height:36px;min-width:72px}.ac-resource-picker .ac-resource-add:not(:disabled){background:#fff;color:#171717}.ac-resource-count{color:var(--text-2);font-size:12px}
.ac-resource-image-preview{background:#111;border:0;padding:16px;border-radius:16px;max-width:90vw;max-height:90vh}.ac-resource-image-preview::backdrop{background:#000a}.ac-resource-image-preview>img{display:block;max-width:80vw;max-height:80vh;object-fit:contain}.ac-resource-image-preview button{position:absolute;right:10px;top:10px;border:0;border-radius:50%;background:#333;color:var(--text-1);padding:8px}
.ac-resource-controls summary>.icon{transform:rotate(90deg)}
@media(max-width:600px){
 dialog.ac-resource-picker{height:88dvh}
 .ac-resource-picker header [role=tablist]{flex:0 0 90px;overflow-x:auto;scrollbar-width:none;box-sizing:border-box}
 .ac-resource-picker .ac-resource-search{box-sizing:border-box;width:156px;flex:0 1 156px}
 .ac-resource-controls{min-height:34px;overflow-x:auto;scrollbar-width:none;flex-shrink:0}
 .ac-resource-controls [role=tablist],.ac-resource-controls details{flex-shrink:0}
 .ac-resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ac-resource-picker footer{justify-content:center}.ac-resource-picker footer>.grow{display:none}
}

.ac-empty-actions,.ac-resource-picker{-webkit-font-smoothing:antialiased}

/* Both entry points use the same quick creation surface (measured on the source). */
body .studio-shell .asset-canvas-mode .canvas-quick-create{pointer-events:auto;width:calc(100% - 48px);max-width:1016px;z-index:2}
.canvas-quick-create>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(148px,100%),1fr));gap:10px;padding:2px 0 10px;overflow:hidden}
.canvas-quick-create button{display:flex;align-items:center;gap:10px;box-sizing:border-box;height:52px;padding:0 12px;background:#ffffff0a;border:1px solid #ffffff14;border-radius:14px;color:var(--text-1);font:500 14px/20px var(--font-sans);cursor:pointer;min-width:0;white-space:nowrap}
.canvas-quick-create button>span{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:#ffffff14;flex:none}
.canvas-quick-create button>strong{overflow:hidden;text-overflow:ellipsis;font:inherit}
.canvas-quick-create button svg{width:18px;height:18px}
.canvas-quick-create button:hover{background:#ffffff14}
body .studio-shell .asset-canvas-mode .canvas-quick-create p{margin-top:18px;color:var(--text-2);font:14px/20px var(--font-sans)}
body .studio-shell .canvas-unified-add{box-sizing:border-box;width:300px;padding:17px;border:1px solid #ffffff14;border-radius:36px;background:#262626b3;backdrop-filter:blur(20px);box-shadow:0 24px 60px #0004;z-index:70}
.canvas-add-title{font:12px/18px var(--font-sans);color:var(--text-3);height:28px;padding-left:8px}
body .studio-shell .canvas-unified-add button{height:56px;padding:8px;border-radius:36px;gap:16px;color:var(--text-1);font:13px/18px var(--font-sans);border:0;margin:0}
.canvas-add-icon{display:grid;place-items:center;background:#ffffff0a;width:40px;height:40px;border-radius:10px;flex:none}
.canvas-add-icon svg{width:24px;height:24px}
body .studio-shell .canvas-unified-add button:hover,body .studio-shell .canvas-unified-add button:focus-visible{background:#ffffff14}

.canvas-add-icon{position:relative}.canvas-add-icon>span{display:grid;place-items:center}.canvas-add-icon>span+span{display:none}
.canvas-add-copy{display:flex;flex-direction:column;gap:3px}.canvas-add-copy small{display:none;color:var(--text-2);font:12px/16px var(--font-sans)}
.canvas-unified-add button:hover .canvas-add-copy small,.canvas-unified-add button:focus-visible .canvas-add-copy small{display:block}
.canvas-unified-add button:hover .canvas-add-icon>span:first-child,.canvas-unified-add button:focus-visible .canvas-add-icon>span:first-child{display:none}
.canvas-unified-add button:hover .canvas-add-icon>span+span,.canvas-unified-add button:focus-visible .canvas-add-icon>span+span{display:grid}

/* Quick actions are centered within the visible canvas, excluding its library. */

.ac-reference-required{position:absolute;bottom:0;left:0;right:0;padding:2px;font-size:12px;line-height:14px;text-align:center;background:#151515d9;color:var(--text-1)}.ac-reference-pending{font-size:12px;line-height:1.5;color:var(--text-2);margin:8px 0}

body .studio-shell .asset-canvas-mode .ac-character-error{position:absolute;bottom:calc(100% + 8px);left:0;right:0;margin:0;padding:10px 14px;border:1px solid #5d4636;border-radius:12px;background:#202020;color:#e9ba93;font-size:13px;overflow-wrap:anywhere}

#canvas-upload-status:not(:empty) {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  max-width: 85%;
  padding: 8px 14px;
  border: 1px solid #56505e;
  border-radius: 10px;
  background: #302c35;
  color: var(--text-1);
  font-size: 13px;
  overflow-wrap: anywhere;
  pointer-events: none;
}

#ac-image-mentions{position:absolute;left:18px;bottom:calc(100% + 8px);z-index:43;width:min(260px,calc(100% - 36px));max-height:min(190px,27vh);overflow:auto;padding:5px;border:1px solid #414141;border-radius:12px;background:#262626;box-shadow:0 8px 22px #0006}
#ac-image-mentions button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:5px;border:0;border-radius:6px;background:transparent;color:var(--text-1);font-size:12px}
#ac-image-mentions button:hover,#ac-image-mentions [aria-selected=true]{background:#3c3c3c}
#ac-image-mentions img{width:29px;height:29px;object-fit:cover;border-radius:4px}
#ac-image-mentions button span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#ac-image-mentions small,.ac-image-mention-empty{color:var(--text-2)}
.ac-image-mention-empty{display:block;padding:8px;font-size:12px}
.ac-node-generating{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border-radius:inherit;background:#000000b3;color:var(--text-1);font-size:13px;pointer-events:none}
/* Reference thumbnails: the @ in the lower corner cites the picture in the prompt (shown on hover, like Xiaoyunque). */
body .studio-shell .asset-canvas-mode .ac-reference-thumb button.ac-reference-cite{top:auto;bottom:-4px;font:600 12px/13px var(--font-sans);opacity:0;transition:opacity .12s}
body .studio-shell .asset-canvas-mode .ac-reference-thumb:hover button.ac-reference-cite,body .studio-shell .asset-canvas-mode .ac-reference-thumb button.ac-reference-cite:focus-visible{opacity:1}
/* The image card's @ menu uses the video card's grouped layout: referenced first, the rest by category in a side panel. */
#ac-image-mentions.av-mentions{display:flex;align-items:flex-end;gap:10px;width:auto;max-width:calc(100vw - 24px);max-height:none;overflow:visible;padding:0;border:0;background:none;box-shadow:none;color:var(--text-1);font:13px/20px var(--font-sans)}
#ac-image-mentions .av-mention-main{width:260px}
#ac-image-mentions .av-mention-sub{width:300px}
#ac-image-mentions .av-mention-list{max-height:min(300px,40vh)}
#ac-image-mentions .av-mention-list>button{min-height:44px;padding:8px 12px;border-radius:16px;font-size:13px;gap:8px;color:inherit;cursor:pointer}
#ac-image-mentions .av-mention-list>button:hover,#ac-image-mentions .av-mention-list>[aria-selected=true],#ac-image-mentions .av-mention-category[aria-expanded=true]{background:#ffffff14}
#ac-image-mentions img{width:32px;height:32px;border-radius:8px;object-fit:cover;flex:none;background:#ffffff0a}
#ac-image-mentions svg{width:16px;height:16px;flex:none}
#ac-image-mentions small{margin-left:auto;flex:none;color:var(--text-3);font-size:12px}

/* Connections phase 2.4: "已有角色 / 已有场景" beside the name of a card just made on the canvas (as in Xiaoyunque). */
.ap-name-row{display:flex;gap:8px;align-items:center}
.ap-name-row>input{flex:1;min-width:0}
.ap-card-fields .ap-name-row>select[data-ap-adopt]{flex:0 0 auto;width:auto;max-width:45%}
/* A failed generation stays on its card until the user retries or closes it (全站视觉方案 8.1). */
.ac-node-failed{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:28px 14px 14px;border-radius:inherit;background:#000000c2;color:var(--text-1);text-align:center}
.ac-node-failed-badge{position:absolute;top:8px;left:8px;padding:2px 8px;border-radius:8px;background:var(--red,#e5484d);color:var(--text-1);font-size:12px;line-height:18px}
.ac-node-failed p{margin:0;max-width:100%;font-size:12px;line-height:18px;color:var(--text-1);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ac-node-failed-actions{display:flex;gap:14px}
body .studio-shell .asset-canvas-mode .ac-node-failed-actions button{position:static;width:auto;height:auto;padding:2px 4px;border:0;background:none;color:var(--text-1);font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}

.ac-node-switch{position:absolute;left:50%;bottom:10px;z-index:3;display:flex;align-items:center;gap:4px;transform:translateX(-50%);padding:2px 4px;border-radius:999px;background:#000000a6;color:var(--text-1);font-size:12px;line-height:20px}
.ac-node-switch button{width:22px;height:22px;border:0;border-radius:50%;background:transparent;color:inherit;font-size:16px;line-height:1;cursor:pointer}
.ac-node-switch button:hover,.ac-node-switch button:focus-visible{background:#ffffff33}
/* 资产方案 D1：“项目资产”页签用自己的列表，画布资产的筛选、背景群演开关、未摆放和列表在这里隐藏。 */
body .studio-shell .asset-canvas-mode .ac-library[data-source=project]>.ac-library-filters,body .studio-shell .asset-canvas-mode .ac-library[data-source=project]>.ac-background-filter,body .studio-shell .asset-canvas-mode .ac-library[data-source=project]>.ac-library-scroll:not(.ac-project-assets),body .studio-shell .asset-canvas-mode .ac-library[data-source=project] .ac-unplaced,body .studio-shell .asset-canvas-mode .ac-library[data-source=project] .ac-view-switch{display:none}
body .studio-shell .asset-canvas-mode .ac-project-assets-bar{padding:0 12px 10px;flex-shrink:0}body .studio-shell .asset-canvas-mode .ac-project-assets-bar .ac-library-search{width:100%}
body .studio-shell .asset-canvas-mode .ac-project-count{margin-left:auto;color:var(--text-3);font-size:12px}
body .studio-shell .asset-canvas-mode .ac-project-asset>span:nth-child(2){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .studio-shell .asset-canvas-mode .ac-project-asset-state{flex:none;font-size:12px;color:var(--text-1);border:1px solid #444;border-radius:10px;padding:2px 7px}body .studio-shell .asset-canvas-mode .ac-project-asset-state.placed{color:var(--text-3);border-color:transparent}
body .studio-shell .asset-canvas-mode .ac-project-files-open{margin:0 0 4px 19px;border:0;background:transparent;color:var(--text-2);font-size:12px;text-decoration:underline;cursor:pointer;padding:2px 0}
body .studio-shell .asset-canvas-mode .ac-project-assets-error{margin:8px 7px;color:#d99;font-size:12px}
body .studio-shell .asset-canvas-mode .ac-library[data-source=project] .ac-library-footer>span:last-child{visibility:hidden}
body .studio-shell .asset-canvas-mode .ac-library[data-source=project] [hidden]{display:none!important}
/* 资产方案 B：左栏组标题上的改名、解散（悬停时出现），以及就地改名的输入框。 */
body .studio-shell .asset-canvas-mode .ac-library-group-actions{margin-left:auto;display:flex;gap:2px;flex:none}body .studio-shell .asset-canvas-mode .ac-library-group-actions .ac-group-more{width:auto;padding:0 6px;font-size:12px}
body .studio-shell .asset-canvas-mode .ac-library-group-rename{width:100%;min-width:0;height:24px;border:1px solid #555;border-radius:6px;background:#1f1f1f;color:var(--text-1);font:inherit;font-size:12px;padding:0 6px}
/* 只产出了本站打不开的原文件（result.files）：待生成卡上的下载入口。 */
body .studio-shell .asset-canvas-mode .ac-job-content .ac-job-file{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 12px;border:1px solid #bbb;border-radius:18px;color:var(--text-1);font-size:12px;text-decoration:none}
body .studio-shell .asset-canvas-mode .ac-job-content .ac-job-file>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
