body.chat-page{margin:0;background:#282a36;color:#f8f8f2;font-family:'Segoe UI','Avenir Next',sans-serif;height:100dvh;overflow:hidden}body.chat-page *{box-sizing:border-box}#butler-root{height:100dvh;display:flex;flex-direction:column}#butler-root[hidden],body.chat-page [hidden]{display:none!important}.chat-header{height:64px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid #6272a4;background:#282a36}.chat-header a{color:#f8f8f2;text-decoration:none}.chat-brand{font-size:21px;font-weight:650;color:#bd93f9!important;letter-spacing:.3px}.chat-header nav{display:flex;gap:24px;align-items:center;font-size:14px}.chat-more{position:relative}.chat-more summary{cursor:pointer}.chat-more>div{position:absolute;right:0;top:30px;background:#282a36;border:1px solid #6272a4;padding:18px;min-width:220px;border-radius:12px;z-index:20;max-height:70dvh;overflow:auto}.chat-more a{display:block;padding:8px}.chat-shell{display:flex;flex:1;min-height:0}.chat-sidebar{width:240px;flex-shrink:0;padding:22px 16px;background:#282a36;border-right:1px solid #6272a4;overflow:auto}.chat-sidebar small{display:block;color:#8be9fd;margin:26px 8px 12px}.chat-page button,.chat-page select{font:inherit;color:#f8f8f2;background:#44475a;border:1px solid #6272a4;border-radius:9px;padding:9px 14px;cursor:pointer}.chat-sidebar>button{width:100%;text-align:left;color:#bd93f9}.chat-list button{display:block;width:100%;text-align:left;background:transparent;border-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:4px 0}.chat-list button[aria-current=true]{background:#44475a;border-color:#6272a4}.butler-panel{flex:1;min-width:0;display:flex;flex-direction:column;padding:24px 32px 18px;position:relative}.chat-welcome{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100px}.chat-welcome h1{color:#bd93f9;font-size:38px;letter-spacing:1px;margin:0 0 16px;font-weight:600}.chat-welcome p{font-size:24px;color:#f8f8f2;margin:0}.history-host{flex:1;overflow:auto;min-height:0;scroll-behavior:smooth}.chat-welcome:not([hidden])+.history-host{flex:0}.butler-history{max-width:820px;margin:0 auto;display:flex;flex-direction:column;gap:20px;padding-bottom:24px}.butler-message{white-space:pre-wrap;line-height:1.6;margin:0;padding:14px 18px;overflow-wrap:anywhere}.butler-message.user{align-self:flex-end;max-width:85%;background:#44475a;border-radius:18px 18px 4px 18px}.butler-message.assistant{align-self:flex-start;padding-left:0}.butler-compose{width:100%;max-width:820px;margin:12px auto 0;background:#282a36;border:1px solid #6272a4;border-radius:20px;padding:14px;display:grid;grid-template-columns:42px 1fr auto;align-items:end;gap:10px;flex-shrink:0;box-shadow:0 4px 25px #0002}.butler-compose textarea{grid-column:2;background:transparent;border:0;outline:none;color:#f8f8f2;resize:none;min-height:52px;max-height:160px;font:inherit;padding:8px 0;line-height:1.5;width:100%}.butler-compose textarea::placeholder{color:#8be9fd}.butler-compose>button{grid-column:3;grid-row:2;background:#bd93f9;color:#282a36;border:0}.attachment-menu{grid-column:1;grid-row:2;position:relative}.attachment-menu summary{font-size:27px;cursor:pointer;list-style:none;text-align:center;border-radius:8px}.attachment-menu[open]{background:#44475a}.attachment-menu label{position:absolute;bottom:42px;left:0;background:#282a36;border:1px solid #6272a4;padding:12px;width:260px;z-index:10;border-radius:8px}.attachment-menu label+label{bottom:120px}.attachment-menu input{max-width:230px;color:#f8f8f2;font-size:12px;display:block}.picked-files{grid-column:1/-1;grid-row:1;margin:0;color:#f8f8f2;font-size:13px}.picked-files:empty{display:none}.chat-settings{margin:10px auto 0;width:100%;max-width:820px;color:#8be9fd;font-size:12px;text-align:center}.chat-settings summary{cursor:pointer;list-style:none}.chat-settings[open]{border:1px solid #6272a4;border-radius:10px;padding:12px;background:#282a36}.chat-settings label{display:block;margin:8px}.chat-settings select{margin:8px;font-size:12px}.butler-job{padding:20px;background:#282a36;border:1px solid #6272a4;border-radius:14px;overflow-wrap:anywhere}.butler-job p{line-height:1.5;white-space:pre-wrap;color:#f8f8f2}.butler-job progress{width:100%;height:7px;accent-color:#bd93f9}.butler-job button{margin:6px 6px 0 0;font-size:12px}.butler-download{display:inline-block;padding:10px 14px;margin:10px 8px 0 0;border:1px solid #6272a4;border-radius:9px;color:#bd93f9;text-decoration:none;background:#44475a}.chat-page button:disabled{opacity:.4;cursor:default}.chat-more pre{white-space:pre-wrap;max-width:320px;font-size:11px}.workbench-mode{overflow:auto!important;height:auto!important}.workbench-mode #legacy-workbench{padding:20px}.chat-page a:focus-visible,.chat-page button:focus-visible,.chat-page summary:focus-visible,.chat-page textarea:focus-visible{outline:2px solid #bd93f9;outline-offset:3px}
@media(max-width:760px){.chat-header{padding:0 16px;height:56px}.chat-header nav{gap:12px;font-size:12px}.chat-header nav>a:first-child{display:none}.chat-sidebar{width:160px;padding:16px 8px}.butler-panel{padding:16px 14px}.chat-welcome h1{font-size:30px}.chat-welcome p{font-size:19px}.butler-compose{padding:10px;gap:6px}.chat-brand{font-size:18px}}
@media(max-width:520px){.chat-shell{flex-direction:column}.chat-sidebar{width:100%;border-right:0;border-bottom:1px solid #6272a4;padding:8px 12px;display:flex;gap:10px;overflow:auto;flex-shrink:0}.chat-sidebar>button{width:auto;white-space:nowrap;font-size:12px}.chat-sidebar small{display:none}.chat-list{display:flex;gap:4px}.chat-list button{max-width:140px;font-size:12px;white-space:nowrap}.butler-panel{min-height:0}.chat-header nav{gap:10px}.butler-compose textarea{font-size:16px}.chat-settings{font-size:11px}.butler-job{padding:14px}}
.butler-model{display:block;align-self:center;margin:10px auto 0!important;border:0!important;background:transparent!important;color:#8be9fd!important;font-size:12px!important;padding:4px 12px!important}.butler-model option{background:#282a36;color:#f8f8f2}
body.chat-page{padding:0;min-height:0;color-scheme:dark}.chat-page{scrollbar-color:#6272a4 #282a36;scrollbar-width:thin}
.butler-model-status{font-size:12px;line-height:1.4;text-align:center;color:#8be9fd;margin:6px auto;max-width:820px;overflow-wrap:anywhere;flex-shrink:0}
.chat-settings[open]{max-height:35dvh;overflow-y:auto;flex-shrink:0}
.cortex-controls button{margin:4px;font-size:12px}.cortex-controls input[type=password],.cortex-correction textarea{display:block;width:100%;max-width:640px;margin:10px auto;padding:10px;background:#282a36;border:1px solid #6272a4;border-radius:8px;color:#f8f8f2;font:inherit}
.cortex-correction,.cortex-feedback{margin:12px 0}.cortex-correction summary,.cortex-feedback summary{cursor:pointer;font-size:13px}

.attachment-options{position:absolute;bottom:42px;left:0;display:flex;flex-direction:column;background:#282a36;border:1px solid #6272a4;border-radius:8px;z-index:20;width:260px;max-width:80vw}.attachment-menu .attachment-options label{position:static;width:auto;border:0;background:transparent;margin:0;padding:12px}.attachment-menu .attachment-options label+label{border-top:1px solid #6272a4}.chat-context-menu{position:fixed;z-index:100;background:#282a36;border:1px solid #6272a4;border-radius:10px;padding:6px}.chat-context-menu button{width:168px;text-align:left;color:#ff5555}

.history-host{scroll-behavior:auto}.folder-selection{display:block;margin-top:6px;font-size:12px;overflow-wrap:anywhere}.attachment-options button{display:block;margin-top:8px}

.butler-prefetch-status{font-size:11px;color:#8be9fd;text-align:center;margin:2px auto;max-width:820px}.butler-prefetch-status:empty{display:none}.butler-panel>button{align-self:center;margin:4px;font-size:12px}
.chat-back{border:1px solid #6272a4;border-radius:9px;padding:9px 14px;background:#44475a;font-size:14px}.chat-header:has(.chat-back){gap:18px}.chat-header:has(.chat-back) nav{margin-left:auto}
@media(max-width:760px){.chat-header:has(.chat-back) .chat-brand{display:none}.chat-back{font-size:12px;padding:8px 10px}}

.contextual-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:.5rem 0}.contextual-actions button{border:1px solid var(--border,#777);border-radius:1rem;padding:.35rem .8rem;background:transparent;color:inherit;cursor:pointer}

/* Shared chat controls and Dracula accents. */
.chat-brand{display:flex;align-items:center;gap:8px;white-space:nowrap;flex-shrink:0}
.chat-brand img{display:block;width:66px;height:44px;object-fit:contain;filter:invert(1)}
.chat-sidebar{display:flex;flex-direction:column;gap:4px}
.chat-list{flex:1;min-height:0;overflow:auto}
.chat-sidebar .kofi-tip{display:block;flex-shrink:0;padding:12px;margin-top:auto;border:1px solid #ff79c6;border-radius:10px;background:#44475a;color:#f8f8f2;text-decoration:none;font-size:13px;text-align:center}
.kofi-tip:hover{background:#6272a4}
.butler-compose textarea{grid-column:1/-1;grid-row:2;min-width:0;padding:8px; border-radius:8px}
.butler-compose .attachment-menu,.butler-compose>button{grid-row:3}
.butler-compose .contextual-actions{grid-column:1/-1;grid-row:4}
.butler-compose:focus-within{border-color:#bd93f9;box-shadow:0 0 0 2px #bd93f933}
.chat-settings summary::after{content:"";display:inline-block;width:7px;height:7px;margin:0 0 3px 8px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
.chat-settings[open] summary::after{transform:rotate(225deg);margin-bottom:0}
.attachment-options label{display:flex;flex-direction:column;align-items:stretch}
.attachment-options button{width:100%;text-align:left}
.butler-job progress{accent-color:#50fa7b}
.butler-download{color:#50fa7b}
.chat-welcome h1{color:#bd93f9}
.chat-page a:focus-visible,.chat-page button:focus-visible,.chat-page summary:focus-visible,.chat-page textarea:focus-visible{outline-color:#bd93f9}
@media(max-width:520px){.chat-sidebar{flex-direction:row;align-items:center;gap:10px}.chat-list{flex:1;display:flex;overflow:auto}.chat-sidebar .kofi-tip{margin:0;padding:9px;font-size:11px;max-width:110px}.chat-brand img{width:54px;height:36px}}

@media(max-width:760px){.chat-header:has(.chat-back) .chat-brand{display:flex}.chat-header:has(.chat-back){gap:8px}.chat-header:has(.chat-back) .chat-brand img{width:54px}}
