/* ==================================================================
 * 自然教学风（Nature Classroom）
 * ------------------------------------------------------------------
 * 这一层只做「换肤」，不改任何业务结构：ui.css 打底 → nature.css 覆盖。
 * 为什么单开一层而不是改 ui.css：
 *   1. ui.css 已经 8000+ 行，里面混着讲义纸面、试卷预览、8 套样式模板的
 *      纸面配色，那些是「印出来给学生的」，不能被工作台的换肤带跑；
 *   2. 覆盖层出问题，删掉 <link> 就回到原样，回滚成本是 1 行；
 *   3. 设计语言要能被后续需求继续迭代，单独一个文件比散在 8000 行里好找。
 *
 * 视觉基调（按需求原话）：
 *   温暖浅蓝泛白背景 / 低饱和绿 + 橙黄主色 / iOS 式留白 / 圆角柔和
 *   阴影极轻 / 细分割线 / PingFang SC 字号层级清晰 / 扁平插画点缀
 * ================================================================== */

:root {
  /* ---------- 底色：暖调浅蓝泛白，不是纯白 ---------- */
  --bg: #f7fafb;
  --bg2: #eef5f7;
  --card: #ffffff;
  --line: #e8eff1;
  --line-soft: #f1f6f7;

  /* ---------- 文字：带一点绿调的深灰，比纯黑柔和 ---------- */
  --txt: #2c3a38;
  --sub: #6a7d78;
  --muted: #9aaba6;

  /* ---------- 主色：低饱和绿（叶片） ---------- */
  --leaf-900: #2b5743;
  --leaf-800: #35684f;
  --leaf-700: #3f7a5d;
  --leaf-600: #528d6e;
  --leaf-500: #6aa984;
  --leaf-300: #8ec0a2;
  --leaf-100: #eaf4ee;
  --leaf-50: #f3f9f5;

  /* ---------- 辅色：橙黄（阳光），只做点睛，不做大面积 ---------- */
  --sun-700: #c47a1e;
  --sun-600: #e08c2e;
  --sun-500: #eda63f;
  --sun-400: #f7bd63;
  --sun-100: #fdf3e2;
  --sun-50: #fef9f0;

  /* ---------- 兼容层：ui.css 里 200+ 处用 --blue* 当强调色 ----------
   * 直接把这一族重映射成绿色，能一次性把整个工作台的强调色换成低饱和绿，
   * 只有少量硬编码蓝色的组件（顶栏胶囊、卡头、主按钮）需要单独覆盖。 */
  --blue1: var(--leaf-800);
  --blue2: var(--leaf-700);
  --blue3: var(--leaf-600);
  --blue4: var(--leaf-500);
  --tint1: var(--leaf-50);
  --tint2: var(--leaf-100);

  /* ---------- 语义色：都降一档饱和度，避免在浅底上刺眼 ---------- */
  --green: #4e9a6f;
  --red: #cf5f5f;
  --amber: #d9902f;
  --purple: #8a7cb8;

  /* ---------- 圆角：统一一套刻度，组件不再各写各的 ---------- */
  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  /* ---------- 阴影：几乎看不见，只用来托住卡片边缘 ---------- */
  --shadow: 0 1px 2px rgba(44, 58, 56, .03), 0 8px 24px rgba(44, 58, 56, .045);
  --shadow-lift: 0 2px 6px rgba(44, 58, 56, .05), 0 14px 34px rgba(44, 58, 56, .07);

  --ease: cubic-bezier(.32, .72, .3, 1);
}

/* 深色主题：不是把浅色反相，而是重新取一组墨绿夜色，保证对比度 */
[data-theme="dark"] {
  --bg: #0f1a19;
  --bg2: #142221;
  --card: #172524;
  --line: #233634;
  --line-soft: #1d2d2c;
  --txt: #e8f0ed;
  --sub: #9db3ad;
  --muted: #78908a;
  --leaf-900: #cfe8da;
  --leaf-800: #b9dcc8;
  --leaf-700: #9dcdb2;
  --leaf-600: #86bf9f;
  --leaf-500: #6aa984;
  --leaf-300: #3f7a5d;
  --leaf-100: #1c3129;
  --leaf-50: #182a24;
  --sun-700: #f3c47a;
  --sun-600: #eeb257;
  --sun-500: #e5a13f;
  --sun-400: #b8791f;
  --sun-100: #33260f;
  --sun-50: #2a1f0d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px rgba(0, 0, 0, .28);
  --shadow-lift: 0 2px 8px rgba(0, 0, 0, .34), 0 18px 40px rgba(0, 0, 0, .36);
}

