/* ============================================================
   Apple Liquid Glass 组件层 —— 视觉配方完全对齐 greeting-config.html
   ------------------------------------------------------------
   玻璃：半透明白 + blur 22px / saturate 160% + 1px 白描边 + 柔和阴影 + 顶部高光
   按钮：主按钮蓝紫渐变白字；次按钮白玻璃 + 发丝边；圆角 12px
   输入：rgba(255,255,255,.65) + 发丝边 + 聚焦 3px 蓝色光晕
   大标题：实心深色（不做彩色渐变）
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 移动端点击反馈：系统默认会给 a/button 画一个方形高亮块（安卓/微信 WebView 尤其明显），
   全站统一去掉，改用组件自己的 :active 按压态；键盘操作仍保留 :focus-visible 焦点环。 */
a,
button,
[role="button"],
summary,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible),
summary:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ============================================================
   玻璃
   ============================================================ */
.glass {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
}

.glass-strong {
  background: var(--surface-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
}

/* 薄玻璃：顶栏、工具栏、输入容器 */
.glass-thin {
  background: var(--surface-soft);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm), var(--highlight);
  -webkit-backdrop-filter: blur(var(--blur-thin)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-thin)) saturate(var(--saturate));
}

/* 实底：长文阅读区、表格（保证可读性） */
.glass-solid {
  background: var(--surface-solid);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass,
  .glass-strong,
  .glass-thin {
    background: var(--surface-solid);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass,
  .glass-strong,
  .glass-thin {
    background: var(--surface-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-h-md);
  padding: 0 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: var(--transition);
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  border: none;
  background: var(--accent-filled);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--accent-filled-hover);
  color: var(--text-on-accent);
}

.btn-primary:active {
  background: var(--accent-press);
}

.btn-primary:disabled {
  background: var(--accent-filled);
  opacity: 0.5;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--hairline);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--text-primary);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: var(--error-soft);
  border: 1px solid rgba(255, 59, 48, 0.25);
  color: var(--error);
}

.btn-danger:hover {
  background: var(--error);
  border-color: transparent;
  color: var(--text-on-accent);
}

.btn-success {
  background: var(--success);
  border: none;
  color: var(--text-on-accent);
}

.btn-gold {
  background: linear-gradient(135deg, #ff9f0a, #ffd60a);
  border: none;
  color: #1c1c1e;
  box-shadow: 0 8px 24px rgba(255, 159, 10, 0.30);
}

.btn-sm {
  height: var(--control-h-sm);
  padding: 0 14px;
  font-size: var(--fs-sm);
}

.btn-lg {
  height: var(--control-h-lg);
  padding: 0 28px;
  font-size: var(--fs-lg);
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: var(--control-h-md);
  height: var(--control-h-md);
  padding: 0;
  flex: none;
}

[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn {
  background: var(--surface-strong);
}

/* ============================================================
   卡片 / 面板
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
}

.panel {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--highlight);
  overflow: hidden;
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--hairline);
  font-size: var(--fs-md);
  font-weight: 700;
}

.panel-body {
  padding: var(--sp-5);
}

/* ============================================================
   表单
   ============================================================ */
.input,
.textarea,
.select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="email"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--fs-md);
  line-height: 1.6;
  outline: none;
  transition: var(--transition);
}

.input:focus,
.textarea:focus,
.select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

.input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.textarea,
textarea {
  min-height: 96px;
  resize: vertical;
}

.select,
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236e6e73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  cursor: pointer;
}

[data-theme="dark"] .select,
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23ebebf5' stroke-opacity='.7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

