/*
 * Student workspace readability baseline.
 * Loaded last so legacy compact rules cannot push instructional or
 * reading text below the agreed readable scale.
 *
 * 作用域限定在 .app-shell（学生端），教师端 teacher.html 不受影响。
 * 只覆盖「真实 UI 文本」；动画场景 / 绘本 / 乐高 / 算法演示画布等
 * 插画式布局（.atomic-* / .story-* / .lego-* / .middle-bubble-screen /
 * .fruit-river-* / .engine-* / .agent-algorithm-* 等）保持原样，
 * 避免绝对定位与定高容器被撑破。
 */

:root {
    /* 正文：聊天消息、章节正文等需要长时间阅读的内容 */
    --student-read-body: 15px;
    /* 常规界面文字：按钮、标签、导航 */
    --student-read-text: 13.5px;
    /* 次要信息：辅助说明、时间、来源 */
    --student-read-meta: 12.5px;
    /* 可读下限：徽章、序号等紧凑行内元素 */
    --student-read-min: 12px;
    --student-read-leading: 1.7;
}

/* ---------------- AI 课堂 · 对话区 ---------------- */

.app-shell .course-agent-message p { font-size: var(--student-read-body) !important; line-height: var(--student-read-leading) !important; }
.app-shell .course-agent-message>div { font-size: var(--student-read-text) !important; }
.app-shell .course-agent-message.welcome section>small,
.app-shell .learning-summary-message section>small { font-size: var(--student-read-meta) !important; }
.app-shell .learning-summary-message section>button { font-size: var(--student-read-text) !important; }
.app-shell .course-agent-loading,
.app-shell .course-agent-thinking,
.app-shell .course-agent-error { font-size: var(--student-read-meta) !important; }
.app-shell .course-agent-suggestions button { font-size: var(--student-read-text) !important; }
.app-shell .course-agent-input textarea { font-size: 14.5px !important; line-height: 1.6 !important; }
.app-shell .course-agent-input>button { font-size: var(--student-read-text) !important; }

/* 教学步骤与引用来源 */
.app-shell .agent-reasoning summary { font-size: var(--student-read-meta) !important; }
.app-shell .agent-reasoning>div span { font-size: var(--student-read-min) !important; }
.app-shell .agent-citations>span { font-size: var(--student-read-meta) !important; }
.app-shell .agent-citations button { font-size: var(--student-read-meta) !important; }

/* 工具卡与学习总结 */
.app-shell .agent-tool-launch strong { font-size: var(--student-read-text) !important; }
.app-shell .agent-tool-launch small { font-size: var(--student-read-meta) !important; }
.app-shell .agent-learning-summary>p { font-size: 14px !important; line-height: var(--student-read-leading) !important; }
.app-shell .agent-summary-mastery small { font-size: var(--student-read-meta) !important; }
.app-shell .agent-summary-items h3,
.app-shell .agent-summary-items p { font-size: var(--student-read-text) !important; }
.app-shell .agent-summary-next span { font-size: var(--student-read-meta) !important; }
.app-shell .agent-summary-next p { font-size: var(--student-read-text) !important; }
.app-shell .agent-summary-actions button { font-size: var(--student-read-text) !important; }
.app-shell .agent-learning-records { font-size: var(--student-read-text) !important; }

/* 会话历史 */
.app-shell .student-course-history-head strong { font-size: var(--student-read-text) !important; }
.app-shell .student-course-history-head button { font-size: var(--student-read-meta) !important; }
.app-shell .student-course-module-nav .course-history-main strong { font-size: 14px !important; }
.app-shell .student-course-module-nav .course-history-main small { font-size: var(--student-read-meta) !important; }
.app-shell .student-course-module-nav .course-history-actions button { font-size: var(--student-read-meta) !important; }
.app-shell .course-history-empty { font-size: var(--student-read-text) !important; }

/* ---------------- 课程 · 章节阅读 ---------------- */

.app-shell .student-outline-title small { font-size: var(--student-read-meta) !important; }
.app-shell .student-chapter-toggle>span { font-size: 11.5px !important; }
.app-shell .student-chapter-toggle b i { font-size: var(--student-read-meta) !important; }
.app-shell .student-chapter-list h3 span { font-size: var(--student-read-meta) !important; }
.app-shell .student-section-link>i { font-size: var(--student-read-meta) !important; }
.app-shell .student-section-link strong { font-size: 14px !important; }
.app-shell .student-section-link small { font-size: var(--student-read-meta) !important; }

.app-shell .student-lesson-head>p { font-size: var(--student-read-text) !important; }
.app-shell .student-lesson-head>div span { font-size: var(--student-read-meta) !important; }
.app-shell .lesson-block-number { font-size: var(--student-read-min) !important; }
.app-shell .lesson-block-label { font-size: var(--student-read-min) !important; }
.app-shell .lesson-rich-text { font-size: 15.5px !important; line-height: 1.95 !important; }
.app-shell .lesson-file-block h3 { font-size: 14px !important; }
.app-shell .lesson-file-block p,
.app-shell .lesson-file-block a { font-size: var(--student-read-meta) !important; }
.app-shell .presentation-download { font-size: var(--student-read-meta) !important; }
.app-shell .student-wysiwyg-document figcaption { font-size: var(--student-read-meta) !important; }
.app-shell .lesson-empty p { font-size: var(--student-read-text) !important; }
.app-shell .student-course-empty { font-size: var(--student-read-text) !important; }