/* ---------------- 全局底子 ---------------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--txt);
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
  /* 左上一点极淡的青、右上一点极淡的暖黄：让纯白有「空气感」，但不抢内容 */
  background:
    radial-gradient(880px 520px at 6% -8%, #eef7f5 0%, rgba(238, 247, 245, 0) 62%),
    radial-gradient(760px 480px at 98% 2%, #fdf6ea 0%, rgba(253, 246, 234, 0) 58%),
    linear-gradient(180deg, #f6fafc 0%, #f4f9f8 100%);
  background-attachment: fixed;
}
[data-theme="dark"] body {
  background:
    radial-gradient(880px 520px at 6% -8%, #16292a 0%, rgba(22, 41, 42, 0) 62%),
    radial-gradient(760px 480px at 98% 2%, #241d12 0%, rgba(36, 29, 18, 0) 58%),
    linear-gradient(180deg, #0f1a19 0%, #101c1b 100%);
}

/* 标题一律无衬线：原样式用行楷，教学反馈类产品要「清晰现代」而不是「书法感」 */
h1, h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: normal;
  font-weight: 650;
}

a { color: var(--leaf-700); }
a:hover { color: var(--leaf-600); }

::selection { background: var(--leaf-100); color: var(--leaf-900); }

/* 细滚动条：大面积留白里，粗滚动条会显得脏。
 * 但侧栏导航的滚动条不能细到看不见 —— 那是「还有入口在下面」的唯一线索，
 * 所以 .nav 单独给一档更深的颜色（见下面 .nav 规则里的说明）。 */
.nav::-webkit-scrollbar, .modal::-webkit-scrollbar, .main ::-webkit-scrollbar { width: 8px; height: 8px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb, .modal::-webkit-scrollbar-thumb, .main ::-webkit-scrollbar-thumb {
  background: #dbe7e3; border-radius: 999px;
}
.nav::-webkit-scrollbar-thumb { background: rgba(43, 87, 67, .22); }
.nav:hover::-webkit-scrollbar-thumb { background: rgba(43, 87, 67, .40); }
.nav::-webkit-scrollbar-track, .modal::-webkit-scrollbar-track { background: transparent; }

/* ==================================================================
 * 一、壳层：侧栏 / 顶栏 / 主区
 * iOS 观感的关键不是阴影，是「留白够大 + 元素够少」。
 * ================================================================== */
.layout { min-height: 100vh; }

.sidebar {
  width: 224px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-right: 1px solid var(--line);
  padding-top: 6px;
}
[data-theme="dark"] .sidebar { background: rgba(23, 37, 36, .82); }

.side-brand { padding: 18px 18px 14px; gap: 11px; }
.side-brand .logo {
  width: 38px; height: 38px; border-radius: 13px;
  font-family: -apple-system, "PingFang SC", sans-serif; font-size: 18px; font-weight: 700;
  background: linear-gradient(140deg, var(--leaf-600), var(--leaf-700));
  box-shadow: 0 6px 16px rgba(63, 122, 93, .26);
  color: #fff;
}
.side-brand b { font-size: 14px; font-weight: 650; letter-spacing: .2px; }
.side-brand small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }

/* 需求 176：导航「装不下」的可见性问题。
 * 学生端 22 项、老师端 29 项，900px 高的窗口里导航区只有约 600px，
 * 原来每项 40px + 滚动条 #dbe7e3（白底几乎看不见）—— 后面 6-8 项等于藏起来了，
 * 用户看到「每周错题集」就断了，以为新功能没上。三处一起改：
 *   ① 每项压到 36px，多露出 3-4 项；
 *   ② 滚动条深到能看见（悬停再深一档）；
 *   ③ 底/顶渐隐由 nature-art.js 打 has-more / has-top 类，用 inset 阴影画
 *      —— inset 阴影画在滚动容器的 border box 上，不随内容滚动，正好当「还有」的提示。 */
.nav {
  padding: 2px 8px 10px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(43, 87, 67, .22) transparent;
}
/* 注意：一开始用 inset 阴影做「还有内容」的提示，实机截图里那道阴影在半透明白侧栏上
 * 变成一条灰带，像分隔线又像渲染错误 —— 去掉，只保留下面这条渐隐。 */
/* 滚动区底边一定会把某一项切成半行（容器高度不是行高的整数倍）。
 * 用「遮罩」而不是「盖一层白渐变」：白色渐变会在半透明白侧栏上留下一块死白的方块，
 * 截图里看起来像贴了个白条；mask 是让内容自己淡出，底下露出的就是侧栏本色，没有接缝。 */
.nav.has-more {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), rgba(0, 0, 0, .08));
  mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), rgba(0, 0, 0, .08));
}

/* 「▾ 还有 N 项」：放在滚动区**外面**（#nav 的下一个兄弟），不压任何菜单项。
 * 一开始试过 position:sticky 贴在 nav 底部，实机截图里那行半透明字正好盖住
 * 最后一个菜单的文字，两边都看不清 —— 宁可少露一项，也要看得到这一行。 */
