:root {
  color-scheme: light;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: #18233b;
  background: #f4f6fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #18233b;
  --muted: #55647e;
  --quiet: #697790;
  --line: #e4e9f1;
  --cobalt: #3158e8;
  --cobalt-dark: #2146c6;
  --cobalt-soft: #edf2ff;
  --navy: #111c34;
  --canvas: #f4f6fa;
  --white: #fff;
  --shadow: 0 2px 4px #16213b05, 0 7px 25px #1e305408;
  --radius: 14px;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100dvh; font-size: 14px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button[disabled], input[disabled], textarea[disabled], select[disabled] { opacity: .55; }
:focus-visible { outline: 3px solid #7b9aff; outline-offset: 3px; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, strong, b { font-weight: 650; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.35; overflow-wrap: anywhere; }
h1 { font-size: 32px; letter-spacing: -.035em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p, strong, td, label { overflow-wrap: anywhere; }
.icon { flex: none; display: inline-block; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 620; letter-spacing: .015em; }
.eyebrow > span { color: #8593a9; }
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 39px; padding: 8px 13px;
  color: var(--ink); font-size: 13px; font-weight: 620; line-height: 1.35; text-align: center;
  background: #fff; border: 1px solid #dce4ef; border-radius: 8px; white-space: normal;
  transition: background-color .16s, border-color .16s, color .16s, box-shadow .16s;
}
.btn:not([disabled]):hover { background: #f4f7ff; border-color: #bfccf4; }
.btn.primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; box-shadow: 0 3px 6px #214bc125; }
.btn.primary:not([disabled]):hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); }
.btn.soft { color: var(--cobalt-dark); background: var(--cobalt-soft); border-color: #dbe4ff; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.compact { font-size: 12px; padding: 6px 10px; min-height: 34px; }
.btn.stretch { width: 100%; }
.icon-button { display: inline-grid; width: 36px; height: 36px; padding: 0; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.icon-button:not([disabled]):hover { color: var(--cobalt); background: var(--cobalt-soft); }
.icon-tile { display: inline-grid; flex: none; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #eef2ff; color: #3156d7; }
.icon-tile.gray, .badge.neutral { background: #eef2f7; color: #4e607a; }
.icon-tile.cyan, .badge.cyan { background: #e2f6fa; color: #107081; }
.icon-tile.violet, .badge.violet { background: #f0eaff; color: #6944b8; }
.icon-tile.green, .badge.green { background: #e5f7ef; color: #19764e; }
.icon-tile.amber, .badge.amber { background: #fff1dd; color: #895005; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; line-height: 1.35; border-radius: 5px; padding: 4px 7px; white-space: nowrap; }
.badge.blue { background: #eaf0ff; color: #2d51c1; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dae3fb; background: #f1f5ff; color: #3452a8; border-radius: 100px; padding: 4px 9px; font-size: 11px; font-weight: 670; white-space: nowrap; }
.demo-badge i { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #486be5; }
.panel, .phone-panel { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { min-height: 58px; padding: 15px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-head h2 { display: flex; align-items: center; gap: 9px; }
.panel-head h2 .icon { color: #566ba6; }
.panel-head .muted { font-size: 12px; white-space: nowrap; }
.panel-footer { border-top: 1px solid var(--line); padding: 16px 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.section-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px 14px; margin-bottom: 13px; }
.section-title > span { color: var(--muted); font-size: 13px; }
.form-body, .form-stack { display: grid; gap: 15px; align-content: start; }
.form-body { padding: 18px 20px; }
.field { display: grid; align-content: start; gap: 6px; font-weight: 610; min-width: 0; }
.field input, .field select, .field textarea, .select-inline select {
  width: 100%; min-width: 0; min-height: 39px; padding: 8px 11px; font-weight: 440;
  background: #fff; border: 1px solid #d7e0ed; border-radius: 8px;
}
.field input[type="date"] { appearance: none; }
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #66748b; }
.select-inline { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }
.select-inline select { appearance: none; padding-right: 28px; max-width: 100%; font-size: 12px; font-weight: 580; text-overflow: ellipsis; background: #fff linear-gradient(45deg, transparent 50%, #55647e 50%) right 14px center / 5px 5px no-repeat; }
.task-select { max-width: min(100%, 270px); }
.form-note { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 12px; }
.form-note .icon { margin-top: 2px; }
.progress { height: 6px; background: #e9edf5; border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: #4768ed; border-radius: inherit; }
.empty { display: grid; gap: 8px; justify-items: center; align-content: center; text-align: center; padding: 30px 16px; color: var(--muted); }
.empty strong { color: var(--ink); }
.empty p { font-size: 13px; }
.infobar { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid #dce6ff; background: #f0f5ff; color: #314984; font-size: 13px; border-radius: 8px; }
.infobar.warning { border-color: #f5ddbb; background: #fff8eb; color: #805018; }
.infobar.success { border-color: #cfeee2; background: #eefaf4; color: #1c6c4b; }
.infobar .icon { margin-top: 1px; }
.avatar { display: inline-grid; flex: none; place-items: center; min-width: 32px; height: 32px; border-radius: 50%; background: #e9efff; color: #3153ba; font-size: 13px; font-weight: 680; }
.avatar.soft { background: #eff1fa; color: #4d5c99; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 37px; height: 37px; border-radius: 10px; background: #3158e8; color: #fff; display: grid; flex: none; place-items: center; box-shadow: 0 4px 10px #244acf30; }
.brand strong, .brand small { display: block; letter-spacing: .035em; }
.brand strong { font-size: 17px; line-height: 1.2; }
.brand small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.top-actions, .head-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; min-width: 0; }
.segmented { display: flex; align-items: stretch; padding: 3px; gap: 3px; border-radius: 9px; background: #eef2f8; }
.segmented button { display: inline-flex; justify-content: center; align-items: center; flex: 1 1 auto; gap: 6px; min-width: 0; padding: 7px 8px; min-height: 34px; text-align: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; }
.segmented button[aria-pressed="true"] { background: #fff; color: #284db8; border-color: #e1e8f4; box-shadow: 0 1px 3px #1b36690b; }
.segmented button:hover { color: #2347ae; }

.entry { background: #f7f9fd; min-height: 100dvh; }
.entry-top { background: #fff; border-bottom: 1px solid var(--line); }
.entry-top-inner { max-width: 1250px; margin: auto; min-height: 70px; padding: 10px 32px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.entry-content { max-width: 1250px; margin: auto; padding: 29px 32px 25px; }
.entry-hero { position: relative; min-height: 360px; overflow: hidden; display: grid; grid-template-columns: 1fr .97fr; border-radius: 22px; background: radial-gradient(ellipse at 77% 38%, #2345a2 0%, #1a306c 29%, #142451 57%, #101b3a 89%); box-shadow: 0 15px 22px #122c6930; color: #fff; isolation: isolate; }
.entry-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #b5c7ff19 1px, transparent 1px), linear-gradient(#b5c7ff19 1px, transparent 1px); background-size: 31px 31px; mask-image: linear-gradient(90deg, transparent 29%, #000 68%); }
.hero-copy { position: relative; z-index: 1; padding: 39px 0 37px 46px; }
.hero-context { display: flex; gap: 10px; align-items: center; color: #cbd9ff; font-size: 13px; font-weight: 580; letter-spacing: .06em; }
.hero-context > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #81aeff; box-shadow: 0 0 12px #91baffcc; }
.hero-divider { display: inline-block; width: 1px; height: 12px; background: #bac7f7; opacity: .45; }
.hero-copy h1 { color: #fff; font-size: clamp(40px, 4.4vw, 64px); line-height: 1.15; letter-spacing: -.04em; font-weight: 700; margin: 14px 0 12px; }
.hero-copy p { color: #d6e1ff; line-height: 1.75; max-width: 380px; font-size: 15px; }
.btn.hero-button { flex-direction: row-reverse; margin-top: 21px; padding: 10px 14px; min-height: 42px; color: #193a94; background: #fff; border-color: #fff; }
.hero-art { min-width: 0; position: relative; align-self: stretch; margin-right: 44px; }
.orbit { position: absolute; width: 86%; height: 81%; left: 8%; top: 9%; border: 1px solid #8ca9ff45; border-radius: 48%; transform: rotate(-18deg); }
.orbit-two { transform: rotate(-18deg) scale(.8); border-style: dashed; opacity: .7; }
.hero-sheet { position: absolute; width: min(270px, 58%); top: 36px; right: 23%; padding: 20px 21px 18px; border: 1px solid #d9e9ff; border-radius: 14px; background: #f5f8ff; color: #183260; box-shadow: 8px 18px 38px #060c337d, 12px 10px 0 -3px #7392e84a; transform: rotate(-7deg); }
.art-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: #4a63a7; font-weight: 650; }
.art-sheet-top span { display: flex; align-items: center; gap: 5px; }
.hero-sheet > strong { display: block; margin: 12px 0 8px; font-size: clamp(16px, 2vw, 23px); letter-spacing: -.025em; }
.art-divider { height: 2px; width: 35px; border-radius: 2px; background: #4c71e0; margin: 0 0 15px; }
.art-equation { white-space: nowrap; font-family: "Georgia", serif; font-size: clamp(12px, 1.4vw, 16px); color: #28365a; }
.art-equation > span { margin-right: 8px; font-size: 12px; color: #6480af; }
.art-rule { margin: 10px 0 13px; border-bottom: 1px solid #c0cee5; }
.art-sheet-num { margin-top: 18px; color: #576d9e; font-size: 10px; }
.art-receipt, .art-chart { position: absolute; background: #fff; color: #182d59; box-shadow: 0 11px 30px #0a153d55; border: 1px solid #dce6fb; border-radius: 12px; }
.art-receipt { left: 9%; bottom: 33px; display: flex; align-items: center; gap: 9px; padding: 11px 13px; min-width: 140px; transform: rotate(-3deg); }
.art-receipt .icon-tile { width: 33px; height: 33px; }
.art-receipt strong, .art-receipt small { display: block; white-space: nowrap; }
.art-receipt small { color: #58708e; margin-top: 1px; font-size: 10px; }
.art-chart { right: 2%; bottom: 51px; width: min(134px, 28%); padding: 11px 12px; transform: rotate(7deg); }
.art-chart > div:first-child { display: flex; color: #3d58a0; font-size: 10px; font-weight: 650; gap: 5px; align-items: center; }
.art-bars { height: 48px; display: flex; align-items: flex-end; gap: 5px; margin-top: 8px; }
.art-bars > i { display: block; flex: 1; min-width: 0; border-radius: 3px 3px 1px 1px; background: #a9baf9; height: 42%; }
.art-bars > i:nth-child(2) { height: 62%; background: #8097f5; }
.art-bars > i:nth-child(3) { height: 51%; }
.art-bars > i:nth-child(4) { height: 81%; background: #5474ed; }
.art-bars > i:nth-child(5) { height: 100%; background: #3459e8; }
.role-section { margin-top: 28px; }
.role-section h2 { font-size: 22px; letter-spacing: -.03em; }
.role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.role-card { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; min-height: 165px; padding: 16px; border: 1px solid #e1e7f0; border-radius: 14px; box-shadow: var(--shadow); background: #fff; }
.role-card:hover { border-color: #a7b8f1; box-shadow: 0 7px 20px #2346a315; }
.role-card h3 { font-size: 16px; }
.role-card p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.role-enter { display: inline-flex; align-items: center; gap: 5px; color: #3051b9; font-size: 12px; font-weight: 650; }
.flow-strip { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 15px; padding: 16px 10px 0; color: #5e6c87; }
.flow-strip span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }
.flow-strip > .icon { color: #8190aa; }

.desktop-shell { --sidebar-width: 215px; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100dvh; background: linear-gradient(90deg, var(--navy) var(--sidebar-width), var(--canvas) var(--sidebar-width)); }
.sidebar { display: flex; flex-direction: column; align-items: stretch; position: sticky; top: 0; height: 100dvh; min-width: 0; padding: 18px 13px; overflow-y: auto; background: var(--navy); color: #e7edfb; }
.sidebar .brand { margin: 2px 7px 25px; }
.sidebar .brand small { color: #b9c7e1; }
.side-school { display: flex; align-items: center; gap: 9px; margin: 0 2px 14px; padding: 10px; border: 1px solid #ffffff16; border-radius: 9px; background: #25314b; color: #edf2ff; font-size: 13px; font-weight: 630; }
.side-school .icon { color: #aebfff; }
.side-school small { display: block; font-size: 11px; font-weight: 430; color: #b9c7e1; }
.sidebar nav { display: grid; gap: 3px; }
.side-label { color: #a8b6d1; padding: 6px 9px 3px; font-size: 11px; font-weight: 620; }
.side-separator { margin-top: 12px; border-top: 1px solid #ffffff13; padding-top: 14px; }
.side-link { display: flex; align-items: center; min-height: 38px; gap: 9px; padding: 7px 10px; border-radius: 8px; color: #d6e0f6; font-size: 13px; font-weight: 530; }
.side-link .icon { color: #9cb0d5; }
.side-link:hover { background: #243551; color: #fff; }
.side-link[aria-current="page"] { background: #304db1; color: #fff; font-weight: 640; }
.side-link[aria-current="page"] .icon { color: #dbe7ff; }
.sidebar-footer { padding-top: 15px; margin-top: auto; }
.desktop-main { min-width: 0; }
.desktop-top { position: sticky; top: 0; z-index: 3; min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 9px 18px; background: #fff; padding: 10px 27px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; min-width: 0; gap: 6px; color: var(--muted); white-space: nowrap; font-size: 13px; }
.breadcrumb a:hover { color: var(--cobalt); }
.breadcrumb span { color: var(--ink); font-weight: 650; }
.user-pill { display: flex; align-items: center; gap: 6px; padding-left: 5px; white-space: nowrap; font-size: 12px; }
.desk-content { max-width: 1440px; margin: 0 auto; padding: 22px 27px 32px; display: grid; gap: 17px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 11px 18px; padding: 4px 0; min-width: 0; }
.page-head h1, .teacher-welcome h1 { margin: 4px 0 6px; }
.page-head p, .teacher-welcome p { color: var(--muted); font-size: 13px; }
.page-head .head-actions { padding-bottom: 2px; }
.teacher-welcome { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 23px 23px; min-height: 145px; border: 1px solid #dae4ff; border-radius: 15px; background: radial-gradient(ellipse at 90% 0%, #dce7ff 0, transparent 53%), #eef3ff; }
.teacher-welcome .eyebrow { color: #4966a8; }
.teacher-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.metric-card { display: grid; align-content: start; gap: 9px; padding: 15px 17px; }
.metric-card:hover, .school-metric:hover { border-color: #b7c7f5; }
.metric-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 650; }
.metric-label .icon-tile { width: 35px; height: 35px; }
.metric-number { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.metric-number strong { color: var(--ink); font-size: 34px; line-height: 1.15; letter-spacing: -.04em; }
.metric-link { display: flex; align-items: center; gap: 6px; color: #3556ba; font-size: 12px; font-weight: 620; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 15px; }
.schedule-list, .leave-list { padding: 3px 19px; }
.schedule-row, .leave-row { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 0; }
.schedule-row + .schedule-row, .leave-row + .leave-row { border-top: 1px solid var(--line); }
.schedule-row time { min-width: 65px; padding: 5px 8px; background: #eef3ff; color: #2f54bd; border-radius: 7px; text-align: center; font-weight: 670; font-variant-numeric: tabular-nums; }
.schedule-row time small { display: block; font-size: 10px; font-weight: 530; }
.schedule-row p, .leave-row p, .teacher-task-title p { display: flex; align-items: center; gap: 3px; margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.leave-row > div { flex: 1; min-width: 0; }
.teacher-task { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(110px, 1fr) auto; gap: 12px 20px; align-items: center; padding: 12px 20px; }
.teacher-task + .teacher-task { border-top: 1px solid var(--line); }
.teacher-task-title { display: flex; min-width: 0; align-items: center; gap: 10px; }
.teacher-task-progress { display: grid; gap: 5px; justify-items: stretch; font-size: 12px; color: var(--muted); }
.teacher-task-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }

.assignment-grid { display: grid; grid-template-columns: minmax(270px, .78fr) minmax(0, 1.22fr); gap: 16px; align-items: start; }
.question-panel { min-height: 360px; display: flex; flex-direction: column; }
.question-panel > .empty { flex: 1; }
.question-summary { display: flex; align-items: center; gap: 6px; padding: 11px 20px 0; }
.question-summary > span:last-child { margin-left: auto; color: var(--muted); font-size: 12px; }
.question-list { list-style: none; padding: 0 20px; margin: 5px 0 8px; flex: 1; }
.question-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 9px 11px; align-items: center; padding: 12px 0; }
.question-list li + li { border-top: 1px solid var(--line); }
.q-index { display: grid; align-self: start; place-items: center; width: 28px; height: 28px; font-size: 11px; font-weight: 700; color: #3857b0; background: #edf2fd; border-radius: 7px; font-variant-numeric: tabular-nums; }
.question-list li strong { font-size: 13px; }
.question-meta { margin-top: 5px; display: flex; gap: 5px; }
.assignment-footer { justify-content: space-between; }
.assignment-footer .muted { font-size: 12px; }
.manual-bank { max-height: 335px; overflow-y: auto; scrollbar-gutter: stable; }
.bank-option { display: flex; align-items: flex-start; gap: 8px; padding: 8px 4px; font-size: 13px; cursor: pointer; }
.bank-option + .bank-option { border-top: 1px solid var(--line); }
.bank-option input { accent-color: var(--cobalt); margin-top: 4px; }
.bank-option small { display: block; color: var(--muted); font-size: 11px; }
.paper-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(245px, .7fr); align-items: start; gap: 16px; }
.paper-aside, .review-aside { display: grid; gap: 15px; align-content: start; }
.paper-preview { overflow: hidden; }
.paper-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.paper-toolbar > span, .paper-toolbar > div { display: flex; align-items: center; gap: 7px; }
.paper-toolbar .icon-button { width: 29px; height: 29px; }
.paper-viewport { display: flex; justify-content: center; padding: 17px; background: #e9edf5; }
.paper-viewport .paper-sheet { display: flex; flex-direction: column; width: min(100%, 520px); aspect-ratio: 210 / 297; padding: 6% 6% 4%; min-width: 0; background: #fff; color: #131b2a; box-shadow: 0 7px 19px #28345519; container-type: inline-size; }
.paper-viewport .paper-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4cqw; }
.paper-viewport .paper-top h2 { font-size: clamp(14px, 5.3cqw, 25px); letter-spacing: -.03em; margin: 1.5cqw 0; }
.paper-viewport .paper-course, .paper-viewport .paper-meta { font-size: clamp(8px, 2.45cqw, 12px); color: #424d61; }
.paper-viewport .paper-code { text-align: center; min-width: 0; }
.paper-viewport .paper-code small { display: block; color: #424d61; font-size: clamp(7px, 2.0cqw, 10px); white-space: nowrap; }
.paper-viewport .paper-qr { display: block; width: clamp(44px, 16cqw, 76px); height: auto; }
.paper-viewport .paper-number { border: 1px solid #b9c1cd; border-radius: 5px; padding: 2cqw; margin: 4cqw 0 2.7cqw; font-size: clamp(7px, 2.1cqw, 10px); }
.paper-viewport .paper-number strong { margin-right: 2cqw; }
.paper-viewport .bubble-grid { display: grid; gap: 1.3cqw; margin-top: 1.7cqw; }
.paper-viewport .bubble-row { display: grid; grid-template-columns: 12cqw repeat(10, 3.4cqw); gap: 1.35cqw; align-items: center; }
.paper-viewport .paper-bubble { display: grid; place-items: center; width: 3.4cqw; height: 3.4cqw; border: 1px solid #727c8d; border-radius: 50%; font-size: clamp(6px, 1.7cqw, 9px); line-height: 1; }
.paper-viewport .paper-questions { display: grid; align-content: start; gap: 2.8cqw; flex: 1; margin: 0; padding-inline-start: 5cqw; font-size: clamp(9px, 3.1cqw, 14px); }
.paper-viewport .paper-questions li { padding-left: 1cqw; }
.paper-viewport .answer-lines { min-height: 15cqw; margin-top: 1cqw; background: repeating-linear-gradient(#fff 0 4.9cqw,#dbe1ec 4.9cqw 5.1cqw); }
.paper-viewport .paper-footer { display: flex; justify-content: space-between; padding-top: 2.4cqw; margin-top: 3cqw; border-top: 1px solid #b9c1cd; color: #526077; font-size: clamp(7px, 2cqw, 10px); }
.paper-info p { font-size: 13px; color: var(--muted); }
.paper-info dl { display: grid; gap: 8px; margin: 0; }
.paper-info dl div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 0 0 7px; font-size: 13px; }
.paper-info dt { color: var(--muted); }
.paper-info dd { font-weight: 650; }

.review-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 15px 7px; }
.review-kpis > div { display: grid; gap: 4px; padding: 1px 15px; min-width: 0; }
.review-kpis > div + div { border-left: 1px solid var(--line); }
.review-kpis span, .mini-metric span { font-size: 12px; color: var(--muted); font-weight: 590; }
.review-kpis strong, .mini-metric strong { font-size: 27px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.review-kpis small, .mini-metric small { color: var(--muted); font-size: 13px; font-weight: 520; }
.review-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, .8fr); gap: 16px; align-items: start; }
.review-inner { padding: 14px 20px 19px; display: grid; gap: 12px; }
.question-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.question-tabs button { min-height: 35px; min-width: 57px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 12px; color: var(--muted); }
.question-tabs button[aria-pressed="true"] { color: #2b51c0; background: #eef3ff; border-color: #acbff7; font-weight: 670; }
.review-question { display: grid; gap: 4px; padding: 7px 0; }
.review-question span { color: var(--muted); font-size: 12px; }
.answer-group { padding: 13px; border: 1px solid #dce4f1; border-radius: 10px; background: #f9fbff; }
.answer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.answer-heading p { margin-top: 2px; color: var(--muted); font-size: 12px; }
.math-sample { margin: 9px 0; padding: 11px 12px; border-left: 3px solid #7996f8; border-radius: 3px 8px 8px 3px; background: #edf3ff; color: #263b73; font-family: "Georgia", "PingFang SC", serif; font-size: 17px; overflow-wrap: anywhere; }
.group-tip { color: var(--muted); font-size: 13px; margin: 0 0 9px; }
.mini-metric { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.cause-row { display: grid; gap: 6px; }
.cause-row > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
.cause-row strong { color: #2a50c1; font-variant-numeric: tabular-nums; }
.review-next p { font-size: 13px; color: var(--muted); }
.individual-list { display: grid; gap: 7px; }
.individual-list > div { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.individual-list small { color: var(--muted); font-size: 11px; font-weight: 500; }
.lecture-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(245px, .85fr); gap: 16px; align-items: start; }
.lecture-body { display: grid; gap: 14px; padding: 18px 20px 20px; }
.lecture-head { padding: 13px 15px; background: #eef3ff; border: 1px solid #dce6fc; border-radius: 9px; }
.lecture-head > span, .lecture-head > p { color: #3f598e; font-size: 12px; }
.lecture-head h2 { font-size: 21px; margin: 4px 0 2px; }
.lecture-segment h3 { margin: 0 0 7px; }
.lecture-segment .section-title { margin-bottom: 5px; }
.lecture-segment .section-title h3 { margin: 0; }
.lecture-cause { display: grid; grid-template-columns: minmax(50px, auto) minmax(0, 1fr) auto; gap: 9px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.lecture-cause span { color: var(--muted); }
.lecture-cause span:last-child { color: #284db5; font-variant-numeric: tabular-nums; font-weight: 660; }
.lecture-empty { display: grid; justify-items: center; padding-bottom: 20px; }
.lecture-empty .empty { padding: 39px 16px 16px; }
.lecture-document .math-sample { margin-bottom: 0; }
.coverage-chip { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border: 1px solid #d9e4fb; border-radius: 7px; background: #eef3ff; color: #3754a3; font-size: 12px; font-weight: 650; }
.school-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.school-metric { display: grid; align-content: start; gap: 10px; text-align: left; padding: 13px; }
.school-metric .metric-label .icon-tile { width: 31px; height: 31px; border-radius: 8px; }
.school-metric .metric-label .icon-tile .icon { width: 17px; height: 17px; }
.school-metric .metric-label > .icon:last-child { color: #7587af; margin-left: auto; }
.metric-meta { font-size: 11px; color: var(--muted); }
.metric-meta span { margin: 0 1px; }
.school-progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.school-progress strong { color: #3156ca; }
.school-progress .progress { width: 70px; }
.report-table { width: 100%; border-collapse: collapse; border-spacing: 0; text-align: left; font-size: 13px; }
.report-table thead { color: #53617c; background: #f6f8fc; }
.report-table th, .report-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.report-table th:first-child, .report-table td:first-child { padding-left: 20px; }
.report-table tbody th { font-weight: 650; }
.report-table td { font-variant-numeric: tabular-nums; }
.report-table tr:last-child :is(th, td) { border-bottom: 0; }
.report-table .uncovered-cell { color: var(--muted); background: #f8fafc; font-size: 12px; }

.mobile-stage { min-height: 100dvh; padding: 21px 11px; display: grid; align-items: start; justify-items: center; background: radial-gradient(ellipse at center top, #e5edff 0, #eff3fb 41%, #f4f6fa 85%); }
.phone-shell { width: min(100%, 390px); min-height: min(800px, calc(100dvh - 42px)); display: flex; flex-direction: column; min-width: 0; border: 1px solid #dbe4f5; border-radius: 23px; background: #f5f7fc; box-shadow: 0 15px 40px #253c711f; }
.phone-header { background: #fff; border-bottom: 1px solid var(--line); border-radius: 22px 22px 0 0; }
.phone-top { min-height: 54px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 13px; }
.phone-top strong { font-size: 14px; }
.phone-back { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 8px; color: #3658b8; background: #edf2ff; }
.phone-top .demo-badge { padding: 4px 7px; }
.phone-identity { padding: 0 13px 9px 14px; }
.role-switch { width: 132px; margin-left: auto; }
.role-switch button { min-height: 26px; font-size: 11px; padding: 3px 6px; }
.phone-content { flex: 1; display: grid; gap: 12px; align-content: start; min-width: 0; padding: 13px 13px 16px; }
.phone-heading { padding: 3px 0 1px; }
.phone-heading h1, .home-phone-hero h1 { font-size: 27px; line-height: 1.2; margin: 2px 0 5px; letter-spacing: -.04em; }
.phone-heading p, .home-phone-hero p { color: var(--muted); font-size: 12px; }
.phone-nav { margin-top: auto; position: sticky; z-index: 2; bottom: 0; display: flex; background: #fff; border-top: 1px solid var(--line); border-radius: 0 0 22px 22px; padding: 4px 4px max(5px, env(safe-area-inset-bottom)); }
.phone-nav a { flex: 1 1 0; display: grid; place-items: center; align-content: center; gap: 2px; min-height: 46px; color: #566680; font-size: 11px; font-weight: 570; border-radius: 8px; }
.phone-nav a[aria-current="page"] { color: #2b51c9; font-weight: 690; }
.phone-nav a[aria-current="page"] .icon { background: #edf2ff; box-shadow: 0 0 0 4px #edf2ff; border-radius: 5px; margin: 2px 0; }
.capture-task { padding: 11px 12px 12px; }
.capture-selects { display: grid; grid-template-columns: 1fr 1.34fr; gap: 6px; }
.capture-selects .select-inline select { min-height: 34px; padding-block: 5px; }
.capture-progress { display: grid; grid-template-columns: 1fr .7fr; gap: 10px; margin: 9px 0; }
.capture-progress > div { display: grid; align-content: center; gap: 1px; }
.capture-progress > div + div { border-left: 1px solid var(--line); padding-left: 12px; }
.capture-progress span, .capture-progress small { color: var(--muted); font-size: 12px; font-weight: 530; }
.capture-progress strong { font-size: 25px; line-height: 1.14; font-variant-numeric: tabular-nums; }
.scanner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; align-items: center; padding: 13px; min-height: 100px; border-radius: 12px; color: #fff; background: radial-gradient(ellipse at 100% 0%, #284d9d, #1c367b 50%, #182956 100%); }
.scanner p { color: #dae5ff; font-size: 11px; margin-top: 3px; }
.scanner-icon { display: grid; place-items: center; height: 42px; width: 42px; background: #dde7ff25; border: 1px solid #a7b9e768; border-radius: 8px; color: #d9e6ff; }
.btn.scanner-button { grid-column: 1 / -1; color: #2348a7; background: #fff; border-color: #e4edff; min-height: 36px; }
.scanner-compact { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 66px; padding: 10px; }
.scanner-compact .scanner-button { grid-column: auto; min-height: 33px; padding: 5px 7px; font-size: 11px; }
.scanner-compact .scanner-icon { width: 34px; height: 34px; }
.scanner-compact .scanner-icon .icon { width: 22px; height: 22px; }
.capture-results { display: grid; gap: 9px; }
.capture-results .section-title, .home-feedback .section-title { margin: 2px 0 0; }
.capture-tabs button { font-size: 12px; }
.capture-list, .family-tasks { display: grid; gap: 8px; }
.capture-row { padding: 9px 10px 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.capture-exception { border-color: #ecdfca; }
.capture-row-top { display: flex; align-items: center; gap: 8px; }
.capture-row-top > div { flex: 1; min-width: 0; }
.capture-row-top strong { font-size: 13px; }
.capture-row-top .icon-tile { width: 33px; height: 33px; border-radius: 7px; }
.capture-row-top .icon-tile .icon { width: 17px; height: 17px; }
.capture-row-top p { font-size: 10px; color: var(--muted); }
.capture-details { display: flex; justify-content: flex-start; gap: 7px 14px; flex-wrap: wrap; font-size: 11px; margin: 6px 0; }
.capture-details > div { display: flex; gap: 5px; align-items: baseline; min-width: 0; }
.capture-details dt { color: var(--muted); }
.capture-details dd { font-weight: 620; }
.capture-receipt { display: flex; align-items: center; gap: 5px; color: #197752; font-size: 11px; }
.capture-receipt.muted { color: var(--muted); }
.receipt-details { padding: 8px 10px; font-size: 12px; }
.receipt-details summary { cursor: pointer; }
.receipt-details strong { float: right; color: #2151bb; }
.receipt-details > div { display: flex; justify-content: space-between; padding: 4px 0; border-top: 1px solid var(--line); }
.receipt-details small { color: var(--muted); }
.home-phone-hero { display: flex; align-items: center; gap: 10px; border: 1px solid #dce6ff; border-radius: 13px; padding: 13px 11px; background: radial-gradient(ellipse at 95% 0%, #dce8ff 0, #eef4ff 69%); }
.home-phone-hero .eyebrow { font-size: 11px; color: #4966a0; }
.phone-avatar { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: #3f64e6; font-weight: 670; box-shadow: 0 4px 9px #244dc43c; }
.family-filters button { font-size: 11px; padding: 5px 1px; min-height: 33px; white-space: nowrap; }
.family-task { padding: 12px; }
.family-task-top { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); font-weight: 620; }
.family-task-top .badge { margin-left: auto; }
.family-task-top .icon-tile { width: 32px; height: 32px; border-radius: 8px; }
.family-task-top .icon-tile .icon { width: 17px; height: 17px; }
.family-task h2, .notice-card h2 { margin: 9px 0 5px; font-size: 16px; }
.family-task p { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.family-task-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.family-task-actions .primary { flex: 1; }
.family-receipt { display: flex; align-items: center; gap: 5px; color: #1b7754; background: #eff9f3; border-radius: 6px; padding: 5px 7px; margin-top: 7px; font-size: 11px; }
.home-tips { display: flex; align-items: flex-start; gap: 8px; border: 1px solid #d9eaf3; border-radius: 12px; padding: 11px; color: #355475; background: #f3fbff; }
.home-tips h2 { font-size: 13px; }
.home-tips p { font-size: 11px; margin-top: 3px; }
.home-tips .icon-tile { width: 31px; height: 31px; }
.scores-panel { padding: 11px 12px 4px; }
.phone-panel-title { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.phone-panel-title h2 { font-size: 15px; }
.phone-panel-title > span { font-size: 11px; color: var(--muted); }
.score-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 10px 0; }
.score-row + .score-row { border-top: 1px solid var(--line); }
.score-row .icon-tile { width: 32px; height: 32px; border-radius: 7px; }
.score-row .icon-tile .icon { width: 17px; height: 17px; }
.score-row p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.score-row > b { font-size: 19px; color: #264cbb; white-space: nowrap; }
.score-row b small, .feedback-score small { font-size: 10px; color: var(--muted); }
.home-feedback { display: grid; align-content: start; gap: 8px; }
.feedback-card, .leave-ticket, .notice-card, .leave-form { padding: 11px 12px; }
.feedback-top { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin-bottom: 6px; }
.feedback-top .eyebrow { font-size: 10px; }
.feedback-top h3 { font-size: 14px; margin-top: 2px; }
.feedback-score { font-size: 21px; font-weight: 680; color: #264cbb; white-space: nowrap; }
.feedback-card ul { padding-inline-start: 15px; color: var(--muted); font-size: 12px; margin: 7px 0; }
.feedback-card li + li { margin-top: 4px; }
.notice-card p { font-size: 13px; margin: 0 0 9px; }
.leave-form, .leave-ticket { display: grid; gap: 10px; }
.leave-ticket { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.leave-ticket p { color: var(--muted); font-size: 12px; margin: 3px 0; }
.leave-ticket small { color: var(--muted); font-size: 11px; }

dialog { max-width: min(600px, calc(100% - 25px)); width: 100%; max-height: min(86dvh, 750px); margin: auto; padding: 0; border: 1px solid #dce4f1; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 22px 80px #111e3f55; }
dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
dialog::backdrop { background: #14204069; }
.dialog-head, .dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 12px 17px; }
.dialog-head { border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 18px; }
.dialog-footer { justify-content: flex-end; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dialog-body { display: grid; gap: 10px; align-content: start; padding: 14px 17px; overflow-y: auto; min-width: 0; }
.dialog-intro { color: var(--muted); font-size: 13px; }
.dialog-form { display: grid; gap: 9px; }
.roster-preview { border: 1px solid var(--line); border-radius: 8px; }
.roster-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 9px; }
.roster-row > div { display: flex; flex-wrap: wrap; gap: 3px 7px; align-items: center; }
.roster-row + .roster-row { border-top: 1px solid var(--line); }
.roster-row small, .source-class small { color: var(--muted); font-size: 11px; }
.roster-row .btn { flex-shrink: 0; }
.clear-group { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.clear-group summary { cursor: pointer; font-size: 13px; }
.clear-group summary span { float: right; color: var(--muted); }
.clear-group > div { font-size: 12px; color: var(--muted); padding-top: 5px; }
.capture-readout { display: grid; gap: 6px; border-radius: 8px; padding: 9px; background: #f2f5fb; }
.capture-readout > div { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.capture-readout span { color: var(--muted); }
.source-overview { display: grid; gap: 4px; background: #eff4ff; border-radius: 9px; padding: 10px 12px; color: #344b7a; }
.source-overview small { font-size: 11px; }
.source-class { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.source-class > div, .source-class p { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.source-class p { padding-top: 6px; font-size: 13px; }
.source-class p strong { white-space: nowrap; }
#toast { display: none; position: fixed; z-index: 8; bottom: 65px; left: 50%; width: max-content; max-width: calc(100% - 28px); transform: translateX(-50%); padding: 9px 15px; border-radius: 8px; background: #17284d; box-shadow: 0 8px 20px #182b5834; color: white; font-size: 13px; text-align: center; pointer-events: none; }
#toast.visible { display: block; }
#print-output { display: none; }
@media print {
  body > :not(#print-output) { display: none !important; }
  #print-output { display: block; }
}

@media (max-width: 1140px) {
  .desktop-shell { --sidebar-width: 180px; }
  .desktop-top, .desk-content { padding-left: 19px; padding-right: 19px; }
  .school-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-label { font-size: 13px; }
  .teacher-task { gap: 10px; }
  .report-table th, .report-table td { padding-inline: 10px; }
}
@media (max-width: 900px) {
  .entry-top-inner, .entry-content { padding-inline: 22px; }
  .entry-hero { min-height: 325px; grid-template-columns: 1fr .95fr; }
  .hero-copy { padding: 32px 0 28px 30px; }
  .hero-art { margin-right: 24px; }
  .hero-sheet { right: 19%; width: 65%; padding: 15px; }
  .art-chart { right: 0; bottom: 42px; }
  .art-receipt { left: 3%; bottom: 29px; min-width: auto; }
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-card { min-height: auto; }
  .assignment-grid, .review-layout, .paper-layout, .lecture-layout { grid-template-columns: 1fr; }
  .paper-aside, .review-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-task { grid-template-columns: minmax(0, 1fr) auto; }
  .teacher-task-progress { grid-column: 1; grid-row: 2; }
  .teacher-task-buttons { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 680px) {
  .entry-top-inner { min-height: 59px; }
  .entry-top-inner, .entry-content { padding-inline: 13px; }
  .entry-content { padding-top: 14px; }
  .entry-hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 21px 19px 13px; }
  .hero-copy h1 { font-size: clamp(34px, 9vw, 43px); line-height: 1.13; }
  .hero-break { display: none; }
  .hero-copy p { font-size: 13px; }
  .hero-context { font-size: 11px; }
  .btn.hero-button { margin-top: 13px; }
  .hero-art { height: 177px; width: min(100%, 400px); margin: 0 auto 2px; }
  .hero-sheet { top: 10px; right: 24%; width: 49%; padding: 11px 13px; }
  .hero-sheet > strong { margin: 4px 0 3px; }
  .art-divider { margin-bottom: 6px; }
  .art-rule { margin: 5px 0 7px; }
  .art-sheet-num { margin-top: 6px; }
  .art-chart { right: 4%; width: 25%; bottom: 20px; padding: 7px 8px; }
  .art-bars { height: 29px; }
  .art-receipt { bottom: 15px; left: 10%; padding: 6px 8px; font-size: 11px; }
  .art-receipt .icon-tile { width: 26px; height: 26px; }
  .art-receipt .icon { width: 16px; height: 16px; }
  .role-grid { gap: 8px; }
  .role-card { padding: 11px; gap: 8px; }
  .role-section { margin-top: 18px; }
  .role-section h2 { font-size: 18px; }
  .role-section .section-title > span { font-size: 11px; }
  .flow-strip { gap: 5px 8px; }
  .flow-strip span { font-size: 11px; }
  .desktop-shell { grid-template-columns: minmax(0, 1fr); background: var(--canvas); }
  .sidebar { position: static; height: auto; padding: 8px 12px; overflow: visible; }
  .sidebar .brand { margin: 0 0 7px; }
  .sidebar .brand-mark { width: 29px; height: 29px; border-radius: 7px; }
  .sidebar .brand-mark .icon { width: 20px; height: 20px; }
  .sidebar .brand strong { font-size: 14px; }
  .sidebar .brand small { display: none; }
  .side-school, .side-label, .sidebar-footer { display: none; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 3px; }
  .side-link { font-size: 11px; padding: 4px 6px; min-height: 28px; gap: 4px; }
  .side-link .icon { width: 14px; height: 14px; }
  .desktop-top { position: static; flex-wrap: wrap; min-height: 42px; gap: 5px; padding: 7px 12px; }
  .top-actions { gap: 5px; }
  .desktop-top .select-inline select { min-height: 29px; padding-block: 3px; }
  .desktop-top .user-pill { display: none; }
  .desk-content { gap: 10px; padding: 12px 12px 20px; }
  h1 { font-size: 25px; }
  .page-head { gap: 8px; }
  .page-head .head-actions { justify-content: flex-start; }
  .teacher-welcome { min-height: 105px; padding: 13px; }
  .teacher-metrics { gap: 7px; }
  .metric-card { padding: 7px; gap: 5px; }
  .metric-card .metric-label { font-size: 11px; gap: 3px; }
  .metric-card .icon-tile { width: 25px; height: 25px; border-radius: 6px; }
  .metric-card .icon-tile .icon { width: 14px; height: 14px; }
  .metric-number strong { font-size: 26px; }
  .metric-link { font-size: 10px; gap: 2px; }
  .metric-link .icon { width: 12px; height: 12px; }
  .home-grid, .paper-aside, .review-aside { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .panel-head { padding: 9px 11px; min-height: 44px; }
  .panel-head.spaced { flex-wrap: wrap; }
  .panel-head h2 { font-size: 15px; gap: 6px; }
  .form-body, .panel-footer, .review-inner, .lecture-body { padding: 11px; }
  .schedule-list, .leave-list { padding-inline: 11px; }
  .teacher-task { grid-template-columns: minmax(0, 1fr); padding: 9px 11px; }
  .teacher-task-buttons { grid-column: auto; grid-row: auto; }
  .question-list { padding-inline: 11px; }
  .question-summary { padding-inline: 11px; }
  .question-list li { grid-template-columns: 25px minmax(0, 1fr) auto; gap: 7px; }
  .question-list .btn { padding-inline: 5px; }
  .question-list .btn .icon { display: none; }
  .paper-viewport { padding: 10px; }
  .review-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 7px 0; row-gap: 9px; }
  .review-kpis > div { padding-inline: 7px; }
  .review-kpis > div:nth-child(4) { border-left: 0; }
  .review-kpis span { font-size: 10px; }
  .review-kpis strong { font-size: 22px; }
  .school-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .school-metric { padding: 7px; gap: 5px; }
  .school-metric .metric-label { gap: 5px; font-size: 11px; }
  .school-metric .metric-label .icon-tile { width: 24px; height: 24px; }
  .school-metric .metric-label .icon-tile .icon { width: 14px; height: 14px; }
  .school-progress .progress { width: 50px; }
  .report-table, .report-table tbody { display: block; }
  .report-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .report-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px 11px; gap: 5px 8px; }
  .report-table tbody tr + tr { border-top: 1px solid var(--line); }
  .report-table tbody :is(th, td) { border: 0; padding: 0; }
  .report-table tbody th { grid-column: 1 / -1; }
  .report-table tbody td { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; font-size: 12px; }
  .report-table tbody td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .report-table .uncovered-cell { grid-column: 1 / -1; }
}
@media (max-width: 435px) {
  .mobile-stage { padding: 0; }
  .phone-shell { width: 100%; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .phone-header, .phone-nav { border-radius: 0; }
  .entry-top-inner .btn { min-height: 34px; padding: 5px; font-size: 11px; }
  .entry-top-inner .btn .icon { width: 14px; height: 14px; }
  .entry-top-inner .demo-badge { padding: 3px 5px; gap: 3px; font-size: 10px; }
  .entry-top-inner .brand { gap: 5px; }
  .entry-top-inner .brand-mark { width: 30px; height: 30px; border-radius: 7px; }
  .entry-top-inner .brand-mark .icon { width: 20px; height: 20px; }
  .entry-top-inner .brand strong { font-size: 14px; }
  .entry-top-inner .brand small { font-size: 9px; }
  .sidebar nav { gap: 2px 4px; }
  .btn, .icon-button, .segmented button { min-height: 36px; }
  .btn.compact, .role-switch button { min-height: 33px; }
  .scanner-compact .btn .icon { display: none; }
  .scanner-compact .scanner-button { max-width: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* ── AI 工作台三栏结构 ─────────────────────────────── */
.workbench-shell { --wb-left: 232px; --wb-right: 348px; display: grid; grid-template-columns: var(--wb-left) minmax(0,1fr) var(--wb-right); min-height: 100dvh; background: var(--canvas); position: relative; }
.wb-left { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fff; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.wb-left-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.wb-left-head .brand { font-size: 13px; }
.wb-left-head .brand strong { font-size: 15px; }
.wb-threads { flex: 1; overflow-y: auto; padding: 7px 9px 11px; display: grid; align-content: start; gap: 3px; }
.wb-threads-title { padding: 8px 7px 4px; font-size: 11px; font-weight: 650; color: var(--muted); letter-spacing: .05em; display: flex; justify-content: space-between; align-items: center; }
.thread-item { display: flex; flex-direction: column; gap: 4px; padding: 9px 10px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.thread-item:hover { background: #f5f7fc; }
.thread-item.active { background: #eef3ff; border-color: #c5d6ff; }
.thread-item-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.thread-item-top strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.thread-meta { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.wb-left-foot { padding: 10px 9px; border-top: 1px solid var(--line); display: grid; gap: 5px; }
.wb-class-row { display: flex; align-items: center; gap: 7px; padding: 5px 7px 7px; }
.wb-class-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.wb-ai-ready { display: flex; align-items: center; gap: 7px; margin: 7px 9px 0; padding: 8px 10px; background: linear-gradient(90deg, #edf3ff, #f4f0ff); border: 1px solid #c5d3f9; border-radius: 9px; cursor: pointer; transition: background .15s; }
.wb-ai-ready:hover { background: linear-gradient(90deg, #e4ecff, #ece4ff); }
.wb-ai-ready .icon { color: #5468e0; }
.wb-ai-ready strong { font-size: 12px; color: #2e45b0; flex: 1; min-width: 0; }
.wb-ai-ready span { font-size: 11px; color: #5a70c0; white-space: nowrap; }

.wb-center { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 100dvh; }
.wb-center-head { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px; display: flex; align-items: center; gap: 9px; justify-content: space-between; min-height: 59px; }
.wb-center-head > div:first-child { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.wb-compose { padding: 15px 18px 11px; border-bottom: 1px solid var(--line); background: #fff; }
.wb-compose-box { display: grid; gap: 9px; background: #f8faff; border: 1.5px solid #c8d5f9; border-radius: 11px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
.wb-compose-box:focus-within { border-color: #5a7af4; box-shadow: 0 0 0 3px #3458e81a; }
.wb-compose-box textarea { width: 100%; background: transparent; border: 0; outline: none; resize: none; font-size: 14px; font-weight: 500; min-height: 46px; color: var(--ink); padding: 0; line-height: 1.6; }
.wb-compose-box textarea::placeholder { color: #8fa0c4; }
.wb-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wb-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 18px 10px; background: #fff; border-bottom: 1px solid var(--line); }
.wb-suggestion { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid #d5e1fa; border-radius: 20px; background: #f3f7ff; color: #3252aa; font-size: 11px; font-weight: 630; cursor: pointer; transition: background .12s, border-color .12s; white-space: nowrap; }
.wb-suggestion:hover { background: #e8efff; border-color: #adbff5; }
.wb-suggestion .icon { color: #6b87dd; }
.wb-process { flex: 1; overflow-y: auto; padding: 16px 18px 24px; display: grid; align-content: start; gap: 13px; }
.process-morning { display: grid; gap: 10px; padding: 14px; background: linear-gradient(135deg, #f4f8ff, #f8f5ff); border: 1px solid #d8e4ff; border-radius: 12px; }
.process-morning-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 680; color: #2b48b0; }
.process-morning-items { display: grid; gap: 7px; }
.morning-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; background: #fff; border: 1px solid #dde8ff; border-radius: 8px; cursor: pointer; transition: background .12s; }
.morning-item:hover { background: #f3f7ff; }
.morning-item .icon-tile { width: 30px; height: 30px; border-radius: 7px; flex: none; }
.morning-item .icon-tile .icon { width: 15px; height: 15px; }
.morning-item > div { flex: 1; min-width: 0; }
.morning-item strong { font-size: 12px; display: block; }
.morning-item span { font-size: 11px; color: var(--muted); display: block; margin-top: 1px; }
.morning-item .badge { flex: none; }
.process-task { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.process-understanding { padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f8faff; display: flex; align-items: flex-start; gap: 8px; }
.process-understanding .icon { color: #5468e0; flex: none; margin-top: 2px; }
.process-understanding p { font-size: 13px; color: #2a40a0; line-height: 1.6; margin: 0; }
.process-materials { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 5px; }
.process-materials-title { font-size: 11px; font-weight: 650; color: var(--muted); letter-spacing: .04em; }
.process-materials-list { display: flex; flex-wrap: wrap; gap: 5px; }
.material-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: #f0f4ff; border: 1px solid #d0dbff; border-radius: 5px; font-size: 11px; color: #3550a0; }
.process-steps { padding: 10px 14px 12px; display: grid; gap: 7px; }
.process-steps-title { font-size: 11px; font-weight: 650; color: var(--muted); letter-spacing: .04em; }
.process-step { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }
.process-step.step-done { background: #f4fbf6; border-color: #c2e8d0; }
.process-step.step-fail { background: #fff8f5; border-color: #f5cec1; }
.process-step.step-running { background: #f3f7ff; border-color: #c9d8ff; }
.process-step.step-wait { background: #fafafa; border-color: #e5e9ef; }
.step-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.step-icon.done { background: #21b861; color: #fff; }
.step-icon.fail { background: #e84f2a; color: #fff; }
.step-icon.running { background: #3860e0; color: #fff; }
.step-icon.wait { background: #e4e8ef; color: #7a89a0; }
.step-body { flex: 1; min-width: 0; }
.step-body strong { font-size: 13px; display: block; }
.step-body span { font-size: 11px; color: var(--muted); display: block; margin-top: 1px; }
.step-retry { margin-top: 5px; }
.process-confirm { margin: 4px 14px 10px; padding: 10px 12px; background: #fffbec; border: 1px solid #f2e0a0; border-radius: 9px; display: flex; align-items: center; gap: 9px; }
.process-confirm .icon { color: #a37b00; flex: none; }
.process-confirm p { flex: 1; font-size: 12px; color: #6b5000; line-height: 1.55; margin: 0; }

.wb-right { background: #f8f9fc; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.wb-right-head { padding: 14px 16px 11px; border-bottom: 1px solid var(--line); background: #fff; }
.wb-right-head h2 { font-size: 14px; font-weight: 680; display: flex; align-items: center; gap: 7px; }
.wb-right-head h2 .icon { color: #5872c8; }
.results-list { flex: 1; overflow-y: auto; padding: 10px 12px 20px; display: grid; align-content: start; gap: 9px; }
.result-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; transition: border-color .15s; }
.result-card.expanded { border-color: #93b1ff; box-shadow: 0 0 0 2px #3758e81a; }
.result-card-head { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px 9px; cursor: pointer; }
.result-card-head:hover { background: #f7f9ff; }
.result-card-icon { flex: none; }
.result-card-info { flex: 1; min-width: 0; }
.result-card-info strong { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-card-info span { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.result-card-info .source-note { font-size: 10px; color: #7988ab; margin-top: 3px; }
.result-card-toggle { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: #f0f3f9; color: #5872c8; flex: none; align-self: center; border: none; cursor: pointer; transition: background .12s; }
.result-card-toggle:hover { background: #e3ebff; }
.result-workspace { padding: 13px 13px 15px; border-top: 1px solid var(--line); background: #fdfdfe; display: grid; gap: 11px; }
.result-workspace-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; padding-top: 7px; border-top: 1px solid var(--line); }
.redo-part { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #5468c8; cursor: pointer; background: none; border: none; padding: 0; }
.redo-part:hover { text-decoration: underline; }

.ai-floater { position: fixed; bottom: 24px; right: 22px; z-index: 9; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.ai-floater-btn { pointer-events: all; display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; background: #2545c7; color: #fff; border-radius: 24px; box-shadow: 0 6px 20px #2545c740; border: none; font-size: 13px; font-weight: 660; cursor: pointer; transition: background .15s, transform .15s; }
.ai-floater-btn:hover { background: #1e3db8; transform: translateY(-1px); }
.ai-floater-input { background: #fff; border: 1.5px solid #c8d5f9; border-radius: 12px; box-shadow: 0 10px 32px #2545c730; padding: 10px 12px; display: grid; gap: 7px; min-width: 260px; }
.ai-floater-input textarea { width: 100%; background: transparent; border: 0; outline: none; resize: none; font-size: 13px; min-height: 56px; }
.ai-floater-input .btn { justify-self: end; }

/* 学校问数工作台 */
.school-workbench { display: grid; gap: 15px; }
.school-compose-wrap { background: linear-gradient(135deg, #f4f8ff, #f8f4ff); border: 1px solid #d5e0fa; border-radius: 14px; padding: 18px 20px; }
.school-compose-wrap h2 { font-size: 17px; margin-bottom: 11px; display: flex; align-items: center; gap: 8px; }
.school-compose-wrap h2 .icon { color: #4b6be8; }
.school-query-box { display: grid; gap: 9px; background: #fff; border: 1.5px solid #c5d4f8; border-radius: 10px; padding: 10px 12px; }
.school-query-box:focus-within { border-color: #5a7af4; box-shadow: 0 0 0 3px #3458e81a; }
.school-query-box textarea { width: 100%; background: transparent; border: 0; outline: none; resize: none; font-size: 15px; min-height: 48px; color: var(--ink); line-height: 1.6; padding: 0; }
.school-query-box textarea::placeholder { color: #8fa0c4; font-size: 14px; }
.school-query-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.school-example-queries { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.school-example-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; background: #fff; border: 1px solid #d0daf9; border-radius: 20px; color: #3252aa; font-size: 12px; font-weight: 630; cursor: pointer; transition: background .12s; }
.school-example-btn:hover { background: #ebf0ff; }
.school-ai-process { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.school-understanding { padding: 12px 15px; background: #f8faff; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 8px; }
.school-understanding .icon { color: #4b6be8; flex: none; margin-top: 2px; }
.school-understanding > div { flex: 1; }
.school-understanding strong { font-size: 13px; display: block; margin-bottom: 3px; }
.school-understanding p { font-size: 12px; color: #374e96; margin: 0; line-height: 1.65; }
.school-confirm-row { padding: 10px 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fffdf0; }
.school-confirm-row span { font-size: 12px; color: #6b5500; }
.school-result-panel { padding: 14px 15px; display: grid; gap: 10px; }
.school-result-title { font-size: 13px; font-weight: 680; display: flex; align-items: center; gap: 7px; }
.school-result-title .icon { color: #4b6be8; }
.school-result-meta { font-size: 11px; color: var(--muted); }
.school-class-results { display: grid; gap: 7px; }
.school-class-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f9fafc; }
.school-class-row:hover { background: #f1f5ff; border-color: #c5d4f8; }
.school-class-row > div:first-child { display: flex; align-items: center; gap: 7px; }
.school-class-row strong { font-size: 13px; }
.school-class-row span { font-size: 11px; color: var(--muted); }
.school-report-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.school-report-actions { padding: 10px 15px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.school-report-actions span { font-size: 11px; color: var(--muted); }

/* 家庭端 AI 汇总首屏 */
.family-ai-summary { background: linear-gradient(135deg, #ebf1ff, #f4efff); border: 1px solid #d4e0ff; border-radius: 14px; padding: 14px 13px; display: grid; gap: 10px; }
.family-ai-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 680; color: #2b48b0; }
.family-ai-items { display: grid; gap: 6px; }
.family-ai-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: #fff; border: 1px solid #d8e4ff; border-radius: 8px; }
.family-ai-item .icon-tile { width: 30px; height: 30px; border-radius: 7px; flex: none; }
.family-ai-item .icon-tile .icon { width: 15px; height: 15px; }
.family-ai-item > div { flex: 1; min-width: 0; }
.family-ai-item strong { font-size: 12px; display: block; }
.family-ai-item span { font-size: 11px; color: var(--muted); display: block; margin-top: 1px; }
.family-ai-item .badge { flex: none; }

/* 教师手机端改造 */
.capture-hero { background: linear-gradient(135deg, #1b3080, #2645b8); border-radius: 13px; padding: 16px 14px; color: #fff; display: grid; gap: 11px; }
.capture-hero-title { font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.capture-hero-ai-hint { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: #c8d8ff; display: flex; align-items: center; gap: 6px; }
.capture-hero-ai-hint .icon { color: #a0b8ff; }
.capture-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.capture-big-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 18px 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; min-height: 100px; font-size: 13px; font-weight: 660; cursor: pointer; transition: background .15s; }
.capture-big-btn:hover { background: #f3f7ff; border-color: #bfcef9; }
.capture-big-btn .icon { color: #3658c8; }
.capture-big-btn span { color: var(--muted); font-size: 11px; margin-top: 1px; }

/* 工作台响应式 */
@media (max-width: 1280px) {
  .workbench-shell { --wb-left: 210px; --wb-right: 310px; }
}
@media (max-width: 1050px) {
  .workbench-shell { --wb-left: 195px; --wb-right: 280px; }
  .wb-compose, .wb-process { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 860px) {
  .workbench-shell { grid-template-columns: var(--wb-left) minmax(0,1fr); }
  .wb-right { display: none; }
}
@media (max-width: 680px) {
  .workbench-shell { grid-template-columns: 1fr; --wb-left: 100%; }
  .wb-left { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); max-height: 55px; overflow: hidden; transition: max-height .3s; }
  .wb-left.open { max-height: 480px; }
  .wb-left-head { min-height: 54px; }
  .wb-threads { max-height: 380px; }
  .wb-center { min-height: auto; }
  .ai-floater { bottom: 68px; right: 12px; }
  .school-compose-wrap { padding: 12px 13px; }
}
@media (max-width: 435px) {
  .wb-compose { padding: 10px 12px 8px; }
  .wb-process { padding: 11px 12px 18px; }
  .wb-suggestions { padding: 7px 12px; gap: 5px; }
  .wb-suggestion { font-size: 10px; padding: 4px 7px; }
  .result-workspace { padding: 10px; }
  .school-metrics { grid-template-columns: repeat(2, 1fr); }
}