/* 完成提示与翻页 */
.app-shell .student-lesson-complete strong { font-size: 14px !important; }
.app-shell .student-lesson-complete p { font-size: var(--student-read-meta) !important; }

/* 章节测验与算法块 */
.app-shell .course-quiz-block legend { font-size: var(--student-read-text) !important; }
.app-shell .course-quiz-block label { font-size: var(--student-read-text) !important; }
.app-shell .course-quiz-result { font-size: var(--student-read-meta) !important; }
.app-shell .course-algorithm-block>p { font-size: var(--student-read-meta) !important; }
.app-shell .course-algorithm-question { font-size: var(--student-read-text) !important; }
.app-shell .course-algorithm-status { font-size: var(--student-read-meta) !important; }
.app-shell .course-algorithm-actions button { font-size: var(--student-read-text) !important; }

/* 课程页头 / 模块标题 / 作业 / 讨论 / 视频 */
.app-shell .student-course-hero-copy>span { font-size: var(--student-read-meta) !important; }
.app-shell .course-module-heading>span { font-size: var(--student-read-meta) !important; }
.app-shell .course-homework-row { font-size: var(--student-read-text) !important; }
.app-shell .course-homework-row .header strong { font-size: 14px !important; }
.app-shell .course-homework-answer>span { font-size: var(--student-read-meta) !important; }
.app-shell .discussion-pin,
.app-shell .discussion-author small { font-size: var(--student-read-meta) !important; }
.app-shell .discussion-author strong { font-size: var(--student-read-text) !important; }
.app-shell .course-discussion-post>p { font-size: var(--student-read-body) !important; line-height: var(--student-read-leading) !important; }
.app-shell .course-discussion-post footer button { font-size: var(--student-read-meta) !important; }
.app-shell .course-reply-list p { font-size: 14px !important; }
.app-shell .course-new-post label { font-size: var(--student-read-text) !important; }
.app-shell .video-checkpoint span { font-size: var(--student-read-meta) !important; }
.app-shell .video-checkpoint p { font-size: var(--student-read-text) !important; }
.app-shell .student-course-detail-bar button { font-size: var(--student-read-text) !important; }

/* 课程卡（标题/进度/按钮字号见 styles.css，此处只补小字） */
.app-shell .student-course-card-copy em { font-size: var(--student-read-min) !important; }
.app-shell .student-course-card-copy small { font-size: 13px !important; }
.app-shell .student-course-card-copy b { font-size: 14.5px !important; }
.app-shell .student-course-overview p,
.app-shell .student-course-overview b { font-size: var(--student-read-meta) !important; }

/* ---------------- AI 学习搭档（主聊天） ---------------- */

.app-shell .message-bubble { font-size: var(--student-read-body) !important; line-height: var(--student-read-leading) !important; }
.app-shell .message-bubble code { font-size: 13px !important; }
.app-shell .message-time { font-size: var(--student-read-min) !important; }
.app-shell .suggestion-row button { font-size: var(--student-read-text) !important; }
.app-shell .composer textarea { font-size: 14.5px !important; }
.app-shell .chat-top strong { font-size: 14px !important; }
.app-shell .chat-top span { font-size: var(--student-read-meta) !important; }
.app-shell .context-topic strong { font-size: var(--student-read-text) !important; }
.app-shell .context-topic small { font-size: var(--student-read-meta) !important; }
.app-shell .coach-card p { font-size: var(--student-read-text) !important; }
.app-shell .aside-action strong { font-size: var(--student-read-text) !important; }
.app-shell .aside-action small { font-size: var(--student-read-meta) !important; }

/* ---------------- 学习报告 ---------------- */

/* 课程学习报告（字号已在 styles.css 中按字阶设定） */
.app-shell .report-record-copy p { line-height: var(--student-read-leading) !important; }

/* 报告视图内的指标与时间轴 */
.app-shell .metric small { font-size: var(--student-read-meta) !important; }
.app-shell .metric strong em { font-size: var(--student-read-meta) !important; }
.app-shell .trend,
.app-shell .update-tag { font-size: var(--student-read-min) !important; }
.app-shell .radar-labels text { font-size: var(--student-read-min) !important; }
.app-shell .mastery-list>div>span { font-size: var(--student-read-text) !important; }
.app-shell .recommend-button strong { font-size: var(--student-read-text) !important; }
.app-shell .recommend-button p { font-size: var(--student-read-meta) !important; }
.app-shell .timeline-item small,
.app-shell .timeline-item span { font-size: var(--student-read-min) !important; }
.app-shell .timeline-item strong { font-size: var(--student-read-text) !important; }

/* ---------------- 全局 UI：侧栏 / 首页 / 按钮 / 提示 ---------------- */

