#chatbox {height:100% !important; font-size:14px; line-height:1.5;}
#messages {padding:10px; list-style:none;}
#messages li {padding:10px 0; border-bottom:1px solid #e5e7eb;}
#chatform, #code_session_btn, #mic_btn, #screenshare_btn, #endBtn {display:none !important;}
@media(max-width:650px) {#chatbox {display:none;} .whiteboards {left:0 !important;width:100% !important;} #drawing {left:0 !important;width:100% !important;}}

@media(max-width:650px) {
  .whiteboards canvas {left:0 !important;}
  #animatum_canvas, #animatum_scribble_canvas, #animatum_quiz {left:0 !important;width:100% !important;}
  #animatum_panel {left:8px !important;width:calc(100vw - 16px) !important;max-height:calc(100vh - 72px);overflow-y:auto !important;}
}
/* Sample conversation stays visible above its composer on desktop. */
#chatbox {height:calc(100% - 270px) !important;}
#chatform {display:flex !important;flex-direction:column;gap:7px;position:fixed;left:0;bottom:0;width:20%;height:270px !important;padding:10px;background:#eef3fa;box-sizing:border-box;z-index:12000;}
#chatform label {position:static;width:auto;height:auto;font-size:12px;font-weight:700;line-height:1.3;color:#193d88;}
#chatform textarea {position:static;visibility:visible;width:100%;min-height:48px;resize:none;padding:7px;box-sizing:border-box;}
#chatform button {position:static;left:auto;float:none;width:auto;height:auto;padding:8px;border:1px solid #b8c9e5;border-radius:7px;background:white;color:#193d88;font-size:12px;line-height:1.25;cursor:pointer;}
#chatform button[type=submit] {background:#193d88;color:white;}
#demo-chat-suggestions {display:flex;flex-wrap:wrap;gap:4px;}
@media(max-width:650px) {
  #chatform {display:none !important;}
  body.demo-chat-open #chatbox {display:block !important;left:0;top:0;width:100% !important;height:calc(100% - 270px) !important;z-index:12000;}
  body.demo-chat-open #chatform {display:flex !important;width:100%;}
}

#chatform label {background:none;border:0;border-radius:0;padding:0;box-shadow:none;transform:none;cursor:default;}
#chatform textarea {font:14px/1.4 Inter,system-ui,sans-serif;border:1px solid #b8c9e5;border-radius:7px;}

/* The demo header is the single activity entry; its handler reuses this control. */
#animatums_btn {display:none !important;}
#drawing .dropup {left:335px !important;right:auto !important;}
#clear_board_btn {left:386px !important;right:auto !important;}
.tool-hint {box-sizing:border-box;padding:2px 5px;line-height:1.2;max-height:46px;}
#demo-worksheets {max-width:min(440px,calc(100vw - 40px));box-sizing:border-box;padding:22px;border:1px solid #b8c9e5;border-radius:12px;color:#193d88;font:15px/1.5 system-ui,sans-serif;}
#demo-worksheets::backdrop {background:rgba(15,30,55,.45);}
#demo-worksheets button {display:block;width:100%;margin-top:10px;padding:12px;border:1px solid #b8c9e5;border-radius:8px;background:#eef3fa;color:#193d88;cursor:pointer;font:inherit;}

#chatform #attach_chat_label {display:block !important;width:100%;border:1px dashed #b8c9e5;background:#f8fafc;color:#193d88;font-size:12px;padding:5px;cursor:pointer;}
