/* 界面皮肤：暖白底、大圆角白卡片、清晰分界、彩色圆角大图标。只改外观，不改功能。最后加载。 */
:root{--bg-page:#F6F6F2;--bg-surface:#FFFFFF;--bg-inset:#F2F2EE;--bg-hover:#FAFAF7;--border:#E7E7E1;--border-subtle:#EFEFEA;
  --text-primary:#14181F;--text-secondary:#666D78;--text-tertiary:#9AA0A8;
  --accent:#0B7A6E;--accent-hover:#08665C;--accent-soft:#E3F4F0;--on-accent:#FFFFFF;
  --shadow-sm:0 1px 2px rgba(20,24,31,.04);--shadow-card:0 1px 2px rgba(20,24,31,.03),0 10px 30px rgba(20,24,31,.05);--shadow-lg:0 18px 48px rgba(20,24,31,.16);
  --radius-card:22px;--radius-inner:14px}
:root[data-theme=dark]{--bg-page:#0F1113;--bg-surface:#171A1E;--bg-inset:#1E2227;--bg-hover:#1C2025;--border:#2A2F36;--border-subtle:#22262C;
  --text-primary:#ECEEF0;--text-secondary:#A0A7B0;--accent:#2DD4BF;--accent-hover:#5EEAD4;--accent-soft:rgba(45,212,191,.14);--on-accent:#0F1113;
  --shadow-card:none;--shadow-lg:0 18px 48px rgba(0,0,0,.6)}
body,main{background:var(--bg-page)}
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
.icon-sprite{position:absolute;width:0;height:0;overflow:hidden}

/* 彩色圆角图标 */
.icon-tile{--t1:#5EEAD4;--t2:#0D9488;display:inline-grid;place-items:center;flex:none;width:36px;height:36px;border-radius:11px;color:#fff;
  background:linear-gradient(145deg,var(--t1),var(--t2));box-shadow:inset 0 1px 0 rgba(255,255,255,.45),inset 0 -2px 0 rgba(0,0,0,.08),0 6px 14px -4px var(--t2)}
