#assistant-root[hidden]{display:none}
#assistant-root{--aic-launcher-bottom:72px;--aic-launcher-height:110px;--aic-panel-gap:calc(var(--aic-launcher-height) + 12px);--aic-panel-bottom:calc(var(--aic-launcher-bottom) + var(--aic-panel-gap));--aic-brand-primary:#0b65bb;--aic-brand-secondary:#087c8e;--aic-accent-gradient:linear-gradient(115deg,#0c75d5,#2bace0 58%,#70cfbb);--aic-surface-gradient:linear-gradient(110deg,#f1f7ff,#eefaff 55%,#f1fbf7)}
.aic-launcher{position:fixed;right:24px;bottom:var(--aic-launcher-bottom);z-index:80;display:flex;align-items:center;gap:12px;min-height:var(--aic-launcher-height);padding:5px 0;border:0;border-radius:18px;background:transparent;box-shadow:none;color:var(--aic-brand-primary);font-size:15px;font-weight:800;letter-spacing:.02em}
.aic-launcher:hover{background:transparent;box-shadow:none}
.aic-launcher{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.aic-position-dragging .aic-launcher{cursor:grabbing}
.aic-launcher-mark,.aic-brand-mark{display:grid;place-items:center;flex:none;overflow:hidden;color:var(--aic-brand-primary);filter:drop-shadow(0 3px 4px #1c6baf1c)}
.aic-launcher-mark{position:relative;width:66px;height:98px;overflow:visible}
.aic-launcher-mark img{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:108px;height:108px;max-width:none;object-fit:contain;pointer-events:none}
.aic-launcher-copy{position:relative;display:grid;align-content:center;gap:3px;min-width:110px;padding:8px 16px;border:1.5px solid transparent;border-radius:18px;background:var(--aic-surface-gradient) padding-box,var(--aic-accent-gradient) border-box;box-shadow:0 7px 22px #1766a81f,0 2px 7px #087c8e10;text-align:center;white-space:nowrap}
.aic-launcher-copy::before{content:"";position:absolute;left:-5.5px;top:calc(50% - 4px);width:8px;height:8px;border-left:1.5px solid #1888cf;border-bottom:1.5px solid #1888cf;background:#f1f7ff;transform:rotate(45deg);pointer-events:none}
.aic-launcher:hover .aic-launcher-copy{background:linear-gradient(110deg,#fff,#edf7ff 45%,#ecfaf4) padding-box,var(--aic-accent-gradient) border-box;box-shadow:0 9px 26px #1766a82b,0 3px 9px #087c8e18}
.aic-launcher-copy strong{font-size:16px;line-height:1.35}
.aic-launcher-copy>span{font-size:12px;line-height:1.4;color:#54748d;font-weight:650}
.aic-brand-mark{border-radius:50%;background:#e7f3ff}
.aic-brand-mark img{display:block;width:100%;height:100%;object-fit:cover;transform:scale(1.8);transform-origin:50% 8%;pointer-events:none}
.aic-panel{position:fixed;right:24px;bottom:var(--aic-panel-bottom);z-index:80;width:min(460px,calc(100vw - 30px));height:min(740px,calc(100dvh - var(--aic-panel-bottom) - 24px));max-height:calc(100dvh - var(--aic-panel-bottom) - 14px);min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid #c9e0ef;border-radius:18px;background:#fff;box-shadow:0 24px 70px #164c8226;color:#263e60}
.aic-panel[hidden]{display:none}
.aic-header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 16px;background:var(--aic-surface-gradient);border-bottom:1px solid #daebf6}
.aic-brand{display:flex;align-items:center;gap:10px;min-width:0}
.aic-brand-mark{width:43px;height:43px}
.aic-brand h2{font-size:14px;line-height:1.3;margin:0;color:var(--aic-brand-primary)}
.aic-brand p{font-size:10px;margin:3px 0 0;color:#54748d}
.aic-header-actions{display:flex;gap:2px}
.aic-header-actions button{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:#607f9d}
.aic-header-actions button:hover{background:#e4f3fb;color:var(--aic-brand-primary)}
.aic-header-actions .icon{width:17px;height:17px}
.aic-context-note{flex:none;padding:8px 15px;background:#fff8e9;border-bottom:1px solid #f1e5cb;color:#8d6b36;font-size:10px;line-height:1.5}
.aic-context-note[hidden]{display:none}
.aic-messages{flex:1;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;overflow-anchor:none;scrollbar-width:thin;scrollbar-color:#bfd0ec #f3f7fd;padding:16px;display:flex;flex-direction:column;gap:13px;background:radial-gradient(circle at 100% 0,#f5faff,transparent 40%),#fff}
.aic-welcome{padding:3px 1px 10px;color:#47617f}
.aic-welcome h3{font-size:15px;color:var(--aic-brand-primary);margin:0 0 9px}
.aic-welcome h4{font-size:11px;color:#4875a8;margin:14px 0 6px}
.aic-welcome p{font-size:12px;line-height:1.7;margin:0 0 8px}
.aic-prompt-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:14px 0 12px}
.aic-prompt{min-width:0;display:grid;gap:4px;text-align:left;text-decoration:none;border:1px solid #dce9fa;border-radius:9px;padding:9px 10px;background:#f7fbff;color:#3b5c83}
.aic-prompt:hover{border-color:#a9cbf4;background:#eff7ff}
.aic-prompt strong{font-size:12px;color:#2b619c}
.aic-prompt span{font-size:11px;line-height:1.45;color:#7085a0}
.aic-welcome .aic-welcome-close{font-weight:700;color:var(--aic-brand-primary);margin:12px 0 0}
.aic-shortcuts{display:flex;gap:12px;flex-wrap:wrap;margin-top:10px}
.aic-shortcuts a{font-size:10px;font-weight:700;color:#3572b9}
.aic-message{min-width:0;max-width:94%;flex-shrink:0;display:grid;gap:5px}
.aic-message-label{font-size:10px;color:#8597ae;font-weight:700}
.aic-message-body{font-size:12px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere;padding:10px 12px;border-radius:11px}
.aic-user{align-self:flex-end}
.aic-user .aic-message-label{text-align:right}
.aic-user .aic-message-body{background:#e7f1ff;color:#2e557e;border-bottom-right-radius:3px}
.aic-failed-user .aic-message-body{background:#fff2ee;color:#865442}
.aic-assistant{align-self:flex-start}
.aic-assistant .aic-message-body{background:#f3f7fd;color:#344c69;border-bottom-left-radius:3px}
.aic-assistant .aic-message-body.b-markdown{min-width:0;max-width:100%;font-size:12px;line-height:1.8;white-space:normal}
.aic-assistant .b-markdown p{margin-bottom:11px}
.aic-assistant .b-markdown h1{font-size:17px}.aic-assistant .b-markdown h2{font-size:15px}.aic-assistant .b-markdown h3{font-size:14px}.aic-assistant .b-markdown h4,.aic-assistant .b-markdown h5,.aic-assistant .b-markdown h6{font-size:12px}
.aic-assistant .b-markdown h1,.aic-assistant .b-markdown h2,.aic-assistant .b-markdown h3,.aic-assistant .b-markdown h4,.aic-assistant .b-markdown h5,.aic-assistant .b-markdown h6{margin:15px 0 8px}
.aic-assistant .b-markdown ul,.aic-assistant .b-markdown ol{padding-left:20px;margin:8px 0 12px}
.aic-assistant .b-markdown li{margin:4px 0}
.aic-assistant .b-markdown-table-wrap{min-width:0;margin:12px 0;border-radius:7px}
.aic-assistant .b-markdown table{min-width:360px;font-size:11px}
.aic-assistant .b-markdown th,.aic-assistant .b-markdown td{min-width:100px;padding:8px 10px}
.aic-assistant .b-markdown pre{padding:9px;margin:11px 0;font-size:11px}
.aic-assistant .b-markdown .aic-code-block{min-width:0;max-width:100%;margin:11px 0;border:1px solid #d6e2f3;border-radius:9px;background:#edf3fc}
.aic-code-toolbar{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 10px;border-bottom:1px solid #d6e2f3;border-radius:8px 8px 0 0;background:#e8f0fc;color:#627d9f;font-size:11px;line-height:1.5}
.aic-code-copy{flex:none;min-height:30px;padding:4px 10px;border:1px solid #bbd1f1;border-radius:6px;background:#fff;color:#155bb4;font:inherit;font-size:12px;font-weight:650;cursor:pointer;white-space:nowrap}
.aic-code-copy:hover:not(:disabled){background:#e1edff;border-color:#7ba9e8}
.aic-code-copy:focus-visible{outline:2px solid #126cba;outline-offset:2px}
.aic-code-copy:disabled{opacity:.55;cursor:default}
.aic-assistant .b-markdown .aic-code-block pre{margin:0;border:0;border-radius:0 0 8px 8px;background:transparent;overscroll-behavior-x:contain}
.aic-assistant .b-markdown>*:first-child{margin-top:0}.aic-assistant .b-markdown>*:last-child{margin-bottom:0}
.aic-presenting .aic-message-body:empty{min-height:40px}
.aic-follow-control{flex:none;display:flex;align-items:center;justify-content:space-between;gap:7px;padding:7px 13px;background:#f2f7ff;border-top:1px solid #e2ecfa;font-size:10px;line-height:1.4;color:#7389a6}
.aic-follow-control[hidden],.aic-follow-control button[hidden]{display:none}
.aic-follow-control button{flex:none;border:1px solid #cee0f7;border-radius:99px;background:#fff;padding:4px 8px;color:#3373bc;font-size:10px;font-weight:650}
.aic-follow-control button:hover{background:#e9f2ff;border-color:#aecdf4}
.aic-waiting .aic-message-body{color:#758aa5}
.aic-message-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.aic-model{font-size:9px;color:#8a9cb0;overflow-wrap:anywhere}
.aic-copy,.aic-retry{border:0;background:transparent;color:#3a77bf;font-size:10px;font-weight:700;padding:3px 0}
.aic-copy:hover,.aic-retry:hover{text-decoration:underline}
.aic-copy:disabled{color:#879bb5;cursor:default;text-decoration:none}
.aic-references{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.aic-references-title{font-size:9px;color:#8598ae}
.aic-reference{max-width:100%;font-size:9px;color:#527697;background:#ecf4fc;border:1px solid #dce8f5;border-radius:5px;padding:3px 5px;overflow-wrap:anywhere}
.aic-send-error{align-self:flex-end;max-width:94%;display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#fff4f1;border:1px solid #f0d8d1;color:#a45244;border-radius:8px;padding:8px 10px;font-size:10px;line-height:1.5}
.aic-composer{flex:none;display:grid;gap:9px;padding:11px 13px 12px;border-top:1px solid #e3ecf7;background:#fff}
.aic-knowledge{display:inline-flex;align-items:center;gap:6px;width:max-content;color:#617c9d;font-size:10px;font-weight:650}
.aic-knowledge input{accent-color:var(--aic-brand-primary);width:14px;height:14px;margin:0}
.aic-compose-row{display:flex;align-items:end;gap:7px}
.aic-compose-row textarea{flex:1;min-width:0;max-height:110px;min-height:44px;resize:vertical;border:1px solid #d7e4f3;border-radius:9px;padding:10px 11px;outline:0;color:#2c4668;font-size:12px;line-height:1.5}
.aic-compose-row textarea:focus{border-color:#3088ca;box-shadow:0 0 0 3px #2182cc21}
.aic-compose-row button{display:grid;place-items:center;width:43px;height:43px;flex:none;border:0;border-radius:9px;background:linear-gradient(125deg,#0b65bb,#087c8e);color:#fff}
.aic-compose-row button:hover:not(:disabled){background:linear-gradient(125deg,#075798,#086b7b)}
.aic-compose-row button .icon{width:18px;height:18px}
.aic-temporary{font-size:9px;line-height:1.45;color:#97a6b8;margin:0}
#assistant-root :focus-visible{outline:2px solid #126cba;outline-offset:2px}
.aic-view-nav{flex:none;display:flex;align-items:center;gap:6px;padding:9px 13px;border-bottom:1px solid #e3edf9;background:#fff}
.aic-view-nav button{border:0;border-radius:7px;padding:7px 12px;background:transparent;color:#657e9c;font-size:13px;font-weight:700;white-space:nowrap}
.aic-view-nav button.active{background:var(--aic-surface-gradient);color:var(--aic-brand-primary)}
.aic-view-nav span{margin-left:auto;font-size:12px;color:#7287a2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.aic-guide-view{flex:1;min-height:0;overflow:auto;padding:16px;overscroll-behavior:contain;scrollbar-width:thin;background:#f8fbff}
.aic-guide-view[hidden],.aic-messages[hidden]{display:none}
.aic-guide-select{display:flex;align-items:center;gap:12px;font-size:12px;color:#607a9b}
.aic-guide-select select{flex:1;min-width:0;border:1px solid #cfdef0;border-radius:8px;padding:9px 10px;background:#fff;color:#2b5184;font-size:14px}
.aic-guide-body{margin-top:14px;padding:15px;background:#fff;border:1px solid #dce8f7;border-radius:12px}
.aic-guide-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.aic-guide-heading h3,.aic-guide-heading h4{margin:0;color:#2b5184;font-size:15px}
.aic-guide-heading a,.aic-guide-heading button{flex:none;border:0;padding:4px 0;background:transparent;font-size:12px;color:#286ec4;font-weight:700;text-decoration:none}
.aic-guide-body p,.aic-guide-body li{font-size:13px;line-height:1.75;color:#49617f;overflow-wrap:anywhere}
.aic-guide-body p{margin:10px 0}
.aic-guide-body ol{padding-left:22px;margin:16px 0}
.aic-guide-body li{padding-left:3px;margin:9px 0}
.aic-guide-body li::marker{color:#3477c8;font-weight:750}
.aic-guide-notes{border-left:3px solid #99bfe8;border-radius:0 6px 6px 0;background:#f2f7ff;padding:4px 10px}
.aic-guide-notes p{font-size:12px;margin:6px 0}
.aic-guide-body h4{font-size:13px;margin:18px 0 10px;color:#4e749d}
.aic-guide-questions{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.aic-guide-question{max-width:100%;border:1px solid #d4e3f6;border-radius:7px;background:#f6faff;color:#326db0;padding:7px 9px;text-align:left;font-size:12px;line-height:1.4}
.aic-guide-question:hover{background:#eaf3ff;border-color:#accbef}
.aic-guide-body .aic-guide-free{font-size:11px;color:#8797ac;margin-top:14px}
.aic-brand h2{font-size:16px;width:max-content;max-width:100%}.aic-brand p{font-size:11px}
.aic-welcome h4{font-size:13px}.aic-welcome p{font-size:13px}
.aic-prompt strong{font-size:13px}.aic-prompt span{font-size:12px}
.aic-message-body,.aic-assistant .aic-message-body.b-markdown{font-size:13px}
.aic-knowledge{font-size:12px}.aic-temporary{font-size:10px}
@media(max-width:520px){#assistant-root{--aic-launcher-bottom:63px;--aic-launcher-height:98px;--aic-panel-gap:calc(var(--aic-launcher-height) + 10px)}.aic-launcher{right:13px}.aic-launcher-mark{width:58px;height:86px}.aic-launcher-mark img{width:96px;height:96px}.aic-launcher-copy{min-width:100px;padding:6px 12px}.aic-panel{left:10px;right:10px;width:auto;height:min(690px,calc(100dvh - var(--aic-panel-bottom) - 13px));max-height:calc(100dvh - var(--aic-panel-bottom) - 13px);border-radius:15px}.aic-messages{padding:12px}.aic-prompt-grid{gap:6px}}
@media(max-height:540px){.aic-panel{height:calc(100dvh - var(--aic-panel-bottom) - 8px);max-height:calc(100dvh - var(--aic-panel-bottom) - 8px)}.aic-header{padding:8px 12px}.aic-messages{padding:10px}.aic-composer{padding:8px 10px}}
@media(max-height:400px){.aic-panel{bottom:12px;height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);overflow-y:auto}}

.aic-barrage{position:fixed;right:24px;bottom:calc(var(--aic-launcher-bottom) + var(--aic-panel-gap));z-index:79;display:flex;align-items:center;width:min(340px,calc(100% - 48px));min-height:46px;border:1px solid transparent;border-radius:14px;background:var(--aic-surface-gradient) padding-box,var(--aic-accent-gradient) border-box;box-shadow:0 8px 24px #1766a81a;color:var(--aic-brand-primary)}
.aic-barrage[hidden]{display:none}
.aic-barrage::after{content:"";position:absolute;right:50px;bottom:-6px;width:10px;height:10px;border-right:1px solid #b3d9e9;border-bottom:1px solid #b3d9e9;background:#f1fbf9;transform:rotate(45deg);pointer-events:none}
.aic-barrage[data-placement]::after{left:var(--aic-arrow-left);right:auto}
.aic-barrage[data-placement="below"]::after{top:-6px;bottom:auto;transform:rotate(225deg)}
.aic-barrage-open{flex:1;min-width:0;display:flex;align-items:center;gap:8px;padding:12px 8px 12px 12px;border:0;border-radius:13px 0 0 13px;background:transparent;color:inherit;text-align:left;font-size:14px;line-height:22px;cursor:pointer}
.aic-barrage-open:hover{color:var(--aic-brand-primary);background:#ffffff80}
.aic-barrage-spark{flex:none;width:16px;color:var(--aic-brand-secondary);text-align:center;font-size:17px;line-height:22px}
.aic-barrage-viewport{display:block;flex:1;min-width:0;height:22px;overflow:hidden}
.aic-barrage-text{display:block;white-space:nowrap;line-height:22px;font-weight:650;transform:translateY(0);opacity:1}
.aic-launcher>span:last-child,.aic-brand h2,.aic-barrage-text{color:var(--aic-brand-primary)}
.aic-barrage[data-phase="enter"] .aic-barrage-text{animation:aic-barrage-enter 500ms ease-out both}
.aic-barrage[data-phase="exit"] .aic-barrage-text{animation:aic-barrage-exit 500ms ease-in both}
.aic-barrage.is-paused .aic-barrage-text,.aic-barrage:hover .aic-barrage-text,.aic-barrage:focus-within .aic-barrage-text{animation-play-state:paused}
.aic-barrage-dismiss{display:grid;place-items:center;flex:none;width:28px;height:30px;margin-right:3px;padding:0;border:0;border-radius:8px;background:transparent;color:#638398;font-size:20px;line-height:1;cursor:pointer}
.aic-barrage-dismiss:hover{background:#e4f4fb;color:var(--aic-brand-primary)}
.aic-barrage-open:focus-visible,.aic-barrage-dismiss:focus-visible{outline:2px solid #126cba;outline-offset:2px}
@keyframes aic-barrage-enter{from{transform:translateY(12px);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes aic-barrage-exit{from{transform:translateY(0);opacity:1}to{transform:translateY(-12px);opacity:0}}
@media(max-width:520px){.aic-barrage{right:13px;width:min(340px,calc(100% - 26px));min-height:44px;border-radius:13px}.aic-barrage-open{gap:0;padding:11px 5px 11px 12px;border-radius:12px 0 0 12px;font-size:13px}.aic-barrage-spark{display:none}.aic-barrage::after{right:50px}}
@media(prefers-reduced-motion:reduce){.aic-barrage[data-phase="enter"] .aic-barrage-text,.aic-barrage[data-phase="exit"] .aic-barrage-text{animation:none;transform:none;opacity:1}}
@media(forced-colors:active){.aic-launcher{background:transparent;box-shadow:none}.aic-launcher-copy,.aic-launcher:hover .aic-launcher-copy,.aic-barrage,.aic-panel{border-color:ButtonText;background:Canvas;box-shadow:none}.aic-launcher-copy,.aic-launcher-copy strong,.aic-launcher-copy>span,.aic-brand h2,.aic-barrage-text{color:ButtonText;-webkit-text-fill-color:currentColor}.aic-launcher-copy::before,.aic-barrage::after{background:Canvas;border-color:ButtonText}.aic-launcher-mark,.aic-brand-mark{box-shadow:none;filter:none}.aic-barrage-spark,.aic-welcome h3,.aic-welcome .aic-welcome-close,.aic-view-nav button.active{color:ButtonText}.aic-compose-row button{background:ButtonFace;color:ButtonText;border:1px solid ButtonText}}


/* Full-page AI chat reuses the floating assistant DOM and conversation. */
.main-area:has(> .aic-chat-page-container) {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.main-area:has(> .aic-chat-page-container) > .topbar,
.main-area:has(> .aic-chat-page-container) > .support-banner {
  flex-shrink: 0;
}
#page-content.aic-chat-page-container {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.aic-chat-page {
  display: flex;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0 auto;
}
#assistant-root.aic-page {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
#assistant-root.aic-page .aic-panel {
  position: relative;
  inset: auto;
  z-index: auto;
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}
.aic-page .aic-launcher,
.aic-page .aic-barrage,
.aic-page [data-action="minimize"] {
  display: none;
}
.aic-page .aic-header {
  padding: 10px 24px;
}
.aic-page .aic-brand h2 {
  font-size: 16px;
}
.aic-page .aic-brand p {
  font-size: 12px;
}
.aic-page .aic-header-actions button {
  width: 38px;
  height: 38px;
}
.aic-page .aic-view-nav {
  padding: 6px 24px;
}
.aic-page .aic-view-nav button {
  min-height: 32px;
  padding: 6px 14px;
  font-size: 13px;
}
.aic-page .aic-context-note {
  padding: 9px 24px;
  font-size: 12px;
}
.aic-page .aic-messages {
  gap: 20px;
  padding: 24px;
}
/* Keep the eight welcome shortcuts visible without constraining long replies. */
.aic-page .aic-messages:has(> .aic-welcome) {
  padding-block: 12px;
}
.aic-page .aic-welcome {
  flex-shrink: 0;
  width: 100%;
  max-width: 880px;
  margin: 0;
  text-align: left;
  padding: 0;
}
.aic-page .aic-welcome h3 {
  margin-bottom: 4px;
  font-size: 17px;
  line-height: 1.35;
}
.aic-page .aic-welcome h4 {
  margin: 6px 0 3px;
  font-size: 13px;
  line-height: 1.4;
}
.aic-page .aic-welcome p {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.aic-page .aic-welcome .aic-welcome-close {
  margin: 6px 0 0;
}
.aic-page .aic-prompt-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 6px;
}
.aic-page .aic-prompt {
  gap: 2px;
  padding: 7px 10px;
  border-radius: 11px;
}
.aic-page .aic-prompt strong {
  font-size: 13px;
  line-height: 1.35;
}
.aic-page .aic-prompt span {
  font-size: 12px;
  line-height: 1.4;
}
.aic-page .aic-shortcuts a {
  font-size: 12px;
}
.aic-page .aic-message {
  max-width: min(88%, 920px);
}
.aic-page .aic-message-label {
  font-size: 12px;
}
.aic-page .aic-message-body,
.aic-page .aic-assistant .aic-message-body.b-markdown {
  padding: 13px 17px;
  font-size: 13px;
  line-height: 1.8;
}
.aic-page .aic-assistant .b-markdown h1 { font-size: 18px; }
.aic-page .aic-assistant .b-markdown h2 { font-size: 17px; }
.aic-page .aic-assistant .b-markdown h3 { font-size: 15px; }
.aic-page .aic-assistant .b-markdown h4,
.aic-page .aic-assistant .b-markdown h5,
.aic-page .aic-assistant .b-markdown h6 { font-size: 14px; }
.aic-page .aic-assistant .b-markdown table,
.aic-page .aic-assistant .b-markdown pre { font-size: 13px; }
.aic-page .aic-copy,
.aic-page .aic-retry,
.aic-page .aic-reference,
.aic-page .aic-references-title,
.aic-page .aic-model { font-size: 11px; }
.aic-page .aic-send-error {
  max-width: min(88%, 920px);
  font-size: 12px;
}
.aic-page .aic-follow-control {
  padding: 8px 24px;
  font-size: 12px;
}
.aic-page .aic-follow-control button {
  padding: 5px 11px;
  font-size: 12px;
}
.aic-page .aic-composer {
  gap: 6px;
  padding: 12px 24px;
}
.aic-page .aic-composer > * {
  width: 100%;
  max-width: 960px;
  margin-inline: 0;
}
.aic-page .aic-knowledge {
  font-size: 13px;
}
.aic-page .aic-compose-row {
  gap: 12px;
}
.aic-page .aic-compose-row textarea {
  min-height: 64px;
  max-height: 160px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}
.aic-page .aic-compose-row button {
  width: 48px;
  height: 48px;
  border-radius: 11px;
}
.aic-page .aic-temporary {
  font-size: 11px;
}
.aic-page .aic-guide-view {
  padding: 24px;
}
.aic-page .aic-guide-select,
.aic-page .aic-guide-body {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
}
.aic-page .aic-guide-body {
  padding: 22px 24px;
}
.aic-page .aic-guide-heading h3 {
  font-size: 16px;
}
.aic-page .aic-guide-body p,
.aic-page .aic-guide-body li {
  font-size: 13px;
}
@media (max-width: 760px) {
  .aic-page .aic-header {
    padding: 12px 16px;
  }
  .aic-page .aic-view-nav {
    gap: 4px;
    padding: 7px 12px;
  }
  .aic-page .aic-view-nav button {
    padding-inline: 10px;
  }
  .aic-page .aic-view-nav span {
    font-size: 11px;
  }
  .aic-page .aic-messages,
  .aic-page .aic-guide-view {
    padding: 18px 16px;
  }
  .aic-page .aic-prompt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .aic-page .aic-prompt {
    padding: 12px;
  }
  .aic-page .aic-message,
  .aic-page .aic-send-error {
    max-width: 94%;
  }
  .aic-page .aic-composer {
    gap: 8px;
    padding: 12px 14px max(12px, env(safe-area-inset-bottom));
  }
  .aic-page .aic-compose-row {
    gap: 8px;
  }
  .aic-page .aic-compose-row textarea {
    min-height: 62px;
    max-height: 130px;
    font-size: 13px;
  }
  .aic-page .aic-follow-control,
  .aic-page .aic-context-note {
    padding-inline: 14px;
  }
  .aic-page .aic-guide-body {
    padding: 16px;
  }
}
@media (max-height: 560px) {
  .aic-page .aic-header {
    padding: 7px 14px;
  }
  .aic-page .aic-brand-mark {
    width: 32px;
    height: 32px;
  }
  .aic-page .aic-brand p {
    display: none;
  }
  .aic-page .aic-header-actions button {
    width: 32px;
    height: 32px;
  }
  .aic-page .aic-view-nav {
    padding-block: 4px;
  }
  .aic-page .aic-view-nav button {
    min-height: 30px;
    padding-block: 4px;
  }
  .aic-page .aic-messages,
  .aic-page .aic-guide-view {
    padding-block: 12px;
  }
  .aic-page .aic-composer {
    gap: 4px;
    padding-top: 7px;
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }
  .aic-page .aic-compose-row textarea {
    min-height: 44px;
    max-height: 72px;
    padding-block: 8px;
  }
  .aic-page .aic-compose-row button {
    width: 42px;
    height: 42px;
  }
  .aic-page .aic-temporary {
    font-size: 10px;
  }
  .aic-page .aic-follow-control {
    padding-block: 4px;
  }
}

@media (max-height: 400px) {
  #assistant-root.aic-page .aic-panel {
    overflow-y: auto;
  }
  .aic-page .aic-messages,
  .aic-page .aic-guide-view {
    flex-basis: 72px;
    flex-shrink: 0;
    min-height: 72px;
  }
}

/* Personal conversation history shares the existing floating/page surface. */
.aic-workspace{position:relative;display:flex;flex:1;min-width:0;min-height:0;overflow:hidden}
.aic-chat-main{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.aic-history,.aic-history-toggle,.aic-history-collapse,.aic-history-resize{display:none}
.aic-page .aic-workspace{--aic-history-width:220px}
.aic-page .aic-history{display:flex;flex:none;flex-direction:column;gap:12px;width:var(--aic-history-width);min-height:0;padding:18px 12px;background:#f7f9fc;border-right:1px solid #e3eaf2}
.aic-history-new{flex:none;border:0;border-radius:9px;background:#1369c2;color:white;padding:11px 12px;font-weight:700;font-size:13px;text-align:left}
.aic-history-list{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:5px}
.aic-history-entry{position:relative;display:grid;flex:none;gap:5px;min-width:0;max-width:100%;padding:11px 12px;border:1px solid transparent;border-radius:8px;background:transparent;color:#586c84;text-align:left}
.aic-history-entry strong{font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aic-history-entry small{font-size:11px;color:#8997a9}
.aic-history-entry:hover{background:#edf3fa}
.aic-history-entry.active{color:#125eae;background:#e5f0ff;border-color:#bed6f4}
.aic-history-entry.active strong{font-weight:700}
.aic-history-empty{font-size:12px;color:#8a98aa;text-align:center;padding-top:12px}
.aic-history-more,.aic-older{border:1px solid #d5e1f0;border-radius:8px;padding:8px;background:#fff;color:#356aab;font-size:12px}
.aic-unavailable{font-size:12px;color:#8997a9;padding:8px}
.aic-page .aic-prompt-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:820px){.aic-page .aic-history{display:none}.aic-page .aic-history-toggle{display:block}.aic-page .aic-history-open .aic-history{display:flex;position:absolute;inset:0 auto 0 0;z-index:5;width:min(260px,85%);box-shadow:8px 0 28px #123e6e20}.aic-page .aic-messages{padding:14px}.aic-page .aic-header,.aic-page .aic-view-nav{padding-inline:14px}}

.aic-upload-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:9px 0 3px}
.aic-upload-actions button{border:1px solid #d9e4f0;background:#f8fbff;border-radius:7px;color:#4c6b8f;padding:6px 9px;font-size:12px}
.aic-upload-actions button:disabled{opacity:.5;cursor:not-allowed}
.aic-upload-actions [role=status]{font-size:11px;color:#a27022}
.aic-draft-attachments{display:flex;gap:7px;flex-wrap:wrap;max-height:115px;overflow:auto;margin-top:7px}
.aic-attachment-chip{display:flex;align-items:center;gap:7px;padding:6px 8px;max-width:100%;border:1px solid #d8e5f3;border-radius:8px;background:#f7fbff;font-size:11px}
.aic-attachment-chip img{width:38px;height:38px;border-radius:5px;object-fit:cover}
.aic-attachment-chip div{display:grid;gap:3px;min-width:0}.aic-attachment-chip strong{max-width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}.aic-attachment-chip small{color:#8595a8;font-size:10px}
.aic-attachment-chip button,.aic-sent-file button{border:0;background:transparent;color:#2673bd;padding:3px;font-size:11px}
.aic-history-attachments{align-self:flex-end;display:flex;flex-wrap:wrap;gap:7px;max-width:95%;margin-top:-8px}
.aic-sent-file{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:7px 9px;border:1px solid #d7e6f5;border-radius:8px;background:#f9fcff;font-size:11px}.aic-sent-file strong{font-weight:500}.aic-sent-file small{color:#8092a9}
.aic-document-preview{white-space:pre-wrap;max-height:55vh;overflow:auto;font-size:13px}.aic-image-preview{max-width:100%;max-height:65vh;object-fit:contain}

.aic-attachment-default{flex-basis:100%;font-size:11px;color:#70849d;line-height:1.5;margin:3px 0}

/* Desktop-only control stays outside the aside so it can reopen the list. */
@media(min-width:821px){
 .aic-page .aic-history-collapse{display:flex;position:absolute;z-index:6;left:var(--aic-history-width);top:50%;transform:translate(-50%,-50%);align-items:center;justify-content:center;width:24px;height:44px;padding:0;border:1px solid #cbdced;border-radius:8px;background:#fff;color:#3b78b6;box-shadow:0 2px 8px #345c8c14;font-size:22px;line-height:1;cursor:pointer}
 .aic-page .aic-history-collapse:hover{background:#edf5ff;border-color:#86b4e6;color:#125eae}
 .aic-page .aic-history-collapse:focus-visible{outline:2px solid #2874c5;outline-offset:-3px}
 .aic-page .aic-history-collapsed .aic-history{display:none}
 .aic-page .aic-history-collapsed .aic-history-collapse{left:12px}
}

@media(min-width:821px){
 .aic-page .aic-history-resize{display:block;position:absolute;z-index:5;left:var(--aic-history-width);inset-block:0;width:8px;transform:translateX(-50%);cursor:col-resize;touch-action:none}
 .aic-page .aic-history-resize::before{content:"";position:absolute;inset-block:0;left:3px;width:2px;border-radius:1px}
 .aic-page .aic-history-resize:hover::before,.aic-page .aic-history-resize:focus-visible::before,.aic-page .aic-history-resizing .aic-history-resize::before{background:#6ba7e2}
 .aic-page .aic-history-resize:focus-visible{outline:none}
 .aic-page .aic-history-resizing,.aic-page .aic-history-resizing *{cursor:col-resize!important;user-select:none!important}
 .aic-page .aic-history-collapsed .aic-history-resize{display:none}
}
.aic-thinking{display:flex;align-items:center;gap:7px;color:#657491;min-height:24px}
.aic-thinking-dots{display:inline-flex;align-items:center;gap:4px;height:20px}
.aic-thinking-dots span{display:block;width:5px;height:5px;border-radius:50%;background:currentColor;animation:aic-thinking 1.2s ease-in-out infinite;opacity:.35}
.aic-thinking-dots span:nth-child(2){animation-delay:.18s}
.aic-thinking-dots span:nth-child(3){animation-delay:.36s}
.aic-live-status{margin-top:8px;font-size:12px;color:#7c8aa1}
.aic-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes aic-thinking{0%,65%,100%{transform:translateY(0);opacity:.35}30%{transform:translateY(-4px);opacity:1}}
@media (prefers-reduced-motion: reduce){.aic-thinking-dots span{animation:none;opacity:.7}}

/* The upper edge changes only composer height; leave room to read replies. */
.aic-input-shell{position:relative;flex:1;min-width:0}
#assistant-chat-panel .aic-input-shell textarea{display:block;width:100%;box-sizing:border-box;resize:none;max-height:none;height:var(--aic-input-height,auto)}
.aic-input-resize{position:absolute;top:-7px;left:12px;right:12px;height:14px;display:flex;align-items:center;justify-content:center;cursor:ns-resize;touch-action:none;user-select:none;z-index:2;border-radius:6px;outline-offset:1px}
.aic-input-resize span{width:32px;height:4px;border-radius:9px;background:#bdcfe6;transition:background .15s}
.aic-input-resize:hover span,.aic-input-resize:focus-visible span{background:#2879cf}
.aic-input-resize:focus-visible{outline:2px solid #2879cf}
.aic-input-resize[aria-disabled="true"]{cursor:default}
.aic-input-resizing,.aic-input-resizing *{cursor:ns-resize!important;user-select:none}
