:root {
  /* 设计令牌：奶油暖底 + 黑即强调 + 语义彩色（源自 Campus Port 拆解） */
  --primary: #262629;
  --primary-dark: #383840;
  --primary-light: #efeae6;
  --success: #006645;
  --success-light: #e2f1eb;
  --warning: #b45309;
  --warning-light: #ffedc5;
  --danger: #7c0f27;
  --danger-light: #ffe8e9;
  --bg: #faf7f5;
  --card: #ffffff;
  --text: #291334;
  --text-2: #5d4f65;
  --border: #e7e2df;
  --radius: 16px;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
  --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  --shadow-4: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --font-display: "Fredoka", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-editorial: "Noto Serif SC", "Songti SC", SimSun, serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ambient:
    radial-gradient(ellipse 36% 48% at 15% 28%, rgba(160, 188, 200, .67), transparent 90%),
    radial-gradient(ellipse 29% 40% at 84% 34%, rgba(220, 235, 211, .73), transparent 90%),
    radial-gradient(ellipse 38% 45% at 46% 85%, rgba(244, 226, 199, .6), transparent 85%),
    radial-gradient(ellipse 22% 35% at 69% 83%, rgba(145, 170, 160, .5), transparent 95%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  background-image: var(--ambient);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #000; text-decoration: underline; }

/* ---------- 顶部导航 ---------- */
.topnav {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; font-family: var(--font-display); letter-spacing: .01em; }
.nav-links { display: flex; gap: 8px; flex: 1; }
.nav-links a {
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--text-2);
  font-weight: 500;
}
.nav-links a:hover { background: var(--primary-light); color: var(--primary-dark); }
.nav-links a.active { background: var(--primary-light); color: var(--primary-dark); }
.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-user .uname { font-weight: 600; }
.role-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary-dark);
}
.role-badge.admin { background: #fce7f3; color: #be185d; }
.role-badge.teacher { background: var(--success-light); color: var(--success); }
.role-badge.student { background: #e3edf3; color: #004869; }
.nav-link-btn {
  background: none; border: none; color: var(--text-2);
  cursor: pointer; font-size: 13px; padding: 4px 6px;
}
.nav-link-btn:hover { color: var(--primary); }

/* ---------- 布局容器 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.page-title { font-size: 21px; font-weight: 700; margin-bottom: 16px; font-family: var(--font-display); letter-spacing: .01em; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

/* ---------- 搜索区 ---------- */
.search-bar { display: flex; gap: 10px; margin-bottom: 14px; }
.search-bar input[type="text"] {
  flex: 1; height: 44px; padding: 0 16px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; outline: none; background: #fff;
}
.search-bar input[type="text"]:focus { border-color: var(--primary); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.chip-row .chip-label { color: var(--text-2); font-size: 13px; margin-right: 4px; }
.chip {
  padding: 5px 14px; border-radius: 18px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); cursor: pointer; font-size: 13px;
  transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 资料卡片 ---------- */
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.mat-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--border); cursor: pointer;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s;
}
.mat-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: #d8d1cb; }
.mat-card h3 { font-size: 15.5px; line-height: 1.5; font-family: var(--font-editorial); font-weight: 700; }
.mat-card .desc { color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mat-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge {
  font-size: 12px; padding: 2px 10px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary-dark); white-space: nowrap;
}
.badge.tag { background: #f2eee9; color: var(--text-2); }
.badge.status-pending { background: var(--warning-light); color: var(--warning); }
.badge.status-approved { background: var(--success-light); color: var(--success); }
.badge.status-rejected { background: var(--danger-light); color: var(--danger); }
.badge.gray { background: #f2eee9; color: var(--text-2); }
.mat-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 20px; border-radius: 9999px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; font-family: inherit;
  background: var(--primary); color: var(--primary-light); white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.btn:hover { background: var(--primary-dark); box-shadow: var(--shadow-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--text); border-color: #cbc4bd; }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: #f2eee9; color: var(--text-2); }
.btn-ghost:hover { background: #e8e2db; color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #640d1f; }
.btn-danger-outline { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger-light); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.form-item .req { color: var(--danger); margin-left: 2px; }
.form-item input[type="text"], .form-item input[type="password"], .form-item input[type="url"],
.form-item select, .form-item textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; background: #fff;
}
.form-item textarea { min-height: 90px; resize: vertical; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--primary); }
.form-item .hint { color: var(--text-2); font-size: 12px; margin-top: 4px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-item { flex: 1; }
.tag-select { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-select .chip { user-select: none; }
.radio-line { display: flex; gap: 20px; align-items: center; }
.radio-line label { display: flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl th { color: var(--text-2); font-weight: 600; background: #f7f2ee; white-space: nowrap; }
.tbl tr:hover td { background: #f7f2ee; }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 20px; }
.pagination button {
  height: 34px; min-width: 34px; padding: 0 10px; border: 1px solid var(--border);
  background: #fff; border-radius: 8px; cursor: pointer; color: var(--text);
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination .cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .info { color: var(--text-2); font-size: 13px; margin: 0 6px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 1000; overflow-y: auto; padding: 60px 16px;
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 560px;
  padding: 24px; box-shadow: var(--shadow-4);
  animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(14px); opacity: .4; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 16px; margin-bottom: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- Toast ---------- */
#toast-box { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 10px 20px; border-radius: 8px; color: #fff; font-size: 13.5px;
  box-shadow: var(--shadow); animation: pop .2s ease; max-width: 480px;
}
.toast.ok { background: var(--success); }
.toast.warn { background: var(--warning); }
.toast.err { background: var(--danger); }

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat-cell { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; text-align: center; }
.stat-cell .num { font-size: 24px; font-weight: 700; color: var(--text); font-family: var(--font-mono); }
.stat-cell .lbl { color: var(--text-2); font-size: 12px; margin-top: 2px; }

/* ---------- 阅读器 ---------- */
.viewer-head { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 14px; }
.viewer-head h2 { font-size: 18px; margin-bottom: 8px; font-family: var(--font-editorial); }
.info-block {
  margin-top: 12px;
  padding: 12px 14px 13px;
  background: #fffdfb;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(41, 19, 52, .04);
}
.info-block .blk-title {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 7px;
}
.info-block .blk-title::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--primary);
}
.info-block .blk-body { font-size: 13.5px; line-height: 1.8; color: var(--text-2); word-break: break-word; }

.notice-bar {
  background: var(--warning-light); color: #92400e; border: 1px solid #fde68a;
  padding: 9px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px;
}
.notice-bar.blue { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

.viewer-shell { background: #ece7e2; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.viewer-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  background: #fff; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.viewer-toolbar .grow { flex: 1; }
.viewer-toolbar button {
  height: 30px; min-width: 30px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px;
}
.viewer-toolbar button:hover { border-color: var(--primary); color: var(--primary); }
.viewer-toolbar .page-ind { font-size: 13px; color: var(--text-2); }
.viewer-toolbar input[type="number"] {
  width: 60px; height: 30px; border: 1px solid var(--border); border-radius: 6px;
  text-align: center; font-size: 13px;
}
#pdf-container, #docx-container { max-height: 76vh; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
#pdf-container canvas { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); max-width: 100%; height: auto; display: block; }
#docx-container { background: #fff; }
.docx-wrapper { background: #fff !important; width: 100%; }
.docx-wrapper section.docx { box-shadow: none !important; margin-bottom: 0 !important; }
.viewer-empty { padding: 60px 20px; text-align: center; color: var(--text-2); }

/* iframe 预览 */
#link-frame-wrap { position: relative; }
#link-frame { width: 100%; height: 72vh; border: none; background: #fff; }

/* 资料链接栏：默认只给链接，「在线阅读」按需展开预览 */
.mat-link-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.mat-link-bar .mat-link-main {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 260px;
}
.mat-link-bar .mat-link-provider { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.mat-link-url {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2);
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.mat-link-url:hover { color: var(--primary); text-decoration: underline; }
.mat-link-bar .mat-link-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 560px) {
  .mat-link-bar .mat-link-main { flex-basis: 100%; }
  .mat-link-bar .mat-link-actions { width: 100%; }
  .mat-link-bar .mat-link-actions .btn { flex: 1; justify-content: center; }
}

/* ---------- 水印 ---------- */
.watermark {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background-repeat: repeat;
}

/* ---------- 防打印 ---------- */
@media print {
  body { display: none !important; }
}

/* ---------- 防选中（学生端） ---------- */
.no-select {
  -webkit-user-select: none; -moz-user-select: none; user-select: none;
}

/* ---------- 登录页 ---------- */
.login-bg {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  background-image: var(--ambient);
  padding: 20px;
}
.login-card {
  background: #fff; border-radius: 20px; padding: 36px 34px 30px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-4); border: 1px solid var(--border);
  animation: rise-in .55s var(--ease-out) backwards;
}
.login-card h1 { font-size: 22px; text-align: center; margin-bottom: 4px; color: var(--text); font-family: var(--font-display); letter-spacing: .01em; }
.login-card .sub { text-align: center; color: var(--text-2); font-size: 13px; margin-bottom: 24px; }
.demo-box { margin-top: 18px; background: var(--primary-light); border: 1px dashed var(--border); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: var(--text-2); }
.demo-box b { color: var(--text); }
.demo-box p { margin: 3px 0; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs .tab {
  padding: 9px 18px; cursor: pointer; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -2px; background: none; border-top: none; border-left: none; border-right: none;
  font-size: 14px; font-family: inherit;
}
.tabs .tab:hover { color: var(--primary); }
.tabs .tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs a.tab { display: inline-block; text-decoration: none; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- 管理端：左侧导航 + 右侧操作区 ---------- */
.admin-container { max-width: 1440px; }
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-sidebar {
  position: sticky; top: 76px; padding: 18px 14px;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.admin-sidebar-title { padding: 0 10px; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.admin-sidebar-sub { padding: 1px 10px 15px; color: var(--text-2); font-size: 12px; }
.admin-nav-group + .admin-nav-group { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--border); }
.admin-nav-group h2 { padding: 0 10px 5px; color: var(--text-2); font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.admin-nav-item {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px;
  padding: 8px 11px; border-radius: 9px; color: var(--text-2);
  font-size: 13.5px; font-weight: 600; line-height: 1.4; text-decoration: none;
  transition: background .15s, color .15s;
}
.admin-nav-item:hover { background: var(--primary-light); color: var(--text); text-decoration: none; }
.admin-nav-item.active { background: var(--primary); color: #fff; }
.admin-nav-item.is-locked { background: #f2f0f1; color: #aaa2ad; }
.admin-nav-item.is-locked:hover { background: #e9e5e8; color: #766c7b; }
.admin-nav-item.active.is-locked { background: #ded9de; color: #746b79; }
.admin-nav-lock { display: none; margin-left: auto; flex: 0 0 auto; }
.admin-nav-item.is-locked .admin-nav-lock { display: inline-flex; }
.admin-main { min-width: 0; }
.admin-back-nav { font-weight: 600; }
.admin-access-denied { padding: 36px; }
.admin-access-denied h2 { margin: 13px 0 8px; font-family: var(--font-display); font-size: 22px; }
.admin-access-denied > p { max-width: 620px; color: var(--text-2); line-height: 1.8; }
.admin-access-denied > p + p { margin-top: 5px; }
.admin-perm-form { max-width: 560px; margin-top: 24px; }
.admin-perm-form > label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.admin-perm-actions { display: flex; gap: 10px; align-items: center; }
.admin-perm-actions select {
  flex: 1; min-width: 0; height: 38px; padding: 0 11px;
  border: 1.5px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-family: inherit;
}
.admin-perm-actions select:focus { outline: none; border-color: var(--primary); }

@media (max-width: 960px) {
  .admin-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 760px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .admin-nav-group + .admin-nav-group { margin-top: 0; padding-top: 0; border-top: none; }
}
@media (max-width: 480px) {
  .admin-nav { grid-template-columns: 1fr; }
  .admin-access-denied { padding: 26px 20px; }
  .admin-perm-actions { align-items: stretch; flex-direction: column; }
}

/* 空状态 */
.empty { text-align: center; color: var(--text-2); padding: 50px 0; }
.empty .big { font-size: 15px; margin-bottom: 6px; }

/* 汇总条 */
.summary-line { background: var(--success-light); border: 1px solid #c5e3d8; color: #0a4d35; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; }
.err-line { background: var(--danger-light); border: 1px solid #f2ccd4; color: var(--danger); padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; }

.reject-reason { background: var(--danger-light); color: #991b1b; padding: 8px 12px; border-radius: 8px; font-size: 12.5px; margin-top: 6px; }

/* ---------- 动效：入场 + 流光 ---------- */
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.result-grid .mat-card { animation: rise-in .5s var(--ease-out) backwards; }
.result-grid .mat-card:nth-child(2) { animation-delay: .05s; }
.result-grid .mat-card:nth-child(3) { animation-delay: .1s; }
.result-grid .mat-card:nth-child(4) { animation-delay: .15s; }
.result-grid .mat-card:nth-child(5) { animation-delay: .2s; }
.result-grid .mat-card:nth-child(6) { animation-delay: .25s; }
.result-grid .mat-card:nth-child(7) { animation-delay: .3s; }
.result-grid .mat-card:nth-child(8) { animation-delay: .35s; }
.result-grid .mat-card:nth-child(9) { animation-delay: .4s; }
.stat-grid .stat-cell { animation: rise-in .5s var(--ease-out) backwards; }
.stat-grid .stat-cell:nth-child(2) { animation-delay: .05s; }
.stat-grid .stat-cell:nth-child(3) { animation-delay: .1s; }
.stat-grid .stat-cell:nth-child(4) { animation-delay: .15s; }
.stat-grid .stat-cell:nth-child(5) { animation-delay: .2s; }
.stat-grid .stat-cell:nth-child(6) { animation-delay: .25s; }

/* CTA 流光：每次约 5 秒扫过一次（用于登录、搜索等主按钮） */
.btn-shimmer { position: relative; overflow: hidden; isolation: isolate; }
.btn-shimmer::before {
  content: ""; position: absolute; inset: 0; z-index: 1; transform: translateX(-110%);
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.28) 45%, rgba(255,255,255,.55) 50%, rgba(255,255,255,.28) 55%, transparent 75%);
  animation: cta-shimmer 5s ease-in-out infinite;
}
.btn-shimmer:hover::before { animation-duration: 1.6s; }
@keyframes cta-shimmer { 0%, 70% { transform: translateX(-110%); } 90% { transform: translateX(0); } to { transform: translateX(120%); } }

@media (prefers-reduced-motion: reduce) {
  .result-grid .mat-card, .stat-grid .stat-cell, .login-card { animation: none; }
  .btn-shimmer::before { animation: none; display: none; }
}

@media (max-width: 720px) {
  .nav-inner { gap: 10px; }
  .nav-links { overflow-x: auto; }
  .form-row { flex-direction: column; }
  .result-grid { grid-template-columns: 1fr; }
}

/* ================= 登录 / 注册切换 ================= */
.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .18s ease;
}
.auth-tab:hover:not(:disabled) { color: var(--text); }
.auth-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(40, 30, 20, .10);
}
.auth-tab:disabled { opacity: .45; cursor: not-allowed; }
.hint { font-size: 12.5px; color: var(--text-2); line-height: 1.7; }

/* ================= 点赞 ================= */
.btn-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
}
.btn-like:hover { border-color: var(--primary); color: var(--text); transform: translateY(-1px); }
.btn-like.active { background: #fff1ec; border-color: #e8a48c; color: #c2552a; }
.btn-like .like-icon { font-size: 17px; line-height: 1; }
.btn-like.active .like-icon { animation: like-pop .3s ease; }
@keyframes like-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.like-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s ease;
}
.like-mini:hover { border-color: var(--primary); color: var(--text); }
.like-mini.active { color: #c2552a; border-color: #e8a48c; background: #fff1ec; }
.card-actions { display: flex; align-items: center; gap: 8px; }
.mat-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

/* ================= 评论区 ================= */
.comment-card { margin-top: 18px; }
.comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.comment-head h3 { font-size: 16px; }
.comment-form textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.comment-form textarea:focus { outline: none; border-color: var(--primary); background: var(--card); }
.comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 16px;
}
.comment-item {
  display: flex;
  gap: 11px;
  padding: 14px 0;
  border-top: 1px dashed var(--border);
}
#btn-fav.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.comment-reward {  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--primary-light);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.comment-rewards { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.comment-rewards .comment-reward { margin-top: 0; }
/* 管理端：多份奖励资料动态行 */
.reward-list { display: flex; flex-direction: column; gap: 8px; }
.reward-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
.reward-row input { height: 36px; padding: 0 11px; border: 1.5px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 13px; }
.reward-row input:focus { outline: none; border-color: var(--primary); }
.reward-row .btn-ghost { height: 36px; padding: 0 12px; }
@media (max-width: 560px) {
  .reward-row { grid-template-columns: 1fr; }
}
.comment-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #f1e4d8;
  color: #8a5a34;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 5px;
  font-size: 13.5px;
}
.comment-content { font-size: 14px; line-height: 1.75; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.comment-del {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
}
.comment-del:hover { color: #b3402c; text-decoration: underline; }
.comment-empty { padding: 22px 0; text-align: center; color: var(--text-2); font-size: 13.5px; }
.badge.status-pending { background: #fdf3e3; color: #a4702a; border: 1px solid #ecd9b8; }

/* 资料介绍 / 通关标准正文排版 */
.pre-line { white-space: pre-wrap; line-height: 1.85; }

@media (max-width: 640px) {
  .comment-form-foot { flex-direction: column; align-items: flex-start; }
  .comment-form-foot .btn { width: 100%; }
  .mat-actions .btn-like { flex: 1; justify-content: center; }
}

/* ---------- 标签体系编辑器 ---------- */
.tax-block { margin-bottom: 20px; }
.tax-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.tax-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 38px; }
.tax-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 6px 5px 12px; border-radius: 999px;
  background: var(--primary-light); color: var(--text);
  font-size: 13px; line-height: 1.4;
}
.tax-chip button {
  width: 20px; height: 20px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.75); color: var(--text-2);
  font-size: 12px; cursor: pointer; line-height: 1;
}
.tax-chip button:hover { background: #fff; color: var(--primary); }
.tax-chip button:disabled { opacity: .35; cursor: not-allowed; }
.tax-add { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tax-add input {
  flex: 1; min-width: 200px; padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px;
}

/* ---------- 数据导出 ---------- */
.export-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.export-grid .btn { justify-content: flex-start; text-align: left; }

/* ---------- 教师端（复用学生端界面，仅身份标识不同） ---------- */
body.role-teacher .topnav { box-shadow: inset 0 -2px 0 #b45309; }
body.role-teacher .brand::after {
  content: "教师"; margin-left: 8px; padding: 1px 8px;
  border-radius: 999px; background: var(--warning-light);
  color: var(--warning); font-size: 11px; vertical-align: middle;
}

/* ---------- 学生首页：大类入口 ---------- */
.landing {
  min-height: calc(100vh - 56px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 20px 72px;
}
.landing-inner { width: 100%; max-width: 1040px; text-align: center; }
.landing-title {
  font-family: var(--font-editorial);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700; letter-spacing: .06em; line-height: 1.25;
}
.landing-sub { color: var(--text-2); margin-top: 12px; font-size: 15px; letter-spacing: .04em; }
.cat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.cat-card {
  display: flex; flex-direction: column; gap: 6px;
  text-align: left; font-family: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 26px 24px 22px; min-height: 190px; cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s;
  animation: rise-in .6s var(--ease-out) backwards;
}
.cat-card:nth-child(2) { animation-delay: .07s; }
.cat-card:nth-child(3) { animation-delay: .14s; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-4); border-color: #d8d1cb; }
.cat-card-en {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--text-2);
}
.cat-card-title { font-family: var(--font-editorial); font-size: 30px; font-weight: 700; margin-top: 2px; }
.cat-card-desc { color: var(--text-2); font-size: 13.5px; line-height: 1.7; flex: 1; }
.cat-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border);
}
.cat-count { font-size: 12.5px; color: var(--text-2); font-family: var(--font-mono); }
.cat-arrow { font-size: 18px; transition: transform .3s var(--ease-out); }
.cat-card:hover .cat-arrow { transform: translateX(4px); }
.landing-foot { margin-top: 32px; letter-spacing: .08em; }

/* 列表视图 */
.list-view { padding-top: 22px; }
.back-link {
  background: none; border: none; padding: 0; margin-bottom: 16px;
  color: var(--text-2); font-size: 13.5px; font-family: inherit; cursor: pointer;
}
.back-link:hover { color: var(--text); }
.list-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.list-head .page-title { margin-bottom: 0; font-size: 26px; }

@media (max-width: 860px) {
  .landing { padding-top: 32px; align-items: flex-start; }
  .cat-cards { grid-template-columns: 1fr; }
  .cat-card { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cat-card { animation: none; }
}

/* ---------- 三端个人主页 ---------- */
.profile-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--text); color: #fff; font-weight: 700; font-size: 16px;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border);
}
.profile-avatar:hover { color: #fff; text-decoration: none; transform: translateY(-1px); }
.profile-avatar-large { width: 64px; height: 64px; font-size: 27px; }
.profile-summary { display: flex; align-items: center; gap: 16px; }
.profile-summary h2 { font-family: var(--font-display); margin-bottom: 3px; }
.profile-stats { margin-bottom: 16px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.profile-section-sub { margin: 4px 0 14px; }
.profile-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.profile-record { padding: 13px 0; border-top: 1px solid var(--border); }
.profile-record:first-child { border-top: none; padding-top: 4px; }
.profile-record-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.profile-record-body { color: var(--text-2); margin: 5px 0; white-space: pre-wrap; word-break: break-word; }
.profile-like-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-like-item { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #fffdfb; }
.profile-like-item .mat-meta { margin-top: 8px; }
.profile-empty { color: var(--text-2); text-align: center; padding: 22px 0; }
.activity-record { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.activity-detail { margin-left: 10px; color: var(--text-2); }
.material-info { margin-top: 16px; }

@media (max-width: 720px) {
  .profile-grid, .profile-like-grid { grid-template-columns: 1fr; }
  .activity-record { flex-direction: column; gap: 3px; }
  .activity-detail { display: block; margin-left: 0; }
}
@media (max-width: 600px) {
  .nav-inner { padding: 0 12px; }
  .nav-user { gap: 7px; }
  .nav-user .uname { display: none; }
  .nav-user .role-badge { display: none; }
}

/* ================= 封面页 ================= */
.btn-lg { height: 50px; padding: 0 32px; font-size: 16px; border-radius: 9999px; }

.cover-page { min-height: 100vh; position: relative; overflow: hidden; padding: 40px 20px 40px; }
.cover-cloud { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.cover-cloud span {
  position: absolute; font-family: var(--font-mono); font-size: 13px; letter-spacing: .12em;
  padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.72);
  color: var(--text-2); box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}
.cover-cloud span:nth-child(1){ top: 12%; left: 8%; animation-delay: -.8s; }
.cover-cloud span:nth-child(2){ top: 22%; right: 10%; animation-delay: -1.5s; }
.cover-cloud span:nth-child(3){ top: 60%; left: 6%; animation-delay: -2.2s; }
.cover-cloud span:nth-child(4){ top: 70%; right: 12%; animation-delay: -3s; }
.cover-cloud span:nth-child(5){ top: 40%; left: 46%; animation-delay: -1s; }
.cover-cloud span:nth-child(6){ top: 16%; left: 42%; animation-delay: -2.6s; }
.cover-cloud span:nth-child(7){ top: 78%; left: 40%; animation-delay: -3.4s; }
.cover-cloud span:nth-child(8){ top: 50%; right: 30%; animation-delay: -1.8s; }
@keyframes float { 0%,100%{ transform: translateY(0) rotate(-2deg);} 50%{ transform: translateY(-14px) rotate(2deg);} }

.cover-hero { position: relative; z-index: 1; max-width: 820px; margin: 36px auto 0; text-align: center; }
.cover-badge { display: inline-block; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.78); border: 1px solid var(--border); font-size: 12px; letter-spacing: .2em; color: var(--text-2); font-family: var(--font-mono); }
.cover-title { font-family: var(--font-editorial); font-size: clamp(30px, 5.4vw, 52px); font-weight: 700; line-height: 1.25; margin: 18px 0 14px; letter-spacing: .02em; }
.cover-accent { color: #c2552a; }
.cover-sub { color: var(--text-2); font-size: 15.5px; line-height: 1.9; }
.cover-cta { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cover-cta-note { font-size: 12.5px; color: var(--text-2); }

.cover-steps { position: relative; z-index: 1; max-width: 960px; margin: 52px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cover-steps .step { background: rgba(255,255,255,.72); border: 1px solid var(--border); border-radius: 16px; padding: 22px 20px; text-align: left; }
.step-num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em; color: var(--text-2); }
.cover-steps .step h3 { font-family: var(--font-display); font-size: 17px; margin: 6px 0 6px; }
.cover-steps .step p { color: var(--text-2); font-size: 13.5px; line-height: 1.7; }

.cover-features { position: relative; z-index: 1; max-width: 960px; margin: 28px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cover-features .feature { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px 20px; box-shadow: var(--shadow); }
.feature-emoji { font-size: 26px; }
.cover-features .feature h3 { font-family: var(--font-display); font-size: 16px; margin: 8px 0 6px; }
.cover-features .feature p { color: var(--text-2); font-size: 13px; line-height: 1.75; }

.cover-foot { position: relative; z-index: 1; text-align: center; color: var(--text-2); font-size: 12px; margin-top: 48px; }

@media (max-width: 760px) {
  .cover-steps, .cover-features { grid-template-columns: 1fr; }
  .cover-cloud span:nth-child(n+5){ display: none; }
}

/* ================= 学生悬浮诊断 ================= */
.diag-fab {
  position: fixed; right: 22px; bottom: 24px; z-index: 999;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #262629, #4a4a55); color: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 10px 24px rgba(38,38,41,.35);
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.diag-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(38,38,41,.45); }
.diag-fab:active { transform: scale(.97); }
.diag-fab-emoji { font-size: 17px; line-height: 1; }
/* 学生首页：大类页居中放在卡片下方，细分页放在大类标题右侧 */
.diag-fab-home { position: static; margin: 28px 0 0; }
.diag-fab-inline { position: static; margin: 0; align-self: center; }
@media (max-width: 560px) {
  .diag-fab:not(.diag-fab-home):not(.diag-fab-inline) .diag-fab-text { display: none; }
  .diag-fab:not(.diag-fab-home):not(.diag-fab-inline) { padding: 13px; }
}

.diag-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; align-items: flex-start; justify-content: center; z-index: 1000; overflow-y: auto; padding: 40px 16px; }
.diag-mask.open { display: flex; }
.diag-modal { position: relative; background: #fff; border-radius: 20px; width: 100%; max-width: 680px; padding: 26px 26px 30px; box-shadow: var(--shadow-4); animation: pop .2s ease; max-height: 88vh; overflow-y: auto; }
.diag-close { position: absolute; top: 12px; right: 14px; border: none; background: none; font-size: 26px; line-height: 1; color: var(--text-2); cursor: pointer; }
.diag-close:hover { color: var(--text); }
.diag-top, .diag-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.diag-step { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: var(--text-2); background: var(--primary-light); padding: 3px 10px; border-radius: 999px; }
.diag-back { border: none; background: none; color: var(--text-2); cursor: pointer; font-family: inherit; font-size: 13px; padding: 4px 6px; }
.diag-back:hover { color: var(--primary); }
.diag-h { font-family: var(--font-display); font-size: 22px; margin: 4px 0 6px; }
.diag-sub { color: var(--text-2); font-size: 13.5px; margin-bottom: 16px; }
.diag-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.diag-list { display: flex; flex-direction: column; gap: 10px; }
.diag-opt {
  text-align: left; background: #fff; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 14px 16px; cursor: pointer; font-family: inherit; color: var(--text);
  display: flex; flex-direction: column; gap: 3px; transition: all .15s;
}
.diag-opt:hover { border-color: var(--primary); background: #faf7f5; }
.diag-opt b { font-size: 15px; }
.diag-opt span { font-size: 12.5px; color: var(--text-2); }
.diag-opt-block { flex-direction: row; align-items: center; gap: 8px; }
.diag-result .diag-path { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.diag-judgment { font-family: var(--font-editorial); font-size: 18px; font-weight: 700; line-height: 1.6; margin-bottom: 16px; color: var(--text); }
.diag-block { margin-bottom: 16px; }
.diag-btitle { font-weight: 700; font-size: 13.5px; margin-bottom: 7px; display: flex; align-items: center; gap: 7px; }
.diag-btitle::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); }
.diag-bbody { font-size: 13.5px; line-height: 1.8; color: var(--text-2); }
.diag-methods { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.diag-method { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: #fffdfb; font-size: 13.5px; line-height: 1.7; transition: all .15s; }
.diag-method:hover { border-color: var(--primary); }
.diag-check { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; transition: all .15s; }
.diag-method.done { background: var(--success-light); border-color: #c5e3d8; }
.diag-method.done .diag-check { background: var(--success); border-color: var(--success); color: #fff; }
.diag-teacher summary { cursor: pointer; font-weight: 700; font-size: 13.5px; }
.diag-recs { margin-top: 4px; }
.diag-loading, .diag-rec-empty { color: var(--text-2); font-size: 13px; padding: 14px; text-align: center; background: #faf7f5; border-radius: 10px; }
.diag-rec-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fffdfb; margin-bottom: 8px; transition: all .15s; }
.diag-rec-card:hover { border-color: var(--primary); background: #fff; }
.diag-rec-card b { font-size: 14px; font-family: var(--font-editorial); }
.diag-rec-more { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--primary); font-weight: 600; }
.diag-courses { display: flex; flex-wrap: wrap; gap: 8px; }
.diag-course { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.5; padding: 8px 12px; border-radius: 9px; background: var(--primary-light); color: var(--text); border: 1px solid transparent; }
a.diag-course { border-color: var(--border); background: #fffdfb; transition: all .15s; }
a.diag-course:hover { border-color: var(--primary); background: #fff; }
.diag-course-out { font-size: 11px; color: var(--primary); font-weight: 600; }
@media (max-width: 560px) { .diag-grid { grid-template-columns: 1fr; } .diag-modal { padding: 20px 16px; } }
@media (prefers-reduced-motion: reduce) { .cover-cloud span, .diag-modal { animation: none; } }

/* ---------- 管理端帮助页 ---------- */
.help-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.help-head-text { flex: 1; min-width: 220px; }
.help-head-text h2 { font-family: var(--font-display); font-size: 24px; margin-bottom: 4px; }
.help-sec { margin-bottom: 16px; padding: 22px 24px; }
.help-sec h3 { font-family: var(--font-display); font-size: 19px; margin-bottom: 10px; }
.help-sec-body p { margin: 8px 0; line-height: 1.85; color: var(--text); }
.help-list { margin: 8px 0; padding-left: 1.25rem; }
.help-list li { margin: 5px 0; line-height: 1.8; }
.help-fig { margin: 16px 0 4px; text-align: center; }
.help-fig img { max-width: 100%; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.help-fig figcaption { font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
.callout-help {
  background: var(--primary-light); color: var(--primary-dark); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 14px;
}
.help-sec-edit { border: 1px dashed var(--primary); }
.help-edit-row { margin-bottom: 12px; }
.help-edit-row > label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--text-2); }
.help-edit-row input, .help-edit-row textarea, .help-edit-row select {
  width: 100%; padding: 8px 11px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--text); line-height: 1.7;
}
.help-edit-row input:focus, .help-edit-row textarea:focus, .help-edit-row select:focus { border-color: var(--primary); outline: none; }
.help-edit-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.help-edit-bar { display: flex; gap: 10px; flex-wrap: wrap; padding: 6px 0 24px; }
.help-feedback { margin-top: 20px; padding: 24px; }
.help-feedback h3 { font-family: var(--font-display); font-size: 19px; margin-bottom: 4px; }
.fb-title { font-size: 14px; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.fb-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fffdfb; }
.fb-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.fb-content { line-height: 1.75; white-space: pre-wrap; }
@media (max-width: 720px) { .help-edit-two { grid-template-columns: 1fr; } .help-sec { padding: 18px 16px; } }

/* 帮助页顶部目录栏（吸顶，点击跳转） */
.help-toc {
  position: sticky; top: 56px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px; padding: 8px 10px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.help-toc-label {
  font-size: 12px; font-weight: 700; color: var(--text-2); letter-spacing: .08em;
  padding-left: 4px; white-space: nowrap;
}
.help-toc-list { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding-bottom: 2px; }
.help-toc-list::-webkit-scrollbar { height: 4px; }
.help-toc-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.help-toc-item {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; font-size: 13px; color: var(--text-2); text-decoration: none;
  white-space: nowrap; border: 1px solid transparent; transition: all .15s;
}
.help-toc-item:hover { background: var(--primary-light); color: var(--primary-dark); }
.help-toc-item.active { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary); font-weight: 600; }
.help-toc-item .toc-num { font-family: var(--font-mono); font-size: 11px; opacity: .75; }
.help-sec { scroll-margin-top: 132px; }
@media (max-width: 720px) { .help-toc { padding: 6px 8px; } .help-toc-label { display: none; } }