input[type="color"] {
  width: 52px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.field {
  margin-bottom: var(--sp-4);
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

@media (max-width: 767px) {
  .input,
  .textarea,
  .select,
  input[type="text"],
  textarea,
  select {
    font-size: 16px;
  }
}

/* 分段控件（对应 greeting-config 的 .seg / .seg-btn） */
.seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.seg-btn {
  flex: 1;
  min-width: 70px;
  padding: 10px 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.active,
.seg-btn.is-active {
  background: var(--selected-bg);
  border-color: var(--selected-border);
  color: var(--text-primary);
  font-weight: 600;
}

[data-theme="dark"] .seg-btn {
  background: var(--surface-strong);
}

/* 开关 */
.switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  width: 51px;
  height: 31px;
  border-radius: var(--radius-pill);
  background: var(--fill-2);
  transition: var(--transition);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-track {
  background: var(--success);
}

.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}

/* ============================================================
   标签页
   ============================================================ */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.tab:hover {
  color: var(--text-primary);
  background: var(--surface-strong);
}

.tab.active,
.tab.is-active {
  background: var(--selected-bg);
  border-color: var(--selected-border);
  color: var(--text-primary);
  font-weight: 600;
}

[data-theme="dark"] .tab {
  background: var(--surface-strong);
}

/* ============================================================
   弹窗
   ============================================================ */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal-mask.is-open,
.modal-mask.show {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 86vh;
  overflow-y: auto;
  padding: var(--sp-6);
  background: var(--surface-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), var(--highlight);
  color: var(--text-primary);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.modal-title {
  font-size: var(--fs-lg);
  font-weight: 700;
}

.modal-body {
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--text-secondary);
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: var(--sp-5);
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--fs-lg);
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

@media (max-width: 767px) {
  .modal-mask {
    align-items: flex-end;
    padding: 0;
  }
  .modal-mask > .modal {
    max-width: none;
    border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================================
   Toast
   ============================================================ */
.toast-stack {
  position: fixed;
  top: calc(var(--sp-4) + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  background: var(--surface-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow), var(--highlight);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.5;
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  animation: lg-toast-in 0.2s ease;
}

.toast--success { color: var(--success); }
.toast--error { color: var(--error); }
.toast--warning { color: var(--warning); }

.toast.is-leaving {
  opacity: 0;
  transition: opacity 0.25s ease;
}

@keyframes lg-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   标签 / 徽标
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
}

.chip.is-active,
.chip.active {
  background: var(--selected-bg);
  border-color: var(--selected-border);
  color: var(--text-primary);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--error);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--fill-1);
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}

.pill--accent { background: var(--accent-soft); color: var(--accent-text, var(--accent)); }
.pill--success { background: var(--success-soft); color: var(--success); }
.pill--warning { background: var(--warning-soft); color: var(--warning-text); }
.pill--error { background: var(--error-soft); color: var(--error); }

.btn-primary .pill {
  background: rgba(255, 255, 255, 0.22);
  color: var(--text-on-accent);
}

/* ============================================================
   表格
   ============================================================ */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-sm);
  color: var(--text-primary);
}

.table th,
.table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.table thead th {
  background: var(--fill-1);
  color: var(--text-secondary);
  font-weight: 600;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: var(--fill-1);
}

/* ============================================================
   进度 / 加载 / 空态
   ============================================================ */
.progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--fill-2);
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--brand-gradient);
  transition: width 0.3s ease;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--fill-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: lg-spin 0.8s linear infinite;
}

@keyframes lg-spin {
  to { transform: rotate(360deg); }
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: var(--fs-md);
  text-align: center;
}

/* ============================================================
   刷题选项行
   ============================================================ */
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-size: var(--fs-md);
  line-height: 1.7;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.option:hover {
  border-color: var(--accent);
}

