:root{--drawer:min(80vw,300px);--blue:#4d6bfe}
body{font-weight:400}
#drawer{padding:18px 16px 12px;background:#fafafa}
.drawer-head{font-size:21px;font-weight:600;letter-spacing:-.6px;margin-bottom:24px}
#drawer .search{background:#f0f0f2;border-radius:9px;margin-bottom:20px}
#drawer .rail-heading{padding:19px 8px 9px}
#drawer h1{color:#92949b;font-size:12px}
.nav-main{padding:10px 14px;border:1px solid #d9dfea;background:#f2f5ff;color:#4059b8;border-radius:9px;text-align:left;font-size:14px;font-weight:500;min-height:42px}
#drawer .contact{padding:12px 10px;min-height:47px;border-radius:8px;gap:8px}
#drawer .contact.selected{background:#e9edfa}
#drawer .contact-avatar{width:26px;height:26px;flex-basis:26px;background:#e8e9ed;color:#626875;border-radius:7px;font-size:12px;display:grid;place-items:center}
#drawer .contact-avatar:empty{display:none}
#drawer .contact-line strong{font-size:14px;font-weight:450;line-height:1.5}
#drawer .contact-preview{font-size:11px;color:#9497a0;line-height:1.7;max-height:20px}
.settings-foot{display:flex;align-items:center;gap:8px;margin-top:12px;padding-top:10px;border-top:1px solid #e9eaed;color:#92949b;font-size:12px}
.settings-foot .tool svg{width:22px;height:22px}
.topbar h2{font-size:15px;font-weight:500}
#role-card-button{margin-left:auto;font-size:12px;color:#676b77}
#role-card-button:not([hidden])+#profile-button{margin-left:0}
#welcome{gap:16px}
#welcome h1{font-weight:450;font-size:clamp(19px,2vw,26px);letter-spacing:0;line-height:1.65}
.cat-crop{width:57px;height:57px}.cat-crop img{width:89px;height:89px}
#chat-form{border-radius:23px;background:#fafafa;border-color:#e3e3e8;box-shadow:none;padding:16px 13px 12px}
#chat-form textarea{min-height:48px;font-size:16px;font-weight:400}
.composer-tools{margin-top:12px;gap:8px}
.composer-tools .pill svg{width:16px;height:16px}
.contact-avatar img,#profile-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
#chat-form .pill{max-width:none;font-size:13px;padding:0 10px;height:32px;min-height:32px;color:#484c56;border-color:#dddfe5;font-weight:400;display:flex;align-items:center;gap:3px;background:transparent}
#chat-form .pill span{font-size:19px;line-height:1}
#chat-form .pill[aria-pressed=true]{color:#4467ce;border-color:#a6b9f2;background:#edf2ff}
#chat-form #attach{width:28px;padding:3px}
#chat-form #send{width:32px;height:32px;min-height:32px}
.composer-note{font-size:11px;color:#999ba5}
#profile-avatar,#editor-avatar{display:grid;place-items:center;background:#f0f1f5;color:#667080;font-size:28px;border-radius:18px}
#profile-avatar:empty{display:none}#profile-name{font-weight:500}
#profile .sheet h4{color:#858995;font-size:12px;font-weight:400;margin:24px 0 8px}
.profile-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
#profile .profile-actions button{margin:0;background:#f5f6f8;border:0;border-radius:9px;color:#454b59;font-size:13px;padding:10px}
#profile .primary{font-size:14px;border-radius:9px;box-shadow:none}
#api-settings{align-items:stretch;justify-content:flex-end;padding:0;background:#252d3b24;backdrop-filter:blur(3px)}
#api-settings .sheet{margin:0;width:min(460px,100%);max-height:100%;height:100%;border-radius:0;box-shadow:-12px 0 50px #26304a0c;padding:24px 24px 36px;animation:settings-in .25s cubic-bezier(.2,.7,.25,1)}
#api-settings .sheet h2{font-size:21px;font-weight:550}
#api-settings .sheet header{margin-bottom:25px}
.settings-section{font-size:13px;font-weight:500;color:#8b8e98;margin:26px 0 15px}
#api-settings input,#api-settings select{border-radius:8px;background:#fafafb;border-color:#e4e5e9}
#api-settings .primary{border-radius:9px;margin-top:10px}
#api-settings .secondary{border-radius:9px;font-size:13px;box-shadow:none}
.settings-row{display:flex;width:100%;justify-content:space-between;align-items:center;background:transparent;border:0;padding:12px 0;color:#4e5360;font-size:14px}
.sources{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.sources a{color:#58678d;border:1px solid #e1e5ef;background:#fafbfd;border-radius:7px;max-width:100%;font-size:11px;padding:4px 8px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reasoning{font-size:13px;color:#838a98;border-left:2px solid #e4e7ee;padding:0 0 0 12px;margin:10px 0;white-space:pre-wrap}
.reasoning summary{cursor:pointer;font-size:12px}
@keyframes settings-in{from{translate:60px 0;opacity:.4}to{translate:0 0;opacity:1}}
@media(max-width:760px){#welcome h1{font-size:19px}.cat-crop{width:50px;height:50px}.cat-crop img{width:80px;height:80px}#detail .composer-wrap{padding-bottom:calc(8px + env(safe-area-inset-bottom))}#api-settings .sheet{width:100%;padding:20px}}
@media(prefers-reduced-motion:reduce){#api-settings .sheet{animation:none}}
