/* 数学智能交互课堂的主题层。平板控件与投屏比例由各页面样式决定。 */
:root {
  --gallery-paper:#f6f5ef;
  --gallery-card:#fafaf5;
  --gallery-ink:#202b48;
  --gallery-line:#dcded5;
  --gallery-orange:#d56e42;
  --gallery-green:#47796a;
  --ink:var(--gallery-ink);--muted:#5b676e;--line:var(--gallery-line);
  --bg:var(--gallery-paper);--paper:var(--gallery-card);--teal:var(--gallery-green);
  --pale:#e8ede5;--green:var(--gallery-green);
  /* 数学课堂：坐标纸、刻度尺、黑板与朱批 */
  --math-grid:rgba(32,43,72,.06);--math-grid-major:rgba(32,43,72,.115);
  --math-tick:rgba(32,43,72,.2);--math-tick-major:rgba(32,43,72,.36);
  --math-board:#254a40;--math-board-deep:#1b362f;--math-chalk:#eef3ea;
  --math-vermilion:#c2512f;--math-shadow:0 1px 0 #fff inset,0 14px 30px -22px rgba(32,43,72,.38);
  --math-serif:"Source Han Serif SC","Noto Serif CJK SC","Songti SC","STZhongsong","STSong","SimSun",Georgia,serif;
  --math-numeral:"KaTeX_Main","Latin Modern Roman","Cambria Math",Georgia,"Times New Roman",serif;
  --math-paper-grid:
    linear-gradient(var(--math-grid-major) 1px,transparent 1px),
    linear-gradient(90deg,var(--math-grid-major) 1px,transparent 1px),
    linear-gradient(var(--math-grid) 1px,transparent 1px),
    linear-gradient(90deg,var(--math-grid) 1px,transparent 1px);
  color:var(--gallery-ink);background:var(--gallery-paper);
  font-family:Inter,"Microsoft YaHei","PingFang SC",sans-serif;
}
body,body.presenter {
  color:var(--gallery-ink);
  background:var(--gallery-paper) var(--math-paper-grid);
  background-size:120px 120px,120px 120px,24px 24px,24px 24px;
  background-position:-1px -1px;
  font-family:Inter,"Microsoft YaHei","PingFang SC",sans-serif;
}
.top, .head, body.presenter .band {
  color:var(--gallery-ink);box-shadow:none;
  border-bottom:1px solid var(--math-tick-major);
  /* 页眉下沿是一把刻度尺：每 10px 一短刻，每 50px 一长刻 */
  background:
    repeating-linear-gradient(90deg,var(--math-tick-major) 0 1px,transparent 1px 50px) left bottom/100% 9px no-repeat,
    repeating-linear-gradient(90deg,var(--math-tick) 0 1px,transparent 1px 10px) left bottom/100% 5px no-repeat,
    var(--gallery-paper);
}
.top .topinner, .head, body.presenter .band {
  min-height:72px;max-width:1400px;margin:0 auto;
  padding:10px clamp(16px,4vw,64px);gap:16px;align-items:center;
}
.gallery-brand, .head .gallery-brand, body.presenter .band .gallery-brand {
  display:inline-flex;align-items:center;gap:9px;flex-shrink:0;text-decoration:none;
  color:var(--gallery-ink);font-size:19px;font-weight:700;letter-spacing:1px;line-height:1.2;white-space:nowrap;
}
.gallery-brand .brand-icon {color:var(--gallery-orange);font-size:28px;font-weight:700;line-height:1}
body .screen-quality[aria-pressed="true"]{color:white;background:var(--gallery-green);border-color:var(--gallery-green)}
.gallery-brand .brand-sub {
  color:#697579;font-size:11px;letter-spacing:2px;font-weight:400;
  margin-left:4px;padding-left:14px;border-left:1px solid var(--gallery-line);
}
.top .toprule {background:var(--gallery-line)}
.gallery-header .topinner {max-width:1320px;min-height:100px}
.gallery-nav {display:flex;align-items:center;gap:22px;margin-left:auto}
.gallery-nav a {text-decoration:none;color:var(--gallery-ink);font-size:14px}
.gallery-nav a:hover, .gallery-nav [aria-current] {color:var(--gallery-green)}
.gallery-nav [aria-current] {font-weight:650;border-bottom:2px solid var(--gallery-orange)}
.gallery-header #who {margin-left:8px}.gallery-header #who:empty {display:none}
.top .top-link, .head a, body.presenter .band a {color:var(--gallery-ink)}
.top .smallbtn, body.presenter .band button {color:var(--gallery-ink);background:transparent;border:1px solid var(--gallery-line)}
.portal-wrap .panel, .student-wrap .panel, .teacher-wrap .panel, .account-wrap .panel,
.archive-card, .presenter .slide-paper {border-color:var(--gallery-line);border-radius:10px}
.portal-wrap .course-action, .portal-wrap .library-actions>a {
  border-color:var(--gallery-line);border-radius:7px;
}
body .primary, body.presenter button.send-action {
  background:var(--gallery-ink);color:#fff;border:1px solid var(--gallery-ink);border-radius:6px;
}
body .secondary, body .smallbtn {border-color:#c4cbbf;border-radius:6px}
body.presenter {--accent:var(--gallery-green);--rule:var(--gallery-line);--paper:var(--gallery-card);--soft:#eef0e7}
.presenter .slide-paper h1, .presenter .slide-heading strong {color:var(--gallery-ink)}
.presenter .slide-heading, .presenter .lab-block h2 {color:var(--gallery-green)}
body.presenter .slide-paper {background:var(--gallery-card);box-shadow:0 6px 24px #24363109}
.presenter .drawer-head {border-color:var(--gallery-line)}
.task {border-left-color:var(--gallery-green)}
.eyebrow, .portal-wrap .text-link {color:var(--gallery-green)}
body :is(button,a,input,select,textarea,summary):focus-visible {outline:3px solid var(--gallery-orange);outline-offset:3px}
@media(max-width:760px) {
  .top .topinner, .head, body.presenter .band {min-height:58px;gap:9px;flex-wrap:wrap}
  .gallery-brand, .head .gallery-brand, body.presenter .band .gallery-brand {font-size:16px;gap:6px}
  .gallery-brand .brand-icon {font-size:27px}
  .gallery-brand .brand-sub {display:none}
  .gallery-header .topinner {min-height:68px}
  .gallery-nav {gap:12px}.gallery-nav a {font-size:13px}
  body.presenter .band nav {gap:11px}
}
@media print {.gallery-brand .brand-sub {display:none}}

/* ───────── 数学课堂视觉层 ─────────
   只改纸面、页眉、标题、按钮、表单与卡片的观感。
   课件页内的题面排版由 slide-content.css 决定，这里不触碰。 */
::selection {background:#f4dccd;color:var(--gallery-ink)}
:where(a) {color:var(--gallery-green);text-underline-offset:.22em;text-decoration-thickness:1px}
:where(a:hover) {color:var(--gallery-ink)}
:where(html) {scrollbar-color:#b9c0b4 transparent;scrollbar-width:thin}

/* 标题：教科书章节题的宋体，下方一段「数轴」 */
.portal-wrap h1, .teacher-wrap h1, .account-wrap h1, .overview-heading h1, main>.heading h1,
.student-wrap .join h1, .screen-wrap h1, .inbox-wrap h1 {
  font-family:var(--math-serif);font-weight:500;letter-spacing:.02em;color:var(--gallery-ink);
}
/* 数轴只放在入口卡片和待办页：列表页标题下紧跟工具行，50 人头像墙要保证一屏放下 */
.auth-card h1::after, .student-wrap .join h1::after, .inbox-wrap h1::after {
  content:"";display:block;width:3.2em;max-width:60%;height:7px;margin-top:.32em;
  background:
    linear-gradient(var(--math-vermilion),var(--math-vermilion)) left bottom/1.1em 3px no-repeat,
    repeating-linear-gradient(90deg,var(--gallery-ink) 0 1px,transparent 1px .4em) left bottom/100% 7px no-repeat,
    linear-gradient(var(--gallery-ink),var(--gallery-ink)) left bottom/100% 1px no-repeat;
}
.eyebrow {display:inline-flex;align-items:center;gap:.5em;letter-spacing:.14em}
.eyebrow:not(:empty)::before {content:"";width:.5em;height:.5em;background:var(--gallery-orange);transform:rotate(45deg);flex:none}

/* 卡片：讲义纸 */
.portal-wrap .panel, .student-wrap .panel, .teacher-wrap .panel, .account-wrap .panel, .inbox-wrap .panel,
.archive-card, .overview-roster, .overview-person, .agent-card {
  background-color:var(--gallery-card);box-shadow:var(--math-shadow);
}
.portal-wrap .auth-card, .student-wrap .join {
  border-top:3px solid var(--gallery-ink);
  /* 右下角一幅 y=aˣ 与 y=logₐx 关于 y=x 对称的小图 */
  background:var(--gallery-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke-linecap='round'%3E%3Cg stroke='%23202b48' stroke-opacity='.16'%3E%3Cpath d='M4 140H194M60 196V8'/%3E%3Cpath d='M188 135l7 5-7 5M55 14l5-7 5 7'/%3E%3Cpath d='M88 137v6M116 137v6M144 137v6M172 137v6M32 137v6M57 112h6M57 84h6M57 56h6M57 28h6M57 168h6'/%3E%3Cpath stroke-dasharray='3 5' d='M12 188L188 12'/%3E%3C/g%3E%3Cpath stroke='%2347796a' stroke-opacity='.42' stroke-width='1.6' d='M65 200C70 165 80 146 88 140S130 100 196 76'/%3E%3Cpath stroke='%23d56e42' stroke-opacity='.42' stroke-width='1.6' d='M0 136C28 132 48 124 60 112S108 60 124 2'/%3E%3C/svg%3E") right -14px top -26px/176px no-repeat;
}
.auth-card h1::after, .student-wrap .join h1::after {margin-bottom:.5em}
@media(max-width:600px) {.portal-wrap .auth-card, .student-wrap .join {background-image:none}}
.notice, .emptybox {border-radius:6px}
.emptybox {background:transparent;border:1px dashed #b9c0b4}
.tag {box-shadow:inset 0 0 0 1px #cfd8cb;border-radius:999px;background:#eef2ea;color:#2e5549}

/* 按钮与表单 */
body .primary, body .secondary, body .smallbtn {
  transition:background-color .15s,border-color .15s,color .15s,transform .08s;letter-spacing:.02em;
}
body .primary:hover:enabled {background:var(--math-board);border-color:var(--math-board)}
body .secondary, body .smallbtn {background:#fdfdf9;color:var(--gallery-ink)}
body .secondary:hover:enabled, body .smallbtn:hover:enabled {border-color:var(--gallery-ink);background:#fff}
body :is(.primary,.secondary,.smallbtn):active:enabled {transform:translateY(1px)}
:where(body) input:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color]),
:where(body) select, :where(body) textarea {
  border-color:#c4cbbf;border-radius:6px;background-color:#fffffb;
  transition:border-color .15s,box-shadow .15s;
}
:where(body) :is(input,select,textarea):hover {border-color:#9aa59a}
:where(body) :is(input,select,textarea):focus {border-color:var(--gallery-ink);box-shadow:0 0 0 3px rgba(32,43,72,.08)}

/* 数字：用排公式的字体，像课本里的数 */
.metric strong, .overview-stat strong {
  font-family:var(--math-numeral);font-variant-numeric:lining-nums tabular-nums;font-weight:500;letter-spacing:.01em;
}
.meters, .overview-stats {border-color:var(--math-tick)}

/* 页眉里的导航 */
.top nav a, .head>a:not(.gallery-brand) {text-decoration:none;font-size:14px}
.top nav a:hover, .head>a:not(.gallery-brand):hover {color:var(--gallery-green)}
.gallery-brand .brand-icon {transition:transform .3s}
.gallery-brand:hover .brand-icon {transform:rotate(-8deg)}

/* 教师待办 */
.inbox-wrap {max-width:980px;margin:auto;padding:clamp(22px,4vw,48px) clamp(15px,4vw,46px) 56px}
.inbox-wrap .inbox-tools {display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:14px 0 6px}
.inbox-wrap .inbox-tools label {font-weight:400;display:inline-flex;align-items:center;gap:6px}
.inbox-wrap #inboxStatus {color:var(--muted);margin:8px 0 18px}
.inbox-wrap article.panel {border-left:3px solid var(--math-vermilion)}
.inbox-wrap article.panel blockquote {margin:10px 0;padding:6px 14px;border-left:2px solid var(--gallery-line);color:#3a4560}
.inbox-wrap article.panel button {border:1px solid #c4cbbf;border-radius:6px;background:#fdfdf9;color:var(--gallery-ink);padding:5px 12px;margin:8px 6px 0 0}

@media(prefers-reduced-motion:reduce) {
  body .primary, body .secondary, body .smallbtn, .gallery-brand .brand-icon {transition:none}
}
@media print {
  body, body.presenter {background:#fff}
  .top, .head, body.presenter .band {background:#fff}
}

/* ==== 工作台样式 BEGIN（由 build_workbench_css.py 生成）==== */

/* 图标：用 mask 取当前文字颜色，按钮文字不变 */
.prep-workspace.editing #insertText{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6h14M12 6v13M9 19h6'/%3E%3C/svg%3E")}
.prep-workspace.editing #insertFormula{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13h3l3 6 4-14h8'/%3E%3C/svg%3E")}
.prep-workspace.editing #insertImage{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v14H4z'/%3E%3Cpath d='M4 16l5-5 4 4 3-3 4 4'/%3E%3Cpath d='M8.5 9.5h.01'/%3E%3C/svg%3E")}
.prep-workspace.editing #insertKnowledge{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h11a3 3 0 0 1 3 3v13H8a3 3 0 0 1-3-3z'/%3E%3Cpath d='M5 17a3 3 0 0 1 3-3h11'/%3E%3C/svg%3E")}
.prep-workspace.editing #insertExercise{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4h6v3H9z'/%3E%3Cpath d='M9 5.5H5v15h14v-15h-4'/%3E%3Cpath d='M9 14l2.2 2.2L15.5 12'/%3E%3C/svg%3E")}
.prep-workspace.editing #insertQuestion{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11h-9l-4 4v-4H4z'/%3E%3C/svg%3E")}
.prep-workspace.editing #insertGeometry{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 19l7-13 7 13z'/%3E%3Cpath d='M21 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0'/%3E%3C/svg%3E")}
.prep-workspace.editing #insertGeoEmbed{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V4M4 20h16'/%3E%3Cpath d='M6 17c3-9 6-9 13-11'/%3E%3C/svg%3E")}
.prep-workspace.editing #insertStep{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7h14M5 12h10M5 17h6'/%3E%3C/svg%3E")}
.prep-workspace.editing #arrangeSlide{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M3 12h18'/%3E%3Cpath d='M9 6l3-3 3 3M9 18l3 3 3-3M6 9l-3 3 3 3M18 9l3 3-3 3'/%3E%3C/svg%3E")}
.prep-workspace.editing #save{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h11l3 3v13H5z'/%3E%3Cpath d='M8 4v5h7V4M8 20v-6h8v6'/%3E%3C/svg%3E")}
.prep-workspace.editing #present{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z'/%3E%3Cpath d='M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6'/%3E%3C/svg%3E")}
.prep-workspace.editing #startClass{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 5l11 7-11 7z'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #pen{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l4-1L19 8l-3-3L5 16z'/%3E%3Cpath d='M14 7l3 3'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #eraser{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 19h11'/%3E%3Cpath d='M4 15l9-9 6 6-7 7H8z'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #undo{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6L3 11l5 5'/%3E%3Cpath d='M3 11h11a5 5 0 0 1 0 10h-3'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #redo{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 6l5 5-5 5'/%3E%3Cpath d='M21 11H10a5 5 0 0 0 0 10h3'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #map{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h6M10 6h10M10 12h10M10 18h10M10 6v12'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #qr{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4z'/%3E%3Cpath d='M14 14h2v2h-2zM18 18h2v2h-2zM18 14h2M14 19h1'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #fullscreen{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #issue{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l16-8-6 16-3-7z'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #issueGroup{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l16-8-6 16-3-7z'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #collect{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12l-16 8 6-16 3 7z'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #students{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z'/%3E%3Cpath d='M2.5 20c.6-3.6 3-5.5 6.5-5.5s5.9 1.9 6.5 5.5'/%3E%3Cpath d='M16 4.5a3.5 3.5 0 0 1 0 6.5M18 14.8c1.9.7 3.1 2.4 3.5 5.2'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #groups{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 5h6v6H5zM13 5h6v6h-6zM5 13h6v6H5zM13 13h6v6h-6z'/%3E%3C/svg%3E")}
body.presenter:not(.public-slide):not(.teaching-focus) #end{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6h12v12H6z'/%3E%3C/svg%3E")}
.prep-workspace.editing :is(#arrangeSlide,#insertExercise,#insertFormula,#insertGeoEmbed,#insertGeometry,#insertImage,#insertKnowledge,#insertQuestion,#insertStep,#insertText,#present,#save,#startClass)::before,
body.presenter:not(.public-slide):not(.teaching-focus) :is(#collect,#end,#eraser,#fullscreen,#groups,#issue,#issueGroup,#map,#pen,#qr,#redo,#students,#undo)::before{
  content:"";flex:none;width:1.15em;height:1.15em;background:currentColor;
  -webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat;
}
.prep-workspace.editing :is(#arrangeSlide,#insertExercise,#insertFormula,#insertGeoEmbed,#insertGeometry,#insertImage,#insertKnowledge,#insertQuestion,#insertStep,#insertText,#present,#save,#startClass),
body.presenter:not(.public-slide):not(.teaching-focus) :is(#collect,#end,#eraser,#fullscreen,#groups,#issue,#issueGroup,#map,#pen,#qr,#redo,#students,#undo){display:inline-flex;align-items:center;justify-content:center;gap:.4em}

/* ───────── 课件编辑页 ───────── */
/* 顶栏：课件名、保存状态、三个主操作 */
.prep-workspace #lessonView:has(> #canvas:not([hidden])) > .page-heading{
  background:var(--gallery-card);border-bottom:1px solid var(--gallery-line);
}
.prep-workspace.editing #saveState{padding:1px 9px;border-radius:999px;background:#eef2ea;color:#3d6b5a;font-size:12px;white-space:nowrap}
.prep-workspace.editing #saveState:empty{display:none}
.prep-workspace.editing #lessonView .page-heading .actions{gap:6px}
.prep-workspace.editing #lessonView .page-heading .actions :is(#save,#present){background:#fdfdf9;border-color:#cfd4c8;color:var(--gallery-ink)}
.prep-workspace.editing #lessonView .page-heading .actions #startClass{padding-inline:14px;font-weight:650}

/* 工具栏：三组插入工具做成分段条，翻页与视图开关各归其位 */
.prep-workspace.editing #canvas .canvas-toolbar{
  background:#eff1e9;border-bottom:1px solid var(--math-tick);gap:6px 12px;
}
.prep-workspace.editing #canvas .insert-strip{gap:8px}
.prep-workspace.editing #canvas .insert-cluster{
  gap:1px;padding:2px;border:1px solid var(--gallery-line);border-radius:8px;background:var(--gallery-card);
}
.prep-workspace.editing #canvas .insert-cluster+.insert-cluster{border-inline-start:1px solid var(--gallery-line);padding-inline-start:2px}
.prep-workspace.editing #canvas .insert-strip button{
  border:0;border-radius:6px;background:transparent;color:var(--gallery-ink);
  min-height:30px;padding:4px 9px;font-size:13px;white-space:nowrap;transition:background-color .12s,color .12s;
}
.prep-workspace.editing #canvas .insert-strip button:hover:enabled{background:#e7ebe1}
.prep-workspace.editing #canvas .insert-strip button::before{color:#5d6b7c}
.prep-workspace.editing #canvas .insert-strip button.primary{background:#e2ece5;color:#23513f;font-weight:650}
.prep-workspace.editing #canvas .insert-strip button.primary::before{color:#2f6a55}
.prep-workspace.editing #canvas .insert-strip button.primary:hover:enabled{background:#d5e5db}
.prep-workspace.editing #canvas .insert-strip #arrangeSlide{
  min-height:36px;border:1px solid #c6ccc0;background:var(--gallery-card);color:var(--gallery-ink);
}
.prep-workspace.editing #canvas .insert-strip #arrangeSlide[aria-pressed=true]{background:var(--gallery-ink);border-color:var(--gallery-ink);color:#fff}
.prep-workspace.editing #canvas .insert-strip #arrangeSlide[aria-pressed=true]::before{color:#fff}
.prep-workspace.editing #canvas .canvas-panels{flex:1 1 100%;gap:4px}
.prep-workspace.editing #canvas .canvas-panels button[aria-controls=canvasProperties]{margin-left:auto}
.prep-workspace.editing #canvas .canvas-panels .smallbtn{min-height:34px;background:var(--gallery-card)}
.prep-workspace.editing #canvas #canvasPagePicker{min-height:34px;border-radius:6px;font-size:13px;background-color:var(--gallery-card)}
.prep-workspace.editing #canvas #canvasCount{
  padding:0 8px 0 6px;font-family:var(--math-numeral);font-size:14px;color:var(--muted);white-space:nowrap;
}
.prep-workspace.editing #canvas .canvas-panels button[aria-expanded=false]{background:transparent;border-style:dashed}

/* 画布区：坐标纸桌面，上沿和左沿各一把尺，纸张浮起 */
.prep-workspace.editing #canvas .canvas-work{
  --edge:clamp(8px,1.2vw,18px);
  background:
    linear-gradient(var(--math-tick),var(--math-tick)) left var(--edge)/100% 1px no-repeat,
    linear-gradient(var(--math-tick),var(--math-tick)) var(--edge) top/1px 100% no-repeat,
    repeating-linear-gradient(90deg,var(--math-tick-major) 0 1px,transparent 1px 50px) left top/100% calc(var(--edge)*.75) no-repeat,
    repeating-linear-gradient(90deg,var(--math-tick) 0 1px,transparent 1px 10px) left top/100% calc(var(--edge)*.42) no-repeat,
    repeating-linear-gradient(0deg,var(--math-tick-major) 0 1px,transparent 1px 50px) left top/calc(var(--edge)*.75) 100% no-repeat,
    repeating-linear-gradient(0deg,var(--math-tick) 0 1px,transparent 1px 10px) left top/calc(var(--edge)*.42) 100% no-repeat,
    linear-gradient(#f2f3ec,#f2f3ec) left top/100% var(--edge) no-repeat,
    linear-gradient(#f2f3ec,#f2f3ec) left top/var(--edge) 100% no-repeat,
    linear-gradient(rgba(32,43,72,.085) 1px,transparent 1px) 0 0/120px 120px,
    linear-gradient(90deg,rgba(32,43,72,.085) 1px,transparent 1px) 0 0/120px 120px,
    linear-gradient(rgba(32,43,72,.04) 1px,transparent 1px) 0 0/24px 24px,
    linear-gradient(90deg,rgba(32,43,72,.04) 1px,transparent 1px) 0 0/24px 24px,
    #e6e9e1;
}
.prep-workspace.editing #canvas #canvasViewport{
  box-shadow:0 0 0 1px #c9cfc3,0 2px 5px rgba(32,43,72,.07),0 22px 44px -22px rgba(32,43,72,.42);
}

/* 右侧属性栏 */
.prep-workspace.editing #canvas .object-inspector{
  padding:0 14px 18px;background:var(--gallery-card);border-left:1px solid var(--gallery-line);
  box-shadow:-12px 0 26px -24px rgba(32,43,72,.5);
}
.prep-workspace.editing #canvas .object-inspector>h2{
  position:sticky;top:0;z-index:1;margin:0 -14px 6px;padding:13px 14px 10px;
  background:var(--gallery-card);border-bottom:1px solid var(--math-tick);
  font-family:var(--math-serif);font-weight:500;font-size:17px;letter-spacing:.06em;
}
.prep-workspace.editing #canvas .inspector-section-title{
  display:flex;align-items:center;gap:.55em;margin:18px 0 7px;padding-top:12px;border-top:1px solid var(--gallery-line);
  font-size:12px;font-weight:650;letter-spacing:.14em;color:#5b676e;
}
.prep-workspace.editing #canvas .inspector-section-title::before{
  content:"";flex:none;width:.5em;height:.5em;background:var(--gallery-orange);transform:rotate(45deg);
}
.prep-workspace.editing #canvas .object-inspector label{font-size:12.5px;color:#55616a}
.prep-workspace.editing #canvas .object-inspector :is(select,input:not([type=checkbox],[type=radio],[type=color],[type=range]),textarea){
  border-color:#cdd3c7;border-radius:6px;background:#fffffb;font-size:13.5px;
}
.prep-workspace.editing #canvas .inspector-tools{gap:6px}
.prep-workspace.editing #canvas .inspector-tools button{
  flex:1 1 auto;min-height:32px;border-color:#cfd4c8;border-radius:6px;background:#fdfdf9;
  transition:border-color .12s,background-color .12s;
}
.prep-workspace.editing #canvas .inspector-tools button:hover:enabled{border-color:var(--gallery-ink);background:#fff}
.prep-workspace.editing #canvas .object-inspector .object-delete button{color:var(--math-vermilion);border-color:#e3c3b6}

/* ───────── 授课页 ───────── */
/* 顶栏收成一行：站名、课题、工具按钮、去别处的链接 */
body.presenter:not(.public-slide):not(.teaching-focus) .band{
  max-width:none;min-height:54px;padding:6px clamp(12px,2vw,28px);gap:12px;flex-wrap:nowrap;align-items:center;
}
body.presenter:not(.public-slide):not(.teaching-focus) .band .gallery-brand{font-size:16px;gap:7px}
body.presenter:not(.public-slide):not(.teaching-focus) .band .gallery-brand .brand-icon{font-size:24px}
body.presenter:not(.public-slide):not(.teaching-focus) #courseName{
  flex:1 1 auto;min-width:0;padding-left:12px;border-left:1px solid var(--gallery-line);
  font-family:var(--math-serif);font-weight:500;font-size:clamp(15px,1.3vw,19px);letter-spacing:.02em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body.presenter:not(.public-slide):not(.teaching-focus) .band nav{flex:none;flex-wrap:nowrap;gap:2px;margin-left:auto;font-size:13px}
body.presenter:not(.public-slide):not(.teaching-focus) .band nav a{padding:5px 7px;border-radius:6px;color:#4a556b;white-space:nowrap}
body.presenter:not(.public-slide):not(.teaching-focus) .band nav a:hover{background:#eceee6;color:var(--gallery-ink);text-decoration:none;filter:none}
body.presenter:not(.public-slide):not(.teaching-focus) .band nav button{
  min-height:32px;padding:4px 10px;margin-right:4px;border-radius:6px;border-color:#cfd4c8;
  background:var(--gallery-card);white-space:nowrap;font-size:13px;
}
body.presenter:not(.public-slide):not(.teaching-focus) .band nav button:hover:enabled{border-color:var(--gallery-ink);text-decoration:none;filter:none}
body.presenter:not(.public-slide):not(.teaching-focus) .band nav button[aria-pressed=true]{background:var(--gallery-ink);border-color:var(--gallery-ink);color:#fff}
body.presenter:not(.public-slide):not(.teaching-focus) .band nav #projectionLink{margin-left:6px;border:1px solid #cfd4c8;color:var(--gallery-ink);background:var(--gallery-card)}
body.presenter:not(.public-slide):not(.teaching-focus) .band nav #fullscreen{margin:0 0 0 4px}
@media(max-width:1240px){
  body.presenter:not(.public-slide):not(.teaching-focus) .band .gallery-brand{font-size:0;gap:0}
}
@media(max-width:1060px){
  body.presenter:not(.public-slide):not(.teaching-focus) .band{flex-wrap:wrap}
  body.presenter:not(.public-slide):not(.teaching-focus) .band nav{flex:1 1 100%;flex-wrap:wrap;justify-content:flex-start;margin-left:0}
}

/* 纸张浮在坐标纸上 */
body.presenter:not(.public-slide):not(.teaching-focus) .slide-paper{box-shadow:0 0 0 1px #d3d8cc,0 2px 5px rgba(32,43,72,.06),0 26px 50px -26px rgba(32,43,72,.4);border-color:transparent}

/* 底部控制台 */
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar{
  padding:10px 14px;border:1px solid var(--gallery-line);border-radius:12px;background:var(--gallery-card);
  box-shadow:var(--math-shadow);
}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar button, body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar #inboxLink{
  min-height:34px;padding:5px 11px;border:1px solid #cfd4c8;border-radius:6px;background:#fdfdf9;color:var(--gallery-ink);
  font-size:13.5px;white-space:nowrap;transition:border-color .12s,background-color .12s;
}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar #inboxLink{display:inline-flex;align-items:center;text-decoration:none}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar button:hover:enabled, body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar #inboxLink:hover{border-color:var(--gallery-ink);background:#fff;filter:none;text-decoration:none}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar button[aria-pressed=true]{background:var(--gallery-ink);border-color:var(--gallery-ink);color:#fff}
/* 翻页与批注：两组分段条 */
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .nav-row .nav-buttons{
  gap:2px;padding:2px;border:1px solid var(--gallery-line);border-radius:9px;background:#eff1e9;
}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .nav-row .nav-buttons button{border-color:transparent;background:transparent;min-height:32px}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .nav-row .nav-buttons button:hover:enabled{background:var(--gallery-card);border-color:transparent}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .nav-row .nav-buttons button[aria-pressed=true]{background:var(--gallery-ink);color:#fff}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .nav-row #jump{min-height:32px;border:0;border-radius:6px;background-color:var(--gallery-card);font-size:13.5px}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .nav-row .focus-page{font-family:var(--math-numeral);font-size:14px;color:#55616a}
/* 下发区 */
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .action-row{border-top-color:var(--gallery-line)}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar #taskState{
  display:inline-flex;align-items:center;gap:.5em;font-size:12px;letter-spacing:.08em;color:#55616a;
}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar #taskState::before{content:"";width:.5em;height:.5em;background:var(--gallery-orange);transform:rotate(45deg)}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .action-row .nav-buttons{gap:6px}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar button.send-action{
  min-height:38px;padding:6px 16px;border-color:var(--gallery-ink);background:var(--gallery-ink);color:#fff;font-weight:650;
}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar button.send-action:hover:enabled{background:var(--math-board);border-color:var(--math-board)}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar #collect{border-color:var(--gallery-ink);font-weight:650}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar #end{margin-left:auto;color:var(--math-vermilion);border-color:#e3c3b6}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar #end:hover:enabled{border-color:var(--math-vermilion);background:#fff8f5}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar #feedbackSetting{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:400;color:#55616a}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar #feedbackSetting select{min-height:34px;border-radius:6px;font-size:13.5px}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .agent-picker{padding:0;border:1px solid #cfd4c8;border-radius:6px;background:#fdfdf9}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .agent-picker>summary{padding:6px 10px;color:var(--gallery-ink);font-weight:400;font-size:13.5px}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .agent-picker[open]{padding:0 8px 8px}
body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar .agent-picker[open]>summary{padding-inline:2px}

/* 作答方式：把单选/多选框画成分段选项（课程页与授课页通用） */
body:not(.teaching-focus) .submission-picker{
  gap:2px;padding:2px;border:1px solid var(--gallery-line);border-radius:9px;background:#eff1e9;
}
body:not(.teaching-focus) .submission-picker legend{float:left;padding:0 8px 0 6px;font-size:12px;font-weight:400;color:#55616a;line-height:30px}
body:not(.teaching-focus) .submission-picker label{
  position:relative;min-height:30px;padding:0 11px;border-radius:6px;font-size:13.5px;font-weight:400;gap:0;
}
body:not(.teaching-focus) .submission-picker label:hover{background:var(--gallery-card)}
body:not(.teaching-focus) .submission-picker label input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
body:not(.teaching-focus) .submission-picker label:has(input:checked){background:var(--gallery-ink);color:#fff}
body:not(.teaching-focus) .submission-picker label:has(input:disabled){opacity:.5}
body:not(.teaching-focus) .submission-picker label:has(input:focus-visible){outline:3px solid var(--gallery-orange);outline-offset:1px}
body:not(.teaching-focus) .submission-picker small{padding:0 8px;font-size:12px}

@media(prefers-reduced-motion:reduce){
  .prep-workspace.editing #canvas .insert-strip button, body.presenter:not(.public-slide):not(.teaching-focus) .teacher-bar button{transition:none}
}

/* ==== 工作台样式 END ==== */