.option.is-selected,
.option.selected {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.option.is-correct {
  border-color: var(--success);
  background: var(--success-soft);
}

.option.is-wrong {
  border-color: var(--error);
  background: var(--error-soft);
}

.option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.option.is-selected .option-key {
  background: var(--accent);
  border-color: transparent;
  color: var(--text-on-accent);
}

.option.is-correct .option-key {
  background: var(--success);
  border-color: transparent;
  color: var(--text-on-accent);
}

.option.is-wrong .option-key {
  background: var(--error);
  border-color: transparent;
  color: var(--text-on-accent);
}

/* ============================================================
   站点外壳（顶栏 / 品牌 / 返回 / 页头）
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  /* 品牌图标：与 App 启动图标同源（public/img/logo-source.png 生成）。
     内部原本的字母 S 用 font-size:0 + 透明色藏起来，13 个页面的 HTML 无需改动。 */
  background: url('/public/img/brand-logo-96.png') center / cover no-repeat;
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

/* ---------- 错题本导出工具条（6 个题库页共用） ---------- */
.wb-export-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.wb-export-tip { font-size: 12.5px; color: var(--text-secondary); margin-right: auto; }
.wb-export-sel {
  flex: 0 0 auto;
  width: auto;
  max-width: 180px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}
.wb-export-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--surface-solid);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  flex: 0 0 auto;
}
.wb-export-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.wb-export-btn:disabled { opacity: .45; cursor: not-allowed; }
.wb-export-download {
  flex: 0 0 auto;
  height: 30px;
  line-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px dashed var(--hairline);
  color: var(--accent-text);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.wb-export-download:hover { border-color: var(--accent); }
/* 收藏夹的导出条没有「仅错≥N次」下拉，提示文案要占满一行 */
.wb-export-bar--fav .wb-export-tip { margin-right: auto; }
@media (max-width: 680px) {
  .wb-export-bar { gap: 6px; padding: 8px 10px; }
  .wb-export-tip { flex: 1 1 100%; margin-right: 0; }
  .wb-export-sel { flex: 1 1 auto; max-width: none; }
  .wb-export-btn { flex: 1 1 auto; height: 34px; }
}

/* ---------- 移动端/平板共享外壳（≤960px） ---------- */
@media (max-width: 960px) {
  .topbar { padding: 10px 14px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand-logo { width: 28px; height: 28px; border-radius: 8px; }
  .back-link { min-height: 34px; padding: 6px 10px; font-size: 13px; }
}

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--accent);
}

/* 页头：标题实心深色（不使用彩色渐变） */
.site-hero {
  max-width: 900px;
  margin: 48px auto 28px;
  padding: 0 20px;
  text-align: center;
}

.site-hero h1,
.site-hero .hero-title {
  margin-bottom: 6px;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  -webkit-text-fill-color: currentColor;
  background: none;
}

.site-hero p,
.site-hero .hero-sub {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ============================================================
   题库面板
   ============================================================ */
.content-area {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.tab-panel { display: none; }
.tab-panel.active,
.tab-panel.is-active { display: block; }

.section-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto var(--sp-5);
  padding: 0 20px;
}

.section-tab {
  padding: 10px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.section-tab:hover { color: var(--text-primary); }

.section-tab.active {
  background: var(--selected-bg);
  border-color: var(--selected-border);
  color: var(--text-primary);
  font-weight: 600;
}

.section-tab .tag { display: none; }
.section-tab.developing .tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--warning-soft);
  color: var(--warning-text);
  font-size: 10px;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.chapter-item {
  /* 两列：左标题、右进度徽章（徽章由 exam-progress.js 追加） */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm), var(--highlight);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-slow);
  -webkit-backdrop-filter: blur(var(--blur-thin)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-thin)) saturate(var(--saturate));
}

.chapter-item:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), var(--highlight);
}

.chapter-item.disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.chapter-item.disabled:hover {
  transform: none;
  background: var(--surface);
  box-shadow: var(--shadow-sm), var(--highlight);
}

.exam-year-row { display: flex; flex-wrap: wrap; gap: 8px; }

.exam-year-chip {
  flex-shrink: 0;
  padding: 10px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-slow);
}

.exam-year-chip:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
  color: var(--accent);
  box-shadow: var(--shadow), var(--highlight);
}

.daily-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: 56px 24px;
  text-align: center;
}

.daily-title { font-size: var(--fs-xl); font-weight: 800; }
.daily-desc { font-size: var(--fs-md); line-height: 1.7; color: var(--text-secondary); }

.daily-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-h-lg);
  margin-top: 8px;
  padding: 0 44px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-filled);
  color: var(--text-on-accent);
  font-size: var(--fs-lg);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: var(--transition);
}

.daily-btn:hover { filter: brightness(1.05); }

