/* ============================================================
   eNSP 实验平台 · 设计系统 v2
   保持全部既有 class 名不变，仅升级视觉层
   ============================================================ */
:root {
  --bg: #f4f5fb;
  --card: #ffffff;
  --line: #e7e9f4;
  --text: #171a2e;
  --muted: #6e7387;
  --accent: #4f46e5;
  --accent-2: #7c6cf6;
  --accent-soft: #eef0ff;
  --ok: #059669;
  --ok-soft: #e6f7f0;
  --bad: #dc2626;
  --bad-soft: #fdeeee;
  --warn: #b45309;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(18, 22, 52, .05);
  --shadow: 0 1px 2px rgba(18, 22, 52, .04), 0 10px 30px -14px rgba(18, 22, 52, .14);
  --shadow-lg: 0 2px 6px rgba(18, 22, 52, .05), 0 24px 56px -24px rgba(18, 22, 52, .28);
  --ease: cubic-bezier(.22, .8, .32, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 全页柔光渐变背景 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(99, 102, 241, .10), transparent 60%),
    radial-gradient(800px 420px at 96% 0%, rgba(124, 108, 246, .08), transparent 55%),
    radial-gradient(700px 500px at 50% 115%, rgba(79, 70, 229, .06), transparent 60%);
  pointer-events: none;
}

::selection { background: rgba(99, 102, 241, .22); }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3d6e8; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b9bdd6; }
::-webkit-scrollbar-track { background: transparent; }

a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: #4338ca; text-decoration: none; }

h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0; }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace; }

/* ---------------- 顶栏：毛玻璃 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 13px 28px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid rgba(231, 233, 244, .9);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 16px; letter-spacing: -.01em;
}
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 2px 6px rgba(99, 102, 241, .5);
  animation: dotPulse 3.2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft), 0 2px 6px rgba(99, 102, 241, .5); }
  50%      { box-shadow: 0 0 0 7px rgba(238, 240, 255, .55), 0 2px 10px rgba(99, 102, 241, .65); }
}
.topbar nav { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.topbar nav a {
  color: var(--muted); padding: 6px 12px; border-radius: 9px;
  transition: color .15s, background .15s;
}
.topbar nav a:hover { color: var(--text); background: rgba(99, 102, 241, .08); text-decoration: none; }
.topbar .who { font-size: 14px; color: var(--text); padding-right: 4px; }

/* ---------------- 布局容器 ---------------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 32px 26px 96px; }
.narrow { max-width: 780px; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 17px; margin-bottom: 4px; }
.card .hint { color: var(--muted); font-size: 13px; }

/* 入场动画 */
main.wrap > *, main.wrap .card, .exam, .stat {
  animation: rise .5s var(--ease) both;
}
main.wrap > section.stats .stat:nth-child(2) { animation-delay: .05s; }
main.wrap > section.stats .stat:nth-child(3) { animation-delay: .1s; }
main.wrap > section.stats .stat:nth-child(4) { animation-delay: .15s; }
.grid .exam:nth-child(2), .grid .exam:nth-child(5) { animation-delay: .05s; }
.grid .exam:nth-child(3), .grid .exam:nth-child(6) { animation-delay: .1s; }
.grid .exam:nth-child(4), .grid .exam:nth-child(7) { animation-delay: .15s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.hero { margin-bottom: 26px; }
.hero h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(100deg, #1c1f3a 30%, #4f46e5 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .sub { color: var(--muted); margin-top: 6px; font-size: 14px; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.hide { display: none !important; }

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.field > span { color: var(--muted); font-weight: 600; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 10px 13px; font: inherit; color: var(--text);
  background: #fbfbfe; border: 1px solid var(--line); border-radius: 11px;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:hover, textarea:hover, select:hover { border-color: #d5d8ee; }
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .13);
}
textarea {
  min-height: 130px; resize: vertical;
  font-family: ui-monospace, Consolas, monospace; font-size: 13px;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text);
  transition: transform .12s var(--ease), box-shadow .18s var(--ease), background .18s, border-color .18s;
}
.btn:hover { background: #fafbff; border-color: #d9dcef; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  background: linear-gradient(135deg, #5b52f0, #4f46e5 55%, #6d5cf0);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #6a61f5, #584fee 55%, #7c6cf6);
  box-shadow: 0 6px 18px rgba(79, 70, 229, .42), inset 0 1px 0 rgba(255, 255, 255, .2);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0) scale(.98); box-shadow: 0 1px 4px rgba(79, 70, 229, .4); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 6px 10px; box-shadow: none; }
