:root {
  --ink: #16333f;
  --muted: #5b7380;
  --line: #d5e0e4;
  --accent: #0f6f6a;
  --accent-deep: #0b5753;
  --bg: #eef3f4;
  --font: "Microsoft YaHei", "PingFang SC", sans-serif;
}
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* 始终预留纵向滚动条，避免登录后/刷新时内容左右挤一下 */
  overflow-y: scroll;
  scrollbar-gutter: stable;
}
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  overflow-x: hidden;
  width: 100%;
}
img, video { max-width: 100%; height: auto; }
/* 顶栏 Logo / 证件照必须固定尺寸，避免 height:auto 在图片解码后把页面顶一下 */
.exam-top .brand-logo {
  width: 34px !important;
  height: 34px !important;
  max-width: 34px !important;
  object-fit: contain;
  /* 深色顶栏上保留白底圆角，展示企业彩色 LOGO（勿再用 invert 滤成白块） */
  background: #fff !important;
  border-radius: 50% !important;
  padding: 2px !important;
  filter: none !important;
  box-sizing: border-box;
}
.hero-photo,
.hero-photo-slot img {
  width: 84px !important;
  height: 112px !important;
  max-width: 84px !important;
  object-fit: cover;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { max-width: 100%; font-family: inherit; }

.exam-toast {
  position: fixed;
  left: 0;
  right: 0;
  top: 18px;
  z-index: 9999;
  display: none;
  justify-content: center;
  pointer-events: none;
  background: transparent;
  padding: 0 16px;
}
.exam-toast.show { display: flex; }
.exam-toast-panel {
  min-width: 0;
  max-width: min(360px, 92vw);
  width: auto;
  background: rgba(15, 61, 58, .92);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: 0 8px 24px rgba(8, 40, 36, .18);
  text-align: center;
}
.exam-toast-panel.is-error {
  background: rgba(153, 38, 38, .92);
}
.exam-toast-msg {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  line-height: 1.45;
  letter-spacing: .02em;
  text-shadow: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(340px, 86vw);
}
.exam-dialog {
  position: fixed; inset: 0; z-index: 10000; display: none;
  align-items: center; justify-content: center;
  background: rgba(8, 28, 36, .45); padding: 20px;
}
.exam-dialog.show { display: flex; }
.exam-dialog-panel {
  width: min(400px, 92vw);
  background: #fff;
  border: 1px solid #d7e6e5;
  border-radius: 12px;
  padding: 22px 22px 18px;
  box-shadow: 0 18px 48px rgba(22, 51, 63, .22);
  text-align: left;
}
.exam-dialog-panel.is-wide {
  width: min(480px, 94vw);
}
.exam-dialog-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.exam-dialog-msg {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  white-space: pre-line;
}
.exam-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.exam-dialog-cancel,
.exam-dialog-ok {
  height: 38px;
  min-width: 88px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.exam-dialog-cancel {
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
}
.exam-dialog-ok {
  border: 0;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(15, 111, 106, .22);
}
.exam-dialog-ok.is-danger {
  background: #b42318;
  box-shadow: 0 6px 14px rgba(180, 35, 24, .22);
}

.exam-login-body { min-height: 100vh; }
.exam-login-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 420px at 12% 18%, rgba(15,111,106,.10), transparent 60%),
    linear-gradient(160deg, #edf3f4, #f5f7f8 42%, #e8eef1);
}
.exam-login-shell {
  width: min(1120px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(22,51,63,.10);
  border: 1px solid rgba(22,51,63,.08);
}
.exam-login-brand {
  background: linear-gradient(180deg, #16333f, #1c4450 55%, #0f6f6a 140%);
  color: #fff;
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.exam-login-badge {
  display: inline-flex; height: 34px; align-items: center; gap: 8px; padding: 0 12px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-size: 12px; margin-bottom: 22px;
}
.exam-login-logo,
.exam-login-logo-lg {
  filter: brightness(0) invert(1);
}
.exam-login-logo { height: 22px; width: auto; display: block; background: transparent; padding: 0; border: 0; }
.exam-login-brand h1 {
  margin: 0 0 16px; font-size: 30px; line-height: 1.4;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.exam-login-logo-lg {
  height: 58px; width: auto; max-width: 260px; object-fit: contain; display: block;
  background: transparent; border-radius: 0; padding: 0; border: 0; box-shadow: none;
}
.exam-login-brand p { margin: 0; color: rgba(255,255,255,.78); line-height: 1.85; font-size: 15px; }
.exam-login-brand ul { margin: 28px 0 0; padding: 0; list-style: none; }
.exam-login-brand li { margin: 12px 0; font-size: 14px; color: rgba(255,255,255,.88); }
.exam-login-brand li::before { content: "•"; color: #7dccc7; margin-right: 8px; }
.exam-login-foot { font-size: 12px; color: rgba(255,255,255,.55); border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; margin-top: 28px; }
.exam-login-panel {
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.exam-login-panel h2 { margin: 0 0 10px; font-size: 26px; }
.exam-login-panel .sub { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.exam-login-alert {
  margin: -10px 0 18px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #f0c9c2;
  background: #fff5f3;
  color: #b42318;
  font-size: 13px;
  line-height: 1.45;
}
.exam-login-alert-ok {
  border-color: #b7dfc8;
  background: #eef8f1;
  color: #067647;
}
.exam-login-panel label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.exam-login-panel input {
  width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 14px; margin-bottom: 16px; background: #f8fbfb; font-size: 15px;
}
.captcha-row { display: grid; grid-template-columns: 1fr 118px; gap: 10px; margin-bottom: 14px; }
.captcha-row img { height: 48px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.btn-login, .btn-primary {
  width: 100%; height: 48px; border: 0; border-radius: 8px; background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 18px rgba(15,111,106,.22);
}
.exam-login-notice {
  margin-top: 22px; padding: 12px 14px; border-radius: 8px; background: #f3f8f8;
  border: 1px solid #d7e6e5; color: var(--muted); font-size: 12px; line-height: 1.7;
}

.exam-top {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: linear-gradient(90deg, #0f6f6a 0%, #145a66 42%, #16333f 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(22, 51, 63, .28);
  /* 顶栏不随滚动条变化改宽度 */
  box-sizing: border-box;
}
.exam-top-inner {
  max-width: 1100px; margin: 0 auto; padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  position: relative;
  z-index: 2;
}
.exam-top .brand {
  color: #fff; font-weight: 700; margin-left: 0;
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.exam-top .brand-logo {
  height: 34px; width: 34px; max-width: 34px; object-fit: contain;
  background: #fff; border-radius: 50%; padding: 2px; border: 0; box-shadow: none; display: block;
  filter: none; box-sizing: border-box;
}
.exam-top .brand span { white-space: nowrap; }
.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav-toggle-bar {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .2s ease, opacity .2s ease;
}
.exam-top.is-nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.exam-top.is-nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.exam-top.is-nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.exam-nav-panel {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.exam-nav { display: flex; flex-wrap: wrap; gap: 4px 2px; }
.exam-nav a {
  color: #9fd2ce; margin-left: 0; padding: 6px 10px; border-radius: 6px; font-size: 13px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.exam-nav a:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
}
.exam-nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.exam-nav a.on:hover { background: rgba(255,255,255,.18); color: #fff; }
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(10, 24, 30, .42);
  pointer-events: none;
}
.exam-top.is-nav-open .nav-backdrop {
  display: block;
  pointer-events: auto;
}
.exam-nav-lock { overflow: hidden; }
.exam-top .user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,.85);
  position: relative;
  z-index: 40;
  flex-shrink: 0;
}
.nav-student-name {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255,255,255,.9);
  font-size: 13px;
}
.nav-logout {
  color: #fecaca !important;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none !important;
}
.nav-logout:hover {
  background: rgba(180, 35, 24, .22);
  color: #fff !important;
}
.nav-user-menu { position: relative; }
.nav-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
}
.nav-user-menu.is-active .nav-user-trigger,
.nav-user-menu.is-open .nav-user-trigger,
.nav-user-trigger:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.42);
}
.nav-user-caret {
  width: 12px;
  height: 12px;
  opacity: .9;
  transition: transform .18s ease;
}
.nav-user-menu.is-open .nav-user-caret { transform: rotate(180deg); }
.nav-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 188px;
  padding: 10px 8px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d7e4e7;
  box-shadow: 0 8px 20px rgba(22, 51, 63, .12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.nav-user-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 22px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid #d7e4e7;
  border-top: 1px solid #d7e4e7;
  transform: rotate(45deg);
}
.nav-user-menu.is-open .nav-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-user-drop-title {
  padding: 2px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #eef3f5;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .06em;
  color: #7a9099;
}
.nav-user-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  color: #243b46 !important;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none !important;
  transition: background .12s ease, color .12s ease;
}
.nav-user-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c5d5d8;
  flex-shrink: 0;
}
.nav-user-item:hover,
.nav-user-item.on {
  background: #f3faf9;
  color: #0b5753 !important;
}
.nav-user-item:hover .nav-user-item-dot,
.nav-user-item.on .nav-user-item-dot {
  background: #0f6f6a;
}
.exam-main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 40px; }
.exam-main.narrow { max-width: 640px; }
.exam-main h1 { margin: 0 0 8px; font-size: 24px; }
.page-sub { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.sec-title { margin: 28px 0 12px; font-size: 18px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.hero-panel {
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
  background: linear-gradient(135deg, #16333f, #0f6f6a); color: #fff;
  border-radius: 12px; padding: 22px 24px; margin-bottom: 18px;
}
.hero-panel h1 { margin: 0 0 8px; color: #fff; }
.hero-panel p { margin: 0; color: rgba(255,255,255,.82); font-size: 14px; line-height: 1.7; }
.hero-photo {
  width: 84px; height: 112px; object-fit: cover; border-radius: 8px;
  border: 2px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); flex-shrink: 0;
}

.hero-panel .page-sub { color: rgba(255,255,255,.72); margin: 6px 0 0; }
.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  margin-top: 14px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff !important;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none !important;
  box-shadow: none;
  backdrop-filter: blur(4px);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-hero:hover {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.75);
  color: #fff !important;
}
.stat-grid, .entry-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.stat-card, .entry-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; color: inherit;
}
.stat-card strong { display: block; font-size: 22px; margin-bottom: 4px; color: var(--accent-deep); }
.stat-card span, .entry-card p { color: var(--muted); font-size: 13px; }
.entry-card h3 { margin: 0 0 6px; font-size: 16px; }
.plan-list { display: grid; gap: 14px; }
.plan-card, .result-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px;
}

/* ===== 个人中心模块 ===== */
.center-module { margin: 26px 0 10px; }
.center-module-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.center-module-head .sec-title {
  margin: 0;
  font-size: 18px;
  color: #16333f;
}
.center-module-sub {
  color: #7a9099;
  font-size: 12px;
  white-space: nowrap;
}

.record-panel {
  background: #fff;
  border: 1px solid #d7e6e5;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(22, 51, 63, .05);
  overflow: hidden;
}
.record-table-wrap { overflow: auto; }
.record-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 13px;
  color: #16333f;
  border: 0;
}
.record-table th,
.record-table td {
  padding: 13px 16px;
  border: 1px solid #e2eceb;
  text-align: left;
  vertical-align: middle;
  color: #16333f;
}
.record-table th {
  background: linear-gradient(180deg, #f4faf9 0%, #eaf5f4 100%);
  color: #16333f;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .02em;
  border-top: 0;
}
.record-table th:first-child,
.record-table td:first-child { border-left: 0; }
.record-table th:last-child,
.record-table td:last-child { border-right: 0; }
.record-table tbody tr {
  transition: background .12s ease;
}
.record-table tbody tr:nth-child(even) { background: #fbfdfe; }
.record-table tbody tr:hover { background: #f3faf9; }
.record-name {
  color: #16333f;
  font-weight: 600;
  line-height: 1.45;
}
.record-table .col-no,
.record-table .col-status,
.record-table .col-score,
.record-table .col-result,
.record-table .col-time,
.record-table .col-act {
  white-space: nowrap;
}
.record-table .col-score { text-align: center; }
.record-table .col-result,
.record-table .col-act { text-align: center; }
.record-table .col-score strong { color: #0f6f6a; font-size: 16px; font-weight: 700; }
.record-table .col-score strong.score-tone-pass { color: #0f6f6a; }
.record-table .col-score strong.score-tone-fail { color: #b42318; }
.record-table .col-score strong.score-tone-pending,
.record-table .col-score strong.score-tone-muted { color: #16333f; }
.result-score-item strong.score-tone-pass { color: #0f6f6a; }
.result-score-item strong.score-tone-fail { color: #b42318; }

.result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.result-pill.result-pass { border-color: #abefc6; }
.result-pill.result-fail { border-color: #fecdca; }
.result-pill.result-pending { border-color: #f9dbaf; }
.result-pill.result-muted { border-color: #e2e8f0; }
.result-pill.result-pass { background: #e6f6ec; color: #067647; }
.result-pill.result-fail { background: #fef3f2; color: #b42318; }
.result-pill.result-pending { background: #fff7ed; color: #c2410c; }
.result-pill.result-muted { background: #f1f5f9; color: #64748b; }
.btn-record {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #9fd2ce;
  border-radius: 6px;
  background: #f3faf9;
  color: #0b5753 !important;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none !important;
  box-shadow: none;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
  white-space: nowrap;
}
.btn-record:hover {
  background: #e7f5f3;
  border-color: #0f6f6a;
  color: #0b5753 !important;
  filter: none;
  transform: none;
  box-shadow: none;
}
.btn-record-cert {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c !important;
  box-shadow: none;
}
.btn-record-cert:hover {
  background: #ffedd5;
  border-color: #ea580c;
  color: #9a3412 !important;
  box-shadow: none;
}
.btn-record-dl {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8 !important;
  box-shadow: none;
}
.btn-record-dl:hover {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e40af !important;
  box-shadow: none;
}
.record-acts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.result-panel {
  background: #fff;
  border: 1px solid #d7e6e5;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(22, 51, 63, .08);
}
.result-hero {
  padding: 26px 24px 22px;
  color: #fff;
  background: linear-gradient(135deg, #0f6f6a 0%, #145a66 48%, #16333f 100%);
}
.result-tone-pass .result-hero {
  background: linear-gradient(135deg, #067647 0%, #0f6f6a 55%, #145a66 100%);
}
.result-tone-fail .result-hero {
  background: linear-gradient(135deg, #b42318 0%, #c2410c 55%, #9a3412 100%);
}
.result-tone-pending .result-hero {
  background: linear-gradient(135deg, #0f6f6a 0%, #145a66 48%, #16333f 100%);
}
.result-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 12px;
}
.result-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.35;
  color: #fff;
}
.result-no {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,.78);
}
.result-scores {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid #eef2f5;
}
.result-score-item {
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid #eef2f5;
}
.result-score-item:last-child { border-right: 0; }
.result-score-item span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.result-score-item strong {
  display: block;
  font-size: 20px;
  color: var(--ink);
  font-weight: 700;
}
.result-note {
  margin: 16px 18px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f3f8f8;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
}
.result-note.ok { background: #e6f6ec; color: #067647; }
.result-note.bad { background: #fef3f2; color: #b42318; }
.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px;
}
.result-actions .btn-ghost,
.result-actions .result-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
}
.result-actions .result-btn-primary {
  width: auto;
  box-shadow: 0 8px 18px rgba(15,111,106,.22);
}
@media (max-width: 640px) {
  .result-scores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-score-item:nth-child(2n) { border-right: 0; }
  .result-score-item:nth-child(-n+2) { border-bottom: 1px solid #eef2f5; }
  .result-actions { flex-direction: column; }
  .result-actions .btn-ghost,
  .result-actions .result-btn-primary { width: 100%; }
}
.plan-card h3 { margin: 0 0 8px; }
.plan-card p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.plan-card .btn-primary,
.plan-card a.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 108px;
  height: 38px;
  padding: 0 22px;
  box-sizing: border-box;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.practice-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.practice-version {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 13px;
}
.practice-version label { color: var(--muted); font-weight: 600; }
.practice-version select, .inline-form select {
  height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff;
}
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.type-btn-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
}
.type-form { margin: 0; }
.type-btn {
  width: 100%; min-height: 64px; border: 1px solid var(--line); border-radius: 10px;
  background: #f8fbfb; cursor: pointer; padding: 10px 8px; text-align: left;
  display: flex; flex-direction: column; gap: 6px;
}
.type-btn strong { font-size: 13px; color: var(--ink); }
.type-btn .cnt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: #eaf6f5; color: var(--accent-deep); font-size: 12px; font-weight: 600;
}
.type-btn:hover:not(:disabled) { border-color: #7dccc7; background: #eaf6f5; }
.type-btn:disabled { opacity: .45; cursor: not-allowed; }
.empty { background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 28px; color: var(--muted); }

/* ===== 个人资料页 ===== */
.profile-page {
  background:
    radial-gradient(780px 320px at 8% 0%, rgba(15,111,106,.08), transparent 58%),
    radial-gradient(640px 280px at 100% 12%, rgba(20,90,102,.07), transparent 55%),
    var(--bg);
}
.profile-main {
  max-width: 860px;
}
.profile-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 22px;
  margin-bottom: 18px;
  padding: 26px 28px;
  border-radius: 16px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 42%),
    linear-gradient(125deg, #16333f 0%, #145a66 48%, #0f6f6a 100%);
  box-shadow: 0 14px 36px rgba(22, 51, 63, .18);
  overflow: hidden;
  position: relative;
}
.profile-hero::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.profile-hero-text { position: relative; z-index: 1; flex: 1; min-width: 0; }
.profile-kicker {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(255,255,255,.88);
}
.profile-hero h1 {
  margin: 0 0 10px;
  font-size: 28px;
  color: #fff;
  letter-spacing: .02em;
}
.profile-lead {
  margin: 0;
  max-width: 34em;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  line-height: 1.75;
}
.profile-alert {
  display: block;
  margin-top: 14px;
  width: auto;
  max-width: 36em;
  background: transparent;
}
.profile-alert-tip {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .94);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: .02em;
}
.profile-alert-tip::before {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(125, 204, 199, .28);
  border: 1px solid rgba(125, 204, 199, .55);
  color: #dff7f4;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  flex-shrink: 0;
}
.profile-hero-photo {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 148px;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,.38);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  background: rgba(255,255,255,.1);
}
.profile-hero-photo img,
.profile-hero-empty {
  width: 100%;
  height: 100%;
  max-width: 100%;
  border-radius: 0;
  object-fit: cover;
  border: 0;
  box-shadow: none;
  background: transparent;
  display: block;
}
.profile-hero-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff4d6;
  text-align: center;
  padding: 10px;
  background:
    linear-gradient(160deg, rgba(255, 196, 64, .28), rgba(255, 160, 40, .18));
  border: 1px dashed rgba(255, 220, 140, .65);
  box-sizing: border-box;
}
.profile-hero-empty strong { font-size: 14px; color: #fff8e1; }
.profile-hero-empty span { font-size: 12px; opacity: .92; color: #ffe9b8; }

.profile-form {
  display: grid;
  gap: 14px;
  background: transparent;
  border: 0;
  padding: 0;
}
.profile-card {
  background: #fff;
  border: 1px solid #dce7ea;
  border-radius: 14px;
  padding: 20px 22px 22px;
  box-shadow: 0 8px 22px rgba(22, 51, 63, .05);
}
.profile-card-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef3f5;
}
.profile-card-head h2 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--ink);
}
.profile-card-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.profile-grid-1 { grid-template-columns: 1fr; max-width: 420px; }
.profile-field label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 600;
  color: #243b46;
}
.profile-field label em {
  font-style: normal;
  font-weight: 500;
  font-size: 12px;
  color: #64748b;
}
.profile-field input[type=text],
.profile-field input[type=password] {
  width: 100%;
  height: 44px;
  border: 1px solid #d5e0e4;
  border-radius: 10px;
  padding: 0 14px;
  margin: 0;
  background: #f8fbfb;
  font-size: 14px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.profile-field input:focus {
  outline: 0;
  border-color: #7dccc7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 111, 106, .12);
}
.photo-upload {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.photo-preview {
  width: 120px;
  height: 160px;
  border: 1px dashed #b7cdc9;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f8fbfb, #eef6f5);
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
.photo-preview.is-empty {
  border: 1.5px dashed #d4a017;
  background:
    linear-gradient(165deg, #fff8e8 0%, #ffefd0 55%, #ffe6b8 100%);
  color: #9a6700;
  box-shadow: inset 0 0 0 1px rgba(212, 160, 23, .12);
}
.photo-preview.is-empty span {
  display: block;
  padding: 0 10px;
  text-align: center;
  font-weight: 600;
  line-height: 1.45;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { flex: 1; min-width: 0; padding-top: 4px; }
.photo-actions .btn-ghost {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border-color: #9fc8c4;
  color: var(--accent-deep);
  background: #f3faf9;
}
.photo-actions .btn-ghost:hover {
  background: #e7f5f3;
  border-color: var(--accent);
}
.photo-tip {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.photo-tip.is-ok { color: #067647; }
.photo-tip.is-err { color: #b42318; }
.photo-tip.is-busy { color: #c2410c; }
.photo-hints {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.photo-hints li {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}
.photo-hints li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7dccc7;
}
.profile-privacy {
  margin: 0 0 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dce7ea;
  box-shadow: 0 8px 22px rgba(22, 51, 63, .04);
}
.profile-privacy-head {
  margin: 0 0 10px;
}
.profile-privacy-head h2 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--ink);
}
.profile-privacy-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.profile-privacy-body {
  max-height: 180px;
  overflow: auto;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #f5f9f9;
  border: 1px solid #e2ecec;
  color: #3d5560;
  font-size: 13px;
  line-height: 1.75;
}
.profile-privacy-body p {
  margin: 0 0 8px;
}
.profile-privacy-body p:last-child {
  margin-bottom: 0;
}
.profile-privacy-body strong {
  color: var(--accent-deep);
  font-weight: 600;
}
.profile-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7fbfb;
  border: 1px solid #d7e6e5;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  line-height: 1.6;
}
.profile-check input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.profile-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dce7ea;
  box-shadow: 0 8px 22px rgba(22, 51, 63, .05);
}
.btn-profile-back,
.btn-profile-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background .15s ease;
}
.btn-profile-back {
  border: 1px solid #b7cdc9;
  background: #f3faf9;
  color: #0b5753 !important;
  box-shadow: none;
}
.btn-profile-back:hover {
  background: #e7f5f3;
  border-color: #0f6f6a;
  box-shadow: none;
}
.btn-profile-save {
  border: 0;
  background: linear-gradient(135deg, #0f6f6a 0%, #145a66 100%);
  color: #fff !important;
  box-shadow: none;
}
.btn-profile-save:hover {
  filter: brightness(1.05);
  box-shadow: none;
}
.profile-submit {
  width: auto;
  min-width: 148px;
  height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f6f6a 0%, #145a66 100%);
}
.wrong-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 8px; }

.wrong-panel {
  background: #fff;
  border: 1px solid #e5ebef;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(22, 51, 63, .04);
  overflow: hidden;
}
.wrong-panel-head,
.wrong-panel-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; background: #fff;
}
.wrong-panel-head {
  border-bottom: 1px solid #eef2f5;
}
.wrong-panel-foot {
  border-top: 1px solid #eef2f5; background: #fbfcfd;
}
.wrong-panel-title {
  font-size: 14px; font-weight: 600; color: #1f2d3d;
}
.wrong-panel-title em {
  font-style: normal; margin-left: 8px; color: #0f6f6a; font-weight: 700;
}
.wrong-pagesize {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-size: 12px; color: #64748b;
}
.wrong-pagesize select {
  height: 30px; min-width: 64px; border: 1px solid #d7e0e5; border-radius: 4px;
  padding: 0 8px; background: #fff; color: #334155;
}

.wrong-table-wrap { overflow: auto; }
.wrong-table {
  width: 100%; border-collapse: collapse; min-width: 720px; font-size: 13px;
}
.wrong-table th,
.wrong-table td {
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid #eef2f5;
  text-align: left;
  vertical-align: middle;
}
.wrong-table th {
  background: #f6f8fa;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.wrong-table tbody tr:last-child td { border-bottom: 0; }
.wrong-table tbody tr:hover { background: #f8fbfb; }
.wrong-table td { color: #5b6b78; }

.wrong-table .col-no { width: 64px; text-align: center; color: #94a3b8; }
.wrong-table .col-type { width: 84px; text-align: center; }
.wrong-table .col-count { width: 72px; text-align: center; }
.wrong-table .col-time { width: 120px; text-align: center; white-space: nowrap; }
.wrong-table .col-act { width: 100px; text-align: center; }
.wrong-table th.col-no,
.wrong-table th.col-type,
.wrong-table th.col-count,
.wrong-table th.col-time,
.wrong-table th.col-act { text-align: center; }

.wrong-summary {
  display: inline-block; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #1f2d3d; font-weight: 500;
}
.type-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 22px; padding: 0 8px;
  border-radius: 4px; font-size: 12px; font-weight: 600;
  background: #eef4f4; color: #0b5753;
}
.type-tag.type-multiple { background: #eef2ff; color: #3730a3; }
.type-tag.type-judge { background: #fff7ed; color: #9a3412; }
.type-tag.type-fill { background: #f0fdf4; color: #166534; }
.type-tag.type-essay { background: #f8fafc; color: #475569; }
.wrong-table td strong { color: #b42318; font-weight: 700; }

.btn-sm {
  height: 30px; padding: 0 12px; font-size: 12px;
  border: 1px solid #d7e0e5; border-radius: 4px;
  background: #fff; color: #334155; box-shadow: none; cursor: pointer;
}
.btn-sm:hover { border-color: #0f6f6a; color: #0f6f6a; background: #f3faf9; }

.pager-info { font-size: 12px; color: #64748b; }
.pager-links { display: inline-flex; gap: 8px; }
.pager-links a,
.pager-links .disabled {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border: 1px solid #d7e0e5; border-radius: 4px; background: #fff; color: #334155; font-size: 12px;
}
.pager-links a:hover { border-color: #0f6f6a; color: #0f6f6a; }
.pager-links .disabled { color: #94a3b8; background: #f8fafc; border-color: #e8eef0; }
.tip { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #f3f8f8; }
.tip.ok { background: #e6f6ec; color: #067647; }
.tip.bad { background: #fef3f2; color: #b42318; }
.q-feedback { margin-top: 12px; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.7; }
.q-feedback.ok { background: #e6f6ec; color: #067647; }
.q-feedback.bad { background: #fef3f2; color: #b42318; }
.sheet-grid span.bad {
  background: linear-gradient(145deg, #fff1f0, #fde8e6);
  color: #b42318; border-color: #fecdca;
}

.exam-live {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 28px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
}
.q-area, .sheet { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.q-area {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.q-main { flex: 0 0 auto; }
.q-submit-zone {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #d7e6e5;
}
.btn-submit-exam {
  min-width: 120px;
  height: 38px;
  padding: 0 22px;
  border: 1px solid #c2410c;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #fff;
  background: #c2410c;
  box-shadow: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.btn-submit-exam:hover {
  background: #9a3412;
  border-color: #9a3412;
  filter: none;
  transform: none;
  box-shadow: none;
}
.btn-submit-exam:active {
  background: #7c2d12;
  border-color: #7c2d12;
  transform: none;
  box-shadow: none;
}
.btn-submit-exam:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, .2);
}
.sheet {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
}
.sheet h3 { margin: 0 0 12px; font-size: 15px; }
.exam-candidate {
  display: flex; gap: 12px; align-items: center;
  margin: 0 0 14px; padding: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f3faf9 0%, #eef5f7 100%);
  border: 1px solid #d7e6e5;
}
.exam-candidate-mobile { display: none; }
.exam-candidate-desk { display: flex; }
.exam-candidate-photo {
  width: 64px; height: 80px; flex: 0 0 64px;
  border-radius: 6px; overflow: hidden;
  background: #e8eef0; border: 1px solid #cfe0de;
  display: grid; place-items: center;
  color: var(--muted); font-size: 11px;
}
.exam-candidate-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.exam-candidate-meta { min-width: 0; flex: 1; }
.exam-candidate-name {
  font-size: 15px; font-weight: 700; color: var(--ink);
  line-height: 1.3; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.exam-candidate-id {
  font-size: 11px; color: var(--muted); margin-bottom: 2px;
}
.exam-candidate-idno {
  font-size: 12px; color: #334155; letter-spacing: .02em;
  word-break: break-all; line-height: 1.4;
}
.q-meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.q-meta .q-type-name {
  color: var(--ink); font-weight: 700; font-size: 14px;
}
.q-meta .q-score {
  color: var(--accent-deep); font-weight: 700;
}
.q-type-tip { font-size: 12px; color: var(--accent-deep); margin-bottom: 8px; }
.q-type-tip strong { font-weight: 700; color: var(--ink); }
.q-content { font-size: 16px; line-height: 1.7; margin-bottom: 14px; font-weight: 500; }
.q-options { display: grid; gap: 8px; }
.opt {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; background: #fff;
}
.opt.on { border-color: #7dccc7; background: #eaf6f5; }
.q-actions { margin-top: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-ghost, .btn-danger {
  height: 38px; border-radius: 8px; padding: 0 14px; cursor: pointer; border: 1px solid var(--line); background: #fff;
}
.btn-danger { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.btn-primary,
a.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 96px;
  height: 38px;
  padding: 0 20px;
  box-sizing: border-box;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.save-tip { font-size: 12px; color: var(--muted); }
.sheet-body { display: flex; flex-direction: column; gap: 14px; }
.sheet-group + .sheet-group {
  padding-top: 12px;
  border-top: 1px dashed #d7e6e5;
}
.sheet-group-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px; font-size: 12px; color: #334155; font-weight: 600;
}
.sheet-group-title em {
  font-style: normal; font-weight: 500; color: var(--muted); font-size: 11px;
  padding: 2px 7px; border-radius: 999px; background: #f3f8f8;
}
.sheet-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sheet-grid span {
  height: 30px; border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center;
  font-size: 12px; cursor: pointer; background: #f3f8f8; color: var(--muted);
  transition: transform .12s ease, box-shadow .12s ease;
}
.sheet-grid span:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(15, 111, 106, .12); }
.sheet-grid span.done {
  background: linear-gradient(145deg, #e8f8f6, #d4efec);
  color: #0f6f6a; border-color: #9fd2ce;
}
.sheet-grid span.cur {
  background: linear-gradient(135deg, #0f6f6a 0%, #145a66 55%, #16333f 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 2px 8px rgba(15, 111, 106, .35);
}
.exam-top-inner-live {
  max-width: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.exam-top-inner-live > .brand,
.exam-top-inner-live > .exam-top-title,
.exam-top-inner-live > .exam-top-tools {
  flex: 1 1 0;
  min-width: 0;
}
.exam-top-title {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}
.exam-top-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.btn-fullscreen {
  height: 32px; padding: 0 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12);
  color: #fff; font-size: 13px; line-height: 30px; white-space: nowrap;
}
.btn-fullscreen:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); }
.timer { font-size: 20px; font-weight: 700; letter-spacing: .06em; }
@media (min-width: 1400px) {
  .exam-live {
    padding: 22px 28px 32px;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
  }
  .sheet-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1800px) {
  .exam-live {
    padding: 24px 36px 36px;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
  }
  .q-area, .sheet { padding: 22px; }
  .sheet-grid { grid-template-columns: repeat(7, 1fr); }
}

/* —— 平板 —— */
@media (max-width: 980px) {
  .exam-top-inner {
    max-width: none;
    padding: 10px 14px;
    gap: 10px 12px;
  }
  .exam-main {
    max-width: none;
    padding: 18px 14px 32px;
  }
  .exam-main.narrow { max-width: none; }
  .stat-grid, .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-btn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exam-live {
    padding: 16px;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 14px;
  }
}

/* —— 手机 / 窄屏 —— */
@media (max-width: 860px) {
  .exam-login-screen { padding: 12px; align-items: stretch; }
  .exam-login-shell { grid-template-columns: 1fr; width: 100%; }
  .exam-login-brand {
    min-height: auto;
    padding: 22px 20px;
  }
  .exam-login-brand h1 { font-size: 20px; }
  .exam-login-logo-lg { height: 40px; max-width: 180px; }
  .exam-login-brand ul { display: none; }
  .exam-login-foot { margin-top: 16px; padding-top: 12px; }
  .exam-login-panel { padding: 24px 18px 28px; }
  .exam-login-panel h2 { font-size: 20px; }
  .captcha-row { grid-template-columns: 1fr 100px; }

  .exam-top-inner {
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 12px;
    gap: 0;
  }
  .exam-top .brand {
    justify-content: flex-start;
    max-width: calc(100% - 48px);
  }
  .exam-top .brand-logo { width: 28px !important; height: 28px !important; max-width: 28px !important; }
  .exam-top .brand span { font-size: 15px; }
  .nav-toggle { display: inline-flex; }
  .exam-nav-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 12px;
    left: auto;
    flex: none;
    flex-direction: column;
    width: 168px;
    max-width: calc(100vw - 24px);
    margin-top: 0;
    padding: 6px;
    border-radius: 10px;
    background: #16333f;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 10px 24px rgba(0,0,0,.22);
    gap: 2px;
    z-index: 5;
  }
  .exam-top.is-nav-open .exam-nav-panel { display: flex; }
  .exam-nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .exam-nav a {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    color: #d7ecea;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, transform .12s ease;
  }
  .exam-nav a:hover,
  .exam-nav a:active {
    background: rgba(255,255,255,.16);
    color: #fff;
  }
  .exam-nav a.on { background: rgba(255,255,255,.14); color: #fff; }
  .exam-nav a.on:hover,
  .exam-nav a.on:active {
    background: rgba(255,255,255,.22);
    color: #fff;
  }
  .nav-user-trigger {
    transition: background .15s ease, border-color .15s ease;
  }
  .nav-user-trigger:hover {
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.42);
  }
  .nav-logout {
    transition: background .15s ease, color .15s ease;
  }
  .nav-logout:hover {
    background: rgba(180, 35, 24, .28);
    color: #fff !important;
  }
  .nav-toggle:hover {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.4);
  }
  .exam-top .user {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 4px;
    padding: 6px 2px 2px;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .nav-student-name {
    max-width: none;
    width: 100%;
    font-size: 11px;
    padding: 0 8px 2px;
    opacity: .8;
  }
  .nav-user-menu { width: 100%; }
  .nav-user-trigger {
    width: 100%;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    justify-content: space-between;
  }
  .nav-user-dropdown {
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 4px);
    width: 148px;
  }
  .nav-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
    background: rgba(180, 35, 24, .16);
  }

  .exam-top-inner-live {
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .exam-top-inner-live > .brand,
  .exam-top-inner-live > .exam-top-title,
  .exam-top-inner-live > .exam-top-tools {
    flex: 1 1 100%;
  }
  .exam-top-title {
    text-align: left;
    padding: 0;
    font-size: 14px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .exam-top-tools {
    justify-content: space-between;
    width: 100%;
  }
  .timer { font-size: 18px; }

  .exam-main h1 { font-size: 20px; }
  .sec-title { font-size: 16px; margin: 22px 0 10px; }
  .sec-head {
    flex-direction: column;
    align-items: stretch;
  }
  .sec-head form {
    align-self: flex-end;
  }
  /* 移动端页头主按钮：自适应宽度、更扁，避免通栏大块 */
  .sec-head .btn-primary,
  .sec-head form .btn-primary,
  .practice-actions .btn-primary,
  .plan-card .btn-primary,
  .plan-card a.btn-primary,
  .inline-form .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 96px;
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15, 111, 106, .16);
    box-sizing: border-box;
    line-height: 1;
    white-space: nowrap;
  }
  .btn-profile-save,
  .profile-submit,
  .result-actions .result-btn-primary {
    height: 40px;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(15, 111, 106, .16);
  }
  .result-actions .btn-ghost,
  .result-actions .result-btn-primary {
    width: auto;
    min-width: 140px;
    align-self: center;
  }

  .hero-panel {
    flex-direction: column-reverse;
    align-items: flex-start;
    padding: 16px;
    gap: 14px;
  }
  .hero-panel h1 { font-size: 20px; }
  .hero-photo { width: 72px; height: 96px; }

  .stat-grid, .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stat-card, .entry-card, .plan-card, .result-card {
    padding: 14px;
  }
  .stat-card strong { font-size: 20px; }

  .practice-version {
    flex-direction: column;
    align-items: stretch;
  }
  .practice-version select { width: 100%; }
  .type-btn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-btn { min-height: 58px; }

  .profile-hero {
    flex-direction: column-reverse;
    align-items: flex-start;
    padding: 18px 16px;
    gap: 20px;
  }
  .profile-hero h1 { font-size: 22px; }
  .profile-hero-photo {
    width: 84px;
    height: 112px;
  }
  .profile-card { padding: 16px; border-radius: 12px; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-grid-1 { max-width: none; }
  .photo-upload {
    flex-direction: column;
    align-items: flex-start;
  }
  .photo-preview { width: 108px; height: 144px; }
  .profile-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 14px;
  }
  .btn-profile-back,
  .btn-profile-save,
  .profile-footer .btn-ghost,
  .profile-submit { width: 100%; }

  .wrong-panel-head,
  .wrong-panel-foot {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 10px;
  }
  .wrong-pagesize { justify-content: space-between; width: 100%; }
  .pager-links { width: 100%; }
  .pager-links a,
  .pager-links .disabled { flex: 1; justify-content: center; }

  .wrong-table { min-width: 0; }
  .wrong-table thead { display: none; }
  .wrong-table,
  .wrong-table tbody,
  .wrong-table tr,
  .wrong-table td {
    display: block;
    width: 100%;
  }
  .wrong-table tr.wrong-card {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f5;
  }
  .wrong-table tr.wrong-card:last-child { border-bottom: 0; }
  .wrong-table td {
    padding: 4px 0;
    border: 0;
    text-align: left !important;
  }
  .wrong-table .col-no {
    display: inline-block;
    width: auto;
    margin-right: 8px;
    color: #94a3b8;
    font-size: 12px;
  }
  .wrong-table .col-type {
    display: inline-block;
    width: auto;
    vertical-align: middle;
  }
  .wrong-table .col-summary {
    margin: 6px 0 4px;
  }
  .wrong-summary {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .wrong-table .col-count,
  .wrong-table .col-time {
    display: inline-block;
    width: auto;
    margin-right: 12px;
    font-size: 12px;
  }
  .wrong-table .col-count::before { content: "错次 "; color: #94a3b8; font-weight: 400; }
  .wrong-table .col-time::before { content: "最近 "; color: #94a3b8; }
  .wrong-table .col-act { margin-top: 8px; }
  .wrong-table .col-act .btn-sm { width: 100%; height: 36px; }

  .exam-live {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
  }
  .exam-candidate-mobile {
    display: flex;
    order: 0;
    margin: 0;
    padding: 10px 12px;
  }
  .exam-candidate-desk { display: none; }
  .q-area {
    order: 1;
    padding: 14px;
  }
  .exam-live > .sheet { display: none; }
  .q-area { min-height: 0; }
  .q-submit-zone {
    min-height: 72px;
    margin-top: 12px;
    padding-top: 12px;
  }
  .btn-submit-exam { width: 100%; max-width: 280px; }
  .q-content { font-size: 15px; }
  .opt { padding: 12px 10px; font-size: 14px; }
  .q-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .q-actions .btn-ghost,
  .q-actions .btn-primary,
  .q-actions .btn-danger {
    width: 100%;
    height: 40px;
  }
  .q-actions .save-tip {
    grid-column: 1 / -1;
  }
  .sheet-grid { grid-template-columns: repeat(6, 1fr); }
  .exam-candidate-mobile .exam-candidate-photo {
    width: 48px; height: 64px; flex: 0 0 48px;
  }
}

@media (max-width: 480px) {
  .stat-grid, .entry-grid { grid-template-columns: 1fr; }
  .type-btn-grid { grid-template-columns: 1fr 1fr; }
  .sheet-grid { grid-template-columns: repeat(5, 1fr); }
  .exam-toast { top: 64px; }
  .exam-toast-panel { padding: 10px 14px; }
  .exam-toast-msg { font-size: 13px; }
  .q-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .record-table {
    min-width: 0;
    border: 0;
    color: #16333f;
  }
  .record-table thead { display: none; }
  .record-table,
  .record-table tbody,
  .record-table tr,
  .record-table td {
    display: block;
    width: 100%;
  }
  .record-table tr {
    margin: 0 0 10px;
    padding: 0;
    border: 1px solid #d7e2e8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }
  .record-table tr:last-child {
    margin-bottom: 0;
    border-bottom: 1px solid #d7e2e8;
  }
  .record-table td {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #e4ebef;
    text-align: left !important;
    white-space: normal;
    color: #16333f;
    font-size: 13px;
    box-sizing: border-box;
  }
  .record-table td:last-child { border-bottom: 0; }
  .record-table td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 56px;
    margin-right: 8px;
    color: #16333f;
    font-size: 12px;
    font-weight: 600;
    flex: 0 0 auto;
  }
  .record-table .col-name::before { display: none; }
  .record-table .col-name {
    display: block !important;
    padding: 10px;
    background: #f7fafb;
    border-bottom: 1px solid #d7e2e8;
    color: #16333f;
  }
  .record-table .col-act {
    margin-top: 0;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }
  .record-table .col-act::before {
    display: inline-block;
    flex: 0 0 auto;
    margin: 0;
  }
  .record-table .col-act .record-acts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
    gap: 6px;
  }
  .record-table .col-act .btn-sm,
  .record-table .col-act .btn-record {
    width: auto;
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
    box-shadow: none;
  }
}

/* ===== center module mobile ===== */
@media (max-width: 860px) {
  .center-module {
    margin: 16px 0 18px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e8eef1;
    border-radius: 12px;
  }
  .center-module-head {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef2f5;
  }
  .center-module-head .sec-title {
    font-size: 15px;
    font-weight: 700;
    color: #16333f;
  }
  .center-module .empty {
    margin: 0;
    padding: 18px 12px;
    border: 0;
    background: #f8fafb;
    border-radius: 8px;
    font-size: 13px;
    color: #16333f;
  }
  .center-module .record-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }
  .center-module .record-table-wrap { overflow: visible; }
  .center-module .record-name,
  .center-module .record-table td,
  .center-module .record-table td::before {
    color: #16333f;
  }
}

