#text-chat-form .ci-picker{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin:.5rem 0;color:#27445c}
#text-chat-form .ci-btn{appearance:none;border:1px solid #b9d8ea;background:#fff;color:#1f5f86;border-radius:999px;padding:.35rem .75rem;font:inherit;font-size:.85rem;cursor:pointer}
#text-chat-form .ci-btn:hover{background:#f2f9fd}
#text-chat-form .ci-btn:focus-visible,#text-chat-form .ci-remove:focus-visible,#text-chat-form .ci-thumb:focus-visible,#text-chat-form .ci-more:focus-visible,.ci-dialog-close:focus-visible{outline:2px solid #3d9bc7;outline-offset:2px}
#text-chat-form .ci-preview{display:flex;gap:.6rem;align-items:center;border:1px solid #d9eaf4;background:#fafdff;border-radius:.75rem;padding:.4rem .55rem;max-width:100%}
#text-chat-form .ci-preview img{width:56px;height:56px;object-fit:cover;border-radius:.55rem;border:1px solid #cfe5f2;background:#fff}
#text-chat-form .ci-meta{display:flex;flex-direction:column;gap:.2rem;min-width:0}
#text-chat-form .ci-name{font-size:.8rem;color:#486579;max-width:16rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#text-chat-form .ci-remove{border:0;background:none;color:#a34b4b;padding:0;font:inherit;font-size:.78rem;text-align:left;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
#text-chat-form .ci-status{margin:.15rem 0;color:#557083;font-size:.8rem;min-height:1em}
#text-chat-form .ci-gallery{margin:.5rem 0;border-top:1px solid #e3eff6;padding-top:.4rem}
#text-chat-form .ci-gallery summary{cursor:pointer;color:#2b6688;font-size:.85rem;font-weight:600}
#text-chat-form .ci-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:.4rem;margin:.45rem 0}
#text-chat-form .ci-thumb{padding:0;border:1px solid #d2e6f2;background:#fff;border-radius:.55rem;overflow:hidden;aspect-ratio:1;cursor:pointer}
#text-chat-form .ci-thumb img{width:100%;height:100%;object-fit:cover;display:block}
#text-chat-form .ci-more{border:1px solid #cfe5f2;background:#fff;color:#1f5f86;border-radius:999px;padding:.25rem .65rem;font:inherit;font-size:.78rem;cursor:pointer}
#text-chat-form .ci-picker[hidden],#text-chat-form .ci-preview[hidden],#text-chat-form .ci-gallery[hidden],#text-chat-form .ci-thumb[hidden]{display:none!important}
#text-transcript .ci-user-turn{border:1px solid #d9eaf4;background:#f7fcff;border-radius:.85rem;padding:.55rem .7rem;margin:.5rem 0;max-width:min(100%,28rem)}
#text-transcript .ci-caption{margin:0 0 .35rem;color:#27445c;white-space:pre-wrap;overflow-wrap:anywhere}
#text-transcript .ci-turn-img{display:block;max-width:100%;max-height:18rem;border-radius:.65rem;border:1px solid #cfe5f2;background:#fff;object-fit:contain}
#text-transcript .ci-save-note{margin:.35rem 0 0;color:#557083;font-size:.78rem}
.ci-dialog{width:min(92vw,56rem);max-height:90vh;border:1px solid #cfe5f2;border-radius:1rem;background:#fbfeff;color:#27445c;padding:1rem}
.ci-dialog img{display:block;max-width:100%;max-height:70vh;margin:.5rem auto;object-fit:contain;border-radius:.65rem}
.ci-dialog-close{border:1px solid #b9d8ea;background:#fff;color:#1f5f86;border-radius:999px;padding:.3rem .8rem;font:inherit;font-size:.85rem;cursor:pointer}
@media(max-width:520px){#text-chat-form .ci-name{max-width:10rem}#text-chat-form .ci-grid{grid-template-columns:repeat(auto-fill,minmax(56px,1fr))}#text-transcript .ci-turn-img{max-height:12rem}.ci-dialog{padding:.65rem}}
@media(prefers-reduced-motion:reduce){#text-chat-form .ci-btn,#text-chat-form .ci-more,#text-chat-form .ci-remove,.ci-dialog-close{transition:none!important}}
#text-transcript .ci-turn-img[role=button]{cursor:zoom-in}
#text-transcript .ci-turn-img[role=button]:focus-visible{outline:2px solid #3d9bc7;outline-offset:3px}

/* Narrow composer: preserve text width and keep photo controls on their own row. */
@media(max-width:600px){#interaction-text #text-chat-form{flex-wrap:wrap}#interaction-text #text-chat-form>label{min-width:0}#interaction-text #text-chat-form .ci-picker{flex:1 0 100%;order:3;margin:0;min-width:0;box-sizing:border-box}#interaction-text #text-chat-form .ci-gallery{flex:1 0 100%;order:4;min-width:0}#interaction-text #text-chat-form .ci-preview{min-width:0;max-width:100%;box-sizing:border-box}#interaction-text #text-chat-form .ci-status:empty{display:none}}