.btn-ghost:hover { background: rgba(99, 102, 241, .07); color: var(--text); box-shadow: none; }
.btn-danger { color: var(--bad); border-color: #f3d3d3; }
.btn-danger:hover { background: #fff8f8; border-color: #eebcbc; box-shadow: 0 2px 8px rgba(220, 38, 38, .12); }
.btn-sm { padding: 5px 13px; font-size: 13px; border-radius: 9px; }

.identity { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 18px; }
.identity .field { width: 190px; }

/* ---------------- 实验卡片网格 ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.exam {
  position: relative;
  display: flex; flex-direction: column; gap: 12px; padding: 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  color: inherit; overflow: hidden;
}
/* 顶部悬浮渐变条 */
.exam::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa);
  opacity: 0; transform: scaleX(.4); transform-origin: left;
  transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.exam:hover { transform: translateY(-4px); border-color: #dcdff5; box-shadow: var(--shadow-lg); text-decoration: none; }
.exam:hover::before { opacity: 1; transform: scaleX(1); }
.exam h3 { font-size: 16px; }
.exam .desc {
  color: var(--muted); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 42px;
}
.exam .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.exam .meta span { white-space: nowrap; }
.exam .foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px dashed var(--line); }
.exam .score-pill {
  font-weight: 700; color: var(--accent); background: var(--accent-soft);
  padding: 4px 14px; border-radius: 999px; font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .14);
}

/* ---------------- 徽章 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge.open { color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px rgba(5, 150, 105, .16); }
.badge.closed { color: var(--muted); background: #eef0f5; }
.badge.warn { color: var(--warn); background: #fdf4e3; }
.badge.bad { color: var(--bad); background: var(--bad-soft); }

/* ---------------- 上传拖放区 ---------------- */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 36px 20px; text-align: center; cursor: pointer;
  border: 1.6px dashed #ccd1e8; border-radius: 14px; background: #fbfbfe;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.drop:hover, .drop.over {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .1);
}
.drop .ico { font-size: 28px; line-height: 1; transition: transform .2s var(--ease); }
.drop:hover .ico { transform: translateY(-3px) scale(1.08); }
.drop .big { font-weight: 650; }
.drop .picked { color: var(--accent); font-weight: 600; }

/* ---------------- 分段选择 ---------------- */
.seg { display: inline-flex; padding: 4px; background: #eceef6; border-radius: 11px; gap: 3px; }
.seg button {
  border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted); padding: 6px 15px; border-radius: 8px; cursor: pointer;
  transition: color .15s, background .15s, box-shadow .15s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(18, 22, 52, .14); }