/* 每日一练面板（原为页面私有，现共享给所有题库页） */
.daily-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px 24px; gap: 16px; }
.daily-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.daily-actions .daily-btn { margin-top: 0; }
/* 次要按钮：随机题量更大的那个用描边款，避免两个实心蓝并排 */
.daily-btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--hairline-strong);
  box-shadow: none;
}
.daily-btn--ghost:hover { filter: none; border-color: var(--accent); color: var(--accent); }

.wrongbook-section { display: flex; flex-direction: column; gap: 16px; }

.wb-chapter-filter {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; font-size: 12.5px; color: var(--text-secondary);
}
.wb-chapter-filter select {
  min-width: 180px; max-width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--hairline); border-radius: 8px;
  background: var(--surface-solid); color: var(--text-primary);
  font: inherit; font-size: 12.5px;
}
.wb-chapter-head { background: var(--fill-1); color: var(--text-primary); }
@media (max-width: 680px) {
  .wb-chapter-filter { align-items: stretch; flex-direction: column; gap: 4px; }
  .wb-chapter-filter select { width: 100%; }
}

.wrongbook-group {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(var(--blur-thin)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-thin)) saturate(var(--saturate));
}

.wrongbook-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
  background: var(--warning-soft);
  font-size: var(--fs-md);
  font-weight: 700;
}

.wrongbook-group-count { font-size: var(--fs-xs); font-weight: 400; color: var(--text-muted); }
.wb-chapter-head {
  width: 100%; border: 0; border-bottom: 1px solid var(--hairline);
  background: var(--fill-1); color: var(--text-primary); font: inherit;
  text-align: left; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.wb-chapter-head:hover { background: var(--accent-soft); }
.wb-chapter-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-chapter-meta { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.wb-chapter-caret {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; color: var(--text-secondary); font-size: 12px;
  transition: transform .16s var(--ease);
}

.wrongbook-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.7;
  cursor: pointer;
  transition: var(--transition);
}

.wrongbook-item:last-child { border-bottom: 0; }
.wrongbook-item:hover { background: var(--surface-strong); color: var(--text-primary); }
.wrongbook-item .wb-text { flex: 1; min-width: 0; cursor: pointer; }

.wrongbook-item .wb-idx {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 6px;
  background: var(--error-soft);
  color: var(--error);
  font-size: 11px;
  font-weight: 700;
}

.wrongbook-item .wb-delete-btn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 6px;
  background: var(--error-soft);
  color: var(--error);
  font-size: 12px;
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.wrongbook-item .wb-delete-btn:hover {
  background: var(--error);
  color: var(--text-on-accent);
}

.wrongbook-item .wb-answer {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(52, 199, 89, 0.3);
  font-size: 11px;
}

.wrongbook-empty { padding: 56px 24px; text-align: center; color: var(--text-muted); font-size: var(--fs-md); }
.wrongbook-actions { margin-top: 8px; text-align: center; }

/* ============================================================
   错题/收藏 面板：子 tab、章节标签、收藏按钮、分页器
   ============================================================ */
.wb-subtabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--surface);
}
.wb-subtab {
  padding: 7px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.wb-subtab:hover { color: var(--text-primary); }
.wb-subtab.active {
  background: var(--selected-bg);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--selected-border);
}

.wrongbook-item .wb-chapter-tag {
  flex: none;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 11px;
}

.wrongbook-item .wb-fav-btn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 159, 10, 0.35);
  border-radius: 6px;
  background: rgba(255, 159, 10, 0.10);
  color: #ff9f0a;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}
.wrongbook-item .wb-fav-btn:hover { background: #ff9f0a; color: #fff; }

.wb-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.wb-pager-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: var(--transition);
}
.wb-pager-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.wb-pager-btn.active {
  background: var(--selected-bg);
  border-color: var(--selected-border);
  color: var(--text-primary);
  font-weight: 700;
}
.wb-pager-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.wb-pager-ellipsis { color: var(--text-muted); padding: 0 2px; }
.wb-pager-info { width: 100%; text-align: center; margin-top: 2px; font-size: 12px; color: var(--text-muted); }

@media (max-width: 680px) {
  .wb-pager-btn { min-width: 32px; height: 32px; padding: 0 8px; }
  .wrongbook-item .wb-chapter-tag { display: none; }
}