.nav-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0 12px 6px;
  padding: 5px 0;
  font: inherit;
  font-size: 11.5px;
  letter-spacing: .2px;
  color: var(--leaf-700);
  background: var(--leaf-50);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background .16s var(--ease);
}
.nav-more:hover { background: var(--leaf-100); }
.nav-more[hidden] { display: none; }
[data-theme="dark"] .nav-more { background: rgba(106, 169, 132, .20); color: #dff0e7; }
[data-theme="dark"] .nav-more:hover { background: rgba(106, 169, 132, .32); }
.nav .sec {
  font-size: 10.5px; color: var(--muted); letter-spacing: .8px;
  padding: 11px 10px 4px; font-weight: 600;
}
.nav a {
  /* 需求 177：合并入口之后行数已经降到 12-13 行，再把行高收一档（37 → 32），
   * 900px 高的窗口里侧栏就不用滚了。字号不动，只收上下留白。 */
  padding: 4px 10px; border-radius: var(--r-md); font-size: 13px;
  color: var(--txt); margin-bottom: 1px;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav a i { width: 20px; font-size: 14.5px; opacity: .9; }
.nav a:hover { background: var(--leaf-50); color: var(--leaf-800); }
.nav a.on {
  background: var(--leaf-100);
  color: var(--leaf-800);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--sun-400);
}
.nav a.on i { opacity: 1; }
.nav a .n {
  background: var(--sun-100); color: var(--sun-700); font-weight: 700;
  border-radius: 999px; padding: 0 7px; line-height: 17px;
}
.nav a.on .n { background: #fff; color: var(--sun-700); }

.side-user { border-top: 1px solid var(--line-soft); padding: 14px 16px 16px; }
.side-user .who b { font-size: 13px; font-weight: 650; }
.side-user .who span { font-size: 11px; color: var(--muted); }
/* 三个按钮在 192px 里平分会挤成竖排字：改成「改密 / 主题」并排、「退出」单独一行 */
.side-user .side-btns {
  margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.side-user .side-btns .btn { white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.side-user .side-btns .btn:last-child { grid-column: 1 / -1; }
.avatar-txt {
  background: linear-gradient(140deg, var(--leaf-500), var(--leaf-700));
  font-size: 12.5px;
}
/* 头像：ui.css 里是硬编码的蓝色渐变，这里统一换绿 */
.av { background: linear-gradient(140deg, var(--leaf-500), var(--leaf-700)); }

.main { padding: 0 30px 44px; }
.topbar {
  padding: 26px 0 18px;
  background: linear-gradient(var(--bg) 68%, rgba(247, 250, 251, 0));
  gap: 14px;
}
[data-theme="dark"] .topbar { background: linear-gradient(var(--bg) 68%, rgba(15, 26, 25, 0)); }

/* 顶栏标题：去掉原来的蓝色发光胶囊，回归「一行黑字 + 一句灰话」 */
.topbar h2 {
  font-size: 21px; font-weight: 680; color: var(--txt);
  background: none; box-shadow: none; padding: 0; border-radius: 0;
  letter-spacing: .2px;
}
.topbar h2::before { display: none; }
.crumb { font-size: 12.5px; color: var(--muted); }

.plat-chip {
  font-size: 12.5px; padding: 7px 13px; border-radius: 999px;
  background: var(--leaf-50); border: 1px solid var(--line);
  color: var(--leaf-800); font-weight: 500;
}
.plat-chip:hover { background: var(--leaf-100); }
.cap-chip {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--sub);
}
.cap-chip.warn { background: var(--sun-50); border-color: #f6e2c2; color: var(--sun-700); }

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--card); color: var(--sub);
  transition: all .16s var(--ease);
}
.icon-btn:hover {
  border-color: var(--leaf-300); color: var(--leaf-700);
  background: var(--leaf-50); transform: translateY(-1px);
}

/* ==================================================================
 * 二、卡片 / 统计 / 列表
 * ================================================================== */
.card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
  transition: box-shadow .2s var(--ease);
}
.card:hover { box-shadow: var(--shadow-lift); }
.card.pad0 { padding: 0; }

/* 卡头：浅绿小圆片 + 深绿字，替代原来的浅蓝渐变胶囊 */
.card > h3 {
  font-size: 14.5px; font-weight: 650; color: var(--leaf-800);
  background: var(--leaf-50);
  border: 1px solid var(--leaf-100);
  padding: 5px 13px; border-radius: var(--r-sm);
  margin: -4px 0 14px;
  width: fit-content;
}
[data-theme="dark"] .card > h3 { color: var(--leaf-700); border-color: var(--leaf-100); }

.card-h { gap: 10px; margin-bottom: 14px; }

/* ---------- 统计卡：数字放大、说明缩小，层级靠字号不靠颜色块 ---------- */
.stat {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.stat::after {
  /* 右上角一抹极淡的绿，替代原设计的高饱和色块。
     用径向渐变淡出，硬边圆在白卡上会像一块脏斑。 */
  content: '';
  position: absolute; right: -24px; top: -32px;
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle, var(--leaf-50) 0%, transparent 72%);
}
.stat .k { font-size: 12.5px; color: var(--sub); font-weight: 500; }
.stat .v {
  font-size: 30px; font-weight: 700; color: var(--txt);
  margin-top: 4px; letter-spacing: -.5px; line-height: 1.2;
  position: relative; z-index: 1;
}
.stat .v small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat .d { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.stat.green .v { color: var(--leaf-700); }
.stat.amber .v { color: var(--sun-700); }
.stat.red .v { color: var(--red); }

/* ---------- 列表项 ---------- */
.it {
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: #fcfdfd;
  padding: 11px 14px;
  margin-bottom: 8px;
  transition: all .16s var(--ease);
}
[data-theme="dark"] .it { background: rgba(255, 255, 255, .02); }
.it:hover { border-color: var(--leaf-300); background: #fff; box-shadow: 0 2px 10px rgba(44, 58, 56, .05); }
[data-theme="dark"] .it:hover { background: rgba(255, 255, 255, .04); }
.it .t { font-size: 13.5px; font-weight: 600; }
.it .s { font-size: 12px; color: var(--sub); }

.empty {
  color: var(--muted); font-size: 13px; padding: 30px 10px;
}
.empty b { font-family: inherit; font-size: 14.5px; color: var(--sub); font-weight: 600; }

.bar { background: var(--leaf-100); height: 6px; }
.bar > i { background: linear-gradient(90deg, var(--leaf-600), var(--leaf-500)); }
.bar.green > i { background: linear-gradient(90deg, var(--leaf-700), var(--leaf-500)); }
.bar.amber > i { background: linear-gradient(90deg, var(--sun-600), var(--sun-400)); }
.bar.red > i { background: linear-gradient(90deg, #cf5f5f, #e79a9a); }

/* ==================================================================
 * 三、按钮 / 表单
 * 主按钮橙黄渐变 + 深棕字（白字压在浅橙上对比度不够，看着发虚）
 * ================================================================== */
.btn {
  padding: 9px 18px;
  border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 600;
  background: linear-gradient(140deg, var(--sun-400), var(--sun-600));
  color: #5c3a10;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(224, 140, 46, .22);
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), filter .14s var(--ease);
}
.btn:hover { filter: brightness(1.03); box-shadow: 0 6px 18px rgba(224, 140, 46, .28); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(224, 140, 46, .2); }
.btn:disabled { opacity: .5; box-shadow: none; transform: none; }
[data-theme="dark"] .btn { color: #2a1a06; }

/* 次级按钮：白底细线，行内高频使用，不能抢主按钮 */
.btn.ghost {
  background: var(--card);
  color: var(--leaf-800);
  border-color: var(--line);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--leaf-50); border-color: var(--leaf-300); box-shadow: none; }
[data-theme="dark"] .btn.ghost { color: var(--leaf-700); }

/* 小尺寸按钮：改成浅绿底，避免一个列表里七八个橙块 */
.btn.sm {
  padding: 6px 12px; font-size: 12.5px; border-radius: var(--r-sm);
  background: var(--leaf-100); color: var(--leaf-800);
  border-color: transparent; box-shadow: none;
}
.btn.sm:hover { background: #e2f0e8; box-shadow: none; }
.btn.sm.ghost { background: transparent; color: var(--sub); }
.btn.sm.ghost:hover { background: var(--leaf-50); color: var(--leaf-800); }
.btn.xs { padding: 4px 9px; font-size: 11.5px; border-radius: 8px; }

.btn.ok { background: linear-gradient(140deg, var(--leaf-500), var(--leaf-700)); color: #fff; box-shadow: 0 4px 14px rgba(63, 122, 93, .22); }
.btn.danger { background: linear-gradient(140deg, #e08585, #cf5f5f); color: #fff; box-shadow: 0 4px 14px rgba(207, 95, 95, .2); }
.btn.amber { background: linear-gradient(140deg, var(--sun-400), var(--sun-600)); color: #5c3a10; }
.btn.link { background: none; box-shadow: none; color: var(--leaf-700); padding: 2px 4px; }
.btn.link.danger { color: var(--red); }

/* ---------- 表单：输入框用极淡底，聚焦给一圈绿光 ---------- */
.field > label { font-size: 12.5px; color: var(--sub); font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fcfdfd;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .field textarea { background: #142221; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--leaf-300);
  background: var(--card);
  box-shadow: 0 0 0 4px rgba(106, 169, 132, .13);
}
.chk { font-size: 12.8px; color: var(--sub); }
.chk input { accent-color: var(--leaf-600); }

/* ==================================================================
 * 四、表格 / 标签 / 弹窗
 * ================================================================== */
.tbl th {
  background: var(--leaf-50);
  color: var(--sub);
  font-size: 11.8px;
  font-weight: 600;
  letter-spacing: .3px;
  border-bottom: 1px solid var(--line);
}
.tbl th:first-child { border-top-left-radius: var(--r-sm); border-bottom-left-radius: var(--r-sm); }
.tbl th:last-child { border-top-right-radius: var(--r-sm); border-bottom-right-radius: var(--r-sm); }
.tbl td { border-bottom: 1px solid var(--line-soft); padding: 11px 10px; }
.tbl tr:hover td { background: var(--leaf-50); }
.tbl tr:last-child td { border-bottom: none; }

.tag {
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  background: var(--leaf-50); color: var(--leaf-800); border: 1px solid var(--leaf-100);
  font-weight: 500;
}
.tag.gray { background: #f4f7f7; color: var(--sub); border-color: var(--line); }
.tag.green { background: #e9f5ee; color: #35765a; border-color: #d3ead9; }
.tag.red { background: #fceeee; color: #b04b4b; border-color: #f3d8d8; }
.tag.amber { background: var(--sun-50); color: var(--sun-700); border-color: #f6e2c2; }
.tag.purple { background: #f2f0f9; color: #6d6099; border-color: #e2ddf0; }

.mask { background: rgba(30, 45, 42, .34); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal {
  border-radius: var(--r-xl);
  padding: 24px 26px;
  box-shadow: 0 30px 80px rgba(24, 38, 35, .24);
  border: 1px solid var(--line);
}
.modal h3 {
  font-size: 16px; font-weight: 680; color: var(--txt);
  background: none; border: none; padding: 0; margin: -2px 0 16px;
  border-radius: 0; width: auto;
}
.acts { gap: 10px; margin-top: 20px; }

.toast { border-radius: var(--r-md); background: #2c3a38; box-shadow: 0 14px 36px rgba(24, 38, 35, .26); }
.toast.ok { background: var(--leaf-700); }
.toast.bad { background: #b04b4b; }

/* ---------- 快捷入口磁贴 ---------- */
.tile {
  border-radius: var(--r-md);
  padding: 15px 16px;
  border: 1px solid var(--line);
  background: #fcfefd;
  box-shadow: none;
  transition: all .18s var(--ease);
}
[data-theme="dark"] .tile { background: rgba(255, 255, 255, .025); }
.tile:hover {
  border-color: var(--leaf-300);
  background: var(--leaf-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.tile .ti { font-size: 21px; }
.tile b { font-size: 13.5px; font-weight: 650; }

/* ---------- 教辅模板卡（ui.css 里的悬停阴影是蓝色） ----------
 * 这些卡是 <button>，在 grid 里按内容收缩而不是撑满轨道，五张卡宽窄不一。
 * 补 width:100% 让它们填满各自的列（列宽由 auto-fill 算好，是等宽的）。
 * 这里刻意用 auto-fill 而不是 auto-fit：auto-fit 会折叠空列，
 * 像「数学特色」这种只有一张卡的分组会被拉成一整条横幅。
 * 标签 margin-top:auto 贴底，卡片本就等高，底部才齐。 */
.aid-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
.aid-card { width: 100%; border-radius: var(--r-md); }
.aid-card .aid-meta { margin-top: auto; }
.aid-card:hover {
  border-color: var(--leaf-300);
  box-shadow: 0 6px 16px rgba(63, 122, 93, .12);
}
.aid-card.on {
  border-color: var(--leaf-500);
  background: var(--leaf-50);
  box-shadow: inset 0 0 0 1px var(--leaf-500);
}

/* ==================================================================
 * 五、插画容器
 * 插画本身在 nature-art.js 里，这里只管「怎么摆、怎么不闪」。
 * ================================================================== */
.ng-art { display: block; width: 100%; height: auto; line-height: 0; }
.ng-art svg { display: block; width: 100%; height: auto; }
.ng-art-sm { max-width: 240px; margin: 0 auto; }
.ng-art-empty { max-width: 168px; margin: 0 auto 10px; opacity: .96; }

/* ==================================================================
 * 六、工作台问候区（新增）
 * 这一块是整页「主视觉」：左边一句话 + 今天最要紧的两件事，右边插画。
 * ================================================================== */
.nature-hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: center;
  background:
    radial-gradient(560px 240px at 92% 8%, #fdf5e8 0%, rgba(253, 245, 232, 0) 70%),
    linear-gradient(135deg, #ffffff 0%, #f6fbf8 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 26px 30px;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}
[data-theme="dark"] .nature-hero {
  background:
    radial-gradient(560px 240px at 92% 8%, #2a2113 0%, rgba(42, 33, 19, 0) 70%),
    linear-gradient(135deg, #172524 0%, #152321 100%);
}
.nh-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--leaf-700); font-weight: 600;
  background: var(--leaf-50); border: 1px solid var(--leaf-100);
  padding: 4px 11px; border-radius: 999px; margin-bottom: 12px;
}
.nh-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--sun-500);
}
.nature-hero h1 {
  font-size: 25px; font-weight: 700; color: var(--txt);
  letter-spacing: -.2px; line-height: 1.32; margin-bottom: 8px;
}
.nature-hero h1 em { font-style: normal; color: var(--leaf-600); }
.nature-hero p {
  font-size: 13.5px; color: var(--sub); max-width: 560px; line-height: 1.72;
}
.nature-hero p b { color: var(--sun-700); font-weight: 650; }
.nh-acts { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.nh-stat { display: flex; gap: 44px; margin-top: 24px; flex-wrap: wrap; }
.nh-stat .i { display: flex; flex-direction: column; min-width: 58px; }
.nh-stat .i b { font-size: 21px; font-weight: 700; color: var(--txt); line-height: 1.15; letter-spacing: -.3px; }
.nh-stat .i span { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.nh-art { position: relative; }
.nh-art .ng-art { max-width: 372px; margin-left: auto; }

@media (max-width: 1080px) {
  .nature-hero { grid-template-columns: 1fr; padding: 22px 22px; }
  .nh-art { display: none; }
}

/* ==================================================================
 * 七、登录页
 * 原设计是「左深蓝渐变 + 右白表单」，对比很强但偏商务；
 * 这里改成「左侧浅色插画讲一个教学场景 + 右侧干净表单」。
 * ================================================================== */
.pt-login { padding: 32px; }
.pt-login-card {
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(44, 58, 56, .12), 0 2px 8px rgba(44, 58, 56, .04);
  border: 1px solid var(--line);
  overflow: hidden;
}
.pt-login-left {
  padding: 36px 34px 30px;
  color: var(--txt);
  background:
    radial-gradient(420px 260px at 88% 4%, #fdf4e6 0%, rgba(253, 244, 230, 0) 66%),
    linear-gradient(158deg, #eef9f3 0%, #e9f4f1 46%, #e6f1f5 100%);
  display: flex; flex-direction: column;
}
.pt-login-left::after { display: none; }
[data-theme="dark"] .pt-login-left {
  background:
    radial-gradient(420px 260px at 88% 4%, #2a2113 0%, rgba(42, 33, 19, 0) 66%),
    linear-gradient(158deg, #16292a 0%, #142523 46%, #132221 100%);
}

.pt-login-left .brand { margin-bottom: 22px; gap: 11px; }
.pt-login-left .brand i {
  width: 40px; height: 40px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--leaf-600), var(--leaf-700));
  color: #fff; font-style: normal; font-weight: 700; font-size: 19px;
  box-shadow: 0 8px 18px rgba(63, 122, 93, .24);
}
.pt-login-left .brand b { font-size: 15px; font-weight: 680; }
.pt-login-left .brand small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.pt-login-left h1 {
  font-size: 26px; font-weight: 700; line-height: 1.42;
  color: var(--txt); letter-spacing: -.2px; margin-bottom: 10px;
}
.pt-login-left > p {
  font-size: 13px; color: var(--sub); line-height: 1.75;
  max-width: 380px;
}
.pt-login-left > p b { color: var(--leaf-700); font-weight: 600; }

/* 用 block + 绝对定位居中，而不是 flex 居中：flex 主轴会把 svg 当可压缩项，
   插画会被压到七成宽；绝对定位不参与 flex 计算，宽度就按容器走 */
.pt-login-art { flex: 1; display: block; position: relative; min-height: 200px; }
.pt-login-art .ng-art {
  width: 100%; max-width: 100%;
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
}

/* 卖点标签：2×2 等宽，比 3+1 的散排更稳 */
.pt-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.pt-feats span {
  font-size: 12px; color: var(--leaf-800);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--leaf-100);
  border-radius: var(--r-md); padding: 8px 10px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
[data-theme="dark"] .pt-feats span { background: rgba(255, 255, 255, .05); }
.pt-feats span i { font-style: normal; font-size: 13px; }

.pt-login-right { padding: 40px 42px 34px; background: var(--card); }
.pt-login-right h2 { font-size: 21px; font-weight: 680; color: var(--txt); }
.pt-login-right .sub { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 6px 0 20px; }

.subj-grid { gap: 8px; }
.subj-grid button {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: #fcfdfd;
  color: var(--sub);
  padding: 8px 10px;
  font-size: 12.5px;
  transition: all .14s var(--ease);
}
.subj-grid button:hover { border-color: var(--leaf-300); color: var(--leaf-800); background: var(--leaf-50); }
.subj-grid button.on {
  background: var(--leaf-100); border-color: var(--leaf-300);
  color: var(--leaf-900); font-weight: 650;
  box-shadow: 0 0 0 3px rgba(106, 169, 132, .1);
}

.pt-cap {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px; margin-top: 18px;
  font-size: 11.5px; color: var(--muted);
}
.pt-cap span { display: inline-flex; align-items: center; gap: 5px; }
.pt-login-foot {
  font-size: 11px; color: var(--muted); line-height: 1.8;
  border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 12px;
}
.pt-alt a { color: var(--leaf-700); font-size: 12.5px; font-weight: 500; }
.pt-alert {
  border-radius: var(--r-md); background: #fceeee; color: #b04b4b;
  border: 1px solid #f3d8d8; font-size: 12.5px; padding: 9px 12px;
}
.pt-sms-hint { background: var(--sun-50); color: var(--sun-700); border-radius: var(--r-md); border: 1px solid #f6e2c2; }

@media (max-width: 860px) {
  .pt-login-card { grid-template-columns: 1fr; }
  /* 窄屏不整块隐藏左栏：只留品牌 + 一张小插画当页头，标题和卖点让位给表单。
     完全藏掉插画的话，手机端就一点「教学场景」的气息都没有了。 */
  .pt-login-left { display: flex; padding: 24px 24px 4px; }
  .pt-login-left h1,
  .pt-login-left > p,
  .pt-login-left .pt-feats { display: none; }
  .pt-login-art { min-height: 130px; max-width: 240px; margin: 0 auto; }
  .pt-login-right { padding: 20px 24px 28px; }
  .pt-cap { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ==================================================================
 * 八、窄屏：侧栏改抽屉（沿用 ui.css 的 .nav-open 机制，只调外观）
 * ================================================================== */
@media (max-width: 900px) {
  .main { padding: 0 16px 32px; }
  .topbar { padding: 16px 0 12px; }
  .topbar h2 { font-size: 18px; }
  .nature-hero { border-radius: var(--r-lg); }
  .nature-hero h1 { font-size: 21px; }
}

/* ==================================================================
 * 九、深色主题补偿
 * ui.css 里有一整套 [data-theme="dark"] 规则，用的是深蓝。属性选择器比
 * 单个类多算一级权重，所以 `[data-theme="dark"] .btn.ghost` 会盖过本层的
 * `.btn.ghost` —— 深色下就会出现「绿按钮配蓝描边」「绿卡片配蓝表头」。
 * 这里用同样的权重把颜色重写一遍，不留混色。
 * ================================================================== */
[data-theme="dark"] .btn.ghost { color: var(--leaf-700); border-color: var(--line); }
[data-theme="dark"] .btn.ghost:hover { background: var(--leaf-50); border-color: var(--leaf-300); }
[data-theme="dark"] .btn.sm { background: var(--leaf-100); color: var(--leaf-800); }
[data-theme="dark"] .btn.sm.ghost { background: transparent; color: var(--sub); }
[data-theme="dark"] .btn.sm.ghost:hover { background: var(--leaf-50); color: var(--leaf-800); }
[data-theme="dark"] .btn.link { color: var(--leaf-700); }

[data-theme="dark"] .tag { color: var(--leaf-700); border-color: var(--leaf-100); }
[data-theme="dark"] .tag.gray { background: #1d2d2c; color: var(--sub); border-color: #263a38; }
[data-theme="dark"] .tag.green { background: #14301f; color: #7fce9f; border-color: #1d4a30; }
[data-theme="dark"] .tag.red { background: #331a1a; color: #e79a9a; border-color: #4d2626; }
[data-theme="dark"] .tag.amber { background: var(--sun-100); color: var(--sun-700); border-color: #4a3614; }
[data-theme="dark"] .tag.purple { background: #241f33; color: #b9acdb; border-color: #362d4d; }

[data-theme="dark"] .cap-chip { color: var(--leaf-700); border-color: var(--line); }
[data-theme="dark"] .cap-chip.warn { background: var(--sun-50); border-color: #4a3614; color: var(--sun-700); }

[data-theme="dark"] .stat .v { color: var(--txt); }
[data-theme="dark"] .stat.green .v { color: var(--leaf-600); }
[data-theme="dark"] .stat.amber .v { color: var(--sun-600); }
[data-theme="dark"] .stat.red .v { color: #e79a9a; }
[data-theme="dark"] .tbl th { background: #182a24; color: var(--sub); }
[data-theme="dark"] .modal h3 { color: var(--txt); }
[data-theme="dark"] .aid-card.on { background: rgba(106, 169, 132, .14); }
[data-theme="dark"] .pt-login-left .brand i { color: #fff; }

/* ==================================================================
 * 十、学生端对齐
 * ------------------------------------------------------------------
 * 学生端加载的是同一份 ui.css + 同一份本文件，所以按钮、卡片、表格、弹窗
 * 自动就是绿的。剩下三类需要单独收口：
 *   1. ui.css 里 `body.stu ...` 开头的那几条（品牌块、导航选中）权重是
 *      (0,3,1)，本文件前面的 `.side-brand .logo` 只有 (0,2,0)，盖不住；
 *   2. 两个深蓝渐变 hero（首页 .stu-hero、成长档案 .fb-arc-hero）是
 *      硬编码的 #1e3a8a → #38bdf8，跟变量无关；
 *   3. 学生端特有的选中态（刷题选项、反馈词条、评分档位）也是硬编码蓝。
 * 处理方式统一：低饱和绿打底，橙黄只留作「选中/强调」的点睛。
 * ================================================================== */

/* ---------- 1. 壳层：品牌块与导航选中 ---------- */
body.stu .side-brand .logo {
  background: linear-gradient(140deg, var(--leaf-600), var(--leaf-700));
  box-shadow: 0 6px 16px rgba(63, 122, 93, .26);
}
body.stu .nav a.on {
  background: var(--leaf-100);
  color: var(--leaf-800);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--sun-400);
}

/* ---------- 2. 首页 hero：从「深蓝大色块」改成「浅底 + 一张课桌插画」 ----------
 * 深蓝渐变在手机上是整屏最重的一块，跟「清爽自然」正好相反；
 * 换成白→浅绿的低对比底，靠插画和数字撑气场，不靠色块压人。 */
.stu-hero {
  border-radius: var(--r-xl);
  padding: 24px 26px;
  color: var(--txt);
  margin-bottom: 16px;
  background:
    radial-gradient(520px 220px at 94% 4%, #fdf5e8 0%, rgba(253, 245, 232, 0) 70%),
    linear-gradient(135deg, #ffffff 0%, #f5fbf7 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
/* 原来的右上角白色半透明圆在白底上会成一块脏斑，去掉 */
.stu-hero::after { display: none; }
[data-theme="dark"] .stu-hero {
  background:
    radial-gradient(520px 220px at 94% 4%, #2a2113 0%, rgba(42, 33, 19, 0) 70%),
    linear-gradient(135deg, #172524 0%, #152321 100%);
}
.stu-hero h1 {
  font-size: 22px; font-weight: 700; color: var(--txt);
  letter-spacing: -.2px; margin-bottom: 6px;
}
.stu-hero p { font-size: 13px; color: var(--sub); opacity: 1; line-height: 1.7; }
.stu-hero .stats { gap: 30px; margin-top: 16px; align-items: baseline; }
.stu-hero .stats div b {
  font-size: 23px; font-weight: 700; color: var(--txt);
  letter-spacing: -.4px; line-height: 1.2;
}
.stu-hero .stats div span { font-size: 11.5px; color: var(--muted); opacity: 1; }
.stu-hero .stats .pet-stage { font-size: 40px; }

/* 右侧插画：不参与 flex 压缩，窄屏整体让位给数字 */
.stu-hero .hero-art { flex: none; width: 280px; align-self: center; }
.stu-hero .hero-art .ng-art { max-width: 280px; margin-left: auto; }

@media (max-width: 1180px) {
  .stu-hero .hero-art { width: 224px; }
  .stu-hero .hero-art .ng-art { max-width: 224px; }
}
@media (max-width: 980px) {
  /* 这一档数字已经排到第二行，插画再留就只剩半张桌子，不如整块收起 */
  .stu-hero .hero-art { display: none; }
}

/* ---------- 3. 成长档案 hero（课堂反馈里那个深蓝渐变）---------- */
.fb-arc-hero {
  border-radius: var(--r-xl);
  padding: 24px 26px;
  color: var(--txt);
  background:
    radial-gradient(520px 220px at 94% 4%, #fdf5e8 0%, rgba(253, 245, 232, 0) 70%),
    linear-gradient(135deg, #ffffff 0%, #f5fbf7 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.fb-arc-hero::after { display: none; }
[data-theme="dark"] .fb-arc-hero {
  background:
    radial-gradient(520px 220px at 94% 4%, #2a2113 0%, rgba(42, 33, 19, 0) 70%),
    linear-gradient(135deg, #172524 0%, #152321 100%);
}
.fb-arc-hero h1 { color: var(--txt); font-size: 21px; font-weight: 700; }
.fb-arc-hero p { color: var(--sub); opacity: 1; }
.fb-arc-hero .kpis div b { color: var(--txt); font-weight: 700; }
.fb-arc-hero .kpis div span { color: var(--muted); opacity: 1; }

/* ---------- 4. 学生端选中态 ---------- */
.quiz-card .opt:hover { border-color: var(--leaf-300); background: var(--leaf-50); }
.quiz-card .opt.on {
  border-color: var(--leaf-500); background: var(--leaf-50);
  color: var(--leaf-900); font-weight: 600;
  box-shadow: 0 0 0 3px rgba(106, 169, 132, .12);
}

/* 反馈词条：正向用绿、负向保留暖橙；白字压在浅色上看不清，统一改深字 */
.fb-chip:hover { border-color: var(--leaf-300); color: var(--leaf-800); }
.fb-chip.on {
  background: linear-gradient(140deg, var(--leaf-500), var(--leaf-700));
  border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 3px 10px rgba(63, 122, 93, .24);
}
.fb-chip.neg.on {
  background: linear-gradient(140deg, var(--sun-400), var(--sun-600));
  color: #5c3a10;
  box-shadow: 0 3px 10px rgba(224, 140, 46, .24);
}
.fb-lv button:hover { border-color: var(--leaf-300); color: var(--leaf-800); }
.fb-lv button.on {
  background: linear-gradient(140deg, var(--leaf-500), var(--leaf-700));
  border-color: transparent; color: #fff;
}
.fb-lv button.on.lv4 { background: linear-gradient(140deg, var(--leaf-600), var(--leaf-900)); }
.fb-lv button.on.lv1 {
  background: linear-gradient(140deg, var(--sun-400), var(--sun-600));
  color: #5c3a10;
}
.fb-mic:hover { border-color: var(--leaf-300); color: var(--leaf-800); }
.fb-live { color: var(--leaf-800); }
.fb-quote { border-left-color: var(--leaf-300); }

/* 时间轴节点 / 月度柱：ui.css 里都是硬编码蓝 */
.fb-tl-it::before { background: var(--leaf-600); }
.fb-months .m i { background: linear-gradient(180deg, var(--leaf-300), var(--leaf-700)); }
.fb-bar-row .bar > i, .fb-bars .bar > i { background: linear-gradient(90deg, var(--leaf-600), var(--leaf-300)); }

/* 学生端刷题/作业里的状态色与教师端保持同一套语义色 */
.rule-sync.on { color: var(--leaf-800); border-color: var(--leaf-100); background: var(--leaf-50); }
.rule-sync.on i { background: var(--leaf-500); }

/* ---------- 5. 功能页里成片的蓝色 ----------
 * 这三处不是学生端专属（知识图谱教师端也在用），但都属于「强调色」，
 * 按同一套语义换成低饱和绿：选中 = 绿底白字，未选中 = 白底细线。 */
body.stu .tag.blue { background: var(--leaf-50); color: var(--leaf-800); border-color: var(--leaf-100); }
[data-theme="dark"] body.stu .tag.blue { background: var(--leaf-50); color: var(--leaf-700); border-color: var(--leaf-100); }

/* 刷题页「只出你所在年级」那张范围卡 */
.pr-scope { background: linear-gradient(180deg, #f8fcf9, #f1f8f4); border-color: var(--leaf-100); }
[data-theme="dark"] .pr-scope { background: linear-gradient(180deg, #172524, #16281f); border-color: var(--leaf-100); }
.pr-type:hover:not(:disabled) { border-color: var(--leaf-300); color: var(--leaf-800); }
.pr-type.on { border-color: var(--leaf-500); background: var(--leaf-50); color: var(--leaf-900); }
.pr-type.on b { color: var(--leaf-800); }
[data-theme="dark"] .pr-type.on { background: var(--leaf-50); border-color: var(--leaf-300); color: var(--leaf-800); }
[data-theme="dark"] .pr-type.on b { color: var(--leaf-800); }

/* 微课 / 知识图谱的科目卡与班级标签 */
.kg-chip.on { background: linear-gradient(140deg, var(--leaf-500), var(--leaf-700)); border-color: transparent; }
.kg-cls-card:hover { border-color: var(--leaf-300); }
.kg-cls-card .ic { background: var(--leaf-50); }
.kg-cls-card.on {
  background: linear-gradient(140deg, var(--leaf-600), var(--leaf-800));
  box-shadow: 0 8px 20px rgba(63, 122, 93, .24);
}
.kg-cls-card.all .ic { background: rgba(106, 169, 132, .12); }
.kg-cls-card.all.on { background: linear-gradient(140deg, var(--leaf-500), var(--leaf-700)); }

/* 宠物页：等级徽章与成长条 */
.pet-hero .pet-lv { background: linear-gradient(140deg, var(--leaf-500), var(--leaf-700)); }
.pet-hero .pet-bar i { background: linear-gradient(90deg, var(--leaf-600), var(--leaf-300)); }
[data-theme="dark"] .pet-hero .pet-lv { background: linear-gradient(140deg, var(--leaf-600), var(--leaf-800)); color: #fff; }

/* 「我的班级」一行四个块：班级名 + 科目标签 + 图谱 / 微课两个按钮。
 * 窄屏放不下时按钮文字会被压成竖排（「图 谱」），所以行内允许换行、
 * 按钮文字不许折。 */
.mycls-row { flex-wrap: wrap; row-gap: 8px; }
.mycls-row .btn { white-space: nowrap; }
.mycls-ava { color: var(--leaf-700); }

/* ---------- 5. 深色补偿（同第九节的理由：对齐 [data-theme] 的权重） ---------- */
[data-theme="dark"] .stu-hero h1,
[data-theme="dark"] .fb-arc-hero h1 { color: var(--txt); }
[data-theme="dark"] .stu-hero .stats div b,
[data-theme="dark"] .fb-arc-hero .kpis div b { color: var(--txt); }
[data-theme="dark"] .quiz-card .opt.on { background: rgba(106, 169, 132, .14); }
[data-theme="dark"] .fb-chip.neg.on { color: #2a1a06; }
[data-theme="dark"] .fb-lv button.on.lv1 { color: #2a1a06; }
[data-theme="dark"] body.stu .nav a.on { background: var(--leaf-100); color: var(--leaf-800); }
[data-theme="dark"] .mycls-ava { background: var(--tint2); color: var(--leaf-600); }
[data-theme="dark"] .fb-seg button.on { color: var(--leaf-300); }
/* 插画自己身上那两团淡色背景（教师 / 学生 / 空状态各一处）在深色下会亮成
 * 一块白斑。CSS 的 fill 优先于 SVG 的 presentation attribute，直接改色即可，
 * 不用为深色另画一套图。 */
[data-theme="dark"] .ng-art circle[fill="#e6f2ec"],
[data-theme="dark"] .ng-art circle[fill="#f0f7f3"] { fill: #1c2f2a; opacity: .55; }

/* ---------- 6. 窄屏：导航改成「一行横滑」 ----------
 * ui.css 里 #nav 在手机上用 flex-wrap 换行，是为了把「我的任务」卡塞进去；
 * 但学生端有 20 多个入口，一换行就是 4 行，390px 的屏上首屏全被导航吃掉，
 * 真正的首页内容要往下滚两屏才看得见。
 * 现在任务卡已经挪到 #nav 外面（renderNav），这里就能让导航恢复单行横滑。 */
@media (max-width: 760px) {
  body.stu .sidebar { flex-wrap: wrap; align-content: flex-start; }
  body.stu .nav-task {
    flex: 0 0 100%; order: 0;
    margin: 0; padding: 6px 8px 0;
    border-top: none; border-bottom: 1px solid var(--line-soft);
  }
  body.stu .nav-task .nt-grid {
    display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px;
  }
  body.stu .nav-task::-webkit-scrollbar,
  body.stu .nav-task .nt-grid::-webkit-scrollbar { display: none; }
  body.stu .nav {
    flex: 0 0 100%; order: 1;
    display: flex; flex-wrap: nowrap; gap: 4px;
    overflow-x: auto; overflow-y: hidden;
    padding: 6px 8px 8px;
    -webkit-overflow-scrolling: touch;
  }
  body.stu .nav::-webkit-scrollbar { display: none; }
  body.stu .nav a { flex: none; }
  /* 需求 176：手机端导航是「一行横滑」，不是竖排 —— 底边遮罩会把文字下半截淡掉，
   * 「还有 N 项，往下滚」也变成假话。这两条只给桌面端的竖排导航用。 */
  body.stu .nav.has-more { -webkit-mask-image: none; mask-image: none; }
  body.stu .nav-more { display: none; }
  body.stu .stu-hero { padding: 18px 18px; border-radius: var(--r-lg); }
  body.stu .stu-hero h1 { font-size: 19px; }
  body.stu .stu-hero .stats { gap: 18px; margin-top: 14px; }
  body.stu .stu-hero .stats div b { font-size: 20px; }
  /* 手机上副标题已经三句并排，宠物名再挂着就换两行、把 hero 撑高 */
  body.stu .stu-hero .hero-pet { display: none; }
}

/* 减少动效偏好：系统的无障碍设置，尊重它 */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ==================================================================
 * 合并同类入口（需求 177）
 * ------------------------------------------------------------------
 * 侧栏一行 = 一组页面，组内用这条页签切换。放在文件最后，
 * 是为了确保压过 ui.css / style.css / bank.css 里的通用 a 样式
 * （8787 后台三者都在，.hubbar a 会被 .tbl a、.card a 之类带上颜色）。
 * ================================================================== */
.hubbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.hubbar.hide { display: none; }
.hubbar .hb-t {
  font-size: 11.5px;
  letter-spacing: .3px;
  color: var(--muted);
  margin-right: 2px;
  white-space: nowrap;
}
.hubbar .hb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--sub);
  font-size: 12.5px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.hubbar .hb i { font-style: normal; font-size: 13px; opacity: .9; }
.hubbar .hb:hover { background: var(--leaf-50); color: var(--leaf-800); border-color: var(--leaf-300); }
.hubbar .hb.on {
  background: var(--leaf-100);
  color: var(--leaf-800);
  border-color: var(--leaf-300);
  font-weight: 650;
}
.hubbar .hb.on i { opacity: 1; }
[data-theme="dark"] .hubbar .hb { background: rgba(255, 255, 255, .03); }
[data-theme="dark"] .hubbar .hb:hover { background: var(--leaf-50); }
[data-theme="dark"] .hubbar .hb.on { background: var(--leaf-100); color: var(--leaf-800); }
/* 手机端：页签不换行，横向滑动（换两行会把内容区顶下去） */
@media (max-width: 760px) {
  .hubbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    margin-bottom: 10px;
  }
  .hubbar::-webkit-scrollbar { display: none; }
  .hubbar .hb-t { display: none; }
}

/* ---------------- 特色项目卡片墙（需求 177） ----------------
 * 12 个特色项目原来每个占侧栏一行，几乎全是「工具入口」，
 * 合成一张按用途分组的卡片墙：一屏看完，点卡片进原页面。 */
.feat-wall { margin: 0; }
.fw-grp { margin-bottom: 20px; }
.fw-grp:last-child { margin-bottom: 4px; }
.fw-grp > h4 {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .4px;
  color: var(--sub);
}
.fw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.fw-card {
  text-align: left;
  padding: 14px 15px 13px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
}
.fw-card:hover {
  border-color: var(--leaf-300);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.fw-card .i { font-size: 20px; line-height: 1; }
.fw-card b { display: block; margin-top: 7px; font-size: 13.5px; color: var(--txt); font-weight: 650; }
.fw-card span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 3px; font-size: 11.5px; color: var(--muted); line-height: 1.55;
}
[data-theme="dark"] .fw-card { background: rgba(255, 255, 255, .025); }
