/* ============================================================
   普通话水平测试系统 —— 全站样式（官方风格 + 手机/iPad/PC 自适应）
   ============================================================ */
:root {
  --blue-900: #14305e;
  --blue-800: #1d4482;
  --blue-700: #2a5ca8;
  --blue-600: #3d74c4;
  --blue-100: #e8f0fb;
  --paper: #ffffff;
  --bg: #eef3f9;
  --ink: #17253a;
  --muted: #5b6b82;
  --line: #d4e0ef;
  --red: #d93025;
  --green: #1e8e50;
  --amber: #b45309;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(20, 48, 94, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 50% -8%, #dce8f8 0%, rgba(220, 232, 248, 0) 62%),
    linear-gradient(180deg, var(--bg) 0%, #e7eef7 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-700); text-decoration: none; }
.hidden { display: none !important; }

/* ============ 通用：卡片 / 按钮 / 表单（首页、成绩单） ============ */
.wrap { max-width: 1000px; margin: 0 auto; padding: 1rem; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.page-title { font-size: 1.3rem; color: var(--blue-900); margin-bottom: 0.4rem; }
.page-title.center { text-align: center; }
.page-sub.center { text-align: center; }
.section-title { font-size: 1.05rem; color: var(--blue-800); margin-bottom: 0.7rem; border-left: 4px solid var(--blue-600); padding-left: 0.6rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.65rem 1.3rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background .18s, transform .1s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20,48,94,.15); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--blue-700); color: #fff; border-color: var(--blue-700); }
.btn-primary:hover { background: var(--blue-600); }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-big { font-size: 1.15rem; padding: 0.9rem 2.2rem; }
.btn-block { width: 100%; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.92rem; color: var(--muted); margin-bottom: 0.35rem; }
.field input {
  width: 100%; padding: 0.7rem 0.85rem;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 1rem; color: var(--ink); background: #fbfdff;
}
.field input:focus { outline: 2px solid var(--blue-600); border-color: transparent; }

.rules { list-style: none; font-size: 0.95rem; line-height: 1.9; }
.rules li { padding-left: 1.4rem; position: relative; }
.rules li::before { content: "◆"; position: absolute; left: 0; color: var(--blue-600); font-size: 0.7rem; top: 0.3rem; }
.rules li b { color: var(--blue-900); }

.notice { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 0.7rem 1rem; border-radius: 8px; font-size: 0.9rem; line-height: 1.6; margin: 0.9rem 0; }
.time-hint {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
  background: var(--blue-100); border: 1px solid #bcd6f5; color: var(--blue-800);
  padding: 0.65rem 1rem; border-radius: 8px; font-size: 0.88rem; line-height: 1.7; margin: 0.9rem 0 0;
}

.badge { display: inline-block; padding: 0.14rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.warn-badge { background: #fef3c7; color: #92400e; }

/* 首页顶部 */
.topbar {
  background: linear-gradient(90deg, var(--blue-900), var(--blue-700));
  color: #fff;
  padding: 0.7rem 1.1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem 1rem;
  box-shadow: 0 2px 10px rgba(20,48,94,.35);
  position: relative;
  z-index: 50;
}
.topbar-side {
  display: flex;
  align-items: center;
  min-width: 0;
}
.topbar-side--left { justify-content: flex-start; }
.topbar-side--right { justify-content: flex-end; gap: 0.5rem; }
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  grid-column: 2;
  min-width: 0;
  text-align: center;
}
.brand .exam-title { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.06em; }
.brand .exam-title small { display: block; font-size: 0.7rem; font-weight: 400; opacity: 0.85; letter-spacing: 0.18em; }
.idraky-topbar-nav {
  display: flex !important;
  flex-shrink: 0;
  align-items: center;
  gap: 0.4rem;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  bottom: auto !important;
  right: auto !important;
  z-index: 2 !important;
  padding: 0.2rem;
  margin: 0;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(147, 197, 253, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.idraky-topbar-nav a,
.idraky-topbar-nav button {
  appearance: none;
  margin: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(147, 197, 253, 0.45);
  background: rgba(59, 130, 246, 0.32);
  color: #f8fafc;
  text-decoration: none;
  display: inline-block;
}
.btn-topbar {
  appearance: none;
  margin: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: background .18s;
}
.btn-topbar:hover { background: rgba(255, 255, 255, 0.28); }
.topbar-user {
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.95;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 10rem;
}
.candidate { text-align: right; font-size: 0.85rem; line-height: 1.5; opacity: 0.95; }

/* 麦克风测试 */
.mic-test-box { margin-top: 0.9rem; background: #f8fafc; border: 1px dashed var(--line); border-radius: 8px; padding: 0.8rem 1rem; display: none; }
.mic-test-box.show { display: block; }
.mic-bar { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.mic-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-600), var(--blue-700)); }
.mic-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }

/* 历史成绩 / 我的考试报告 */
.history-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
  padding: 0.85rem 0.95rem; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 0.65rem; background: #fbfdff;
}
.history-item--report { cursor: default; }
.history-item:hover { border-color: var(--blue-600); }
.history-item .h-score { font-weight: 800; color: var(--blue-700); font-size: 1.15rem; }
.history-item .h-main { flex: 1; min-width: 0; }
.history-item .h-side { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.history-item .h-actions { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; margin-top: .15rem; }
.history-item .h-secs { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.history-item .h-sec {
  font-size: .78rem; color: var(--blue-800); background: #eef4ff; border: 1px solid #d6e4ff;
  border-radius: 999px; padding: .15rem .55rem; white-space: nowrap;
}
.history-item .h-sec small { color: var(--muted); font-weight: 500; }
.btn-sm {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  padding: .28rem .7rem; font-size: .8rem; font-weight: 700; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--blue-800); text-decoration: none; cursor: pointer;
}
.btn-sm.btn-primary { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.btn-sm:hover { opacity: .92; }
.empty { text-align: center; color: var(--muted); padding: 2rem 0; }
.loading { text-align: center; color: var(--muted); padding: 2.5rem 0; font-size: 1rem; }
.spin { display: inline-block; width: 1rem; height: 1rem; border: 3px solid var(--line); border-top-color: var(--blue-700); border-radius: 50%; animation: rot .8s linear infinite; vertical-align: -0.15em; margin-right: 0.4rem; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ============ 考试界面（与正式普通话测试系统一致） ============ */
.exam-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

/* 顶部信息栏：标题（居中）/ 考生信息 */
.pcs-topbar {
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--blue-900) 0%, var(--blue-800) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  gap: 0.8rem; padding: 0.55rem 1.1rem;
  box-shadow: 0 2px 8px rgba(20,48,94,.35);
  position: relative;
}
.pcs-title {
  font-size: 1.15rem; font-weight: 800; letter-spacing: 0.08em;
  text-align: center;
}
.pcs-cand {
  position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  font-size: 0.82rem; opacity: .95; line-height: 1.45;
  max-width: 40%; overflow: hidden;
}
.pcs-timer { display: flex; align-items: baseline; gap: 0.45rem; }
.pcs-timer-label { font-size: 0.75rem; opacity: .85; }
.pcs-timer-num {
  font-family: "Consolas", "Menlo", monospace;
  font-size: 1.55rem; font-weight: 800; letter-spacing: 0.05em;
  background: rgba(255,255,255,.14); padding: 0.15rem 0.7rem; border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.pcs-timer-num.warn { color: #ffe3a3; animation: pulse 1s infinite; }
.pcs-timer-num.critical { color: #ffc1b8; }
@keyframes pulse { 50% { opacity: .45; } }

/* 进度条（四道题） */
.pcs-steps {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: #f4f8fd; border-bottom: 1px solid var(--line);
}
.pcs-steps-inner { display: flex; gap: 0.4rem; flex: 1; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.py-toggle {
  flex-shrink: 0;
  border: 1px solid var(--line); background: #fff; color: var(--blue-800);
  border-radius: 8px; padding: 0.42rem 0.7rem;
  font-size: 0.8rem; font-weight: 700; cursor: pointer;
  transition: background .18s, border-color .18s;
}
.py-toggle:hover { border-color: var(--blue-600); }
.py-toggle.on { background: var(--blue-100); border-color: var(--blue-600); color: var(--blue-900); }
.pcs-step {
  flex: 1 1 0; min-width: 7.2rem;
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.42rem 0.6rem; border-radius: 8px;
  background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 0.82rem;
}
.pcs-step-no {
  flex-shrink: 0; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: #e2e8f0; color: var(--muted); font-weight: 700; font-size: 0.85rem;
}
.pcs-step.active { border-color: var(--blue-600); background: var(--blue-100); color: var(--blue-900); }
.pcs-step.active .pcs-step-no { background: var(--blue-700); color: #fff; }
.pcs-step.done { border-color: var(--green); background: #f0fdf4; color: #166534; }
.pcs-step.done .pcs-step-no { background: var(--green); color: #fff; }

/* 考试主体：题面 + 录音条，占满顶栏/步骤条以外的全部高度 */
.pcs-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.85rem;
  padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
}
.pcs-sheet {
  flex: 1; min-height: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-y: auto;
  padding: 1.1rem 1.3rem;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}
.pcs-sheet.hidden { display: none !important; }

/* 完成本题后：隐藏题面，页面中部「下一题」 */
.pcs-next-gate {
  flex: 1;
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.2rem;
  text-align: center;
}
.pcs-next-gate.hidden { display: none !important; }
.pcs-next-gate-msg {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text, #1e293b);
  line-height: 1.6;
  max-width: 28rem;
}
.pcs-next-gate-btn {
  min-width: 10rem;
  height: 3rem;
  font-size: 1.05rem;
  padding: 0 1.6rem;
}

/* 按题测试：题面铺满剩余视口，底部录音区留足空间 */
.practice-page {
  height: 100vh; height: 100dvh;
  overflow: hidden;
}
.practice-page .pcs-sheet {
  min-height: 0;
}
.practice-page .pcs-chars,
.practice-page .pcs-words {
  flex: 1;
  align-content: space-evenly;
  min-height: 12rem;
}
.practice-page .pcs-passage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}
.practice-page .pcs-recordbar {
  padding: 0.9rem 1.15rem;
  gap: 1rem;
  margin-top: 0.15rem;
}
.practice-page .pcs-rec-btns {
  gap: 0.7rem;
}

/* 题目标题 + 提示 */
.pcs-sec-head { text-align: center; padding-bottom: 0.7rem; border-bottom: 2px solid var(--blue-100); }
.pcs-sec-title { font-size: 1.5rem; font-weight: 800; color: var(--blue-900); letter-spacing: 0.04em; }
.pcs-sec-score { font-size: 0.85rem; color: var(--blue-600); font-weight: 600; margin-left: 0.5rem; }
.pcs-sec-desc { text-align: center; color: var(--muted); font-size: 0.88rem; margin-top: 0.45rem; line-height: 1.6; }

/* 第1题：单音节字 网格 */
.pcs-chars {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.35rem 0.5rem;
  padding-top: 0.9rem;
}
.pcs-cell {
  text-align: center; padding: 0.3rem 0 0.25rem;
  border-bottom: 1px solid #eef3f9;
  min-height: 0;
}
.pcs-char { font-size: 2.3rem; font-weight: 700; color: var(--blue-900); line-height: 1.3; font-family: "KaiTi", "STKaiti", "楷体", serif; }
.pcs-pinyin { font-size: 0.72rem; color: var(--blue-600); line-height: 1.15; min-height: 1.05em; font-family: "Microsoft YaHei", sans-serif; }

/* 第2题：多音节词语 网格 */
.pcs-words { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem 0.7rem; padding-top: 0.9rem; }
.pcs-word { font-size: 1.85rem; font-weight: 700; color: var(--blue-900); line-height: 1.4; font-family: "KaiTi", "STKaiti", "楷体", serif; }

/* 第3题：朗读短文 */
.pcs-passage h3 { font-size: 1.15rem; color: var(--blue-700); text-align: center; margin: 0.6rem 0 0.8rem; }
.pcs-passage p {
  font-size: 1.35rem; line-height: 2.1; letter-spacing: 0.05em;
  color: var(--ink); text-align: justify;
  font-family: "KaiTi", "STKaiti", "楷体", "Microsoft YaHei", serif;
}
/* 按题测试第3题：加大字号，让短文铺满屏幕 */
.practice-page .pcs-passage h3 {
  font-size: 1.45rem;
  margin: 0.4rem 0 1rem;
}
.practice-page .pcs-passage p {
  font-size: 1.65rem;
  line-height: 2.45;
  letter-spacing: 0.06em;
}

/* 第4题：命题说话 */
.pcs-topics { display: grid; gap: 0.8rem; padding-top: 0.9rem; }
.pcs-topic {
  display: flex; gap: 0.8rem; align-items: flex-start;
  border: 2px solid var(--line); border-radius: 10px;
  padding: 1rem 1.1rem; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.pcs-topic:hover { border-color: var(--blue-600); }
.pcs-topic.selected { border-color: var(--blue-700); background: var(--blue-100); }
.pcs-topic .t-num {
  flex-shrink: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue-700); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.pcs-topic .t-name { font-size: 1.25rem; font-weight: 700; color: var(--blue-900); }
.pcs-topic .t-hint { font-size: 0.88rem; color: var(--muted); margin-top: 0.35rem; line-height: 1.6; }
.pcs-topic-note { font-size: 0.9rem; color: var(--red); margin-top: 0.8rem; }

/* 录音控制区 */
.pcs-recordbar {
  flex-shrink: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 0.9rem;
}
/* 剩余时间（录音条左端，紧凑） */
.pcs-rec-time {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 0.35rem;
  background: var(--blue-900); color: #fff;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  white-space: nowrap;
}
.pcs-rec-time-label { font-size: 0.72rem; opacity: .85; }
.pcs-rec-time-num {
  font-family: "Consolas", "Menlo", monospace;
  font-size: 1.15rem; font-weight: 800; letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}
.pcs-rec-time-num.warn { color: #ffe3a3; animation: pulse 1s infinite; }
.pcs-rec-time-num.critical { color: #ffc1b8; }
.pcs-volwrap { flex: 1; min-width: 9rem; }
.pcs-volbar { height: 7px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.pcs-volbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-600), var(--blue-700)); }
.pcs-rec-status { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; line-height: 1.4; }
.pcs-rec-status .dot { display: inline-block; width: 0.62rem; height: 0.62rem; border-radius: 50%; background: #94a3b8; margin-right: 0.3rem; vertical-align: middle; }
.pcs-rec-status.recording { color: var(--red); }
.pcs-rec-status.recording .dot { background: var(--red); animation: blink 1s infinite; }
.pcs-rec-status.done { color: var(--green); }
.pcs-rec-status.done .dot { background: var(--green); }
@keyframes blink { 50% { opacity: .15; } }

.pcs-rec-btns { display: flex; align-items: center; gap: 0.55rem; flex-shrink: 0; }

/* 大圆麦克风按钮 */
.pcs-recb {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  height: 3.4rem; padding: 0 1.6rem;
  border-radius: 999px; border: 0; cursor: pointer;
  font-size: 1.05rem; font-weight: 800; color: #fff; letter-spacing: 0.04em;
  transition: transform .12s, box-shadow .2s;
}
/* 开始录音：蓝色 */
.pcs-recb-start {
  background: linear-gradient(180deg, var(--blue-600) 0%, var(--blue-800) 100%);
  box-shadow: 0 4px 14px rgba(42, 92, 168, 0.4);
}
.pcs-recb-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(42, 92, 168, 0.5);
}
/* 完成本题：红色（录音中） */
.pcs-recb-stop {
  background: linear-gradient(180deg, var(--red) 0%, #b3261e 100%);
  box-shadow: 0 4px 14px rgba(217, 48, 37, 0.4);
}
.pcs-recb-stop:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(217, 48, 37, 0.5);
}
.pcs-recb svg { width: 1.35rem; height: 1.35rem; }
.pcs-recb.recording { animation: recpulse 1.2s infinite; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 0.55rem rgba(217,48,37,.18); } }

/* 次级按钮：重录 / 下一题 / 交卷 */
.pcs-btn {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  height: 3rem; padding: 0 1.3rem;
  border-radius: 999px; cursor: pointer;
  font-size: 0.98rem; font-weight: 700; letter-spacing: 0.03em;
  border: 1.5px solid var(--line); background: #fff; color: var(--blue-800);
  transition: transform .12s, box-shadow .2s, border-color .18s, background .18s;
}
.pcs-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20,48,94,.14); border-color: var(--blue-600); }
.pcs-btn:active { transform: translateY(0); }
.pcs-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.pcs-btn-primary {
  border-color: var(--blue-700); background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  color: #fff;
}
.pcs-btn-primary:hover { border-color: var(--blue-600); background: linear-gradient(135deg, var(--blue-600), var(--blue-800)); box-shadow: 0 4px 14px rgba(42,92,168,.4); }

/* ============ 成绩单：分项 + 错误表 + 深度建议 ============ */
.result-head { text-align: center; padding: 1rem 0; }
.result-head .total { font-size: 3.4rem; font-weight: 800; color: var(--blue-900); line-height: 1.1; }
.result-head .total small { font-size: 1.1rem; color: var(--muted); font-weight: 400; }
.result-head .level {
  display: inline-block; margin-top: 0.6rem;
  background: linear-gradient(90deg, var(--blue-900), var(--blue-600));
  color: #fff; font-size: 1.3rem; font-weight: 700;
  padding: 0.5rem 2rem; border-radius: 999px; letter-spacing: 0.1em;
}

.sec-score {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 0.55rem; background: #fbfdff;
}
.sec-score .sec-name b { color: var(--blue-900); }
.sec-score .sec-meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.5; }
.sec-score .sec-num { font-size: 1.5rem; font-weight: 800; color: var(--blue-700); font-variant-numeric: tabular-nums; }
.sec-score .sec-num small { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.bar { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin-bottom: 0.7rem; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-600), var(--blue-700)); border-radius: 999px; }

/* 错误分析表格 */
.err-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 0.4rem; }
.err-table th, .err-table td { border: 1px solid var(--line); padding: 0.45rem 0.6rem; text-align: left; }
.err-table th { background: var(--blue-100); color: var(--blue-900); font-weight: 600; }
.err-table td { vertical-align: top; }
.err-table .t-pos { color: var(--muted); }
.err-table .t-ref { font-weight: 700; color: var(--blue-900); }
.err-table .t-got { color: #b91c1c; }
.err-table .t-py { color: var(--muted); font-size: 0.8rem; }
.err-type { display: inline-block; padding: 0.08rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: #fee2e2; color: #b91c1c; white-space: nowrap; }
.err-type.ok { background: #dcfce7; color: #166534; }
.err-type.warn { background: #fef3c7; color: #92400e; }

/* 按题测试 · 第1题逐字拼音对照网格 */
.pr-char-legend {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.1rem;
  font-size: 0.82rem; color: var(--muted); margin: 0.2rem 0 0.75rem;
}
.pr-char-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.pr-char-legend .lg {
  display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px;
  border: 1px solid var(--line);
}
.pr-char-legend .lg.ok { background: #bbf7d0; border-color: #16a34a; }
.pr-char-legend .lg.defect { background: #fde68a; border-color: #d97706; }
.pr-char-legend .lg.error { background: #fecaca; border-color: #dc2626; }
.pr-char-legend .lg.miss { background: #e2e8f0; border-color: #64748b; }
.pr-char-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.45rem 0.35rem;
  padding: 0.35rem 0 0.2rem;
}
.pr-char-cell {
  text-align: center;
  padding: 0.35rem 0.1rem 0.4rem;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
  background: #fff;
  min-width: 0;
}
.pr-char-cell.is-ok { background: #dcfce7; border-color: #16a34a; }
.pr-char-cell.is-defect { background: #fef3c7; border-color: #d97706; }
.pr-char-cell.is-error { background: #fee2e2; border-color: #dc2626; }
.pr-char-cell.is-miss { background: #f1f5f9; border-color: #64748b; }
.pr-py-ref {
  font-size: 0.84rem; color: var(--blue-600); line-height: 1.2;
  min-height: 1.15em; font-family: "Microsoft YaHei", sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pr-char {
  font-size: 1.55rem; font-weight: 700; color: var(--blue-900); line-height: 1.35;
  font-family: "KaiTi", "STKaiti", "楷体", serif;
}
.pr-py-got {
  font-size: 0.84rem; line-height: 1.25; min-height: 1.15em; margin-top: 0.1rem;
  font-family: "Microsoft YaHei", sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pr-char-cell.is-ok .pr-py-got { color: #15803d; font-weight: 600; }
.pr-char-cell.is-defect .pr-py-got { color: #b45309; font-weight: 600; }
.pr-char-cell.is-error .pr-py-got { color: #b91c1c; font-weight: 600; }
.pr-char-cell.is-miss .pr-py-got { color: #475569; font-weight: 600; letter-spacing: 0.05em; }

/* 第2题：按词网格（5 列，样式与第1题 pr-char-cell 一致） */
.pr-word-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem 0.35rem;
  padding: 0.35rem 0 0.2rem;
}
.pr-word-grid .pr-char-cell {
  padding: 0.35rem 0.12rem 0.4rem;
  min-height: 4.6rem;
}
.pr-word {
  font-size: 1.25rem; font-weight: 700; color: var(--blue-900); line-height: 1.35;
  font-family: "KaiTi", "STKaiti", "楷体", serif;
  word-break: keep-all;
}
.pr-word-grid .pr-py-ref,
.pr-word-grid .pr-py-got {
  font-size: 0.78rem;
}

/* 第3/4题：逐句两列表 —— 左：原句/标准拼音/实际读音；右：判定 */
.pr-sent-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.pr-sent-head,
.pr-sent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.2rem;
  align-items: stretch;
}
.pr-sent-head {
  background: #eef4ff;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-800);
}
.pr-sent-head .pr-sent-main,
.pr-sent-head .pr-sent-judge {
  padding: 0.55rem 0.75rem;
}
.pr-sent-head .pr-sent-judge {
  text-align: center;
  border-left: 1px solid var(--line);
}
.pr-sent-row {
  border-bottom: 1px solid #e2e8f0;
}
.pr-sent-row:last-child { border-bottom: 0; }
/* 判定色与第1~2题 pr-char-cell 一致 */
.pr-sent-row.is-ok { background: #dcfce7; }
.pr-sent-row.is-defect { background: #fef3c7; }
.pr-sent-row.is-error { background: #fee2e2; }
.pr-sent-row.is-miss { background: #f1f5f9; }
.pr-sent-main {
  padding: 0.55rem 0.75rem;
  min-width: 0;
}
.pr-sent-text {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--blue-900);
  line-height: 1.65;
  font-family: "KaiTi", "STKaiti", "楷体", serif;
  word-break: break-all;
  margin: 0 0 0.28rem;
}
.pr-sent-py {
  white-space: normal;
  line-height: 1.45;
  font-size: 0.84rem;
  overflow: visible;
}
.pr-sent-py.pr-py-ref {
  color: var(--blue-600);
  margin-bottom: 0.12rem;
}
.pr-sent-py.pr-py-got {
  font-weight: 600;
}
.pr-sent-row.is-ok .pr-sent-py.pr-py-got { color: #15803d; }
.pr-sent-row.is-defect .pr-sent-py.pr-py-got { color: #b45309; }
.pr-sent-row.is-error .pr-sent-py.pr-py-got { color: #b91c1c; }
.pr-sent-row.is-miss .pr-sent-py.pr-py-got { color: #475569; letter-spacing: 0.05em; }
.pr-sent-judge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.45rem 0.4rem;
  border-left: 2px solid #cbd5e1;
  text-align: center;
}
.pr-sent-row.is-ok .pr-sent-judge { border-left-color: #16a34a; background: #bbf7d0; }
.pr-sent-row.is-defect .pr-sent-judge { border-left-color: #d97706; background: #fde68a; }
.pr-sent-row.is-error .pr-sent-judge { border-left-color: #dc2626; background: #fecaca; }
.pr-sent-row.is-miss .pr-sent-judge { border-left-color: #64748b; background: #e2e8f0; }
.pr-sent-judge-label {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}
.pr-sent-judge-score {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.pr-sent-judge.is-ok .pr-sent-judge-label { color: #15803d; }
.pr-sent-judge.is-defect .pr-sent-judge-label { color: #b45309; }
.pr-sent-judge.is-error .pr-sent-judge-label { color: #b91c1c; }
.pr-sent-judge.is-miss .pr-sent-judge-label { color: #475569; }

/* 兼容旧类名（若他处引用） */
.pr-sent-grid { display: flex; flex-direction: column; gap: 0.55rem; }
.pr-sent-cell {
  text-align: left;
  padding: 0.55rem 0.75rem 0.5rem;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
  background: #fff;
}
.pr-sent-cell.is-ok { background: #dcfce7; border-color: #16a34a; }
.pr-sent-cell.is-defect { background: #fef3c7; border-color: #d97706; }
.pr-sent-cell.is-error { background: #fee2e2; border-color: #dc2626; }
.pr-sent-cell.is-miss { background: #f1f5f9; border-color: #64748b; }
.pr-sent-cell.is-ok .pr-py-got { color: #15803d; font-weight: 600; }
.pr-sent-cell.is-defect .pr-py-got { color: #b45309; font-weight: 600; }
.pr-sent-cell.is-error .pr-py-got { color: #b91c1c; font-weight: 600; }
.pr-sent-cell.is-miss .pr-py-got { color: #475569; font-weight: 600; }

@media screen and (max-width: 720px) {
  .pr-char-grid { grid-template-columns: repeat(5, 1fr); gap: 0.35rem 0.25rem; }
  .pr-char { font-size: 1.35rem; }
  .pr-word-grid { grid-template-columns: repeat(3, 1fr); gap: 0.4rem 0.3rem; }
  .pr-word { font-size: 1rem; }
  .pr-py-ref, .pr-py-got { font-size: 0.78rem; }
  .pr-sent-head,
  .pr-sent-row { grid-template-columns: minmax(0, 1fr) 5.4rem; }
  .pr-sent-text { font-size: 0.95rem; }
  .pr-sent-judge-label { font-size: 0.82rem; }
}

/* 命题说话深度建议 */
.advice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-top: 0.6rem; }
.advice-card { border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem; background: #fbfdff; }
.advice-card h4 { font-size: 0.98rem; color: var(--blue-800); margin-bottom: 0.5rem; }
.advice-card ul { list-style: none; font-size: 0.9rem; line-height: 1.85; color: #33475b; }
.advice-card ul li { padding-left: 1.1rem; position: relative; }
.advice-card ul li::before { content: "▸"; position: absolute; left: 0; color: var(--blue-600); }
.advice-card p { font-size: 0.9rem; line-height: 1.85; color: #33475b; }
.err-pair .arrow { color: var(--muted); margin: 0 0.35rem; }
.structure-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.structure-table th, .structure-table td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
.structure-table th { background: var(--blue-100); color: var(--blue-900); width: 4.6rem; font-weight: 600; }
.structure-table td { line-height: 1.75; }

/* ============ 响应式 ============ */
@media (max-width: 1023px) {
  .pcs-chars { grid-template-columns: repeat(8, 1fr); }
  .pcs-words { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
  .wrap { padding: 0.75rem; }
  .card { padding: 1.1rem; }
  .btn-big { font-size: 1.05rem; padding: 0.8rem 1.6rem; }
  .btn-block, .field .btn { width: 100%; }

  .topbar { padding: 0.55rem 0.8rem; gap: 0.5rem 0.65rem; }
  .topbar-side--left,
  .topbar-side--right { min-width: 0; }
  .brand { grid-column: 2; }
  .brand .exam-title { font-size: 1rem; }
  .idraky-topbar-nav a,
  .idraky-topbar-nav button { font-size: 0.72rem; padding: 0.32rem 0.55rem; }
  .btn-topbar { font-size: 0.78rem; padding: 0.38rem 0.75rem; }
  .topbar-user { max-width: 6.5rem; font-size: 0.75rem; }
  .candidate { font-size: 0.75rem; }

  /* 考试页：仍占满视口，避免题面压扁底部按钮 */
  .exam-page { height: 100dvh; min-height: 100dvh; overflow: hidden; }
  .practice-page { height: 100dvh; }
  .pcs-topbar { padding: 0.5rem 0.7rem; }
  .pcs-title { font-size: 0.95rem; }
  .pcs-title small { display: none; }
  .pcs-cand { right: 0.7rem; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; }
  .pcs-timer-num { font-size: 1.2rem; padding: 0.1rem 0.55rem; }

  .pcs-steps { padding: 0.45rem 0.6rem; gap: 0.3rem; }
  .pcs-step { min-width: 4.6rem; padding: 0.35rem 0.4rem; font-size: 0.72rem; }
  .pcs-step-no { width: 1.3rem; height: 1.3rem; font-size: 0.75rem; }
  .pcs-step-name { display: none; }

  .pcs-main { padding: 0.55rem 0.6rem 0.75rem; gap: 0.7rem; padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
  .pcs-sheet { padding: 0.7rem 0.6rem; }
  .pcs-sec-title { font-size: 1.15rem; }
  .pcs-sec-desc { font-size: 0.78rem; }

  .pcs-chars { grid-template-columns: repeat(5, 1fr); gap: 0.25rem 0.2rem; }
  .pcs-char { font-size: 1.6rem; }
  .pcs-words { grid-template-columns: repeat(3, 1fr); gap: 0.3rem 0.3rem; }
  .pcs-word { font-size: 1.35rem; }
  .pcs-passage p { font-size: 1.05rem; line-height: 1.9; }
  .pcs-passage h3 { font-size: 0.95rem; }
  .practice-page .pcs-passage h3 { font-size: 1.2rem; }
  .practice-page .pcs-passage p { font-size: 1.28rem; line-height: 2.15; }

  .pcs-topic { padding: 0.8rem 0.85rem; }
  .pcs-topic .t-num { width: 1.8rem; height: 1.8rem; font-size: 0.95rem; }
  .pcs-topic .t-name { font-size: 1.05rem; }
  .pcs-topic .t-hint { font-size: 0.78rem; }

  .pcs-recordbar { padding: 0.75rem 0.7rem; gap: 0.65rem; flex-wrap: wrap; }
  .practice-page .pcs-recordbar { padding: 0.85rem 0.75rem; }
  .pcs-rec-time { padding: 0.25rem 0.6rem; order: 0; }
  .pcs-volwrap { flex: 1 1 100%; min-width: 0; order: 2; }
  .pcs-rec-btns { flex: 1 1 100%; justify-content: center; flex-wrap: wrap; order: 3; gap: 0.55rem; }
  .pcs-recb { height: 3.1rem; padding: 0 1.2rem; font-size: 1rem; flex: 1 1 auto; min-width: 7.5rem; }
  .pcs-rec-btns .pcs-btn { flex: 1 1 auto; height: 2.9rem; padding: 0 1.1rem; font-size: 0.92rem; min-width: 5.5rem; }

  .advice-grid { grid-template-columns: 1fr; }

/* 错误表格：窄屏卡片化 */
.err-table { font-size: 0.82rem; }
.err-table th, .err-table td { padding: 0.35rem 0.4rem; }
.err-table thead { display: none; }
.err-table, .err-table tbody, .err-table tr, .err-table td { display: block; width: 100%; }
.err-table tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 0.5rem; padding: 0.3rem 0.5rem; }
.err-table td { border: 0; padding: 0.15rem 0; }
.err-table td::before { content: attr(data-l); display: inline-block; width: 4.4rem; color: var(--muted); font-weight: 600; }
}

/* ============================================================
   成绩证书 —— 与正式《普通话水平测试等级证书》版式一致
   屏幕与打印均按 A4 竖版 210×297mm；屏幕端等比缩放适配宽度
   ============================================================ */
.cert-card { margin-bottom: 1.2rem; }
.cert-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.cert-actions .btn { display: inline-flex; align-items: center; gap: .45rem; }
.cert-scaler {
  width: 100%;
  max-width: 210mm;
  margin: 0 auto;
  overflow: hidden;
}
.certificate {
  width: 210mm;
  height: 297mm;
  box-sizing: border-box;
  transform-origin: top left;
  position: relative;
  background: #fffef9;
  box-shadow: var(--shadow);
  margin: 0 auto;
  font-family: "SimSun", "STSong", "宋体", "Noto Serif SC", serif;
  color: #1a1a1a;
}

/* 顶部红色带：徽标 + 标题 */
.cert-band {
  height: auto;
  min-height: 28mm;
  padding: 4mm 0 5mm;
  background: linear-gradient(180deg, #8f1616 0%, #b02323 100%);
  color: #fff; text-align: center;
  border-bottom: 1mm solid #ffd766;
}
.cert-emblem {
  width: 14mm; height: 14mm; margin: 0 auto 2mm;
  border-radius: 50%; border: 0.7mm solid #ffd766;
  display: grid; place-items: center;
  color: #ffd766; font-size: 7mm; line-height: 1;
  background: rgba(255, 255, 255, 0.08);
}
.cert-title {
  font-size: 9mm; font-weight: 700; letter-spacing: 3mm; text-indent: 3mm;
  font-family: "SimHei", "黑体", "STHeiti", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  margin: 0 0 2mm;
}
.cert-en { font-size: 3.2mm; letter-spacing: 0.5mm; opacity: 0.85; margin-top: 0; margin-bottom: 1mm; font-family: "Times New Roman", serif; }

/* 证书编号 */
.cert-num { text-align: right; font-size: 3.8mm; padding: 4mm 9mm 0; color: #262626; letter-spacing: 0.3mm; }

/* 信息表格 */
.cert-table {
  width: calc(100% - 34mm);
  margin: 5mm auto 0;
  border-collapse: collapse; font-size: 4.2mm;
}
.cert-table th, .cert-table td { border: 1px solid #b9b0a0; padding: 2.4mm 3.5mm; }
.cert-table th { background: #f7f2e9; color: #262626; font-weight: 600; width: 28mm; text-align: center; }
.cert-table td { color: #1a1a1a; font-weight: 600; }
.cert-row-score td { font-size: 4.8mm; }
#certScore, #certLevel { color: #8f1616; }

/* 正文：居中，略大 */
.cert-text {
  text-align: center;
  font-size: 5.2mm;
  line-height: 2.15;
  margin: 7mm 14mm 0;
  color: #1a1a1a;
  letter-spacing: 0.15mm;
}
.cert-text p {
  margin: 0;
  text-align: center;
  text-indent: 0;
}
.cert-text p + p {
  margin-top: 0.15em;
}

/* 页底：定制说明 + 网址 */
.cert-bottom {
  position: absolute;
  left: 9mm;
  right: 9mm;
  bottom: 10mm;
  text-align: center;
}
.cert-verify {
  text-align: center;
  font-size: 4.2mm;
  color: #333;
  margin: 0;
  letter-spacing: 0.4mm;
  line-height: 1.7;
}
.cert-site {
  text-align: center;
  font-size: 4mm;
  color: #8f1616;
  margin: 2mm 0 0;
  letter-spacing: 0.6mm;
  font-family: "Times New Roman", "Georgia", serif;
  font-weight: 600;
}

/* 中部：印章居中 + 发证机关 + 日期 */
.cert-foot {
  position: absolute; left: 9mm; right: 9mm; top: 56%; bottom: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 4mm;
}
.cert-issue { text-align: center; font-size: 3.8mm; line-height: 1.75; color: #262626; max-width: 92%; }
.cert-issuer { font-weight: 700; letter-spacing: 0.3mm; }
.cert-date { margin-top: 1mm; font-size: 3.8mm; letter-spacing: 0.3mm; }
.cert-seal {
  width: 36mm; height: 36mm; border-radius: 50%;
  border: 1.2mm solid #c41e1e;
  color: #c41e1e;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.2mm;
  text-align: center;
  transform: rotate(-8deg);
  opacity: 1;
  background: radial-gradient(circle, rgba(196,30,30,.06) 55%, rgba(196,30,30,0) 72%);
  flex-shrink: 0;
  margin: 0 auto;
  padding: 3mm 2.5mm;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cert-seal-line {
  display: block;
  font-size: 3mm;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0.2mm;
  color: #c41e1e;
  font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif;
}
.cert-seal-star {
  display: block;
  font-size: 26px;
  line-height: 1;
  color: #c41e1e;
  margin: 3px 0;
  font-weight: 900;
}

/* ============ 登录页（美观版） ============ */
.auth-page {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #081a3d 0%, #123a7d 36%, #1d5fa8 64%, #1b8aa5 100%);
}
.auth-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.auth-orb-1 { width: 430px; height: 430px; background: radial-gradient(circle, #3b82f6 0%, transparent 70%); top: -10%; left: -8%; animation: orbFloat 12s ease-in-out infinite; }
.auth-orb-2 { width: 390px; height: 390px; background: radial-gradient(circle, #22d3ee 0%, transparent 70%); bottom: -12%; right: -6%; animation: orbFloat 14s ease-in-out infinite reverse; }
.auth-orb-3 { width: 320px; height: 320px; background: radial-gradient(circle, #a78bfa 0%, transparent 70%); top: 52%; left: 48%; animation: orbFloat 16s ease-in-out infinite; }
@keyframes orbFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(26px, -26px) scale(1.08); } }

.auth-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 460px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(4, 18, 52, 0.45);
  padding: 2.2rem 2.2rem 1.5rem;
  animation: cardIn .5s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.auth-brand { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.5rem; }
.auth-logo {
  width: 3.3rem; height: 3.3rem; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  color: #fff; font-size: 1.5rem; font-weight: 800;
  box-shadow: 0 6px 16px rgba(42, 92, 168, 0.4);
}
.auth-brand-text h1 { font-size: 1.3rem; color: var(--blue-900); letter-spacing: 0.04em; }
.auth-brand-text p { font-size: 0.74rem; color: var(--muted); letter-spacing: 0.22em; margin-top: 0.15rem; }

.auth-step-title { font-size: 1.15rem; font-weight: 800; color: var(--blue-900); }
.auth-sub { font-size: 0.86rem; color: var(--muted); margin: 0.35rem 0 1.1rem; }

.auth-field label { display: block; font-size: 0.88rem; color: var(--muted); margin-bottom: 0.4rem; }
.auth-input { position: relative; }
.auth-input-icon { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); width: 1.15rem; height: 1.15rem; color: var(--blue-600); pointer-events: none; }
.auth-input input {
  width: 100%; padding: 0.85rem 1rem 0.85rem 2.6rem;
  border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 1.15rem; letter-spacing: 0.14em; color: var(--ink);
  background: #fff; transition: border-color .2s, box-shadow .2s;
  font-variant-numeric: tabular-nums;
}
.auth-input input::placeholder { letter-spacing: 0.02em; color: #a3b1c4; }
.auth-input input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(61, 116, 196, 0.16); }

.auth-tip { font-size: 0.78rem; color: var(--muted); margin-top: 0.55rem; }
.auth-err { color: #d93025; font-size: 0.85rem; min-height: 1.2rem; margin-top: 0.3rem; }

.auth-btn {
  width: 100%; margin-top: 0.4rem;
  padding: 0.85rem 1rem;
  border: 0; border-radius: 12px; cursor: pointer;
  font-size: 1.05rem; font-weight: 800; letter-spacing: 0.12em; color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  box-shadow: 0 8px 20px rgba(42, 92, 168, 0.35);
  transition: transform .12s, box-shadow .2s, filter .2s;
}
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(42, 92, 168, 0.45); filter: brightness(1.05); }
.auth-btn:active { transform: translateY(0); }
.auth-btn-ghost {
  background: #eef3fa; color: var(--blue-800); box-shadow: none; margin-top: 0.5rem;
}
.auth-btn-ghost:hover { background: #e2ecf8; box-shadow: none; }

.confirm-avatar {
  width: 4.6rem; height: 4.6rem; margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid; place-items: center; align-content: center;
  border: 2px dashed var(--blue-600); color: var(--muted);
  font-size: 0.85rem; line-height: 1.3;
  background: radial-gradient(circle at 35% 30%, rgba(61,116,196,.08), transparent 60%);
}
.confirm-avatar small { font-size: 0.7rem; }

.confirm-fields { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cf-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.cf-row:last-child { border-bottom: 0; }
.cf-row > span {
  width: 5.6rem; flex-shrink: 0; padding: 0.65rem 0.8rem;
  background: var(--blue-100); color: var(--blue-900); font-size: 0.86rem; font-weight: 600;
}
.cf-row > b, .cf-row input, .cf-row select {
  flex: 1; min-width: 0; border: 0; outline: none;
  padding: 0.65rem 0.8rem; font-size: 1rem; color: var(--ink); background: transparent;
  font-variant-numeric: tabular-nums;
}
.cf-row input:focus, .cf-row select:focus { background: #f0f7ff; }
.cf-row input::placeholder { color: #a3b1c4; }

.confirm-note { font-size: 0.8rem; color: var(--muted); text-align: center; margin: 0.7rem 0 0.2rem; line-height: 1.6; }

.auth-foot { text-align: center; font-size: 0.72rem; color: var(--muted); margin-top: 1.2rem; line-height: 1.7; }

.auth-links { text-align: center; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px dashed var(--line); font-size: 0.82rem; }
.auth-links a { color: var(--blue-600); margin: 0 0.3rem; }

.auth-step { animation: stepIn .35s ease both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
  .auth-card { padding: 1.6rem 1.3rem 1.2rem; border-radius: 18px; }
  .auth-logo { width: 2.8rem; height: 2.8rem; font-size: 1.25rem; }
  .auth-brand-text h1 { font-size: 1.1rem; }
}

/* ============ 考试监控（右上角） ============ */
.proctor {
  position: fixed; top: 4.7rem; right: 0.7rem; z-index: 60;
  width: 250px;
  background: rgba(20, 48, 94, 0.96);
  color: #fff;
  border: 1px solid rgba(147, 197, 253, 0.4);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 0.82rem;
}
.proctor-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.7rem; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.proctor-title { font-weight: 700; letter-spacing: 0.05em; display: flex; align-items: center; gap: 0.4rem; }
.proctor-title::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25); }
.proctor-min { background: transparent; border: 0; color: #fff; font-size: 1rem; cursor: pointer; padding: 0 0.2rem; line-height: 1; }
.proctor-body { padding: 0.5rem 0.7rem; }
.proctor-row { display: flex; align-items: center; gap: 0.45rem; padding: 0.25rem 0; }
.proctor-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #64748b; flex-shrink: 0; }
.proctor-dot.on { background: #34d399; animation: blink 1.2s infinite; }
.proctor-dot.err { background: #f87171; }
.proctor-label { flex: 1; color: #e2e8f0; }
.proctor-btn {
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff; border-radius: 6px; font-size: 0.75rem; padding: 0.22rem 0.6rem; cursor: pointer;
}
.proctor-btn:hover { background: rgba(255, 255, 255, 0.24); }
.proctor-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.proctor-video { width: 100%; border-radius: 8px; margin-top: 0.45rem; background: #000; }
.proctor-tip { color: rgba(226, 232, 240, 0.7); font-size: 0.7rem; margin-top: 0.45rem; line-height: 1.5; }
.proctor.min .proctor-body { display: none; }
.proctor.min { width: auto; }
.proctor.min .proctor-head { border-bottom: 0; }

/* 进入考试时的摄像头建议条 */
.cam-suggest {
  position: fixed; top: 4.7rem; left: 50%; transform: translateX(-50%); z-index: 59;
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: center;
  background: rgba(255, 255, 255, 0.98); color: #17253a;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.45rem 0.9rem; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); font-size: 0.85rem;
}
.cam-suggest .btn { padding: 0.3rem 0.8rem; font-size: 0.82rem; }

@media (max-width: 767px) {
  .proctor { top: 3.6rem; right: 0.4rem; width: 204px; }
  .cam-suggest { top: 3.6rem; width: 92vw; font-size: 0.78rem; }
}

/* ============ 打印范围选择弹层 ============ */
.print-scope-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.print-scope-modal[hidden] { display: none !important; }
.print-scope-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
  padding: 1.1rem 1.2rem 1rem;
}
.print-scope-card h3 { margin: 0 0 .35rem; font-size: 1.1rem; color: var(--ink); }
.print-scope-hint { margin: 0 0 .85rem; font-size: .86rem; color: var(--muted); line-height: 1.55; }
.print-scope-opt {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 .45rem; font-size: .92rem; cursor: pointer;
}
.print-scope-custom { margin: .35rem 0 .7rem .2rem; }
.print-scope-custom input {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 8px;
  padding: .45rem .6rem; font-size: .9rem;
}
.print-scope-map { margin: .35rem 0 0; font-size: .78rem; color: var(--muted); line-height: 1.5; }
.print-scope-actions {
  display: flex; justify-content: flex-end; gap: .55rem; margin-top: .9rem;
}

/* ============ 打印：第1页证书铺满整张 A4，续页简易/详细报告 ============ */
@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 210mm !important;
  }
  body.print-scope-all,
  body.print-scope-custom:not(.print-hide-p2):not(.print-hide-p3):not(.print-hide-p4) {
    height: auto !important;
    overflow: visible !important;
  }
  body.print-scope-cert {
    height: 297mm;
    overflow: hidden;
  }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print, #loadingPage, .topbar, .print-scope-modal { display: none !important; }
  .wrap {
    max-width: none !important;
    width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .cert-card {
    margin: 0 !important;
    box-shadow: none !important;
    width: 210mm !important;
    padding: 0 !important;
  }
  .cert-scaler {
    overflow: visible !important;
    height: 297mm !important;
    max-width: 210mm !important;
    width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .certificate {
    position: relative;
    left: 0;
    top: 0;
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-width: 210mm !important;
    box-shadow: none !important;
    transform: none !important;
    border: none !important;
    margin: 0 !important;
    page-break-after: always;
    break-after: page;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .cert-seal, .cert-band, .cert-emblem { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .result-ui { display: block !important; margin: 0; padding: 10mm; box-sizing: border-box; }
  .result-ui .card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 8mm;
  }
  #detailReport, #adviceReport {
    break-inside: auto;
    page-break-inside: auto;
  }
  #simpleReport { page-break-before: auto; }

  /* 默认仅证书：隐藏报告区 */
  body.print-scope-cert .result-ui { display: none !important; }
  body.print-scope-cert .certificate {
    page-break-after: auto;
    break-after: auto;
  }

  /* 自定义：按页隐藏 */
  body.print-hide-p1 .print-block-p1 { display: none !important; }
  body.print-hide-p2 .print-block-p2 { display: none !important; }
  body.print-hide-p3 .print-block-p3 { display: none !important; }
  body.print-hide-p4 .print-block-p4 { display: none !important; }
  body.print-hide-p1.print-hide-p2.print-hide-p3 .result-ui,
  body.print-scope-custom.print-hide-p2.print-hide-p3.print-hide-p4 .result-ui {
    /* 若报告页全隐藏则收起 result-ui 空白 */
  }
  body.print-scope-custom.print-hide-p2.print-hide-p3.print-hide-p4 .result-ui {
    display: none !important;
  }
  body.print-scope-custom.print-hide-p1 .certificate {
    page-break-after: auto;
    break-after: auto;
  }

  /* 第1/2题打印：锁定原卷面列数（勿套用窄屏 5/3 列） */
  .pr-char-grid {
    display: grid !important;
    grid-template-columns: repeat(10, 1fr) !important;
    gap: 1.6mm 1.2mm !important;
    width: 100% !important;
  }
  .pr-word-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 2mm 1.6mm !important;
    width: 100% !important;
  }
  .pr-char-cell {
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 1mm 0.4mm !important;
  }
  .pr-char { font-size: 3.6mm !important; }
  .pr-word { font-size: 3.2mm !important; }
  .pr-char-grid .pr-py-ref,
  .pr-char-grid .pr-py-got,
  .pr-word-grid .pr-py-ref,
  .pr-word-grid .pr-py-got {
    font-size: 2.2mm !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #detailReport {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }
}


/* 平板横屏 / 小屏压紧 */
@media (max-height: 700px) and (orientation: landscape) {
  .pcs-char { font-size: 1.7rem; }
  .pcs-word { font-size: 1.4rem; }
  .pcs-passage p { font-size: 1.1rem; }
  .pcs-sec-title { font-size: 1.2rem; }
  .practice-page .pcs-passage p { font-size: 1.35rem; line-height: 2.1; }
  .practice-page .pcs-recordbar { padding: 0.65rem 0.9rem; }
}

/* 高屏桌面：第1/2题字号略放大，铺满题面 */
@media (min-height: 820px) and (min-width: 900px) {
  .practice-page .pcs-char { font-size: 2.55rem; }
  .practice-page .pcs-word { font-size: 2.05rem; }
  .practice-page .pcs-pinyin { font-size: 0.8rem; }
  .practice-page .pcs-passage p { font-size: 1.75rem; line-height: 2.55; }
}