@media (max-width: 900px) {
  .chapter-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .section-tabs { justify-content: flex-start; }
  .wrongbook-item { padding: 12px 14px; font-size: var(--fs-xs); }
}

/* ============================================================
   画布页浮层控件（3D 祝福页）
   ============================================================ */
.glass-controls button,
.glass-controls .btn,
.glass-controls .ctrl-btn,
.glass-controls [class*="-btn"],
.glass-controls [class*="btn-"],
.glass-controls [class*="Btn"] {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow), var(--highlight);
  -webkit-backdrop-filter: blur(var(--blur-thin)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-thin)) saturate(var(--saturate));
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.glass-controls button:hover,
.glass-controls .btn:hover,
.glass-controls .ctrl-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.glass-controls button:active { transform: scale(0.96); }

.glass-controls .start-screen,
.glass-controls #start-screen,
.glass-controls .ios-start-overlay,
.glass-controls #iosStartOverlay {
  background: rgba(10, 14, 26, 0.72);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
}

/* ============================================================
   工具类
   ============================================================ */
.row { display: flex; align-items: center; gap: var(--sp-2); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.grow { flex: 1 1 auto; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }

/* 给零内距外壳（.card / .glass）补内距：.card 本身不带 padding，内距一律由消费方提供。
   与 mock_exam_hub 的 .section 范式等价，只是做成通用工具类。 */
.surface-pad { padding: var(--sp-5); }

/* ============================================================
   页脚（全站）
   ------------------------------------------------------------
   margin-top:auto 只在父级是 flex 列时有视觉作用（吸收剩余空间），
   所以：内容不满一屏 → 页脚贴视口底部；内容超长 → 自然排在内容之后（不 fixed，不遮挡）。
   这里只补“贴底 + 基础排版”，各页面自己的 footer 规则（padding 等）后置加载，会覆盖这些兜底值。
   ============================================================ */
footer {
  margin-top: auto;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .surface-pad { padding: var(--sp-4); }
}

/* ===== 案例题参考答案（交卷后可展开） ===== */
.ref-answer {
    margin-top: 10px;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: var(--fill-1);
    overflow: hidden;
}
.ref-answer > summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    list-style: none;
    user-select: none;
}
.ref-answer > summary::-webkit-details-marker { display: none; }
.ref-answer > summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 6px;
    transition: transform .15s ease;
}
.ref-answer[open] > summary::before { transform: rotate(90deg); }
.ref-answer[open] > summary { border-bottom: 1px solid var(--hairline); }
.ref-answer-body {
    padding: 12px 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-primary);
}
.ref-answer-body p { margin: 0 0 6px; }
.ref-answer-body p:last-child { margin-bottom: 0; }
.ref-answer-body table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.ref-answer-body th,
.ref-answer-body td { border: 1px solid var(--hairline); padding: 6px 8px; text-align: left; }
.ref-answer-body img { max-width: 100%; height: auto; }

/* 窄屏：宽表格不撑破卡片，改为区域内横向滚动 */
@media (max-width: 960px) {
    .ref-answer-body table {
        display: block;
        width: max-content;
        max-width: 100%;
        overflow-x: auto;
    }
}

/* ============================================================
   案例默写（recite.html）
   ------------------------------------------------------------
   注意：.card / .glass 是零内距外壳，本页两个卡片靠 .surface-pad 提供内距。
   间距只用 --sp-2/3/4/5 令牌；分隔线上下必须等值（major 16 / minor 12）。
   ============================================================ */
a.section-tab { display: inline-block; text-decoration: none; text-align: center; }

