.login-screen[hidden], #app-shell[hidden], #mobile-nav[hidden], #context-drawer[hidden], #drawer-backdrop[hidden], #student-nav[hidden], #staff-nav[hidden] { display: none; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-6); }
.page-header > .page-actions { flex: 0 0 auto; }
.page-header > .page-actions .button { white-space: nowrap; }
.page-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-heading-copy { min-width: 0; }
.page-heading-coach { display: none; }
.page-heading-coach .teacher-action-art { width: 58px; height: 58px; }
.page-heading-art { width: 58px; height: 58px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(72, 103, 217, .16); border-radius: 17px; background: linear-gradient(145deg, var(--brand-soft), #fff); box-shadow: var(--shadow-sm); }
.page-heading-art .pixel-icon { width: 44px; height: 44px; }
.page-header h1 { margin: 7px 0 8px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.055em; }
.page-header p { max-width: 700px; margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.ai-route { overflow-x: hidden; overflow-y: auto; }
.app-main.ai-route { padding-top: 20px; padding-bottom: 20px; }
.ai-page { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.ai-workspace-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); min-width: 0; }
.ai-title-art { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(72, 103, 217, .16); border-radius: 14px; background: #fff; }
.ai-title-art .teacher-action-art { width: 48px; height: 48px; }
.ai-workspace-title { min-width: 0; }
.ai-workspace-title h1 { margin: 5px 0 0; font-size: clamp(23px, 2.1vw, 31px); letter-spacing: -.05em; }
.ai-workspace-title p { display: none; }
.ai-workspace-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.ai-course-pill { max-width: 260px; overflow: hidden; border: 1px solid var(--border); border-radius: 999px; padding: 8px 12px; color: var(--text-secondary); background: var(--surface); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ai-refresh-button { flex: 0 0 auto; }
.ai-refresh-icon { margin-right: 5px; font-size: 15px; line-height: 1; }
.ai-hero-actions { display: grid; gap: 9px; margin-top: 20px; }
.hero-action-primary, .hero-action-secondary { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-action-primary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hero-action-secondary { justify-content: flex-start; }
.hero-action-secondary .button { padding-block: 7px; font-size: 12px; }
.ai-page > #ai-chat-root { display: flex; flex: 1 1 auto; min-height: 0; }
.ai-page .chat-shell { width: 100%; max-width: none; min-height: 0; height: 100%; margin: 0; }
.ai-page .chat-message { max-width: min(1040px, 100%); }
.ai-page .message-bubble { max-width: min(820px, 100%); }
.ai-page .chat-composer { padding: 16px 18px; }
.ai-page .composer-row textarea { min-height: 58px; max-height: 180px; }
.ai-supporting-details { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.ai-supporting-details summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 50px; cursor: pointer; list-style: none; padding: 10px 14px; }
.ai-supporting-details summary::-webkit-details-marker { display: none; }
.ai-supporting-details summary > span:first-child { display: grid; gap: 3px; min-width: 0; }
.ai-supporting-details summary b { font-size: 12px; }
.ai-supporting-details summary small { color: var(--text-tertiary); font-size: 11px; }
.ai-details-toggle { flex: 0 0 auto; color: var(--brand-strong); font-size: 12px; font-weight: 700; }
.ai-details-toggle::after { content: '展开'; }
.ai-supporting-details[open] .ai-details-toggle::after { content: '收起'; }
.ai-supporting-body { display: grid; gap: var(--space-5); padding: 0 14px 14px; }
.ai-page.ai-supporting-open { height: auto; min-height: 100%; }
.ai-page.ai-supporting-open > #ai-chat-root { min-height: clamp(480px, 68dvh, 680px); }
.ai-supporting-body .teacher-hero { min-height: 0; padding: 20px 24px; }
.ai-supporting-stats { display: grid; margin: 0; }
.teacher-avatar-rail, .teacher-action-rail { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.teacher-action-rail { background: #fff; }
.teacher-avatar-rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; min-width: 0; }
.teacher-avatar-rail-head > div { display: grid; gap: 4px; min-width: 0; }
.teacher-avatar-rail-head strong { color: var(--text-primary); font-size: 14px; }
.teacher-avatar-rail-list, .teacher-action-rail-list { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.teacher-avatar-state, .teacher-action-state { display: grid; justify-items: center; gap: 5px; min-width: 0; }
.teacher-avatar-state-art, .teacher-action-state-art { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(72, 103, 217, .14); border-radius: 13px; background: var(--brand-soft); }
.teacher-avatar-state-art .teacher-avatar-art, .teacher-action-state-art .teacher-action-art { width: 48px; height: 48px; }
.teacher-avatar-state small, .teacher-action-state small { max-width: 100%; overflow: hidden; color: var(--text-secondary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.compact-context-plan { gap: 0; margin-top: 8px; }
.compact-context-plan .plan-item { padding: 8px 0; }
.compact-context-plan .plan-index { width: 23px; height: 23px; font-size: 10px; }
.compact-context-plan .plan-item strong { font-size: 12px; }
.compact-context-plan .plan-item small { font-size: 11px; }
.page-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.practice-resume-card { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); padding: 12px 14px; border-color: rgba(72, 103, 217, .2); background: #f8faff; }
.practice-resume-card h2 { margin: 2px 0; font-size: 16px; }
.practice-resume-card p { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.practice-resume-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
.practice-session-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; margin-bottom: 10px; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.practice-session-bar .caption { color: var(--brand-strong); }
.button-small { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.teacher-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--space-5); padding: var(--space-7); border-radius: var(--radius-xl); color: #fff; background: var(--surface-dark); }
.teacher-hero h2 { max-width: 720px; margin: 10px 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.045em; }
.teacher-hero p { max-width: 680px; margin: 0; color: #c3cde0; font-size: 14px; line-height: 1.75; }
.teacher-hero .eyebrow { color: #aebbd0; }
.hero-readiness { display: grid; align-content: center; gap: 8px; padding: var(--space-5); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); background: rgba(255,255,255,.06); }
.hero-readiness strong { font-size: 40px; letter-spacing: -.06em; }
.hero-readiness span { color: #b9c5d9; font-size: 12px; }
.teacher-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .42fr); gap: var(--space-5); margin-top: var(--space-5); }
.plan-list, .mastery-list, .course-list, .question-list, .staff-list { display: grid; gap: var(--space-3); }
.plan-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.plan-item:last-child { border-bottom: 0; }
.plan-index { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--brand-strong); background: var(--brand-soft); font-size: 12px; font-weight: 800; }
.plan-item strong, .plan-item small { display: block; }
.plan-item strong { font-size: 13px; }
.plan-item small { margin-top: 4px; color: var(--text-secondary); font-size: 12px; }
.mastery-row { display: grid; gap: 7px; }
.mastery-row-head { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 12px; }
.mastery-row-head span:last-child { color: var(--text-secondary); }
.chat-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: calc(100dvh - 152px); max-width: var(--chat-max); margin: var(--space-5) auto 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.chat-shell.history-open { grid-template-rows: auto auto minmax(0, 1fr); }
.chat-toolbar { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; overflow: visible; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.chat-toolbar-top { display: contents; }
.chat-teacher-identity { display: flex; align-items: center; gap: 8px; min-width: 146px; flex: 0 0 auto; }
.chat-teacher-portrait { width: 38px; height: 38px; display: block; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(72, 103, 217, .2); border-radius: 11px; background: var(--brand-soft); }
.chat-teacher-portrait img { width: 100%; height: 100%; display: block; object-fit: contain; image-rendering: pixelated; }
.chat-teacher-copy { display: grid; gap: 2px; min-width: 0; }
.chat-teacher-copy b { color: var(--text-primary); font-size: 12px; white-space: nowrap; }
.chat-teacher-copy small { color: var(--text-tertiary); font-size: 10px; white-space: nowrap; }
.chat-mode-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 6px; min-width: 0; overflow: visible; }
.chat-mode-tabs::-webkit-scrollbar { height: 4px; }
.chat-mode-tabs::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--border-strong); }
.chat-history-toggle { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 12px; color: var(--text-secondary); background: var(--surface); font-size: 12px; font-weight: 700; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.chat-history-toggle:hover { border-color: var(--brand); color: var(--brand-strong); background: var(--surface-muted); }
.chat-history-toggle[aria-expanded="true"] { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }
.chat-toolbar-actions { display: flex; align-items: center; gap: 6px; }
.chat-more { position: relative; }
.chat-more > summary { list-style: none; cursor: pointer; }
.chat-more > summary::-webkit-details-marker { display: none; }
.chat-more[open] > summary { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }
.chat-more-menu { position: absolute; z-index: 12; top: calc(100% + 8px); right: 0; width: 220px; display: grid; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-md); }
.chat-more-menu > strong { padding: 5px 8px 7px; color: var(--text-tertiary); font-size: 11px; }
.chat-more-item { min-height: 44px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 8px; padding: 7px 9px; color: var(--text-secondary); background: transparent; text-align: left; font-size: 12px; font-weight: 700; }
.chat-more-item:hover, .chat-more-item.is-active { color: var(--brand-strong); background: var(--brand-soft); }
.chat-more-item img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }
.mode-tab { min-height: 40px; display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; border: 1px solid transparent; border-radius: 999px; padding: 6px 11px 6px 7px; color: var(--text-secondary); background: transparent; font-size: 12px; font-weight: 700; }
.mode-tab img { width: 25px; height: 25px; display: block; object-fit: contain; image-rendering: pixelated; }
.mode-tab:hover { background: var(--surface-muted); }
.mode-tab.is-active { color: var(--brand-strong); background: var(--brand-soft); }
.chat-history-panel { max-height: 270px; overflow-y: auto; border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.chat-history-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px 10px; }
.chat-history-head strong, .chat-history-head small { display: block; }
.chat-history-head strong { color: var(--text-primary); font-size: 13px; }
.chat-history-head small { margin-top: 3px; color: var(--text-tertiary); font-size: 11px; }
.chat-history-head-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.chat-history-list { display: grid; padding: 0 16px 12px; }
.chat-history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 5px 0; border-top: 1px solid var(--border); }
.chat-history-row.is-active { margin: 0 -8px; padding: 5px 8px; border-color: transparent; border-radius: var(--radius-sm); background: var(--brand-soft); }
.chat-history-entry { min-width: 0; min-height: 40px; display: grid; align-content: center; gap: 3px; border: 0; border-radius: var(--radius-sm); padding: 8px 10px; color: var(--text-primary); background: transparent; text-align: left; }
.chat-history-entry:hover { background: var(--surface); }
.chat-history-row.is-active .chat-history-entry:hover { background: rgba(255,255,255,.55); }
.chat-history-entry strong, .chat-history-entry small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-history-entry strong { font-size: 12px; }
.chat-history-entry small { margin-top: 3px; color: var(--text-tertiary); font-size: 10px; }
.chat-history-actions { display: flex; flex: 0 0 auto; gap: 3px; }
.chat-history-action, .chat-message-action { min-height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; padding: 5px 8px; color: var(--text-secondary); background: transparent; font-size: 11px; font-weight: 650; line-height: 1.2; white-space: nowrap; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.chat-history-action:hover, .chat-message-action:hover { border-color: rgba(72, 103, 217, .18); color: var(--brand-strong); background: var(--brand-soft); }
.chat-history-action-danger, .chat-message-action-danger { color: var(--danger, #b54747); }
.chat-history-action-danger:hover, .chat-message-action-danger:hover { border-color: rgba(182, 77, 89, .2); color: var(--danger); background: var(--danger-soft); }
.chat-history-empty { padding: 12px 16px 16px; color: var(--text-tertiary); font-size: 12px; }
.chat-body { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
.chat-messages { min-height: 0; overflow-y: auto; padding: var(--space-6); scroll-behavior: smooth; }
.chat-message { display: flex; gap: 10px; max-width: 760px; margin: 0 auto 18px; }
.chat-message.user { justify-content: flex-end; }
.chat-message-main { min-width: 0; }
.chat-message:has(.chat-visualization) .chat-message-main { flex: 1 1 auto; }
.chat-message:has(.chat-visualization) .message-bubble { width: 100%; }
.message-avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 50%; color: #fff; background: var(--brand); font-size: 12px; font-weight: 800; }
.chat-message.assistant .message-avatar { width: 42px; height: 42px; border: 1px solid rgba(72, 103, 217, .2); border-radius: 12px; background: var(--brand-soft); }
.message-avatar-image { width: 100%; height: 100%; display: block; object-fit: contain; image-rendering: pixelated; }
.chat-message.user .message-avatar { order: 2; color: var(--brand-strong); background: var(--brand-soft); }
.message-bubble { min-width: 0; max-width: min(100%, 680px); padding: 13px 15px; border: 1px solid var(--border); border-radius: 14px; color: var(--text-primary); background: #fbfcfe; font-size: 15px; line-height: 1.68; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble p { margin: 0 0 12px; }
.message-bubble p:last-child { margin-bottom: 0; }
.message-bubble h1, .message-bubble h2, .message-bubble h3 { margin: 0 0 10px; line-height: 1.35; }
.message-bubble h1 { font-size: 1.2em; }
.message-bubble h2 { font-size: 1.1em; }
.message-bubble h3 { font-size: 1em; }
.message-bubble ul, .message-bubble ol { margin: 0 0 12px; padding-left: 22px; }
.message-bubble li + li { margin-top: 5px; }
.message-bubble code { padding: 2px 5px; border-radius: 5px; color: var(--brand-strong); background: var(--brand-soft); font-size: .9em; }
.chat-message.user .message-bubble { border-color: var(--brand); color: #fff; background: var(--brand-strong); }
.chat-meta { margin-top: 6px; color: var(--text-tertiary); font-size: 11px; }
.chat-message-actions { display: flex; justify-content: flex-end; gap: 4px; margin-top: 5px; opacity: 0; transition: opacity .15s ease; }
.chat-message.user:hover .chat-message-actions, .chat-message-actions:focus-within { opacity: 1; }
.chat-history-notice { display: flex; align-items: flex-start; gap: 7px; max-width: 100%; margin-top: 9px; padding: 8px 10px; border-left: 3px solid var(--success); border-radius: 8px; color: var(--success); background: var(--success-soft); font-size: 11px; font-weight: 700; line-height: 1.45; animation: chat-notice-in .18s ease-out; }
.chat-history-notice::before { content: '✓'; flex: 0 0 auto; font-size: 12px; line-height: 1.45; }
.chat-history-notice.error { border-left-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.chat-history-notice.error::before { content: '!'; }
.tool-status-list { display: flex; align-items: center; min-height: 24px; padding: 0 2px; }
.tool-status { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; color: var(--text-secondary); font-size: 11px; line-height: 1.4; }
.tool-status::before { content: ''; width: 13px; height: 13px; flex: 0 0 auto; border: 2px solid var(--border-strong); border-top-color: var(--brand); border-radius: 50%; animation: chat-tool-spin .8s linear infinite; }
.tool-status.is-done { color: var(--success); }
.tool-status.is-done::before { content: '✓'; display: grid; place-items: center; width: 16px; height: 16px; border: 0; border-radius: 50%; color: var(--success); background: var(--success-soft); font-size: 11px; font-weight: 800; animation: none; }
.chat-visualization { width: 100%; min-height: 220px; margin: 12px 0 4px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-muted); }
.chat-visualization.is-loading { display: grid; place-items: center; min-height: 56px; }
.chat-visualization.is-loading::before { content: ''; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: chat-tool-spin .8s linear infinite; }
.chat-visualization.is-ready { min-height: 0; }
.chat-visualization[hidden] { display: none; }
.chat-visualization svg { display: block; width: 100%; height: auto; min-height: 220px; }
.chat-visualization canvas { display: block; max-width: 100%; }
@keyframes chat-tool-spin { to { transform: rotate(360deg); } }
@keyframes chat-notice-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
.chat-editing { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 9px 12px; border: 0; border-left: 3px solid var(--brand); border-radius: var(--radius-sm); color: var(--brand-strong); background: var(--surface-muted); font-size: 12px; }
.chat-editing[hidden] { display: none; }
.chat-composer { display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.composer-row { display: flex; align-items: center; gap: 8px; }
.composer-row textarea { min-height: 44px; max-height: 150px; flex: 1; resize: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; color: var(--text-primary); background: var(--surface); line-height: 1.5; overflow-y: auto; }
.composer-row textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(72, 103, 217, .12); }
.composer-hint { display: flex; justify-content: space-between; gap: var(--space-3); color: var(--text-tertiary); font-size: 11px; }
.latest-button { position: sticky; z-index: 2; left: 50%; bottom: 10px; transform: translateX(-50%); display: block; width: fit-content; min-height: 36px; border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; color: var(--brand-strong); background: var(--surface); box-shadow: var(--shadow-sm); }
.latest-button[hidden] { display: none; }
.context-stack { display: grid; gap: var(--space-4); }
.context-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.context-heading h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.04em; }
.context-close-button { display: none; }
.context-card { padding: var(--space-4); }
.context-card-title { display: flex; align-items: center; gap: 7px; }
.context-card-title .pixel-icon { width: 23px; height: 23px; }
.context-card-note { margin-top: 10px !important; }
.context-card h3 { margin: 6px 0 10px; font-size: 15px; }
.context-card p { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.context-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.context-actions .button { min-height: 34px; padding: 7px 8px; font-size: 11px; }
.countdown { display: flex; align-items: baseline; gap: 7px; }
.countdown strong { font-size: 30px; letter-spacing: -.05em; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.course-grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); max-width: min(100%, 1120px); }
.course-grid:has(> :only-child) .course-card { grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 18px; }
.course-grid:has(> :only-child) .course-card > :not(.course-card-art) { grid-column: 2; }
.course-grid:has(> :only-child) .course-card > .course-card-art { grid-row: span 3; }
.course-grid:has(> :only-child) .course-card > .page-actions { grid-column: 2; }
.course-card { display: grid; gap: 12px; min-width: 0; padding: var(--space-5); text-align: left; }
.course-card-art { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(145deg, var(--brand-soft), #fff); }
.course-card-art .pixel-icon { width: 42px; height: 42px; }
.course-card h3 { margin: 0; font-size: 16px; }
.course-card p { min-height: 42px; margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.course-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-secondary); font-size: 12px; }
.course-meta span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 7px; background: var(--surface-muted); }
.course-meta .pixel-icon { width: 18px; height: 18px; }
.course-card .button { width: 100%; }
.practice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-5); }
.question-card { padding: var(--space-6); }
.question-card h2 { margin: 13px 0 18px; font-size: 20px; line-height: 1.6; }
.answer-list { display: grid; gap: 10px; }
.answer-option { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; color: var(--text-primary); background: var(--surface); text-align: left; font-size: 14px; line-height: 1.5; }
.answer-option:hover, .answer-option.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.answer-key { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; color: var(--text-secondary); background: var(--surface-muted); font-size: 12px; font-weight: 800; }
.answer-option.is-selected .answer-key { color: #fff; background: var(--brand); }
.feedback { margin-top: 18px; padding: 15px; border-radius: var(--radius-md); line-height: 1.65; font-size: 14px; }
.feedback.correct { color: var(--success); background: var(--success-soft); }
.feedback.wrong { color: var(--danger); background: var(--danger-soft); }
.completion-card { position: relative; min-height: 220px; display: grid; place-items: center; overflow: hidden; }
.completion-art { position: absolute; top: 18px; right: 24px; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 22px; background: linear-gradient(145deg, var(--brand-soft), #fff); }
.completion-art .teacher-action-art { width: 82px; height: 82px; }
.insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.mastery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mastery-card { padding: var(--space-5); }
.mastery-card h3 { margin: 0 0 14px; font-size: 14px; }
.mastery-score { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: 10px; }
.mastery-score strong { font-size: 28px; letter-spacing: -.05em; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-5); }
.profile-art { width: 86px; height: 86px; display: grid; place-items: center; float: right; margin: -6px -2px 0 16px; border-radius: 20px; background: linear-gradient(145deg, var(--brand-soft), #fff); }
.profile-art .teacher-action-art { width: 76px; height: 76px; }
.profile-plan-list { clear: both; margin-top: 20px; }
.profile-section-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 13px; background: var(--brand-soft); }
.profile-section-icon .pixel-icon { width: 34px; height: 34px; }
.profile-settings-form { margin-top: 16px; }
.staff-stats { margin-bottom: var(--space-5); }
.staff-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) repeat(5, minmax(70px, .7fr)) auto; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.staff-row:last-child { border-bottom: 0; }
.staff-row > * { min-width: 0; overflow-wrap: anywhere; }
.staff-row-head { color: var(--text-tertiary); font-size: 11px; }
.review-queue, .staff-detail-panel, .submission-review-panel { margin-top: var(--space-5); }
.staff-detail-panel h2, .submission-review-panel h2 { margin: 6px 0 0; }
.detail-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.detail-metric-grid > div { display: grid; gap: 5px; padding: 13px; border-radius: 10px; background: var(--surface-muted); }
.detail-metric-grid span { color: var(--text-secondary); font-size: 11px; }
.detail-metric-grid strong { font-size: 22px; }
.detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.detail-columns h3 { margin: 0 0 10px; font-size: 14px; }
.submission-content { margin: 18px 0; padding: 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.submission-content p { margin: 8px 0; color: var(--text-secondary); line-height: 1.75; white-space: pre-wrap; }
.unit-content { min-width: 0; flex: 1; }
.unit-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.unit-row-head > div { min-width: 0; }
.unit-row small { display: block; margin-top: 5px; color: var(--text-tertiary); font-size: 11px; }
.unit-row.is-complete { border-color: rgba(34, 163, 126, .28); }
.unit-open { margin-top: 8px; }
.unit-detail { margin-top: 18px; padding: 18px; border: 1px solid var(--brand); border-radius: var(--radius-md); background: var(--brand-soft); }
.unit-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.unit-detail-head h3 { margin: 6px 0 0; font-size: 18px; }
.unit-detail-body { margin-top: 12px; color: var(--text-secondary); line-height: 1.8; white-space: pre-wrap; }
.unit-detail-body .button { margin: 12px 8px 0 0; }
.unit-detail-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(72, 103, 217, .18); }
.settings-form { display: grid; gap: 14px; }
.settings-form .inline-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check-row { display: flex; align-items: center; gap: 9px; color: var(--text-secondary); font-size: 13px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.mobile-only { display: none; }
.assessment-start { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; align-items: start; max-width: 860px; }
.assessment-start h2 { margin: 8px 0; font-size: 24px; }
.assessment-start p { max-width: 680px; line-height: 1.7; }
.assessment-start-mark { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: var(--brand-strong); font-size: 24px; font-weight: 800; }
.assessment-config { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.assessment-config span { padding: 8px 10px; border-radius: 8px; color: var(--text-secondary); background: var(--surface-muted); font-size: 12px; }
.assessment-config .exam-config-warning { color: var(--warning); background: var(--warning-soft); line-height: 1.5; }
.assessment-config .exam-config-ready { color: var(--success); background: var(--success-soft); }
.exam-card { max-width: 860px; margin: 0 auto; }
.exam-progress { display: grid; grid-template-columns: auto minmax(100px, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 28px; color: var(--text-secondary); font-size: 12px; }
.exam-card h2 { margin: 12px 0 22px; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.6; }
.exam-actions { justify-content: space-between; margin-top: 24px; }
.exam-timer { min-width: 92px; display: inline-grid; place-items: center; padding: 9px 13px; border-radius: 999px; color: var(--danger); background: var(--danger-soft); font-size: 14px; font-variant-numeric: tabular-nums; }
.assessment-result { max-width: 620px; margin: 0 auto; text-align: center; }
.assessment-result-art { width: 94px; height: 94px; display: grid; place-items: center; margin: 0 auto 8px; border-radius: 24px; background: linear-gradient(145deg, var(--brand-soft), #fff); }
.assessment-result-art .teacher-action-art { width: 84px; height: 84px; }
.assessment-result > strong { display: block; color: var(--brand-strong); font-size: 68px; letter-spacing: -.08em; }
.assessment-result > strong small { margin-left: 6px; color: var(--text-secondary); font-size: 16px; letter-spacing: 0; }
.assessment-result p { margin: 18px auto 0; color: var(--text-secondary); line-height: 1.7; }
.exam-review { max-width: 860px; margin: var(--space-5) auto 0; }
.exam-review-list { display: grid; gap: 12px; margin-top: 16px; }
.exam-review-item { padding: 15px; border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.exam-review-item.is-correct { border-left-color: var(--success); }
.exam-review-item.is-wrong { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 32%, var(--surface)); }
.exam-review-item.is-pending { border-left-color: var(--warning); }
.exam-review-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.exam-review-head .caption { margin-left: auto; }
.exam-review-stem { margin: 12px 0 10px; color: var(--text-primary); font-size: 14px; font-weight: 650; line-height: 1.65; }
.exam-answer-pair { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text-secondary); font-size: 12px; }
.exam-answer-pair b { color: var(--text-primary); }
.exam-explanation { margin: 12px 0 0; padding-top: 11px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 13px; line-height: 1.7; }
.exam-explanation strong { color: var(--text-primary); }
.units-panel { margin-top: 24px; }
.stage-list { display: grid; gap: 14px; margin-top: 16px; }
.stage-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.stage-card.is-complete { border-color: rgba(34, 163, 126, .32); background: color-mix(in srgb, var(--success-soft) 28%, var(--surface)); }
.stage-index { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--brand-strong); font-size: 15px; font-weight: 800; }
.stage-main { min-width: 0; }
.stage-disclosure { min-width: 0; }
.stage-summary { list-style: none; cursor: pointer; }
.stage-summary::-webkit-details-marker { display: none; }
.stage-summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-strong) 34%, transparent); outline-offset: 4px; border-radius: 8px; }
.stage-summary::after { content: '展开课程内容'; display: inline-block; margin-top: 12px; color: var(--brand-strong); font-size: 12px; font-weight: 700; }
.stage-disclosure[open] .stage-summary::after { content: '收起课程内容'; }
.stage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stage-head h3 { margin: 5px 0 0; font-size: 17px; }
.stage-main p { margin: 10px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.65; }
.stage-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.stage-meta span { padding: 6px 8px; border-radius: 7px; color: var(--text-secondary); background: var(--surface-muted); font-size: 11px; }
.stage-unit-list { margin-top: 7px; }
.unit-list, .task-list { display: grid; gap: 12px; }
.unit-list { margin-top: 16px; }
.unit-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.unit-row:last-child { border-bottom: 0; }
.unit-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--brand-strong); background: var(--brand-soft); font-size: 12px; font-weight: 800; }
.unit-icon .pixel-icon { width: 26px; height: 26px; }
.unit-row strong, .unit-row p, .unit-row small { display: block; }
.unit-row p { margin: 4px 0; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.unit-row small { color: var(--text-tertiary); font-size: 11px; }
.task-card { display: grid; gap: 16px; padding: var(--space-6); }
.task-card-art { width: 72px; height: 72px; display: grid; place-items: center; justify-self: end; margin: -6px 0 -10px auto; border-radius: 16px; background: linear-gradient(145deg, var(--brand-soft), #fff); }
.task-card-art .teacher-action-art { width: 62px; height: 62px; }
.task-card h2 { margin: 6px 0 0; font-size: 19px; }
.task-card > p { margin: 0; color: var(--text-secondary); line-height: 1.75; }
.rubric-list { display: flex; flex-wrap: wrap; gap: 7px; }
.rubric-list span { padding: 7px 9px; border-radius: 8px; color: var(--text-secondary); background: var(--surface-muted); font-size: 11px; }
.task-form { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.task-form textarea { resize: vertical; min-height: 120px; }
.score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.score-card { display: grid; gap: 9px; min-width: 0; padding: var(--space-5); }
.score-card-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); }
.score-card-icon .pixel-icon { width: 36px; height: 36px; }
.score-card > span { color: var(--text-secondary); font-size: 12px; }
.score-card > strong { font-size: 34px; letter-spacing: -.06em; }
.score-card > small { color: var(--text-tertiary); font-size: 11px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); margin-top: var(--space-5); }
.operations-panel { margin-top: var(--space-5); }
.admin-workspace { margin-top: var(--space-5); }
.workspace-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 18px 0; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.workspace-tab { flex: 0 0 auto; min-height: 36px; border: 1px solid transparent; border-radius: 999px; padding: 7px 13px; color: var(--text-secondary); background: transparent; font-size: 12px; font-weight: 700; }
.workspace-tab:hover, .workspace-tab.is-active { border-color: rgba(72, 103, 217, .22); color: var(--brand-strong); background: var(--brand-soft); }
.section-tabs { display: flex; gap: 6px; margin: var(--space-5) 0 12px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.section-tab { min-height: 38px; flex: 1 1 0; border: 0; border-radius: 7px; padding: 7px 12px; color: var(--text-secondary); background: transparent; font-size: 12px; font-weight: 700; }
.section-tab.is-active { color: var(--brand-strong); background: var(--surface); box-shadow: var(--shadow-sm); }
.section-tabs + .report-grid { margin-top: 0; }
.admin-section-tabs { position: sticky; z-index: 5; top: 0; margin-bottom: 12px; }
.admin-section-panel { min-width: 0; }
.admin-section-panel > .card { margin-top: 0; }
.admin-workspace-content { min-height: 120px; }
.admin-data-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.admin-data-head > span { color: var(--text-tertiary); font-size: 12px; }
.admin-data-list { display: grid; gap: 0; }
.admin-data-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(100px, .8fr) minmax(100px, .8fr); align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 12px; }
.admin-data-row:last-child { border-bottom: 0; }
.admin-data-row strong { min-width: 0; color: var(--text-primary); overflow-wrap: anywhere; }
.admin-data-row strong small { display: block; margin-top: 4px; color: var(--text-tertiary); font-weight: 400; }
.class-report-panel { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.operations-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0; }
.operations-stats > div { display: grid; gap: 4px; padding: 14px; border-radius: 10px; background: var(--surface-muted); }
.operations-stats strong { font-size: 24px; letter-spacing: -.05em; }
.operations-stats span { color: var(--text-secondary); font-size: 11px; }
.study-guide-open { overflow: hidden; }
.study-guide-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(20, 33, 61, .48); }
.study-guide-backdrop[hidden] { display: none; }
.study-guide { width: min(760px, 100%); max-height: min(760px, calc(100dvh - 48px)); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); box-shadow: 0 24px 70px rgba(20, 33, 61, .22); }
.study-guide-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 28px 16px; }
.study-guide-heading { min-width: 0; }
.study-guide-heading h2 { margin: 7px 0 6px; font-size: 24px; letter-spacing: -.04em; }
.study-guide-heading p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.study-guide-close { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface-muted); font-size: 22px; font-weight: 400; }
.study-guide-progress { display: grid; grid-template-columns: auto minmax(120px, 1fr); align-items: center; gap: 12px; padding: 0 28px 16px; color: var(--text-tertiary); font-size: 11px; }
.study-guide-progress .progress { height: 6px; }
.study-guide-layout { min-height: 0; display: grid; grid-template-columns: 190px minmax(0, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.study-guide-steps { display: grid; align-content: start; gap: 4px; overflow-y: auto; padding: 16px 12px; border-right: 1px solid var(--border); background: var(--surface-muted); }
.study-guide-step { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 8px; color: var(--text-secondary); background: transparent; text-align: left; }
.study-guide-step:hover { color: var(--brand-strong); background: var(--surface); }
.study-guide-step.is-active { border-color: rgba(72, 103, 217, .18); color: var(--brand-strong); background: var(--surface); box-shadow: var(--shadow-sm); }
.study-guide-step-index { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.study-guide-step-index img { width: 30px; height: 30px; object-fit: contain; image-rendering: pixelated; }
.study-guide-step.is-active .study-guide-step-index { border-color: #bfcafa; background: #fff; }
.study-guide-step-copy { min-width: 0; display: grid; gap: 3px; }
.study-guide-step-copy b, .study-guide-step-copy small { display: block; overflow-wrap: anywhere; }
.study-guide-step-copy b { font-size: 12px; }
.study-guide-step-copy small { color: var(--text-tertiary); font-size: 10px; line-height: 1.35; }
.study-guide-content { min-width: 0; overflow-y: auto; padding: 30px 34px; }
.study-guide-content-heading { display: flex; align-items: center; gap: 14px; }
.study-guide-content-art { width: 58px; height: 58px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.study-guide-content-art img { width: 52px; height: 52px; object-fit: contain; image-rendering: pixelated; }
.study-guide-content-heading > div { min-width: 0; }
.study-guide-content h3 { margin: 8px 0 12px; font-size: 25px; letter-spacing: -.04em; }
.study-guide-content > p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.8; }
.study-guide-content ul { display: grid; gap: 10px; margin: 22px 0; padding: 0; list-style: none; }
.study-guide-content li { position: relative; padding-left: 22px; color: var(--text-primary); font-size: 13px; line-height: 1.65; }
.study-guide-content li::before { content: '✓'; position: absolute; top: 1px; left: 0; color: var(--success); font-weight: 800; }
.study-guide-example { display: grid; gap: 5px; margin-bottom: 22px; padding: 12px 14px; border-left: 3px solid var(--brand); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--brand-soft); font-size: 12px; line-height: 1.6; }
.study-guide-example strong { color: var(--brand-strong); font-size: 11px; }
.study-guide-route { min-height: 38px; }
.study-guide-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; }
.study-guide-footer-actions { display: flex; gap: 8px; }
.study-guide-footer .button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
@media (max-width: 1199px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .desktop-sidebar { position: fixed; z-index: 32; inset: 0 auto 0 0; width: 240px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-md); }
  .desktop-sidebar.is-open { transform: translateX(0); }
  .topbar { position: relative; z-index: 1; }
  .app-shell.sidebar-open .topbar { z-index: 34; }
  .sidebar-backdrop:not([hidden]) { position: fixed; z-index: 31; inset: 0; display: block; background: rgba(20, 33, 61, .35); }
  .context-panel { display: none; }
  .tablet-only { display: inline-grid; }
  .context-toggle { display: inline-flex; }
  .context-drawer { position: fixed; z-index: 31; top: 0; right: 0; bottom: 0; width: min(360px, 92%); overflow-y: auto; padding: 24px; border-left: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-md); }
  .context-drawer:not([hidden]) { display: block; }
  .drawer-backdrop:not([hidden]) { position: fixed; z-index: 30; inset: 0; display: block; background: rgba(20, 33, 61, .35); }
  .teacher-grid, .practice-layout, .profile-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .login-screen { display: block; }
  .login-intro { min-height: 260px; padding: 28px 20px; }
  .login-intro-copy { margin-top: 30px; }
  .login-intro-copy h1 { font-size: 34px; }
  .login-intro-copy p, .login-trust { display: none; }
  .login-panel { min-height: calc(100dvh - 260px); width: 100%; padding: 28px 20px calc(36px + env(safe-area-inset-bottom)); }
  .login-panel > .brand-lockup { display: none; }
  .login-copy h2 { font-size: 26px; }
  .desktop-sidebar { display: none; }
  .tablet-only { display: none; }
  .app-shell { display: block; min-height: 100dvh; }
  .app-frame { min-height: 100dvh; display: block; }
  .topbar { height: calc(60px + env(safe-area-inset-top)); min-height: calc(60px + env(safe-area-inset-top)); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: env(safe-area-inset-top) 12px 0; }
  .topbar-title .eyebrow { display: none; }
  .topbar-title { min-height: 36px; display: flex; align-items: center; }
  .topbar-title strong { line-height: 1.2; }
  .topbar-actions { height: 36px; display: flex; align-items: center; gap: 4px; }
  .topbar-actions .context-toggle, .topbar-actions .icon-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0; color: var(--text-secondary); background: var(--surface-muted); }
  .topbar-actions .context-toggle:hover, .topbar-actions .icon-button:hover { color: var(--brand-strong); background: var(--brand-soft); }
  .context-toggle { font-size: 0; }
  .context-toggle-label { display: none; }
  .context-toggle-icon { width: 100%; height: 100%; display: grid; place-items: center; font-size: 21px; line-height: 1; }
  .user-chip { height: 36px; max-width: min(122px, 33vw); min-width: 0; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface-muted); font-size: 11px; line-height: 1.2; }
  .app-main { min-height: calc(100dvh - 60px - env(safe-area-inset-top)); padding: 20px 14px calc(78px + env(safe-area-inset-bottom)); }
  .app-main.ai-route { height: calc(100dvh - 60px - env(safe-area-inset-top)); min-height: 0; overflow: hidden; padding: 0 0 calc(60px + env(safe-area-inset-bottom)); }
  .mobile-bottom-nav { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; min-height: calc(60px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgba(255,255,255,.98); }
  .mobile-bottom-nav .nav-item { min-height: 50px; display: grid; justify-items: center; align-content: center; gap: 2px; padding: 4px 2px; color: var(--text-tertiary); text-align: center; font-size: 10px; }
  .mobile-bottom-nav .nav-item.is-active { color: var(--brand-strong); background: var(--brand-soft); }
  .mobile-bottom-nav .nav-icon { width: auto; font-size: 17px; }
  .page-header { align-items: flex-start; flex-direction: column; margin-bottom: var(--space-5); }
  .page-heading { width: 100%; align-items: flex-start; gap: 10px; }
  .page-heading-art { width: 48px; height: 48px; border-radius: 13px; }
  .page-heading-art .pixel-icon { width: 36px; height: 36px; }
  .page-heading-coach { display: none; }
  .page-heading-coach .teacher-action-art { width: 43px; height: 43px; }
  .page-header h1 { font-size: 28px; }
  .page-header > .page-actions .button { white-space: normal; }
  .page-actions { width: 100%; }
  .practice-resume-card { align-items: flex-start; flex-direction: column; gap: 14px; }
  .practice-resume-card .button { width: 100%; }
  .practice-resume-actions { width: 100%; display: grid; }
  .practice-session-bar { padding-inline: 2px; }
  .page-actions .button { flex: 1; }
  .teacher-hero { grid-template-columns: 1fr; padding: var(--space-5); }
  .ai-page { width: 100%; height: 100%; display: flex; flex-direction: column; }
  .ai-workspace-header { display: none; }
  .ai-workspace-title h1 { font-size: 22px; }
  .ai-workspace-title p { display: none; }
  .ai-workspace-meta { align-items: flex-start; gap: 5px; }
  .ai-course-pill { max-width: 120px; padding: 7px 9px; font-size: 10px; }
  .ai-refresh-button { width: 36px; min-width: 36px; height: 34px; padding: 0; font-size: 0; }
  .ai-refresh-icon { margin: 0; font-size: 17px; }
  .ai-page > #ai-chat-root { width: 100%; height: auto; flex: 1 1 auto; min-height: 0; margin: 0; }
  .ai-page .chat-shell { width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  .ai-page .chat-composer { gap: 6px; padding: 9px 10px; }
  .ai-page #chat-tools:empty { display: none; }
  .ai-page .composer-row { align-items: center; }
  .ai-page .composer-hint { display: none; }
  .ai-supporting-details { display: none !important; }
  .ai-details-toggle::after { content: none; }
  .ai-supporting-body { gap: 12px; padding: 0 10px 10px; }
  .ai-supporting-body .teacher-hero { padding: 16px; }
  .ai-supporting-body .teacher-hero h2 { margin: 7px 0; font-size: 21px; }
  .ai-supporting-body .teacher-hero p { font-size: 13px; line-height: 1.55; }
  .teacher-avatar-rail, .teacher-action-rail { padding: 12px; }
  .teacher-avatar-rail-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .teacher-avatar-rail-list, .teacher-action-rail-list { display: flex; overflow-x: auto; gap: 8px; margin-top: 11px; padding-bottom: 2px; }
  .teacher-avatar-state, .teacher-action-state { width: 50px; flex: 0 0 50px; }
  .teacher-avatar-state-art, .teacher-action-state-art { width: 44px; height: 44px; border-radius: 11px; }
  .teacher-avatar-state-art .teacher-avatar-art, .teacher-action-state-art .teacher-action-art { width: 41px; height: 41px; }
  .teacher-avatar-state small, .teacher-action-state small { font-size: 9px; }
  .ai-supporting-body .ai-hero-actions { margin-top: 12px; }
  .ai-supporting-body .ai-hero-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .ai-supporting-body .hero-action-primary, .ai-supporting-body .hero-action-secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ai-supporting-body .ai-hero-actions .button { width: 100%; min-width: 0; flex: none; padding-inline: 9px; }
  .ai-supporting-body .hero-action-primary .button:first-child { grid-column: 1 / -1; }
  .teacher-hero h2 { font-size: 25px; }
  .hero-readiness { grid-template-columns: auto 1fr; align-items: center; }
  .hero-readiness .progress { grid-column: 1 / -1; width: 100%; }
  .hero-readiness strong { font-size: 32px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card strong { font-size: 23px; }
  .chat-shell { min-height: calc(100dvh - 154px); margin-top: 14px; border-radius: var(--radius-md); }
  .chat-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px; overflow: visible; padding: 6px 8px; }
  .chat-toolbar-actions { display: flex; align-items: center; gap: 5px; min-width: 0; }
  .chat-teacher-identity { min-width: 38px; }
  .chat-teacher-copy { display: none; }
  .chat-teacher-portrait { width: 34px; height: 34px; border-radius: 9px; }
  .mode-tab { padding-right: 8px; }
  .mode-tab img { width: 23px; height: 23px; }
  .chat-mode-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; width: 100%; overflow: visible; }
  .chat-history-toggle { min-height: 36px; padding: 6px 8px; font-size: 10px; }
  .mode-tab { width: 100%; min-width: 0; justify-content: center; padding: 4px 2px; font-size: 10px; white-space: nowrap; }
  .mode-tab img { display: none; }
  .chat-toolbar-actions { gap: 3px; }
  .chat-history-toggle { min-width: 44px; min-height: 34px; padding: 5px 7px; }
  .chat-more-menu { position: fixed; z-index: 42; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); left: 10px; top: auto; width: auto; border-radius: 16px; padding: 14px; }
  .chat-more-item { min-height: 50px; }
  .ai-page > .practice-resume-card { display: none; }
  .chat-history-panel { max-height: 250px; }
  .chat-history-head { padding: 12px 12px 8px; }
  .chat-history-notice { margin-top: 8px; }
  .chat-history-list { padding: 0 12px 10px; }
  .chat-history-row { gap: 6px; }
  .chat-history-row.is-active { margin: 0 -4px; padding: 5px 4px; }
  .chat-history-entry { min-height: 42px; padding: 7px 8px; }
  .chat-history-actions { align-self: center; gap: 2px; }
  .chat-history-action { min-width: 42px; padding-inline: 6px; }
  .chat-messages { padding: 14px 10px 18px; }
  .chat-message { margin-bottom: 14px; }
  .message-bubble { padding: 11px 12px; font-size: 15px; line-height: 1.62; }
  .chat-message.assistant .message-avatar { width: 36px; height: 36px; border-radius: 10px; }
  .chat-message-actions { opacity: 1; }
  .composer-row textarea { min-height: 48px; max-height: 112px; padding: 11px 12px; font-size: 15px; line-height: 1.4; }
  .composer-row .button { padding-inline: 12px; }
  .chat-visualization { min-height: 180px; margin: 10px 0 2px; border-radius: 10px; }
  .chat-visualization.is-loading { min-height: 52px; }
  .chat-visualization svg { min-height: 180px; }
  .course-grid, .insight-grid, .mastery-grid { grid-template-columns: 1fr; }
  .course-grid:has(> :only-child) .course-card { display: grid; grid-template-columns: 1fr; column-gap: 0; }
  .course-grid:has(> :only-child) .course-card > :not(.course-card-art), .course-grid:has(> :only-child) .course-card > .page-actions { grid-column: auto; }
  .course-grid:has(> :only-child) .course-card > .course-card-art { grid-row: auto; }
  .assessment-start { grid-template-columns: 1fr; padding: 17px; }
  .assessment-start h2 { font-size: 20px; }
  .assessment-start-mark { width: 48px; height: 48px; border-radius: 13px; font-size: 18px; }
  .stage-card { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 13px; }
  .stage-index { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
  .stage-head { display: block; }
  .stage-head .badge { margin-top: 9px; }
  .stage-head h3 { font-size: 16px; }
  .stage-meta { gap: 5px; }
  .stage-meta span { font-size: 10px; }
  .exam-review { margin-top: 16px; }
  .exam-review-item { padding: 13px; }
  .exam-review-head .caption { width: 100%; margin-left: 0; }
  .exam-progress { grid-template-columns: 1fr auto; gap: 8px; }
  .exam-progress .progress { grid-column: 1 / -1; grid-row: 2; }
  .exam-card { padding: 17px; }
  .exam-card h2 { font-size: 19px; }
  .exam-actions .button { flex: 1; }
  .task-card { padding: 17px; }
  .completion-card { min-height: 220px; }
  .completion-art { top: 12px; right: 12px; width: 68px; height: 68px; border-radius: 17px; }
  .completion-art .teacher-action-art { width: 60px; height: 60px; }
  .assessment-result-art { width: 76px; height: 76px; border-radius: 19px; }
  .assessment-result-art .teacher-action-art { width: 68px; height: 68px; }
  .score-grid { grid-template-columns: 1fr; gap: 10px; }
  .operations-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .score-card { padding: 16px; }
  .score-card > strong { font-size: 29px; }
  .report-grid { margin-top: 16px; }
  .course-card, .card-pad, .question-card { padding: 17px; }
  .question-card h2 { font-size: 18px; }
  .staff-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 15px 0; }
  .staff-row-head { display: none; }
  .staff-row > span:not(:first-child) { font-size: 11px; }
  .staff-row.review-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; }
  .staff-row.review-row > strong { grid-column: 1 / -1; }
  .staff-row.review-row > span:nth-child(2) { grid-column: 1; }
  .staff-row.review-row > span:nth-child(3) { grid-column: 2; }
  .staff-row.review-row > span:nth-child(4) { grid-column: 1 / -1; overflow-wrap: anywhere; }
  .staff-row.review-row > span:nth-child(5) { grid-column: 1 / -1; }
  .staff-mobile-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-metric-grid { gap: 7px; }
  .detail-metric-grid > div { padding: 11px 9px; }
  .detail-metric-grid strong { font-size: 18px; }
  .detail-columns { grid-template-columns: 1fr; gap: 18px; }
  .admin-data-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; }
  .admin-data-row > *:last-child { grid-column: 2; }
  .unit-row-head { display: block; }
  .unit-row-head .badge { margin-top: 8px; }
  .unit-detail-actions { align-items: flex-start; flex-direction: column; }
  .settings-form .inline-fields { grid-template-columns: 1fr; }
  .context-drawer { padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
  .context-drawer .context-close-button { display: grid; width: 36px; height: 36px; min-height: 36px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); font-size: 22px; }
  .study-guide-backdrop { align-items: end; padding: 0; }
  .study-guide { width: 100%; max-height: min(90dvh, 760px); border-right: 0; border-bottom: 0; border-left: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .study-guide-header { padding: 20px 18px 12px; }
  .study-guide-heading h2 { font-size: 21px; }
  .study-guide-progress { padding: 0 18px 13px; }
  .study-guide-layout { display: block; overflow-y: auto; }
  .study-guide-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; overflow: hidden; padding: 8px 7px; border-right: 0; border-bottom: 1px solid var(--border); }
  .study-guide-step { width: auto; min-width: 0; grid-template-columns: 1fr; justify-items: center; gap: 4px; padding: 6px 2px; text-align: center; }
  .study-guide-step-index { width: 34px; height: 34px; }
  .study-guide-step-copy { display: block; }
  .study-guide-step-copy b { font-size: 10px; line-height: 1.3; }
  .study-guide-step-copy small { display: none; }
  .study-guide-content { padding: 18px 18px 22px; }
  .study-guide-content-art { width: 48px; height: 48px; }
  .study-guide-content-art img { width: 43px; height: 43px; }
  .study-guide-content h3 { font-size: 22px; }
  .study-guide-footer { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
  .study-guide-footer-actions { flex: 1; justify-content: flex-end; }
  .study-guide-footer-actions .button { min-width: 88px; }
  .study-guide-route { width: 100%; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .mobile-bottom-nav { display: none; }
}
@media (min-width: 768px) {
  .section-tabs { display: none; }
  .admin-section-panel { display: contents; }
  .section-tabs + .report-grid > section[hidden], .section-tabs ~ section[hidden] { display: block; }
}
@media (min-width: 1200px) and (max-height: 820px) {
  .app-main.ai-route { padding-top: 20px; padding-bottom: 20px; }
  .ai-page { gap: 8px; }
  .ai-workspace-header { display: none; }
  .ai-page > .practice-resume-card { margin: 0; padding: 8px 12px; }
  .ai-page > .practice-resume-card h2 { margin: 0; font-size: 14px; }
  .ai-page > .practice-resume-card .eyebrow, .ai-page > .practice-resume-card p { display: none; }
  .ai-page .chat-shell { margin: 0; }
}
