/* ============================================================
   在线考试系统 —— 共享样式（v1.3「首页门户」同源设计语言）
   indigo/violet 主色 + 渐变品牌色 + 光斑背景 + 点阵纹理；
   卡片白底细边 18px 大圆角多层柔影，胶囊按钮，上浮渐显入场动画。
   样式全部外链（CSP style-src 'self'，禁止内联 <style> 与 style 属性）。
   ============================================================ */

/* ========== 设计令牌 ========== */
:root {
  --font-stack: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'MiSans',
    'Microsoft YaHei', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;

  --color-primary: #6366f1;        /* indigo-500 */
  --color-primary-strong: #4f46e5; /* indigo-600 */
  --color-violet: #7c3aed;         /* violet-600 */
  --gradient-brand: linear-gradient(120deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);

  /* 语义色 */
  --color-success: #16a34a;
  --color-success-strong: #15803d;
  --color-danger: #dc2626;
  --color-danger-strong: #b91c1c;
  --color-warning: #d97706;

  --text-strong: #221f3a;
  --text-body: #4a4760;
  --text-muted: #6f6c8a;

  --bg-page: #f5f6fb;
  --bg-card: #ffffff;
  --border-soft: #e7e7f4;
  --border-strong: #d8d8ee;

  --shadow-sm: 0 1px 2px rgba(34, 31, 58, 0.05);
  --shadow-md: 0 1px 2px rgba(34, 31, 58, 0.04), 0 8px 24px rgba(34, 31, 58, 0.07);
  --shadow-lg: 0 2px 6px rgba(34, 31, 58, 0.06), 0 18px 40px rgba(79, 70, 229, 0.16);

  --radius-card: 18px;
  --radius-pill: 999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== 基础 ========== */
*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-stack);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-body);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(99, 102, 241, 0.22); color: var(--text-strong); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #cfcfe4; border-radius: var(--radius-pill);
  border: 2px solid var(--bg-page);
}
::-webkit-scrollbar-thumb:hover { background: #b6b6d6; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 6px;
}

a { color: var(--color-primary-strong); text-decoration: none; }

/* ========== 背景装饰：光斑 + 点阵 ========== */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob { position: absolute; border-radius: 50%; filter: blur(70px); }

.blob-a {
  width: 520px; height: 520px;
  top: -160px; left: -120px;
  background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.32), rgba(99, 102, 241, 0) 70%);
}

.blob-b {
  width: 620px; height: 620px;
  top: -220px; right: -180px;
  background: radial-gradient(circle at 70% 30%, rgba(168, 85, 247, 0.26), rgba(168, 85, 247, 0) 70%);
}

.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(99, 102, 241, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 78%);
}

/* ========== 布局 ========== */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow { max-width: 500px; }
.container.exam-wrap { max-width: 880px; }

/* ========== 顶栏 ========== */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 100;
}

.header .brand {
  font-weight: 700; font-size: 17px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: flex; align-items: center; gap: 8px;
}

.header .user-info { color: var(--text-muted); font-size: 13.5px; display: flex; gap: 16px; align-items: center; }

/* ========== Hero 区 ========== */
.hero { text-align: center; padding: 56px 0 36px; }

.hero .hero-icon { font-size: 52px; line-height: 1; display: block; }

.hero-title {
  margin: 16px 0 10px;
  font-size: clamp(32px, 5.5vw, 46px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(14px, 2.2vw, 16.5px);
  font-weight: 500;
  color: var(--text-body);
}

/* 栏目标题（渐变竖条 + 标题） */
.section-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700;
  color: var(--text-strong);
}

.section-head h2::before {
  content: '';
  width: 4px; height: 18px;
  border-radius: 2px;
  background: var(--gradient-brand);
}

/* ========== 卡片 ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 28px;
  margin-bottom: 20px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.card h2 { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: var(--text-strong); }
.card .desc { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; line-height: 1.7; }

/* 栏目大框（带边框容器，呈现「整体包裹」的层次感） */
.panel-box {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--bg-page);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

/* ========== 按钮（胶囊） ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px;
  padding: 9px 22px;
  border: none; border-radius: var(--radius-pill);
  font-family: var(--font-stack);
  font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  background: var(--color-primary); color: #ffffff;
  transition: background 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out);
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}

.btn:hover { background: var(--color-primary-strong); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3); }
.btn:active { transform: translateY(0); }
.btn:disabled { background: #b9b9d2; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.block { width: 100%; min-height: 46px; font-size: 15.5px; }

.btn.secondary {
  background: var(--bg-card); color: var(--text-body);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn.secondary:hover { border-color: var(--color-primary); color: var(--color-primary-strong); transform: translateY(-1px); }

.btn.danger { background: var(--color-danger); box-shadow: 0 1px 2px rgba(220, 38, 38, 0.25); }
.btn.danger:hover { background: var(--color-danger-strong); box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3); }

.btn.success { background: var(--color-success); box-shadow: 0 1px 2px rgba(22, 163, 74, 0.25); }
.btn.success:hover { background: var(--color-success-strong); box-shadow: 0 6px 16px rgba(22, 163, 74, 0.3); }

.btn.sm { min-height: 32px; padding: 5px 14px; font-size: 13px; }

/* ========== 徽标（胶囊） ========== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap;
}
.badge.blue  { background: rgba(99, 102, 241, 0.12); color: var(--color-primary-strong); }
.badge.green { background: rgba(22, 163, 74, 0.12);  color: var(--color-success-strong); }
.badge.red   { background: rgba(220, 38, 38, 0.1);   color: var(--color-danger-strong); }
.badge.gray  { background: rgba(111, 108, 138, 0.12); color: var(--text-muted); }
/* .badge.orange 定义统一保留在 L1030 附近（#ffedd5/#c2410c）——
   v2.6.1 复验收尾：此处旧定义（rgba(217,119,6,.14)/#92400e）与后段重复且色值不同，
   级联后后段生效但维护时容易改错处（切屏橙色不一致的实体），已删除旧份 */