.app-shell .nav-label { font-size: var(--student-read-min) !important; letter-spacing: .1em !important; }
.app-shell .nav-count { font-size: 11px !important; }
.app-shell .crumb { font-size: var(--student-read-text) !important; }
.app-shell .grade-switch { font-size: var(--student-read-text) !important; }
.app-shell .goal-ring span { font-size: 11px !important; }
.app-shell .daily-goal strong,
.app-shell .student-card strong { font-size: var(--student-read-text) !important; }
.app-shell .daily-goal small,
.app-shell .student-card small { font-size: var(--student-read-meta) !important; }
.app-shell .avatar-small { font-size: var(--student-read-min) !important; }
.app-shell .streak small { font-size: var(--student-read-meta) !important; }
.app-shell .overline { font-size: var(--student-read-min) !important; }
.app-shell .date-tag { font-size: var(--student-read-min) !important; }
.app-shell .primary-button { font-size: 14px !important; }
.app-shell .primary-button.compact { font-size: var(--student-read-text) !important; }
.app-shell .text-button { font-size: var(--student-read-text) !important; }
.app-shell .link-button { font-size: var(--student-read-text) !important; }
.app-shell .outline-button { font-size: var(--student-read-text) !important; }
.app-shell .mode-badge { font-size: var(--student-read-min) !important; }
.app-shell .time-chip { font-size: var(--student-read-min) !important; }
.app-shell .toast { font-size: var(--student-read-text) !important; }

.app-shell .focus-progress b { font-size: var(--student-read-meta) !important; }
.app-shell .focus-topic small { font-size: var(--student-read-meta) !important; }
.app-shell .focus-topic strong { font-size: var(--student-read-text) !important; }
.app-shell .focus-topic em { font-size: var(--student-read-meta) !important; }
.app-shell .focus-footer,
.app-shell .focus-footer button { font-size: var(--student-read-meta) !important; }

.app-shell .journey-number { font-size: var(--student-read-meta) !important; }
.app-shell .journey-status { font-size: var(--student-read-meta) !important; }
.app-shell .journey-card p { font-size: var(--student-read-text) !important; }
.app-shell .journey-meta { font-size: var(--student-read-meta) !important; }
.app-shell .ask-card p { font-size: var(--student-read-text) !important; }
.app-shell .dashboard-assignment p { font-size: var(--student-read-text) !important; }
.app-shell .badge-row p,
.app-shell .badge-row>span { font-size: var(--student-read-meta) !important; }

/* 登录 / 注册 */
.app-shell .auth-form label { font-size: var(--student-read-text) !important; }
.app-shell .auth-form input,
.app-shell .auth-form select { font-size: 14.5px !important; }
.app-shell .auth-submit { font-size: 14px !important; }
.app-shell .demo-login,
.app-shell .auth-switch,
.app-shell .auth-error { font-size: var(--student-read-text) !important; }
.app-shell .auth-note { font-size: var(--student-read-meta) !important; }
.app-shell .logout-button { font-size: var(--student-read-text) !important; }

/* 作业 */
.app-shell .assignment-summary span { font-size: var(--student-read-meta) !important; }
.app-shell .assignment-toolbar button { font-size: var(--student-read-text) !important; }
.app-shell .student-assignment-copy strong { font-size: var(--student-read-text) !important; }
.app-shell .student-assignment-copy small { font-size: var(--student-read-meta) !important; }
.app-shell .assignment-status,
.app-shell .student-assignment-side small { font-size: var(--student-read-min) !important; }
.app-shell .assignment-loading,
.app-shell .student-assignment-empty { font-size: var(--student-read-text) !important; }
.app-shell .assignment-detail-meta span,
.app-shell .assignment-score small { font-size: var(--student-read-meta) !important; }
.app-shell .assignment-description strong,
.app-shell .assignment-description p { font-size: var(--student-read-text) !important; }
.app-shell .assignment-submit-form label { font-size: var(--student-read-text) !important; }
.app-shell .assignment-submit-form textarea { font-size: 14.5px !important; }
.app-shell .assignment-form-footer small { font-size: var(--student-read-meta) !important; }
.app-shell .assignment-feedback strong,
.app-shell .assignment-feedback p { font-size: var(--student-read-text) !important; }
.app-shell .assignment-locked-note { font-size: var(--student-read-meta) !important; }

/* 资源 */
.app-shell .assignment-resources>strong,
.app-shell .assignment-resources-link strong { font-size: var(--student-read-text) !important; }
.app-shell .assignment-resources-link small,
.app-shell .assignment-resources b { font-size: var(--student-read-meta) !important; }
.app-shell .resource-total span { font-size: var(--student-read-meta) !important; }
.app-shell .student-resource-toolbar button { font-size: var(--student-read-text) !important; }
.app-shell .student-resource-copy em,
.app-shell .student-resource-copy small { font-size: var(--student-read-meta) !important; }
.app-shell .student-resource-copy strong { font-size: var(--student-read-text) !important; }
.app-shell .student-resource-empty,
.app-shell .resource-viewer-empty p,
.app-shell .resource-viewer-copy>p { font-size: var(--student-read-text) !important; }
.app-shell .student-resource-file small,
.app-shell .resource-viewer-meta span { font-size: var(--student-read-meta) !important; }
