/* 考生端样式：响应式（手机/平板/电脑）+ 分类导航 + 切题动画 + 绿色时间戳 */

:root {
  --primary: #2f6fed;
  --primary-600: #2458c9;
  --primary-50: #eef4ff;
  --ok: #17936b;
  --ok-bg: #e8f6f1;
  --err: #d14343;
  --err-bg: #fdeded;
  --warn: #b7791f;
  --warn-bg: #fdf5e6;
  --info-bg: #eef4ff;
  --text: #16181d;
  --text-2: #5a6270;
  --text-3: #8b93a1;
  --line: #e8eaef;
  --line-2: #f2f4f7;
  --bg: #f7f8fa;
  --card: #fff;
  --r: 10px;
  --r-lg: 14px;
  --shadow: 0 2px 8px rgba(16, 24, 40, .06);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 极淡的顶部光晕：像车间天窗漏下来的光，不张扬，纯静态渐变零开销 */
  background:
    radial-gradient(1200px 420px at 78% -80px, rgba(31, 111, 237, .05), transparent 68%),
    radial-gradient(900px 380px at 12% -60px, rgba(22, 52, 92, .05), transparent 70%),
    var(--bg);
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--primary); text-decoration: none; }

/* ============ 容器：响应式 ============ */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
  /* 内容层压在首页粒子画布之上（画布 z-index:0，fixed） */
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) { .wrap { padding: 0 32px 40px; max-width: 1200px; } }
@media (min-width: 1280px) { .wrap { max-width: 1240px; } }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px; padding-top: 12px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
@media (min-width: 768px) { .topbar { padding: 14px 32px; margin-bottom: 26px; } }
.topbar h1 { font-size: 17px; margin: 0; font-weight: 500; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .back {
  background: var(--line-2); border-radius: 50%; width: 36px; height: 36px;
  display: grid; place-items: center; font-size: 20px; color: var(--text-2); flex-shrink: 0;
}
.topbar .back:active { background: var(--line); }

.btn {
  min-height: 46px; padding: 0 20px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 16px; font-weight: 500; transition: all .12s;
}
.btn:hover { border-color: #d0d4dc; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost { background: var(--primary-50); border-color: transparent; color: var(--primary); }
.btn-block { display: block; width: 100%; }

.card {
  background: var(--card); border-radius: var(--r-lg);
  padding: 20px; margin-bottom: 14px; border: 1px solid var(--line);
}
.card.flush { padding: 0; overflow: hidden; }

/* ============ 站点头部 ============ */
.site-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0;
}
.site-title-row {
  display: flex; align-items: center !important; gap: 12px; min-width: 0;
  flex-wrap: nowrap; height: 32px;
}
.site-name {
  min-width: 0; flex: 1 1 auto; height: 32px; display: flex; align-items: center;
  font-size: 21px; font-weight: 600; letter-spacing: -.2px; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-ver {
  position: relative; flex: 0 0 auto; display: flex; align-items: center;
  height: 30px; box-sizing: border-box; padding: 0 10px; margin: 0;
  border-radius: 999px; color: var(--text-3); font-size: 12px;
  letter-spacing: .3px; line-height: 30px; text-align: center;
  background: rgba(255, 255, 255, .82); overflow: hidden; transform: none;
}
.site-ver::before {
  content: ''; position: absolute; inset: 0; padding: 2px; border-radius: inherit;
  background: linear-gradient(120deg, #f5b52e, #2f6fed, #44b89b, #f5b52e);
  background-size: 240% 240%; animation: siteVerBorder 4s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.site-ver span { position: relative; z-index: 1; }
@keyframes siteVerBorder { to { background-position: 240% 0; } }
@media (max-width: 767px) {
  .site-head { gap: 10px; }
  .site-title-row { gap: 8px; height: 28px; }
  .site-name { height: 28px; font-size: 17px; }
  .site-ver { height: 26px; padding: 0 8px; font-size: 11px; line-height: 26px; }
}

/* ============ 首页模块（后台编排内容）============ */
.module { margin-bottom: 14px; }
/* 图片加载失败/过慢时至少有底色占位，不会留下一块纯白空白 */
.module img { max-width: 100%; border-radius: 10px; display: block; background: var(--bg-2, #eef1f5); }
.module-title { font-size: 15px; font-weight: 500; margin: 0 0 8px; }
.module-text { font-size: 15px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.module-doc {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  background: var(--bg); border-radius: 10px; color: var(--primary); font-weight: 500;
}

/* ============ 分类导航 ============ */
.nav-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin: 24px 0 14px;
}
.nav-head h2 { font-size: 19px; letter-spacing: -.2px; }
.nav-sub { font-size: 13px; color: var(--text-3); margin-top: 3px; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
/* 桌面端按卡片数（JS 写入 --gc，封顶 3）分列，避免稀疏行与右侧留白 */
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(var(--gc, 3), minmax(0, 1fr)); } }

.cat-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; cursor: pointer; transition: all .14s;
}
.cat-card:hover {
  border-color: #cfd8e4; background: #fcfdfe;
  transform: translateY(-1px); box-shadow: var(--shadow);
}
.cat-card:active { transform: translateY(0); }
.cc-body { flex: 1; min-width: 0; }
.cc-name { font-size: 16px; font-weight: 500; }
.cc-meta { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.cc-arrow { color: var(--text-3); font-size: 22px; flex-shrink: 0; }

/* ============ 试卷卡片 ============ */
.paper-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 12px;
  color: inherit; transition: all .14s;
}
.paper-card:hover { border-color: #cfd8e4; box-shadow: var(--shadow); }
.paper-card.disabled { opacity: .55; pointer-events: none; }
.pc-title { font-size: 16.5px; font-weight: 500; margin-bottom: 8px; }
.pc-meta {
  display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-2);
  align-items: center;
}
.pc-desc { font-size: 13.5px; color: var(--text-3); margin-top: 8px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  background: var(--line-2); color: var(--text-2); white-space: nowrap;
}
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-err { background: var(--err-bg); color: var(--err); }

/* ============ 成绩查询入口 ============ */
.query-entry {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; margin-top: 22px; cursor: pointer; transition: all .16s ease;
  position: relative; z-index: 1;
}
.cat-grid .query-entry { margin-top: 0; }
.query-entry:hover { border-color: #cbe3da; background: #fbfdfc; transform: translateY(-2px); box-shadow: var(--hse-shadow-hover); }
.query-entry:active { transform: translateY(0); }
.qe-icon {
  width: 50px; height: 50px; border-radius: 15px;
  background: linear-gradient(135deg, var(--hse-eco), #4a7f6d);
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 2px 10px -4px var(--hse-eco);
  transition: box-shadow .16s ease, transform .16s ease;
}
.query-entry:hover .qe-icon { transform: scale(1.06); box-shadow: 0 5px 18px -4px var(--hse-eco); }
.qe-body { flex: 1; }
.qe-t { font-size: 16px; font-weight: 500; }
.qe-s { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.qe-arrow { color: var(--text-3); font-size: 22px; flex-shrink: 0; }

/* ============ 成绩记录卡 ============ */
.res-card {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px;
}
.res-card.pass { border-left-color: var(--ok); }
.res-card.fail { border-left-color: var(--err); }
.rc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rc-title { font-size: 15.5px; font-weight: 500; flex: 1; min-width: 0; }
.rc-score { display: flex; align-items: baseline; gap: 8px; }
.rc-score b { font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.rc-score span { font-size: 13px; color: var(--text-3); }
.rc-meta { font-size: 12.5px; color: var(--text-3); margin-top: 6px; display: flex;
  align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-time { font-variant-numeric: tabular-nums; }

/* ============ 表单 ============ */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; color: var(--text-2); }
.field label .req { color: var(--err); margin-left: 2px; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  transition: border-color .12s, box-shadow .12s;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
/* 提示与字数统计并排：提示在左，字数右对齐 */
.field .fc-foot { display: flex; align-items: baseline; gap: 10px; margin-top: 5px; }
.field .fc-foot .hint { margin-top: 0; flex: 1; min-width: 0; }
.field .fc-foot .fc-counter { margin-top: 0; flex-shrink: 0; }
.field .err-msg { font-size: 13px; color: var(--err); margin-top: 5px; }
.field.has-err input, .field.has-err textarea, .field.has-err select { border-color: var(--err); }
.fc-counter {
  font-size: 11.5px; color: var(--text-3); margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.fc-counter.full { color: var(--ok); font-weight: 500; }

.paper-meta {
  display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2);
  align-items: center;
}

/* ============ 答题页 ============ */
.quiz-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; font-size: 13.5px; color: var(--text-2);
}
.quiz-top b { color: var(--primary); font-variant-numeric: tabular-nums; }
.timer {
  color: var(--err); font-weight: 500; font-variant-numeric: tabular-nums;
  font-size: 14px; flex-shrink: 0;
}

/* 切题滑动动画：下一题左滑进，上一题右滑回 */
.q-stage { position: relative; }
.q-stage.slide-left { animation: slideInLeft .28s cubic-bezier(.25, .8, .3, 1); }
.q-stage.slide-right { animation: slideInRight .28s cubic-bezier(.25, .8, .3, 1); }
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(56px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-56px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .q-stage.slide-left, .q-stage.slide-right { animation: none; }
}

.q-card { margin-bottom: 0; }
.q-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 12px;
  font-size: 12.5px; color: var(--text-2); }
.q-stem { font-size: 17.5px; line-height: 1.75; margin-bottom: 18px; word-break: break-word; }
.q-stem img { max-width: 100%; border-radius: 10px; margin-top: 10px; display: block; }

.opt {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r); margin-bottom: 10px;
  min-height: 48px; cursor: pointer; transition: all .14s;
}
.opt:active { background: #fafbfc; }
.opt.selected { border-color: var(--primary); background: var(--primary-50); }
.opt .mark {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center;
  font-size: 13px; font-weight: 500; margin-top: 1px; transition: all .14s;
}
.opt.selected .mark { border-color: var(--primary); background: var(--primary); color: #fff; }
.opt.square .mark { border-radius: 7px; }
.opt .content { flex: 1; word-break: break-word; }

.q-inline-blanks { margin-top: 14px; }
.blank-input {
  display: inline-block; min-width: 8ch; min-height: 46px; padding: 9px 12px;
  border: none; border-bottom: 2px solid var(--primary); background: var(--primary-50);
  border-radius: 6px 6px 0 0; font-size: 16px; margin: 0 4px; text-align: center;
}
.blank-input:focus { outline: none; background: #d9e7ff; }
.blanks-box { margin-top: 14px; padding: 14px; background: var(--bg); border-radius: var(--r); }
.blanks-box .brow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.blanks-box .brow:last-child { margin-bottom: 0; }
.blanks-box .blabel { font-size: 13px; color: var(--text-2); min-width: 56px; flex-shrink: 0; }

.q-nav-row { display: flex; gap: 10px; }
.q-nav-row .btn { flex: 1; }
.qnav {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 8px; padding: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px;
}
.qnav button {
  width: 42px; height: 42px; border-radius: 9px; border: 1.5px solid var(--line);
  background: var(--card); font-size: 14px; color: var(--text-2);
}
.qnav button.done { background: var(--primary); border-color: var(--primary); color: #fff; }
.qnav button.cur { outline: 2px solid var(--primary); outline-offset: 1px; }

/* 底部常驻切题区：只放「上一题/答题卡/下一题」，交卷挪到顶栏右侧。
   原来交卷就贴在下一题正下方，连点下一题时拇指一滑就交了卷；
   现在底部这条再没有任何提交入口，最后一行只留状态文字（也不会压住右下角吉祥物）。 */
.submitbar {
  position: sticky; bottom: 0; z-index: 5;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom));
  margin: 16px -16px 0;
}
.q-divide { height: 1px; background: var(--line); margin: 12px 0 9px; }
.q-hint { text-align: center; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.q-hint b { color: var(--err); font-weight: 500; }

/* 交卷：琥珀色，和蓝色主按钮区分开，视觉上不像「下一个」 */
.btn-submit {
  background: var(--warn-bg); border: 1.5px solid #dfb968; color: #8a6100;
  font-weight: 600;
}
.btn-submit:hover { border-color: #d2a94c; }
.btn-submit:active { background: #f6e8c6; }
/* 顶栏里的交卷入口：比正文按钮小一号，常驻可见但不用来连点 */
.btn-mini {
  min-height: 36px; padding: 0 13px; font-size: 14px;
  border-radius: 9px; flex-shrink: 0;
}
/* 答题页顶栏多了一颗交卷，标题留出宽度：字号收一点、间距紧一点 */
.topbar.tb-quiz { gap: 9px; }
.topbar.tb-quiz h1 { font-size: 14.5px; }

/* 交卷二次确认层 */
.sub-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(17, 24, 39, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: subMaskIn .16s ease-out;
}
.sub-box {
  width: 100%; max-width: 340px; background: var(--card);
  border-radius: 16px; padding: 22px 20px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
  animation: subBoxIn .2s cubic-bezier(.25, .8, .3, 1);
}
.sub-t { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.sub-d { font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.sub-d b { color: var(--err); font-weight: 500; }
.sub-tip { font-size: 12.5px; color: var(--text-3); margin: 6px 0 18px; line-height: 1.5; }
.sub-box .btn { margin-bottom: 10px; }
.sub-box .btn:last-child { margin-bottom: 0; }
@keyframes subMaskIn { from { opacity: 0; } }
@keyframes subBoxIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@media (prefers-reduced-motion: reduce) {
  .sub-mask, .sub-box { animation: none; }
}

/* ============ 彩纸礼花（仅合格时播放）============
   两台虚拟炮口固定在屏幕左右下角，向斜上方喷射纸片。

   物理模型（而不是固定 easing）：
   - 上升阶段受重力减速：位移曲线 concave down，越接近顶点越慢
   - 顶点附近速度接近 0，会有一个明显的"悬停"瞬间
   - 下落阶段重力加速：越落越快，曲线 concave up
   - 水平方向近似匀速（纸片很轻，水平速度衰减慢）
   - 另有一层 cf-sway 动画让纸片左右飘摆，模拟空气阻力下的横向摆动
   做法：位移用多个关键帧，每帧自带 animation-timing-function，
   分别描述该段的加速/减速，拼起来就是一条近似的抛物线。 */
.confetti-cannon {
  position: fixed; inset: 0; pointer-events: none;
  z-index: 60; overflow: hidden;
}
.cf-bit {
  position: absolute; bottom: 8vh;
  width: var(--cf-w, 8px); height: var(--cf-h, 12px);
  opacity: 0;
  will-change: transform, opacity;
  /* 抛物线主体 */
  animation: cf-fly var(--cf-dur, 2400ms) linear var(--cf-delay, 0ms) forwards;
}
/* 纸片本体：在飞行的同时左右轻摆，让下落更像纸而不是石头 */
.cf-bit::before {
  content: ''; display: block; width: 100%; height: 100%;
  background: var(--cf-c, #2f6fed); border-radius: 1px;
  animation: cf-sway calc(var(--cf-dur, 2400ms) * .8) ease-in-out var(--cf-delay, 0ms) infinite;
}
/* 左炮口在左下角，纸片向右上方散开 */
.cf-left { left: -4vh; --cf-x: 1; }
/* 右炮口在右下角，纸片向左上方散开（--cf-x 取负值实现镜像） */
.cf-right { right: -4vh; --cf-x: -1; }

@keyframes cf-fly {
  /* 炮口爆发：几乎瞬间获得初速度 */
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(.5);
    animation-timing-function: cubic-bezier(.12, .75, .35, 1);
  }
  10% {
    opacity: 1;
    transform: translate3d(calc(var(--cf-dist) * .14 * var(--cf-x)), -30vh, 0)
               rotate(calc(var(--cf-rot) * .16)) scale(1);
    /* 上升中：重力持续减速，位移增量逐段变小 */
    animation-timing-function: cubic-bezier(.3, 0, .65, 1);
  }
  28% {
    transform: translate3d(calc(var(--cf-dist) * .32 * var(--cf-x)), -50vh, 0)
               rotate(calc(var(--cf-rot) * .42)) scale(1);
    animation-timing-function: cubic-bezier(.45, 0, .8, .55);
  }
  /* 顶点：速度趋零，出现短暂悬停 */
  44% {
    transform: translate3d(calc(var(--cf-dist) * .46 * var(--cf-x)), -54vh, 0)
               rotate(calc(var(--cf-rot) * .58)) scale(1);
    /* 开始下落：重力加速，位移增量逐段变大 */
    animation-timing-function: cubic-bezier(.5, 0, .72, .45);
  }
  60% {
    transform: translate3d(calc(var(--cf-dist) * .62 * var(--cf-x)), -26vh, 0)
               rotate(calc(var(--cf-rot) * .74)) scale(1);
    animation-timing-function: cubic-bezier(.55, 0, .78, .5);
  }
  78% {
    transform: translate3d(calc(var(--cf-dist) * .8 * var(--cf-x)), 22vh, 0)
               rotate(calc(var(--cf-rot) * .9)) scale(.97);
    animation-timing-function: cubic-bezier(.6, 0, .85, .55);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--cf-dist) * var(--cf-x)), 104vh, 0)
               rotate(var(--cf-rot)) scale(.9);
  }
}

@keyframes cf-sway {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(calc(var(--cf-sway, 6px) * var(--cf-x))); }
}

@media (prefers-reduced-motion: reduce) {
  .confetti-cannon { display: none; }
}

/* ============ 结果页 ============ */
.score-hero { text-align: center; padding: 30px 20px; }
.score-num {
  font-size: 68px; font-weight: 700; line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -2px;
}
.score-total { font-size: 14px; color: var(--text-3); margin-top: 2px; }
.badge {
  display: inline-block; padding: 4px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; margin-top: 14px;
}
.badge.pass { background: var(--ok-bg); color: var(--ok); }
.badge.fail { background: var(--err-bg); color: #b3282d; }
.score-sub { font-size: 13.5px; color: var(--text-2); margin-top: 12px; }
.score-stamp { margin-top: 18px; display: flex; justify-content: center; }

/* ============ 绿色时间认证戳 ============ */
.tstamp {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px;
  border: 1.5px solid #a8d5b8; border-radius: 9px;
  background: linear-gradient(135deg, #f2faf5, #fff);
  user-select: none;
}
.tstamp-ok {
  width: 32px; height: 32px; border-radius: 50%; background: var(--ok);
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(23, 147, 107, .3);
}
.tstamp-body { line-height: 1.35; }
.tstamp-k { display: block; font-size: 10.5px; color: #6b7a70; letter-spacing: .2px; }
.tstamp-v { display: block; font-size: 13.5px; font-weight: 600; color: #0f6e56;
  font-variant-numeric: tabular-nums; }
.tstamp-c { display: block; font-size: 10.5px; color: #6b7a70; font-family: Consolas, monospace; }

/* 进入答题时的一次性顶部提示（限时规则 + 本地保存规则）
   fixed 定位不占文档流：显示时不挤压题目区，长题目手机屏一屏放得下，
   「下一题」不用先下拉就能点到。3.6 秒后自动滑出，也可点 × 关闭。 */
.quiz-hint {
  position: fixed; top: 0; left: 50%;
  transform: translate(-50%, -120%); opacity: 0;
  z-index: 60; pointer-events: none;
  display: flex; align-items: center; gap: 10px;
  width: min(calc(100% - 20px), 680px);
  margin-top: calc(8px + env(safe-area-inset-top));
  padding: 11px 12px 11px 14px; border-radius: 12px;
  background: var(--info-bg); color: var(--primary-600);
  border: 1px solid rgba(31, 122, 92, .18);
  box-shadow: 0 10px 28px rgba(20, 90, 68, .16);
  font-size: 13px; line-height: 1.5;
  transition: transform .34s cubic-bezier(.22, .9, .32, 1), opacity .3s;
}
.quiz-hint.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.quiz-hint.bye { transform: translate(-50%, -120%); opacity: 0; }
.quiz-hint .qh-ico { flex-shrink: 0; font-size: 15px; }
.quiz-hint .qh-txt { flex: 1; min-width: 0; }
.quiz-hint .qh-x {
  flex-shrink: 0; width: 26px; height: 26px; border: 0; border-radius: 7px;
  background: rgba(31, 122, 92, .12); color: inherit; font-size: 15px;
  line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.quiz-hint .qh-x:active { background: rgba(31, 122, 92, .22); }

.banner { padding: 12px 16px; border-radius: var(--r); font-size: 13.5px; margin-bottom: 12px; }
.banner-warn { background: var(--warn-bg); color: #8a6100; }
.banner-info { background: var(--info-bg); color: var(--primary-600); }
.alert { padding: 11px 14px; border-radius: var(--r); font-size: 13px; margin-bottom: 14px; }
.alert-warn { background: var(--warn-bg); color: #8a6100; }
.alert-err { background: var(--err-bg); color: #b3282d; }
.alert-info { background: var(--info-bg); color: var(--primary-600); }
.note { font-size: 12px; color: var(--text-3); margin-top: 8px; line-height: 1.55; }
.empty { text-align: center; padding: 44px 20px; color: var(--text-3); font-size: 13.5px; }
.loading { text-align: center; padding: 48px; color: var(--text-3); position: relative; z-index: 1; }
.spinner {
  width: 26px; height: 26px; border: 2.5px solid var(--line);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--primary); background: none; font-size: 13px; padding: 4px 0; }

/* ============ 逐题明细 ============ */
.review-item { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; }
.review-head {
  display: flex; align-items: center; gap: 10px; padding: 14px; min-height: 48px;
  cursor: pointer; background: var(--card);
}
.review-head .idx {
  width: 26px; height: 26px; border-radius: 7px; background: var(--line-2);
  display: grid; place-items: center; font-size: 13px; color: var(--text-2); flex-shrink: 0;
}
.review-head .t { font-size: 12px; color: var(--text-3); }
.review-head .sp { flex: 1; }
.review-head .sc { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.review-head .ic { font-weight: 500; font-size: 13px; }
.review-head .ic.ok { color: var(--ok); }
.review-head .ic.no { color: var(--err); }
.review-body { padding: 0 14px 14px; border-top: 1px solid var(--line-2); }
.review-body .stem { margin: 14px 0 12px; word-break: break-word; }
.review-body .stem img { max-width: 100%; border-radius: 8px; margin-top: 8px; }
.ans-row {
  display: flex; gap: 10px; padding: 10px 12px; border-radius: 9px;
  margin-bottom: 8px; align-items: flex-start;
}
.ans-row.mine { background: var(--bg); }
.ans-row.right { background: var(--ok-bg); }
.ans-row .lb { font-size: 12.5px; color: var(--text-2); min-width: 66px; flex-shrink: 0; }
.ans-row .vl { flex: 1; word-break: break-word; }
.explain { margin-top: 12px; padding: 12px; background: var(--warn-bg);
  border-radius: 9px; font-size: 13.5px; color: #7a5800; }

.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  background: #16181d; color: #fff; padding: 10px 18px; border-radius: 9px;
  z-index: 999; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  max-width: 80vw; text-align: center;
  animation: toast-in .22s ease both;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ===== 成绩票根：交卷后从左侧撕下 =====
   样式参考经典票根：上下邮票齿孔、左右咬合半圆缺口、中间打孔虚线。
   齿孔用 mask 实现（不加额外元素）；左右缺口用与页面同色的圆片盖出，
   比 mask-composite 兼容性稳。动画从左侧外旋转撕入，分两段：
   先撕开一条缝（左缘先露），停顿一下再完全展开，模拟手撕的阻尼感。 */
.ticket {
  --tk-r: 7px;              /* 齿孔/缺口半径 */
  --tk-tooth: 14px;         /* 锯齿周期 = 2r */
  position: relative;
  margin-bottom: 16px;
  /* 白底：用纯色 background-color 而非渐变——渐变无法 transition，
     不及格反馈需要「平滑变红 → 回白」，必须可过渡 */
  background: #ffffff;
  transition: background-color .45s ease;
  filter: drop-shadow(0 12px 26px rgba(15, 23, 42, .12));
  transform-origin: left center;
  animation: tk-tear .9s cubic-bezier(.16, .74, .28, 1.01) both;
  /* 齿孔：中间主体 + 顶部条带 + 底部条带，三层 add 并集 */
  -webkit-mask:
    linear-gradient(#000 0 0) center / 100% calc(100% - var(--tk-tooth)) no-repeat,
    radial-gradient(circle var(--tk-r) at var(--tk-r) var(--tk-r), transparent 99%, #000 100%)
      top left / var(--tk-tooth) var(--tk-tooth) repeat-x,
    radial-gradient(circle var(--tk-r) at var(--tk-r) var(--tk-r), transparent 99%, #000 100%)
      bottom left / var(--tk-tooth) var(--tk-tooth) repeat-x;
  mask:
    linear-gradient(#000 0 0) center / 100% calc(100% - var(--tk-tooth)) no-repeat,
    radial-gradient(circle var(--tk-r) at var(--tk-r) var(--tk-r), transparent 99%, #000 100%)
      top left / var(--tk-tooth) var(--tk-tooth) repeat-x,
    radial-gradient(circle var(--tk-r) at var(--tk-r) var(--tk-r), transparent 99%, #000 100%)
      bottom left / var(--tk-tooth) var(--tk-tooth) repeat-x;
}
/* 左右咬合缺口：与页面同色的圆片盖在票边缘 */
.ticket::before, .ticket::after {
  content: ''; position: absolute; top: 50%; width: calc(var(--tk-r) * 2);
  height: calc(var(--tk-r) * 2); border-radius: 50%; background: var(--bg);
  transform: translateY(-50%); z-index: 2;
}
.ticket::before { left: calc(var(--tk-r) * -1); }
.ticket::after { right: calc(var(--tk-r) * -1); }

@keyframes tk-tear {
  0%   { transform: translateX(-108%) rotate(-7deg); opacity: 0; }
  30%  { transform: translateX(-68%) rotate(-3.4deg); opacity: 1; }  /* 先撕开一条缝 */
  52%  { transform: translateX(-55%) rotate(-1.5deg); }              /* 撕到底，顿一下 */
  100% { transform: translateX(0) rotate(-.4deg); }
}

.ticket-inner { position: relative; padding: 6px 22px 10px; }
/* 撕开瞬间左缘的「新鲜断面」高亮，动画结束后消失 */
.ticket-inner::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
  animation: tk-edge .7s .1s 1 both; pointer-events: none;
}
@keyframes tk-edge {
  0% { opacity: .9; }
  100% { opacity: 0; }
}

.tk-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 2px 10px; gap: 10px;
}
.tk-k {
  font-size: 12px; font-weight: 700; letter-spacing: 2.5px; color: #52525b;
  font-family: Georgia, "Songti SC", serif; white-space: nowrap;
}
.tk-no {
  font-size: 11px; color: #a1a1aa; font-family: Consolas, Menlo, monospace;
  letter-spacing: .5px; white-space: nowrap;
}
/* 打孔虚线：票根的分割线，两端各一个咬合半圆 */
.tk-perf {
  position: relative; height: 0; margin: 0 -22px;
  border-top: 2px dashed #d4d4d8;
}
.tk-perf span {
  position: absolute; top: -8px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--bg);
}
.tk-perf span:first-child { left: -8px; }
.tk-perf span:last-child { right: -8px; }

.tk-body { padding: 18px 10px 16px; text-align: center; position: relative; }
.tk-body .score-num {
  font-family: Georgia, "Songti SC", serif;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
.tk-body .score-total { color: #71717a; }
.tk-body .score-sub { color: #52525b; }
.tk-actions { padding: 12px 2px 6px; }

/* ===== 不及格反馈序列：平滑变红 → 八叉弹入 → 抖动 → 平滑回白 =====
   时序由 scheduleFailFx() 驱动：撕入落位（~0.95s）→ 变红（0.45s 过渡）
   → 八叉弹入（0.35s 弹性）→ 抖动 0.5s → 回白 + 八叉淡出。 */
.ticket.tk-red { background: #fdecec; }
/* 票根正中的大八叉：默认隐藏，.show 时弹性放大入场 */
.tk-fail-mark {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; z-index: 3; color: #d14343;
  opacity: 0; transform: scale(.3);
  transition: opacity .35s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.tk-fail-mark svg {
  width: 108px; height: 108px;
  filter: drop-shadow(0 2px 6px rgba(209, 67, 67, .25));
}
.tk-fail-mark.show { opacity: 1; transform: scale(1); }
/* 抖动：与撕入动画并列，列表中后者优先、只在本时段覆盖 transform；
   播完后（fill 默认 none）交还 tk-tear 的 both 落位态 */
.ticket.tk-shaking {
  animation: tk-tear .9s cubic-bezier(.16, .74, .28, 1.01) both,
             tk-shake .5s ease-in-out 1;
}
@keyframes tk-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-9px); }
  30% { transform: translateX(8px); }
  45% { transform: translateX(-7px); }
  60% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
  90% { transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
  .ticket { animation: none; }
  .ticket-inner::before { animation: none; opacity: 0; }
  /* 减少动态：不抖动、无过渡，八叉直接显示后随回白消失 */
  .ticket.tk-shaking { animation: none; }
  .tk-fail-mark { transition: none; }
}

/* ===================== 安全主题装饰层 =====================
   视觉语言：安全黄强调 + 蓝黄警示斜纹 + 安全帽/盾牌剪影。
   只做装饰层：不动布局结构与信息架构，所有元素均为纯 CSS/内联 SVG，
   零外部资源依赖，不影响首屏加载。 */
:root {
  --safety: #f5a623;          /* 安全黄：强调色 */
  --safety-deep: #b97a0a;     /* 深安全黄：文字/图标（白底上对比度足够） */
  --safety-soft: #fff7e6;     /* 安全黄浅底 */
  --safety-line: #f3dfae;     /* 安全黄边线 */
  --navy: #16345c;            /* 工装深蓝：hero/饰带 */
  --navy-2: #1e4a8a;
}

/* 顶部警示斜纹饰带：fixed 于页面最顶，sticky topbar 让位 5px */
.hz-band {
  position: fixed; top: 0; left: 0; right: 0; height: 5px; z-index: 40;
  background: repeating-linear-gradient(45deg,
    var(--navy) 0 10px, var(--safety) 10px 20px);
}
.topbar { top: 5px; }
/* topbar 底部一条「安全黄 → 工装蓝」双色线，替代原来的素色边线 */
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg,
    var(--safety) 0%, var(--safety) 34%, var(--navy) 34%, var(--navy) 100%);
}

/* ===== 首页安全主题横幅 ===== */
.safety-hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(118deg, var(--navy) 0%, var(--navy-2) 55%, #2f6fed 100%);
  color: #fff; padding: 24px 22px 28px; margin: 4px 0 22px;
  box-shadow: 0 12px 28px rgba(22, 52, 92, .22);
}
/* 右侧安全帽大剪影：低透明度水印 */
.safety-hero .hero-cap {
  position: absolute; right: -16px; bottom: -30px; width: 180px; height: 180px;
  color: #fff; opacity: .14; pointer-events: none;
}
/* 底部警示斜纹饰边 */
.safety-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(45deg,
    var(--safety) 0 12px, rgba(255, 255, 255, .9) 12px 24px);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--safety); color: #3a2a05;   /* 黄底深字：警示标签的经典配色 */
  font-size: 11.5px; font-weight: 700; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 99px; margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.hero-badge svg { width: 13px; height: 13px; }
.hero-title {
  font-size: 24px; font-weight: 800; letter-spacing: 1px; margin: 0 0 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .25); position: relative; z-index: 1;
}
.hero-sub {
  font-size: 13px; opacity: .82; max-width: none; white-space: nowrap;
  position: relative; z-index: 1; letter-spacing: -.15px;
}
.nowrap-phrase { white-space: nowrap; }
@media (max-width: 767px) {
  .hero-sub { font-size: 11px; letter-spacing: -.25px; }
}
@media (min-width: 768px) {
  .safety-hero { padding: 30px 30px 34px; }
  .hero-title { font-size: 30px; }
  .safety-hero .hero-cap { width: 230px; height: 230px; right: 24px; bottom: -44px; }
}

/* ===== 分类卡片安全图标徽章（HSE 异色体系见下方主题层）===== */
.cat-card { display: flex; align-items: center; gap: 14px; }
.cat-card .cc-body { flex: 1; min-width: 0; }

/* ===== 成绩查询入口：墨绿盾牌对勾（HSE 环境色系）===== */
.qe-icon { color: #fff; }
.qe-icon svg { width: 24px; height: 24px; }

/* ===================== 设计系统：细节层 =====================
   在 HSE 主题骨架上加「设计感」：结构化的区块标题、错峰入场、
   仪表盘意象的 hero 装饰、题号水印、题型异色标签、状态色条。 */

/* 区块标题：安全金竖条 + 收紧字距 + 灰色副标题 */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 26px 0 14px; }
.sec-head.in-card { margin: 0; padding: 15px 18px; border-bottom: 1px solid var(--line); align-items: center; }
.sec-head h2 {
  font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: var(--text);
  display: flex; align-items: center; gap: 9px; margin: 0;
}
.sec-head h2::before {
  content: ''; width: 4px; height: 17px; border-radius: 2px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--safety), #e8b45f);
  box-shadow: 0 1px 4px rgba(240, 168, 60, .38);
}
.sec-sub { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }

/* 列表错峰入场：按索引 40ms 阶梯的轻微上浮（--i 由渲染时写入） */
.rise { animation: riseIn .34s cubic-bezier(.22, .9, .3, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }

/* hero 材质感：顶部 1px 高光 */
.safety-hero {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 28px rgba(22, 52, 92, .22);
}

/* 题卡：右上角大号淡色题号水印 */
.q-card { position: relative; overflow: hidden; }
.q-no {
  position: absolute; right: 8px; top: -8px;
  font-size: 76px; font-weight: 800; line-height: 1; letter-spacing: -.05em;
  color: var(--text); opacity: .05; pointer-events: none; user-select: none;
  font-variant-numeric: tabular-nums;
}

/* 题型标签：按题型语义取 HSE 色板 */
.tag.tq-single { background: #eef2f9; color: var(--hse-navy-2); }
.tag.tq-multiple { background: #f1eef8; color: var(--hse-chem); }
.tag.tq-judge { background: #fdf3e0; color: #b7791f; }
.tag.tq-blank { background: var(--hse-eco-soft); color: var(--hse-eco); }

/* 选项：hover 冷灰描边 + 选中对勾弹入 */
.opt:hover { border-color: #c3d2ee; background: #fbfcfe; }
.opt.selected { border-color: var(--hse-navy-2); }
.opt.selected .mark { animation: markPop .24s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes markPop { 0% { transform: scale(.55); } 65% { transform: scale(1.14); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .opt.selected .mark { animation: none; } }

/* 答题进度区：题号数字用工装蓝强调 */
.quiz-top b { color: var(--hse-navy-2); font-size: 15px; }

/* 逐题详情：左侧状态色条（对=绿 / 错=红），扫一眼即知对错分布 */
.review-item.rv-ok { border-left: 3px solid var(--ok); }
.review-item.rv-no { border-left: 3px solid var(--err); }

/* 主按钮：工装蓝渐变 + 微按压反馈，CTA 更立体 */
.btn-primary {
  background: linear-gradient(135deg, var(--hse-navy-2), #2f6fed);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(30, 74, 138, .25);
  transition: transform .12s ease, box-shadow .16s ease, filter .16s ease;
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 4px 14px rgba(30, 74, 138, .3); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(30, 74, 138, .25); }
@media (prefers-reduced-motion: reduce) { .btn-primary:active { transform: none; } }

/* ===== 票根头部的盾牌点缀（白底票根上唯一彩色点） ===== */
.tk-shield {
  width: 15px; height: 15px; color: var(--ok);
  vertical-align: -2.5px; margin-right: 3px;
}

/* ===== 答题页 topbar 的小安全帽 ===== */
.tb-cap svg { width: 17px; height: 17px; color: var(--primary); vertical-align: -3px; margin-right: 5px; }

/* ===================== HSE 全局主题层 =====================
   HSE = Health 健康 / Safety 安全 / Environment 环境。
   视觉语言：工装深蓝打底 + 安全金强调 + 低饱和莫兰迪色板（消防赭/环境青/
   工装蓝灰/危化紫灰/防护橄榄），大气、简约、不张扬。
   全部为静态 CSS 与内联 SVG，零外部资源；粒子画布见 hse-particles.js。 */
:root {
  --hse-navy: #16345c;         /* 工装深蓝 */
  --hse-navy-2: #1e4a8a;
  --hse-safety: #c98a2e;       /* 安全金（深一档，白底可读） */
  --hse-safety-deep: #a06a12;
  --hse-safety-soft: #fdf6e8;
  --hse-fire: #b85c4a;         /* 消防赭 */
  --hse-fire-soft: #fbeee9;
  --hse-eco: #3e8570;          /* 环境青 */
  --hse-eco-soft: #e9f4f0;
  --hse-steel: #4d6f9e;        /* 工装蓝灰 */
  --hse-steel-soft: #ecf1f8;
  --hse-chem: #6f6599;         /* 危化紫灰 */
  --hse-chem-soft: #efedf6;
  --hse-olive: #77854f;        /* 防护橄榄 */
  --hse-olive-soft: #f1f4e8;
  --hse-teal: #3d7a8c;         /* 防化/气体 青灰 */
  --hse-teal-soft: #e9f2f4;
  --hse-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .07);
  --hse-shadow-hover: 0 2px 6px rgba(16, 24, 40, .06), 0 14px 34px rgba(16, 24, 40, .12);
}

/* ===== 全站底部 HSE 玻璃粒子画布 =====
   横跨整个视口宽、贴在底部的一条粒子带，向上与左右在画布内逐变透明，
   自然融进页面（比 CSS mask 零合成成本）。pointer-events:none 保证
   完全不拦截点击；fixed + 独立合成层，动画不触发重排。
   淡出与密度由 hse-particles.js 按粒子在画布内的位置实时计算。 */
.hse-fx {
  position: fixed; left: 0; bottom: 0;
  width: 100%; height: min(44vh, 440px);
  z-index: 0; pointer-events: none;
}

/* ===== 分类卡：按类目语义的异色徽章 ===== */
.cc-icon {
  width: 50px; height: 50px; border-radius: 15px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px -4px currentColor, 0 0 0 1px rgba(16, 24, 40, .03);
  transition: transform .16s ease, box-shadow .16s ease;
}
.cc-icon svg { width: 25px; height: 25px; }
.cc-icon.t-safety { color: var(--hse-safety); background: linear-gradient(135deg, var(--hse-safety-soft), #fff); border-color: #f0dcae; }
.cc-icon.t-fire   { color: var(--hse-fire);   background: linear-gradient(135deg, var(--hse-fire-soft), #fff);   border-color: #efd2c6; }
.cc-icon.t-eco    { color: var(--hse-eco);    background: linear-gradient(135deg, var(--hse-eco-soft), #fff);    border-color: #cbe3da; }
.cc-icon.t-elec   { color: var(--hse-steel);  background: linear-gradient(135deg, var(--hse-steel-soft), #fff);  border-color: #d3ddee; }
.cc-icon.t-mech   { color: #5b6a7e;           background: linear-gradient(135deg, #eef1f5, #fff);               border-color: #d8dee6; }
.cc-icon.t-chem   { color: var(--hse-chem);   background: linear-gradient(135deg, var(--hse-chem-soft), #fff);   border-color: #d9d4e8; }
.cc-icon.t-cone   { color: var(--hse-safety); background: linear-gradient(135deg, var(--hse-safety-soft), #fff); border-color: #f0dcae; }
.cc-icon.t-aid    { color: #b8453f;           background: linear-gradient(135deg, #fdeeec, #fff);               border-color: #f0cdc8; }
.cc-icon.t-boot   { color: var(--hse-olive);  background: linear-gradient(135deg, var(--hse-olive-soft), #fff);  border-color: #dfe4cb; }
.cc-icon.t-gas    { color: var(--hse-teal);   background: linear-gradient(135deg, var(--hse-teal-soft), #fff);   border-color: #ccdfe4; }
/* 分类卡整体：悬浮轻抬 + 徽章微放大，克制不花哨 */
.cat-card {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  will-change: transform;
}
.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hse-shadow-hover);
  border-color: #d8dEE8;
}
.cat-card:hover .cc-icon { transform: scale(1.06); box-shadow: 0 5px 18px -4px currentColor, 0 0 0 1px rgba(16, 24, 40, .05); }
.cat-card:active { transform: translateY(0); }

/* ===== 试卷卡：悬浮轻抬 ===== */
.paper-card { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.paper-card:hover { transform: translateY(-2px); box-shadow: var(--hse-shadow-hover); }

/* ===== 成绩查询入口 ===== */
.query-entry { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.query-entry:hover { transform: translateY(-2px); box-shadow: var(--hse-shadow-hover); }

/* ===== 答题页：顶部进度条 =====
   贴在 topbar 下沿的 3px 细轨，深蓝 → 安全金渐变表示推进，
   宽度过渡 .3s，切题/答题时平滑增长。纯宽度动画，不触发重排。 */
.q-progress {
  position: sticky; top: calc(5px + 57px); z-index: 19;
  height: 3px; margin: 0 0 14px; border-radius: 999px;
  background: var(--line-2); overflow: hidden;
}
@media (min-width: 768px) { .q-progress { top: calc(5px + 63px); } }
.q-progress-bar {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--hse-navy), var(--hse-safety));
  transition: width .3s cubic-bezier(.25, .8, .3, 1);
}

/* ===== 结果页：HSE 认证印章（票根右上角的压凹徽记）===== */
.hse-seal {
  position: absolute; top: 10px; right: 12px;
  width: 62px; height: 62px; opacity: .9;
  color: var(--ok); pointer-events: none; user-select: none;
}
.hse-seal svg { width: 100%; height: 100%; display: block; }

/* 表单聚焦环改用工装蓝，和全局 HSE 语言一致 */
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--hse-navy-2); box-shadow: 0 0 0 3px rgba(30, 74, 138, .12);
}

/* 减少动态：粒子画布由 JS 降级为静态单帧；这里兜底隐藏进度条过渡 */
@media (prefers-reduced-motion: reduce) {
  .q-progress-bar { transition: none; }
  .cat-card, .paper-card, .query-entry, .cc-icon { transition: none; }
}