/* ========== 提示条 ========== */
.msg {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 8px;
}
.msg.error { background: #fef2f2; color: var(--color-danger-strong); border: 1px solid #fecaca; display: flex; }
.msg.ok    { background: #f0fdf4; color: var(--color-success-strong); border: 1px solid #bbf7d0; display: flex; }
.msg.warn  { background: #fffbeb; color: var(--color-warning); border: 1px solid #fde68a; display: flex; }

/* 登录页公告条 */
.notice-bar {
  display: flex;
  padding: 14px 18px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #fecaca;
  box-shadow: var(--shadow-sm);
  color: var(--color-danger-strong);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 18px;
  word-break: break-all;
  white-space: pre-wrap;
  backdrop-filter: blur(6px);
}

/* ========== 表单 ========== */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 13px; color: var(--text-muted);
  margin-bottom: 8px; font-weight: 600;
}
.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%; padding: 12px 16px; font-size: 16px; /* 16px：防 iOS Safari 聚焦自动放大 */
  font-family: var(--font-stack);
  border: 1.5px solid var(--border-strong); border-radius: 12px; outline: none;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  background: var(--bg-card);
  color: var(--text-strong);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}
.field input::placeholder, .field textarea::placeholder { color: #a5a3bd; }

/* ========== 表格 ========== */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border-soft); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border-soft); }
th {
  background: rgba(99, 102, 241, 0.06);
  color: var(--text-muted); font-weight: 600; font-size: 12.5px;
  white-space: nowrap; letter-spacing: 0.4px;
}
tr:hover td { background: rgba(99, 102, 241, 0.04); }
tr:last-child td { border-bottom: none; }

/* ========== 页脚 ========== */
.footer {
  text-align: center; color: var(--text-muted); font-size: 13px;
  padding: 26px 0 34px; margin-top: 20px;
  border-top: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}
.footer a { color: var(--text-muted); transition: color 0.2s var(--ease-out); }
.footer a:hover { color: var(--color-primary-strong); }

/* ========== 统计卡 ========== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 20px;
  text-align: center;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  box-shadow: var(--shadow-sm);
}
.stat-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-item .num {
  font-size: 30px; font-weight: 800; line-height: 1.2;
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.stat-item .label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ========== 标签页 ========== */
.tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  width: fit-content;
}
.tabs button {
  padding: 9px 22px; border: none; cursor: pointer;
  border-radius: var(--radius-pill);
  background: none; cursor: pointer;
  font-family: var(--font-stack);
  font-size: 14px; color: var(--text-muted);
  transition: all 0.2s var(--ease-out);
}
.tabs button:hover { color: var(--color-primary-strong); }
.tabs button.active {
  background: var(--gradient-brand);
  color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}
.tab-panel { display: none; animation: rise-in 0.3s var(--ease-out); }
.tab-panel.active { display: block; }

/* 子标签页 */
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 16px 0; }
.subtabs button {
  padding: 9px 20px; border: 1px solid var(--border-strong);
  background: var(--bg-card); cursor: pointer;
  border-radius: var(--radius-pill);
  font-family: var(--font-stack);
  font-size: 13.5px; color: var(--text-muted);
  transition: all 0.2s var(--ease-out);
}
.subtabs button:hover { color: var(--color-primary-strong); border-color: var(--color-primary); }
.subtabs button.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary-strong); font-weight: 600;
}
.sub-panel { display: none; animation: rise-in 0.3s var(--ease-out); }
.sub-panel.active { display: block; }

/* 行内操作 */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row .spacer { flex: 1; }

/* 模式字段区域 */
.mode-fields {
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 12px 0;
  background: rgba(99, 102, 241, 0.03);
  transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}
.mode-fields:hover { border-color: var(--color-primary); background: rgba(99, 102, 241, 0.06); }

/* 考试详情视图 */
.exam-detail { display: none; animation: rise-in 0.3s var(--ease-out); }
.exam-detail.active { display: block; }

/* ============================================================
   考生登录页
   ============================================================ */
.login-hero { text-align: center; padding: 52px 0 34px; }

.login-hero .hero-icon {
  font-size: 54px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 96px; height: 96px;
  border-radius: 28px;
  background: var(--gradient-brand);
  box-shadow: var(--shadow-lg);
}

.login-hero h1 {
  margin: 20px 0 8px;
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

.login-hero p { margin: 0; color: var(--text-muted); font-size: 15px; }

.login-card { max-width: 460px; margin: 0 auto; }

/* ============================================================
   答题页
   ============================================================ */

/* 顶部考试信息卡 */
.exam-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 18px 26px;
  margin: 22px 0 16px;
  box-shadow: var(--shadow-md);
}
.exam-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.exam-title strong { font-size: 20px; font-weight: 700; color: var(--text-strong); letter-spacing: .2px; }

