/* Both child layouts use the same live textarea / formula editor. */
#childChatForm.composer-expanded .chat-entry .math-editor,
#childChatForm.composer-expanded .chat-entry textarea:not(.math-source-input) {
  height:clamp(92px,12dvh,144px);
  min-height:clamp(92px,12dvh,144px)!important;
  max-height:clamp(92px,12dvh,144px);
  font-size:18px;
  line-height:1.75;
  overflow-y:auto;
}
#childChatForm.composer-expanded { scroll-margin-bottom:8px; }
.child-tutor #childStudyActions { flex:0 0 auto; margin:0 0 5px; padding:4px 8px; }
.child-tutor #childStudyActions .study-actions-title { display:none; }
.child-tutor #childStudyActions .study-actions-buttons { gap:5px; }
.child-tutor #childStudyActions .study-actions-buttons button { min-height:30px; padding:4px 7px; font-size:12px; }
.child-tutor #childStudyActions .study-actions-status,
.child-tutor #childStudyActions .study-actions-request,
.child-tutor #childStudyActions .study-actions-error { margin:4px 0 0; font-size:12px; line-height:1.4; }
.child-tutor #childStudyActions .study-actions-request { padding:4px 7px; }
.child-tutor #childStudyActions:has(.study-actions-request:not([hidden])) .study-actions-status { display:none; }
.child-question-context { flex:0 0 auto; min-width:0; margin:0 0 5px; font-size:12px; }
.child-question-context>summary { width:fit-content; padding:3px 0; color:#3456a6; cursor:pointer; }
.child-question-context-content { max-height:18dvh; overflow:auto; overscroll-behavior:contain; padding:6px 9px; border:1px solid #e0e6f4; border-radius:8px; background:#f7f9fd; }
.child-question-context-content .child-question-preview { white-space:normal; max-height:none; overflow:visible; font-size:13px; padding:0; background:transparent; }
.child-question-context-content .child-question-preview .katex { white-space:normal; }
.child-question-context-content p { margin:5px 0; line-height:1.5; }
.child-question-context-content .child-source-content { max-height:none; overflow:visible; }
.child-tutor .messages { min-height:180px; }
.child-tutor .child-task-context { display:flex; align-items:flex-start; gap:8px; padding:4px 8px; }
.child-tutor .child-task-context>details { flex:1; min-width:0; }
.child-tutor .child-task-context summary { margin:0; padding:4px 0; }
.child-tutor .child-task-context>button { flex:0 0 auto; }
.child-tutor .child-task-context #childTaskGoal { margin:5px 0; line-height:1.5; }
.child-tutor .chat-form .math-edit-hint { display:none; }
.child-tutor .chat-form { gap:4px; padding-top:5px; }
.child-tutor .chat-tools button,.child-tutor .chat-tool-menu>summary { padding:4px 7px; }
.child-tutor .chat-entry .math-insert { padding:4px 8px; font-size:12px; }
.child-workspace .child-tutor #childCurrentQuestion { margin:2px 0; }
/* The subject header and location toolbar already identify the learning page. */
.child-workspace>.child-welcome { display:none; }
.child-workspace:not(.child-focus-layout) { grid-template-rows:auto minmax(0,1fr); }
@media(max-width:720px) {
  #childChatForm.composer-expanded .chat-entry .math-editor,
  #childChatForm.composer-expanded .chat-entry textarea:not(.math-source-input) {
    height:clamp(104px,16dvh,150px);
    min-height:clamp(104px,16dvh,150px)!important;
    max-height:clamp(104px,16dvh,150px);
  }
}
