/* One visual language for account chats, Spaces, tools and profile. */
body.unified-canvas{--bg:#f6f8fc;--text:#18243b;--muted:#5d7092;--accent:#5148ff;--border:#dce5f2;--panel:#fff;--card:#fff;color:var(--text);color-scheme:light}
.unified-canvas .main{background:linear-gradient(140deg,#f3f7fe,#fff 62%)}
.unified-canvas .chat-header{background:#ffffffed;border-color:#e1e7f1;min-height:92px;color:#192940;padding:18px 24px}.unified-canvas .chat-heading h1{color:#192940;font-size:1.15rem}.unified-canvas .chat-heading>span{color:#61728d;font-size:.8rem;margin-top:6px}
.unified-canvas .header-controls select,.unified-canvas .header-controls .icon,.unified-canvas #open-sidebar{background:#fff;color:#2f4569;border-color:#d8e2f0;border-radius:12px;min-height:44px}
.unified-canvas .clarity-button{background:#fff;border-color:#d8e2f0;color:#4c6282}
.unified-canvas .messages{padding:20px max(24px,calc((100% - 850px)/2))}.unified-canvas .message .by{color:#223859}.unified-canvas .message.assistant .content{background:#fff;border:1px solid #dce5f2;color:#263858;box-shadow:0 4px 20px #30446103}.unified-canvas .message.user .content{color:#263858}.unified-canvas .message-footer button{color:#536d93;background:transparent;border-color:transparent}.unified-canvas .message-footer button:hover{background:#edf3ff;border-color:#dce5f2}.unified-canvas .formatted a{color:#5148da}.unified-canvas .formatted :not(pre)>code{background:#edf0fb;color:#51428b}.unified-canvas .code-block{color:#dce7ff}.unified-canvas .source{background:#eff4fc;color:#2f527e;border-color:#d6e1f4}
.unified-canvas .composer-wrap{background:linear-gradient(0deg,#f8faff 85%,transparent);padding:4px max(24px,calc((100% - 880px)/2)) 14px}.unified-canvas .composer{background:#fff;border:1px solid #d1dff0;border-radius:17px;box-shadow:0 5px 24px #27385608;padding:12px}.unified-canvas .composer textarea{background:#f8faff;color:#203a60;border-radius:12px;padding:12px}.unified-canvas .composer-options>.icon,.unified-canvas .internet,.unified-canvas .room-ai{background:#f3f7ff;border-color:#d6e1f1;color:#385782}.unified-canvas .room-ai[aria-pressed=true]{background:#ececff;color:#5042d4;border-color:#ceccff}.unified-canvas .primary{background:linear-gradient(130deg,#6555ff,#464bff);color:#fff;border-color:#6869ff;box-shadow:0 5px 15px #5148ff17}.unified-canvas .composer-note{color:#7182a0}.unified-canvas .empty{background:none}.unified-canvas .empty h2{color:#213553}.unified-canvas .empty img{filter:drop-shadow(0 5px 20px #6357ff35)}.unified-canvas .suggestions button{background:#fff;border-color:#d5e0f2;color:#37537e}
.unified-canvas .context-rail{color:#243855;background:#f3f7fe;border-color:#dee7f4}.unified-canvas .context-card{background:#fff;border-color:#dee7f4;box-shadow:0 5px 20px #263b6204}.unified-canvas .context-card h3{color:#1d2d49}.unified-canvas .context-card button{background:#f1f5fc;color:#355582;border-color:#dbe5f4}.unified-canvas .context-card .context-item{color:#36557b}.unified-canvas .context-card small{color:#5e7398}
.unified-canvas .panel .card,.unified-canvas .settings-group,.unified-canvas .profile-card,.unified-canvas .tool-tile{background:#fff;border-color:#dbe5f2;color:#263c60;box-shadow:0 4px 20px #27385603}.unified-canvas .setting-row{border-color:#e2e9f4}.unified-canvas .setting-row:hover{background:#f0f5ff}.unified-canvas .setting-row svg{color:#5c66cf}.unified-canvas .profile-description,.unified-canvas .profile-details p,.unified-canvas .privacy-note{color:#5b7196}.unified-canvas .profile-avatar{color:#fff;background:linear-gradient(140deg,#96b6ea,#6854c4);border-color:#e1e8ff}.unified-canvas .panel input,.unified-canvas .panel textarea,.unified-canvas .panel select{color:#263e64;background:#f8faff;border-color:#d0def0}.unified-canvas .tool-icon{background:#eef1ff;color:#5d5dcc}
.unified-canvas .notice{background:#ebf2ff;color:#355176;border-color:#c9d9f0}.unified-canvas .notice.error{background:#fff0f1;color:#982b40;border-color:#edc3ca}.unified-canvas .notice-close{color:#526b8f}
body[data-mode=settings] #panel{width:100%;max-width:1050px;margin-inline:auto;padding:28px 32px 48px}body[data-mode=settings] .profile-grid{gap:20px}.unified-canvas .form-error{color:#a52f43}
@media(max-width:760px){.unified-canvas .chat-header{padding:12px;min-height:78px}.unified-canvas .messages{padding:14px}.unified-canvas .composer-wrap{padding:4px 9px 10px}.unified-canvas .composer-options>.icon,.unified-canvas .send{min-width:44px;width:44px;height:44px}.unified-canvas .header-controls>.icon{min-width:44px;width:44px;height:44px}.unified-canvas .header-controls{gap:5px}.unified-canvas .composer textarea{padding:10px}body[data-mode=settings] #panel{padding:20px 16px 36px}.unified-canvas .profile-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.unified-canvas *{scroll-behavior:auto}}
@media(min-width:761px) and (max-width:1100px){
 .unified-canvas .chat-header{flex-wrap:wrap;gap:10px}
 .unified-canvas .chat-heading{min-width:140px;flex:1}
 .unified-canvas .header-controls{max-width:100%;margin-inline-start:auto;flex-wrap:wrap;gap:8px}
 .unified-canvas .space-insight-columns{grid-template-columns:1fr}
 .unified-canvas .space-insight-columns>section+section{border-inline-start:0;border-top:1px solid #e7ecf5;padding-inline-start:0;padding-top:14px}
}
@media(max-width:760px){.unified-canvas .sidebar{--text:#d4def6;--muted:#9aacca;color:#d4def6;color-scheme:dark}.unified-canvas .sidebar .brand{color:#e0e9fc}}
.unified-profile #sidebar{display:none!important}
/* Guest conversations share the account-chat surface, including their own dialogs. */
.unified-canvas[data-mode=guest] .messages:has(>.empty){display:flex;flex-direction:column}
.unified-canvas[data-mode=guest] .messages>.empty{height:auto;flex:1;flex-shrink:0;padding-block:28px}
.unified-canvas[data-mode=guest] .guest-note{flex-shrink:0;color:#5d7092;padding:12px 0;line-height:1.6}
.unified-canvas[data-mode=guest] .guest-note button{background:#fff;color:#37537e;border:1px solid #d5e0f2;border-radius:10px;min-height:44px;padding:8px 12px}
.unified-canvas[data-mode=guest] dialog{background:#fff;color:#263c60;border-color:#dbe5f2}
.unified-canvas[data-mode=guest] dialog input,.unified-canvas[data-mode=guest] dialog textarea,.unified-canvas[data-mode=guest] dialog select{background:#f8faff;color:#263c60;border-color:#d0def0}
.unified-canvas[data-mode=guest] dialog button{min-height:44px;padding:8px 12px;color:#37537e;background:#f3f7ff;border-color:#d5e0f2}
.unified-canvas[data-mode=guest] dialog button.danger{color:#a52f43;background:#fff0f1;border-color:#edc3ca}

/* Live remains a dark surface even when the chat underneath uses the light theme. */
.unified-canvas dialog:has(.account-voice-panel){color:#f6f8ff;color-scheme:dark;--muted:#d0d8ed;--accent:#c5bbff}
.unified-canvas dialog:has(.account-voice-panel) :is(.dialog-head,h2,select,option,.voice-state,.live-transcript,.live-timer,.live-diagnostics,.live-diagnostics p,.muted){color:#f6f8ff}
.unified-canvas dialog:has(.account-voice-panel) select{background:#101d36;border-color:#52678f}
.unified-canvas dialog:has(.account-voice-panel) #close-dialog{color:#f6f8ff}

/* Account dialogs have a dark surface independent of the light chat canvas. */
.unified-canvas:not(.space-room):not([data-mode=spaces]):not([data-mode=guest]) dialog{color:#fff;color-scheme:dark;--text:#fff;--muted:#d0d8ed;--accent:#c5bbff}
.unified-canvas:not(.space-room):not([data-mode=spaces]):not([data-mode=guest]) dialog :is(button:not(.danger),a,input,textarea,select,option,.dialog-head,h2,.muted){color:#fff}
.unified-canvas:not(.space-room):not([data-mode=spaces]):not([data-mode=guest]) dialog .danger{color:#ffb4ab}