.timer {
  font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 8px 22px; border-radius: 16px; line-height: 1.2;
  background: var(--gradient-brand); color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  display: flex; align-items: center; gap: 8px;
}
.timer .t-icon { font-size: 19px; opacity: .85; }
.timer.warn {
  background: linear-gradient(120deg, #ef4444, #dc2626);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
  animation: blink 1s step-start infinite;
}
@keyframes blink { 50% { opacity: .6; } }

/* 答题进度徽标 + 4px 细进度条（v2.7.0 N5，考试页头部计时器旁）：
   沿用品牌渐变与 badge 风格，不引入新配色；[hidden] 需显式声明——
   本元素 display:flex 会覆盖 UA 样式表对 [hidden] 的 display:none */
.answer-progress {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  min-width: 150px;
}
.answer-progress[hidden] { display: none; }
.answer-progress-track {
  height: 4px; width: 100%;
  background: #eceafa; border-radius: var(--radius-pill); overflow: hidden;
}
.answer-progress-fill {
  height: 100%; width: 0;
  background: var(--gradient-brand);
  border-radius: var(--radius-pill);
  transition: width .3s var(--ease-out);
}

/* 进度卡 */
.progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 15px 24px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.progress-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.progress-row .ptext { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.save-hint { color: var(--text-muted); font-size: 12px; margin-left: auto; }
.progress-bar { height: 10px; background: #eceafa; border-radius: var(--radius-pill); overflow: hidden; }
.progress-bar .fill {
  height: 100%; width: 0;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  transition: width .3s var(--ease-out);
}

/* 题目卡 */
.q-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.q-meta .badge { font-size: 13px; padding: 4px 14px; }
.q-content {
  font-size: 19px; font-weight: 650; line-height: 1.75;
  color: var(--text-strong);
  margin-bottom: 22px; white-space: pre-wrap;
}
.option {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 15px 18px;
  border: 1.5px solid var(--border-soft);
  border-radius: 14px; margin-bottom: 12px;
  cursor: pointer; font-size: 16px; line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-card);
  transition: all .18s var(--ease-out);
}
.option:hover { border-color: #a5b4fc; background: #f7f7ff; transform: translateY(-1px); }
.option.selected {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.06));
  box-shadow: 0 0 0 1px var(--color-primary), 0 4px 14px rgba(99, 102, 241, 0.16);
  color: var(--text-strong);
}
.option input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--color-primary); flex-shrink: 0; cursor: pointer; }
.fill-input {
  width: 100%; padding: 14px 16px; font-size: 17px;
  font-family: var(--font-stack);
  border: 1.5px solid var(--border-strong); border-radius: 14px; outline: none;
  color: var(--text-strong);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.fill-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14); }

.nav-row { display: flex; gap: 12px; margin-top: 26px; }
.nav-row .spacer { flex: 1; }
.nav-row .btn { min-height: 44px; padding: 10px 28px; font-size: 15px; }

