:root {
  color: #202721;
  background: #f3f5f1;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #e7b35b; outline-offset: 2px; }
.hidden { display: none !important; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: 28px; line-height: 1.15; }
h2 { margin-bottom: 0; font-size: 19px; line-height: 1.3; }
h3 { margin-bottom: 5px; font-size: 15px; line-height: 1.35; }
.eyebrow { margin-bottom: 8px; color: #176b57; font-size: 12px; font-weight: 700; }
.topbar-copy, .login-copy, .notice, .muted { color: #647166; line-height: 1.55; }

.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.login-form { width: min(430px, 100%); border: 1px solid #d6ddd4; border-radius: 6px; background: #fff; padding: 34px; }
.login-form button { width: 100%; margin-top: 18px; }
.form-error { min-height: 22px; margin: 12px 0 0; color: #a23b2d; font-size: 14px; }

label { display: grid; gap: 7px; color: #354036; font-size: 14px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid #bac5bb; border-radius: 4px; background: #fff; color: #202721; padding: 10px; }
textarea { min-height: 94px; resize: vertical; }
button { border: 1px solid #176b57; border-radius: 4px; background: #176b57; color: #fff; font-weight: 700; padding: 9px 14px; }
button:hover { background: #125242; }
button.secondary, button.quiet { background: #fff; color: #176b57; }
button.secondary { border-color: #a9c0b4; }
button.quiet { border-color: #cbd5cc; }
button.danger { border-color: #e0b8b0; background: #fff; color: #a23b2d; }
button.small { padding: 6px 9px; font-size: 13px; }

.app-shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 24px 0 46px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.account-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.role-chip { border: 1px solid #bfd1c3; border-radius: 3px; background: #e8f0e8; color: #176b57; padding: 7px 9px; font-size: 13px; font-weight: 700; }
.terminal-battery { border: 1px solid #bfd1c3; border-radius: 3px; background: #f7fbf7; color: #176b57; padding: 7px 9px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.student-select { width: auto; min-width: 132px; padding: 8px; }
.tabs { display: flex; gap: 3px; margin: 22px 0; overflow-x: auto; border-bottom: 1px solid #d6ddd4; }
.tab { flex: 0 0 auto; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #59655a; padding: 11px 14px; white-space: nowrap; }
.tab:hover { background: #e5ece5; color: #176b57; }
.tab.active { border-bottom-color: #176b57; color: #176b57; }

body.student-mode { background: #e8f1f1; }
.student-mode .app-shell { width: min(1320px, calc(100% - 36px)); }
.student-mode .topbar { padding: 20px 24px 15px; background: #073c59; color: #edf9f6; }
.student-mode .topbar .eyebrow { color: #7be0c0; }
.student-mode .topbar-copy { color: #b9d9d7; }
.student-mode .role-chip { border-color: #2b7590; background: #145c72; color: #dbfaf3; }
.student-mode .terminal-battery { border-color: #2b7590; background: #0b4d67; color: #dbfaf3; }
.student-mode .quiet { border-color: #3f8192; background: transparent; color: #d3ece7; }
.student-mode .quiet:hover { background: #145c72; }
.student-mode .tabs { margin: 0 0 18px; padding: 0 12px; border-bottom: 0; background: #073c59; }
.student-mode .tab { color: #b9d9d7; }
.student-mode .tab:hover { background: #145c72; color: #fff; }
.student-mode .tab.active { border-bottom-color: #7be0c0; color: #fff; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.metric, .panel, .subject-card { border: 1px solid #d6ddd4; border-radius: 6px; background: #fff; }
.metric { padding: 17px; }
.metric strong { display: block; margin-bottom: 4px; color: #176b57; font-size: 28px; line-height: 1; }
.metric span { color: #667267; font-size: 13px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr); gap: 16px; }
.layout.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { padding: 20px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.panel-header h2 { margin: 0; }
.panel-header .muted { margin: 0; font-size: 13px; }
.full { grid-column: 1 / -1; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.list { display: grid; gap: 8px; }
.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e7ebe6; padding: 12px 0; }
.row:first-child { padding-top: 0; }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row-title { font-weight: 700; line-height: 1.45; }
.row-meta { margin-top: 5px; color: #667267; font-size: 13px; line-height: 1.45; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.material-library-row > div:first-child { min-width: 0; flex: 1; }
.course-video-panel { padding: 0; overflow: hidden; }
.course-video-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; cursor: pointer; list-style: none; }
.course-video-disclosure > summary::-webkit-details-marker { display: none; }
.course-video-disclosure > summary::after { content: "+"; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #b8c9c5; border-radius: 4px; color: #176b57; font-size: 20px; line-height: 1; }
.course-video-disclosure[open] > summary::after { content: "−"; }
.course-video-disclosure > summary > div { min-width: 0; flex: 1; }
.course-video-disclosure > summary h2 { margin: 0; }
.course-video-disclosure > summary p { margin: 4px 0 0; }
.course-video-disclosure > summary > span { color: #526a66; font-size: 13px; font-weight: 700; white-space: nowrap; }
.course-video-disclosure-body { border-top: 1px solid #dbe4e1; padding: 20px 22px 22px; }
.course-video-disclosure-body > .list { margin-top: 18px; }
.course-video-row-disclosure { border: 1px solid #d7e1de; border-radius: 5px; background: #fff; }
.course-video-row-disclosure + .course-video-row-disclosure { margin-top: 8px; }
.course-video-row-disclosure > summary { display: flex; align-items: center; gap: 12px; padding: 13px 15px; cursor: pointer; list-style: none; }
.course-video-row-disclosure > summary::-webkit-details-marker { display: none; }
.course-video-row-disclosure > summary::before { content: "+"; flex: 0 0 auto; color: #176b57; font-size: 18px; font-weight: 700; }
.course-video-row-disclosure[open] > summary::before { content: "−"; }
.course-video-row-disclosure > summary > div { min-width: 0; flex: 1; }
.course-video-row-body { border-top: 1px solid #e2e9e7; padding: 13px 15px 15px 39px; }
.course-video-row-body > .row-meta:first-child { margin-top: 0; }
.material-video-form { display: grid; grid-template-columns: minmax(190px, 1fr) auto; align-items: end; gap: 8px 12px; margin-top: 12px; padding: 10px 12px; border: 1px solid #d9e4dc; border-radius: 6px; background: #f8fbf8; }
.material-video-form label { display: grid; gap: 5px; color: #405348; font-size: 13px; font-weight: 700; }
.material-video-form .form-actions { margin: 0; align-self: end; }
.material-video-form .row-meta { grid-column: 1 / -1; margin: 0; }
.completed .row-title { color: #778077; text-decoration: line-through; }
.empty { padding: 10px 0; color: #667267; }
.tag { display: inline-block; border-radius: 3px; background: #e8f0e8; color: #176b57; padding: 3px 6px; font-size: 12px; font-weight: 700; }
.tag.gold { background: #f8edd8; color: #936018; }
.tag.red { background: #fae8e5; color: #a23b2d; }

.student-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr); gap: 24px; margin-bottom: 14px; padding: 26px; border: 1px solid #0b5770; border-radius: 6px; background: #073c59; color: #eef9f5; }
.student-hero h2 { margin-bottom: 9px; font-size: 28px; }
.student-hero-copy > p:not(.student-kicker) { margin-bottom: 18px; color: #b9d9d7; }
.student-kicker { margin-bottom: 7px; color: #7be0c0; font-size: 13px; font-weight: 700; }
.student-subjects { display: flex; flex-wrap: wrap; gap: 7px; }
.student-subject { min-width: 52px; border-color: #2b7590; border-radius: 3px; background: transparent; color: #b9d9d7; padding: 7px 9px; font-size: 13px; }
.student-subject:hover, .student-subject.selected { border-color: #7be0c0; background: #145c72; color: #fff; }
.ai-mentor { display: grid; grid-template-columns: 62px 1fr; align-content: center; gap: 12px; padding-left: 22px; border-left: 1px solid #276c82; }
.mentor-mark { display: grid; width: 58px; height: 58px; place-items: center; border: 2px solid #77ded5; border-radius: 6px; background: #15546a; color: #b5fff4; font-size: 22px; font-weight: 700; }
.ai-mentor strong { display: block; margin: 3px 0 5px; font-size: 18px; }
.ai-mentor span { display: block; color: #b9d9d7; font-size: 13px; line-height: 1.5; }
.mentor-button { grid-column: 2; width: fit-content; margin-top: 4px; border-color: #7be0c0; background: #5b4f9d; }
.mentor-button:hover { background: #453b7b; }
.student-launcher { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.launch-card, .focus-station { min-height: 132px; border: 1px solid #cfdadd; border-radius: 6px; text-align: left; padding: 17px; }
.launch-card { display: flex; flex-direction: column; justify-content: flex-end; background: #fff; color: #23322d; }
.launch-card:hover { border-color: #176b57; background: #f7fbf8; }
.launch-card span { margin-bottom: 8px; color: #176b57; font-size: 13px; font-weight: 700; }
.launch-card strong { margin-bottom: 5px; font-size: 20px; }
.launch-card small { color: #69766d; line-height: 1.45; }
.launch-ai { border-color: #9988d0; background: #f0edff; }
.launch-ai span { color: #5b4f9d; }
.launch-task { border-color: #76b5c8; background: #e8f5f8; }
.launch-task span { color: #176b57; }
.focus-station { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: #7bc1b3; background: #e9f5ef; }
.focus-station span { display: block; margin-bottom: 5px; color: #176b57; font-size: 13px; font-weight: 700; }
.focus-station strong { display: block; color: #123b32; font-size: 34px; letter-spacing: 0; }
.student-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; border: 1px solid #d6ddd4; border-radius: 6px; background: #fff; }
.student-summary > div { padding: 16px; border-right: 1px solid #e5e9e4; }
.student-summary > div:last-child { border-right: 0; }
.student-summary strong { display: block; margin-bottom: 4px; color: #176b57; font-size: 23px; }
.student-summary span { color: #667267; font-size: 13px; }

/* Student workspace: a dense landscape learning-console layout. */
body.student-mode { background: #061e3c; }
.student-mode .app-shell { width: min(1340px, calc(100% - 32px)); margin-top: 18px; padding: 0 0 24px; overflow: hidden; border: 1px solid #0b5f8e; border-radius: 8px; background: #062f5b; }
.student-mode .topbar { align-items: center; padding: 15px 22px 11px; background: #063f76; }
.student-mode .topbar h1 { margin: 0; font-size: 22px; }
.student-mode .topbar-copy { display: none; }
.student-mode .tabs { gap: 4px; margin: 0; padding: 0 16px; background: #063f76; }
.student-mode .tab { padding: 10px 13px; font-size: 14px; }
.tabs .subject-tab { min-width: 72px; text-align: center; }
.subject-workspace { display: grid; gap: 14px; }
.subject-header, .subject-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.subject-header h2, .subject-tools strong { margin: 0; color: #e8f6f6; }
.subject-header p { margin: 4px 0 0; color: #b9d9d7; }
.subject-tools { border: 1px solid #246f98; border-radius: 6px; padding: 12px 14px; background: #083967; }
.subject-tools span { display: block; color: #7be0c0; font-size: 13px; }
.subject-tools div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.subject-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.subject-layout .panel { min-height: 206px; }
.subject-layout .panel-header h3 { margin: 0; }
.subject-layout .panel-header > span { color: #6c7b79; font-size: 13px; }
.subject-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.embedded-textbook { min-height: 580px; }
.embedded-reader { color: #edf9ff; }
.embedded-reader-label { display: block; margin-bottom: 5px; color: #8ee9ea; font-size: 12px; font-weight: 700; }
.embedded-reader h3 { margin: 0 0 5px; color: #fff; font-size: 21px; }
.embedded-textbook-empty { display: grid; min-height: 360px; align-content: center; justify-items: start; border: 1px solid #1971a4; border-radius: 6px; background: #07396a; padding: 28px; color: #edf9ff; }
.embedded-textbook-empty h3 { margin: 0 0 9px; }
.embedded-textbook-empty p { max-width: 420px; margin: 0; color: #b7d9e8; line-height: 1.6; }
.student-mode.day-mode .subject-header h2 { color: #153a56; }
.student-mode.day-mode .subject-header p { color: #527084; }
.student-mode.day-mode .subject-tools { border-color: #9bc8dc; background: #edf8ff; }
.student-mode.day-mode .subject-tools strong { color: #153a56; }
.student-mode.day-mode .subject-tools span { color: #197980; }
.student-mode.day-mode .embedded-reader { color: #173b58; }
.student-mode.day-mode .embedded-reader h3 { color: #173b58; }
.student-mode.day-mode .embedded-textbook-empty { border-color: #9bc8dc; background: #edf8ff; color: #173b58; }
.student-mode.day-mode .embedded-textbook-empty p { color: #527084; }
.student-mode #content { padding: 14px 18px 8px; background: #062f5b; }
.theme-toggle { min-width: 84px; }

body.student-mode.day-mode { background: #e8f4f7; }
.student-mode.day-mode .app-shell { border-color: #8cc7d5; background: #f8fcfd; box-shadow: 0 12px 30px rgba(18, 78, 103, .14); }
.student-mode.day-mode .topbar, .student-mode.day-mode .tabs { background: #e8f8fb; }
.student-mode.day-mode .topbar h1 { color: #153a56; }
.student-mode.day-mode .topbar .eyebrow { color: #197980; }
.student-mode.day-mode .role-chip { border-color: #9fd6d5; background: #dff5f1; color: #176b57; }
.student-mode.day-mode .quiet { border-color: #8ebbc9; color: #214f6f; }
.student-mode.day-mode .quiet:hover { background: #d9f0f4; }
.student-mode.day-mode .tab { color: #527084; }
.student-mode.day-mode .tab:hover { background: #d8eff4; color: #173b58; }
.student-mode.day-mode .tab.active { border-bottom-color: #178f8f; color: #173b58; }
.student-mode.day-mode #content { background: #f8fcfd; }

.device-control { display: grid; gap: 16px; }
.device-status { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid #9cb4bd; border-radius: 6px; padding: 24px; }
.device-status h2, .device-actions h2 { margin-bottom: 7px; }
.device-status p { margin: 0; color: #526a75; }
.device-status > strong { flex: 0 0 auto; border-radius: 4px; padding: 9px 12px; font-size: 15px; }
.device-status.is-locked { border-color: #65a0b5; background: #eaf6f8; }
.device-status.is-locked > strong { background: #176b57; color: #fff; }
.device-status.is-open { border-color: #d4a24b; background: #fff7e7; }
.device-status.is-open > strong { background: #b77520; color: #fff; }
.device-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid #d6ddd4; border-radius: 6px; background: #fff; padding: 22px 24px; }
.device-actions.extracurricular { border-style: dashed; }
.device-actions p { max-width: 520px; margin: 0; }
.device-action-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.device-action-buttons button { white-space: nowrap; }
.reading-status { flex: 0 0 auto; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.reading-status.is-open { background: #fff7e7; border: 1px solid #d4a24b; color: #8a5a16; }
.reading-status.is-locked { background: #eaf6f8; border: 1px solid #65a0b5; color: #176b57; }
.check-row { display: flex; align-items: center; gap: 8px; min-height: 42px; font-weight: 700; }
.check-row input { width: 18px; height: 18px; }





.tone-0 { background: #137f9c; }
.tone-1 { background: #216fba; }
.tone-2 { background: #6758af; }
.tone-3 { background: #a76943; }

.exam-overview h2 { margin-bottom: 10px; }
.exam-overview .notice { min-height: 48px; }
.exam-row strong { color: #176b57; }
.exam-paper-workspace { display: grid; gap: 16px; max-width: 1120px; }
.exam-paper-compose, .exam-paper-list { border: 1px solid #cfdadd; border-radius: 6px; background: #fff; padding: 20px; }
.exam-paper-compose > header, .exam-paper-list > header, .exam-paper-header, .exam-paper-sheet > header, .exam-answer-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.exam-paper-compose h2, .exam-paper-list h2, .exam-paper-header h2 { margin: 3px 0 0; }
.exam-paper-list > header { align-items: center; margin-bottom: 8px; }
.exam-paper-list > header > span { color: #46666d; font-size: 13px; font-weight: 700; }
.exam-paper-form textarea { min-height: 180px; resize: vertical; }
.exam-paper-form textarea[name="answer_key"] { min-height: 180px; }
.exam-paper-form textarea[name="notes"] { min-height: 80px; }
.exam-paper-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #e4e9e8; padding: 15px 0; }
.exam-paper-row:first-child { border-top: 0; }
.exam-paper-row-copy { min-width: 0; }
.exam-paper-row-copy h3 { margin: 0 0 7px; color: #153c51; font-size: 17px; }
.exam-paper-row-copy p, .exam-paper-row-copy small { margin: 0; color: #5e747b; font-size: 13px; line-height: 1.5; }
.exam-paper-row-copy small { display: block; margin-top: 5px; }
.exam-paper-row-actions { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.exam-paper-status { min-width: 64px; color: #3b5e68; font-size: 13px; text-align: right; }
.exam-paper-status.status-completed { color: #14756c; }
.exam-paper-status.status-failed { color: #aa474c; }
.exam-paper-header > div { min-width: 0; }
.exam-paper-header p { margin: 8px 0 0; color: #64777d; font-size: 14px; }
.exam-paper-notes { margin: -4px 0 0; border-left: 3px solid #26968b; background: #edf8f6; color: #345c5c; padding: 10px 12px; line-height: 1.6; }
.exam-paper-sheet { border: 1px solid #c9d5d7; background: #fff; color: #172e38; padding: clamp(20px, 4vw, 48px); }
.exam-paper-sheet > header { align-items: baseline; border-bottom: 1px solid #dce5e5; padding-bottom: 13px; }
.exam-paper-sheet > header strong { font-size: 18px; }
.exam-paper-sheet > header span { color: #596f75; font-size: 14px; }
.exam-paper-sheet pre, .exam-answer-key pre, .manager-answer-sheet pre { margin: 20px 0 0; color: inherit; font-family: inherit; font-size: 16px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.exam-answer-key { border: 1px solid #cfdadd; background: #f9fcfc; color: #173c4c; padding: 14px 16px; }
.exam-answer-key summary { cursor: pointer; color: #176b57; font-weight: 700; }
.exam-answer-key pre { margin-top: 14px; }
.exam-answer-sheet { border: 1px solid #9ec8c3; background: #eef9f7; padding: 18px; }
.exam-answer-sheet h3 { margin: 0; color: #173e4b; font-size: 17px; }
.exam-answer-sheet header p { margin: 5px 0 0; color: #557078; font-size: 13px; }
.exam-answer-sheet form { display: grid; gap: 10px; margin-top: 16px; }
.exam-answer-sheet label { display: grid; gap: 7px; color: #345a61; font-weight: 700; }
.exam-answer-sheet textarea { min-height: 320px; resize: vertical; }
.manager-answer-sheet { background: #f7faf9; border-color: #d6e3df; }
.manager-answer-sheet > header > strong { color: #176b57; font-size: 14px; }
.exam-paper-pdf { padding: 18px 20px; }
.exam-paper-pdf > header { border-bottom: 0; padding-bottom: 0; }
.exam-submission-note { margin: 14px 0 0; color: #4f6a70; font-size: 13px; }
.exam-paper-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; border: 1px solid #b8d7d2; background: #f0faf8; padding: 18px; color: #224b50; }
.exam-paper-result.failed { border-color: #e3c2c4; background: #fff6f6; color: #8d3d44; }
.exam-paper-result p { margin: 6px 0 0; line-height: 1.55; }
.exam-paper-score { display: grid; align-content: center; gap: 4px; min-width: 130px; border-right: 1px solid #b9d8d2; padding-right: 22px; }
.exam-paper-score span { color: #53747a; font-size: 13px; }
.exam-paper-score strong { color: #14756c; font-size: 34px; line-height: 1; }
.exam-paper-score small { color: #4c7375; font-size: 15px; }
.exam-paper-feedback { min-width: 0; }
.exam-paper-feedback h3 { margin: 0; color: #174b50; font-size: 16px; }
.exam-paper-feedback p { color: #294f55; white-space: pre-wrap; overflow-wrap: anywhere; }
.exam-paper-feedback .secondary { margin-top: 12px; }
.exam-markdown { color: #294f55; line-height: 1.65; overflow-wrap: anywhere; }
.exam-markdown h3, .exam-markdown h4 { margin: 14px 0 6px; color: #174b50; font-size: 15px; }
.exam-markdown p { margin: 6px 0; white-space: normal; }
.exam-markdown ul { margin: 6px 0 0; padding-left: 20px; }
.exam-markdown li { margin: 4px 0; }
.exam-markdown code { border-radius: 3px; background: #e2efed; padding: 1px 4px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.92em; }
.exam-history-list, .exam-feedback-list, .exam-history-answer, .exam-history-summary { border: 1px solid #cfdadd; background: #fff; padding: 18px; }
.exam-history-list > header, .exam-feedback-list > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.exam-history-list h3, .exam-feedback-list h3, .exam-history-answer h3 { margin: 0; color: #173c4c; font-size: 17px; }
.exam-history-list > header > span { color: #597077; font-size: 13px; }
.exam-history-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #e4e9e8; padding: 14px 0; }
.exam-history-row:first-of-type { margin-top: 10px; }
.exam-history-row strong { color: #173c4c; font-size: 15px; }
.exam-history-row p { margin: 5px 0 0; color: #5d747a; font-size: 13px; }
.exam-history-summary { display: grid; grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr); gap: 22px; border-color: #b8d7d2; background: #f0faf8; }
.exam-history-summary > div:first-child { display: grid; align-content: center; gap: 4px; border-right: 1px solid #b9d8d2; padding-right: 22px; }
.exam-history-summary > div:first-child > span { color: #53747a; font-size: 13px; }
.exam-history-summary > div:first-child > strong { color: #14756c; font-size: 34px; line-height: 1; }
.exam-history-summary small { color: #4c7375; font-size: 15px; }
.exam-history-answer p { margin: 10px 0 0; color: #536e75; line-height: 1.6; }
.exam-history-answer pre { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.7; color: #263f48; }
.exam-feedback-list { display: grid; gap: 10px; }
.exam-feedback-item { border-left: 3px solid #4e9e91; background: #f7fbfa; padding: 14px 16px; }
.exam-feedback-item.lost { border-left-color: #d28a35; background: #fff9ee; }
.exam-feedback-item > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.exam-feedback-item > header strong { color: #173c4c; }
.exam-feedback-item > header span { color: #597077; font-size: 13px; }
.exam-feedback-item p { margin: 8px 0 0; color: #39575f; line-height: 1.6; }
.exam-feedback-item button { margin-top: 11px; }

@keyframes student-hero-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes student-item-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes student-summary-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .student-mode .topbar, .student-mode .tabs { transition: background-color 220ms ease, color 220ms ease; }
  .student-mode .tab, .student-mode .quiet, .student-mode .student-subject, .student-mode .mentor-button { transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
  .student-mode .student-hero { animation: student-hero-enter 360ms cubic-bezier(.2, .75, .25, 1) both; }
  .student-mode .launch-card, .student-mode .focus-station { transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease; }
  .student-mode .launch-card:hover, .student-mode .focus-station:hover { transform: translateY(-3px); box-shadow: 0 9px 20px rgba(7, 60, 89, .12); }
  .student-mode .student-subject:hover, .student-mode .mentor-button:hover { transform: translateY(-1px); }
  .student-mode .student-subject:active, .student-mode .launch-card:active, .student-mode .mentor-button:active { transform: translateY(0) scale(.98); }
  .student-mode .student-launcher > * { animation: student-item-enter 320ms cubic-bezier(.2, .75, .25, 1) both; }
  .student-mode .student-launcher > *:nth-child(1) { animation-delay: 55ms; }
  .student-mode .student-launcher > *:nth-child(2) { animation-delay: 95ms; }
  .student-mode .student-launcher > *:nth-child(3) { animation-delay: 135ms; }
  .student-mode .student-launcher > *:nth-child(4) { animation-delay: 175ms; }
  .student-mode .student-launcher > *:nth-child(5) { animation-delay: 215ms; }
  .student-mode .student-launcher > *:nth-child(6) { animation-delay: 255ms; }
  .student-mode .student-summary { animation: student-summary-enter 330ms cubic-bezier(.2, .75, .25, 1) 290ms both; }
  .student-mode .student-summary > div { transition: background-color 180ms ease, transform 180ms ease; }
  .student-mode .student-summary > div:hover { background: #f5fbf9; transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.subject-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.subject-card { min-height: 118px; padding: 14px; }
.subject-card h3 { font-size: 16px; }
.subject-card strong { display: block; color: #176b57; font-size: 21px; }
.subject-card span { color: #667267; font-size: 12px; }
.progress-track { width: 100%; height: 8px; overflow: hidden; border-radius: 4px; background: #e5eae4; }
.progress-fill { height: 100%; border-radius: inherit; background: #176b57; }
.progress-line { display: grid; grid-template-columns: minmax(100px, 1fr) 56px; align-items: center; gap: 9px; margin-top: 8px; }
.number-input { width: 66px; padding: 6px; text-align: center; }

.suggestions { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.suggestions li { border-left: 3px solid #d29227; padding: 8px 0 8px 10px; color: #4f5d50; line-height: 1.5; }
.answer { min-height: 106px; border-left: 3px solid #d29227; background: #f7f8f5; padding: 14px; white-space: pre-wrap; line-height: 1.7; }
.week-chart { display: grid; grid-template-columns: repeat(7, minmax(34px, 1fr)); align-items: end; gap: 7px; min-height: 152px; margin-top: 12px; }
.day-bar { display: grid; min-height: 132px; grid-template-rows: 1fr auto auto; align-items: end; gap: 5px; text-align: center; color: #667267; font-size: 12px; }
.day-bar i { display: block; min-height: 4px; border-radius: 3px 3px 0 0; background: #176b57; }
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report-table th, .report-table td { border-bottom: 1px solid #e7ebe6; padding: 10px 8px; text-align: left; }
.report-table th { color: #647166; font-size: 12px; }
.report-table td:last-child, .report-table th:last-child { text-align: right; }

@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subject-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .layout, .layout.equal { grid-template-columns: 1fr; }
  .student-hero { grid-template-columns: 1fr; }
  .ai-mentor { padding: 16px 0 0; border-top: 1px solid #276c82; border-left: 0; }
  .student-launcher { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .app-shell { width: min(100% - 20px, 1180px); padding-top: 16px; }
  .topbar { align-items: center; }
  .account-actions { gap: 5px; }
  .role-chip { padding: 6px; }
  .topbar-copy { display: none; }
  .panel { padding: 16px; }
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-hero { padding: 18px; }
  .student-hero h2 { font-size: 23px; }
  .student-launcher { grid-template-columns: 1fr; }
  .focus-station { align-items: flex-start; flex-direction: column; }
  .student-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-summary > div:nth-child(2) { border-right: 0; }
  .student-summary > div:nth-child(-n+2) { border-bottom: 1px solid #e5e9e4; }
  .form-grid { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
  .row-actions { justify-content: flex-start; }
  .material-video-form { grid-template-columns: 1fr; }
  .material-video-form .form-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .student-mode .app-shell { width: min(100% - 20px, 1340px); }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs .subject-tab { flex: 0 0 auto; }
  .subject-header, .subject-tools { align-items: flex-start; flex-direction: column; }
  .subject-header-actions { justify-content: flex-start; }
  .subject-layout { grid-template-columns: 1fr; }
  .device-status, .device-actions { align-items: flex-start; flex-direction: column; }
  .device-action-buttons { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .student-mode .app-shell { width: 100%; margin-top: 0; border-right: 0; border-left: 0; border-radius: 0; }
  .student-mode .topbar { align-items: flex-start; padding: 14px 16px 10px; }
  .student-mode .topbar h1 { font-size: 20px; }
  .student-mode #content { padding: 12px; }
}

.reading-workspace, .vocabulary-workspace, .writing-workspace, .reading-empty {
  color: #edf9ff;
}
.reading-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.reading-header h2 { margin-bottom: 5px; font-size: 22px; }
.reading-header p { margin: 0; color: #a9d4e8; font-size: 14px; line-height: 1.5; }
.reading-actions, .word-actions, .word-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.reading-materials, .vocabulary-sets { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.reader-material, .vocabulary-set { flex: 0 0 auto; border-color: #287fad; background: #083967; color: #c4e8f4; font-size: 13px; }
.reader-material.selected, .vocabulary-set.selected { border-color: #78efe2; background: #1ba6a5; color: #fff; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; min-height: 580px; }
.reading-layout.single-column { grid-template-columns: minmax(0, 1fr); }
.reader-surface, .reading-sidebar, .word-card, .vocabulary-progress, .writing-editor, .writing-feedback, .reading-empty { border: 1px solid #1971a4; border-radius: 6px; background: #07396a; }
.reader-surface { min-height: 580px; overflow: hidden; background: #edf4f5; }
.material-reader { width: 100%; min-height: 578px; border: 0; background: #fff; }
.reader-link-state { display: grid; min-height: 580px; align-content: center; justify-items: start; gap: 12px; padding: 34px; color: #173b58; }
.reader-link-state p { max-width: 420px; margin: 0; color: #527084; line-height: 1.6; }
.builtin-material-reader { min-height: 580px; padding: 26px clamp(20px, 4vw, 44px); color: #173b58; font-size: 16px; line-height: 1.85; }
.builtin-material-reader p { margin: 0 0 20px; }
.builtin-material-reader p:first-child { color: #153a56; font-weight: 700; }
.reader-link { border: 1px solid #177e78; border-radius: 4px; background: #177e78; color: #fff; padding: 9px 14px; font-weight: 700; text-decoration: none; }
.reading-sidebar { display: grid; align-content: start; gap: 16px; padding: 18px; }
.reading-sidebar span, .vocabulary-progress > span { color: #8ee9ea; font-size: 12px; font-weight: 700; }
.reading-sidebar h3 { margin: 5px 0 0; color: #fff; font-size: 17px; }
.word-preview { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.word-preview li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #246894; padding-bottom: 9px; color: #d8f3fc; font-size: 13px; }
.word-preview span { color: #a8cddd; font-size: 13px; font-weight: 400; text-align: right; }
.vocabulary-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; max-width: 860px; }
.word-card { min-height: 360px; padding: 26px; }
.word-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #a9d4e8; font-size: 13px; }
.word-status { border: 1px solid #2a7eaa; border-radius: 3px; padding: 4px 7px; font-weight: 700; }
.status-认识 { border-color: #45c5a2; background: #116e79; color: #d9fff1; }
.status-模糊 { border-color: #d6a459; background: #805b28; color: #fff2d2; }
.status-不会 { border-color: #d48b8b; background: #793e4a; color: #ffe7e9; }
.word-card h2 { margin: 32px 0 4px; color: #fff; font-size: 42px; }
.phonetic { margin: 0 0 26px; color: #8ee9ea; font-size: 16px; }
.word-meaning { margin: 0 0 11px; color: #f2ffff; font-size: 20px; }
.word-example { margin: 0 0 28px; color: #b7d9e8; line-height: 1.6; }
.vocabulary-progress { display: grid; align-content: center; gap: 8px; min-height: 260px; padding: 20px; }
.vocabulary-progress strong { color: #fff; font-size: 32px; }
.vocabulary-progress p { margin: 0 0 10px; color: #b7d9e8; font-size: 13px; line-height: 1.55; }
.writing-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 12px; }
.writing-editor, .writing-feedback { padding: 20px; }
.writing-editor textarea { min-height: 330px; }
.writing-feedback { display: grid; align-content: start; gap: 14px; }
.writing-feedback h3 { margin: 0; color: #fff; font-size: 17px; }
.writing-feedback .answer { border-left-color: #78efe2; background: #062e57; color: #dff6ff; }
#writing-photo-form { display: grid; gap: 10px; }
#writing-photo-form label { color: #b7d9e8; }
#writing-photo-form input { border-color: #287fad; background: #083967; color: #dff6ff; }
.draft-status { min-height: 22px; margin: 8px 0 0; color: #8ee9ea; font-size: 13px; }
.reading-empty { max-width: 620px; padding: 30px; }
.reading-empty h2 { margin-bottom: 8px; }
.reading-empty p { color: #b7d9e8; line-height: 1.6; }

.student-mode.day-mode .reading-workspace, .student-mode.day-mode .vocabulary-workspace, .student-mode.day-mode .writing-workspace, .student-mode.day-mode .reading-empty { color: #173b58; }
.student-mode.day-mode .reading-header p { color: #527084; }
.student-mode.day-mode .reader-material, .student-mode.day-mode .vocabulary-set { border-color: #85bdcc; background: #edf8fb; color: #24556f; }
.student-mode.day-mode .reader-material.selected, .student-mode.day-mode .vocabulary-set.selected { border-color: #168e8e; background: #1ca5a0; color: #fff; }
.student-mode.day-mode .reader-surface, .student-mode.day-mode .reading-sidebar, .student-mode.day-mode .word-card, .student-mode.day-mode .vocabulary-progress, .student-mode.day-mode .writing-editor, .student-mode.day-mode .writing-feedback, .student-mode.day-mode .reading-empty { border-color: #9bc8dc; background: #edf8ff; }
.student-mode.day-mode .reading-sidebar h3, .student-mode.day-mode .word-card h2, .student-mode.day-mode .vocabulary-progress strong, .student-mode.day-mode .writing-feedback h3 { color: #153a56; }
.student-mode.day-mode .word-preview li { border-color: #c4dce8; color: #24556f; }
.student-mode.day-mode .word-preview span, .student-mode.day-mode .vocabulary-progress p { color: #527084; }
.student-mode.day-mode .word-card-top, .student-mode.day-mode .phonetic, .student-mode.day-mode .reading-sidebar span, .student-mode.day-mode .vocabulary-progress > span, .student-mode.day-mode .draft-status { color: #197980; }
.student-mode.day-mode .word-meaning { color: #173b58; }
.student-mode.day-mode .word-example { color: #527084; }
.student-mode.day-mode .writing-feedback .answer { background: #f8fcfd; color: #173b58; }
.student-mode.day-mode #writing-photo-form input { border-color: #8ebbc9; background: #fff; color: #173b58; }

@media (max-width: 840px) {
  .reading-layout, .vocabulary-layout, .writing-layout { grid-template-columns: 1fr; }
  .reading-layout { min-height: 0; }
  .reader-surface, .material-reader, .reader-link-state, .builtin-material-reader { min-height: 460px; }
}

@media (max-width: 560px) {
  .reading-header { align-items: stretch; flex-direction: column; }
  .reading-actions { justify-content: flex-start; }
  .reader-surface, .material-reader, .reader-link-state, .builtin-material-reader { min-height: 380px; }
  .word-card { min-height: 0; padding: 20px; }
  .word-card h2 { margin-top: 24px; font-size: 34px; }
  .word-actions button { flex: 1 1 44%; }
}

.chinese-tool-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.chinese-writing-workspace, .poetry-dictation-workspace { display: grid; gap: 16px; }
.chinese-writing-workspace { color: #202721; }
.poetry-dictation-workspace { color: #edf9ff; }
.chinese-writing-capture, .poetry-dictation-editor, .poetry-attempt-history {
  border: 1px solid #1971a4;
  border-radius: 6px;
  background: #07396a;
}
.chinese-writing-capture { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 18px; }
.chinese-writing-capture strong, .poetry-dictation-editor h3, .poetry-attempt-history h3 { margin: 0; color: #fff; }
.chinese-writing-capture p { margin: 5px 0 0; color: #b7d9e8; font-size: 14px; line-height: 1.5; }
.writing-capture-actions, .writing-photo-form { display: grid; gap: 8px; }
.writing-photo-form label { color: #b7d9e8; }
.writing-photo-form input { border-color: #287fad; background: #083967; color: #dff6ff; }
.poetry-attempt-history { padding: 18px; }
.poetry-attempt-history .panel-header { margin-bottom: 10px; }
.writing-review-page-header { border-bottom: 1px solid #d9dfda; padding: 4px 0 18px; }
.writing-review-page-header h2 { margin: 4px 0 5px; color: #1d2921; font-size: 24px; }
.writing-review-page-header p { margin: 0; color: #667267; }
.writing-review-eyebrow { color: #176b57; font-size: 12px; font-weight: 800; }
.writing-review-history { display: grid; gap: 14px; }
.writing-review-history .panel-header { margin: 0; }
.writing-review-history .panel-header h3 { margin: 0; color: #273129; font-size: 17px; }
.writing-review-history .panel-header p { margin: 3px 0 0; color: #748078; font-size: 13px; }
.writing-review-history .panel-header > span { border: 1px solid #cbd8d0; border-radius: 4px; background: #eef4f0; color: #176b57; padding: 4px 8px; font-size: 12px; font-weight: 700; }
.writing-review-list { display: grid; gap: 10px; }
.writing-review-row { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 16px; border: 1px solid #d8dfda; border-left: 3px solid #2f8b6b; border-radius: 6px; background: #fff; padding: 14px; }
.writing-review-row.status-failed { border-left-color: #b95548; }
.writing-review-row.status-pending { border-left-color: #c38b2e; }
.writing-review-thumbnail { position: relative; align-self: start; }
.writing-review-thumbnail > span { position: absolute; right: 7px; bottom: 7px; border-radius: 3px; background: rgb(18 31 24 / 78%); color: #fff; padding: 3px 6px; font-size: 11px; font-weight: 700; }
.writing-review-image { display: block; width: 168px; height: 118px; border: 1px solid #dce2dd; border-radius: 4px; object-fit: cover; background: #eef1ee; }
.writing-review-copy { display: grid; min-width: 0; gap: 8px; }
.writing-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.writing-review-heading strong { border-radius: 3px; background: #e8f3ed; color: #176b57; padding: 4px 7px; font-size: 13px; }
.writing-review-row.status-failed .writing-review-heading strong { background: #fbebe8; color: #a23b2d; }
.writing-review-row.status-pending .writing-review-heading strong { background: #fff4dc; color: #8a5a0b; }
.writing-review-heading time, .poetry-attempt-row small { color: #748078; font-size: 12px; }
.writing-review-preview { max-height: 70px; overflow: hidden; }
.writing-review-pending, .writing-review-error { margin: 0; color: #667267; font-size: 14px; line-height: 1.55; }
.writing-review-error { color: #a23b2d; }
.writing-review-row-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; border-top: 1px solid #edf0ed; padding-top: 9px; }
.writing-review-row-footer > span { color: #7a857d; font-size: 12px; }
.writing-review-markdown { color: #303a32; font-size: 14px; line-height: 1.65; }
.writing-review-markdown h3, .writing-review-markdown h4 { margin: 14px 0 5px; color: #1e2c23; letter-spacing: 0; }
.writing-review-markdown h3:first-child, .writing-review-markdown h4:first-child { margin-top: 0; }
.writing-review-markdown h3 { font-size: 17px; }
.writing-review-markdown h4 { font-size: 15px; }
.writing-review-markdown p { margin: 5px 0; }
.writing-review-markdown ul { margin: 5px 0 8px; padding-left: 22px; }
.writing-review-markdown li { margin: 3px 0; }
.writing-review-markdown code { border-radius: 3px; background: #edf2ee; color: #315947; padding: 2px 4px; font-family: Consolas, monospace; }
.writing-review-detail { display: grid; gap: 14px; }
.writing-review-score { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #c9ddd1; border-left: 4px solid #2f8b6b; border-radius: 6px; background: #edf6f1; padding: 16px 18px; }
.writing-review-score.status-failed { border-color: #e6c4bd; border-left-color: #b95548; background: #fff3f0; }
.writing-review-score.status-pending { border-color: #ead5ad; border-left-color: #c38b2e; background: #fff8e9; }
.writing-review-score > div { display: grid; gap: 3px; }
.writing-review-score span, .writing-review-score small { color: #667267; font-size: 12px; }
.writing-review-score strong { color: #176b57; font-size: 24px; }
.writing-review-score.status-failed strong { color: #a23b2d; }
.writing-review-score.status-pending strong { color: #8a5a0b; }
.writing-review-images-section, .writing-review-feedback { border: 1px solid #d8dfda; border-radius: 6px; background: #fff; padding: 18px; }
.writing-review-images-section > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.writing-review-images-section h3 { margin: 0; color: #273129; font-size: 16px; }
.writing-review-images-section header span { color: #748078; font-size: 12px; }
.writing-review-detail-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.writing-review-detail-image { display: block; width: 100%; max-height: 70vh; object-fit: contain; border: 1px solid #dce2dd; border-radius: 4px; background: #f2f4f2; }
.writing-review-feedback > header { border-bottom: 1px solid #e4e9e5; margin-bottom: 12px; padding-bottom: 10px; }
.writing-review-feedback > header span { color: #176b57; font-size: 11px; font-weight: 800; }
.writing-review-feedback h3 { margin: 3px 0 0; color: #273129; font-size: 18px; }
.poetry-dictation-editor { display: grid; gap: 14px; padding: 20px; }
.poetry-prompt span { color: #8ee9ea; font-size: 13px; font-weight: 700; }
.poetry-prompt h3 { margin: 5px 0 4px; font-size: 22px; }
.poetry-prompt p { margin: 0; color: #b7d9e8; }
.poetry-dictation-editor form { display: grid; gap: 10px; }
.poetry-dictation-editor label { display: grid; gap: 7px; color: #d8f3fc; }
.poetry-dictation-editor textarea { min-height: 220px; }
.poetry-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.poetry-mode-switch button { min-height: 42px; padding: 8px; }
.poetry-mode-switch button.active { border-color: #78efe2; background: #0d697d; color: #fff; }
.poetry-fill-prompt { display: grid; gap: 8px; border-left: 3px solid #78efe2; padding: 12px; background: #062e57; }
.poetry-fill-prompt span { color: #8ee9ea; font-size: 13px; font-weight: 700; }
.poetry-fill-prompt p { margin: 0; color: #d8f3fc; font-size: 18px; line-height: 1.7; }
.poetry-fill-answer { min-height: 44px; }
.exam-dictation-paper { display: grid; gap: 18px; border: 1px solid #52a9c3; background: #062e57; padding: 22px; color: #effcff; }
.exam-dictation-paper header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.exam-dictation-paper header > div { display: grid; gap: 4px; }
.exam-dictation-paper header strong { color: #fff; font-size: 18px; }
.exam-dictation-paper header p { margin: 0; color: #a9d4e8; font-size: 14px; line-height: 1.5; }
.exam-question-list { display: grid; gap: 17px; }
.poetry-dictation-editor .exam-question { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 8px; color: #edf9ff; font-size: 18px; line-height: 1.8; }
.exam-question-number { color: #8ee9ea; font-weight: 700; }
.exam-question-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; min-width: 0; }
.exam-question input { width: min(100%, 300px); min-height: 42px; margin: 0 7px; border: 0; border-bottom: 2px solid #78efe2; border-radius: 0; background: transparent; color: #fff; padding: 3px 5px; font-size: inherit; }
.exam-question input::placeholder { color: #8db8ca; }
.exam-question input:focus { outline: 2px solid #78efe2; outline-offset: 3px; }
.exam-dictation-results { display: grid; gap: 12px; }
.exam-dictation-results > h4 { margin: 0; color: #8ee9ea; font-size: 15px; }
.exam-result-row { display: grid; gap: 8px; }
.exam-result-row > strong { color: #dff6ff; font-size: 14px; }
.icon-button { width: 42px; min-width: 42px; padding: 0; font-size: 22px; line-height: 1; }
.dictation-result { display: grid; gap: 4px; border-left: 3px solid #78efe2; background: #062e57; padding: 12px; color: #dff6ff; }
.dictation-result strong { color: #fff; }
.dictation-result span { color: #b7d9e8; font-size: 14px; }
.poetry-reference { border-top: 1px solid #246894; padding-top: 14px; }
.poetry-reference strong { color: #8ee9ea; }
.poetry-reference p { margin: 7px 0 0; color: #edf9ff; white-space: pre-wrap; line-height: 1.8; }
.poetry-attempt-history { display: grid; gap: 2px; }
.poetry-attempt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #246894; padding: 10px 0; }
.poetry-attempt-row:first-of-type { border-top: 0; }
.poetry-attempt-row > div { display: grid; gap: 3px; }
.poetry-attempt-row strong { color: #dff6ff; }
.poetry-attempt-row span { color: #b7d9e8; font-size: 13px; }
.poetry-library { display: grid; gap: 14px; margin-top: 16px; border: 1px solid #cfdadd; border-radius: 6px; background: #fff; padding: 20px; }
.poetry-library-header h2 { margin: 0; }
.poetry-library-header p { margin: 5px 0 0; color: #667267; font-size: 14px; }
.poetry-library-list { border-top: 1px solid #e5e9e4; padding-top: 8px; }
.writing-review-library { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; border: 1px solid #cfdadd; border-radius: 6px; background: #fff; padding: 18px 20px; }
.writing-review-library h2 { margin: 0; }
.writing-review-library p { margin: 5px 0 0; color: #667267; font-size: 14px; }
.dictation-analysis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; border-top: 1px solid #246894; margin-top: 4px; padding-top: 12px; }
.dictation-analysis div { min-width: 0; }
.dictation-analysis b { color: #8ee9ea; font-size: 13px; }
.dictation-analysis p { margin: 4px 0 0; color: #dff6ff; white-space: pre-wrap; line-height: 1.55; }

.student-mode.day-mode .chinese-writing-workspace, .student-mode.day-mode .poetry-dictation-workspace { color: #173b58; }
.student-mode.day-mode .chinese-writing-capture, .student-mode.day-mode .poetry-dictation-editor, .student-mode.day-mode .poetry-attempt-history { border-color: #9bc8dc; background: #edf8ff; }
.student-mode.day-mode .chinese-writing-capture strong, .student-mode.day-mode .poetry-dictation-editor h3, .student-mode.day-mode .poetry-attempt-history h3 { color: #153a56; }
.student-mode.day-mode .chinese-writing-capture p, .student-mode.day-mode .writing-photo-form label, .student-mode.day-mode .poetry-prompt p, .student-mode.day-mode .dictation-result span, .student-mode.day-mode .poetry-attempt-row span { color: #527084; }
.student-mode.day-mode .writing-photo-form input { border-color: #8ebbc9; background: #fff; color: #173b58; }
.student-mode.day-mode .poetry-reference, .student-mode.day-mode .poetry-attempt-row { border-color: #c4dce8; }
.student-mode.day-mode .poetry-attempt-row strong, .student-mode.day-mode .poetry-reference p { color: #173b58; }
.student-mode.day-mode .poetry-attempt-row small, .student-mode.day-mode .poetry-prompt span, .student-mode.day-mode .poetry-reference strong { color: #197980; }
.student-mode.day-mode .dictation-result { background: #f8fcfd; color: #173b58; }
.student-mode.day-mode .dictation-result strong { color: #153a56; }
.student-mode.day-mode .dictation-analysis { border-color: #c4dce8; }
.student-mode.day-mode .dictation-analysis b { color: #197980; }
.student-mode.day-mode .dictation-analysis p { color: #173b58; }
.student-mode.day-mode .poetry-fill-prompt { background: #f8fcfd; border-color: #197980; }
.student-mode.day-mode .poetry-fill-prompt span { color: #197980; }
.student-mode.day-mode .poetry-fill-prompt p { color: #173b58; }
.student-mode.day-mode .exam-dictation-paper { border-color: #8fcbe0; background: #f9fdff; color: #173b58; }
.student-mode.day-mode .exam-dictation-paper header strong, .student-mode.day-mode .poetry-dictation-editor .exam-question { color: #173b58; }
.student-mode.day-mode .exam-dictation-paper header p { color: #527084; }
.student-mode.day-mode .exam-question-number, .student-mode.day-mode .exam-dictation-results > h4 { color: #197980; }
.student-mode.day-mode .exam-question input { border-bottom-color: #197980; color: #173b58; }
.student-mode.day-mode .exam-question input::placeholder { color: #7b96a7; }
.student-mode.day-mode .exam-result-row > strong { color: #173b58; }
.student-mode.night-mode .exam-dictation-paper { border-color: #52a9c3; background: #062e57; color: #effcff; }
.student-mode.night-mode .poetry-dictation-editor .exam-question { color: #edf9ff; }
.student-mode.night-mode .chinese-writing-workspace { color: #edf9ff; }
.student-mode.night-mode .writing-review-page-header { border-color: #246894; }
.student-mode.night-mode .writing-review-page-header h2, .student-mode.night-mode .writing-review-history .panel-header h3 { color: #fff; }
.student-mode.night-mode .writing-review-page-header p, .student-mode.night-mode .writing-review-history .panel-header p { color: #b7d9e8; }
.student-mode.night-mode .writing-review-eyebrow { color: #8ee9ea; }
.student-mode.night-mode .writing-review-history .panel-header > span { border-color: #287fad; background: #07396a; color: #8ee9ea; }
.student-mode.night-mode .writing-review-row { border-color: #246894; border-left-color: #2bb8aa; background: #07396a; }
.student-mode.night-mode .writing-review-row.status-failed { border-left-color: #e1847a; }
.student-mode.night-mode .writing-review-row.status-pending { border-left-color: #e7b35b; }
.student-mode.night-mode .writing-review-image { border-color: #246894; background: #062e57; }
.student-mode.night-mode .writing-review-heading time, .student-mode.night-mode .writing-review-row-footer > span { color: #a9d4e8; }
.student-mode.night-mode .writing-review-preview .writing-review-markdown, .student-mode.night-mode .writing-review-pending { color: #d8f3fc; }
.student-mode.night-mode .writing-review-preview .writing-review-markdown h3, .student-mode.night-mode .writing-review-preview .writing-review-markdown h4 { color: #fff; }
.student-mode.night-mode .writing-review-row-footer { border-color: #246894; }
.student-mode.night-mode .writing-review-score, .student-mode.night-mode .writing-review-images-section, .student-mode.night-mode .writing-review-feedback { border-color: #246894; background: #07396a; }
.student-mode.night-mode .writing-review-score { border-left-color: #2bb8aa; }
.student-mode.night-mode .writing-review-score.status-failed { border-left-color: #e1847a; }
.student-mode.night-mode .writing-review-score.status-pending { border-left-color: #e7b35b; }
.student-mode.night-mode .writing-review-score strong, .student-mode.night-mode .writing-review-images-section h3, .student-mode.night-mode .writing-review-feedback h3, .student-mode.night-mode .writing-review-markdown h3, .student-mode.night-mode .writing-review-markdown h4 { color: #fff; }
.student-mode.night-mode .writing-review-score span, .student-mode.night-mode .writing-review-score small, .student-mode.night-mode .writing-review-images-section header span { color: #a9d4e8; }
.student-mode.night-mode .writing-review-detail-image { border-color: #246894; background: #062e57; }
.student-mode.night-mode .writing-review-feedback > header { border-color: #246894; }
.student-mode.night-mode .writing-review-feedback > header span { color: #8ee9ea; }
.student-mode.night-mode .writing-review-markdown { color: #d8f3fc; }
.student-mode.night-mode .writing-review-markdown code { background: #062e57; color: #8ee9ea; }

@media (max-width: 840px) {
  .chinese-writing-capture { grid-template-columns: 1fr; align-items: start; }
  .writing-review-row { grid-template-columns: 112px minmax(0, 1fr); }
  .writing-review-image { width: 112px; height: 88px; }
  .dictation-analysis { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .poetry-dictation-editor .exam-question { grid-template-columns: 1fr; gap: 2px; }
  .exam-question input { width: 100%; margin: 3px 0; }
}

@media (max-width: 560px) {
  .writing-review-row { grid-template-columns: 1fr; }
  .writing-review-thumbnail { width: min(100%, 280px); }
  .writing-review-image { width: min(100%, 280px); height: 168px; }
  .writing-review-heading, .poetry-attempt-row { align-items: flex-start; flex-direction: column; }
  .writing-review-row-footer { align-items: flex-start; flex-direction: column; }
  .writing-review-library { align-items: flex-start; flex-direction: column; }
}

.student-mode.night-mode .exam-paper-list { border-color: #1971a4; background: #07396a; color: #edf9ff; }
.student-mode.night-mode .exam-paper-list > header > span { color: #8ee9ea; }
.student-mode.night-mode .exam-paper-row { border-color: #246894; }
.student-mode.night-mode .exam-paper-row-copy h3 { color: #effcff; }
.student-mode.night-mode .exam-paper-row-copy p, .student-mode.night-mode .exam-paper-row-copy small { color: #b7d9e8; }
.student-mode.night-mode .exam-paper-status { color: #a9d4e8; }
.student-mode.night-mode .exam-paper-status.status-completed { color: #8ee9ea; }
.student-mode.night-mode .exam-paper-header p { color: #a9d4e8; }
.student-mode.night-mode .exam-paper-notes { border-color: #78efe2; background: #062e57; color: #dff6ff; }
.student-mode.night-mode .exam-answer-sheet { border-color: #1971a4; background: #07396a; color: #edf9ff; }
.student-mode.night-mode .exam-answer-sheet h3 { color: #fff; }
.student-mode.night-mode .exam-answer-sheet header p, .student-mode.night-mode .exam-answer-sheet label { color: #b7d9e8; }
.student-mode.night-mode .exam-answer-sheet textarea { border-color: #287fad; background: #062e57; color: #edf9ff; }
.student-mode.night-mode .exam-paper-result { border-color: #197f93; background: #073f62; color: #dff6ff; }
.student-mode.night-mode .exam-paper-result.failed { border-color: #9b5d67; background: #5c2e3b; color: #ffe8eb; }
.student-mode.night-mode .exam-paper-score { border-color: #286a89; }
.student-mode.night-mode .exam-paper-score span, .student-mode.night-mode .exam-paper-score small { color: #a9d4e8; }
.student-mode.night-mode .exam-paper-score strong { color: #8ee9ea; }
.student-mode.night-mode .exam-paper-feedback h3, .student-mode.night-mode .exam-paper-feedback p { color: #e4f7ff; }
.student-mode.night-mode .exam-history-list, .student-mode.night-mode .exam-feedback-list, .student-mode.night-mode .exam-history-answer { border-color: #1971a4; background: #07396a; color: #edf9ff; }
.student-mode.night-mode .exam-history-summary { border-color: #197f93; background: #073f62; }
.student-mode.night-mode .exam-history-list h3, .student-mode.night-mode .exam-feedback-list h3, .student-mode.night-mode .exam-history-answer h3, .student-mode.night-mode .exam-history-row strong, .student-mode.night-mode .exam-feedback-item > header strong { color: #edf9ff; }
.student-mode.night-mode .exam-history-list > header > span, .student-mode.night-mode .exam-history-row p, .student-mode.night-mode .exam-feedback-item > header span, .student-mode.night-mode .exam-feedback-item p, .student-mode.night-mode .exam-history-answer p, .student-mode.night-mode .exam-history-answer pre, .student-mode.night-mode .exam-markdown, .student-mode.night-mode .exam-markdown h3, .student-mode.night-mode .exam-markdown h4 { color: #b7d9e8; }
.student-mode.night-mode .exam-history-summary > div:first-child { border-color: #286a89; }
.student-mode.night-mode .exam-history-summary > div:first-child > span, .student-mode.night-mode .exam-history-summary small { color: #a9d4e8; }
.student-mode.night-mode .exam-history-summary > div:first-child > strong { color: #8ee9ea; }
.student-mode.night-mode .exam-markdown code { background: #062e57; }
.student-mode.night-mode .exam-feedback-item { border-color: #4eaaa0; background: #063e69; }
.student-mode.night-mode .exam-feedback-item.lost { border-color: #dea652; background: #5c4122; }

@media (max-width: 700px) {
  .exam-paper-row, .exam-paper-header, .exam-paper-result, .exam-history-row, .exam-feedback-item > header { align-items: flex-start; grid-template-columns: 1fr; flex-direction: column; }
  .exam-paper-row-actions { justify-content: flex-start; }
  .exam-paper-status { text-align: left; }
  .exam-paper-score { border-right: 0; border-bottom: 1px solid #b9d8d2; padding: 0 0 14px; }
  .exam-history-summary { grid-template-columns: 1fr; }
  .exam-history-summary > div:first-child { border-right: 0; border-bottom: 1px solid #b9d8d2; padding: 0 0 14px; }
  .exam-paper-compose, .exam-paper-list { padding: 16px; }
  .exam-paper-sheet { padding: 20px; }
}

/* Management console v31 -------------------------------------------------- */
body:not(.student-mode) {
  --ops-ink: #152b38;
  --ops-muted: #617681;
  --ops-canvas: #edf2f3;
  --ops-surface: #ffffff;
  --ops-navy: #0b1f2a;
  --ops-navy-raised: #102b38;
  --ops-teal: #087c75;
  --ops-teal-dark: #05645f;
  --ops-teal-soft: #e4f4f2;
  --ops-cyan: #2fc8bc;
  --ops-gold: #c78b2e;
  --ops-gold-soft: #fff3dc;
  --ops-red: #b34747;
  --ops-red-soft: #fff0ef;
  --ops-border: #d4e0e4;
  background: var(--ops-canvas);
  color: var(--ops-ink);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body:not(.student-mode) button,
body:not(.student-mode) input,
body:not(.student-mode) textarea,
body:not(.student-mode) select {
  letter-spacing: 0;
}

body:not(.student-mode) button:focus-visible,
body:not(.student-mode) input:focus-visible,
body:not(.student-mode) textarea:focus-visible,
body:not(.student-mode) select:focus-visible {
  outline: 3px solid #e5b054;
  outline-offset: 2px;
}

body:not(.student-mode) .eyebrow {
  margin-bottom: 6px;
  color: var(--ops-teal);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

/* Login is a real system entry, not a marketing landing page. */
body:not(.student-mode) .login-shell {
  display: grid;
  grid-template-columns: minmax(300px, 520px) minmax(340px, 430px);
  min-height: 100vh;
  place-content: center;
  gap: clamp(42px, 8vw, 112px);
  overflow: hidden;
  background: var(--ops-navy);
  padding: clamp(28px, 6vw, 72px);
}

body:not(.student-mode) .login-brand {
  position: relative;
  align-self: center;
  max-width: 520px;
  border-top: 1px solid #2a4a57;
  border-bottom: 1px solid #2a4a57;
  padding: 34px 0 36px;
  color: #f5fbfc;
}

body:not(.student-mode) .login-brand::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 34%;
  height: 3px;
  background: var(--ops-cyan);
  content: "";
}

body:not(.student-mode) .login-brand-mark,
body:not(.student-mode) .topbar-mark {
  display: grid;
  place-items: center;
  border: 1px solid #3dcabf;
  border-radius: 4px;
  background: #123441;
  color: #85f1e7;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 800;
}

body:not(.student-mode) .login-brand-mark {
  width: 58px;
  height: 58px;
  margin-bottom: 28px;
  font-size: 25px;
}

body:not(.student-mode) .login-brand .eyebrow {
  color: #74dcd3;
}

body:not(.student-mode) .login-brand h1 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.08;
}

body:not(.student-mode) .login-brand > p:not(.eyebrow) {
  margin: 0;
  color: #a9c0ca;
  font-size: 18px;
}

body:not(.student-mode) .system-ready {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 38px;
  color: #8da8b2;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

body:not(.student-mode) .system-ready i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #48d0a2;
  box-shadow: 0 0 0 3px rgb(72 208 162 / 15%);
}

body:not(.student-mode) .login-form {
  width: 100%;
  border: 1px solid #d6e1e5;
  border-radius: 6px;
  background: #f9fbfc;
  box-shadow: 0 24px 64px rgb(1 13 20 / 34%);
  padding: 36px;
}

body:not(.student-mode) .login-form h2 {
  margin-bottom: 7px;
  color: var(--ops-ink);
  font-size: 25px;
}

body:not(.student-mode) .login-copy {
  margin-bottom: 24px;
  color: var(--ops-muted);
}

body:not(.student-mode) .login-form label {
  margin-top: 14px;
}

body:not(.student-mode) .login-form button {
  min-height: 46px;
  margin-top: 22px;
}

/* Desktop operations shell. */
body:not(.student-mode) .management-console:not(.hidden) {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  grid-template-rows: auto minmax(calc(100vh - 132px), auto);
  width: min(1480px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid #c9d7dc;
  border-radius: 6px;
  background: var(--ops-surface);
  box-shadow: 0 14px 38px rgb(19 45 58 / 12%);
  padding: 0;
}

body:not(.student-mode) .management-console .topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-height: 98px;
  border-bottom: 1px solid #27424e;
  background: var(--ops-navy);
  padding: 20px 24px;
  color: #f6fbfc;
}

body:not(.student-mode) .topbar-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

body:not(.student-mode) .topbar-mark {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  font-size: 20px;
}

body:not(.student-mode) .topbar h1 {
  margin: 0;
  color: #ffffff;
  font-size: 23px;
}

body:not(.student-mode) .topbar .eyebrow {
  color: #67d7cf;
}

body:not(.student-mode) .topbar-copy {
  margin: 4px 0 0;
  color: #9db5bf;
  font-size: 12px;
}

body:not(.student-mode) .account-actions {
  align-items: center;
  gap: 7px;
}

body:not(.student-mode) .role-chip,
body:not(.student-mode) .terminal-battery {
  border: 1px solid #31525f;
  border-radius: 4px;
  background: #102f3c;
  color: #b5e8e3;
  padding: 8px 10px;
  font-size: 12px;
}

body:not(.student-mode) .student-select {
  width: auto;
  min-width: 146px;
  border-color: #3b5b67;
  background: #102f3c;
  color: #f4fbfc;
}

body:not(.student-mode) .topbar button.quiet {
  border-color: #3b5b67;
  background: transparent;
  color: #d8e8ec;
}

body:not(.student-mode) .topbar button.quiet:hover {
  border-color: #64d3ca;
  background: #143a47;
  color: #ffffff;
}

body:not(.student-mode) .management-console .tabs {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin: 0;
  overflow: visible;
  border: 0;
  background: #102733;
  padding: 21px 12px;
}

body:not(.student-mode) .nav-label {
  display: block;
  margin: 0 10px 11px;
  color: #78929d;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

body:not(.student-mode) .tabs .tab {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #b3c5cc;
  padding: 11px 13px;
  text-align: left;
}

body:not(.student-mode) .tabs .tab:hover {
  background: #173642;
  color: #ffffff;
}

body:not(.student-mode) .tabs .tab.active {
  border-left-color: var(--ops-cyan);
  border-bottom-color: transparent;
  background: #17424b;
  color: #ffffff;
}

body:not(.student-mode) .management-console > main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  background: var(--ops-canvas);
  padding: 24px;
}

body:not(.student-mode) #content {
  min-width: 0;
}

/* Work surfaces and high-density forms. */
body:not(.student-mode) .metric,
body:not(.student-mode) .panel,
body:not(.student-mode) .subject-card,
body:not(.student-mode) .device-actions,
body:not(.student-mode) .exam-paper-compose,
body:not(.student-mode) .exam-paper-list,
body:not(.student-mode) .poetry-library,
body:not(.student-mode) .writing-review-library,
body:not(.student-mode) .writing-review-history,
body:not(.student-mode) .writing-review-images-section,
body:not(.student-mode) .writing-review-feedback {
  border-color: var(--ops-border);
  border-radius: 6px;
  background: var(--ops-surface);
  box-shadow: 0 2px 7px rgb(26 55 68 / 5%);
}

body:not(.student-mode) .panel {
  padding: 20px;
}

body:not(.student-mode) .course-video-panel {
  padding: 0;
}

body:not(.student-mode) .layout + .layout,
body:not(.student-mode) .layout + .panel,
body:not(.student-mode) .panel + .panel,
body:not(.student-mode) .panel + .poetry-library,
body:not(.student-mode) .panel + .writing-review-library {
  margin-top: 16px;
}

body:not(.student-mode) .panel-header {
  align-items: flex-start;
  margin-bottom: 16px;
  border-bottom: 1px solid #e4ecef;
  padding-bottom: 12px;
}

body:not(.student-mode) .panel-header h2,
body:not(.student-mode) .panel-header h3 {
  color: var(--ops-ink);
}

body:not(.student-mode) .panel-header .muted,
body:not(.student-mode) .muted,
body:not(.student-mode) .notice,
body:not(.student-mode) .row-meta {
  color: var(--ops-muted);
}

body:not(.student-mode) label {
  color: #334b58;
  font-size: 13px;
}

body:not(.student-mode) input,
body:not(.student-mode) textarea,
body:not(.student-mode) select {
  min-height: 42px;
  border: 1px solid #bfcfd5;
  border-radius: 4px;
  background: #fbfcfd;
  color: var(--ops-ink);
  padding: 10px 11px;
}

body:not(.student-mode) input:hover,
body:not(.student-mode) textarea:hover,
body:not(.student-mode) select:hover {
  border-color: #8eabb5;
}

body:not(.student-mode) input:focus,
body:not(.student-mode) textarea:focus,
body:not(.student-mode) select:focus {
  border-color: var(--ops-teal);
  background: #ffffff;
}

body:not(.student-mode) input[type="file"] {
  min-height: 46px;
  padding: 5px;
}

body:not(.student-mode) input[type="file"]::file-selector-button {
  height: 34px;
  margin-right: 10px;
  border: 0;
  border-radius: 3px;
  background: #e4edef;
  color: #284a58;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
}

body:not(.student-mode) input[type="checkbox"] {
  min-height: 0;
  accent-color: var(--ops-teal);
}

body:not(.student-mode) button {
  min-height: 40px;
  border-color: var(--ops-teal);
  border-radius: 4px;
  background: var(--ops-teal);
  color: #ffffff;
  padding: 9px 14px;
}

body:not(.student-mode) button:hover {
  border-color: var(--ops-teal-dark);
  background: var(--ops-teal-dark);
}

body:not(.student-mode) button.secondary,
body:not(.student-mode) button.quiet {
  border-color: #b9cbd1;
  background: #ffffff;
  color: #176a67;
}

body:not(.student-mode) button.secondary:hover,
body:not(.student-mode) button.quiet:hover {
  border-color: #73a9a7;
  background: var(--ops-teal-soft);
  color: #075d59;
}

body:not(.student-mode) button.danger {
  border-color: #dfb9b7;
  background: #ffffff;
  color: var(--ops-red);
}

body:not(.student-mode) button.danger:hover {
  border-color: var(--ops-red);
  background: var(--ops-red-soft);
}

body:not(.student-mode) button.small {
  min-height: 34px;
  padding: 6px 10px;
}

body:not(.student-mode) .row {
  border-bottom-color: #e3ebee;
  padding: 13px 8px;
}

body:not(.student-mode) .row:hover {
  background: #f6f9fa;
}

body:not(.student-mode) .row-title {
  color: #1d3643;
}

body:not(.student-mode) .tag {
  border: 1px solid #b9ddd8;
  border-radius: 3px;
  background: var(--ops-teal-soft);
  color: #086e68;
}

body:not(.student-mode) .tag.gold {
  border-color: #ead19d;
  background: var(--ops-gold-soft);
  color: #865a13;
}

body:not(.student-mode) .tag.red {
  border-color: #e5bdbc;
  background: var(--ops-red-soft);
  color: #9c3d3d;
}

body:not(.student-mode) .empty {
  margin: 0;
  border-left: 3px solid #a7bdc5;
  color: #6a7d86;
  padding: 13px 14px;
}

body:not(.student-mode) .metric {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

body:not(.student-mode) .metric::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--ops-teal);
  content: "";
}

body:not(.student-mode) .metric strong,
body:not(.student-mode) .subject-card strong {
  color: var(--ops-teal);
}

body:not(.student-mode) .progress-track {
  background: #dce7ea;
}

body:not(.student-mode) .progress-fill,
body:not(.student-mode) .day-bar i {
  background: var(--ops-teal);
}

body:not(.student-mode) .material-video-form {
  border-color: #cddde1;
  background: #f3f8f8;
}

body:not(.student-mode) .device-status {
  border-radius: 6px;
  border-left-width: 4px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgb(26 55 68 / 5%);
}

body:not(.student-mode) .device-status.is-locked {
  border-color: #69aaa7;
  background: var(--ops-teal-soft);
}

body:not(.student-mode) .device-status.is-locked > strong {
  background: var(--ops-teal);
}

body:not(.student-mode) .device-status.is-open {
  border-color: #d1a04c;
  background: var(--ops-gold-soft);
}

body:not(.student-mode) .device-status.is-open > strong {
  background: var(--ops-gold);
}

body:not(.student-mode) .device-actions {
  padding: 20px 22px;
}

body:not(.student-mode) .exam-paper-notes {
  border-color: var(--ops-teal);
  background: var(--ops-teal-soft);
}

body:not(.student-mode) .exam-answer-key,
body:not(.student-mode) .exam-history-list,
body:not(.student-mode) .exam-feedback-list,
body:not(.student-mode) .exam-history-answer,
body:not(.student-mode) .exam-history-summary {
  border-color: var(--ops-border);
}

body:not(.student-mode) .exam-paper-sheet {
  border-color: #becdd2;
  box-shadow: 0 4px 16px rgb(25 48 58 / 7%);
}

body:not(.student-mode) .report-table th {
  background: #f3f7f8;
  color: #4e6874;
}

body:not(.student-mode) .report-table th,
body:not(.student-mode) .report-table td {
  border-bottom-color: #dfe8eb;
}

@keyframes management-content-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  body:not(.student-mode) #content > * {
    animation: management-content-enter 220ms ease-out both;
  }

  body:not(.student-mode) button,
  body:not(.student-mode) input,
  body:not(.student-mode) textarea,
  body:not(.student-mode) select,
  body:not(.student-mode) .row {
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
  }
}

/* Textbook table of contents editor v33 -------------------------------- */
body:not(.student-mode) .material-toc-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #b9d6d2;
  color: #17675f;
  background: #f2f9f7;
  font-size: 12px;
  font-weight: 700;
}

body:not(.student-mode) .material-toc-editor {
  margin-top: 18px;
  border-top: 3px solid #15988f;
}

/* Admin vocabulary import review --------------------------------------- */
body:not(.student-mode) .admin-vocabulary-editor {
  margin-top: 18px;
  border-top: 3px solid #c78d2c;
}

body:not(.student-mode) .admin-vocabulary-header {
  align-items: flex-start;
}

body:not(.student-mode) .admin-vocabulary-unit-summaries {
  display: grid;
  grid-template-columns: repeat(8, minmax(84px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

body:not(.student-mode) .admin-vocabulary-unit-summary {
  display: grid;
  gap: 3px;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid #d7e2e1;
  border-top: 3px solid #2e9a91;
  background: #f7fbfa;
  color: #526b72;
  font-size: 12px;
}

body:not(.student-mode) .admin-vocabulary-unit-summary strong {
  color: #174f50;
  font-size: 14px;
}

body:not(.student-mode) .admin-vocabulary-warnings,
body:not(.student-mode) .admin-vocabulary-ok {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid #c78d2c;
  background: #fff8e9;
  color: #765b22;
  font-size: 13px;
}

body:not(.student-mode) .admin-vocabulary-ok {
  border-left-color: #2e9a91;
  background: #f0f9f6;
  color: #28685f;
}

body:not(.student-mode) .admin-vocabulary-warnings ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

body:not(.student-mode) .admin-vocabulary-columns,
body:not(.student-mode) .admin-vocabulary-word-row {
  display: grid;
  grid-template-columns: 76px minmax(120px, 1fr) minmax(110px, 1fr) minmax(150px, 1.25fr) minmax(160px, 1.4fr) 58px 76px;
  align-items: center;
  gap: 8px;
}

body:not(.student-mode) .admin-vocabulary-columns {
  padding: 0 10px 7px;
  color: #64808a;
  font-size: 12px;
  font-weight: 800;
}

body:not(.student-mode) .admin-vocabulary-word-list {
  overflow-x: auto;
  border-top: 1px solid #d9e5e8;
}

body:not(.student-mode) .admin-vocabulary-word-row {
  min-width: 780px;
  min-height: 55px;
  padding: 7px 10px;
  border-bottom: 1px solid #e2eaed;
  background: #fff;
}

body:not(.student-mode) .admin-vocabulary-word-row input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
}

body:not(.student-mode) .admin-vocabulary-unit-label {
  color: #376b72;
  font-size: 12px;
  font-weight: 800;
}

body:not(.student-mode) .admin-vocabulary-key {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #526d76;
  font-size: 12px;
  white-space: nowrap;
}

body:not(.student-mode) .admin-vocabulary-word-row.is-removed {
  opacity: .55;
  background: #fff5f4;
}

body:not(.student-mode) .admin-vocabulary-word-row.is-removed input:not([type="checkbox"]) {
  text-decoration: line-through;
}

body:not(.student-mode) .admin-vocabulary-actions {
  justify-content: flex-end;
  margin-top: 15px;
}

@media (max-width: 980px) {
  body:not(.student-mode) .admin-vocabulary-unit-summaries {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
  }
}

@media (max-width: 560px) {
  body:not(.student-mode) .admin-vocabulary-unit-summaries {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  body:not(.student-mode) .admin-vocabulary-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

body:not(.student-mode) .material-toc-editor-header {
  align-items: flex-start;
}

body:not(.student-mode) .material-toc-columns,
body:not(.student-mode) .material-toc-row {
  display: grid;
  grid-template-columns: 92px minmax(220px, 1fr) 150px 150px;
  align-items: center;
  gap: 10px;
}

body:not(.student-mode) .material-toc-columns {
  padding: 0 10px 8px;
  color: #64808a;
  font-size: 12px;
  font-weight: 800;
}

body:not(.student-mode) .material-toc-rows {
  border-top: 1px solid #d9e5e8;
}

body:not(.student-mode) .material-toc-row {
  min-height: 62px;
  padding: 8px 10px;
  border-bottom: 1px solid #e2eaed;
  background: #ffffff;
}

body:not(.student-mode) .material-toc-row input,
body:not(.student-mode) .material-toc-row select {
  width: 100%;
  min-width: 0;
}

body:not(.student-mode) .material-toc-page {
  display: grid;
  grid-template-columns: auto minmax(60px, 1fr);
  align-items: center;
  gap: 8px;
  color: #526d76;
  font-size: 12px;
  font-weight: 700;
}

body:not(.student-mode) .material-toc-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

body:not(.student-mode) .material-toc-row-actions .icon-only {
  width: 38px;
  min-width: 38px;
  padding: 0;
  font-size: 18px;
}

body:not(.student-mode) .material-toc-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

@media (max-width: 880px) {
  body:not(.student-mode) .material-toc-columns {
    display: none;
  }

  body:not(.student-mode) .material-toc-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  body:not(.student-mode) .material-toc-page,
  body:not(.student-mode) .material-toc-row-actions {
    grid-column: 2;
  }

  body:not(.student-mode) .material-toc-row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  body:not(.student-mode) .material-toc-row {
    grid-template-columns: 1fr;
  }

  body:not(.student-mode) .material-toc-page,
  body:not(.student-mode) .material-toc-row-actions {
    grid-column: 1;
  }

  body:not(.student-mode) .material-toc-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  body:not(.student-mode) .management-console:not(.hidden) {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    width: min(100% - 20px, 1180px);
    margin: 10px auto;
  }

  body:not(.student-mode) .management-console .topbar {
    grid-column: 1;
    grid-row: 1;
  }

  body:not(.student-mode) .management-console .tabs {
    grid-column: 1;
    grid-row: 2;
    flex-direction: row;
    overflow-x: auto;
    border-bottom: 1px solid #294550;
    padding: 9px 12px;
  }

  body:not(.student-mode) .nav-label {
    display: none;
  }

  body:not(.student-mode) .tabs .tab {
    width: auto;
    min-width: max-content;
    border-left: 0;
    border-bottom: 3px solid transparent;
    text-align: center;
  }

  body:not(.student-mode) .tabs .tab.active {
    border-bottom-color: var(--ops-cyan);
  }

  body:not(.student-mode) .management-console > main {
    grid-column: 1;
    grid-row: 3;
  }
}

@media (max-width: 700px) {
  body:not(.student-mode) .login-shell {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
    padding: 24px;
  }

  body:not(.student-mode) .login-brand {
    padding: 24px 0;
  }

  body:not(.student-mode) .login-brand-mark {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
  }

  body:not(.student-mode) .login-brand h1 {
    font-size: 36px;
  }

  body:not(.student-mode) .system-ready {
    margin-top: 22px;
  }

  body:not(.student-mode) .login-form {
    padding: 26px 22px;
  }

  body:not(.student-mode) .management-console:not(.hidden) {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  body:not(.student-mode) .management-console .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
  }

  body:not(.student-mode) .account-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body:not(.student-mode) .management-console > main {
    padding: 16px;
  }

  body:not(.student-mode) .panel {
    padding: 16px;
  }

  body:not(.student-mode) .panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

/* Administrator-only tablet activity timeline. */
body:not(.student-mode) .device-activity-page {
  display: grid;
  gap: 16px;
}

body:not(.student-mode) .device-activity-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--ops-border);
  padding: 2px 0 16px;
}

body:not(.student-mode) .device-activity-header h2 {
  margin: 0;
  color: var(--ops-ink);
  font-size: 24px;
  letter-spacing: 0;
}

body:not(.student-mode) .device-activity-header .muted {
  max-width: 680px;
  margin: 6px 0 0;
}

body:not(.student-mode) .device-activity-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 8px;
}

body:not(.student-mode) .device-activity-toolbar label {
  min-width: 210px;
  gap: 5px;
  color: var(--ops-muted);
  font-size: 12px;
}

body:not(.student-mode) .device-activity-toolbar select,
body:not(.student-mode) .device-activity-toolbar button {
  min-height: 38px;
}

body:not(.student-mode) .device-activity-panel {
  min-width: 0;
}

body:not(.student-mode) .device-activity-panel .panel-header {
  margin-bottom: 0;
  border-bottom: 1px solid #dbe5e8;
  padding-bottom: 12px;
}

body:not(.student-mode) .device-activity-panel .panel-header h3 {
  margin: 0;
  color: var(--ops-ink);
  font-size: 16px;
  letter-spacing: 0;
}

body:not(.student-mode) .device-activity-panel .panel-header > .muted {
  margin: 0;
  white-space: nowrap;
}

body:not(.student-mode) .device-activity-timeline {
  position: relative;
}

body:not(.student-mode) .device-activity-entry {
  --activity-accent: #60747d;
  position: relative;
  margin: 0;
  border-bottom: 1px solid #e2eaed;
  padding: 18px 0 18px 30px;
}

body:not(.student-mode) .device-activity-entry:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

body:not(.student-mode) .device-activity-entry::before {
  position: absolute;
  top: 23px;
  left: 4px;
  width: 9px;
  height: 9px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--activity-accent);
  box-shadow: 0 0 0 1px var(--activity-accent);
  content: "";
}

body:not(.student-mode) .device-activity-entry::after {
  position: absolute;
  top: 36px;
  bottom: -7px;
  left: 10px;
  width: 1px;
  background: #d6e1e4;
  content: "";
}

body:not(.student-mode) .device-activity-entry:last-child::after {
  display: none;
}

body:not(.student-mode) .device-activity-entry.tone-textbook {
  --activity-accent: #2f7d58;
}

body:not(.student-mode) .device-activity-entry.tone-video {
  --activity-accent: #326ba8;
}

body:not(.student-mode) .device-activity-entry.tone-device {
  --activity-accent: #6f5b8d;
}

body:not(.student-mode) .device-activity-entry.tone-error {
  --activity-accent: #b34242;
}

body:not(.student-mode) .device-activity-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

body:not(.student-mode) .device-activity-kind {
  color: var(--activity-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

body:not(.student-mode) .device-activity-entry time {
  flex: 0 0 auto;
  color: var(--ops-muted);
  font-size: 12px;
  white-space: nowrap;
}

body:not(.student-mode) .device-activity-sentence {
  margin: 7px 0 0;
  color: var(--ops-ink);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

body:not(.student-mode) .device-activity-context {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 0;
  margin: 5px 0 0;
  color: var(--ops-muted);
  font-size: 12px;
  line-height: 1.55;
}

body:not(.student-mode) .device-activity-context span:not(:last-child)::after {
  margin: 0 7px;
  color: #9babb1;
  content: "·";
}

body:not(.student-mode) .device-activity-technical {
  margin-top: 8px;
  color: var(--ops-muted);
  font-size: 12px;
}

body:not(.student-mode) .device-activity-technical > summary {
  width: max-content;
  max-width: 100%;
  cursor: pointer;
  color: #516c77;
  font-weight: 700;
}

body:not(.student-mode) .device-activity-technical > div {
  margin-top: 8px;
  border-left: 3px solid var(--activity-accent);
  background: #f3f7f8;
  padding: 10px 12px;
}

body:not(.student-mode) .device-activity-technical code {
  display: block;
  color: #28424c;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

body:not(.student-mode) .device-activity-technical pre {
  max-height: 240px;
  margin: 7px 0 0;
  overflow: auto;
  color: #334c56;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  body:not(.student-mode) .device-activity-header,
  body:not(.student-mode) .device-activity-toolbar {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  body:not(.student-mode) .device-activity-toolbar label {
    min-width: 0;
  }

  body:not(.student-mode) .device-activity-toolbar button {
    align-self: flex-start;
  }

  body:not(.student-mode) .device-activity-entry-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  body:not(.student-mode) .device-activity-entry time {
    white-space: normal;
  }
}

/* Server AI question archive v32 ----------------------------------------- */
body:not(.student-mode) .ai-search-history-page {
  display: grid;
  gap: 18px;
}

body:not(.student-mode) .ai-search-history-header {
  min-height: 112px;
  border: 1px solid #c9d8de;
  background: #f8fbfc;
  padding: 22px 24px;
}

body:not(.student-mode) .ai-search-history-count {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid #8eb4bf;
  background: #e8f3f5;
  color: #0b5563;
  font-weight: 800;
  padding: 0 14px;
}

body:not(.student-mode) .ai-search-record-list {
  display: grid;
  gap: 10px;
}

body:not(.student-mode) .ai-search-record-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  border: 1px solid #d4dfe3;
  border-left: 4px solid #72909a;
  background: #ffffff;
  padding: 14px 16px 14px 12px;
}

body:not(.student-mode) .ai-search-record-row.status-completed {
  border-left-color: #13836f;
}

body:not(.student-mode) .ai-search-record-row.status-failed {
  border-left-color: #b74b55;
}

body:not(.student-mode) .ai-search-record-index {
  display: grid;
  justify-items: start;
  gap: 5px;
}

body:not(.student-mode) .ai-search-record-index span {
  color: #0b6675;
  font-size: 13px;
  font-weight: 800;
}

body:not(.student-mode) .ai-search-record-index strong {
  color: #7c929a;
  font-family: Consolas, monospace;
  font-size: 12px;
}

body:not(.student-mode) .ai-search-record-copy {
  min-width: 0;
}

body:not(.student-mode) .ai-search-record-copy header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

body:not(.student-mode) .ai-search-record-copy header strong {
  color: #183943;
  font-size: 15px;
}

body:not(.student-mode) .ai-search-record-copy time,
body:not(.student-mode) .ai-search-record-copy p {
  color: #617780;
  font-size: 13px;
}

body:not(.student-mode) .ai-search-record-copy p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.student-mode) .ai-search-record-copy .ai-search-record-error {
  color: #9d3e48;
}

body:not(.student-mode) .ai-search-record-detail {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.25fr);
  align-items: start;
  gap: 18px;
}

body:not(.student-mode) .ai-search-question-image,
body:not(.student-mode) .ai-search-answer {
  min-width: 0;
  border: 1px solid #cedde2;
  background: #ffffff;
  padding: 18px;
}

body:not(.student-mode) .ai-search-question-image > header,
body:not(.student-mode) .ai-search-answer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e1eaed;
  margin-bottom: 16px;
  padding-bottom: 12px;
}

body:not(.student-mode) .ai-search-question-image header h3,
body:not(.student-mode) .ai-search-answer header h3 {
  margin: 0;
  font-size: 16px;
}

body:not(.student-mode) .ai-search-question-image header span,
body:not(.student-mode) .ai-search-answer header span {
  color: #0b6675;
  font-size: 11px;
  font-weight: 800;
}

body:not(.student-mode) .ai-search-question-image img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: #eef3f5;
}

body:not(.student-mode) .ai-search-answer .exam-markdown {
  max-width: 76ch;
  color: #203a43;
}

@media (max-width: 900px) {
  body:not(.student-mode) .ai-search-record-detail {
    grid-template-columns: 1fr;
  }

  body:not(.student-mode) .ai-search-record-row {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  body:not(.student-mode) .ai-search-record-row > button {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  body:not(.student-mode) .ai-search-record-row {
    grid-template-columns: 1fr;
  }

  body:not(.student-mode) .ai-search-record-row > button {
    grid-column: 1;
  }

  body:not(.student-mode) .ai-search-record-copy header {
    align-items: flex-start;
    flex-direction: column;
  }

  body:not(.student-mode) .ai-search-record-copy p {
    white-space: normal;
  }
}
