:root {
  --ink: #183b56;
  --ink-deep: #102b40;
  --muted: #718496;
  --line: #e5edf2;
  --paper: #f7fafc;
  --white: #ffffff;
  --blue: #3f7fb3;
  --blue-soft: #e8f2f9;
  --teal: #4e9f9b;
  --orange: #e49a58;
  --orange-soft: #fff2e5;
  --green: #3a9a77;
  --shadow: 0 14px 38px rgba(25, 58, 82, 0.08);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
.checkin-row, .absence-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.checkin-row .secondary-button.done { background: #e4f5ef; color: var(--green); border-color: #b8ddd4; }
.absence-row input { flex: 1 1 220px; min-width: 0; border: 1px solid #dce8ed; border-radius: 8px; padding: 10px 11px; }
.attendance-history { margin-top: 14px; }
.attendance-history > .muted { font-size: 11px; margin-bottom: 7px; }
.attendance-history > input { width: 100%; border: 1px solid #dce8ed; border-radius: 8px; padding: 10px 11px; margin-top: 8px; }
.data-list { display: grid; gap: 8px; }
.data-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid #e7eff2; background: #f9fbfc; border-radius: 9px; font-size: 12px; line-height: 1.5; }
.data-row span { color: var(--muted); text-align: right; }
.daily-review-question { display: grid; gap: 7px; padding: 12px; border: 1px solid #e7eff2; background: #f9fbfc; border-radius: 9px; font-size: 12px; line-height: 1.6; }
.daily-review-question > span { color: var(--muted); font-size: 11px; }
.daily-review-question .secondary-button { justify-self: start; }
.question-type { color: var(--teal); font-size: 10px; font-weight: 700; margin-right: 4px; }
.weekly-assessment-form { margin-top: 11px; padding: 12px; background: #f9fbfc; border-radius: 9px; }
.weekly-assessment-form textarea { margin-bottom: 8px; }
.assessment-question-block { display: grid; gap: 6px; margin: 8px 0 12px; }
.assessment-question-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.assessment-question-text { min-width: 0; padding: 11px 12px; border: 1px solid #dce8ed; border-radius: 8px; background: var(--white); color: var(--ink); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.assessment-confirmed { display: block; color: var(--green); margin-top: 8px; }
.knowledge-card, .homework-card { border-bottom: 1px solid var(--line); padding: 18px 0; }
.knowledge-card:first-child, .homework-card:first-child { padding-top: 0; }
.knowledge-card:last-child, .homework-card:last-child { border-bottom: 0; padding-bottom: 0; }
.knowledge-card-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.knowledge-card h3, .homework-card h3 { margin: 4px 0 5px; }
.knowledge-card h3 small { color: var(--muted); font-size: 11px; font-weight: 400; }
.knowledge-card p, .homework-card p { color: #526b7b; font-size: 12px; line-height: 1.7; }
.knowledge-card > p { margin: 8px 0; }
.knowledge-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.knowledge-meta .secondary-button { margin-left: auto; }
.assessment-panel { margin-bottom: 16px; background: #fbfefe; }
.assessment-result { margin-top: 14px; padding: 13px 15px; white-space: pre-wrap; border-radius: 9px; background: #eaf7f4; color: #347c64; font-size: 12px; line-height: 1.7; }
.assessment-result[hidden] { display: none; }
.reteach-result { margin-top: 14px; padding: 15px; overflow-wrap: anywhere; border: 1px solid #dce8ed; border-radius: 10px; background: #fffaf4; color: #4f6471; font-size: 13px; line-height: 1.8; }
.reteach-section { display: grid; gap: 6px; padding: 11px 0; border-bottom: 1px solid #eadfce; }
.reteach-section:last-child { border-bottom: 0; padding-bottom: 0; }
.reteach-section h4, .reteach-section p { margin: 0; }
.reteach-section h4 { color: var(--ink); font-size: 13px; }
.reteach-section p { white-space: pre-wrap; overflow-wrap: anywhere; }
.transfer-check-form { display: grid; gap: 8px; margin-top: 5px; }
.transfer-check-feedback { padding: 9px 11px; border-radius: 8px; background: #eaf7f4; color: #347c64; white-space: pre-wrap; overflow-wrap: anywhere; }
.transfer-check-feedback[hidden] { display: none; }
.reteach-result[hidden] { display: none; }
.homework-list { display: grid; gap: 12px; }
.homework-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); }
.homework-card .primary-button { margin-top: 12px; }
.homework-card small { color: var(--muted); }

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, label[for="import-input"] { cursor: pointer; }
button { border: 0; }
.app-shell { min-height: 100vh; }
.topbar { height: 78px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 42px; position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--ink); color: #d9edf8; display: grid; place-items: center; font-size: 13px; letter-spacing: .08em; font-weight: 700; }
.eyebrow { color: var(--blue); font-size: 10px; letter-spacing: .16em; font-weight: 800; margin: 0 0 6px; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: 17px; margin: 0; letter-spacing: .01em; }
h1 span { color: var(--muted); font-weight: 500; }
h2 { font-size: 29px; letter-spacing: -.04em; margin-bottom: 8px; }
h3 { font-size: 18px; letter-spacing: -.02em; margin-bottom: 8px; }
h4 { font-size: 14px; margin: 0; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.7; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.save-indicator { font-size: 11px; color: var(--muted); margin-right: 8px; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); display: grid; place-items: center; font-size: 16px; transition: all .2s; }
.icon-button:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.main-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); max-width: 1500px; margin: 0 auto; }
.sidebar { min-height: calc(100vh - 78px); background: #f2f7fa; padding: 27px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.profile-card { display: flex; gap: 10px; align-items: center; padding: 8px 10px 23px; border-bottom: 1px solid #dfe9ef; margin-bottom: 20px; }
.avatar { width: 34px; height: 34px; border-radius: 11px; background: #d7e8f1; color: var(--ink); display: grid; place-items: center; font-weight: 700; }
.profile-card strong, .profile-card span { display: block; }
.profile-card strong { font-size: 13px; }
.profile-card span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { border-radius: 9px; color: #607688; background: transparent; padding: 11px 12px; text-align: left; font-size: 13px; display: flex; align-items: center; gap: 11px; transition: all .2s; }
.nav-item span { width: 17px; text-align: center; font-size: 16px; opacity: .75; }
.nav-item:hover { background: #e5f0f6; color: var(--ink); }
.nav-item.active { background: var(--ink); color: white; box-shadow: 0 5px 14px rgba(24, 59, 86, .14); }
.sidebar-note { margin-top: auto; display: flex; gap: 8px; padding: 14px 9px 3px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.sidebar-note p { margin: 0; }
.note-dot { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }
.content-area { padding: 42px clamp(24px, 5vw, 72px) 70px; position: relative; min-width: 0; }
.view { display: none; animation: fade-in .25s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; gap: 22px; }
.page-heading.compact { align-items: center; }
.date-chip { background: var(--white); border: 1px solid var(--line); padding: 10px 15px; border-radius: 11px; text-align: right; min-width: 156px; box-shadow: 0 4px 14px rgba(25, 58, 82, .04); }
.date-chip span, .date-chip strong { display: block; }
.date-chip span { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.date-chip strong { font-size: 18px; letter-spacing: .04em; }
.hero-card { min-height: 240px; border-radius: 18px; background: linear-gradient(120deg, #183b56 0%, #255773 66%, #377f8d 100%); color: white; padding: 35px 42px; display: flex; justify-content: space-between; align-items: center; overflow: hidden; position: relative; box-shadow: 0 18px 36px rgba(24, 59, 86, .18); }
.hero-copy { position: relative; z-index: 1; max-width: 520px; }
.mode-label { display: inline-flex; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.2); padding: 5px 9px; border-radius: 5px; font-size: 10px; letter-spacing: .14em; font-weight: 700; }
.hero-card h3 { color: white; font-size: 28px; margin: 17px 0 8px; letter-spacing: -.045em; }
.hero-card p { color: rgba(255,255,255,.75); font-size: 13px; line-height: 1.7; margin-bottom: 24px; }
.hero-orbit { width: 230px; height: 190px; position: relative; margin-right: 28px; opacity: .95; }
.orbit-ring { position: absolute; border: 1px solid rgba(207, 239, 241, .32); border-radius: 50%; transform: rotate(-22deg); }
.ring-one { width: 195px; height: 102px; left: 15px; top: 45px; }
.ring-two { width: 154px; height: 150px; left: 35px; top: 21px; transform: rotate(50deg); }
.orbit-core { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; position: absolute; left: 77px; top: 59px; background: rgba(218,242,243,.17); border: 1px solid rgba(220,246,244,.7); color: #e5ffff; font-weight: 700; letter-spacing: .1em; box-shadow: 0 0 35px rgba(150, 238, 227, .2); }
.primary-button, .secondary-button { border-radius: 8px; padding: 11px 17px; font-size: 13px; font-weight: 700; display: inline-flex; justify-content: center; align-items: center; gap: 9px; transition: transform .18s, box-shadow .18s, background .18s; }
.primary-button { background: var(--orange); color: #fff; box-shadow: 0 7px 14px rgba(228, 154, 88, .25); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 17px rgba(228, 154, 88, .34); }
.hero-card .primary-button { background: #f5ae6f; color: #263f4d; }
.secondary-button { background: var(--blue-soft); color: var(--ink); }
.secondary-button:hover { background: #d9eaf4; }
.full { width: 100%; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 16px 0 25px; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 17px 18px; }
.stat-card span, .stat-card small { display: block; }
.stat-card span { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.stat-card strong { font-size: 21px; letter-spacing: -.03em; }
.stat-card small { color: var(--muted); font-size: 10px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.two-column { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; }
.teacher-panel { margin-top: 16px; }
.lesson-main > .teacher-panel { margin: 16px 25px 25px; }
.teacher-panel .panel-heading { align-items: flex-start; }
.teacher-panel .panel-heading h3 { margin-bottom: 6px; }
.teacher-status { color: var(--muted); font-size: 11px; white-space: nowrap; }
.teacher-form label { margin-bottom: 7px; }
.teacher-form textarea { min-height: 86px; }
.teacher-form-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.teacher-error { min-height: 18px; color: #b4574e; font-size: 12px; line-height: 1.5; }
.teacher-reply { margin-top: 17px; padding: 15px 17px; border: 1px solid #dceee9; border-radius: 10px; background: #f0f8f7; color: #315e61; font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.teacher-reply[hidden] { display: none; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 18px; }
.panel-heading h3 { margin-bottom: 0; }
.text-button { background: none; color: var(--blue); font-size: 11px; padding: 2px 0; }
.text-button:hover { color: var(--ink); }
.stage-mini-list { display: grid; gap: 11px; }
.stage-mini { display: grid; grid-template-columns: 27px 1fr auto; gap: 11px; align-items: center; }
.stage-number { width: 27px; height: 27px; background: #edf4f7; color: var(--blue); border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.stage-mini.current .stage-number { background: var(--ink); color: white; }
.stage-mini strong { display: block; font-size: 12px; }
.stage-mini small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.stage-progress { height: 4px; width: 70px; background: #edf2f4; border-radius: 4px; overflow: hidden; }
.stage-progress i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.stage-mini.current .stage-progress i { background: var(--orange); }
.mini-icon { color: var(--orange); font-size: 20px; }
.focus-quote { display: flex; gap: 10px; padding: 5px 0 16px; }
.focus-quote span { font-size: 38px; line-height: .7; color: #bad6df; }
.focus-quote p { font-size: 15px; line-height: 1.65; margin: 0; }
.focus-meta { border-top: 1px solid var(--line); padding-top: 15px; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.focus-meta strong { color: var(--ink); font-size: 14px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 7px 11px; font-size: 11px; font-weight: 700; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.status-pill.done { background: #e4f5ef; color: var(--green); }
.status-pill.test { background: var(--orange-soft); color: #b66b28; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(270px, .6fr); gap: 16px; align-items: start; }
.lesson-main { padding: 0; overflow: hidden; }
.lesson-banner { background: #edf6f8; padding: 23px 25px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.lesson-number { width: 46px; height: 46px; background: var(--ink); border-radius: 12px; color: white; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.lesson-banner h3 { margin: 0; }
.lesson-section { padding: 22px 25px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.step-dot { width: 21px; height: 21px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 11px; display: grid; place-items: center; font-weight: 700; }
.point-list { padding-left: 30px; margin: 0; color: #486172; font-size: 13px; line-height: 1.9; }
.point-list li::marker { color: var(--teal); }
.question-list { display: grid; gap: 10px; }
.review-question { background: #f8fbfc; border: 1px solid #e9f0f3; border-radius: 9px; padding: 12px 14px; display: grid; grid-template-columns: 24px 1fr; gap: 8px; }
.review-question b { color: var(--teal); font-size: 12px; }
.review-question p { margin: 0; font-size: 13px; line-height: 1.6; }
.lesson-limit { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 0; }
.lesson-limit .section-title { margin-bottom: 3px; }
.lesson-limit > strong { background: var(--orange-soft); color: #b66b28; padding: 10px 12px; border-radius: 8px; white-space: nowrap; }
.lesson-side { display: grid; gap: 16px; }
.practice-card { background: #f0f8f7; border-color: #dceee9; box-shadow: none; }
.practice-card h3 { margin: 12px 0 8px; }
.practice-card p { font-size: 13px; line-height: 1.7; color: #496a6c; }
.practice-tag { display: inline-block; border: 1px solid #b8ddd4; color: var(--green); border-radius: 99px; padding: 5px 9px; font-size: 10px; }
.completion-card h3 { margin: 12px 0 7px; }
.completion-card p { color: var(--muted); font-size: 12px; line-height: 1.7; margin-bottom: 16px; }
.completion-card .secondary-button { margin-top: 9px; }
.roadmap-panel { padding: 9px 26px; }
.roadmap-list { display: grid; }
.roadmap-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.roadmap-item:last-child { border-bottom: 0; }
.roadmap-index { font-size: 24px; color: #c3d5de; font-weight: 700; }
.roadmap-item.current .roadmap-index { color: var(--orange); }
.roadmap-item h3 { font-size: 15px; margin: 0 0 5px; }
.roadmap-item p { margin: 0; color: var(--muted); font-size: 12px; }
.roadmap-status { font-size: 11px; padding: 6px 10px; border-radius: 99px; background: #f1f4f5; color: var(--muted); white-space: nowrap; }
.roadmap-item.current .roadmap-status { background: var(--orange-soft); color: #b66b28; }
.roadmap-item.complete .roadmap-status { background: #e4f5ef; color: var(--green); }
.principle-panel { margin-top: 16px; display: flex; gap: 15px; background: #f6f8fb; box-shadow: none; }
.principle-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 22px; flex: 0 0 auto; }
.principle-panel h3 { margin: 0 0 5px; font-size: 14px; }
.principle-panel p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.knowledge-summary { display: flex; gap: 7px; }
.summary-chip { font-size: 11px; border-radius: 7px; padding: 7px 9px; background: #f2f5f6; color: var(--muted); }
.summary-chip.known { background: #e4f5ef; color: var(--green); }
.summary-chip.review { background: var(--orange-soft); color: #b66b28; }
.knowledge-list { display: grid; }
.knowledge-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); align-items: center; }
.knowledge-row:last-child { border-bottom: 0; }
.knowledge-row h4 { margin-bottom: 6px; }
.knowledge-row p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; max-width: 720px; }
.status-select { border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; color: var(--ink); background: white; font-size: 11px; }
.status-select:focus, input:focus, textarea:focus, select:focus { outline: 2px solid #b4d8e7; outline-offset: 1px; }
.log-form-panel { margin-bottom: 17px; background: #fcfefe; }
.log-form-panel[hidden] { display: none; }
form label { display: block; font-size: 12px; color: #526b7b; margin-bottom: 13px; }
input[type="date"], textarea, form select { width: 100%; border: 1px solid #dce8ed; background: white; border-radius: 8px; padding: 10px 11px; color: var(--ink); margin-top: 7px; }
textarea { resize: vertical; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkbox-label { display: flex; gap: 8px; align-items: center; }
.checkbox-label input { accent-color: var(--teal); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 3px; }
.close-button { background: none; font-size: 22px; color: var(--muted); }
.logs-list { display: grid; gap: 11px; }
.empty-state { text-align: center; padding: 46px 20px; background: var(--white); border: 1px dashed #d9e5ea; border-radius: 13px; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; }
.log-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.log-card-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.log-card-date { font-size: 12px; font-weight: 700; }
.mood-pill { color: var(--teal); background: #eaf7f4; border-radius: 99px; padding: 5px 8px; font-size: 10px; }
.log-card-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.log-field strong { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.log-field p { margin: 0; font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.weekly-panel { padding: 0; overflow: hidden; }
.weekly-header { display: flex; align-items: center; gap: 16px; background: #fff7ed; padding: 25px; border-bottom: 1px solid #f5e6d4; }
.weekly-badge { width: 54px; height: 54px; border-radius: 12px; background: var(--orange); color: white; display: grid; place-items: center; text-align: center; font-size: 11px; line-height: 1.2; font-weight: 800; letter-spacing: .06em; }
.weekly-header h3 { margin-bottom: 5px; }
.weekly-header p { color: #93775d; font-size: 12px; margin: 0; }
.weekly-questions { padding: 22px 25px 8px; display: grid; gap: 18px; }
.quiz-question { border-bottom: 1px solid var(--line); padding-bottom: 17px; }
.quiz-question:last-child { border-bottom: 0; }
.quiz-question > p { font-size: 13px; line-height: 1.65; margin-bottom: 10px; }
.quiz-question > p { overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.quiz-question label { display: flex; align-items: flex-start; gap: 8px; color: #526b7b; font-size: 12px; line-height: 1.5; margin: 6px 0; }
.quiz-question input { accent-color: var(--teal); margin-top: 2px; }
.weekly-actions { padding: 0 25px 25px; }
.quiz-result { background: #eaf7f4; color: #347c64; padding: 12px; border-radius: 8px; font-size: 12px; line-height: 1.6; }
.toast { position: fixed; top: 92px; right: 28px; background: var(--ink-deep); color: white; padding: 11px 15px; border-radius: 8px; font-size: 12px; box-shadow: 0 9px 22px rgba(16, 43, 64, .2); opacity: 0; pointer-events: none; transform: translateY(-7px); transition: all .2s; z-index: 20; }
.toast.show { opacity: 1; transform: translateY(0); }
.app-shell[hidden], .cloud-gate[hidden] { display: none; }
.cloud-gate { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: var(--paper, #f5f8f9); }
.cloud-gate-card { width: min(100%, 520px); }
.cloud-gate-card h1 { margin: 8px 0 10px; font-size: 26px; }
.cloud-form { margin-top: 18px; display: grid; gap: 12px; }
.cloud-form input { width: 100%; border: 1px solid #dce8ed; background: white; border-radius: 8px; padding: 10px 11px; color: var(--ink); margin-top: 7px; }
.cloud-gate-card .secondary-links { margin-top: 18px; }
@media (max-width: 900px) {
  .topbar { padding: 0 20px; }
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-card, .sidebar-note { display: none; }
  .nav-list { display: flex; overflow-x: auto; gap: 5px; scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-item { min-height: 44px; white-space: nowrap; padding: 9px 11px; }
  .content-area { padding: 28px 20px 55px; }
  .hero-orbit { opacity: .55; margin-right: -15px; }
}
@media (max-width: 650px) {
  .topbar { height: 68px; padding: 0 12px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  h1 { font-size: 14px; }
  .save-indicator { display: none; }
  .page-heading { display: block; }
  .date-chip { margin-top: 16px; text-align: left; width: fit-content; }
  .hero-card { padding: 25px 23px; min-height: 278px; }
  .hero-card h3 { font-size: 24px; }
  .hero-orbit { position: absolute; right: -42px; bottom: -3px; transform: scale(.8); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 13px 12px; }
  .stat-card small { white-space: normal; line-height: 1.4; }
  .two-column, .lesson-grid { grid-template-columns: 1fr; }
  .lesson-side { grid-row: 1; }
  .log-card-body { grid-template-columns: 1fr; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .knowledge-row { grid-template-columns: 1fr; gap: 10px; }
  .knowledge-row .status-select { width: 100%; }
  .panel { padding: 18px; }
  .lesson-main > .teacher-panel { margin: 16px 18px 18px; }
  .lesson-section { padding: 18px; }
  .lesson-banner, .weekly-header { padding: 18px; }
  .weekly-questions { padding: 18px 18px 8px; }
  .weekly-actions { padding: 0 18px 18px; }
  .checkin-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkin-row .secondary-button, .absence-row .secondary-button, .teacher-form-footer .primary-button { min-height: 44px; width: 100%; }
  .absence-row { display: grid; grid-template-columns: 1fr; }
  .teacher-form-footer { align-items: stretch; flex-direction: column; }
  .knowledge-meta .secondary-button { margin-left: 0; width: 100%; min-height: 44px; }
  .primary-button, .secondary-button { min-height: 44px; }
  .roadmap-item { grid-template-columns: 35px minmax(0, 1fr); gap: 10px; }
  .roadmap-status { grid-column: 2; width: fit-content; }
}

/* v0.4 daily-teacher layout: keep the existing visual language, but reduce
   the amount of dashboard chrome around the one action for today. */
.main-layout { grid-template-columns: 184px minmax(0, 1fr); }
.hero-orbit { display: none; }
.hero-card { min-height: 218px; }
.today-glance { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 22px; align-items: center; margin-top: 16px; }
.glance-main h3 { font-size: 21px; margin-bottom: 7px; }
.glance-main .eyebrow { margin-bottom: 9px; }
.glance-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.glance-details div { border-left: 2px solid #dcecf1; padding-left: 11px; min-width: 0; }
.glance-details span, .glance-details strong { display: block; }
.glance-details span { color: var(--muted); font-size: 10px; margin-bottom: 7px; }
.glance-details strong { font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.today-next-step { display: grid; gap: 7px; margin: 18px 25px 0; padding: 16px 17px; background: #f0f8f7; border: 1px solid #dceee9; border-radius: 10px; color: #315e61; }
.today-next-step strong, .today-next-step span { display: block; }
.today-next-step span { font-size: 12px; line-height: 1.6; }
.today-next-step .primary-button { justify-self: start; margin-top: 4px; }
.daily-focus-card { margin-top: 16px; padding: 20px; border: 1px solid #dceee9; border-radius: 12px; background: #f8fcfb; }
.classroom-kicker { display: flex; justify-content: space-between; gap: 12px; color: var(--teal); font-size: 11px; margin-bottom: 12px; }
.daily-focus-card h3 { margin-bottom: 14px; }
.daily-focus-form, .classroom-actions { display: grid; gap: 10px; }
.classroom-actions { grid-template-columns: minmax(0, auto) minmax(0, auto); justify-content: start; }
.daily-focus-card .assessment-question-block { margin-bottom: 13px; }
.daily-focus-card .assessment-question-text { overflow-wrap: anywhere; white-space: normal; line-height: 1.75; }
.daily-focus-card [data-assessment-answer] { min-height: 108px; }
.daily-focus-card [data-record-assessment], .daily-focus-card [data-reteach] { margin-top: 10px; }
.optional-checkins { margin-top: 13px; color: var(--muted); font-size: 11px; }
.optional-checkins summary { cursor: pointer; padding: 5px 0; }
.optional-checkins .checkin-row { margin-top: 8px; }
.secondary-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.my-tools + .my-tools { margin-top: 16px; }
.my-tools h3 { margin-bottom: 7px; }
.my-tools .secondary-button, .my-tools label.secondary-button { min-height: 42px; }
.nav-item { justify-content: flex-start; }
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .nav-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 7px; }
  .nav-item { justify-content: center; }
}
@media (max-width: 650px) {
  .hero-card { min-height: 236px; }
  .today-glance { grid-template-columns: 1fr; gap: 18px; }
  .glance-details { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .glance-details div { padding-left: 8px; }
  .glance-details strong { font-size: 11px; }
  .today-next-step { margin: 16px 18px 0; }
  .daily-focus-card { padding: 16px; }
  .classroom-actions { grid-template-columns: 1fr; }
  .classroom-actions button { width: 100%; }
  .secondary-links { display: grid; grid-template-columns: 1fr; }
  .secondary-links .secondary-button, .secondary-links label.secondary-button { width: 100%; }
  .lesson-side { grid-row: auto; }
}

/* v0.5 guided-learning productization: quiet step flow and iPhone-safe controls. */
.simple-heading { margin-bottom: 18px; }
.next-action-hero { min-height: 238px; }
.next-action-hero .eyebrow { color: #c7e7ed; }
.compact-status { margin: 17px 0 0 !important; }
.guided-intro { margin-bottom: 14px; box-shadow: none; background: #f7fbfc; }
.guided-intro h3 { margin-bottom: 5px; }
.back-button { appearance: none; background: transparent; color: var(--blue); font-weight: 700; padding: 0; margin: 0 0 14px; min-height: 44px; font-size: 13px; text-align: left; }
.step-flow { display: grid; gap: 9px; }
.flow-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; padding: 15px 16px; background: #fbfcfd; border: 1px solid var(--line); border-radius: 12px; }
.flow-step.current { background: #f0f8f7; border-color: #b9ddd4; }
.flow-step.done { background: #f8fbfa; border-color: #dceee9; }
.flow-step-mark { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #edf3f5; color: var(--muted); font-size: 12px; font-weight: 800; }
.flow-step.current .flow-step-mark { background: var(--teal); color: white; }
.flow-step.done .flow-step-mark { background: #dff2eb; color: var(--green); }
.flow-step h3 { font-size: 15px; margin: 1px 0 4px; }
.flow-step .muted { margin-bottom: 11px; }
.practice-panel { margin-top: 14px; }
.practice-task { display: grid; gap: 10px; padding: 15px; border: 1px solid #dceee9; background: #f8fcfb; border-radius: 11px; }
.practice-task p { color: #496a6c; font-size: 13px; line-height: 1.7; margin: 0; }
.practice-task label, .homework-card label { margin: 0; }
.progress-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.progress-card { min-height: 170px; box-shadow: none; }
.progress-card h3 { font-size: 17px; }
.compact-list { display: grid; gap: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.compact-list span { padding-bottom: 7px; border-bottom: 1px solid #edf2f4; }
.compact-list span:last-child { border-bottom: 0; padding-bottom: 0; }
.roadmap-panel { margin-top: 14px; padding: 18px 22px; }
.roadmap-panel summary { cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 700; }
.roadmap-panel[open] summary { margin-bottom: 10px; }
.teacher-form-footer #teacher-retry { flex: 0 0 auto; }
.primary-button, .secondary-button, .back-button, .nav-item { touch-action: manipulation; }

@media (max-width: 650px) {
  .content-area { padding: 22px 16px calc(30px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 14px; }
  .topbar-actions { min-width: 0; max-width: 48%; }
  .save-indicator { display: inline-flex; align-items: center; min-height: 30px; margin: 0; text-align: right; font-size: 11px; line-height: 1.35; }
  .brand h1 span, .brand .eyebrow { display: none; }
  .next-action-hero, .hero-card { min-height: 210px; padding: 24px 20px; }
  .hero-card h3 { font-size: 23px; }
  .page-heading { margin-bottom: 18px; }
  .panel { padding: 17px; }
  .progress-grid { grid-template-columns: 1fr; gap: 11px; }
  .progress-card { min-height: auto; }
  .flow-step { padding: 14px; }
  .teacher-panel, .practice-panel { margin-top: 12px; }
  .teacher-form-footer .primary-button, .teacher-form-footer .secondary-button { width: 100%; }
  .classroom-actions .primary-button, .classroom-actions .secondary-button { width: 100%; }
  input, textarea, select, input[type="date"], form select, .cloud-form input { font-size: 16px; }
  .primary-button, .secondary-button, .back-button { min-height: 44px; }
  .checkin-row { grid-template-columns: 1fr; }
  .checkin-row .secondary-button { white-space: nowrap; min-width: 0; }
  .roadmap-item { grid-template-columns: 32px minmax(0, 1fr); }
  .roadmap-status { white-space: normal; }
  .toast { top: 76px; right: 14px; left: 14px; text-align: center; }
}