/* 题号导航卡 */
.pal-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.legend { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.legend .dot { width: 22px; height: 22px; border-radius: 7px; display: inline-block; }
.legend .dot.on { background: var(--gradient-brand); box-shadow: 0 1px 4px rgba(99, 102, 241, 0.4); }
.legend .dot.off { background: var(--bg-page); border: 2px solid var(--border-strong); }
.legend .pal-tip { margin-left: auto; font-size: 12.5px; }

.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 9px; margin-top: 4px; }
.pal-btn {
  padding: 11px 0;
  border: 2px solid var(--border-strong);
  border-radius: 11px;
  background: var(--bg-page);
  cursor: pointer;
  font-family: var(--font-stack);
  font-size: 16px; font-weight: 600;
  color: var(--text-muted);
  transition: all .15s var(--ease-out);
}
.pal-btn:hover { border-color: var(--color-primary); transform: scale(1.08); z-index: 1; position: relative; }
.pal-btn.answered {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #fff; font-weight: 700;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}
.pal-btn.answered:hover { transform: scale(1.12); }
.pal-btn.current { outline: 3px solid #f59e0b; outline-offset: 2px; transform: scale(1.1); }

/* 底部操作栏 */
.action-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}
.action-bar .btn { min-height: 48px; padding: 12px 32px; font-size: 16px; font-weight: 700; }

/* 居中行 / 居中信息卡 / 加大按钮 */
.row.center { justify-content: center; }
.exam-head.center { justify-content: center; }
.score-hero.compact { padding: 10px 0; }
.btn.lg { min-height: 46px; padding: 12px 36px; font-size: 15px; }

/* ============================================================
   成绩页
   ============================================================ */
.score-hero { text-align: center; padding: 34px 20px; }
.score-hero .exam-line { color: var(--text-muted); margin-bottom: 10px; font-size: 14.5px; }
.score-hero .big {
  font-size: 52px; font-weight: 800; line-height: 1.2;
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.score-hero .big.pass {
  background: linear-gradient(120deg, #16a34a, #4ade80);
  -webkit-background-clip: text; background-clip: text;
}
.score-hero .big.fail {
  background: linear-gradient(120deg, #dc2626, #f87171);
  -webkit-background-clip: text; background-clip: text;
}
.score-hero .sub { color: var(--text-muted); margin-top: 8px; font-size: 14.5px; }

.detail-q { border-bottom: 1px solid var(--border-soft); padding: 16px 0; }
.detail-q:last-child { border-bottom: none; }
.detail-q .dq-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.detail-q .dq-content { font-weight: 600; margin-bottom: 6px; white-space: pre-wrap; color: var(--text-strong); }
.detail-q .dq-ans { font-size: 14px; color: var(--text-muted); }
.detail-q .dq-ans b.correct { color: var(--color-success-strong); }
.detail-q .dq-ans b.wrong { color: var(--color-danger-strong); }
.detail-q .dq-exp {
  font-size: 13px; color: var(--text-muted);
  background: rgba(99, 102, 241, 0.05);
  border-left: 3px solid var(--color-primary);
  padding: 9px 13px; border-radius: 0 10px 10px 0; margin-top: 8px;
}

/* ============================================================
   管理后台
   ============================================================ */
.radio-line { margin-right: 16px; font-size: 14px; color: var(--text-body); }

.field.grow { flex: 1; min-width: 220px; margin-bottom: 0; }
.mode-line { margin: 10px 0; }
.inline-label { font-size: 14px; color: var(--text-body); display: inline-flex; align-items: center; gap: 8px; }
.input-num {
  width: 90px; padding: 7px 10px; font-size: 14px;
  font-family: var(--font-stack);
  border: 1.5px solid var(--border-strong); border-radius: 10px;
  color: var(--text-strong); outline: none; background: var(--bg-card);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.input-dt {
  padding: 7px 10px; font-size: 14px;
  font-family: var(--font-stack);
  border: 1.5px solid var(--border-strong); border-radius: 10px;
  color: var(--text-strong); outline: none; background: var(--bg-card);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.input-num:focus, .input-dt:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14); }
.gap-top { margin-top: 12px; }
.file-label { cursor: pointer; }
.file-label input[type="file"] { display: none; }
.scroll-y { max-height: 440px; overflow-y: auto; }
.detail-name { font-size: 17px; color: var(--text-strong); }
.field textarea {
  width: 100%; padding: 12px 16px; font-size: 14px;
  font-family: var(--font-stack);
  border: 1.5px solid var(--border-strong); border-radius: 12px;
  color: var(--text-strong); outline: none; background: var(--bg-card);
  resize: vertical; box-sizing: border-box;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.field textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14); }
.sysinfo-row { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.sysinfo-row:last-child { border-bottom: none; }
.sysinfo-key { width: 140px; color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.sysinfo-val { color: var(--text-strong); }
.card-like { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: var(--shadow-sm); }

/* 表格动态内容辅助类（替代内联 style，规避 CSP） */
td.nowrap { white-space: nowrap; }
.td-content { max-width: 420px; }
.td-more { color: var(--text-muted); }
.err-list { margin: 8px 0 0 18px; padding: 0; }

/* 弹窗（题目详情等） */
.modal-mask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(24, 22, 45, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}
.modal-mask[hidden] { display: none; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px;
  max-height: 84vh; display: flex; flex-direction: column;
  animation: rise-in 0.25s var(--ease-out);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--border-soft);
}
.modal-head strong { font-size: 16px; color: var(--text-strong); }
.modal-close {
  width: 32px; height: 32px; border: none; cursor: pointer;
  border-radius: 50%; background: var(--bg-page); color: var(--text-muted);
  font-size: 18px; line-height: 1; transition: background .15s, color .15s;
}
.modal-close:hover { background: #fee2e2; color: var(--color-danger-strong); }
.modal-body { padding: 20px 22px 24px; overflow-y: auto; }
.q-detail-row { margin-bottom: 14px; }
.q-detail-label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-bottom: 5px; }
.q-detail-value { font-size: 15px; color: var(--text-strong); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.q-detail-opts { display: flex; flex-direction: column; gap: 8px; }
.q-detail-opt {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 13px; border-radius: 11px;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--border-soft);
}
.q-detail-opt.is-answer {
  border-color: var(--color-success);
  background: rgba(22, 163, 74, 0.08);
}
.q-detail-opt .ol {
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg-card);
  border: 1px solid var(--border-strong);
  font-size: 13px; font-weight: 700; color: var(--text-muted);
}
.q-detail-opt.is-answer .ol { background: var(--color-success); color: #fff; border-color: transparent; }
.q-detail-opt .ot { font-size: 14.5px; color: var(--text-strong); word-break: break-word; }

/* 导入结果题型统计 */
.type-stat { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* 列表搜索框 + 分页控件 */
.search-input {
  -webkit-appearance: none; appearance: none;
  padding: 9px 14px 9px 38px; font-size: 13.5px;
  font-family: var(--font-stack);
  border: 1px solid var(--border-soft); border-radius: var(--radius-pill);
  outline: none; color: var(--text-strong);
  min-width: 220px;
  /* 左内嵌放大镜图标（灰紫描边）+ 浅灰紫底 */
  background: #f4f5fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a88b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4.2-4.2'/%3E%3C/svg%3E") no-repeat 13px center / 15px 15px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s var(--ease-out);
}
.search-input:hover { border-color: var(--border-strong); }
.search-input:focus {
  background-color: #fff;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.12), var(--shadow-md);
}
.search-input::placeholder { color: #b3b1c9; font-weight: 400; }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
/* 考生端 .field 表单内的搜索框占满行宽（管理端工具栏中的不受影响） */
.field .search-input { width: 100%; min-width: 0; display: block; }
/* 考生端 .field 内搜索框的 focus/placeholder 需盖过旧规则 .field input:focus / .field input::placeholder（高特异度覆盖） */
.field .search-input:focus {
  border-color: rgba(99, 102, 241, 0.55);
  background-color: #fff;
  box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.12), var(--shadow-md);
}
.field .search-input::placeholder { color: #b3b1c9; font-weight: 400; }
/* #tpl-save-name 是“模板名称”普通输入框，借用 search-input 类但无搜索语义：去图标、去底色，恢复普通输入观感 */
#tpl-save-name { background: var(--bg-card) none no-repeat 13px center / 15px 15px; padding-left: 14px; }

.pager {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; flex-wrap: wrap;
}
.pager[hidden] { display: none; }
.pager-btn {
  padding: 7px 18px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--bg-card); cursor: pointer;
  font-family: var(--font-stack);
  font-size: 13px; font-weight: 600; color: var(--text-body);
  transition: all 0.15s var(--ease-out);
}
.pager-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  transform: translateY(-1px);
}
/* 统计分析：分数分布直方图 + 正确率条 */
.dist-row { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.dist-label { width: 160px; font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.dist-bar {
  flex: 1; min-width: 120px; height: 16px;
  background: #eceafa; border-radius: var(--radius-pill); overflow: hidden;
}
.dist-fill {
  display: block; height: 100%; width: 0;
  background: var(--gradient-brand); border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease-out);
}
.dist-count { width: 120px; text-align: right; font-size: 13px; color: var(--text-muted); flex-shrink: 0; }

.rate-bar {
  display: inline-block; vertical-align: middle;
  width: 90px; height: 10px; margin-right: 8px;
  background: #eceafa; border-radius: var(--radius-pill); overflow: hidden;
}
.rate-fill { display: block; height: 100%; width: 0; border-radius: var(--radius-pill); }
.rate-fill.green { background: linear-gradient(120deg, #16a34a, #4ade80); }
.rate-fill.orange { background: linear-gradient(120deg, #d97706, #fbbf24); }
.rate-fill.red { background: linear-gradient(120deg, #dc2626, #f87171); }

.dist-chip {
  display: inline-block; margin: 0 6px 4px 0; padding: 2px 9px;
  border-radius: var(--radius-pill); font-size: 12px;
  background: rgba(99, 102, 241, 0.1); color: var(--color-primary-strong);
}
.pager-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pager-info { font-size: 13px; color: var(--text-muted); }

/* ============================================================
   入场动画 + 响应式 + 动效减弱
   ============================================================ */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.animate-in { animation: rise-in 0.55s var(--ease-out) backwards; }
.animate-in.d1 { animation-delay: 0.06s; }
.animate-in.d2 { animation-delay: 0.12s; }
.animate-in.d3 { animation-delay: 0.18s; }

@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .card { padding: 20px; }
  .header { padding: 12px 16px; }
  .exam-head { padding: 14px 16px; }
  .timer { font-size: 23px; padding: 6px 14px; }
  .q-content { font-size: 17px; }
  .option { padding: 13px 14px; }
  .palette { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 7px; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; padding: 9px 10px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .action-bar .btn { padding: 12px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   手动添加题目：动态选项
   ============================================================ */
.opt-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.opt-input-row { display: flex; align-items: center; gap: 10px; }
.opt-tag {
  width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-weight: 700; font-size: 14px;
  background: var(--primary-soft, #eef2ff); color: var(--primary);
}
.opt-input {
  flex: 1; padding: 9px 14px; font-size: 14px;
  border: 1.5px solid var(--border); border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.opt-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.opt-del {
  width: 30px; height: 30px; flex-shrink: 0; border: none; cursor: pointer;
  border-radius: 50%; background: #fee2e2; color: var(--danger);
  font-size: 16px; line-height: 1; transition: background .15s;
}
.opt-del:hover { background: #fecaca; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.hint-group { display: flex; align-items: flex-end; padding-bottom: 6px; }

/* ============================================================
   答题页选项（精致化徽章样式）
   ============================================================ */
.option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; margin-bottom: 10px;
  border: 2px solid var(--border); border-radius: 14px;
  background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.option:hover { border-color: var(--primary); background: var(--primary-soft, #eef2ff); transform: translateY(-1px); }
.option.selected {
  border-color: var(--primary); background: var(--primary-soft, #eef2ff);
  box-shadow: 0 2px 10px rgba(99, 102, 241, .18);
}
.option input[type="radio"], .option input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.opt-letter {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 700; font-size: 14px;
  background: #f1f5f9; color: var(--text-muted);
  transition: background .15s, color .15s;
}
.option.selected .opt-letter { background: var(--gradient-brand); color: #fff; }
.opt-text { font-size: 16px; line-height: 1.6; color: var(--text-strong); word-break: break-word; }

/* ============================================================
   手动录入表单
   ============================================================ */
.add-form-card {
  margin-top: 16px;
}
.add-form-card h3 {
  margin-bottom: 14px;
  font-size: 15px;
  color: var(--text-muted);
}
.add-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.full {
  grid-column: 1 / -1;
}
.form-group label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-strong);
  background: var(--bg-input);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.form-group textarea {
  resize: vertical;
  min-height: 60px;
}
#q-opt-group { display: flex; flex-direction: column; gap: 10px; }
#btn-add-opt { align-self: flex-start; }

/* ============================================================
   v2.0 多管理员：考生登录三步流程
   ============================================================ */
.steps { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 18px; }
.step {
  display: flex; align-items: center; gap: 7px;
  border: none; background: transparent; cursor: pointer;
  padding: 6px 10px; border-radius: 999px;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
}
.step .step-n {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #e2e8f0; color: var(--text-muted); font-size: 12px; font-weight: 700;
}
.step.current { color: var(--primary); }
.step.current .step-n { background: var(--gradient-brand, #6366f1); color: #fff; }
.step.done .step-n { background: #dcfce7; color: #16a34a; }
.step-arrow { color: #cbd5e1; font-size: 16px; }
.pick-current {
  background: var(--primary-soft, #eef2ff); border-radius: 10px;
  padding: 9px 14px; font-size: 13px; color: var(--text-strong);
  margin-bottom: 14px;
}
.pick-list { display: flex; flex-direction: column; gap: 9px; max-height: 320px; overflow-y: auto; padding: 2px; }
.pick-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 2px solid var(--border); border-radius: 12px;
  background: #fff; cursor: pointer; text-align: left;
  padding: 12px 15px; transition: border-color .15s, background .15s;
}
.pick-item:hover { border-color: var(--primary); background: var(--primary-soft, #eef2ff); }
.pick-item.selected { border-color: var(--primary); background: var(--primary-soft, #eef2ff); }
.pick-ava {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--gradient-brand, #6366f1); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.pick-name { font-size: 15px; font-weight: 600; color: var(--text-strong); flex: 1; }
.pick-desc { font-size: 12px; color: var(--text-muted); flex-basis: 100%; }
.pick-item.exam { flex-wrap: wrap; }
.pick-item.exam .pick-go { align-self: center; }
.pick-go { font-size: 12px; color: var(--primary); flex-shrink: 0; }
.pick-empty { text-align: center; color: var(--text-muted); font-size: 14px; padding: 26px 10px; }

/* 简答题答题框 */
.sa-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.sa-input {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px; font-size: 16px; line-height: 1.7; /* 16px：防 iOS Safari 聚焦自动放大 */
  border: 2px solid var(--border); border-radius: 12px;
  resize: vertical; min-height: 110px; outline: none;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.sa-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }

/* 管理端：注册入口 / 注册项表格 / 账号操作 */
.reg-entry { text-align: center; margin-top: 14px; font-size: 14px; }
.reg-entry a { color: var(--primary); text-decoration: none; font-weight: 500; }
.reg-entry a:hover { text-decoration: underline; }
/* 注册入口「链接观感」按钮（CSP 禁止 javascript: URL，原 <a href="javascript:void(0)"> 改为 button） */
.linklike {
  background: none; border: none; padding: 0; font: inherit; cursor: pointer;
  color: var(--primary); text-decoration: none; font-weight: 500;
}
.linklike:hover { text-decoration: underline; }
/* 卡片内 h3 顶部贴边（替代被 CSP 丢弃的内联 style="margin-top:0"） */
.h3-flush { margin-top: 0; }
/* 导入预览卡片标题间距（替代被 CSP 丢弃的内联 style="margin:4px 0 8px"） */
.preview-gap { margin: 4px 0 8px; }
.fields-table { width: 100%; border-collapse: collapse; }
.fields-table th, .fields-table td { padding: 7px 8px; border-bottom: 1px solid var(--border-soft); font-size: 13px; text-align: left; }
.fields-table input[type="text"] {
  width: 100%; box-sizing: border-box; padding: 7px 10px;
  border: 1px solid var(--border-soft); border-radius: 8px; font-size: 13px;
}
.modal-box { max-height: 86vh; overflow-y: auto; }
.badge.orange { background: #ffedd5; color: #c2410c; }

/* ============================================================
   手机端优化（v2.0 全站响应式）
   ============================================================ */
@media (max-width: 640px) {
  /* 通用布局 */
  .container { padding: 0 10px; }
  .container.narrow { max-width: 100%; }
  .card { padding: 16px 14px; border-radius: 14px; }
  .header { padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
  .header .brand { font-size: 14px; }
  .user-info { font-size: 13px; gap: 8px; }

  /* 登录页三步 */
  .login-hero h1 { font-size: 22px; }
  .login-hero p { font-size: 13px; }
  .steps { gap: 2px; margin-bottom: 14px; }
  .step { padding: 5px 6px; font-size: 12px; }
  .step-t { font-size: 12px; }
  .pick-list { max-height: 46vh; }
  .pick-item { padding: 12px; }
  .pick-name { font-size: 14px; }

  /* 答题页：触控目标加大 */
  .option { padding: 15px 14px; gap: 10px; border-radius: 13px; }
  .opt-letter { width: 34px; height: 34px; font-size: 15px; }
  .opt-text { font-size: 15.5px; }
  .fill-input, .sa-input { font-size: 16px; padding: 12px; }
  .palette { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 7px; }
  .pal-btn { height: 42px; font-size: 15px; }
  .action-bar { position: sticky; bottom: 0; background: #fff; padding: 10px 0; box-shadow: 0 -4px 14px rgba(15,23,42,.06); }
  .action-bar .btn { padding: 13px 18px; font-size: 15px; }
  .timer { font-size: 21px; }
  .q-content { font-size: 16.5px; line-height: 1.75; }

  /* 成绩页 */
  .big { font-size: 30px; }
  .dq-head { flex-wrap: wrap; gap: 5px; }
  .detail-q { padding: 12px; }

  /* 管理端：表格横向滚动 + tabs 收纳 */
  .tabs { width: 100%; overflow-x: auto; }
  .tabs button { flex: 1 0 auto; padding: 9px 12px; font-size: 13px; white-space: nowrap; }
  .subtabs { overflow-x: auto; }
  .subtabs button { white-space: nowrap; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 560px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .row { flex-wrap: wrap; }
  .row .btn { margin-bottom: 4px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .search-input { width: 100%; max-width: none; }
  .exam-detail .row { gap: 6px; }
  .exam-detail .btn { margin-bottom: 4px; }
  .mode-line { flex-direction: column; gap: 8px; }
}

/* 小屏继续收紧（≤380px） */
@media (max-width: 380px) {
  .step-t { display: none; }
  .step .step-n { width: 26px; height: 26px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===== v2.1：论述题输入框 + 人工判分弹窗 ===== */
.sa-input.essay-input {
  min-height: 180px;
  font-size: 16px; /* 论述题覆盖了 .sa-input 的字号，须同步 16px，否则 iOS 聚焦仍会放大 */
  line-height: 1.7;
}
.modal-box.modal-wide {
  width: min(860px, 94vw);
}
#manual-list .field input[type="number"] {
  max-width: 220px;
}
#manual-list .section-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== v2.2：放榜横幅 / 按题批量判卷 / 考试模板 ===== */
.publish-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(120deg, rgba(22, 163, 74, 0.12), rgba(99, 102, 241, 0.10));
  border: 1px solid rgba(22, 163, 74, 0.35);
  color: var(--color-success-strong);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.6;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.pb-icon { font-size: 18px; }
.mq-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  margin-top: 8px;
  background: var(--bg-card);
}
.mq-row.mq-pending { border-color: rgba(217, 119, 6, 0.4); background: rgba(217, 119, 6, 0.05); }
.mq-info { flex: 1; min-width: 0; }
.mq-ans { margin-top: 4px; white-space: pre-wrap; word-break: break-all; }
.mq-score {
  width: 110px;
  flex: none;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 14px;
}
.tpl-select { max-width: 380px; }
.tpl-label { white-space: nowrap; font-size: 13px; color: var(--text-body); }
#score-publish-line { align-items: center; flex-wrap: wrap; }
.manual-tabs { margin-top: 0; }
#manual-byq .mq-row input[type="number"] { max-width: 110px; }

/* ===== v2.3：多空填空 / 题目编辑 ===== */
.fill-multi { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.fill-multi-line { display: flex; align-items: center; gap: 8px; }
.fill-multi-label { flex: none; font-size: 13px; color: var(--color-text-secondary, #5b6b7c); white-space: nowrap; min-width: 52px; }
.q-detail-opt.is-answer { color: #177a3e; }

/* ===== v2.4：填空题逐空答案编辑器 ===== */
.fill-blank-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.fill-blank-label { flex: none; font-size: 13px; font-weight: 600; color: var(--color-text-secondary, #5b6b7c); white-space: nowrap; min-width: 34px; }
.fill-cand-input { flex: 1 1 150px; min-width: 140px; max-width: 260px; }
.fill-cand-add { flex: none; }

/* ===== v2.8：选词填空（banked cloze） ===== */
.cloze-text { font-size: 16px; line-height: 2.3; color: var(--text-strong); white-space: pre-wrap; word-break: break-word; }
.cloze-select {
  display: inline-block; width: auto; min-width: 74px; margin: 0 3px; vertical-align: middle;
  padding: 4px 8px; font-size: 15px; font-weight: 700; font-family: var(--font-stack);
  border: 1.5px solid var(--border-strong); border-radius: 10px; outline: none;
  color: var(--text-strong); background: var(--primary-soft, #eef2ff);
  transition: border-color .15s, box-shadow .15s;
}
.cloze-select:focus { border-color: var(--color-primary, #6366f1); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14); }
.cloze-select:disabled, .cloze-select option:disabled { color: #b6b3c9; background: #f3f2f7; }
.cloze-ph { color: var(--text-muted, #6f6c8a); letter-spacing: 2px; }
.cloze-bank { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 14px; }
.cloze-bank-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--color-border, #e2e6ec); border-radius: 10px;
  background: var(--color-bg-secondary, #f8fafc); min-width: 0;
}
.cloze-bank-item .cloze-word { flex: 1 1 auto; font-size: 14px; color: var(--text-strong); word-break: break-word; }
.cloze-bank-item .cloze-used-mark { flex: none; font-size: 11px; color: var(--color-primary, #6366f1); white-space: nowrap; }
.cloze-bank-item.used { border-color: var(--color-primary, #6366f1); background: var(--primary-soft, #eef2ff); }
.cloze-bank-item.used .opt-letter { background: var(--gradient-brand); color: #fff; }
.cloze-key-select { flex: 0 1 130px; min-width: 90px; }

/* ===== v3.0：排序题 / 匹配题 ===== */
.ordering-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ordering-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--color-border, #e2e6ec); border-radius: 10px;
  background: var(--color-bg-secondary, #f8fafc); min-width: 0;
}
.ordering-item .opt-text { flex: 1 1 auto; }
.ordering-btn {
  flex: none; padding: 4px 10px; font-size: 12px; border: 1px solid var(--color-border, #e2e6ec);
  border-radius: 8px; background: var(--color-bg, #fff); color: var(--color-text-secondary, #5b6b7c);
  cursor: pointer; white-space: nowrap;
}
.ordering-btn:hover:not(:disabled) { border-color: var(--color-primary, #6366f1); color: var(--color-primary, #6366f1); }
.ordering-btn:disabled { opacity: .4; cursor: not-allowed; }
.matching-right { margin: 4px 0 12px; }
.matching-right-title { font-size: 12px; color: var(--color-text-secondary, #5b6b7c); margin-bottom: 6px; }
.matching-right-row { display: flex; flex-wrap: wrap; gap: 6px; }
.matching-chip {
  padding: 4px 10px; font-size: 13px; border: 1px dashed var(--color-border, #e2e6ec);
  border-radius: 999px; color: var(--color-text-secondary, #5b6b7c); background: var(--color-bg, #fff);
}
.matching-chip.used { border-style: solid; border-color: var(--color-primary, #6366f1); color: var(--color-primary, #6366f1); background: var(--primary-soft, #eef2ff); }
.matching-list { display: flex; flex-direction: column; gap: 8px; }
.matching-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--color-border, #e2e6ec); border-radius: 10px;
  background: var(--color-bg-secondary, #f8fafc); min-width: 0;
}
.matching-item .opt-text { flex: 1 1 auto; }
.matching-select {
  flex: none; min-width: 150px; padding: 6px 8px; font-size: 14px;
  border: 1.5px solid var(--border-strong); border-radius: 8px; outline: none;
  color: var(--text-strong); background: var(--color-bg, #fff);
}
.matching-select:focus { border-color: var(--color-primary, #6366f1); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14); }
.matching-select option:disabled { color: #b6b3c9; background: #f3f2f7; }

/* ===== v2.5：候选删除 / 导入预览 / 按空分析 ===== */
.fill-cand-wrap { display: inline-flex; align-items: center; gap: 4px; flex: 0 1 auto; }
.fill-cand-del { flex: none; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(220, 38, 38, 0.08); color: var(--color-danger-strong, #dc2626); font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
.fill-cand-del:hover { background: rgba(220, 38, 38, 0.18); }
.preview-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.preview-table th, .preview-table td { border: 1px solid var(--color-border, #e2e6ec); padding: 5px 8px; text-align: left; vertical-align: top; word-break: break-all; }
.preview-table th { background: var(--color-bg-secondary, #f5f7fa); font-weight: 600; white-space: nowrap; }
.rate-bar { width: 120px; height: 10px; border-radius: 5px; background: rgba(111, 108, 138, 0.15); overflow: hidden; }
.rate-fill { height: 100%; border-radius: 5px; background: var(--color-primary, #4f6ef7); }
.blank-stat-question { border: 1px solid var(--color-border, #e2e6ec); border-radius: 8px; padding: 10px 14px; margin-top: 10px; }

/* ===== v2.6.0：临考提醒条（考生端答题页，exam-head 之下） ===== */
.time-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef9c3;              /* 黄底显眼，非 error 红色系 */
  border: 1px solid #fde047;
  color: #854d0e;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: 12px;
  padding: 10px 16px;
  margin: 0 0 14px;
  transition: opacity 0.7s var(--ease-out);
}
.time-alert.fading { opacity: 0; }

/* ===== v2.6.0：交卷确认层（考生端自绘 modal） ===== */
.submit-modal-box { max-width: 520px; }
.submit-modal-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-strong);
  font-weight: 600;
  margin-bottom: 14px;
}
.submit-pal-title {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
/* 确认层题号网格：复用 .palette/.pal-btn，触控目标加高到 ≥44px（移动端可点）
   v2.6.1 B-10：overflow-y:auto 出现纵向滚动条时，滚动条会压住最后一列题号按钮
   （Windows 经典滚动条占位但浮于内容之上时亦然）；预留 padding-right 让按钮与滚动条脱开 */
.submit-palette { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 9px; max-height: 220px; overflow-y: auto; padding-right: 6px; }
.submit-palette .pal-btn { min-height: 44px; }
.submit-actions { margin-top: 18px; }
.submit-actions .btn { min-height: 44px; }

/* ===== v3.2：人工判分流程细化（评分要点 rubric + 评卷工作台） ===== */
.rubric-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.rubric-row .rubric-text.grow { flex: 1 1 200px; min-width: 160px; }
.rubric-row .rubric-score { flex: none; width: 90px; }
.rubric-grade-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rubric-grade-row { display: flex; align-items: center; gap: 8px; }
.rubric-grade-name { flex: 1 1 auto; font-size: 13px; color: var(--text-body, #33404f); }
.rubric-grade-score { flex: none; width: 100px; }
.rubric-grade-sum { font-size: 13px; font-weight: 600; margin-top: 4px; }
.manual-item-card { border-left: 3px solid transparent; }
.manual-item-card[data-pending="1"] { border-left-color: #e8912d; }
.manual-item-card[data-pending="0"] { border-left-color: #2e9e5b; }
.manual-item-card.mq-focus { outline: 2px solid #e8912d; outline-offset: 2px; }
.mq-rubric-note { color: var(--color-text-secondary, #5b6b7c); background: rgba(0,0,0,0.035); padding: 6px 10px; border-radius: 6px; margin-top: 6px; }
.mq-comment { width: 100%; box-sizing: border-box; resize: vertical; }
