html .shell:has(.companion-app){--bg:#171717;--white:#202020;--ink:#eee;--muted:#aaa;--line:#383838;--green:#ddd;background:#171717;color:#eee;color-scheme:dark}
html .shell:has(.companion-app) :is(main,.content,.sidebar){background:#171717;color:#eee}
html .shell:has(.companion-app) .sidebar{width:72px;padding:22px 10px;background:#111;border-color:#303030}
html .shell:has(.companion-app) main{margin-left:72px}
html .shell:has(.companion-app) .sidebar :is(.logotext,.workspace-badge,.nav-label,.token-card,.profile>div){display:none}
html .shell:has(.companion-app) .sidebar nav{margin-top:30px}
html .shell:has(.companion-app) .sidebar nav button{font-size:0;padding:12px;justify-content:center;color:#ccc}
html .shell:has(.companion-app) .sidebar nav button>span{font-size:20px}
html .shell:has(.companion-app) .sidebar nav i{display:none}
html .shell:has(.companion-app) :is(.topbar,.app-footer){display:none}
html .shell:has(.companion-app) .content{padding:0;max-width:none;height:100dvh;overflow:hidden}
.companion-app{height:100dvh;display:flex;flex-direction:column;color:#eee;background:#171717;font-size:13px}
.companion-header{height:76px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:14px 24px;border-bottom:1px solid #303030;gap:16px}
.companion-header h1{font-size:20px;letter-spacing:-.5px;margin:0 0 4px;font-weight:550}.companion-header small{font-size:11px;color:#999}
.companion-header>div:last-child{display:flex;gap:8px}
html .companion-app button,html .companion-app a{color:#ddd}
html .companion-app button{border:1px solid #3a3a3a;background:#242424;padding:9px 12px;border-radius:9px;font-size:11px;cursor:pointer}
html .companion-app button:hover{background:#333}
html .companion-app button:disabled{cursor:wait;opacity:.6}
.companion-layout{flex:1;min-height:0;display:grid;grid-template-columns:210px minmax(0,1fr) 290px}
.companion-threads{padding:18px 12px;background:#131313;border-right:1px solid #303030;overflow:auto;scrollbar-width:thin}
.companion-threads h2,.companion-gallery h2{font-size:13px;font-weight:500;margin:0 0 16px;color:#aaa}
.companion-threads>button{width:100%;text-align:left;margin-bottom:8px;background:transparent!important;border-color:transparent!important}
.companion-threads>button.active{background:#2b2b2b!important;border-color:#414141!important}
.companion-threads b{display:block;font-size:11px;font-weight:500;overflow-wrap:anywhere}
.companion-threads time,.companion-gallery time{display:block;font-size:9px;color:#999;margin-top:6px}
.companion-threads details{border-top:1px solid #333;margin-top:18px;padding-top:12px}
.companion-threads summary{cursor:pointer;font-size:11px;line-height:1.7}
.companion-threads p,.companion-gallery p{font-size:10px;line-height:1.7;color:#999}
.companion-main{display:flex;flex-direction:column;min-width:0;min-height:0}
.companion-thread{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;padding:24px max(20px,calc((100% - 760px)/2)) 18px}
.companion-message{padding:18px 0;line-height:1.9;overflow-wrap:anywhere}
.companion-message.user{margin-left:auto;width:fit-content;max-width:88%;background:#2a2a2a;padding:12px 18px;border-radius:20px}
.companion-message small{font-size:10px;color:#909090;display:block;margin-bottom:8px}
.companion-message-text{white-space:pre-wrap;font-size:14px}
.companion-message img,.companion-message video{display:block;width:100%;max-width:620px;max-height:620px;object-fit:contain;border-radius:14px;margin-top:14px}
.companion-welcome{text-align:center;padding:15dvh 10px}.companion-welcome>span{font-size:40px}.companion-welcome h2{font-size:25px;font-weight:450;margin:24px 0 10px}.companion-welcome p{color:#999;font-size:12px}
.companion-thinking{padding:18px;color:#bfc5e9;animation:companion-pulse 1.8s infinite alternate}
.companion-composer{flex-shrink:0;border:1px solid #373737;background:#252525;margin:0 auto 18px;padding:14px 18px;border-radius:24px;width:calc(100% - 36px);max-width:760px}
html .companion-app :is(input,select,textarea){background:#202020!important;color:#eee!important;border:1px solid #444!important;font-size:12px;min-width:0}
html .companion-app label{color:#bbb;font-size:10px;margin:12px 0}
html .companion-app input[type=checkbox]{display:inline;width:auto;margin:0 6px 0 0}
html .companion-app .companion-composer>textarea{background:transparent!important;border:0!important;width:100%;padding:6px 0;margin:0;font-size:14px;min-height:50px;max-height:180px;resize:vertical;color:#fff!important}
.companion-composer-tools{display:flex;align-items:center;gap:10px}.companion-composer-tools select{width:auto;max-width:180px;margin:0;padding:8px;font-size:11px}
html .companion-app .companion-attach{position:relative;overflow:hidden;cursor:pointer;margin:0;font-size:11px;padding:9px 10px;white-space:nowrap}
.companion-attach input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}
html .companion-app .companion-send-button{margin-left:auto;background:#e5e5e5;color:#141414;font-weight:650;border-radius:24px;white-space:nowrap}
.companion-composer>small{font-size:9px;line-height:1.6;color:#888;display:block;margin-top:10px}
.companion-previews{display:flex;gap:9px;overflow:auto}.companion-previews:empty{display:none}.companion-previews figure{margin:0;position:relative;flex-shrink:0}.companion-previews img{width:74px;height:74px;object-fit:contain;border-radius:9px;background:#171717}.companion-previews figure button{position:absolute;right:0;top:0;padding:2px 6px}
.companion-reference-prompts{padding:8px 0}.companion-reference-prompts button{margin:2px;font-size:10px!important}
.companion-gallery{padding:18px 16px;border-left:1px solid #303030;background:#141414;overflow:auto;scrollbar-width:thin}
.companion-gallery .two-col{gap:8px}.companion-gallery .two-col input{padding:6px;font-size:10px}.companion-gallery figure{margin:22px 0}.companion-gallery img,.companion-gallery video{width:100%;max-height:240px;object-fit:contain;border-radius:12px}.companion-gallery figcaption{font-size:10px;color:#aaa;line-height:1.8;overflow-wrap:anywhere}.companion-gallery a[download]{display:block;margin-top:8px;color:#d0d6f9}
.gallery-hidden .companion-layout{grid-template-columns:210px minmax(0,1fr)}.gallery-hidden .companion-gallery{display:none}
.google-login-button{display:block;text-align:center;margin:18px 0}
@keyframes companion-pulse{from{opacity:.5}to{opacity:1}}
@media(max-width:1200px){.companion-layout{grid-template-columns:180px minmax(0,1fr) 250px}.gallery-hidden .companion-layout{grid-template-columns:180px minmax(0,1fr)}}
@media(max-width:950px){.companion-layout,.gallery-hidden .companion-layout{grid-template-columns:160px minmax(0,1fr)}.companion-gallery{position:absolute;right:0;top:76px;bottom:0;width:min(320px,80vw);z-index:6;box-shadow:-12px 0 40px #0007}.companion-app{position:relative}}
@media(max-width:760px){html .shell:has(.companion-app){display:block}html .shell:has(.companion-app) .sidebar{display:none}html .shell:has(.companion-app) main{margin:0}.companion-header{height:70px;padding:12px}.companion-header h1{font-size:17px}.companion-header small{font-size:9px}.companion-header button{padding:7px!important;font-size:9px!important}.companion-layout,.gallery-hidden .companion-layout{grid-template-columns:1fr}.companion-threads{max-height:100px;border:0;padding:8px;display:flex;gap:8px;overflow:auto}.companion-threads>button{min-width:120px;max-width:160px;flex-shrink:0}.companion-threads h2{display:none}.companion-threads details{min-width:150px;margin:0;position:relative}.companion-threads details[open]{position:fixed;top:80px;left:12px;right:12px;max-height:70dvh;overflow:auto;z-index:9;background:#1a1a1a;padding:16px;border:1px solid #444;border-radius:14px}.companion-main{min-height:0}.companion-layout{display:flex;flex-direction:column}.companion-main{flex:1}.companion-thread{padding:18px 14px}.companion-composer{margin-bottom:10px;width:calc(100% - 20px);padding:12px}.companion-composer-tools{gap:4px}.companion-composer-tools select{max-width:135px;font-size:10px}.companion-welcome{padding-top:8dvh}.companion-gallery{top:70px}}
@media(prefers-reduced-motion:reduce){.companion-thinking{animation:none}}
body:has(.companion-app) .theme-controls{display:none}.companion-app textarea{resize:none!important}
