/* Canvas assistant only; measured against the original at 1500 × 900. */
body .studio-shell.is-project.is-canvas{--native-chat-width:500px}
body .studio-shell .cga-panel{display:flex;flex-direction:column;overflow:visible!important;font:400 14px/1.5 system-ui,-apple-system,sans-serif;-webkit-font-smoothing:antialiased;color:#eee;background:#1c1c1c}
.cga-panel button,.cga-popup button,.cga-reference-menu button,.cga-memory-dialog button,.cga-confirm button{font:inherit;color:inherit;background:transparent;border:0;cursor:pointer;box-sizing:border-box;white-space:nowrap}
.cga-panel button:disabled{cursor:default;color:#ffffff30}
.cga-panel svg,.cga-popup svg,.cga-reference-menu svg,.cga-memory-dialog svg{width:16px;height:16px;flex:none}
body .studio-shell .cga-heading{display:flex;padding:8px 24px;gap:4px;height:48px;min-height:48px;font-size:12px;overflow:hidden}
.cga-heading>button{height:32px;border-radius:24px;display:flex;align-items:center;justify-content:center;gap:4px;padding:0 8px}
.cga-heading .cga-title{padding:0 8px;max-width:48%;min-width:0;margin-left:0}
.cga-title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cga-title svg{width:12px;height:12px}
.cga-heading .cga-icon{width:32px;padding:0;color:#999}
.cga-heading button:hover:not(:disabled),.cga-heading button[aria-expanded=true]{background:#ffffff0a}
.cga-heading .grow{flex:1;min-width:0}
body .studio-shell .cga-heading .cs-display{margin:0;padding:0 6px;flex-shrink:0}
.cga-resize{position:absolute;left:-5px;top:0;width:10px;height:100%;cursor:col-resize!important;z-index:1;padding:0}
.cga-resize:hover{border-left:2px solid #777!important}
body .studio-shell .cga-scroll{position:relative;flex:1;overflow:auto;min-height:0;padding:24px;display:flex;flex-direction:column;gap:28px;scrollbar-width:thin}
.cga-welcome{position:absolute;top:50%;left:24px;right:24px;transform:translateY(-50%);text-align:center}
.cga-welcome h2{font-size:22px;font-weight:600;line-height:1.4;margin:0 0 18px;letter-spacing:-.5px;color:#f5f5f5}.cga-welcome p{font-size:16px;color:#f5f5f5;margin:0}.cga-loading{position:absolute;top:20px;right:20px}
.cga-compose-wrap{flex:none;margin:0 24px;width:calc(100% - 48px)}
body .studio-shell .cga-panel .cga-composer{display:flex;flex-direction:column;gap:0;border:1px solid #383838;border-radius:18px;background:#1c1c1c;box-shadow:none;padding:16px;min-height:134px;margin:0;box-sizing:border-box}
body .studio-shell .cga-panel .cga-composer:focus-within{border-color:#454545;box-shadow:none}
body .studio-shell .cga-panel #agent-text{border:0;background:transparent;padding:0;margin:0;width:100%;min-height:52px;height:52px;max-height:200px;resize:none;box-shadow:none;outline:none;border-radius:0;font:400 14px/21px system-ui,-apple-system,sans-serif;color:#eee}
body .studio-shell .cga-panel #agent-text::placeholder{color:#85888c;opacity:1}
.cga-toolbar{display:flex;align-items:center;gap:6px;margin-top:12px;height:36px;min-height:36px}
.cga-toolbar>button{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:24px;padding:6px;height:30px;background:#ffffff0a}
.cga-toolbar .grow{flex:1}.cga-toolbar .cga-upload{width:30px;border:1px solid #ffffff1f;background:transparent;color:#888}
.cga-toolbar .cga-skills{width:30px}.cga-toolbar .cga-skills span,.cga-toolbar .hc-preferences-trigger span,.cga-toolbar .hc-preferences-trigger i{display:none}
.cga-toolbar .hc-preferences-trigger{width:48px;gap:3px;font-size:12px}
.cga-toolbar .hc-preferences-trigger svg:last-child{width:12px;height:12px}
.cga-toolbar>button:hover:not(:disabled){background:#ffffff14}
.cga-toolbar .cga-send{height:36px;width:36px;background:#f5f5f5;color:#111;margin:0;padding:9px}
.cga-toolbar .cga-send:disabled{background:#ffffff0a;color:#111;opacity:1}
.cga-disclaimer{margin:6px 0 0;text-align:center;color:#7b7b7b;font-size:10px;line-height:13px;height:13px;white-space:nowrap;overflow:hidden}
.cga-attachments:empty,.cga-selected-skills:empty{display:none}.cga-attachments,.cga-selected-skills{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.cga-reference-chip{display:inline-flex;gap:3px;align-items:center;max-width:100%;height:24px;border:1px solid #ffffff1a;background:#ffffff0a;padding:1px 5px;border-radius:6px;font-size:12px}.cga-reference-chip>button{width:16px;height:16px;padding:1px;color:#888}.cga-reference-chip svg{width:13px;height:13px}
.cga-attachment{position:relative;width:64px;height:68px;border:1px solid #444;border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#292929;overflow:visible;font-size:10px}.cga-attachment>img{width:52px;height:42px;object-fit:cover;border-radius:4px}.cga-attachment>span{width:58px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cga-attachment>button{position:absolute;top:-6px;right:-6px;background:#444;border-radius:50%;height:16px;width:16px;padding:1px}.cga-attachment>button svg{width:12px;height:12px}
.cga-message{font-size:14px;line-height:1.6}.cga-user{align-self:flex-end;max-width:100%;width:100%}.cga-user-bubble{margin-left:auto;background:#2b2b2b;border-radius:16px;padding:12px 16px;max-width:100%;width:fit-content;overflow-wrap:anywhere}
.cga-user-meta{display:flex;align-items:center;justify-content:flex-end;font-size:10px;color:#777;gap:8px;height:25px}.cga-user-meta button{visibility:hidden;display:flex;gap:4px;align-items:center;font-size:10px;padding:2px}.cga-user:hover .cga-user-meta button,.cga-user:focus-within .cga-user-meta button{visibility:visible}.cga-user-meta svg{width:12px;height:12px}
.cga-message-details{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 16px;border:1px solid #ffffff1a;border-radius:12px;color:#888;font-size:12px}.cga-message-details b{text-align:right;color:#ccc;font-weight:400}
.cga-answer .agent-markdown{color:#e8e8e8;font-size:14px;line-height:1.8}.cga-answer .agent-markdown p{margin:0 0 12px}.cga-answer footer{display:flex;align-items:center;gap:8px;color:#777;font-size:10px;margin-top:16px}.cga-answer footer button{padding:2px}.cga-answer footer svg{width:14px;height:14px}.cga-answer .cga-cost{margin-left:auto;display:flex;align-items:center;gap:4px}.cga-answer figure{margin:12px 0}.cga-answer figure img,.cga-answer figure video{max-width:100%;max-height:320px;border-radius:10px}.cga-answer figcaption{font-size:12px}.cga-answer a{color:inherit}
.cga-process-details{font-size:12px;color:#888;margin-bottom:12px}.cga-process-details summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px}.cga-process-details summary::-webkit-details-marker{display:none}.cga-process-details p{border-left:1px solid #555;margin:12px 0;padding-left:12px}.cga-processing{color:#aaa;display:flex;gap:8px;flex-direction:column;font-size:13px}.cga-processing>div{display:flex;gap:8px;align-items:center}.cga-processing progress{width:100%;height:3px;accent-color:#aaa}.cga-error{font-size:12px;color:#fca0a0}.cga-error button{margin-left:8px;text-decoration:underline}
.cga-popup,.cga-reference-menu{position:fixed;z-index:700;background:#242424;border:1px solid #353535;border-radius:16px;color:#eee;font:400 12px/1.5 system-ui,-apple-system,sans-serif;box-shadow:0 8px 32px #0004;padding:6px}
.cga-history{width:240px;max-height:360px;overflow:auto}.cga-history>button{display:flex;align-items:center;gap:8px;width:100%;padding:9px;border-radius:10px;text-align:left}.cga-history>button>i{width:16px}.cga-history>button>span{overflow:hidden;text-overflow:ellipsis}.cga-history>button:hover{background:#ffffff0a}
.cga-reference-menu{width:320px;height:288px;padding:12px;border-radius:24px;display:flex;flex-direction:column;box-sizing:border-box}.cga-ref-tabs{display:flex;gap:16px;overflow:auto;scrollbar-width:none;flex-shrink:0;min-height:28px}.cga-ref-tabs>button{padding:2px 0 8px;font-size:12px;color:#888;position:relative}.cga-ref-tabs>button[aria-selected=true]{color:#eee}.cga-ref-tabs>button[aria-selected=true]:after{content:'';position:absolute;bottom:0;left:0;right:0;height:1px;background:#ddd}.cga-ref-results{overflow:auto;flex:1;margin-top:8px;scrollbar-width:thin}.cga-ref-results>button{width:100%;display:flex;gap:9px;align-items:center;padding:6px;text-align:left;border-radius:7px}.cga-ref-results>button:hover{background:#ffffff0a}.cga-ref-results>button img,.cga-ref-results>button i{width:28px;height:28px;object-fit:cover;background:#3a3a3a;display:grid;place-items:center}.cga-ref-results>button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cga-ref-results>p{text-align:center;color:#888;padding:24px 8px}
.cga-memory-dialog,.cga-confirm{color:#eee;background:#1c1c1c;border:1px solid #333;border-radius:32px;padding:24px;width:720px;max-width:calc(100vw - 32px);box-sizing:border-box;font:400 14px/1.5 system-ui,-apple-system,sans-serif;max-height:calc(100vh - 32px)}
.cga-memory-dialog::backdrop,.cga-confirm::backdrop{background:#0009;backdrop-filter:blur(3px)}.cga-memory-dialog header{position:relative;padding-right:24px}.cga-memory-dialog h2,.cga-confirm h2{font-size:16px;font-weight:500;margin:0 0 6px}.cga-memory-dialog header p{font-size:13px;color:#999;margin:0}.cga-dialog-x{position:absolute;right:-8px;top:-8px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center}.cga-dialog-x:hover{background:#ffffff0a}
.cga-memory-status{display:inline-block;border-radius:20px;background:#ffffff0a;padding:2px 8px;font-size:12px;color:#999;margin:16px 0 12px}.cga-memory-body>label{display:block;color:#aaa;font-size:13px;margin-bottom:10px}.cga-memory-body textarea{height:384px;min-height:120px;max-height:45vh;box-sizing:border-box;width:100%;display:block;resize:none;border:1px solid #ffffff33;border-radius:16px;padding:12px;background:#ffffff14;color:#ddd;font:400 14px/1.5 system-ui,-apple-system,sans-serif;outline:none}.cga-memory-body textarea::placeholder{color:#6e6e6e}.cga-memory-count{font-size:12px;color:#999;margin:10px 0 0}.cga-memory-error{color:#fba1a1;font-size:12px;margin:4px 0}.cga-memory-dialog footer,.cga-confirm footer{display:flex;align-items:center;gap:8px;margin-top:16px}.cga-memory-dialog footer .grow{flex:1}.cga-memory-dialog footer button,.cga-confirm footer button{height:36px;padding:0 22px;background:#ffffff0a;border-radius:24px;font-size:12px}.cga-memory-dialog footer .cga-primary,.cga-confirm [data-confirm]{background:#eee;color:#111}.cga-memory-dialog button:disabled{opacity:.35;cursor:default}.cga-confirm{width:440px;border-radius:24px}.cga-confirm p{color:#aaa;font-size:14px}.cga-confirm footer{justify-content:flex-end}
body .studio-shell.cs-chat-only .cga-scroll,body .studio-shell.cs-chat-only .cga-compose-wrap{max-width:800px;width:calc(100% - 48px);margin-inline:auto;box-sizing:border-box}
body .studio-shell.cs-chat-only .cga-scroll{width:100%}.cs-chat-only .cga-toolbar .cga-skills{width:auto;padding:6px 10px}.cs-chat-only .cga-toolbar .hc-preferences-trigger{width:auto;padding:6px 10px}.cs-chat-only .cga-toolbar .cga-skills span,.cs-chat-only .cga-toolbar .hc-preferences-trigger span,.cs-chat-only .cga-toolbar .hc-preferences-trigger i{display:inline-flex}
body .studio-shell.is-project.is-canvas .cga-panel .agent-panel-heading{height:48px;min-height:48px}
.cga-composer:has(.cga-reference-chip):not(:has(.cga-attachment)) #agent-text{height:28px!important;min-height:28px!important}.cga-composer:not(:has(.cga-attachment)) .cga-attachments{margin-bottom:0}.cga-welcome h2{line-height:27px;letter-spacing:0}.cga-welcome{top:calc(50% + 14px)}
@media(max-width:700px){body .studio-shell.is-canvas.has-native-chat>.cs-header{visibility:hidden}body .studio-shell.is-canvas.has-native-chat .creation-content{display:none}body .studio-shell.is-project.is-canvas .cga-panel{min-width:500px;flex-basis:500px;width:500px;left:0;right:auto}body .studio-shell.is-project.is-canvas .creation-workspace{overflow:visible}}

/* Reuse the skill picker behaviour; the canvas has its own measured surface. */
.composer-picker[data-cp-surface=canvas]{padding:14px;gap:12px;border:0;border-radius:22px;background:#262626;color:#e6e6e6;font:400 13px/1.4 system-ui,-apple-system,sans-serif}
[data-cp-surface=canvas] .cp-header{height:32px;min-height:32px;padding:0;border:0;gap:8px}
[data-cp-surface=canvas] .cp-search input{font-size:12px;height:28px;padding:0}
[data-cp-surface=canvas] .cp-close{display:none}
[data-cp-surface=canvas] .cp-body{display:grid;grid-template-columns:128px minmax(0,1fr) 280px;gap:20px;overflow:hidden}
[data-cp-surface=canvas] .cp-nav{padding:0 0 32px;border:0;gap:4px;scrollbar-width:none}
[data-cp-surface=canvas] .cp-category{flex:none;height:36px;min-height:36px;padding:0;display:flex;align-items:center;gap:8px;border-radius:0;color:#b3b3b3}
[data-cp-surface=canvas] .cp-category:hover,[data-cp-surface=canvas] .cp-category.is-active{background:none;color:#fff}
[data-cp-surface=canvas] .cp-category-mark{width:16px;display:grid;place-items:center;font-size:14px}
[data-cp-surface=canvas] .cp-category-mark svg{width:16px;height:16px}
[data-cp-surface=canvas] .cp-results{padding:0 0 0 20px;border-left:1px solid #ffffff0a;scrollbar-width:none}
[data-cp-surface=canvas] .cp-option{height:auto;min-height:64px;padding:12px 8px;gap:0;border-radius:24px;margin-bottom:4px}
[data-cp-surface=canvas] .cp-option:hover,[data-cp-surface=canvas] .cp-option.is-active{background:#303030}
[data-cp-surface=canvas] .cp-thumbnail,[data-cp-surface=canvas] .cp-option-enter{display:none}
[data-cp-surface=canvas] .cp-option-copy strong{font-weight:400;font-size:13px;line-height:18px;white-space:normal}
[data-cp-surface=canvas] .cp-preview{display:flex;padding:0 0 42px;border:0;overflow:hidden}
[data-cp-surface=canvas] .cp-preview-card{display:flex;flex-direction:column;background:#303030;padding:10px;border-radius:24px;min-height:0;height:100%;overflow:hidden}
[data-cp-surface=canvas] .cp-preview-art{height:146px;flex:0 0 146px;border:0;border-radius:16px;background:#232323}
[data-cp-surface=canvas] .cp-preview-art:before{display:none}
[data-cp-surface=canvas] [data-cp-favorite]{position:absolute;right:8px;top:8px;width:28px;height:28px;border-radius:50%;background:#262626b3;display:grid;place-items:center}
[data-cp-surface=canvas] [data-cp-favorite][aria-pressed=true]{color:#fff3b3}
[data-cp-surface=canvas] .cp-preview p{color:#b3b3b3;font-size:12px;line-height:18px;margin:10px 2px 8px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
[data-cp-surface=canvas] .cp-preview-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:auto;font-size:11px;color:#999}
[data-cp-surface=canvas] .cp-details{margin-left:auto;font-size:12px;color:#ddd}
[data-cp-surface=canvas] .cp-footer{position:absolute;bottom:14px;right:14px;width:280px;height:30px;min-height:30px;justify-content:flex-end;padding:0;border:0}
[data-cp-surface=canvas] .cp-footer button{color:#ddd;flex-direction:row-reverse}

.cga-ref-tab-wrap{position:relative;padding-right:20px;flex-shrink:0}.cga-ref-tab-wrap>[data-ref-scroll]{position:absolute;right:0;top:0;width:20px;height:26px;padding:0;background:#242424;display:grid;place-items:center}.cga-ref-results h4{font-size:11px;font-weight:400;color:#888;margin:12px 6px 6px}.cga-ref-results>button[aria-selected=true]{background:#ffffff0a}

.cga-dialog-x{background:#ffffff0a!important}.cga-memory-dialog h2{font-weight:400}.cga-memory-status,.cga-memory-body>label{color:#ddd}

[data-hc-surface=canvas] .hc-scene-unavailable{padding:18px;width:100%;font-size:12px;color:#aaa}[data-hc-surface=canvas] .hc-scene-unavailable label{display:block;margin-bottom:12px}[data-hc-surface=canvas] .hc-scene-unavailable button{display:block;width:100%;padding:16px 12px;text-align:left;background:transparent;border:0;color:#aaa;border-radius:12px}[data-hc-surface=canvas] .hc-scene-unavailable strong{font-weight:400;font-size:14px}[data-hc-surface=canvas] .hc-scene-unavailable p{font-size:11px;color:#777;margin:6px 0}[data-hc-surface=canvas] .hc-scene-unavailable [role=status]{padding:12px;color:#aaa}

.cga-heading .cga-memory-button{padding-inline:16px}.cga-memory-dialog [data-cga=delete-memory]{background:#d15c59;color:white}.cga-memory-dialog footer button{border:1px solid #ffffff0a}[data-hc-surface=canvas] .hc-tabs{width:338px}[data-hc-surface=canvas] .hc-tabs button{white-space:nowrap}[data-hc-surface=canvas] .hc-scene-unavailable{grid-column:1/-1}

.cga-skill-detail{padding:12px 12px 72px;width:600px;max-width:calc(100vw - 32px);height:684px;max-height:calc(100dvh - 32px);background:#262626;color:#eee;border:0;border-radius:32px;box-sizing:border-box;font:400 13px/1.5 system-ui,-apple-system,sans-serif;overflow:hidden}.cga-skill-detail::backdrop{background:#000b;backdrop-filter:blur(8px)}.cga-skill-detail button{font:inherit;color:inherit;border:0;cursor:pointer;background:none}.cga-skill-detail svg{width:14px;height:14px}.cga-skill-detail-scroll{height:100%;overflow:auto;scrollbar-width:thin}.cga-skill-example{position:relative;width:100%;aspect-ratio:16/9;background:#1c1c1c;border-radius:24px;overflow:hidden}.cga-skill-example img,.cga-skill-example video{width:100%;height:100%;object-fit:cover}.cga-skill-example [data-detail=close]{position:absolute;left:6px;top:6px;height:26px;border-radius:9px;padding:2px 6px;background:#9998;font-size:12px}.cga-skill-example kbd{font:10px system-ui;background:#333a;padding:2px 3px;border-radius:4px}.cga-skill-information{padding:24px 16px}.cga-skill-information header{display:flex;align-items:center;gap:12px}.cga-skill-information h2{font-size:16px;font-weight:500;margin:0;flex:1}.cga-skill-information header button{display:flex;align-items:center;gap:5px;font-size:12px;color:#bbb}.cga-skill-information dl{display:flex;gap:28px;color:#999;font-size:12px;border-bottom:1px solid #ffffff08;padding:20px 0;margin:0 0 20px}.cga-skill-information dl>div{display:flex;gap:8px}.cga-skill-information dd{margin:0;color:#ccc}.cga-skill-information p{margin:0 0 10px;color:#bbb;font-size:13px;line-height:19px}.cga-skill-tags span{background:#ffffff0a;padding:2px 7px;border-radius:5px;color:#aaa}.cga-skill-detail footer{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:flex-end;gap:12px;height:72px;align-items:center;padding:12px 16px;box-sizing:border-box;background:#262626}.cga-skill-detail footer button{display:flex;align-items:center;gap:8px;border:1px solid #ffffff1f;border-radius:24px;height:40px;padding:0 14px}.cga-skill-detail footer [data-detail=use]{background:#eee;color:#111;min-width:118px;justify-content:center}.cga-skill-detail button[aria-pressed=true]{color:#fff3b3}
/* Modal containers do not inherit the browser's focused-dialog outline. */
.cga-memory-dialog,.cga-confirm,.cga-skill-detail{outline:none}
.cga-memory-dialog footer button:disabled{background:#ffffff0a;color:#ffffff33;opacity:1;cursor:default;border-color:transparent}
