:root { --surface:#fff; --ink:#20263b; --muted:#8790a5; --line:#e8ebf2; --accent:#6557df; }
/* One-line composer; Enter still inserts a newline. */
body #composer #body,body.clean-chat #composer #body {box-sizing:border-box;height:calc(1.4em + 12px)!important;min-height:calc(1.4em + 12px)!important;line-height:1.4!important;padding:6px 0!important;resize:none;overflow-y:auto;}
.external-link{font-size:13px;text-decoration:none;color:#6557df;padding:10px 12px;border:1px solid #e3dffc;border-radius:10px;background:#f6f3ff;}
:root[data-theme="dark"] { --surface:#1b2232; --ink:#edf0f8; --muted:#a1adc4; --line:#354056; --accent:#a497ff; }
#composer { position:relative; display:flex; flex-direction:column; gap:0; padding:14px 18px 12px; background:var(--surface); border-top:1px solid var(--line); transition:box-shadow .15s; }
#composer:focus-within { box-shadow:inset 0 2px 0 #9384f355; }
#composer.drag-active { box-shadow:inset 0 0 0 2px var(--accent); background:#f3f0ff; }
.composer-main { display:flex; align-items:flex-end; gap:14px; width:100%; }
#composer #body { flex:1; min-width:0; height:74px; max-height:160px; resize:vertical; padding:8px 0; border:0; border-radius:0; outline:none; background:transparent; line-height:1.6; box-shadow:none; color:var(--ink); }
#body::placeholder { color:var(--muted); }
#composer #sendMessage { flex:none; display:flex; align-items:center; gap:12px; margin-bottom:5px; padding:11px 16px; border:0; border-radius:12px; background:var(--accent); color:white; font-weight:650; box-shadow:0 4px 12px #6557df22; }
#composer #sendMessage:disabled { background:#f0f1f5; color:#adb3c2; box-shadow:none; cursor:default; opacity:1; }
.composer-toolbar { display:flex; align-items:center; gap:4px; padding-top:8px; }
#composer .tool-button { display:grid; place-items:center; width:38px; height:36px; padding:0; border:0; background:transparent; color:#707b92; border-radius:9px; font-size:26px; }
#composer .tool-button:hover:not(:disabled), #composer .tool-button[aria-expanded="true"] { background:#f0edff; color:#6557df; }
.composer-hint { font-size:11px; color:var(--muted); margin-left:8px; }
#selectedAttachment { display:flex; flex-direction:column; align-items:stretch; gap:4px; max-height:120px; overflow:auto; border:1px solid var(--line); background:#f6f7fb; border-radius:10px; padding:6px 10px; margin-top:6px; font-size:12px; color:#555e74; }
#selectedAttachment > div { display:flex; align-items:center; min-width:0; }
#uploadJobs { max-height:120px; overflow:auto; }
#selectedAttachment span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#selectedAttachment button { margin-left:auto; border:0; background:transparent; padding:4px 8px; }
#emojiPicker { position:absolute; bottom:64px; left:16px; display:grid; grid-template-columns:repeat(6,36px); gap:5px; padding:12px; border:1px solid var(--line); background:var(--surface); border-radius:16px; box-shadow:0 12px 32px #17203320; z-index:5; }
#emojiPicker button { padding:5px; font-size:24px; background:transparent; border:0; border-radius:8px; }
#emojiPicker button:hover { background:#f0edff; }
.message p { white-space:pre-wrap; }
@media(max-width:700px){#composer{padding:10px 12px max(10px,env(safe-area-inset-bottom));}.composer-hint{font-size:10px;max-width:190px;line-height:1.4;}#composer #body{height:65px;resize:none;font-size:16px;}#composer #sendMessage{padding:10px 13px;gap:7px;}.composer-main{gap:8px;}}
@media(prefers-reduced-motion:reduce){#composer{transition:none;}}
@media(max-width:720px){
  #composer {padding:7px 10px max(6px,env(safe-area-inset-bottom));}
  #composer #body {height:44px;max-height:96px;padding:6px 0;font-size:16px;line-height:1.4;}
  #composer #sendMessage {font-size:13px;padding:9px 12px;margin-bottom:2px;gap:4px;white-space:nowrap;}
  .composer-toolbar {padding-top:2px;}
  #composer .tool-button {width:36px;height:34px;font-size:24px;}
  .composer-hint {display:none;}
  #jumpLatest {bottom:110px;}
}

#composer .voice-input[aria-pressed="true"]{background:#ffe9ec;color:#c51f3a;box-shadow:inset 0 0 0 1px #f3a6b4;}
:root[data-theme="dark"] #composer .voice-input[aria-pressed="true"]{background:#512735;color:#ffd9df;}
