:root {
  --red: #ff4d4f;
  --red-dark: #e03336;
  --red-light: #fff1f0;
  --orange: #ff8c2b;
  --pink: #ffe9ec;
  --text: #1f2328;
  --text-2: #5c6470;
  --text-3: #8b95a1;
  --bg: #fdf7f7;
  --card: #ffffff;
  --line: #f0e3e3;
  --green: #2fa84f;
  --blue: #2f7ff5;
  --yellow: #e8a417;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(255, 77, 79, 0.08);
  --shadow-2: 0 2px 10px rgba(31, 35, 40, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1360px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ---------- 导航 ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: 1360px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 40px; width: auto; display: block; }
.nav-links { display: flex; gap: 2px; flex: 1; flex-wrap: nowrap; min-width: 0; }
.nav-links a {
  padding: 7px 12px; border-radius: 999px; font-size: 13.5px; color: var(--text-2); font-weight: 500; transition: .18s;
  white-space: nowrap; flex: none;
}
.nav-links a:hover { background: var(--red-light); color: var(--red); }
.nav-links a.active { background: var(--red); color: #fff; }
.nav-user { display: flex; align-items: center; gap: 8px; font-size: 14px; flex: none; }
/* 中等宽度：进一步收窄导航内边距，保证 10 个入口一行放得下 */
@media (max-width: 1330px) {
  .nav-inner { gap: 12px; }
  .nav-links { gap: 1px; }
  .nav-links a { padding: 7px 8px; font-size: 13px; }
}
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--red); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; transition: .18s;
}
.btn:hover { background: var(--red-dark); }
.btn.ghost { background: #fff; color: var(--red); border-color: var(--red); }
.btn.ghost:hover { background: var(--red-light); }
.btn.plain { background: #fff; color: var(--text-2); border-color: #e3e8ef; }
.btn.plain:hover { border-color: var(--red); color: var(--red); }
.btn.sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); }
.card-pad { padding: 20px; }
.page-title { font-size: 22px; margin: 0 0 4px; }
.page-sub { color: var(--text-3); font-size: 13px; margin-bottom: 18px; }

