/* Child presentation only. The original three-column and parent layouts remain available. */
.child-layout-toolbar { grid-column:1/-1; display:flex; align-items:center; gap:14px; min-width:0; }
.child-layout-toolbar button { white-space:nowrap; }
.child-layout-location { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:14px; color:#506482; }
#childProgressShortcut { display:flex; align-items:center; gap:9px; border:0; background:transparent; color:#355ca5; font-size:13px; }
#childProgressShortcut progress { width:100px; height:8px; accent-color:#3866df; }
#childProgressShortcut [hidden] { display:none; }
.child-workspace:not(.child-focus-layout) { grid-template-rows:auto auto minmax(0,1fr); }
.child-workspace.child-focus-layout { grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr); grid-template-rows:auto minmax(0,1fr); gap:12px; padding:12px 18px 16px; height:calc(100dvh - 76px); overflow:hidden; }
.child-focus-layout .child-welcome { display:none; }
.child-focus-layout>.panel { padding:16px; }
.child-focus-layout .child-tutor { overflow-y:auto; }
.child-focus-layout .child-paper { gap:8px; }
.child-focus-layout .child-paper h1 { font-size:17px; margin:0; }
.child-focus-layout #childWorksheetHint { font-size:12px; margin:0; }
.child-focus-layout #childPaperContent { gap:8px; }
.child-focus-layout .child-paper .image-wrap { flex:1 1 0; min-height:140px; background:#eef1f5; }
.child-focus-layout .child-page-actions { flex-wrap:wrap; flex-shrink:0; }
.child-focus-layout .child-page-actions button { font-size:12px; padding:6px 9px; }
#childQuestionPicker { flex:0 0 auto; min-height:0; border:1px solid #dfe6f3; border-radius:9px; overflow:auto; }
#childQuestionPicker>summary { display:flex; flex-wrap:wrap; align-items:center; gap:7px 12px; padding:12px 14px; cursor:pointer; color:#204cba; background:#eaf1ff; border:1px solid #89a9f2; border-radius:8px; font-size:14px; list-style:none; }
#childQuestionPicker>summary::-webkit-details-marker { display:none; }
#childQuestionPicker>summary strong { font-size:17px; }
#childQuestionPicker>summary:hover { background:#dde9ff; }
#childQuestionPicker>summary:focus-visible { outline:3px solid #3265df; outline-offset:-3px; }
.child-picker-current { color:#536b90; }
.child-picker-hint { margin-left:auto; padding:5px 9px; border-radius:6px; background:#3262d8; color:#fff; font-size:13px; }
#childQuestionPicker>h2 { display:none; }
#childQuestionPicker #childPageStatus { margin:6px 10px; }
#childQuestionPicker #childQuestions { max-height:200px; padding:0 8px 8px; }
.child-focus-layout .child-chat-heading h1 { font-size:21px; margin:0; }
.child-focus-layout .child-chat-heading { flex-shrink:0; }
.child-focus-layout #childCurrentQuestion { font-size:13px; margin:5px 0; }
.child-focus-layout .child-question-preview { font-size:17px; background:#f0f5ff; border-radius:10px; padding:10px 13px; white-space:normal; overflow:auto; max-height:100px; line-height:1.7!important; }
.child-focus-layout .child-source-details { flex-shrink:0; margin-bottom:5px; }
.child-focus-layout .child-source-details>summary { font-size:13px; }
.child-focus-layout #childResultStatus { font-size:12px; }
.child-focus-layout .child-task-context { font-size:13px; max-height:110px; }
.child-focus-layout .child-tutor .messages { gap:16px; padding:15px 0; min-height:100px; }
.child-focus-layout .child-tutor .bubble { font-size:20px; line-height:1.85; padding:13px 16px; border-radius:14px; max-width:95%; overflow-wrap:anywhere; }
.child-focus-layout .child-tutor .bubble small { font-size:11px; }
.child-focus-layout .child-tutor .bubble .katex { font-size:1.08em; }
.child-focus-layout .chat-entry .math-editor { font-size:18px; min-height:3.3em!important; max-height:110px; padding:9px 12px; }
.child-focus-layout .child-tutor .chat-entry button { font-size:15px; padding:10px 14px; }
.child-focus-layout .child-tutor .chat-tools button, .child-focus-layout .chat-tool-menu>summary { font-size:14px; }
.child-focus-layout #childExplanationBtn { color:#244fb5; border-color:#91adf5; background:#edf3ff; }
.child-focus-layout #childStudyActions { flex:0 0 auto; max-height:170px; overflow:auto; margin:0; padding:9px 11px; background:#f6f8fc; }
.child-focus-layout #childStudyActions .study-actions-buttons { gap:5px; }
.child-focus-layout #childStudyActions .study-actions-buttons button { min-height:34px; padding:6px 8px; font-size:13px; }
.child-focus-layout #childStudyActions .study-actions-title { font-size:13px; margin-bottom:6px; }
.child-focus-layout #childStudyActions .study-actions-reason { font-size:12px; }
#childTasksDrawer { width:min(430px,calc(100vw - 24px)); height:calc(100dvh - 32px); max-height:none; max-width:none; margin:16px auto 16px 16px; padding:0; border:1px solid #dce5f5; border-radius:16px; color:#223044; box-shadow:0 16px 60px #1b304433; }
#childTasksDrawer::backdrop { background:#152c4e50; }
#childTasksDrawer[open] { display:flex; flex-direction:column; }
.child-drawer-heading { display:flex; align-items:center; justify-content:space-between; padding:15px 18px; border-bottom:1px solid #e4eaf4; flex-shrink:0; }
.child-drawer-heading h2 { font-size:18px; margin:0; }
#childTasksDrawer .child-tools { border:0; border-radius:0; box-shadow:none; padding:18px; min-height:0; overflow:auto; }
#childTasksDrawer .learning-tasks { max-height:300px; }
@media (max-height:800px) and (min-width:941px) {
  .child-focus-layout>.panel { padding:12px; }
  .child-focus-layout .child-question-preview { max-height:76px; padding:7px 10px; }
  .child-focus-layout .child-tutor .messages { padding:10px 0; gap:12px; }
}
@media (max-width:1100px) {
  .child-layout-location { display:none; }
  #childProgressShortcut { margin-left:auto; }
}
@media (max-width:940px) and (min-width:721px) {
  .child-workspace.child-focus-layout { grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); }
  .child-focus-layout .child-paper,.child-focus-layout .child-tutor { height:auto; min-height:0; grid-column:auto; }
  .child-focus-layout .child-tutor { overflow:auto; }
  .child-focus-layout .child-tutor .messages { flex:1 0 180px; }
}
@media (max-width:720px) {
  .child-workspace.child-focus-layout { display:flex; height:auto; overflow:visible; padding:8px; }
  .child-layout-toolbar { flex-wrap:wrap; gap:7px; }
  .child-layout-toolbar button { font-size:12px; padding:7px 9px; }
  #childProgressShortcut { order:3; width:100%; justify-content:center; margin:0; }
  #childLayoutToggle { margin-left:auto; }
  .child-focus-layout .child-paper { height:65dvh; min-height:420px; }
  .child-focus-layout .child-tutor { height:auto; min-height:80dvh; overflow:visible; }
  .child-focus-layout .child-tutor .messages { height:46dvh; flex:auto; max-height:60dvh; }
  .child-focus-layout .child-tutor .bubble { font-size:19px; }
  .child-focus-layout .chat-entry { flex-wrap:wrap; }
  .child-focus-layout .chat-entry .math-edit-wrap { flex-basis:100%; }
  .child-focus-layout .child-tutor .chat-tools { flex-wrap:wrap; }
  .child-focus-layout .child-question-preview { max-height:150px; }
  .child-focus-layout .child-tutor #childChatForm { min-width:0; }
}