/* ---------- 选组区 ---------- */
.recite-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-3); padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--hairline);
}
.rh-text { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.rh-title { font-size: var(--fs-md); font-weight: 700; color: var(--text-primary); }
.rh-meta { font-size: var(--fs-xs); color: var(--text-muted); }
.rh-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.rh-actions .btn { padding: 9px 16px; font-size: var(--fs-sm); white-space: nowrap; }

.recite-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.recite-chip {
  padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--hairline);
  background: var(--surface); color: var(--text-secondary);
  font-family: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.recite-chip:hover { color: var(--text-primary); border-color: var(--selected-border); }
.recite-chip.active {
  background: var(--selected-bg); color: var(--text-primary);
  border-color: var(--selected-border); font-weight: 700;
}

.recite-groups {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--sp-3); margin-top: var(--sp-3);
}
.recite-group-card {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-4); text-align: left; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-primary);
  font-family: inherit; transition: var(--transition);
}
.recite-group-card:hover { border-color: var(--selected-border); background: var(--surface-strong); }
.rg-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.rg-label { font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.rg-count { flex: 0 0 auto; font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rg-bottom { display: flex; align-items: center; gap: var(--sp-2); }
.rg-bar { flex: 1 1 auto; height: 5px; border-radius: var(--radius-pill); background: var(--fill-2); overflow: hidden; }
.rg-bar > i { display: block; height: 100%; background: var(--success); border-radius: var(--radius-pill); }
.rg-done {
  flex: 0 0 auto; font-size: var(--fs-xs); color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.recite-empty { padding: var(--sp-4) 0; text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- 练习区 ---------- */
.recite-bar { padding-bottom: var(--sp-3); border-bottom: 1px solid var(--hairline); }
.recite-top { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; min-width: 0; }
.recite-top > * { min-width: 0; }
.recite-top .sp { flex: 1; }
.recite-group { font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary); }
.recite-counter, .recite-acc { font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.recite-back { padding: 7px 12px; font-size: var(--fs-xs); }

.recite-progress { margin: var(--sp-3) 0 0; height: 6px; border-radius: var(--radius-pill); background: var(--fill-2); overflow: hidden; }
.recite-progress > i { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); transition: width .2s ease; }

.recite-question { padding-top: var(--sp-4); margin-bottom: var(--sp-4); }
.recite-qhead { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.recite-no {
  display: inline-flex; align-items: center; min-height: 26px;
  padding: 2px 9px; border-radius: var(--radius-pill);
  background: var(--accent-tint); color: var(--accent);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.3;
  letter-spacing: .01em; white-space: nowrap;
  vertical-align: middle; margin-right: 8px;
}
.recite-q {
  display: block;
  font-size: 18px; line-height: 1.7; font-weight: 650; color: var(--text-primary);
  word-break: break-word; overflow-wrap: anywhere; max-width: 100%;
}
.recite-q-text { display: inline; }
.recite-tags { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-2); }
.recite-tag {
  padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
  background: var(--accent-tint); color: var(--accent);
}

.recite-input {
  display: block; width: 100%; max-width: 100%; box-sizing: border-box;
  min-height: 140px; resize: vertical; margin: 0;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); background: var(--surface);
  color: var(--text-primary); font-family: inherit; line-height: 1.8;
  /* 必须 ≥16px：iOS Safari/WebView 在输入框字号 <16px 时会自动放大整页 */
  font-size: 16px;
  overflow-wrap: anywhere;
}
.recite-input:focus { outline: none; border-color: var(--accent); }
.recite-input:disabled { background: var(--fill-1); color: var(--text-secondary); }

.recite-tools { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-3); min-width: 0; }
.recite-tools .sp { flex: 1; }
.recite-tools .btn { padding: 9px 16px; font-size: var(--fs-sm); }

.recite-hint {
  margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  background: var(--warning-soft); color: var(--warning-text);
  font-size: var(--fs-xs); line-height: 1.7; overflow-wrap: anywhere;
}

.recite-result { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px dashed var(--hairline); }
.recite-score { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: baseline; font-size: var(--fs-sm); }
.recite-score.ok strong { color: var(--success); }
.recite-score.mid strong { color: var(--warning-text); }
.recite-score.bad strong { color: var(--error); }
.recite-score .rs-pct { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.recite-score .rs-verdict { color: var(--text-muted); font-size: var(--fs-xs); }
.recite-score .rs-hint { color: var(--warning-text); font-size: var(--fs-xs); }

.recite-points { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.recite-points > li {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  font-size: var(--fs-xs); line-height: 1.7; color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-3); border-radius: 8px; background: var(--fill-1);
}
.recite-points > li.hit { color: var(--text-primary); }
.recite-points .rp-mark { flex: 0 0 auto; font-weight: 700; }
.recite-points > li.hit .rp-mark { color: var(--success); }
.recite-points > li.miss .rp-mark { color: var(--text-muted); }
.recite-points .rp-text { word-break: break-word; overflow-wrap: anywhere; min-width: 0; }

.recite-actions { margin-top: var(--sp-3); }
.recite-actions .btn { padding: 8px 16px; font-size: var(--fs-xs); }

.recite-answer {
  margin-top: var(--sp-4); padding-top: var(--sp-4);
  border-top: 1px dashed var(--hairline);
}
.recite-answer-inner { padding: var(--sp-4); border-radius: var(--radius-sm); background: var(--fill-1); }
.recite-answer-title { font-size: var(--fs-xs); font-weight: 700; color: var(--text-secondary); margin-bottom: var(--sp-2); }
.recite-answer-body {
  font-size: var(--fs-sm); line-height: 1.9; color: var(--text-primary);
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  max-width: 100%; max-height: 40vh; overflow-y: auto; overflow-x: hidden;
}
.recite-answer-hint { margin-top: var(--sp-3); padding-top: var(--sp-2); border-top: 1px dashed var(--hairline); color: var(--warning-text); font-size: var(--fs-xs); }

.recite-nav { display: flex; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--hairline); }
.recite-nav .btn { min-width: 120px; }

/* ---------- 平板 / 手机 ---------- */
@media (max-width: 640px) {
  .recite-head { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  /* flex 而不是 grid：只剩「随机 20 条」一个按钮时它会自动铺满整行，不会左对齐留半行空白 */
  .rh-actions { display: flex; }
  .rh-actions .btn { flex: 1 1 0; padding: 11px 12px; }

  /* 横滚出血：让 chip 能滑到卡片内距之外，最后一项不会被裁 */
  .recite-filters {
    margin-top: var(--sp-3);
    margin-inline: calc(-1 * var(--sp-4));
    padding-inline: var(--sp-4);
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .recite-filters::-webkit-scrollbar { display: none; }
  .recite-chip { flex: 0 0 auto; }

  .recite-groups { grid-template-columns: 1fr; gap: var(--sp-2); margin-top: var(--sp-3); }
  .recite-group-card { padding: var(--sp-3) var(--sp-4); }

  .recite-progress { margin-top: var(--sp-2); }
  .recite-question { padding-top: var(--sp-3); margin-bottom: var(--sp-3); }
  .recite-input { min-height: 140px; }
  .recite-tools { gap: var(--sp-2); }
  .recite-tools .btn { flex: 1 1 calc(50% - var(--sp-2)); padding: 11px 12px; font-size: var(--fs-sm); }
  .recite-tools .btn#btnSubmit { flex: 1 1 100%; }
  .recite-tools .btn#btnMaster { flex: 1 1 100%; }
  .recite-tools .sp { display: none; }

  .recite-result { margin-top: var(--sp-3); padding-top: var(--sp-3); }
  .recite-answer { margin-top: var(--sp-3); padding-top: var(--sp-3); }
  .recite-answer-inner { padding: var(--sp-3); }
  .recite-answer-body { max-height: 44vh; }
  .recite-nav { margin-top: var(--sp-3); padding-top: var(--sp-3); }
  .recite-nav .btn { min-width: 0; flex: 1; }
  .recite-actions .btn { width: 100%; padding: 11px 12px; font-size: var(--fs-sm); }
}

/* ============ 每日一练 · 今日答题报告 ============ */
/* 入口页那张小卡片（引擎结果浮层里用同一套数字样式） */
.daily-report-card{
  margin-top:12px;padding:14px 16px;border:1px solid var(--hairline);border-radius:var(--radius-sm);
  background:var(--surface-soft);
}
.daily-report-card .drc-head{
  display:flex;align-items:baseline;gap:8px;font-size:14px;font-weight:700;color:var(--text-primary);margin-bottom:10px;
}
.daily-report-card .drc-sub{font-size:12px;font-weight:500;color:var(--text-muted)}
.daily-report-card .drc-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;text-align:center}
.daily-report-card .drc-stats b{display:block;font-size:18px;font-weight:800;color:var(--text-primary);line-height:1.3}
.daily-report-card .drc-stats span{font-size:11.5px;color:var(--text-muted)}
.daily-report-card .drc-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
@media (max-width:480px){
  .daily-report-card .drc-stats{grid-template-columns:repeat(2,1fr)}
}

/* 引擎结果浮层里的扩展块 */
.daily-report{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline)}
.daily-report .report-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;text-align:center;margin-bottom:14px}
.daily-report .report-stats b{display:block;font-size:20px;font-weight:800;color:var(--text-primary);line-height:1.3}
.daily-report .report-stats span{font-size:12px;color:var(--text-muted)}
.report-view{max-height:46vh;overflow-y:auto;text-align:left}
/* 答题卡 */
.sheet-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:8px}
.sheet-cell{
  height:44px;border-radius:var(--radius-sm);border:1px solid var(--hairline);background:var(--surface);
  font-family:inherit;font-size:14px;font-weight:700;color:var(--text-primary);cursor:pointer;transition:transform .12s;
}
.sheet-cell:active{transform:scale(.95)}
.sheet-cell.ok{border-color:rgba(52,199,89,.55);background:rgba(52,199,89,.14);color:var(--success)}
.sheet-cell.bad{border-color:rgba(255,59,48,.5);background:rgba(255,59,48,.12);color:#ff3b30}
.sheet-cell.skip{color:var(--text-muted);background:var(--fill-1)}
.sheet-legend{display:flex;gap:14px;margin-top:10px;font-size:12px;color:var(--text-muted)}
.sheet-legend .ok{color:var(--success)}
.sheet-legend .bad{color:#ff3b30}
/* 全部解析 */
.report-analysis .ra-item{
  padding:12px 0;border-top:1px solid var(--hairline);
}
.report-analysis .ra-item:first-child{border-top:0}
.report-analysis .ra-head{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.report-analysis .ra-no{
  width:22px;height:22px;border-radius:50%;background:var(--fill-2);color:var(--text-secondary);
  font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;flex:none;
}
.report-analysis .ra-mark{font-size:12px;font-weight:700}
.report-analysis .ra-mark.ok{color:var(--success)}
.report-analysis .ra-mark.bad{color:#ff3b30}
.report-analysis .ra-mark.skip{color:var(--text-muted)}
.report-analysis .ra-stem{font-size:14px;line-height:1.7;color:var(--text-primary);margin-bottom:8px}
.report-analysis .ra-stem p{margin:0}
.report-analysis .ra-opt{
  font-size:13.5px;line-height:1.65;padding:6px 10px;border-radius:var(--radius-sm);
  border:1px solid var(--hairline);margin-bottom:6px;color:var(--text-secondary);
}
.report-analysis .ra-opt p{margin:0}
.report-analysis .ra-opt.is-correct{border-color:rgba(52,199,89,.55);background:rgba(52,199,89,.12);color:var(--text-primary)}
.report-analysis .ra-opt.is-wrong{border-color:rgba(255,59,48,.5);background:rgba(255,59,48,.10);color:var(--text-primary)}
.report-analysis .ra-analysis{font-size:13px;line-height:1.7;color:var(--text-secondary);margin-top:6px}
.report-analysis .ra-analysis p{margin:0}

/* 章节练习进度徽章：右侧两行「已做/总题」+「百分比」。由 exam-progress.js 追加 */
.chapter-item .chapter-name { min-width: 0; }
.chapter-item .chapter-prog {
    display: block;
    text-align: right;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}
.chapter-prog b {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.chapter-prog i {
    display: block;
    font-size: 11px;
    font-style: normal;
    color: var(--text-muted);
}
.chapter-item:hover .chapter-prog b { color: var(--accent); }
.chapter-item:hover .chapter-prog i { color: var(--accent); }
.chapter-prog.is-done b,
.chapter-prog.is-done i,
.chapter-item:hover .chapter-prog.is-done b,
.chapter-item:hover .chapter-prog.is-done i { color: var(--success); }
