/* Canonical /ai layer: scoped to the real app root, independent of legacy theme aliases. */
html #sk-v39-root {
 --chat-surface:#232830;--chat-hover:#303944;--chat-border:#3b4653;--chat-text:#edf3f8;--chat-muted:#a5b4c3;--chat-accent:#98c9e3;--chat-user:#303c4a;--chat-code:#191f27;
}
html[data-sk-theme="light"] #sk-v39-root {
 --chat-surface:#f1f7fc;--chat-hover:#dfedf8;--chat-border:#bfd4e5;--chat-text:#172b3b;--chat-muted:#536c81;--chat-accent:#25698f;--chat-user:#dfedf9;--chat-code:#e7f0f8;
}
html #sk-v39-root #sk39-chat {justify-content:flex-start!important;align-content:start!important}
html #sk-v39-root .sk39-msgs {gap:20px!important;justify-content:flex-start!important;align-content:start!important}
html #sk-v39-root .sk39-msg {margin:0 0 20px!important;min-height:0!important;flex:0 0 auto!important;animation:none!important}
html #sk-v39-root .sk39-msg .sk39-bubble {
 background:var(--chat-surface)!important;background-image:none!important;color:var(--chat-text)!important;border:1px solid var(--chat-border)!important;border-radius:7px 20px 20px!important;padding:16px 20px!important;min-height:0!important;box-shadow:none!important;text-shadow:none!important;line-height:1.65!important;
}
html #sk-v39-root .sk39-msg.user .sk39-bubble {background:var(--chat-user)!important;border-radius:20px 20px 7px 20px!important;max-width:680px!important;padding:12px 18px!important}
html #sk-v39-root .sk39-bubble :is(.sk39-md,.sk39-md *,p,span,div,strong,li,small) {color:inherit!important;text-shadow:none!important}
html #sk-v39-root .sk39-bubble :is(pre,.sk39-code-block) {background:var(--chat-code)!important;border:1px solid var(--chat-border)!important;color:var(--chat-text)!important;border-radius:12px!important;box-shadow:none!important}
html #sk-v39-root .sk39-msg-avatar {background:var(--chat-surface)!important;color:var(--chat-accent)!important;border:1px solid var(--chat-border)!important;border-radius:12px!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;flex-basis:32px!important;font-size:11px!important}
html #sk-v39-root .sk39-msg-live-timer.empty,html #sk-v39-root .sk39-msg-meta.empty {display:none!important;min-height:0!important}
html #sk-v39-root .sk39-msg-meta {margin-top:4px!important;min-height:0!important;color:var(--chat-muted)!important;font-size:11px!important}
html #sk-v39-root .sk39-msg-actions {margin:6px 0 0!important;gap:4px!important;min-height:28px!important;opacity:1!important}
html #sk-v39-root :is(.sk39-msg-action-btn,.sk39-top-btn) {height:34px!important;border-radius:10px!important;background:var(--chat-surface)!important;color:var(--chat-muted)!important;border:1px solid var(--chat-border)!important;box-shadow:none!important;padding:6px 10px!important}
html #sk-v39-root :is(.sk39-msg-action-btn,.sk39-top-btn):hover {background:var(--chat-hover)!important;color:var(--chat-text)!important}
html #sk-v39-root :is(.sk39-msg-action-btn,.sk39-top-btn):focus-visible {outline:2px solid var(--chat-accent)!important;outline-offset:3px!important}
html #sk-v39-root button:disabled {cursor:not-allowed!important;opacity:.48!important}
html #sk-v39-root .sk239-thinking {border:1px solid var(--chat-border)!important;border-radius:12px!important;background:var(--chat-code)!important;color:var(--chat-text)!important;margin:0 0 12px!important;padding:0!important;max-height:240px!important;overflow:auto!important;box-shadow:none!important;min-width:0!important}
html #sk-v39-root .sk239-thinking summary {display:flex!important;align-items:center!important;gap:9px!important;min-height:42px!important;padding:10px 12px!important;color:var(--chat-text)!important;background:none!important;border:0!important;box-shadow:none!important;font-size:13px!important;cursor:pointer!important;text-align:left!important}
html #sk-v39-root .sk239-thinking summary::after {content:'+';margin-left:auto;color:var(--chat-muted)}
html #sk-v39-root .sk239-thinking[open] summary::after {content:'−'}
html #sk-v39-root .sk239-thinking summary small {font-size:11px!important;font-weight:400!important;color:var(--chat-muted)!important}
html #sk-v39-root .sk239-thinking-dot {width:7px;height:7px;border-radius:50%;background:var(--chat-accent)!important;flex:0 0 7px}
html #sk-v39-root .sk239-thinking-body {padding:0 14px 12px!important;font-size:13px!important;line-height:1.55!important}
html #sk-v39-root .sk239-thinking-body p {margin:6px 0!important}
html #sk-v39-root .sk239-thinking-note {font-size:11px!important;color:var(--chat-muted)!important}
html #sk-v39-root .sk239-thinking summary:focus-visible {outline:2px solid var(--chat-accent)!important;outline-offset:-3px!important}
html #sk-v39-root .sk39-compose :is(button,.sk-response-thinking,.sk-response-model) {color:var(--chat-text)!important;background:var(--chat-surface)!important;border-color:var(--chat-border)!important;box-shadow:none!important}
html #sk-v39-root .sk39-compose button :is(span,svg,path) {color:inherit!important;stroke:currentColor!important}
html #sk-v39-root .sk39-compose button:hover {background:var(--chat-hover)!important}
@media(max-width:600px){html #sk-v39-root .sk39-msg .sk39-bubble{padding:13px 14px!important}html #sk-v39-root .sk39-msg-avatar{display:none!important}html #sk-v39-root .sk239-thinking summary{flex-wrap:wrap!important}html #sk-v39-root .sk39-msg-actions button span{display:none!important}}
html #sk-v39-root .sk239-thinking summary::before {display:none!important;content:none!important}
html #sk-v39-root .sk39-web-toggle>span {display:none!important}
html #sk-v39-root .sk39-reasoning-mini-wrap,html #sk-v39-root .sk-response-thinking {position:static!important;display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;margin:0!important;transform:none!important}
html #sk-v39-root .sk39-reasoning-toggle {position:static!important;display:inline-flex!important;align-items:center!important;gap:6px!important;height:36px!important;min-height:36px!important;padding:6px 10px!important;border-radius:10px!important;font-size:12px!important;color:var(--chat-text)!important}
html #sk-v39-root .sk39-topbar :is(.sk39-title,.sk39-msg-counter),html #sk-v39-root .sk39-msg-counter {background:transparent!important;color:var(--chat-text)!important;box-shadow:none!important}
html #sk-v39-root .sk39-quota-progress {accent-color:var(--chat-accent)!important}
html #sk-v39-root .sk39-quota-progress::-webkit-progress-value {background:var(--chat-accent)!important}
html #sk-v39-root .sk39-quota-progress::-moz-progress-bar {background:var(--chat-accent)!important}
html #sk-v39-root .sk39-top-btn {color:var(--chat-text)!important}
/* Some legacy themes set text-fill independently of color. Reset both. */
html #sk-v39-root .sk39-bubble,html #sk-v39-root .sk39-bubble *,html #sk-v39-root button,html #sk-v39-root button * {-webkit-text-fill-color:currentColor!important}
html #sk-v39-root .sk39-top-actions button::before {content:none!important;display:none!important}
html #sk-v39-root .sk39-top-actions .sk239-top-label {color:inherit!important}
@media(max-width:720px){
 html #sk-v39-root .sk39-top {display:grid!important;grid-template-columns:36px minmax(0,1fr) auto!important;gap:8px!important;padding:10px!important;min-height:64px!important}
 html #sk-v39-root .sk39-top-center {position:static!important;left:auto!important;transform:none!important;min-width:0!important;width:auto!important;max-width:100%!important;overflow:hidden!important}
 html #sk-v39-root .sk39-ai-center-title {display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important;max-width:100%!important;background:transparent!important;align-items:center!important}
 html #sk-v39-root .sk39-current-model-name {display:block!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:12px!important;color:var(--chat-text)!important}
 html #sk-v39-root .sk39-msg-counter {font-size:10px!important}
 html #sk-v39-root .sk39-top-actions {position:static!important;gap:5px!important;min-width:0!important}
 html #sk-v39-root .sk39-top-actions .sk39-top-btn {width:34px!important;min-width:34px!important;max-width:34px!important;height:36px!important;padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
 html #sk-v39-root .sk239-top-label {display:none!important}
}
@media(max-width:720px){
 html #sk-v39-root .sk39-top-actions {height:36px!important;margin:0!important;transform:none!important;align-self:center!important;top:auto!important;right:auto!important;bottom:auto!important}
 html #sk-v39-root .sk39-reasoning-toggle span {display:inline!important;font-size:11px!important}
 html #sk-v39-root .sk39-reasoning-toggle {width:auto!important;min-width:72px!important;max-width:none!important;gap:4px!important;padding:6px!important}
}
@media(max-width:600px){
 html #sk-v39-root .sk39-compose-v2-actions {display:flex!important;gap:8px!important;align-items:center!important}
 html #sk-v39-root .sk39-compose-v2-left {flex:1 1 0!important;width:auto!important;max-width:none!important;min-width:0!important;gap:4px!important}
 html #sk-v39-root .sk39-compose-v2-right {flex:0 0 36px!important;width:36px!important;min-width:36px!important;max-width:36px!important}
 html #sk-v39-root .sk-response-model {flex:1 1 65px!important;min-width:60px!important;width:auto!important;overflow:hidden!important}
 html #sk-v39-root .sk-response-model .sk39-compose-model-btn {width:100%!important;min-width:60px!important;max-width:100%!important;padding:0 6px!important;justify-content:flex-start!important}
}
