#tutor-chat-home{display:flex;flex:1;min-height:0}
#tutor-chat-pane{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0}
.chat-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0}
.chat-toolbar .offline-label{border:0;margin:5px 0;padding:9px 0;line-height:1.6}
.chat-toolbar button{white-space:nowrap}
.open-conversation{align-self:flex-start;margin:4px 0}
.chat-suggestions{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0 3px;flex-shrink:0}
.chat-suggestions button{padding:6px 8px;font-size:10px;border-radius:20px;color:#cec8ff;background:#a8a0ff0a}
#chat-input{background:transparent;border:0;border-radius:8px;min-height:56px;max-height:150px;height:64px;padding:9px;resize:vertical;font-size:12px;line-height:1.6;width:100%;color:var(--text)}
#chat-form .chat-input{align-items:flex-end;margin-top:8px}
#chat-form .chat-input button{margin:4px;flex-shrink:0}
#chat-error{color:#ffb2c1;font-size:12px;line-height:1.6;margin:6px 0;white-space:pre-wrap}
#chat-error:empty,.chat-controls:has(button:not([hidden]))~.chat-footnote:empty{display:none}
.chat-controls{display:flex;gap:8px;flex-shrink:0}
.reply-author{display:block;color:#e4dfff;font-size:11px;margin-bottom:13px}
.ai-reply section+section{margin-top:17px}
.ai-reply p{margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}
.answer-basis{display:inline-block;border-radius:20px;padding:3px 8px;font-size:9px;letter-spacing:.2px}
.source-basis{background:#97e9ce15;color:#a9eed8}
.extra-basis{background:#b5a1ff17;color:#d3c8ff}
.source-excerpt{margin-top:11px;padding:9px;border:1px solid var(--line);border-radius:8px;font-size:11px;color:var(--muted);white-space:normal}
.source-excerpt summary{cursor:pointer;line-height:1.6}
.chat-context{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;font-size:12px;color:var(--muted)}
.chat-context strong{color:#d5cfff}
#conversation-workspace{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:16px;background:#121622;padding:22px;height:calc(100vh - 300px);min-height:500px}
#conversation-workspace .messages{padding:8px 0;min-height:150px}
#conversation-workspace .message{font-size:14px;padding:18px;max-width:94%;line-height:1.8}
#conversation-workspace .message.user{margin-left:auto;max-width:85%}
#conversation-workspace #chat-input{font-size:14px;min-height:64px}
#conversation-workspace .chat-footnote{font-size:10px;line-height:1.7;text-align:left}
#conversation-workspace .chat-suggestions button{font-size:11px;padding:7px 10px}
.conversation-open .open-conversation{display:none}
.conversation-open .tutor-panel{height:100vh}
@media(max-width:850px){.conversation-open .tutor-panel{height:auto}.conversation-open #tutor-chat-home{display:none}#conversation-workspace{padding:15px;height:650px;min-height:0}}
@media(max-width:540px){#conversation-workspace{height:660px;padding:12px}.chat-context{align-items:flex-start}.chat-context strong{display:block}#conversation-workspace .message{max-width:100%;padding:13px}}