/* ---------------- 成绩看板 ---------------- */
.scoreboard { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.score-big {
  font-size: 52px; font-weight: 800; letter-spacing: -.035em; line-height: 1;
  background: linear-gradient(120deg, #312e81, #4f46e5 55%, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.score-big small { font-size: 16px; font-weight: 550; color: var(--muted); margin-left: 10px; letter-spacing: 0; -webkit-text-fill-color: var(--muted); }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv b { font-size: 17px; font-variant-numeric: tabular-nums; }

/* ---------------- 判分明细 ---------------- */
.plist { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pitem {
  display: flex; gap: 12px; padding: 11px 13px; border-radius: 12px;
  background: #fafbfe; border: 1px solid var(--line);
  transition: border-color .15s, transform .15s var(--ease);
}
.pitem:hover { border-color: #d5d8ee; }
.pitem.bad { background: var(--bad-soft); border-color: #f6dcdc; }
.pitem .mark { font-size: 15px; line-height: 1.5; }
.pitem .body { flex: 1; min-width: 0; }
.pitem .hdr { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.pitem .miss {
  margin-top: 4px; font-size: 12px; color: var(--bad);
  font-family: ui-monospace, Consolas, monospace; word-break: break-all;
}
.pitem .w { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------------- 排行榜 ---------------- */
.rank { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.rk {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 13px; border-radius: 12px;
  background: #fafbfe; border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .15s var(--ease);
}
.rk:hover { border-color: #e3e5f2; transform: translateX(2px); }
.rk.me {
  background: linear-gradient(90deg, var(--accent-soft), rgba(238, 240, 255, .35));
  border-color: #dcdffb;
}
.rk .no {
  width: 27px; height: 27px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: #eef0f5; font-size: 12px; font-weight: 800; color: var(--muted);
}
.rk .no.top1 { background: linear-gradient(135deg, #ffe9a8, #ffd76e); color: #8a5a06; box-shadow: 0 2px 6px rgba(245, 185, 66, .4); }
.rk .no.top2 { background: linear-gradient(135deg, #eef1f7, #d7dce8); color: #4b5563; box-shadow: 0 2px 6px rgba(148, 163, 184, .35); }
.rk .no.top3 { background: linear-gradient(135deg, #f9e0c8, #eec39a); color: #8a4b18; box-shadow: 0 2px 6px rgba(217, 146, 92, .35); }
.rk .who { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: baseline; }
.rk .who .nm { font-weight: 600; }
.rk .sc { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------------- 表格 ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table th {
  font-size: 12px; color: var(--muted); font-weight: 700;
  background: #fafbfe;
  position: sticky; top: 0;
}
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: #f7f8fd; }
.table input[type=number] { width: 82px; padding: 5px 8px; }
.table .t-right { text-align: right; }
.table tr.me-row td { background: var(--accent-soft); }
.table .no {
  width: 24px; height: 24px; display: inline-grid; place-items: center;
  border-radius: 50%; background: #eef0f5; font-size: 12px; font-weight: 800; color: var(--muted);
}
.table .no.top1 { background: linear-gradient(135deg, #ffe9a8, #ffd76e); color: #8a5a06; }
.table .no.top2 { background: linear-gradient(135deg, #eef1f7, #d7dce8); color: #4b5563; }
.table .no.top3 { background: linear-gradient(135deg, #f9e0c8, #eec39a); color: #8a4b18; }

/* ---------------- 页签 ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button {
  border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--muted);
  padding: 11px 18px; cursor: pointer; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
  border-radius: 9px 9px 0 0;
}
.tabs button:hover { color: var(--text); background: rgba(99, 102, 241, .05); }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------------- 列表项 ---------------- */
.list-item {
  display: flex; gap: 14px; align-items: center; padding: 15px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
  transition: border-color .18s, box-shadow .18s, transform .18s var(--ease);
}
.list-item:hover { border-color: #d9dcf0; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.list-item + .list-item { margin-top: 10px; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t { font-weight: 650; }
.list-item .s { font-size: 12px; color: var(--muted); }
.list-item .ops { display: flex; gap: 8px; flex-wrap: wrap; }

.login { max-width: 380px; margin: 60px auto; }

/* ---------------- 提示浮层 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(16px) scale(.96);
  padding: 11px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  background: #1d2033; color: #fff;
  box-shadow: 0 12px 32px -8px rgba(18, 22, 52, .5);
  opacity: 0; pointer-events: none; transition: all .25s var(--ease); z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.toast.bad { background: #b91c1c; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 36px; display: inline-block; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 登录页 ---------------- */
.login-body {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(760px 420px at 18% 8%, rgba(99, 102, 241, .16), transparent 55%),
    radial-gradient(720px 400px at 85% 90%, rgba(139, 92, 246, .13), transparent 55%),
    linear-gradient(180deg, #f7f8fe, #eef0fb);
  padding: 24px;
}
.login-wrap { width: 100%; max-width: 400px; margin: auto 0; animation: rise .55s var(--ease) both; }
.login-body .beian { margin-top: auto; width: 100%; padding-top: 24px; }
.login-card {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(231, 233, 244, .9); border-radius: 22px;
  box-shadow: 0 2px 6px rgba(18, 22, 52, .04), 0 32px 64px -28px rgba(18, 22, 52, .32);
  padding: 36px 32px;
}
.login-card .brand { justify-content: center; font-size: 18px; }

/* 登录页品牌标题：默认沉稳，悬浮时渐变点亮 + 下划线展开 */
.login-brand {
  text-align: center;
  font-size: 26px; font-weight: 800; letter-spacing: -.02em;
  color: var(--text);
  cursor: default;
  transition: transform .25s var(--ease), color .25s;
  position: relative;
  width: fit-content;
  margin: 0 auto;
}
.login-brand::after {
  content: "";
  position: absolute; left: 50%; bottom: -6px;
  width: 0; height: 3px; border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transform: translateX(-50%);
  transition: width .3s var(--ease);
}
.login-brand:hover {
  transform: translateY(-2px);
  background: linear-gradient(100deg, #4f46e5, #8b5cf6, #a78bfa);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-brand:hover::after { width: 64%; }

/* ---------------- 横幅提醒 ---------------- */
.banner {
  display: flex; gap: 12px; align-items: center;
  background: linear-gradient(90deg, #fffbeb, #fffdf5);
  border: 1px solid #f6e6b8; color: #7c5309;
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.banner b { color: #6b4610; }
.banner .grow { flex: 1; min-width: 0; }

/* ---------------- 统计卡 ---------------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-top: 18px;
}
.stat {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
/* 左上角渐变点缀 */
.stat::after {
  content: ""; position: absolute; top: -30px; right: -30px;
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, .12), transparent 70%);
  pointer-events: none;
}
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-value {
  font-size: 24px; font-weight: 800; letter-spacing: -.02em;
  margin-top: 4px; font-variant-numeric: tabular-nums;
}
.stat-unit { font-size: 12px; font-weight: 550; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.stats-sm { margin-top: 0; margin-bottom: 4px; }
.stats-sm .stat { padding: 13px 15px; }
.stats-sm .stat-value { font-size: 20px; }

.sec-title { font-size: 19px; font-weight: 800; }

/* ---------------- 进度条 ---------------- */
.exam-progress { display: flex; flex-direction: column; gap: 10px; }
.exam-progress .bar { height: 7px; border-radius: 999px; background: #eceef6; overflow: hidden; }
.exam-progress .bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 999px; position: relative;
  transition: width .6s var(--ease);
}
/* 流光效果 */
.exam-progress .bar i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  animation: shimmer 2.2s ease-in-out infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .table { min-width: 560px; }
.students-table input[type=number] { width: 70px; }

/* ---------------- 标签组 ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: 13px;
  background: #f5f6fb; border: 1px solid var(--line); color: var(--text);
  transition: border-color .15s, background .15s, transform .15s var(--ease);
}
.chip:hover { border-color: #d9dcf0; background: #fff; transform: translateY(-1px); }
.chip-sub { font-size: 11px; color: var(--muted); }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 24, 48, .44); backdrop-filter: blur(3px); padding: 20px;
  overflow-y: auto;
}
.modal {
  width: 100%; max-width: 480px; background: #fff; border-radius: 18px;
  box-shadow: 0 32px 80px -20px rgba(18, 22, 52, .45); padding: 28px;
  animation: modalIn .22s var(--ease);
}
.modal h2 { font-size: 18px; }
.modal .field textarea { min-height: 90px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 640px) {
  .wrap { padding: 20px 14px 64px; }
  .topbar { padding: 10px 14px; }
  .hero h1 { font-size: 22px; }
  .identity .field { width: 100%; }
  .score-big { font-size: 40px; }
  .card { padding: 18px; }
}

/* 尊重系统减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------------- 备案页脚 ---------------- */
.beian {
  text-align: center;
  padding: 8px 20px 36px;
  font-size: 12px;
  color: var(--muted);
}
.beian a { color: var(--muted); text-decoration: none; }
.beian a:hover { color: var(--accent); }
.beian .sep { margin: 0 8px; opacity: .5; }