.icon-tile svg{width:58%;height:58%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tone-teal{--t1:#5EEAD4;--t2:#0D9488}.tone-orange{--t1:#FDBA74;--t2:#EA580C}.tone-violet{--t1:#C4B5FD;--t2:#7C3AED}
.tone-blue{--t1:#93C5FD;--t2:#2563EB}.tone-pink{--t1:#F9A8D4;--t2:#DB2777}.tone-amber{--t1:#FCD34D;--t2:#D97706}
.tone-slate{--t1:#CBD5E1;--t2:#475569}.tone-green{--t1:#86EFAC;--t2:#16A34A}
.tool-icon{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* 侧栏：白底，右侧清晰分界 */
.sidebar{background:var(--bg-surface);border-right:1px solid var(--border)}
.brand{gap:12px;font-weight:800;letter-spacing:.5px}
.brand-icon{width:44px;height:44px;border-radius:14px;color:#fff;background:linear-gradient(145deg,#5EEAD4,#0C8C7D);box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 8px 18px -6px #0C8C7D}
.primary-nav .nav{gap:12px;padding:10px 12px;border-radius:14px;color:var(--text-primary);font-weight:650}
.primary-nav .nav:hover{background:var(--bg-inset)}
.primary-nav .nav.active{background:var(--accent-soft);color:var(--text-primary)}
.primary-nav .nav:not(.active) .icon-tile{filter:saturate(.85)}
.layout-category-nav{border-left:2px solid var(--border-subtle)}
.layout-category-nav .catalog-nav-item{display:flex;align-items:center;gap:10px;border-radius:10px;color:var(--text-secondary)}
.layout-category-nav .catalog-nav-item.active{background:var(--accent-soft);color:var(--text-primary);font-weight:650}
.catalog-nav-item[data-tone]::before{content:"";width:8px;height:8px;border-radius:50%;flex:none;background:linear-gradient(145deg,var(--t1),var(--t2))}
.catalog-nav-item[data-tone=teal]{--t1:#5EEAD4;--t2:#0D9488}.catalog-nav-item[data-tone=orange]{--t1:#FDBA74;--t2:#EA580C}.catalog-nav-item[data-tone=blue]{--t1:#93C5FD;--t2:#2563EB}
.catalog-nav-item[data-tone=amber]{--t1:#FCD34D;--t2:#D97706}.catalog-nav-item[data-tone=slate]{--t1:#CBD5E1;--t2:#475569}
.sidebar-note{border-top:1px solid var(--border)}

/* 顶部与排版工具条：选中项下方小圆点 */
.topbar{border-bottom:1px solid var(--border)}
.pill{background:var(--bg-surface);border-color:var(--border);border-radius:999px}
.layout-workflow{gap:4px;padding:6px 8px;border-radius:18px;border:1px solid var(--border);box-shadow:var(--shadow-card)}
.layout-tool{position:relative;gap:8px;padding:11px 16px;border-radius:12px;font-weight:600;color:var(--text-secondary)}
.layout-tool:hover{background:var(--bg-inset);color:var(--text-primary)}
.layout-tool.active{background:transparent;color:var(--accent);font-weight:750}
.layout-tool.active::after{content:"";position:absolute;left:50%;bottom:3px;width:5px;height:5px;margin-left:-2.5px;border-radius:50%;background:var(--accent)}
.layout-tool b{background:var(--accent-soft);color:var(--accent);border-radius:999px;padding:2px 7px;font-weight:700}

/* 标题与卡片 */
.page-heading{border-radius:var(--radius-card);border:1px solid var(--border);box-shadow:var(--shadow-card);padding:28px 30px}
h1{font-size:32px;font-weight:800;letter-spacing:-.01em;line-height:1.25}
.eyebrow{color:var(--accent);letter-spacing:2.5px;font-weight:750}
.card{border-radius:var(--radius-card);border:1px solid var(--border);box-shadow:var(--shadow-card)}
.wb-panel,.collection-list-panel,.collection-detail-panel,.collection-filters,.collection-storage,.records-filters,.records-table-wrap,.wb-document-bar,.wb-context,.wb-settings,.wb-guide,.wb-batch{border-radius:var(--radius-inner);border-color:var(--border)}

/* 按钮：胶囊形 */
.button{border-radius:999px;padding:10px 18px;font-weight:650}
.primary{background:linear-gradient(145deg,#0F9C8B,#0B7A6E);border-color:transparent;color:#fff;box-shadow:0 6px 16px -6px #0C8C7D}
.primary:hover:not(:disabled){background:linear-gradient(145deg,#0B8A7B,#08665C)}
.secondary{background:var(--bg-surface);border-color:var(--border);color:var(--text-primary)}
.secondary:hover{background:var(--bg-hover);border-color:#D6D6CF}
:root[data-theme=dark] .primary{background:linear-gradient(145deg,#2DD4BF,#14B8A6);color:#0F1113}

/* 选择模板：大图标入口卡片 */
.catalog-entrances{gap:20px}
.catalog-entrance{border-radius:26px;padding:28px;min-height:250px;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.catalog-entrance:hover{transform:translateY(-3px);border-color:var(--border);box-shadow:0 18px 40px -16px rgba(20,24,31,.22)}
.catalog-symbol.icon-tile{width:60px;height:60px;border-radius:18px;border:0;font-size:0}
.catalog-entrance h2{font-size:22px;font-weight:800;margin:22px 0 8px}
.catalog-index{font-weight:700;color:var(--text-tertiary)}
.catalog-arrow{display:inline-flex;align-items:center;padding:8px 14px;border-radius:999px;background:var(--accent-soft);color:var(--accent)}
.catalog-card{border-radius:20px}

/* 教研记录页签使用同一套图标 */
.records-tab{border-radius:20px;padding:18px 20px}
.records-tab .records-tab-icon.icon-tile{width:48px;height:48px;border-radius:15px;font-size:0}
.records-tab:not(.active) .records-tab-icon.icon-tile{background:linear-gradient(145deg,var(--t1),var(--t2));color:#fff;opacity:.75}
.records-step button{border-radius:16px}

/* 表单控件 */
input,select,textarea{border-radius:10px}
dialog{border-radius:22px}
@media(prefers-reduced-motion:reduce){.catalog-entrance{transition:none}.catalog-entrance:hover{transform:none}}
@media(max-width:850px){.primary-nav .nav{padding:8px 10px}.primary-nav .icon-tile{width:28px;height:28px;border-radius:9px}.layout-tool .tool-icon{display:none}.page-heading{padding:20px}h1{font-size:26px}}
.wb-heading{background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius-card);box-shadow:var(--shadow-card);padding:24px 28px}
.wb-heading h1{font-size:32px;font-weight:800}
.wb-flow-guide{color:var(--text-secondary)}
.wb-panel{box-shadow:var(--shadow-card)}
.wb-empty>span{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:20px;color:#fff;font-size:28px;background:linear-gradient(145deg,#5EEAD4,#0C8C7D);box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 10px 22px -8px #0C8C7D}
.collection-storage-icon,.student-storage-icon{color:#fff!important;border-radius:13px!important;background:linear-gradient(145deg,#93C5FD,#2563EB)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 6px 14px -5px #2563EB}
.doc-icon{border-radius:10px;font-weight:800;color:#fff;background:linear-gradient(145deg,#93C5FD,#2563EB);border:0}
.message{border-radius:12px}

/* 工作台：按题型的颜色标识 */
.wb-nav-item,.wb-question{--qt:#94A3B8;--qt-soft:#F1F5F9}
[data-type=choice],[data-type=single_choice],[data-type=multiple_choice]{--qt:#2563EB;--qt-soft:#EFF6FF}
[data-type=fill_blank]{--qt:#16A34A;--qt-soft:#F0FDF4}
[data-type=solution],[data-type=experiment]{--qt:#EA580C;--qt-soft:#FFF7ED}
[data-type=drawing]{--qt:#7C3AED;--qt-soft:#F5F3FF}
[data-type=writing]{--qt:#DB2777;--qt-soft:#FDF2F8}
.wb-nav-item{position:relative;padding:11px 10px 11px 14px;border-radius:12px;font-weight:650;overflow:hidden}
.wb-nav-item::before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:4px;border-radius:0 4px 4px 0;background:var(--qt)}
.wb-nav-item small{display:inline-block;margin-top:6px;padding:1px 8px;border-radius:999px;background:var(--qt-soft);color:var(--qt);font-weight:700}
.wb-nav-item:hover{border-color:var(--qt)}
.wb-nav-item.active{border-color:var(--accent);background:var(--accent-soft)}
.wb-question{border-radius:14px;border-left:4px solid var(--qt)}
.wb-question summary{background:var(--bg-surface);font-weight:650}
.wb-panel-heading h2{font-size:15px;font-weight:800}
.wb-canvas{background:linear-gradient(180deg,var(--bg-inset),var(--bg-page))}
.wb-paper{box-shadow:0 2px 6px rgba(20,24,31,.06),0 20px 50px -20px rgba(20,24,31,.25);border-radius:4px}
:root[data-theme=dark] [data-type]{--qt-soft:rgba(255,255,255,.08)}
.wb-download{display:flex!important;align-items:center;gap:10px;border-radius:12px!important;font-weight:650}
.wb-download::before{content:"W";display:inline-grid;place-items:center;flex:none;width:28px;height:28px;border-radius:9px;color:#fff;font-weight:800;font-size:13px;background:linear-gradient(145deg,#93C5FD,#2563EB);box-shadow:0 4px 10px -4px #2563EB}
.wb-download[href*="all"]::before,.wb-download[download$=".zip"]::before{content:"Z";background:linear-gradient(145deg,#FCD34D,#D97706);box-shadow:0 4px 10px -4px #D97706}
.message.warning{background:#FFFBEB;border:1px solid #FDE68A;color:#92400E}
:root[data-theme=dark] .message.warning{background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.35);color:#FCD34D}
.message.error{background:#FEF2F2;border:1px solid #FECACA;color:#991B1B}
:root[data-theme=dark] .message.error{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.35);color:#FCA5A5}

/* ===== 第二轮打磨（窗口 A，2026-10-12）：对比度、禁用态、空状态大图标、列表与表单细节。只改外观。 ===== */
:root{--text-tertiary:#6F7680;--danger:#B42318;--danger-soft:#FEF3F2;
  --mask-box:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8v12a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8'/%3E%3Crect x='2' y='3' width='20' height='5' rx='1'/%3E%3Cpath d='M10 12h4'/%3E%3C/svg%3E");
  --mask-star:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.8l2.84 5.76 6.36.92-4.6 4.49 1.08 6.33L12 17.31 6.32 20.3l1.08-6.33-4.6-4.49 6.36-.92z'/%3E%3C/svg%3E");
  --mask-users:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  --mask-drive:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3'/%3E%3Cpath d='M4 5v14c0 1.66 3.58 3 8 3s8-1.34 8-3V5'/%3E%3Cpath d='M4 12c0 1.66 3.58 3 8 3s8-1.34 8-3'/%3E%3C/svg%3E");
  --mask-doc:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8M8 17h5'/%3E%3C/svg%3E")}
:root[data-theme=dark]{--text-tertiary:#8B929C;--danger:#F87171;--danger-soft:rgba(248,113,113,.12)}

/* 禁用按钮：统一灰底、无光晕；深色主题下主按钮不再“看起来可点” */
.button:disabled,.button:disabled:hover,.primary:disabled,:root[data-theme=dark] .button:disabled,:root[data-theme=dark] .primary:disabled{background:var(--bg-inset);border-color:var(--border);color:var(--text-tertiary);box-shadow:none;cursor:not-allowed}
.text-button:disabled,.text-button:disabled:hover{background:none;border-color:transparent;color:var(--text-tertiary);text-decoration:none;cursor:not-allowed}
/* 删除类操作用红色，和普通链接区分 */
.row-actions .delete-action,.delete-action{color:var(--danger)}
.row-actions .delete-action:hover,.delete-action:hover:not(:disabled){color:var(--danger)}

/* 题型标签文字：条色保持鲜艳，小字改用更深的同色系，保证 4.5:1 */
.wb-nav-item,.wb-question{--qt-ink:#475569}
[data-type=choice],[data-type=single_choice],[data-type=multiple_choice]{--qt-ink:#1D4ED8}
[data-type=fill_blank]{--qt-ink:#15803D}
[data-type=solution],[data-type=experiment]{--qt-ink:#C2410C}
[data-type=drawing]{--qt-ink:#6D28D9}
[data-type=writing]{--qt-ink:#BE185D}
:root[data-theme=dark] .wb-nav-item,:root[data-theme=dark] .wb-question{--qt-ink:#94A3B8}
:root[data-theme=dark] [data-type=choice],:root[data-theme=dark] [data-type=single_choice],:root[data-theme=dark] [data-type=multiple_choice]{--qt-ink:#60A5FA}
:root[data-theme=dark] [data-type=fill_blank]{--qt-ink:#4ADE80}
:root[data-theme=dark] [data-type=solution],:root[data-theme=dark] [data-type=experiment]{--qt-ink:#FB923C}
:root[data-theme=dark] [data-type=drawing]{--qt-ink:#A78BFA}
:root[data-theme=dark] [data-type=writing]{--qt-ink:#F472B6}
.wb-nav-item small{color:var(--qt-ink)}
.catalog-index{color:var(--text-secondary)}

/* 空状态：彩色圆角大图标（图形用遮罩绘制，原字符隐藏） */
.collection-empty>span,.student-empty>span,.wb-empty>span{position:relative;display:inline-grid!important;place-items:center;width:64px;height:64px;margin:0 auto 18px;border-radius:20px;font-size:0!important;color:transparent!important;
  --t1:#93C5FD;--t2:#2563EB;background:linear-gradient(145deg,var(--t1),var(--t2));box-shadow:inset 0 1px 0 rgba(255,255,255,.45),inset 0 -2px 0 rgba(0,0,0,.08),0 12px 24px -10px var(--t2)}
.collection-empty>span::before,.student-empty>span::before,.wb-empty>span::before{content:"";width:30px;height:30px;background:#fff;-webkit-mask:var(--mask-box) center/contain no-repeat;mask:var(--mask-box) center/contain no-repeat}
#questionbank-view .collection-empty>span{--t1:#FCD34D;--t2:#D97706}
#questionbank-view .collection-empty>span::before{-webkit-mask-image:var(--mask-star);mask-image:var(--mask-star)}
.student-empty>span{--t1:#C4B5FD;--t2:#7C3AED}
.student-empty>span::before{-webkit-mask-image:var(--mask-users);mask-image:var(--mask-users)}
.wb-empty>span{--t1:#5EEAD4;--t2:#0C8C7D}
.wb-empty>span::before{width:32px;height:32px;-webkit-mask-image:var(--mask-doc);mask-image:var(--mask-doc)}
.collection-empty h2,.student-empty h2{font-size:16px;font-weight:750}
.wb-empty{color:#5B6472}.wb-empty h2{color:#1F2937;font-weight:750}

/* 本机保存提示条：同一套彩色图标 */
.collection-storage-icon,.student-storage>span:first-child{position:relative;display:grid;place-items:center;width:40px!important;height:40px!important;border-radius:13px!important;font-size:0!important;color:transparent!important;
  --t1:#93C5FD;--t2:#2563EB;background:linear-gradient(145deg,var(--t1),var(--t2))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 6px 14px -5px var(--t2)!important}
.collection-storage-icon::before,.student-storage>span:first-child::before{content:"";width:20px;height:20px;background:#fff;-webkit-mask:var(--mask-drive) center/contain no-repeat;mask:var(--mask-drive) center/contain no-repeat}
#questionbank-view .collection-storage-icon{--t1:#FCD34D;--t2:#D97706}
#questionbank-view .collection-storage-icon::before{-webkit-mask-image:var(--mask-star);mask-image:var(--mask-star)}
.student-storage>span:first-child{--t1:#C4B5FD;--t2:#7C3AED}

/* 列表：浅灰底托住白色条目，分界更清楚（参考 goingbus 的榜单列表） */
.collection-list,.student-list{background:var(--bg-page)}
.collection-item,.student-item{border-color:var(--border-subtle);background:var(--bg-surface);border-radius:14px}
.collection-item:hover,.student-item:hover{border-color:var(--border);background:var(--bg-surface);box-shadow:0 6px 16px -10px rgba(20,24,31,.25)}
.collection-item.active,.student-item.active{border-color:var(--accent);background:var(--accent-soft);box-shadow:none}
.collection-list-heading,.student-list-panel>.student-section-heading{border-bottom-color:var(--border)}
/* 学生头像：取姓名首字，按 data-tone 着色 */
.student-item[data-initial]{--t1:#5EEAD4;--t2:#0D9488;display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:12px;align-items:center}
.student-item[data-initial]::before{content:attr(data-initial);grid-row:1/span 3;align-self:start;display:grid;place-items:center;width:40px;height:40px;border-radius:13px;color:#fff;font-size:16px;font-weight:750;
  background:linear-gradient(145deg,var(--t1),var(--t2));box-shadow:inset 0 1px 0 rgba(255,255,255,.4),0 5px 12px -6px var(--t2)}
.student-item[data-initial]>*{grid-column:2}
.student-item[data-initial]>p,.student-item[data-initial]>small{margin-top:3px}
.student-item[data-tone="1"]{--t1:#FDBA74;--t2:#EA580C}.student-item[data-tone="2"]{--t1:#C4B5FD;--t2:#7C3AED}
.student-item[data-tone="3"]{--t1:#93C5FD;--t2:#2563EB}.student-item[data-tone="4"]{--t1:#F9A8D4;--t2:#DB2777}.student-item[data-tone="5"]{--t1:#FCD34D;--t2:#D97706}
/* 学生统计：白卡片＋清晰边框 */
.student-stat{background:var(--bg-surface);border:1px solid var(--border);border-radius:14px;padding:14px 16px}
.student-stat strong{font-weight:800;color:var(--accent)}

/* 表单：对话框内行距、文本框统一 */
.form-row+.form-row{margin-top:18px}
#collection-edit-product-fields>.field-label:first-child,#collection-edit-question-fields>.field-label:first-child{margin-top:18px}
textarea{display:block;width:100%;margin-top:9px;padding:10px 12px;border:1px solid var(--border);font:inherit;font-size:12px;line-height:1.7;resize:vertical}
.field-label>textarea,.field-label>input,.field-label>select{margin-top:8px}

/* 折叠区：统一的箭头 */
:is(.wb-settings,.wb-image-editor,.wb-batch,.wb-guide,.collection-import-issues,.recognition,.material-coordinates,.material-answer-fields,.student-guide,.student-import,#cohort-panel,#feedback-reference-panel,.cohort-explanation,.cohort-students)>summary{display:block;list-style:none;cursor:pointer}
:is(.wb-settings,.wb-image-editor,.wb-batch,.wb-guide,.collection-import-issues,.recognition,.material-coordinates,.material-answer-fields,.student-guide,.student-import,#cohort-panel,#feedback-reference-panel,.cohort-explanation,.cohort-students)>summary::-webkit-details-marker{display:none}
:is(.wb-settings,.wb-image-editor,.wb-batch,.wb-guide,.collection-import-issues,.recognition,.material-coordinates,.material-answer-fields,.student-guide,.student-import,#cohort-panel,#feedback-reference-panel,.cohort-explanation,.cohort-students)>summary::before{content:"";display:inline-block;vertical-align:middle;width:6px;height:6px;margin:-3px 12px 0 3px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);opacity:.65;transition:transform .15s ease}
:is(.wb-settings,.wb-image-editor,.wb-batch,.wb-guide,.collection-import-issues,.recognition,.material-coordinates,.material-answer-fields,.student-guide,.student-import,#cohort-panel,#feedback-reference-panel,.cohort-explanation,.cohort-students)[open]>summary::before{transform:rotate(45deg);margin-top:-6px}

/* 错题专项练习：卡片之间留出间距 */
.student-practice-ledger,.practice-preview{margin-top:22px}

/* 选择模板分类页：筛选条做成白色卡片，返回按钮做成胶囊 */
.catalog-toolbar{padding:16px 20px;background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius-inner);box-shadow:var(--shadow-card)}
.catalog-toolbar>#catalog-back{display:inline-flex;align-items:center;min-height:40px;padding:0 16px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:700;text-decoration:none}
.catalog-toolbar>#catalog-back:hover{text-decoration:none;filter:brightness(.97)}
.catalog-section-heading{align-items:flex-end}
.catalog-badge{border-radius:999px;padding:3px 10px}
.catalog-card{transition:box-shadow .18s ease,border-color .18s ease}
.catalog-card:hover{border-color:var(--border);box-shadow:0 16px 36px -18px rgba(20,24,31,.22)}

/* 提示条 */
.toast{border-radius:14px;padding:12px 18px;font-size:13px;font-weight:600}

/* 手机宽度：保留小图标与品牌图标，工具条可横向滑动 */
@media(max-width:850px){.primary-nav .nav>.icon-tile{display:inline-grid;width:24px;height:24px;border-radius:8px}.primary-nav .nav{gap:7px}
  .layout-workflow{-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent)}
  .catalog-toolbar{padding:14px}}
@media(max-width:500px){.brand-icon{display:grid;width:32px;height:32px;border-radius:11px;font-size:22px}.primary-nav .nav{padding:7px 9px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.catalog-card{transition:none}}
.student-practice-ledger>h2{margin-bottom:16px}
#practice-generate{margin-top:14px}
/* 模板管理行内操作：胶囊热区，悬停有底色 */
.row-actions>.text-button{padding:6px 12px;border-radius:999px;font-size:12px;font-weight:650}
.row-actions>.text-button:hover:not(:disabled){text-decoration:none;background:var(--accent-soft)}
.row-actions>.delete-action:hover:not(:disabled){background:var(--danger-soft)}
.row-actions{gap:4px}
/* 学生档案：原生文件选择框改成胶囊按钮；“测验设置”小标题与内容左对齐 */
.student-upload input[type=file]{width:100%;padding:0;border:0;border-radius:0;background:none;color:var(--text-secondary);font-size:12px;font-weight:500;cursor:pointer}
.student-upload input[type=file]::file-selector-button{margin-right:10px;padding:7px 14px;border:1px solid var(--border);border-radius:999px;background:var(--bg-surface);color:var(--text-primary);font:inherit;font-weight:700;cursor:pointer;transition:border-color .15s ease}
.student-upload input[type=file]:hover::file-selector-button{border-color:var(--accent);color:var(--accent)}
.student-upload{border-radius:14px}
.student-event-settings>.student-section-heading{padding-left:0;padding-right:0}

/* 生成结果：每行按文件类型显示彩色图标（W＝Word、Z＝压缩包、T＝清单、X＝表格） */
.result-row:has(>a[download])::before{content:"↓";flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:11px;color:#fff;font-weight:800;font-size:14px;
  --t1:#CBD5E1;--t2:#475569;background:linear-gradient(145deg,var(--t1),var(--t2));box-shadow:inset 0 1px 0 rgba(255,255,255,.4),0 5px 12px -6px var(--t2)}
.result-row:has(>a[download$=".docx" i])::before{content:"W";--t1:#93C5FD;--t2:#2563EB}
.result-row:has(>a[download$=".zip" i])::before{content:"Z";--t1:#FCD34D;--t2:#D97706}
.result-row:has(>a[download$=".txt" i])::before{content:"T"}
.result-row:has(>a[download$=".xlsx" i])::before{content:"X";--t1:#86EFAC;--t2:#16A34A}
.result-row strong{font-size:13px}
.success-icon{display:inline-grid;place-items:center;width:30px;height:30px;padding:0;border-radius:10px;color:#fff;font-weight:800;background:linear-gradient(145deg,#86EFAC,#16A34A);box-shadow:0 6px 14px -6px #16A34A}

/* 表格：圆角外框、只保留横线，表头浅底加粗 */
.practice-table-wrap{border:1px solid var(--border);border-radius:14px;background:var(--bg-surface)}
.practice-table th,.practice-table td{border:0;border-bottom:1px solid var(--border-subtle);padding:11px 14px}
.practice-table tr:last-child td{border-bottom:0}
.practice-table th{background:var(--bg-inset);font-weight:750;white-space:nowrap}
.practice-table tbody tr:hover td{background:var(--bg-hover)}

/* 多选列表：选中项用主色浅底 */
select[multiple]{padding:6px}
select[multiple] option{padding:6px 10px;border-radius:8px;margin:1px 0}
select[multiple] option:checked{background:linear-gradient(var(--accent-soft),var(--accent-soft));color:var(--text-primary);font-weight:650}
#practice-error-columns,.student-field-grid select[multiple]{min-height:132px}
/* 工作台下载：含答案的“原文待核对”副本用琥珀色警示，避免误发给学生 */
.wb-download[href*="/review"]{background:#FFFBEB!important;border:1px solid #FDE68A!important;color:#92400E!important}
.wb-download[href*="/review"]::before{content:"!";background:linear-gradient(145deg,#FCD34D,#D97706);box-shadow:0 4px 10px -4px #D97706}
:root[data-theme=dark] .wb-download[href*="/review"]{background:rgba(245,158,11,.12)!important;border-color:rgba(245,158,11,.35)!important;color:#FCD34D!important}
#material-delete-question{color:var(--danger)}
/* 学生错题复练状态：未复练＝琥珀、待巩固＝蓝、已掌握＝绿（数量胶囊与每题状态同色） */
.student-review-count{border-radius:999px;padding:4px 11px;font-weight:650}
.student-review-count.unreviewed,.student-review-state.unreviewed{background:#FFFBEB;border-color:#FDE68A;color:#92400E}
.student-review-count.needs_practice,.student-review-state.needs_practice{background:#EFF6FF;border-color:#BFDBFE;color:#1D4ED8}
.student-review-count.mastered,.student-review-state.mastered{background:#F0FDF4;border-color:#BBF7D0;color:#15803D}
.student-review-state{padding:2px 9px;border:1px solid transparent;border-radius:999px;font-weight:650}
:root[data-theme=dark] .student-review-count.unreviewed,:root[data-theme=dark] .student-review-state.unreviewed{background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.3);color:#FCD34D}
:root[data-theme=dark] .student-review-count.needs_practice,:root[data-theme=dark] .student-review-state.needs_practice{background:rgba(96,165,250,.12);border-color:rgba(96,165,250,.3);color:#93C5FD}
:root[data-theme=dark] .student-review-count.mastered,:root[data-theme=dark] .student-review-state.mastered{background:rgba(74,222,128,.12);border-color:rgba(74,222,128,.3);color:#86EFAC}

/* 页面标题卡片：左侧彩色大图标（与导航同款图形，纯 CSS 绘制，不改 HTML） */
:root{--g-eye:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  --g-grid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='7' height='7' rx='1.8'/%3E%3Crect x='13.5' y='3.5' width='7' height='7' rx='1.8'/%3E%3Crect x='3.5' y='13.5' width='7' height='7' rx='1.8'/%3E%3Crect x='13.5' y='13.5' width='7' height='7' rx='1.8'/%3E%3C/svg%3E");
  --g-box:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 7.5 12 3l8.5 4.5v9L12 21l-8.5-4.5z'/%3E%3Cpath d='M3.5 7.5 12 12l8.5-4.5M12 12v9'/%3E%3C/svg%3E");
  --g-clipboard:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4.5' width='14' height='17' rx='2.5'/%3E%3Cpath d='M9 4.5V3h6v1.5'/%3E%3Cpath d='m8.8 13.2 2.2 2.2 4.4-4.6'/%3E%3C/svg%3E");
  --g-star:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3.5 2.6 5.4 5.9.8-4.3 4.1 1 5.8L12 16.8l-5.2 2.8 1-5.8-4.3-4.1 5.9-.8z'/%3E%3C/svg%3E");
  --g-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4.5' width='17' height='15' rx='2.5'/%3E%3Ccircle cx='9' cy='10' r='1.8'/%3E%3Cpath d='m4 18 5-5 3.5 3.5L16 13l4.5 4.5'/%3E%3C/svg%3E");
  --g-sliders:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4v16M12 4v16M19 4v16'/%3E%3Ccircle cx='5' cy='15' r='2.2'/%3E%3Ccircle cx='12' cy='8' r='2.2'/%3E%3Ccircle cx='19' cy='13' r='2.2'/%3E%3C/svg%3E");
  --g-target:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Ccircle cx='12' cy='12' r='4.5'/%3E%3Ccircle cx='12' cy='12' r='1' fill='white'/%3E%3C/svg%3E");
  --g-users:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c.6-3.6 3.2-5.5 6.5-5.5s5.9 1.9 6.5 5.5'/%3E%3Ccircle cx='17' cy='9' r='2.6'/%3E%3Cpath d='M16.5 14.6c2.6.2 4.4 1.9 5 4.9'/%3E%3C/svg%3E");}
.page-heading,.wb-heading{justify-content:flex-start}
.page-heading>div:first-of-type,.wb-heading>div:first-of-type{flex:1 1 220px;min-width:0}
.page-heading::before,.wb-heading::before{content:"";flex:none;align-self:flex-start;width:64px;height:64px;border-radius:20px;--t1:#5EEAD4;--t2:#0D9488;--g:var(--g-eye);
  background:var(--g) center/30px no-repeat,linear-gradient(145deg,var(--t1),var(--t2));box-shadow:inset 0 1px 0 rgba(255,255,255,.45),inset 0 -2px 0 rgba(0,0,0,.08),0 12px 24px -10px var(--t2)}
#library-view .page-heading::before{--g:var(--g-grid);--t1:#93C5FD;--t2:#2563EB}
#products-view .page-heading::before{--g:var(--g-box);--t1:#93C5FD;--t2:#2563EB}
#records-view .page-heading::before{--g:var(--g-clipboard);--t1:#86EFAC;--t2:#16A34A}
#questionbank-view .page-heading::before{--g:var(--g-star);--t1:#FCD34D;--t2:#D97706}
#materials-view .page-heading::before{--g:var(--g-image);--t1:#F9A8D4;--t2:#DB2777}
#templates-view .page-heading::before{--g:var(--g-sliders);--t1:#CBD5E1;--t2:#475569}
#practice-view .page-heading::before{--g:var(--g-target);--t1:#FDBA74;--t2:#EA580C}
#students-view .page-heading::before{--g:var(--g-users);--t1:#C4B5FD;--t2:#7C3AED}
#generate-view .page-heading::before{--g:var(--g-grid)}
@media(max-width:1200px){.wb-heading{flex-direction:row;flex-wrap:wrap;align-items:flex-start}.wb-heading>.wb-actions{flex-basis:100%}}
@media(max-width:600px){.page-heading::before,.wb-heading::before{width:48px;height:48px;border-radius:15px;background-size:24px,auto}.page-heading,.wb-heading{gap:14px}}
/* 班级常错题：统计卡与学生统计一致（白卡片＋边框，数字用主色）；表格圆角外框 */
.cohort-card{background:var(--bg-surface);border:1px solid var(--border);border-radius:14px;padding:15px 16px}
.cohort-card strong{font-weight:800;color:var(--accent)}
.cohort-questions{border:1px solid var(--border);border-radius:14px}
.cohort-table th{color:var(--text-primary);font-weight:750}
.cohort-table tr:last-child td{border-bottom:0}
.cohort-table tbody tr:hover td{background:var(--bg-hover)}
.cohort-students>summary::before{border-color:var(--accent)}
.cohort-empty{border-radius:14px}
/* 1120px 以下侧栏变窄：入口图标与间距收紧，避免“错题专项练习”折行 */
@media(max-width:1120px) and (min-width:851px){.primary-nav .nav{gap:10px;padding:10px 8px;font-size:14px;white-space:nowrap}.primary-nav .icon-tile{width:32px;height:32px;border-radius:10px}}

/* 提示条：信息／警告／错误统一为“左侧小图标＋浅色底＋细边框” */
:root{--mask-info:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 11v6'/%3E%3Cpath d='M12 7.5h.01'/%3E%3C/svg%3E");
  --mask-warn:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18.5a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4.5'/%3E%3Cpath d='M12 17.5h.01'/%3E%3C/svg%3E");
  --mask-error:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E")}
.message.info{border:1px solid rgba(11,122,110,.18)}
:root[data-theme=dark] .message.info{border-color:rgba(45,212,191,.25)}
.message.info,.message.warning,.message.error{position:relative;padding-left:40px}
.message.info::before,.message.warning::before,.message.error::before{content:"";position:absolute;left:14px;top:14px;width:16px;height:16px;background:currentColor;-webkit-mask:var(--mask-info) center/contain no-repeat;mask:var(--mask-info) center/contain no-repeat}
.message.info::before{background:var(--accent)}
.message.warning::before{-webkit-mask-image:var(--mask-warn);mask-image:var(--mask-warn)}
.message.error::before{-webkit-mask-image:var(--mask-error);mask-image:var(--mask-error)}
/* 工作台：行内标签与下拉框垂直居中（去掉全局下拉框上边距） */
.wb-document-bar select,.wb-context select,.wb-toolbar select{margin-top:0}
@media(max-width:600px){.wb-document-bar select{margin-top:0}}

/* 预览纸面：行末保留空格（下划线填空）可换行，不再伸出纸面 */
.collection-preview-paper p{white-space:break-spaces}
/* 帮助对话框步骤：主色圆形序号 */
.material-guide{list-style:none;counter-reset:guide;padding-left:0}
.material-guide>li{counter-increment:guide;position:relative;padding-left:44px;margin-bottom:20px}
.material-guide>li::before{content:counter(guide);position:absolute;left:0;top:0;display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:var(--accent-soft);color:var(--accent);font-weight:800;font-size:13px}
.material-guide>li>strong{display:block;line-height:28px}
.material-guide p{margin:4px 0 0}
/* 提示气泡：反色胶囊，任何背景上都醒目；左侧主色小圆点 */
.toast{display:flex;align-items:center;gap:10px;background:#14181F;color:#FFFFFF;border:0;border-radius:999px;padding:12px 20px;box-shadow:0 14px 34px -10px rgba(20,24,31,.45)}
.toast[hidden]{display:none}
.toast::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:#2DD4BF}
:root[data-theme=dark] .toast{background:#ECEEF0;color:#0F1113;box-shadow:0 14px 34px -10px rgba(0,0,0,.7)}
:root[data-theme=dark] .toast::before{background:#0B7A6E}
/* 工作台“修改文字”：悬停描边改用主色青绿（原为蓝色），段落小工具条胶囊化 */
.wb-paper.wb-editing [data-edit-block]:hover{outline-color:rgba(11,122,110,.55);background:#F0FAF8}
.wb-paper.wb-editing [data-edit-cell]:hover{background:#F0FAF8}
.wb-paper [contenteditable="true"]{outline-color:#0B7A6E!important;border-radius:4px}
.wb-para-tools{border-radius:999px;padding:4px;border-color:#E7E7E1;box-shadow:0 8px 20px -8px rgba(20,24,31,.3)}
.wb-para-tools button{border-radius:999px;padding:4px 12px;font-weight:650}
#wb-edit-toggle[aria-pressed="true"]{box-shadow:0 6px 16px -6px #0C8C7D}