input, select, textarea {
  font-family: inherit; font-size: 14px; padding: 9px 12px;
  border: 1px solid #e3e8ef; border-radius: 10px; background: #fff; color: var(--text); outline: none; transition: .18s;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 77, 79, .12); }
label { font-size: 13px; color: var(--text-2); display: block; margin-bottom: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #f6eff0; }
tbody tr:hover { background: #fffaf9; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--red-light); color: var(--red); font-size: 12px; margin-right: 5px; }
.tag.grey { background: #f2f4f7; color: var(--text-2); }
.tag.green { background: #eaf7ee; color: var(--green); }
.tag.blue { background: #eaf1ff; color: var(--blue); }
.tag.orange { background: #fff4e6; color: var(--orange); }

.status { font-weight: 600; font-size: 13px; }
.status.accepted, .status.Accepted { color: var(--green); }
.status.wrong_answer { color: var(--red); }
.status.time_limit_exceeded { color: #d46b08; }
.status.memory_limit_exceeded { color: #d46b08; }
.status.runtime_error { color: #b5336a; }
.status.compile_error { color: #8b5cf6; }
.status.partial { color: var(--yellow); }
.status.pending, .status.judging { color: var(--text-3); }
.status.system_error { color: #8b5cf6; }

.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 18px; font-size: 14px; color: var(--text-3); }

/* ---------- 首页 ---------- */
.hero {
  margin: 24px 0; padding: 40px 34px; border-radius: 20px; color: #fff;
  background: linear-gradient(120deg, #ff6b6b 0%, #ff4d4f 45%, #ff8c2b 100%);
  box-shadow: 0 12px 32px rgba(255, 77, 79, .22);
  display: flex; align-items: center; gap: 30px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; bottom: -70px; width: 260px; height: 260px;
  background: rgba(255, 255, 255, .12); border-radius: 50%;
}
.hero-logo { width: 96px; height: 96px; border-radius: 22px; background: #fff; padding: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.12); z-index: 1; }
.hero h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: 1px; z-index: 1; }
.hero p { margin: 0 0 20px; opacity: .95; font-size: 15px; max-width: 560px; z-index: 1; }
.hero .btn { background: #fff; color: var(--red); font-weight: 600; }
.hero .btn.ghost { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.6); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { text-align: center; padding: 18px 10px; }
.stat-card b { display: block; font-size: 26px; color: var(--red); }
.stat-card span { font-size: 13px; color: var(--text-3); }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
.feature { padding: 20px; text-align: center; transition: .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ico { font-size: 26px; }
.feature b { display: block; margin: 8px 0 4px; font-size: 15px; }
.feature p { margin: 0; font-size: 12.5px; color: var(--text-3); }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; gap: 12px; }
.section-title h2 { font-size: 18px; margin: 0; }

/* ---------- 首页版块：锚点条 / 机构简介 / 老师介绍 ---------- */
.home-sec { scroll-margin-top: 72px; }
.home-sec.sec-flash > .section-title h2 { animation: secFlash .9s ease; }
@keyframes secFlash {
  0% { color: var(--red); }
  100% { color: inherit; }
}
.sec-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* 顶部版块锚点条：头图下方，点击平滑滚动到对应版块 */
.sec-anchor {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px;
  padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-2); width: fit-content; max-width: 100%;
}
.sec-anchor a {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--text-2);
  font-weight: 500; transition: .18s; white-space: nowrap;
}
.sec-anchor a:hover { background: var(--red-light); color: var(--red); }

/* 机构简介 */
.about-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
.about-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
  background: var(--red-light); color: var(--red); font-size: 13px; font-weight: 600;
}
.about-p { margin: 0 0 10px; font-size: 14px; color: var(--text-2); }
.idea-list { display: grid; gap: 8px; margin-top: 12px; }
.idea-item {
  display: flex; gap: 10px; align-items: baseline; font-size: 13.5px;
  padding: 8px 12px; border-radius: 10px; background: #fffaf9; border: 1px solid #fbf0f0;
}
.idea-item b { color: var(--red); font-size: 13.5px; flex: none; }
.idea-item span { color: var(--text-2); }
.about-side { display: grid; gap: 12px; }
.org-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.org-stat { padding: 14px 10px; text-align: center; }
.org-stat b { display: block; font-size: 24px; color: var(--red); line-height: 1.2; }
.org-stat b i { font-size: 14px; font-style: normal; }
.org-stat span { font-size: 12.5px; color: var(--text-3); }
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.adv-card { padding: 18px; transition: .2s; }
.adv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.adv-ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; background: var(--red-light); margin-bottom: 10px;
}
.adv-card b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.adv-card p { margin: 0; font-size: 12.5px; color: var(--text-3); }

/* 老师介绍：横向滑动 + 分页（桌面多列 / 移动端单列堆叠） */
.t-nav { display: flex; align-items: center; gap: 8px; }
.t-arrow {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-size: 18px; line-height: 1; cursor: pointer; transition: .18s;
}
.t-arrow:hover:not(:disabled) { background: var(--red-light); color: var(--red); border-color: var(--red); }
.t-arrow:disabled { opacity: .4; cursor: not-allowed; }
.t-dots { display: flex; gap: 6px; align-items: center; }
.t-dot {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%;
  background: #e3e8ef; cursor: pointer; transition: .18s;
}
.t-dot.on { background: var(--red); width: 18px; border-radius: 999px; }
.t-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 4px 2px 10px; scrollbar-width: thin;
}
.t-track::-webkit-scrollbar { height: 6px; }
.t-track::-webkit-scrollbar-thumb { background: #f0e3e3; border-radius: 999px; }
.t-card { flex: 0 0 calc((100% - 28px) / 3); scroll-snap-align: start; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.t-head { display: flex; align-items: center; gap: 12px; }
.t-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--pink); object-fit: cover; flex: none; }
.t-head-txt b { display: block; font-size: 15px; }
.t-title { font-size: 12.5px; color: var(--text-3); }
.t-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-years { font-size: 12.5px; color: var(--text-2); }
.t-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.t-bio { margin: 0; font-size: 12.5px; color: var(--text-3); line-height: 1.65; }

.ann-item { padding: 12px 16px; border-bottom: 1px solid #f6eff0; }
.ann-item:last-child { border-bottom: none; }
.ann-item b { font-size: 14px; }
.ann-item p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); white-space: pre-wrap; }

/* ---------- 题库 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filter-bar .f { display: flex; flex-direction: column; }
.diff-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.d1 { background: #7ed99a; } .d2 { background: #6cb6ff; } .d3 { background: #ffc53d; } .d4 { background: #ff9c6e; } .d5 { background: #ff4d4f; }
.solved-flag { color: var(--green); font-weight: 600; }

/* ---------- 题目详情 ---------- */
.problem-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }

/* Scratch 题：编辑器要用整宽，让侧栏横排在下面 */
.problem-layout.scratch-mode { grid-template-columns: 1fr; }
.problem-layout.scratch-mode > div:last-child { display: flex; flex-wrap: wrap; gap: 14px; }
.problem-layout.scratch-mode > div:last-child > * { flex: 1 1 250px; margin-top: 0; }

/* 内嵌的 Scratch 编辑器 */
.sb-frame {
  width: 100%; height: 820px; border: 1px solid #e2e8f0; border-radius: 12px;
  background: #e9f1fc; display: block; overflow: hidden;
}
.sb-frame.compact { height: 620px; }
/* 问卷作答页（2026-10-19 第二轮，183 轮改横版）：编辑器容器保持 GUI 原生
 * 1024:640（16:10）横版长方形（宽大于高），边看题边编程时编辑器不再竖向撑高占屏；
 * 配合 /scratch3 的窄容器缩放，界面完整可见 */
.sv-sb3 { width: 100%; height: 560px; }
@supports (aspect-ratio: 1) {
  .sv-sb3 { height: auto; aspect-ratio: 1024 / 640; }
}
.sb-frame-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.sb-frame-bar span { font-size: 12.5px; color: #8b95a1; }
.problem-body { padding: 24px; }
.problem-body h1 { font-size: 22px; margin: 0 0 6px; }
.problem-body h3 { font-size: 15px; margin: 22px 0 8px; color: var(--red); }
.problem-body p { white-space: pre-wrap; font-size: 14.5px; }
.problem-body pre {
  background: #fbf7f7; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; overflow-x: auto; white-space: pre-wrap;
}
.side-box { padding: 16px; margin-bottom: 14px; }
.side-box .row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: var(--text-2); }
.side-box .row b { color: var(--text); font-weight: 600; }

.editor-wrap { position: relative; }
#codeEditor {
  width: 100%; min-height: 260px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13.5px; line-height: 1.7; tab-size: 2; resize: vertical; background: #fffdfd;
}
.submit-bar { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.lang-select { min-width: 150px; }

/* ---------- 代码编辑器（语法高亮 + 换行自动缩进） ---------- */
.ce-wrap { position: relative; border-radius: 10px; }
.ce-wrap .ce-hl { position: absolute; inset: 0; margin: 0; pointer-events: none; }
.ce-wrap textarea::placeholder { color: #9aa3ad; -webkit-text-fill-color: #9aa3ad; }
.ce-wrap textarea::selection { background: rgba(255, 77, 79, .22); }
.tk-kw { color: #c2255c; }
.tk-bi { color: #862e9c; }
.tk-fn { color: #1c7ed6; }
.tk-str { color: #0a7d55; }
.tk-cm { color: #9aa3ad; }
.tk-num { color: #e8590c; }
.tk-pp { color: #a5761b; }
.tk-op { color: #5c6470; }

/* ---------- 题面 Markdown / LaTeX ---------- */
.md-h { font-size: 16px; font-weight: 700; margin: 16px 0 6px; color: var(--text); }
.md-h3 { font-size: 14.5px; }
.md-quote { border-left: 3px solid #ffd0d5; background: #fff8f8; border-radius: 0 8px 8px 0; padding: 6px 12px; margin: 8px 0; color: var(--text-2); font-size: 13.5px; }
.md-li { padding-left: 14px; margin: 2px 0; }
.md-math { font-family: 'Times New Roman', 'STIXGeneral', serif; font-style: italic; padding: 0 1px; }
.md-math sup, .md-math sub { font-size: 0.72em; }
.md-img { max-width: 100%; border-radius: 8px; margin: 6px 0; }
.md-pre { background: #fbf7f7; border: 1px solid #f0e3e3; border-radius: 10px; padding: 12px; overflow: auto; white-space: pre-wrap; }

/* ---------- 头像 ---------- */
.avatar { border-radius: 50%; object-fit: cover; display: inline-block; vertical-align: middle; background: #fff; border: 1px solid #eee; flex: none; }
.avatar-fb { display: inline-grid; place-items: center; background: var(--red); color: #fff; border: none; font-weight: 600; }
.av-nav { width: 24px; height: 24px; margin-right: 6px; font-size: 13px; }
.nav-me { display: inline-flex; align-items: center; }
.av-sm { width: 22px; height: 22px; margin-right: 6px; font-size: 12px; }
.rk-user { display: inline-flex; align-items: center; }
.av-big { width: 88px; height: 88px; font-size: 38px; }
.avatar-card { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.avatar-ops { display: flex; flex-direction: column; gap: 8px; }
.preset-avatars { display: flex; gap: 10px; flex-wrap: wrap; }
.pv-item { width: 54px; height: 54px; padding: 0; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; overflow: hidden; }
.pv-item img { width: 100%; height: 100%; display: block; }
.pv-item:hover { border-color: #ffb9cd; }
.pv-item.active { border-color: var(--red); }

/* ---------- 智能判断难度 / 标签 ---------- */
.auto-meta { margin: 4px 0 14px; padding: 10px 12px; border: 1px dashed #e3d3f5; border-radius: 10px; background: #fdfbff; }

/* ---------- 在线运行（样例自测）多样例切换 ---------- */
.rb-samples { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rb-samples .rb-label { font-size: 12.5px; color: #8b95a1; }
.rb-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.rb-tab {
  padding: 4px 12px; border-radius: 999px; border: 1px solid #e3e8ef; background: #fff;
  color: #5c6470; font-size: 12.5px; cursor: pointer; line-height: 1.6;
}
.rb-tab:hover { border-color: #ff4d4f; color: #ff4d4f; }
.rb-tab.active { background: var(--red); border-color: var(--red); color: #fff; }
.rb-expect { margin: 0 0 10px; }
.rb-expect .cap { font-size: 12px; color: #8b95a1; margin-bottom: 4px; }
.rb-expect pre {
  margin: 0; background: #f7fbf8; border: 1px solid #dcefe0; border-radius: 8px; padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px;
  white-space: pre-wrap; max-height: 130px; overflow: auto;
}

/* ---------- 比赛 ---------- */
.contest-card { padding: 18px 20px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.contest-card h3 { margin: 0 0 4px; font-size: 16px; }
.contest-card .meta { font-size: 12.5px; color: var(--text-3); }
.board-table td { text-align: center; font-size: 13px; }
.board-table td:first-child, .board-table td:nth-child(2) { text-align: left; }
.cell-ac { color: #fff; background: var(--green); border-radius: 8px; padding: 3px 8px; display: inline-block; min-width: 42px; }
.cell-fail { color: var(--red); background: var(--red-light); border-radius: 8px; padding: 3px 8px; display: inline-block; min-width: 42px; }
.cell-pending { color: var(--text-3); background: #f2f4f7; border-radius: 8px; padding: 3px 8px; display: inline-block; min-width: 42px; }

/* ---------- ACM 封榜 / 滚榜（166） ---------- */
.cell-ac.ct-ac-frozen { box-shadow: 0 0 0 2px #ffd591 inset; }
/* 本次揭晓新产出的通过：闪一下并轻微放大 */
.cell-ac.ct-cell-new { animation: ctCellIn 1.6s ease; }
@keyframes ctCellIn {
  0% { transform: scale(.6); box-shadow: 0 0 0 6px rgba(82, 196, 26, .35); }
  60% { transform: scale(1.12); box-shadow: 0 0 0 4px rgba(82, 196, 26, .22); }
  100% { transform: scale(1); box-shadow: none; }
}
/* 名次变化：表格行整行高亮 + 名次列右上角增减标记 */
.ct-row-up { animation: ctRowUp 1.6s ease; }
.ct-row-down { animation: ctRowDown 1.6s ease; }
@keyframes ctRowUp { 0% { background: #e8fff3; } 100% { background: transparent; } }
@keyframes ctRowDown { 0% { background: #fff1f0; } 100% { background: transparent; } }
.ct-rank-delta { margin-left: 4px; font-size: 11px; font-weight: 700; }
.ct-row-up .ct-rank-delta { color: var(--green); }
.ct-row-down .ct-rank-delta { color: var(--red); }
/* 滚榜控制台 */
.ct-roll { border: 1px solid #ffd8b0; background: #fffaf3; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.ct-roll-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.ct-roll-head b { font-size: 14px; }
.ct-roll-prog { color: var(--text-2); }
.ct-roll-next { color: var(--text-3); font-size: 12.5px; }
.ct-roll-bar { height: 8px; background: #f2e5d5; border-radius: 4px; overflow: hidden; margin: 10px 0; }
.ct-roll-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ffa45c, #ff7875); transition: width .6s ease; }
.ct-roll-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* 普通用户侧的滚榜进行中提示 */
.ct-roll-notice {
  border: 1px dashed #ffbe8f; background: #fffdf8; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 12px; font-size: 13px; color: var(--text-2); line-height: 1.8;
}
.ct-roll-notice b { color: #d46b08; }

/* ---------- 登录 / 表单 ---------- */
.auth-wrap { max-width: 420px; margin: 40px auto; padding: 28px; }
.auth-wrap h2 { margin: 0 0 6px; font-size: 20px; text-align: center; }
.auth-wrap .sub { text-align: center; color: var(--text-3); font-size: 13px; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field input, .field select, .field textarea { width: 100%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- 管理后台 ---------- */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-tabs button {
  padding: 8px 16px; border-radius: 999px; border: 1px solid #e3e8ef; background: #fff; cursor: pointer; font-size: 14px; color: var(--text-2);
}
.admin-tabs button.active { background: var(--red); color: #fff; border-color: var(--red); }
.tc-row { display: grid; grid-template-columns: 1fr 1fr 80px 40px; gap: 8px; margin-bottom: 8px; align-items: end; }
.tc-row textarea { min-height: 62px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; resize: vertical; width: 100%; }
.tc-row > div { display: flex; flex-direction: column; }
.tc-row .tc-score { height: 62px; text-align: center; }
.tc-row button { height: 62px; }

/* ---------- 弹窗 / 提示 ---------- */
.modal { position: fixed; inset: 0; background: rgba(31, 35, 40, .45); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal-box { background: #fff; border-radius: 16px; max-width: 820px; width: 100%; max-height: 86vh; overflow: auto; padding: 22px; position: relative; }
.modal-close { position: absolute; right: 14px; top: 10px; background: none; border: none; font-size: 24px; color: var(--text-3); cursor: pointer; }
.toast {
  position: fixed; left: 50%; top: 22px; transform: translateX(-50%); z-index: 200;
  background: #1f2328; color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
/* 题库四大板块切换（Scratch / 洛谷 / 一本通 / 智小兔原创） */
.src-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.src-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--text-2); font-size: 14px; text-decoration: none; transition: all .15s;
}
.src-tab:hover { border-color: var(--blue); color: var(--blue); }
.src-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.src-tab .src-n { font-size: 12px; opacity: .75; }
/* 板块题号（S-1 / L-1 / Y-1 / Z-1 / P-1） */
.pb-no { font-size: 12px; font-weight: 600; letter-spacing: .3px; vertical-align: middle; }
/* 题目星级（★ 实心金色 / ☆ 空心浅灰） */
.stars { color: #f5a623; white-space: nowrap; letter-spacing: 1.5px; font-size: 13px; }
.stars .stars-off { color: #d4d9e0; }

.toast.error { background: var(--red); }
.toast.warn { background: var(--orange); }
.toast.success { background: var(--green); }

/* ---------- 页脚 ---------- */
.footer { margin-top: 50px; border-top: 1px solid var(--line); background: #fff; }
.footer-inner { padding: 22px 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.footer-logo { width: 28px; height: 28px; border-radius: 8px; vertical-align: middle; margin-right: 8px; }

.empty { padding: 40px; text-align: center; color: var(--text-3); font-size: 14px; }

/* ---------- 题目页左右分栏（左题面 / 右编辑器） ---------- */
.problem-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ps-right { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1101px) {
  .ps-right { position: sticky; top: 70px; }
  .ps-right #codeEditor { min-height: 300px; }
}
.pb-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--text-2); margin: 8px 0 2px; }
.pb-meta b { color: var(--text); font-weight: 600; }

/* ---------- 题目页返回条（第206轮：班级作业进入时回「题目清单」） ---------- */
.pb-backbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.pb-backbar .btn.plain.sm { padding: 6px 14px; }
.pb-backtip { font-size: 12.5px; color: var(--text-2); }

/* ---------- 布置作业 · 选题列表（第208轮：每题一个「加入」按钮） ---------- */
.ap-list { max-height: 300px; overflow: auto; border: 1px solid var(--line, #f0e3e3); border-radius: 10px; background: #fff; }
.ap-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; font-size: 13.5px; border-bottom: 1px solid #f7f1f1; cursor: pointer; }
.ap-row:last-child { border-bottom: none; }
.ap-row:hover { background: #fdf7f7; }
.ap-row.ap-row-on { background: #f2faf4; }
.ap-row .ap-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-row .ap-add { flex: none; min-width: 76px; }
.ap-row .ap-add.ap-on { color: #2e9e5b; border-color: #bfe6cd; background: #eefaf2; font-weight: 600; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; }
.ap-chip { display: inline-flex; align-items: center; gap: 5px; background: #eefaf2; border: 1px solid #bfe6cd; color: #2e7d4f; border-radius: 999px; padding: 2px 4px 2px 10px; max-width: 280px; }
.ap-chip .ap-t, .ap-chip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-chip .ap-x { cursor: pointer; font-style: normal; font-weight: 700; width: 18px; height: 18px; line-height: 17px; text-align: center; border-radius: 50%; background: #d9f2e2; }
.ap-chip .ap-x:hover { background: #ff4d4f; color: #fff; }

/* ---------- 测试点信息：彩色卡片网格 ---------- */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.tc-cell { border-radius: 9px; padding: 8px 6px; text-align: center; color: #fff; display: flex; flex-direction: column; gap: 1px; }
.tc-cell .tc-idx { font-size: 11px; opacity: .85; }
.tc-cell .tc-st { font-size: 17px; line-height: 1.35; letter-spacing: .5px; }
.tc-cell .tc-meta { font-size: 11px; opacity: .92; white-space: nowrap; }
.tc-accepted { background: #52c41a; }
.tc-wrong_answer { background: #ff4d4f; }
.tc-time_limit_exceeded, .tc-memory_limit_exceeded { background: #fa8c16; }
.tc-runtime_error { background: #eb2f96; }
.tc-system_error { background: #8b5cf6; }

/* ---------- AC 庆祝动画 ---------- */
.celebrate { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; }
.cele-bg { position: absolute; inset: 0; overflow: hidden; background: rgba(31, 35, 40, .28); backdrop-filter: blur(1px); }
.cele-bg i { position: absolute; top: -24px; display: block; border-radius: 2px; animation: celeFall linear forwards; }
@keyframes celeFall { to { transform: translateY(112vh) rotate(720deg); } }
.cele-card {
  position: relative; cursor: pointer; text-align: center; padding: 34px 62px;
  background: radial-gradient(circle at 30% 25%, #fff8dc, #ffe9a8 70%, #ffd98e);
  border-radius: 26px; box-shadow: 0 18px 60px rgba(255, 170, 0, .45), 0 0 0 6px rgba(255, 255, 255, .7);
  animation: celePop .5s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes celePop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.cele-star {
  font-size: 64px; line-height: 1;
  background: linear-gradient(180deg, #ffd53d, #ff8c2b); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 10px rgba(255, 160, 0, .5));
  animation: celeWob 2.4s ease-in-out infinite;
}
@keyframes celeWob { 0%, 100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(8deg) scale(1.12); } }
.cele-text { font-size: 26px; font-weight: 800; color: #ff8c2b; margin-top: 6px; }
.cele-congrats { font-size: 36px; font-weight: 900; color: #ff4d4f; letter-spacing: 2px; }
.cele-tip { font-size: 13px; color: #a5682a; margin-top: 6px; }

/* ---------- 移动端导航（汉堡菜单） ---------- */
.nav-burger { display: none; }

@media (max-width: 1100px) {
  .problem-split { grid-template-columns: 1fr; }
  .hn-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .problem-layout { grid-template-columns: 1fr; }
  .stat-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 28px 22px; }
  .hero-logo { width: 72px; height: 72px; }
  /* 机构简介：正文与数据改为上下堆叠，优势卡两列 */
  .about-wrap { grid-template-columns: 1fr; }
  .adv-grid { grid-template-columns: repeat(2, 1fr); }
  /* 老师介绍：每屏两张卡 */
  .t-card { flex-basis: calc((100% - 14px) / 2); }
  .nav-burger {
    display: grid; place-items: center; flex: none;
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
    background: #fff; font-size: 18px; cursor: pointer; color: var(--text-2);
  }
  .nav-inner { gap: 10px; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 2px; padding: 8px 14px 14px;
    border-bottom: 1px solid var(--line); box-shadow: 0 14px 26px rgba(31, 35, 40, .08);
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; }
}

@media (max-width: 700px) {
  .container { padding: 0 12px; }
  .nav-inner { padding: 8px 12px; }
  .nav-user .btn { padding: 5px 9px; font-size: 12.5px; }
  /* 窄屏：隐去昵称文字只留头像，给消息铃铛与汉堡按钮让出空间 */
  .nav-user .nav-me span { display: none; }
  .nav-user .btn { padding: 5px 8px; }
  .nav-bell { padding: 5px 7px !important; }
  .hero { padding: 22px 18px; margin: 16px 0; }
  .hero h1 { font-size: 22px; }
  /* 机构简介：优势卡单列堆叠；老师介绍：卡片单列（纵向堆叠 + 横滑翻页） */
  .adv-grid { grid-template-columns: 1fr; }
  .t-card { flex-basis: 100%; }
  .sec-anchor { gap: 4px; padding: 5px; }
  .sec-anchor a { padding: 6px 11px; font-size: 12.5px; }
  .org-stats { gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .problem-body { padding: 16px; }
  .problem-body h1 { font-size: 19px; }
  .card-pad { padding: 14px; }
  .modal { padding: 10px; }
  .modal-box { padding: 16px 14px; max-height: 92vh; }
  th, td { padding: 8px; }
  table { font-size: 13px; }
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .admin-tabs button { white-space: nowrap; }
  .cele-card { padding: 24px 36px; }
  .cele-star { font-size: 48px; }
  .cele-text { font-size: 20px; }
  .cele-congrats { font-size: 27px; }
  .filter-bar { align-items: stretch; }
  .filter-bar .f { flex: 1 1 45%; }
  .contest-card { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .pt-grid { grid-template-columns: 1fr; }
  .tc-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
}

/* ---------- 在线 Scratch 积木编辑器 ---------- */
.sbed { border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; overflow: hidden; }
.sbed-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.sbed-sprites { display: flex; gap: 6px; flex-wrap: wrap; }
.sbed-tab { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 6px 3px 10px; font-size: 13px; color: var(--text-2); }
.sbed-tab.on { background: #ff4d4f; border-color: #ff4d4f; color: #fff; }
.sbed-tab.add { border-style: dashed; padding: 4px 10px; cursor: pointer; background: #fff; }
.sbed-tab-btn { border: none; background: transparent; color: inherit; font-size: 13px; padding: 0; cursor: pointer; }
.sbed-tab-x { border: none; background: transparent; color: inherit; opacity: .65; font-size: 11px; cursor: pointer; padding: 0 2px; }
.sbed-tab-x:hover { opacity: 1; color: #fff; }
.sbed-ops { display: flex; align-items: center; gap: 8px; }
.sbed-count { font-size: 12px; color: var(--text-3); }
.sbed-main { display: grid; grid-template-columns: 190px 1fr 320px; gap: 10px; padding: 10px; }
.sbed-palette { max-height: 460px; overflow: auto; }
.sbed-cat { margin-bottom: 10px; }
.sbed-cat-title { color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 8px 8px 0 0; }
.sbed-blk-mini { display: block; width: 100%; text-align: left; border: none; color: #fff; font-size: 12px; padding: 5px 9px; margin-top: 3px; border-radius: 6px; cursor: pointer; line-height: 1.35; }
.sbed-blk-mini:hover { filter: brightness(1.06); }
.sbed-scripts { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 260px; max-height: 460px; overflow: auto; }
.sbed-hint { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.sbed-col { border: 1px dashed #e3e8ef; border-radius: 10px; padding: 8px; margin-bottom: 10px; background: #fff; }
.sbed-col.on { border-color: #ff4d4f; background: #fffafb; }
.sbed-node { margin-bottom: 4px; }
.sbed-blk { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.sbed-blk.hat { border-radius: 16px 8px 8px 8px; }
.sbed-blk-label { flex: 1; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sbed-arg { border: 1px solid rgba(0,0,0,.15); background: #fff; color: #333; border-radius: 999px; padding: 1px 8px; font-size: 12px; width: 64px; max-width: 120px; }
.sbed-btns { display: flex; gap: 2px; }
.sbed-btns button { border: none; background: rgba(255,255,255,.28); color: #fff; border-radius: 6px; width: 22px; height: 22px; font-size: 12px; cursor: pointer; }
.sbed-btns button:hover { background: rgba(255,255,255,.5); }
.sbed-sub { margin: 4px 0 4px 16px; border-left: 3px solid #ffd0d2; padding: 6px 8px; background: #fffdfb; border-radius: 0 8px 8px 0; min-height: 30px; }
.sbed-sub.on { border-left-color: #ff4d4f; background: #fff5f6; }
.sbed-sub-empty, .sbed-empty { font-size: 12px; color: #b6bec9; padding: 4px 2px; }
.sbed-stage { text-align: center; }
.sbed-stage canvas { width: 100%; max-width: 320px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sbed-stage-tip { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.sbed.compact .sbed-main { grid-template-columns: 1fr; }
.sbed.compact .sbed-palette { display: flex; flex-wrap: wrap; gap: 4px; }
.sbed.compact .sbed-cat { margin: 0; }
.sbed.compact .sbed-blk-mini { width: auto; }
.sbed.compact .sbed-stage { display: none; }
@media (max-width: 900px) {
  .sbed-main { grid-template-columns: 1fr; }
  .sbed-stage canvas { max-width: 100%; }
}

/* ---------- 积木编辑器 v2（复刻 Scratch 离线版） ---------- */
.sbed-trash { border: 1px dashed #e0b4b6; border-radius: 8px; padding: 6px; font-size: 12px; color: #b0787a; text-align: center; margin-bottom: 8px; background: #fffafa; }
.sbed-trash.on { background: #ffe9ea; border-color: #ff4d4f; color: #ff4d4f; font-weight: 600; }
.sbed-cat-body { background: #f6f8fb; border: 1px solid var(--line); border-top: none; border-radius: 0 0 8px 8px; padding: 6px; }
.sbed-blk-mini { cursor: grab; user-select: none; box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.sbed-blk-mini:active { cursor: grabbing; }
.sbed-blk-mini.hat { border-radius: 12px 6px 6px 6px; }
.sbed-blk-mini.c { border-radius: 6px 6px 10px 6px; }
.sbed-blk-mini.cap { border-radius: 6px; border-bottom: 3px solid rgba(0,0,0,.18); }
.sbed-blk-mini.reporter { border-radius: 999px; text-align: center; }
.sbed-blk-mini.boolean { border-radius: 12px; text-align: center; }
.sbed-imp { display: inline-flex; align-items: center; cursor: pointer; }
.sbed-node { cursor: grab; }
.sbed-node:active { cursor: grabbing; }
.sbed-blk.round { border-radius: 999px; display: inline-flex; padding: 3px 12px; }
.sbed-blk.cap { border-bottom: 3px solid rgba(0,0,0,.18); }
.sbed-blk.c { border-radius: 8px 8px 12px 8px; }
.sbed-node > .sbed-blk.round { margin-bottom: 2px; }
.sbed-slot { display: inline-flex; align-items: center; gap: 3px; }
.sbed-embed { display: inline-flex; align-items: center; gap: 4px; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; cursor: pointer; }
.sbed-embed:hover { filter: brightness(1.08); }
.sbed-embed-sel { border: 1px solid rgba(0,0,0,.15); background: #fff; color: #333; border-radius: 999px; font-size: 11px; padding: 1px 4px; max-width: 96px; }
.sbed-sub-else { margin-left: 16px; font-size: 12px; color: var(--text-3); padding: 2px 0 0 10px; }
.sbed-col.dragover, .sbed-sub.dragover { background: #fff2f3; border-color: #ff4d4f; }
.sbed-inspector { margin-top: 10px; text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.sbed-insp-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed #eef1f5; }
.sbed-insp-row:last-child { border-bottom: none; }
.sbed-insp-row b { width: 34px; flex: none; color: var(--text-2); font-weight: 600; }
.sbed-chip { display: inline-flex; align-items: center; gap: 4px; background: #f2f5f9; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.sbed-chip:hover { background: #eaf0f7; }
.sbed-mini { border: 1px dashed var(--line); background: #fff; color: var(--text-2); border-radius: 999px; font-size: 12px; padding: 2px 8px; cursor: pointer; }
.sbed-mini:hover { border-color: #ff4d4f; color: #ff4d4f; }
.sbed-mini-sel { border: 1px solid var(--line); background: #fff; color: var(--text-2); border-radius: 999px; font-size: 12px; padding: 2px 6px; cursor: pointer; }
.sbed-x { border: none; background: transparent; color: #b6bec9; cursor: pointer; font-size: 12px; padding: 0 2px; }
.sbed-x:hover { color: #ff4d4f; }

/* ---------- 题面多样例 ---------- */
.sample-block { margin: 10px 0 16px; }
.sample-block h3 { font-size: 14px; margin: 0 0 6px; }
.sample-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sample-grid pre { margin: 0; background: #fbf7f7; border: 1px solid #f0e3e3; border-radius: 8px; padding: 10px; white-space: pre-wrap; font-size: 13px; }
.sample-cap { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
@media (max-width: 700px) { .sample-grid { grid-template-columns: 1fr; } }

/* ---------- 建题弹窗：样例编辑区 ---------- */
.sample-editor { border: 1px dashed #f0c8c8; background: #fffdfb; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.sample-editor-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }

/* ---------------- 问卷板块 ---------------- */
.sv-design { display: grid; grid-template-columns: 240px 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .sv-design { grid-template-columns: 1fr; } }
.sv-palette, .sv-settings { position: sticky; top: 76px; }
.sv-palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sv-type-btn { background: #fffdfb; width: 100%; margin: 0; text-align: center; padding-left: 4px; padding-right: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-type-btn:hover { border-color: var(--red); color: var(--red); }
.sv-qcard { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fffdfb; }
.sv-qcard:hover { border-color: #ffc9ca; }
.sv-qhead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.sv-qops { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.sv-settings .field { margin-bottom: 10px; }
.sv-settings .field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 4px; }
.sv-settings input[type=text], .sv-settings input:not([type]), .sv-settings input[type=number],
.sv-settings input[type=password], .sv-settings input[type=datetime-local],
.sv-settings select, .sv-settings textarea { width: 100%; }

/* 答卷页 */
.sv-fill { max-width: 820px; margin: 0 auto; }
.sv-fill-head { text-align: center; }
.sv-question { border-top: 1px dashed var(--line); padding: 14px 0; }
.sv-question:first-child { border-top: none; }
.sv-qtitle { font-size: 14.5px; margin-bottom: 6px; }
.sv-qbody { padding-left: 4px; }
.sv-opt { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.sv-opt:hover { background: #fff6f6; }
/* 图片选项（搬运的图形化试卷：选项本身是 Scratch 积木截图） */
.sv-opt > span { display: block; }
.sv-opt-img { display: block; margin-top: 6px; background: #fff; }
.sv-opt-previews { margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.sv-opt-preview { display: flex; align-items: flex-start; gap: 6px; padding: 6px 8px; border: 1px dashed #f0e3e3; border-radius: 8px; font-size: 12.5px; color: #8b95a1; }
.sv-sort-item .sv-opt-img { margin-top: 4px; max-height: 56px; }
.sv-input { width: 100%; border: 1px solid #e3e8ef; border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: inherit; }
.sv-input:focus { outline: none; border-color: var(--red); }
.sv-sort-pool { display: flex; gap: 6px; flex-wrap: wrap; }
.sv-sort-item.on { border-color: var(--red); color: var(--red); }
.sv-sort-rank { margin: 6px 0 0; padding-left: 22px; font-size: 13.5px; }
.sv-sort-rank li { margin-bottom: 2px; }
.sv-matrix-wrap { overflow: auto; }
.sv-matrix { border-collapse: collapse; font-size: 13.5px; width: 100%; }
.sv-matrix th, .sv-matrix td { border: 1px solid var(--line); padding: 6px 10px; text-align: center; }
.sv-matrix thead th { background: #fff6f6; }
.sv-matrix tbody td:first-child { text-align: left; background: #fffdfb; }
.sv-scale { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sv-scale-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #e3e8ef; background: #fff; cursor: pointer; font-size: 13px; }
.sv-scale-btn.on { background: var(--red); border-color: var(--red); color: #fff; }
.sv-rate { display: flex; align-items: center; gap: 2px; }
.sv-star { font-size: 26px; border: none; background: none; cursor: pointer; color: #d8dee7; line-height: 1; padding: 0 2px; }
.sv-star.on { color: #ffb400; }
.sv-rate-text { margin-left: 8px; font-size: 13px; color: var(--text-2); }
.sv-code-area { width: 100%; border: 1px solid #e3e8ef; border-radius: 8px; padding: 10px; font-family: Consolas, Monaco, monospace; font-size: 13px; line-height: 1.5; resize: vertical; }
.sv-code-area:focus { outline: none; border-color: var(--red); }
.sv-lang { border: 1px solid #e3e8ef; border-radius: 8px; padding: 5px 8px; font-size: 13px; background: #fff; }
.sv-run-out { margin-top: 8px; }
.sv-run-out:empty { display: none; }
/* 程序填空 / 程序阅读题 */
.sv-blank-box { line-height: 2.4; }
.sv-blank { display: inline-block; border: 1px solid var(--red); border-radius: 6px; padding: 1px 6px; font-family: Consolas, Monaco, monospace; font-size: 13px; text-align: center; background: #fff; }
.sv-blank:focus { outline: none; box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.15); }

/* ---------------- 积分商城 / 荣誉榜 ---------------- */
.btn.danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; }
.avatar.sm-av { width: 22px; height: 22px; font-size: 11px; display: inline-grid; margin-right: 4px; vertical-align: -5px; }

.pt-balance {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px; background: linear-gradient(120deg, #fff1f0 0%, #fff8f0 100%);
}
.pt-balance > div:first-child b { display: block; font-size: 30px; color: var(--red); line-height: 1.2; }
.pt-balance > div:first-child span { font-size: 13px; color: var(--text-2); }
.pt-balance-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pt-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); overflow: hidden; display: flex; flex-direction: column; }
.pt-item-img { height: 150px; background: #fff6f6; display: grid; place-items: center; overflow: hidden; }
.pt-item-img img { width: 100%; height: 100%; object-fit: cover; }
.pt-item-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pt-item-title { font-size: 15px; font-weight: 600; }
.pt-item-desc { font-size: 12.5px; color: var(--text-3); min-height: 34px; }
.pt-item-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pt-price { color: var(--red); font-size: 20px; font-weight: 700; }
.pt-price span { font-size: 12px; margin-left: 3px; font-weight: 400; }
.pt-stock { font-size: 12px; color: var(--text-3); }
.pt-item-body .btn { width: 100%; margin-top: auto; }

/* 荣誉时间轴 */
.hn-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .hn-layout { grid-template-columns: 1fr; } }
.hn-timeline { position: relative; padding-left: 96px; }
.hn-timeline::before { content: ""; position: absolute; left: 78px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(#ffb3b3, #ffe0b3); }
.hn-item { position: relative; margin-bottom: 16px; }
.hn-dot { position: absolute; left: -22px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px #fff1f0; }
.hn-date { position: absolute; left: -96px; top: 10px; width: 70px; text-align: right; font-size: 12.5px; color: var(--text-3); }
.hn-card { padding: 14px 16px; }
.hn-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; margin-bottom: 4px; }
.hn-user { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hn-solved { font-size: 12.5px; color: var(--text-3); }
.hn-solved b { color: var(--red); font-size: 13.5px; }
.hn-meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.hn-thumb { margin-top: 8px; max-width: 220px; max-height: 150px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; }

/* ---------------- 问卷：类型选择 / 开始作答 / 答卷解析 ---------------- */
/* 问卷分类筛选页签：全部 / 未分类 / 各自定义分类 */
.sv-cat-tab {
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text-2);
  padding: 5px 14px; font-size: 13px; font-family: inherit; cursor: pointer; transition: all .15s;
}
.sv-cat-tab:hover { border-color: #ffc9ca; color: var(--text-1); }
.sv-cat-tab.active { border-color: var(--red); background: var(--red-light); color: var(--red); font-weight: 600; }
.sv-kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 10px; }
.sv-kind-card {
  text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fffdfb;
  padding: 12px 14px; cursor: pointer; display: block; transition: all .15s; font-family: inherit;
}
.sv-kind-card:hover { border-color: #ffc9ca; box-shadow: var(--shadow-2); }
.sv-kind-card.active { border-color: var(--red); background: var(--red-light); box-shadow: var(--shadow); }
.sv-kind-icon { font-size: 22px; display: block; line-height: 1.2; }
.sv-kind-name { display: block; font-size: 14.5px; font-weight: 600; margin-top: 2px; }
.sv-kind-desc { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }

.sv-grade-box { border: 1px dashed #f0c8c8; background: #fffdfb; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.sv-grade-box input[type=number] { width: 100%; }

.sv-cover { text-align: center; padding: 34px 22px 30px; }
.sv-cover-icon { font-size: 52px; line-height: 1.2; }
.sv-cover-desc { color: var(--text-2); font-size: 14px; margin: 0 auto 10px; max-width: 620px; white-space: pre-wrap; }
.sv-cover-meta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); margin-bottom: 22px; }
.sv-start-btn { padding: 10px 42px; font-size: 16px; border-radius: 24px; }

.sv-fill-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sv-prog-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sv-prog { width: 130px; height: 7px; border-radius: 4px; background: #f2e7e7; overflow: hidden; }
.sv-prog i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #ff8c2b, var(--red)); transition: width .25s; }

.sv-analysis-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: var(--card); }
.sv-analysis-q { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.sv-analysis-a { margin-top: 8px; padding: 8px 10px; background: #fffdfb; border-radius: 8px; font-size: 14px; border: 1px dashed #f0e3e3; }
/* 姓名自动填充说明行：只在姓名输入框正下方出现，「不使用」为弱化成链接的按钮 */
.sv-name-tip { font-size: 12px; color: #8b95a1; margin-top: 4px; }
.sv-name-tip .sv-name-clear { border: 0; background: none; color: #ff4d4f; font-size: 12px; cursor: pointer; padding: 0; text-decoration: underline; }
.sv-name-tip .sv-name-clear:hover { color: #d9363e; }
/* 提交后订正：错题卡片左侧红条标识，下方附原答案 / 正确答案 / 解析 */
.sv-correction-item { border: 1px solid var(--line); border-left: 4px solid #ff4d4f; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--card); }
.sv-correction-ref { margin-top: 10px; padding: 8px 10px; background: #fffdfb; border: 1px dashed #f0e3e3; border-radius: 8px; }
.sv-note { font-size: 13.5px; color: var(--text-2); background: #fffdfb; border-left: 3px solid #ffc9ca; padding: 6px 10px; border-radius: 0 8px 8px 0; white-space: pre-wrap; }

/* 问卷作答页：编程题题面直接展示 */
.sv-pdesc { border: 1px solid #e7e2dc; border-radius: 10px; background: #fcfbf9; margin-bottom: 10px; }
.sv-pdesc > summary { cursor: pointer; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--text-1); }
.sv-pdesc-body { padding: 2px 14px 12px; font-size: 13.5px; line-height: 1.8; }
.sv-pdesc-body h4 { margin: 10px 0 4px; font-size: 13.5px; color: var(--text-1); }
.sv-pdesc-sample { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.sv-pdesc-sample > div { flex: 1 1 240px; min-width: 200px; }
.sv-pdesc-sample pre { background: #f6f4f1; border: 1px solid #e7e2dc; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; white-space: pre-wrap; margin: 4px 0 0; }
.sv-qtitle .tag.grey { margin-left: 2px; }

/* 答卷页：答题卡（实时显示已答 / 未答题号） */
.sv-card { position: fixed; right: 14px; top: 92px; width: 214px; z-index: 40; padding: 12px 12px 14px; box-shadow: var(--shadow-2); }
.sv-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.sv-card-min { border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 12px; padding: 2px 8px; cursor: pointer; color: var(--text-2); font-family: inherit; }
.sv-card-min:hover { border-color: var(--red); color: var(--red); }
.sv-card-sum { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; line-height: 1.6; }
.sv-card-left { color: var(--red); }
.sv-card-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sv-cell {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; border: 1px solid #e3e8ef;
  background: #fff; font-size: 12.5px; font-family: inherit; cursor: pointer; color: var(--text-2);
  display: grid; place-items: center; transition: all .15s; padding: 0;
}
.sv-cell:hover { border-color: var(--red); color: var(--red); }
.sv-cell.done { background: #eaf7ee; border-color: #93d3a8; color: #178a44; font-weight: 600; }
.sv-cell.part { background: #fff6e6; border-color: #ffc978; color: #c4741a; font-weight: 600; }
.sv-cell.todo { background: #fff; border-color: #e3e8ef; color: var(--text-3); }
.sv-cell.req { box-shadow: inset 0 0 0 1px #ff8983; }
.sv-card-sec {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--text-1); line-height: 1.4;
  padding: 7px 0 1px 7px; border-top: 1px dashed var(--line); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sv-card-sec::before { content: ""; width: 3px; height: 11px; border-radius: 2px; background: var(--red); flex: none; }
.sv-card-sec:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.sv-card-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); margin-top: 10px; }
.sv-card-legend span { display: inline-flex; align-items: center; gap: 4px; }
.sv-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid #e3e8ef; background: #fff; }
.sv-dot.done { background: #eaf7ee; border-color: #93d3a8; }
.sv-dot.part { background: #fff6e6; border-color: #ffc978; }
.sv-card-reqtip { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.sv-card-float {
  position: fixed; right: 14px; top: 92px; z-index: 40; border: 1px solid var(--line); border-radius: 20px;
  background: #fff; box-shadow: var(--shadow-2); padding: 7px 12px; cursor: pointer; font-size: 13px;
  color: var(--text-2); font-family: inherit;
}
.sv-card-float:hover { border-color: var(--red); color: var(--red); }
.sv-question.sv-q-flash { animation: svFlash 1.4s ease; border-radius: 10px; }
/* 滑动切换提示：仅触屏窄屏显示（桌面保持原长卷布局） */
.sv-swipe-hint { display: none; font-size: 12px; color: var(--text-3); width: 100%; }
@keyframes svFlash {
  0%, 100% { background: transparent; }
  15% { background: #fff1f0; box-shadow: 0 0 0 6px #fff1f0; }
}
@media (max-width: 860px) {
  .sv-card { left: 12px; right: 12px; width: auto; top: 76px; }
  .sv-card-grid { grid-template-columns: repeat(8, 1fr); }
  .sv-swipe-hint { display: inline; }
}

/* ---------------- 问卷导入 / 搬运 ---------------- */
.sv-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.sv-tab { border: none; background: none; padding: 8px 14px; font-size: 14px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; }
.sv-tab:hover { color: var(--red); }
.sv-tab.active { color: var(--red); border-bottom-color: var(--red); font-weight: 600; }
.sv-tabpane { font-size: 13.5px; }
.sv-imp-status { min-height: 20px; font-size: 13px; color: var(--text-3); margin-bottom: 8px; }

/* ---------------- Scratch 测试模式：评分规则编辑器 ---------------- */
.srr-box { border: 1px solid var(--line); border-radius: 12px; background: #fffdfb; padding: 12px 14px; margin: 12px 0; }
.srr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; margin-bottom: 10px; }
.srr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.srr-cell { border: 1px dashed #f0c8c8; border-radius: 10px; padding: 10px 12px; background: var(--card); }
.srr-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.srr-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.srr-row select { flex: 1 1 190px; min-width: 160px; }
.srr-row input.srr-min { width: 72px; }
.srr-unit { font-size: 12px; color: var(--text-3); }
.srr-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px 10px; }
.srr-nums label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.srr-nums input { width: 70px; }
.srr-flags { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 12px; }
.srr-flag { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.srr-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; border-top: 1px dashed #f0c8c8; padding-top: 10px; }
.tag.red { background: #fff1f0; color: var(--red); }
/* 评分项分值 / 评分表自动识别 */
.srr-row input.srr-score,
.srr-nums input.srr-score,
.srr-flag input.srr-score { width: 58px; }
.srr-paste { margin-top: 10px; border-top: 1px dashed #f0c8c8; padding-top: 8px; }
.srr-paste > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); }
.srr-paste textarea { width: 100%; margin-top: 6px; font-size: 12.5px; font-family: inherit; }
.srr-pv { margin-top: 8px; font-size: 12.5px; }
.srr-pv table { width: 100%; border-collapse: collapse; }
.srr-pv th, .srr-pv td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.srr-pv input { width: 62px; }
.srr-manual { width: 100%; font-size: 12.5px; font-family: inherit; margin-top: 4px; }

/* ---------------- 在线课程（独立版块） ---------------- */
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cs-card { overflow: hidden; display: flex; flex-direction: column; transition: .2s; }
.cs-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cs-cover { position: relative; height: 130px; background: #f4f6f8; overflow: hidden; }
.cs-cat-badge { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.45); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.cs-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cs-title { font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.cs-title a:hover { color: var(--red); }
.cs-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.cs-meta .tag { margin-right: 0; }
.cs-sum { font-size: 12.5px; color: var(--text-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cs-teacher { font-size: 12.5px; color: var(--text-2); }
.cs-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.cs-head { display: flex; gap: 18px; flex-wrap: wrap; }
.cs-head-cover { width: 200px; height: 130px; border-radius: 10px; overflow: hidden; flex: none; background: #f4f6f8; }
.cs-lesson { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #f6eff0; }
.cs-lesson:last-child { border-bottom: none; }
.cs-lesson-no { width: 26px; height: 26px; border-radius: 50%; background: var(--red-light); color: var(--red); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.cs-lesson-title { font-size: 14.5px; font-weight: 600; }
.cs-lesson-title a:hover { color: var(--red); }
.cs-lesson-hw { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.cs-lesson-hw .tag { margin-right: 0; }
.cs-player { background: #1b1f26; border-radius: 12px; min-height: 180px; display: grid; place-items: center; padding: 20px; color: #fff; text-align: center; overflow: hidden; }
.cs-hw { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.cs-hw:last-child { margin-bottom: 0; }
.cs-hw-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.cs-hw-desc pre { background: #f7f8fa; padding: 8px 10px; border-radius: 8px; overflow: auto; }
.cs-hw textarea { min-height: 160px; font-family: Consolas, Monaco, monospace; font-size: 13px; }

/* 后台「题目管理」筛选栏：题型 / 难度 / 状态 / 创建者 / 排序 / 题目下拉 */
.p-fl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.p-fsel { font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); max-width: 100%; }
.p-fsel:focus { outline: none; border-color: var(--red); }
/* 题目下拉选中后定位到该行时的高亮 */
.p-row-flash { animation: pRowFlash 1.4s ease; }
@keyframes pRowFlash {
  0% { background: var(--red-light); }
  100% { background: transparent; }
}

/* 导航消息铃铛红点 */
.nav-bell { position: relative; }
.nav-dot {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 16px;
  text-align: center; font-weight: 600; box-shadow: 0 0 0 2px #fff;
}
/* 消息中心列表 */
.msg-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.msg-row:last-child { margin-bottom: 0; }
.msg-row.unread { background: #fff7f5; border-color: #ffccc7; }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-head b { font-size: 14.5px; }
.msg-time { margin-left: auto; font-size: 12px; color: var(--text-3); }
.msg-body { margin: 6px 0 8px; font-size: 13px; color: var(--text-2); line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.msg-ops { display: flex; gap: 6px; flex-wrap: wrap; }

/* 比赛实时柱状榜单 */
.ct-live { margin-bottom: 18px; }
.ct-live-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ct-upd { font-size: 12.5px; color: var(--text-3); }
/* 横向柱：外层 flex + order 排序，刷新时 DOM 不重建 → 宽度可平滑过渡 */
.ct-bars { display: flex; flex-direction: column; gap: 8px; }
.ct-bar-row { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 10px; transition: background .5s ease; }
.ct-bar-row.up { animation: ctUp 1.4s ease; }
.ct-bar-row.down { animation: ctDown 1.4s ease; }
@keyframes ctUp { 0% { background: #e8fff3; } 100% { background: transparent; } }
@keyframes ctDown { 0% { background: #fff1f0; } 100% { background: transparent; } }
.ct-bar-no { width: 34px; text-align: center; font-weight: 700; font-size: 14px; color: var(--text-2); flex: none; }
.ct-bar-name { width: 132px; flex: none; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-bar-track { flex: 1; height: 26px; background: #f2f4f7; border-radius: 13px; overflow: hidden; min-width: 60px; }
.ct-bar-fill {
  height: 100%; border-radius: 13px; min-width: 0;
  background: linear-gradient(90deg, #ff7a45, #ff4d4f);
  transition: width .8s cubic-bezier(.22, .61, .36, 1);
}
.ct-bar-val { width: 116px; flex: none; text-align: right; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ct-sec { margin: 16px 0 8px; font-size: 13px; color: var(--text-3); }
/* 每题竖向柱 */
.ct-pbars { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.ct-pbar { width: 58px; text-align: center; }
.ct-pbar-track {
  position: relative; height: 90px; background: #f2f4f7; border-radius: 8px;
  display: flex; align-items: flex-end; overflow: hidden;
}
.ct-pbar-sub { position: absolute; left: 0; right: 0; bottom: 0; background: #e3e7ee; transition: height .6s ease; }
.ct-pbar-fill { position: relative; width: 100%; border-radius: 8px 8px 0 0; transition: height .6s ease; min-height: 2px; }
.ct-pbar-lab { margin-top: 4px; font-size: 12.5px; font-weight: 600; }
.ct-pbar-num { font-size: 11.5px; color: var(--text-3); }
.ct-pbar-pend { color: var(--blue); }
@media (max-width: 700px) {
  .ct-bar-name { width: 84px; font-size: 12.5px; }
  .ct-bar-val { width: 92px; font-size: 12px; }
  .ct-pbar { width: 46px; }
}


/* ---------- 首页内容管理（后台）：机构简介 / 老师介绍 ---------- */
.hmc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hmc-tip { font-size: 12.5px; color: var(--text-3); font-weight: 400; }
.hmc-req { color: var(--red); }
.hmc-sub {
  display: flex; align-items: center; gap: 10px; margin: 16px 0 8px;
  font-size: 13px; color: var(--text-2);
}
.hmc-rows { display: flex; flex-direction: column; gap: 8px; }
.hmc-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hmc-row input { flex: 1 1 160px; min-width: 120px; }
.hmc-row .hmc-k { flex: 0 0 130px; }
.hmc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.hmc-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #f2f4f7; display: block; }
.about-contact { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.hmc-contact {
  display: inline-flex; align-items: center; gap: 6px; margin: 8px 10px 0 0;
  font-size: 13px; color: var(--text-2);
}
.hmc-contact i { font-style: normal; color: var(--text-3); font-size: 12.5px; }
/* 图片字段：预览 + 地址 + 上传 */
.hmc-img-field .hmc-img-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hmc-img-prev {
  width: 96px; height: 64px; flex: none; border: 1px solid var(--line); border-radius: 10px;
  background: #f7f8fa; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hmc-img-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hmc-img-act { flex: 1 1 260px; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.hmc-img-btns { display: flex; gap: 8px; }
/* 富文本编辑区（原生 contenteditable，不引第三方库） */
.rt-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.rt-btn {
  min-width: 32px; height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text-2); font-size: 12.5px; cursor: pointer;
}
.rt-btn:hover { border-color: var(--red); color: var(--red); }
.rt-area {
  min-height: 150px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 13.5px; line-height: 1.75; color: var(--text-1); outline: none;
}
.rt-area:focus { border-color: var(--red); }
.rt-area:empty::before { content: attr(data-ph); color: var(--text-3); }
.rt-area p { margin: 0 0 8px; }
.rt-area h3 { font-size: 15px; margin: 10px 0 6px; }
.rt-area blockquote {
  margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--red);
  background: #fff7f5; color: var(--text-2);
}
.rt-area ul, .rt-area ol { margin: 6px 0; padding-left: 22px; }
.rt-area img { max-width: 100%; border-radius: 8px; }
.hmc-preview .home-sec { padding-top: 0; }
/* 前台：机构封面 / Logo / 富文本正文 */
.about-cover {
  margin: 0 0 12px; border-radius: var(--radius); overflow: hidden; background: #f2f4f7;
}
.about-cover img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.about-logo { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; margin-right: 6px; vertical-align: middle; }
.about-rich { font-size: 13.5px; line-height: 1.85; color: var(--text-2); }
.about-rich p { margin: 0 0 8px; }
.about-rich h3 { font-size: 14.5px; margin: 10px 0 6px; color: var(--text-1); }
.about-rich blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--red); background: #fff7f5; }
.about-rich ul, .about-rich ol { margin: 6px 0; padding-left: 22px; }
.about-rich img { max-width: 100%; border-radius: 8px; margin: 6px 0; }
@media (max-width: 700px) {
  .hmc-row .hmc-k { flex: 1 1 100%; }
  .hmc-img-prev { width: 80px; height: 56px; }
}

/* ---------- 试卷自动采集（条件表单 / 进度 / 结果核对） ---------- */
.pc-bar { height: 8px; border-radius: 999px; background: #f0f2f5; overflow: hidden; }
.pc-bar-in { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff7a45, #ff4d4f); transition: width .4s ease; }
.pc-log {
  max-height: 150px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: #fafbfc; font-size: 12px; color: var(--text-3); line-height: 1.7;
}
.pc-log-line { white-space: pre-wrap; word-break: break-all; }
.pc-err { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: #fff2f0; color: #cf1322; font-size: 12.5px; }
.pc-srcs { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 12.5px; }
.pc-src-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 0; }
.pc-src-row a { color: var(--text-2); text-decoration: none; word-break: break-all; }
.pc-src-row a:hover { color: var(--red); }
.pc-host { color: var(--text-3); font-size: 12px; }
.pc-list { max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.pc-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.pc-item.review { background: #fffbf0; border-color: #ffe0a3; }
.pc-item.dup { opacity: .62; }
.pc-item-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.pc-pick { display: inline-flex; align-items: center; }
.pc-stem { font-size: 13.5px; color: var(--text-1); line-height: 1.7; white-space: pre-wrap; }
.pc-opts { margin-top: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.pc-opt { font-size: 12.5px; color: var(--text-2); }
.pc-img { max-width: 100%; max-height: 160px; margin-top: 6px; border-radius: 8px; }
.pc-ans { margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.pc-reason { color: #d46b08; }
.pc-exp { margin-top: 4px; font-size: 12.5px; color: var(--text-3); }
.pc-src { font-size: 12px; color: var(--blue); text-decoration: none; }
.pc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 700px) {
  .pc-opts { grid-template-columns: 1fr; }
  .pc-list { max-height: 52vh; }
}

/* ---------- 等考竞赛：班级「科目—等级」开放范围 ---------- */
.scope-tip { background: #f5f9ff; }
.scope-subj { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.scope-head { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13.5px; }
.scope-lvs { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0 2px 24px; }
.scope-lv { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
@media (max-width: 700px) { .scope-lvs { margin-left: 8px; } }

/* ---------- 后台：功能权限勾选 ---------- */
.perm-item { background: #fff; transition: border-color .15s, background .15s; }
.perm-item:hover { border-color: var(--blue); background: #f7fafe; }

/* ---------- 一键组卷（#/paper-build） ---------- */
.pb-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pb-left, .pb-right { display: flex; flex-direction: column; min-width: 0; }
.pb-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pb-lab { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.pb-sel { font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text-1); }
.pb-chk { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.pb-chkbox { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.pb-hint { font-size: 12.5px; color: var(--text-3); }
.pb-list { max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.pb-item { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: #fff; }
.pb-item.picked { background: #f7fafe; }
.pb-item-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pb-src { font-size: 12px; color: var(--text-3); margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42%; }
.pb-stem { font-size: 13px; color: var(--text-1); line-height: 1.6; margin-top: 5px; }
.pb-no { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; }
.pb-score { width: 62px; font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; }
.pb-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pb-rule { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12.5px; color: var(--text-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.pb-rule-n { width: 56px; font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 900px) {
  .pb-wrap { grid-template-columns: 1fr; }
  .pb-list { max-height: 40vh; }
}

/* ---------- ACM 滚榜控制台：窄屏 ---------- */
@media (max-width: 700px) {
  .ct-roll-btns .btn { font-size: 12.5px; }
  .ct-roll-head { font-size: 12.5px; }
}
