/* ============================================================
 *  汉字心智测评 - 移动端 Demo 样式
 *  - 顶部 :root 集中所有可调参数（颜色 / 圆角 / 间距）便于 UI 细化
 *  - 中部通用组件（按钮 / 卡片 / 输入框 / 头像 / 列表行）
 *  - 底部各屏幕专属样式，每个屏幕以 .screen-xxx 块独立组织
 * ============================================================ */
:root {
  /* —— 颜色 —— */
  --bg:           #F4F6FB;
  --bg-soft:      #EEF1F6;
  --card:         #FFFFFF;
  --line:         #E5E9F0;
  --line-soft:    #EFF2F7;
  --text:         #1F2937;
  --text-2:       #6B7280;
  --text-3:       #9CA3AF;

  --primary:      #C8161D;
  --primary-2:    #9E1218;
  --primary-grad: linear-gradient(135deg, #C8161D 0%, #A01818 100%);
  --primary-soft: #FBF0F0;

  --success:      #22C55E;
  --success-soft: #E7F9EE;
  --warn:         #F59E0B;
  --warn-2:       #F97316;
  --warn-soft:    #FEF3E7;
  --danger:       #EF4444;
  --purple:       #8B5CF6;
  --purple-soft:  #F0ECFE;

  /* —— 圆角 —— */
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-pill: 24px;

  /* —— 阴影 —— */
  --sh-sm: 0 1px 2px rgba(20,30,60,0.04);
  --sh:    0 4px 16px rgba(20,30,60,0.06);

  /* —— 手机外框（桌面端预览） —— */
  --frame-w: 375px;
  --frame-h: 812px;

  /* —— 安全区：避开刘海 / 状态栏 —— */
  --safe-top: 30px;

  /* —— 字体 —— */
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: #E5E9F2;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
ul, li { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* ============================= 桌面端手机外框 ============================= */
.frame-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: #E5E9F2;
}
.phone {
  position: relative;
  width: var(--frame-w);
  height: var(--frame-h);
  background: #fff;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(20,40,80,0.18), 0 0 0 10px #111, 0 0 0 11px #2b2b2e;
}
.phone::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 130px; height: 26px; background: #111;
  border-bottom-left-radius: 14px; border-bottom-right-radius: 14px;
  z-index: 999;
}
/* 移动端：吃掉外框，全屏显示 */
@media (max-width: 480px) {
  :root { --safe-top: env(safe-area-inset-top, 20px); }
  .frame-wrap { padding: 0; background: var(--bg); }
  .phone { width: 100vw; height: 100vh; border-radius: 0; box-shadow: none; }
  .phone::before { display: none; }
}

/* ============================= 通用：屏幕框架 ============================= */
.screen {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.screen.active { display: flex; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* —— 渐变流动动画 —— */
@keyframes flow-gradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .home-big-title, .btn-primary { animation: none !important; }
}

.bottom-nav-spacer { height: 72px; }

/* ===== 顶部导航 ===== */
.appbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  height: calc(48px + var(--safe-top)); padding: var(--safe-top) 12px 0;
  background: transparent;
  font-weight: 600; font-size: 16px;
  flex-shrink: 0;
}
.appbar .back,
.appbar .right { position: absolute; top: calc(var(--safe-top) + 24px); transform: translateY(-50%); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.appbar .back { left: 8px; }
.appbar .right { right: 12px; }
.appbar.solid { background: #fff; border-bottom: 1px solid var(--line-soft); }

/* ===== 底部 Tab Bar ===== */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; border-top: 1px solid var(--line-soft);
  display: flex; height: 56px;
  z-index: 4;
}
.tabbar .tab {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--text-3); font-size: 11px;
}
.tabbar .tab.active { color: var(--primary); font-weight: 700; }
.tabbar .tab svg { width: 22px; height: 22px; }

/* ===== 通用按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 15px; width: 100%;
  transition: filter .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(120deg, #C8161D, #E6292E, #A01818, #E6292E, #C8161D); background-size: 800% auto; color: #fff; box-shadow: 0 6px 16px rgba(200,22,29,0.3); animation: flow-gradient 24s linear infinite; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost   { background: var(--primary-soft); color: var(--primary); }
.btn-danger  { background: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%); color: #fff; box-shadow: 0 6px 16px rgba(225,29,72,0.3); }
.btn-success { background: linear-gradient(135deg, #34D77A 0%, #16A34A 100%); color: #fff; box-shadow: 0 6px 16px rgba(34,197,94,0.3); }
.btn-warn    { background: linear-gradient(135deg, #FB923C 0%, #F97316 100%); color: #fff; box-shadow: 0 6px 16px rgba(249,115,22,0.3); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-link    { background: transparent; color: var(--text-2); height: 40px; }
.btn-gray    { background: var(--bg-soft); color: var(--text-2); }
.btn-group { display: flex; gap: 10px; }
.btn-group .btn { flex: 1; }

/* ===== 卡片 ===== */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 16px; }
.card + .card { margin-top: 12px; }

/* ===== 行 / 头像 ===== */
.row { display: flex; align-items: center; gap: 12px; }
.row .meta { flex: 1; min-width: 0; }
.row .meta .name { font-weight: 600; font-size: 15px; }
.row .meta .sub { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 16px; flex-shrink: 0;
}
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }

/* ===== 表单输入 ===== */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; color: var(--text); margin-bottom: 6px; font-weight: 500; }
.field > label .req { color: var(--danger); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg-soft); border-radius: var(--r);
  border: 1px solid transparent; outline: none; transition: border-color .15s, background .15s;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); background: #fff; }
.field textarea { height: auto; padding: 10px 14px; }

/* ===== 段选 ===== */
.seg {
  display: inline-flex; padding: 4px;
  background: var(--bg-soft); border-radius: var(--r);
  width: 100%;
}
.seg button {
  padding: 8px 0; border-radius: var(--r-sm); color: var(--text-2); font-size: 13px;
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
}
.seg button.on { background: #fff; color: var(--primary); box-shadow: var(--sh-sm); }

/* ===== 通用配色徽章 ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 600;
  background: var(--primary-soft); color: var(--primary);
}
.badge.green { background: var(--success-soft); color: #16A34A; }
.badge.warn  { background: var(--warn-soft); color: var(--warn-2); }
.badge.danger{ background: #FEE2E2; color: var(--danger); }
.badge.purple{ background: var(--purple-soft); color: var(--purple); }

.tip-info { padding: 12px 14px; background: var(--primary-soft); border-radius: var(--r); display: flex; gap: 10px; color: var(--primary); font-size: 12px; line-height: 1.6; }
.tip-info .body strong { display: block; font-weight: 600; margin-bottom: 4px; color: var(--primary); font-size: 13px; }
.tip-warn { padding: 12px 14px; background: var(--warn-soft); color: #C2410C; border-radius: var(--r); display: flex; gap: 10px; font-size: 12px; line-height: 1.6; }
.tip-warn .ico { color: var(--warn-2); flex-shrink: 0; }

/* ============================== 1. 登录 ============================== */
#screen-login { background: #fff; }
.login-top { padding: calc(56px + var(--safe-top)) 24px 24px; text-align: center; }
.login-logo {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto;
  background: var(--primary-soft); display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.login-title { font-size: 22px; font-weight: 700; margin-top: 24px; }
.login-sub   { color: var(--text-2); font-size: 13px; margin-top: 8px; }
.login-hero {
  margin: 28px 24px; height: 220px; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(circle at 70% 30%, #B6BAC2 0%, #6F7278 30%, #2C2D31 70%, #0F0F10 100%);
  position: relative;
}
.login-hero .inkwell {
  position: absolute; left: 50%; top: 56%; transform: translate(-50%,-50%);
  width: 60%; height: 60%;
  background: radial-gradient(circle, #1f1f22 50%, #0a0a0c 100%);
  border-radius: 50%;
  box-shadow: inset 0 0 40px rgba(0,0,0,.85), 0 6px 30px rgba(0,0,0,.4);
}
.login-hero .brush {
  position: absolute; left: 12%; top: 50%;
  width: 78%; height: 14px;
  background: linear-gradient(90deg, transparent 0%, #4A3322 18%, #C49A6C 50%, #4A3322 82%, transparent 100%);
  border-radius: 50% / 100%; transform: rotate(-12deg);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.4));
}
.login-hero .brush::after {
  content: ''; position: absolute; right: -10%; top: 50%; transform: translateY(-50%);
  width: 26%; height: 26px;
  background: radial-gradient(ellipse, #f8f4ec 30%, #bca988 100%);
  border-radius: 50% 60% 60% 50% / 50% 50% 50% 50%;
}
.login-bottom { padding: 0 24px 56px; }
.login-bottom .wechat-btn {
  height: 48px; border-radius: var(--r-pill);
  background: var(--success); color: #fff; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 6px 16px rgba(34,197,94,.3);
}
.login-agree { font-size: 12px; color: var(--text-3); margin-top: 16px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
.login-agree input[type=checkbox] { accent-color: var(--primary); }
.login-agree .links a { color: var(--primary); }
.login-copy { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 28px; }

/* ============================== 2. 首页 ============================== */
/* —— 顶部标题区 —— */
.home-head {
  padding: calc(10px + var(--safe-top)) 24px 0;
  text-align: center;
}
.home-big-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 6px;
  margin-left: 6px;
  background: linear-gradient(120deg, #C8161D, #E6292E, #A01818, #E6292E, #C8161D);
  background-size: 800% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: flow-gradient 24s linear infinite;
}
.home-sub-emph {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.home-sub-emph .line {
  display: inline-block;
  width: 20px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: .6;
}

/* —— 说明文本 —— */
.home-desc {
  margin: 12px 16px 0;
  padding: 12px 16px;
  background: var(--card);
  box-shadow: var(--sh-sm);
  border-radius: var(--r-lg);
}
.home-desc p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
  text-align: justify;
  text-indent: 2em;
}
.home-desc p + p { margin-top: 0.7em; }

/* —— 汉字心智分析测评 板块 —— */
.system-card {
  margin: 12px 16px 0;
  padding: 12px 16px 10px;
}
.sys-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.sys-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  text-align: justify;
  text-indent: 2em;
  margin-bottom: 10px;
}

/* —— 特性列表（复用，去除外边距，因已在卡片内） —— */
.feature-list { display: flex; flex-direction: column; gap: 7px; }
.feature { display: flex; align-items: flex-start; gap: 10px; }
.feature .check {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.feature .ft-text strong { display: block; font-size: 14px; line-height: 18px; color: var(--text); }
.feature .ft-text span { font-size: 12px; color: var(--text-2); }

/* —— 剩余次数小字（按钮下方） —— */
.remaining-inline {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}
.remaining-inline strong {
  color: var(--warn-2);
  font-weight: 700;
}

.cta-bottom { padding: 12px 16px 72px; }
.cta-bottom .btn { height: 48px; font-size: 15px; }

/* ============================== 3. 测评提示 ============================== */
.tip-lightbulb {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 24px auto 0;
}
.tip-title { text-align: center; font-size: 22px; font-weight: 700; padding-top: 14px; }
.tip-subtitle { text-align: center; color: var(--text-2); font-size: 13px; padding: 4px 24px 0; }

.tip-rule-card { margin: 16px; padding: 4px 16px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.tip-rule-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.tip-rule-row:last-child { border-bottom: none; }
.tip-rule-row .num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.tip-rule-row .title { font-weight: 600; }
.tip-rule-row .desc  { color: var(--text-2); font-size: 12px; line-height: 1.65; margin-top: 4px; }

.tip-warm-block { margin: 16px; }
.tip-action { padding: 16px 16px 0; }

/* ============================== 4. 选择测评对象 ============================== */
.section-title { padding: 14px 16px 0; }
.section-title h2 { font-size: 18px; font-weight: 700; }
.section-title .lead { color: var(--text-2); font-size: 12px; margin-top: 4px; }

.subject-list { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
#selectNext { padding: 24px 16px; }
.add-subject-card {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin: 0; padding: 14px;
  background: var(--card); border-radius: var(--r-lg);
  border: 2px solid transparent; box-shadow: var(--sh-sm);
  color: var(--primary); font-weight: 600; font-size: 14px; cursor: pointer;
}
.add-subject-card svg { width: 18px; height: 18px; color: var(--primary); }
.sort-seg { display: flex; gap: 8px; padding: 12px 16px; }
.sort-seg button {
  flex: 1; height: 34px; border-radius: var(--r);
  background: var(--bg-soft); color: var(--text-2);
  font-size: 13px; font-weight: 500; border: 1px solid var(--line);
}
.sort-seg button.on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

.subject-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--card);
  border-radius: var(--r-lg); border: 2px solid transparent;
  box-shadow: var(--sh-sm);
}
.subject-card.selected { border-color: var(--primary); }
.subj-radio {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line); position: relative;
}
.subject-card.selected .subj-radio { background: var(--primary); border-color: var(--primary); }
.subject-card.selected .subj-radio::after {
  content: ''; position: absolute; left: 6px; top: 3px;
  width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.subj-main { flex: 1; min-width: 0; }
.subj-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.subj-name { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.subj-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.gender-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px;
  height: 20px; padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 600; line-height: 1;
}
.gender-chip.female { background: #FCE7F3; color: #DB2777; }   /* 淡雅粉 */
.gender-chip.male { background: #DBEAFE; color: #2563EB; }     /* 淡雅蓝 */
.gender-chip .gico { font-size: 10px; font-weight: 900; line-height: 1; }   /* 性别图标加粗 */
.gender-chip .gnum { font-size: 10px; font-weight: 500; }    /* 年龄数字 */
.subject-card .arrow { flex: 0 0 auto; color: var(--text-3); margin-left: 2px; }
.subject-card .del-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--text-2);
}
.subject-card .del-btn svg { width: 16px; height: 16px; }
.subject-card .row-actions { display: flex; align-items: center; gap: 8px; margin-left: 10px; flex: 0 0 auto; }
.subject-card .row-edit, .subject-card .row-del {
  width: 34px; height: 34px; border-radius: 9px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  background: var(--bg-soft); color: var(--text-3);
}
.subject-card .row-edit svg, .subject-card .row-del svg { width: 17px; height: 17px; }

.contact-screen { padding: 20px 16px; }
.contact-card {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  padding: 22px 18px; text-align: center;
}
.contact-desc { color: var(--text-2); font-size: 14px; line-height: 1.8; text-align: left; margin: 0 0 20px; }
.contact-qr { width: 180px; height: 180px; margin: 0 auto; }
.contact-qr svg { width: 100%; height: 100%; display: block; }
.contact-qr-tip { color: var(--text-3); font-size: 12px; margin-top: 12px; }

.subject-list .add-card {
  border: 1.5px dashed var(--line); background: transparent; box-shadow: none;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 56px; color: var(--primary); font-weight: 600;
}
.btn.disabled { background: var(--text-3); color: #fff; opacity: .5; cursor: not-allowed; box-shadow: none; }

.empty-wrap { padding: 80px 16px; text-align: center; }
.empty-wrap h3 { font-size: 18px; margin-bottom: 8px; }
.empty-wrap p { color: var(--text-2); font-size: 13px; }

/* ============================== 5. 添加测评对象 ============================== */
.add-subject-form { padding: 16px; background: var(--card); margin: 12px 16px; border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.add-subject-form .form-note { font-size: 12px; color: var(--text-2); background: var(--primary-soft); border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; line-height: 1.6; }
.add-subject-form .field > label .opt-tag { color: var(--text-3); font-weight: 400; font-size: 11px; margin-left: 4px; }
.add-subject-form .field > label .opt-hint { color: var(--text-3); font-weight: 400; font-size: 11px; margin-left: 6px; opacity: .85; }
.add-subject-form .seg { display: flex; width: 100%; }
.add-subject-form .seg button { flex: 1; }
.add-subject-form .actions { padding: 16px 0; }

/* ============================== 6. 选择测评方式 ============================== */
.method-subject-strip {
  margin: 12px 16px 0; padding: 14px;
  background: var(--primary-soft); border-radius: var(--r-lg);
  display: flex; align-items: center; gap: 12px;
}
.method-subject-strip .modify { color: var(--primary); font-size: 13px; }

.method-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.method-card {
  background: var(--card); border-radius: var(--r-lg);
  padding: 18px 16px; position: relative; box-shadow: var(--sh-sm);
  border: 2px solid transparent; transition: border-color .15s;
}
.method-card.selected { border-color: var(--primary); }
.method-card .head { display: flex; align-items: center; gap: 14px; }
.method-card .ico {
  width: 44px; height: 44px; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.method-card .ico.blue { background: var(--primary-soft); color: var(--primary); }
.method-card .ico.purple { background: var(--purple-soft); color: var(--purple); }
.method-card .name { font-weight: 600; font-size: 16px; }
.method-card .desc { font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 1.5; }
.method-card ul { padding: 10px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text); }
.method-card ul li { display: flex; align-items: center; gap: 6px; }
.method-card ul li::before {
  content: '';
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--success-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316A34A' stroke-width='3'><polyline points='4 12 10 18 20 6'/></svg>") center/12px no-repeat;
  flex-shrink: 0;
}
.method-card .reco {
  position: absolute; top: 14px; right: 14px;
  padding: 2px 8px; background: var(--primary); color: #fff;
  font-size: 10px; border-radius: var(--r-pill);
}
.method-card .btn { margin-top: 14px; height: 40px; }

/* ============================== 7. 拍照识别 ============================== */
.ocr-photo {
  margin: 12px 16px 0; height: 180px;
  background: var(--bg-soft); border-radius: var(--r-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-2); font-size: 13px;
}
.ocr-photo .ico { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.ocr-photo .tip { color: var(--text-3); font-size: 12px; }

.ocr-bar { padding: 16px 16px 0; display: flex; align-items: center; justify-content: space-between; }
.ocr-bar .label { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ocr-bar .label svg { color: var(--primary); }
.ocr-bar .count { color: var(--text-2); font-size: 13px; }
.ocr-bar .count .badge { margin-left: 6px; }

.ocr-grid {
  margin: 8px 16px 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.ocr-cell {
  height: 50px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); border-radius: var(--r);
  font-size: 22px; font-weight: 600; color: var(--primary);
  position: relative;
}
.ocr-cell.uncertain { background: #FFE7E0; color: var(--warn-2); }
.ocr-cell.empty { background: var(--warn-soft); color: var(--warn-2); font-size: 18px; opacity: .5; }
.ocr-cell.add { background: var(--warn-soft); color: var(--warn-2); border: 1.5px dashed var(--warn-2); cursor: pointer; }
.ocr-cell .x {
  position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.ocr-cell:hover .x,
.ocr-cell.show-x .x { opacity: 1; }

.ocr-legend { padding: 8px 16px 0; display: flex; gap: 16px; font-size: 12px; color: var(--text-2); justify-content: center; }
.ocr-legend span { display: flex; align-items: center; gap: 4px; }
.ocr-legend .dot { width: 8px; height: 8px; border-radius: 50%; }

.ocr-bottom { padding: 16px; display: flex; gap: 10px; }
.ocr-bottom .btn { flex: 1; }

/* ============================== 8. 校对识别结果 ============================== */
.correction-tip { margin: 12px 16px 0; }
.correction-grid {
  margin: 16px 16px 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.correction-cell {
  height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); border-radius: var(--r);
  font-size: 22px; color: var(--text);
  position: relative;
}
.correction-cell.uncertain { background: #FFE7E0; color: var(--warn-2); }
.correction-cell.empty { background: var(--bg-soft); color: var(--text-3); font-size: 18px; opacity: .5; }
.correction-cell.add { background: #fff; color: var(--primary); border: 1.5px dashed var(--primary); cursor: pointer; }
.correction-cell .x {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.correction-cell.show-x .x,
.correction-cell:hover .x { opacity: 1; }

.correction-actions { padding: 16px; display: flex; flex-direction: column; gap: 10px; }

/* ============================== 9. 逐字输入 ============================== */
.progress-row { padding: 16px 16px 4px; display: flex; align-items: baseline; justify-content: space-between; }
.progress-row .lbl { font-size: 14px; color: var(--text); }
.progress-row .num { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1; }
.progress-row .total { color: var(--text-2); font-size: 14px; }
.progress-bar { margin: 8px 16px 0; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress-bar .fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width .35s; }

.char-stage {
  margin: 32px 0 0; display: flex; flex-direction: column; align-items: center;
}
.char-stage .last-pill {
  background: var(--success-soft); color: #16A34A;
  padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 12px; display: flex; align-items: center; gap: 4px;
  margin-bottom: 16px;
}
.char-box {
  width: 220px; height: 220px; border-radius: var(--r-lg);
  border: 2px dashed #BFD0E8; background: var(--card);
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.char-box.has { border: 2px solid var(--primary); box-shadow: 0 6px 24px rgba(200,22,29,0.18); }
.char-box::before, .char-box::after {
  content: ''; position: absolute; background: rgba(143,159,191,0.55);
}
.char-box::before { left: 8%; right: 8%; top: 50%; height: 1px; }
.char-box::after  { top: 8%; bottom: 8%; left: 50%; width: 1px; }
.char-box .diag {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top right, transparent calc(50% - .6px), rgba(143,159,191,0.35) calc(50% - .6px), rgba(143,159,191,0.35) calc(50% + .6px), transparent calc(50% + .6px)),
    linear-gradient(to top left, transparent calc(50% - .6px), rgba(143,159,191,0.35) calc(50% - .6px), rgba(143,159,191,0.35) calc(50% + .6px), transparent calc(50% + .6px));
}
.char-box .big-char { font-size: 100px; color: #C5CAD3; font-weight: 600; transition: color .15s; }
.char-box.has .big-char { color: var(--text); }
.char-box .ph { position: absolute; bottom: 16px; color: var(--text-3); font-size: 12px; width: 100%; text-align: center; }
.char-box.has .ph { display: none; }

.char-stage .desc { color: var(--text-2); font-size: 13px; margin-top: 24px; text-align: center; padding: 0 16px; }
.char-stage .desc strong { color: var(--text); }

/* ============================== 10. 第 30 字提交页 ============================== */
.last-flag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--success-soft); color: #16A34A;
  font-size: 12px; font-weight: 600;
  margin-bottom: 16px;
}

/* ============================== 11. 分析中 ============================== */
#screen-analyzing { align-items: center; justify-content: center; padding: calc(24px + var(--safe-top)) 24px 24px; }
.analyze-wrap { padding: 32px 24px; text-align: center; }
.analyze-ring {
  width: 110px; height: 110px; border-radius: 50%;
  border: 6px solid var(--bg-soft); border-top-color: var(--primary);
  animation: spin 1s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analyze-title { font-size: 18px; font-weight: 700; margin-top: 20px; }
.analyze-sub { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.analyze-steps { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.analyze-steps li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-3);
  padding: 10px 14px; background: var(--card); border-radius: var(--r); box-shadow: var(--sh-sm);
}
.analyze-steps li.done { color: var(--text); }
.analyze-steps li.done::before {
  content: '';
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--success);
}
.analyze-steps li.pending::before {
  content: '';
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--line);
}
.analyze-tip {
  margin-top: 22px; padding: 12px 16px;
  background: var(--primary-soft); border-radius: var(--r);
  color: var(--text-2); font-size: 13px; line-height: 1.7; text-align: left;
}
.analyze-tip::before { content: '提示'; display: inline-block; margin-right: 6px;
  padding: 1px 7px; border-radius: 6px; background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 600; vertical-align: 1px; }

/* ============================== 12. 测评报告 ============================== */
/* 大标题 */
.big-title { font-size: 22px; font-weight: 900; color: var(--primary); text-align: center; letter-spacing: 1px; padding: 16px 16px 0; margin-bottom: 16px; }
#screen-report .content { padding: 0 16px 32px; }

/* 测评者信息 */
.card-inner-title { font-size: 17px; font-weight: 800; color: var(--text); }
.report-info { display: flex; flex-direction: column; gap: 10px; }
.report-info .row { display: flex; align-items: baseline; gap: 12px; }
.report-info .label { font-size: 14px; color: var(--text-3); min-width: 72px; }
.report-info .value { font-size: 15px; font-weight: 600; color: var(--text); }

/* 联想汉字卡片 */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { font-size: 17.5px; font-weight: 800; color: var(--text); }
.char-count { background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 500; padding: 3px 10px; border-radius: 10px; }
.char-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px 4px; margin-top: 2px; }
.char-grid span {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1/1; background: #F7F8FA; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; font-weight: 700; color: var(--primary);
}

/* ===== 报告新样式体系（对齐07_报告样式设计） ===== */

/* 一级标题：红色圆形序号 + 红色大字 */
.chapter { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.ch-head { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; }
.ch-badge {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 16px; font-weight: 900; display: flex; align-items: center; justify-content: center; flex: none;
}
.ch-title { font-size: 20.5px; font-weight: 900; color: var(--primary); letter-spacing: .5px; }

/* 二级维度（指标卡） */
.metric { display: flex; flex-direction: column; gap: 8px; }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-head .mt { font-size: 16.5px; font-weight: 800; color: var(--text); }
.metric-desc { font-size: 14.5px; color: #374151; line-height: 1.65; }

/* pill 标签 */
.pill {
  font-size: 12.5px; font-weight: 800; padding: 5px 12px; border-radius: 18px;
  white-space: nowrap; letter-spacing: .3px; box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.pill.excellent { background: var(--primary); color: #fff; }
.pill.good { background: var(--success); color: #fff; }
.pill.warn { background: var(--warn); color: #fff; }
.pill.normal { background: #374151; color: #fff; }
.pill.plain { background: #374151; color: #fff; }

/* 三级维度（横线分隔） */
.lv3 { margin-top: 12px; border-top: 1px solid #EEF0F5; padding-top: 10px; display: flex; flex-direction: column; }
.lv3-item { padding: 11px 0; border-bottom: 1px solid #EEF0F5; display: flex; flex-direction: column; gap: 6px; }
.lv3-item:last-child { border-bottom: none; }
.lv3-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lv3-code { font-size: 13px; font-weight: 700; color: #1F2937; flex: none; }
.lv3-name { font-size: 14px; font-weight: 700; color: var(--text); }
.lv3 .pill { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 8px; box-shadow: none; margin-left: auto; }
.lv3 .pill.excellent { background: var(--primary-soft); color: var(--primary); }
.lv3 .pill.good { background: var(--success-soft); color: #047857; }
.lv3 .pill.warn { background: var(--warn-soft); color: #B45309; }
.lv3 .pill.normal { background: #F3F4F6; color: var(--text-2); }
.lv3 .pill.plain { background: #F3F4F6; color: var(--text-2); }
.lv3-desc { font-size: 14.5px; color: #374151; line-height: 1.6; }

/* 四级维度（内嵌卡片列表） */
.lv4-wrap { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.dim-list { display: flex; flex-direction: column; border: 1px solid #EEF0F5; border-radius: 4px; overflow: hidden; background: #FDFDFE; }
.dim-card {
  background: transparent; border-bottom: 1px solid #EEF0F5;
  padding: 11px 12px; display: flex; flex-direction: column; gap: 2px;
}
.dim-card:last-child { border-bottom: none; }
.dim-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dim-name { font-size: 14px; font-weight: 700; color: var(--text); }
.dim-pill { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 8px; white-space: nowrap; flex: none; }
.dim-pill.excellent { background: var(--primary-soft); color: var(--primary); }
.dim-pill.good { background: var(--success-soft); color: #047857; }
.dim-pill.warn { background: var(--warn-soft); color: #B45309; }
.dim-pill.normal { background: #F3F4F6; color: var(--text-2); }
.dim-pill.plain { background: #F3F4F6; color: var(--text-2); }
.dim-desc { font-size: 12.5px; color: #9CA3AF; line-height: 1.55; margin-top: 3px; }

/* 主题文本块（AI评语大段文字） */
.sub-block { font-size: 14.5px; color: #374151; white-space: pre-line; line-height: 1.75; }
.sub-block b { color: var(--text); font-weight: 700; }

/* 报告使用说明 */
.usage-item { display: flex; gap: 8px; align-items: flex-start; }
.usage-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 2px; margin-top: 7px; flex: none; }
.usage-item p { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }

/* 特别说明 */
.report-note { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--sh-sm); }
.report-note p { font-size: 14px; font-weight: 600; color: #374151; line-height: 1.65; }

/* 报告卡片（二级维度容器） */
.report-metric-card {
  background: var(--card); border-radius: 16px; padding: 16px;
  box-shadow: var(--sh); display: flex; flex-direction: column; gap: 10px;
  margin-top: 0 !important;
}

.cluster-row .name { width: 76px; font-weight: 600; font-size: 13px; }
.cluster-row .chars { flex: 1; font-size: 13px; color: var(--text-2); }
.cluster-row .count { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }

/* Suggestions */
.sug-list { display: flex; flex-direction: column; gap: 8px; }
.sug-row { display: flex; gap: 10px; font-size: 13px; line-height: 1.7; padding-left: 12px; position: relative; }
.sug-row::before { content: ''; position: absolute; left: 0; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.sug-row strong { color: var(--success); margin-right: 4px; }
.sug-row.improve strong { color: var(--warn-2); }

/* ============================== 13. 个人中心 ============================== */
.profile-hero {
  margin: 12px 16px 0;
  padding: 16px 40px 16px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--text);
  position: relative; overflow: hidden;
  box-shadow: var(--sh-sm);
  cursor: pointer;
}
.profile-hero:active { background: var(--bg-soft); }
.profile-hero-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.profile-hero .top { display: flex; align-items: flex-start; gap: 12px; position: relative; z-index: 1; }
.profile-hero .avatar { width: 54px; height: 54px; font-size: 20px; }
.profile-hero .name { font-weight: 700; font-size: 18px; }
.profile-hero .id   { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.profile-name-row { display: flex; align-items: center; }

.profile-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.profile-item {
  padding: 14px 16px; background: var(--card); border-radius: var(--r-lg);
  display: flex; align-items: center; gap: 12px; box-shadow: var(--sh-sm);
  position: relative;
}
.profile-item .ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-item .ico.pur { background: var(--purple-soft); color: var(--purple); }
.profile-item .ico.blu { background: var(--primary-soft); color: var(--primary); }
.profile-item .ico.gre { background: var(--success-soft); color: #16A34A; }
.profile-item .ico.org { background: var(--warn-soft); color: var(--warn); }
.profile-item .ico.gra { background: var(--bg-soft); color: var(--text-2); }
.profile-item .meta   { flex: 1; min-width: 0; }
.profile-item .meta .name { font-weight: 600; font-size: 15px; }
.profile-item .meta .desc { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.profile-item .badge-count {
  background: var(--danger); color: #fff;
  padding: 1px 7px; font-size: 10px; border-radius: 8px;
  margin-right: 4px;
}
.profile-item .arrow { color: var(--text-3); }

/* ============================== 14. 历史测评报告 ============================== */
.history-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.history-item {
  background: var(--card); border-radius: var(--r-lg);
  padding: 14px 16px; box-shadow: var(--sh-sm);
}
.history-item .top { display: flex; align-items: center; gap: 12px; }
.history-item .top .ico {
  position: relative;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--success-soft); color: var(--success);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.history-item .top .ico.has-unread .unread-dot {
  position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #ff3b30; box-shadow: 0 0 0 2px var(--card);
}
.history-item .top .meta { flex: 1; min-width: 0; }
.history-item .top h4 { font-size: 15px; font-weight: 700; margin: 0; }
.history-item .subj-name-row { margin-top: 1px; }
.history-item .top .sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.history-item .top .status-pill {
  font-size: 11px; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--success-soft); color: var(--success); font-weight: 600; flex-shrink: 0;
}
.history-item .top .status-pill.gen {
  background: var(--warn-soft); color: var(--warn-2);
}
.history-item .top .times-pill {
  height: 20px; display: inline-flex; align-items: center; padding: 0 8px;
  font-size: 11px; border-radius: var(--r-pill);
  background: var(--bg-soft); color: var(--text-2); font-weight: 600; flex-shrink: 0;
}
.history-item .top .times-del {
  flex-shrink: 0; width: 20px; height: 20px; padding: 0;
  border: none; border-radius: var(--r-pill);
  background: var(--bg-soft); color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.history-item .top .times-del:active { background: var(--line); }
.dup-tag {
  display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0;
  height: 20px; padding: 0 8px; border-radius: 999px;
  font-size: 10px; font-weight: 600; line-height: 1; white-space: nowrap;
  color: var(--warn-2); background: var(--warn-soft);
}
.dup-tag svg { width: 10px; height: 10px; color: var(--warn-2); }
.history-item[data-go] { cursor: pointer; }
.history-item.is-generating { cursor: default; }
.history-item .footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; font-size: 12px; color: var(--text-2);
}
.history-item .footer.muted { color: var(--text-3); }
.history-item .view { color: var(--primary); font-weight: 600; }
.history-item .gen-tip { color: var(--text-3); }

/* ============================== 15. 剩余测评次数 ============================== */
.usage-hero {
  margin: 12px 16px 0; padding: 22px 20px;
  background: linear-gradient(135deg, #FFE7D5 0%, #FCD8B4 100%);
  border-radius: var(--r-lg); text-align: center;
}
.usage-hero .crown {
  width: 60px; height: 60px; margin: 0 auto 12px;
  background: var(--warn-soft); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--warn-2);
}
.usage-hero .num { font-size: 38px; font-weight: 700; color: var(--warn-2); line-height: 1; }
.usage-hero .num small { font-size: 14px; color: var(--text-2); margin-left: 4px; }
.usage-hero .lbl { color: var(--text-2); font-size: 13px; margin-top: 6px; }

.usage-bar { margin: 16px 16px 4px; }
.usage-bar .labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.usage-bar .labels strong { color: var(--warn-2); }
.usage-bar .track { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; }
.usage-bar .fill { height: 100%; background: linear-gradient(90deg, #FB923C, #F97316); border-radius: 4px; }

.usage-title { padding: 20px 16px 8px; display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; }
.usage-title .count { color: var(--text-2); font-size: 13px; font-weight: 400; }
.usage-table { margin: 0 16px 16px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.usage-table .row {
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
}
.usage-table .row:last-child { border-bottom: none; }
.usage-table .ico {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--warn-soft); color: var(--warn-2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.usage-table .name { font-weight: 600; font-size: 14px; }
.usage-table .sub { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.usage-table .right { color: var(--warn-2); font-weight: 700; font-size: 13px; }

/* Insufficient popup (bottom sheet) */
.popup-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.4);
  display: none; align-items: flex-end; justify-content: center;
}
.popup-overlay.show { display: flex; }
.popup-sheet {
  width: 100%; max-width: 480px;
  background: var(--card); border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 32px 24px 28px;
  text-align: center;
  animation: sheetUp 0.25s ease-out;
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.popup-sheet-text {
  font-size: 16px; font-weight: 500; color: var(--text-1);
  margin-bottom: 28px; line-height: 1.6;
}
.popup-sheet-actions {
  display: flex; gap: 12px;
}
.popup-sheet-actions .btn {
  flex: 1; height: 44px; border-radius: var(--r);
  font-size: 15px; font-weight: 500; border: none; cursor: pointer;
}
.popup-sheet-actions .btn-cancel {
  background: var(--bg-soft); color: var(--text-2);
}
.popup-sheet-actions .btn-primary {
  color: #fff;
}

/* ============================== 16. 测评对象管理 ============================== */
.subject-card.manage {
  flex-direction: column; align-items: flex-start;
  padding: 14px; padding-right: 14px;
}
.subject-card.manage .head-row { display: flex; align-items: center; gap: 12px; width: 100%; }
.subject-card.manage .extras { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-top: 10px; font-size: 12px; color: var(--text-2); width: 100%; }
.subject-card.manage .extras span b { color: var(--text); font-weight: 500; margin-left: 4px; }
.subject-card.manage .actions { display: flex; gap: 8px; margin-top: 12px; width: 100%; }
.subject-card.manage .actions button { flex: 1; height: 32px; border-radius: var(--r); font-size: 13px; font-weight: 500; }
.subject-card.manage .actions .ed { background: var(--primary-soft); color: var(--primary); }
.subject-card.manage .actions .de { background: var(--bg-soft); color: var(--text-2); }
.subject-card.manage .default-tag { padding: 2px 8px; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 600; }
.subject-card.manage .set-def { font-size: 12px; color: var(--text-3); }

#subjectsList { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
.add-new-card {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 60px; border: 1.5px dashed var(--line); border-radius: var(--r-lg);
  color: var(--text-3); font-size: 13px; margin-top: 8px;
  background: transparent;
}

/* ============================== 17. 设置 ============================== */
.setting-group { margin: 12px 16px; }
.setting-group .group-name { font-size: 12px; color: var(--text-2); padding: 8px 4px; }
.setting-group .card { padding: 0 16px; }
.setting-group .item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.setting-group .item:last-child { border-bottom: none; }
.setting-group .item .ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.setting-group .item .name { flex: 1; font-weight: 600; }
.setting-group .item .val { color: var(--text-2); font-size: 13px; }
.logout-btn {
  display: block; margin: 24px 16px;
  padding: 14px; border: 1px solid var(--danger); color: var(--danger);
  border-radius: var(--r-pill); text-align: center; font-weight: 600;
}

/* ============================== 模态框：添加汉字 ============================== */
.modal-mask {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 50;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; width: 100%;
  border-top-left-radius: 20px; border-top-right-radius: 20px;
  padding: 16px 16px 28px; max-height: 80%;
  overflow-y: auto;
  animation: slideUp .25s;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-mask#confirmMask { align-items: center; padding: 0 24px; }
.confirm-modal { width: 100%; max-width: 320px; margin: auto; border-radius: 16px; padding: 22px 20px 18px; text-align: center; }
.confirm-msg { font-size: 15px; color: var(--text); line-height: 1.6; margin-bottom: 18px; }
.confirm-actions { display: flex; gap: 12px; }
.confirm-actions .btn { flex: 1; height: 44px; border-radius: var(--r); }
.modal .m-title { font-weight: 700; font-size: 17px; }
.modal .m-close { float: right; color: var(--text-3); background: var(--bg-soft); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.modal .seg { display: flex; margin-top: 14px; }
.modal .pad {
  margin-top: 12px; border: 1.5px dashed var(--line); border-radius: var(--r-lg);
  min-height: 160px; padding: 16px;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  color: var(--text-3); gap: 8px; font-size: 13px;
}
.modal .pad.typing { background: var(--primary-soft); color: var(--primary); font-size: 28px; font-weight: 600; }
.modal .pad-tools { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.modal .tool-chip { padding: 6px 12px; background: var(--bg-soft); border-radius: var(--r); font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.modal .added { margin-top: 14px; }
.modal .added .hd { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.modal .added .b { color: var(--primary); font-weight: 600; }
.modal .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.modal .chip {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--success-soft); color: #16A34A; border-radius: var(--r);
  position: relative; border: 1px solid #BBF7D0;
}
.modal .chip .x {
  position: absolute; top: -6px; right: -6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--danger); color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}
.modal .m-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal .m-actions .btn { flex: 1; }

/* ============================== 字心说 · 文章专栏 ============================== */
.zxs-brand { font-family: var(--font-serif); font-size: 19px; font-weight: 700; color: var(--primary); letter-spacing: 3px; }

/* 列表页 */
.zxs-list { padding: 12px 16px 80px; display: flex; flex-direction: column; gap: 12px; }
.zxs-item {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px;
  box-shadow: var(--sh-sm); cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.zxs-item:active { transform: scale(.985); box-shadow: var(--sh); }
.zxs-info { flex: 1; min-width: 0; }
.zxs-title {
  font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.42;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.zxs-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; line-height: 1.4; color: var(--text-3); }
.zxs-date { white-space: nowrap; }
.zxs-read { margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; }
.zxs-tag { color: var(--primary); background: var(--primary-soft); padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.zxs-arrow { flex: 0 0 auto; color: var(--text-3); }
.zxs-eye { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; color: var(--text-3); }

/* 田字格（列表左侧 + 文章头图） */
.zxs-tianzi {
  position: relative; flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: 0;
  background-color: #fff;
  border: 1.5px solid rgba(200,22,29,0.45);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23B0B0B0' stroke-width='1' stroke-dasharray='3 3' vector-effect='non-scaling-stroke'%3E%3Cline x1='50' y1='5' x2='50' y2='95'/%3E%3Cline x1='5' y1='50' x2='95' y2='50'/%3E%3Cline x1='9' y1='9' x2='91' y2='91'/%3E%3Cline x1='91' y1='9' x2='9' y2='91'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100% 100%; background-repeat: no-repeat;
  display: grid; place-items: center; overflow: hidden;
}
.zxs-char { font-family: var(--font-serif); font-size: 28px; font-weight: 600; color: var(--primary); line-height: 1; }
.zxs-tianzi.lg { width: 52px; height: 52px; border-radius: 0; }
.zxs-tianzi.lg .zxs-char { font-size: 34px; }

/* 文章详情页 */
.zxs-article { padding: 16px 18px 48px; }
.zxs-hero {
  display: flex; gap: 16px; align-items: flex-start;
  padding-bottom: 18px; margin-bottom: 16px; border-bottom: 1px solid var(--line-soft);
}
.zxs-hero-meta { flex: 1; min-width: 0; }
.zxs-title-lg { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.4; }
.zxs-hero .zxs-meta { margin-top: 6px; }
.zxs-para {
  font-size: 15px; line-height: 1.95; color: var(--text-2);
  margin: 0 0 16px; text-indent: 2em; text-align: justify;
}
.zxs-foot { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 14px; letter-spacing: 1px; }

/* ============================================================
 *  测前必读（大字阅读页）
 * ============================================================ */
.read-screen {
  flex: 1; display: flex; flex-direction: column;
  height: 100%; padding: 0 0 12.5vh; min-height: 0;
}
.read-carousel { flex: 1; overflow: hidden; position: relative; }
.read-track { display: flex; height: 100%; transition: transform .3s ease; }
.read-slide {
  flex: 0 0 100%; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 30px; box-sizing: border-box;
}
.read-big {
  font-family: var(--font-serif);
  font-size: 20px; line-height: 1.85; color: var(--text);
  margin: 0 0 18px; text-align: center;
}
.read-big:last-child { margin-bottom: 0; }
.read-big b { color: var(--primary); font-weight: 700; }
.read-dots { display: flex; justify-content: center; gap: 8px; padding: 12px 0 6px; }
.read-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: #D9D2D2; transition: all .25s; }
.read-dots .dot.active { background: var(--primary); transform: scale(1.4); }
.read-action { padding: 12px 20px 16px; }
.read-action .btn { width: 100%; }

/* ============================================================
 *  填写汉字界面（6×5 输入框 + 模拟键盘）
 * ============================================================ */
.fill-screen { flex: 1; min-height: 0; overflow: hidden; padding: 16px 14px 22px; }
/* 填写屏永不滚动：键盘浮层 translateY(100%) 会越界，由本屏 overflow:hidden 裁掉 */
#screen-fill { overflow: hidden; }
.fill-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
}
.fill-screen.kbd-open { padding-bottom: 300px; }
.fill-box {
  position: relative; aspect-ratio: 1 / 1;
  border: 1.5px solid var(--line); border-radius: 9px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.fill-box .fill-idx {
  position: absolute; top: 3px; left: 5px;
  font-size: 9px; color: var(--text-3);
}
.fill-box .fill-char { font-family: var(--font-serif); font-size: 16px; font-weight: 600; color: var(--text); line-height: 1; }
.fill-box.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.fill-box.selected::after {
  content: ''; width: 2px; height: 46%;
  background: var(--primary); border-radius: 1px;
  animation: caret-blink 1s steps(1, end) infinite;
}
@keyframes caret-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.fill-box.locked { background: #F5F6F8; border-color: #E6E8EC; cursor: not-allowed; }
.fill-box.locked .fill-idx { color: #C3C8D0; }
.fill-box.filled { background: #FBE3E4; border-color: #F4C2C4; }
.fill-box.filled .fill-char { display: none; }
.fill-box.filled .fill-idx { display: none; }
.fill-box .fill-check {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
}
.fill-box .fill-check svg { color: var(--primary); width: 16px; height: 16px; }
.fill-box.filled .fill-check { display: flex; }

/* 模拟键盘：底部浮出面板 */
.kbd-wrap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #eef0f4; border-top-left-radius: 18px; border-top-right-radius: 18px;
  box-shadow: 0 -6px 22px rgba(0,0,0,.14);
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  animation: kbd-pop .25s ease;
}
@keyframes kbd-pop { from { transform: translateY(100%); } to { transform: none; } }
.kbd-bar { width: 38px; height: 4px; border-radius: 2px; background: #c7ccd6; margin: 2px auto 8px; }
.mock-kbd { display: flex; flex-direction: column; gap: 8px; }
.kbd-row { display: flex; gap: 6px; justify-content: center; }
.kbd-row span {
  flex: 1; max-width: none; height: 46px; border-radius: 8px;
  background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #555; font-weight: 600;
}
.kbd-row.kbd-fn span { max-width: none; flex: 1; }
.kbd-row .space { flex: 3; }
.kbd-row .enter { flex: 2; background: #cdd2dc; }
.kbd-fill-btn { width: 100%; margin-top: 10px; font-size: 17px; }
.fill-submit { margin-top: 16px; }
.fill-submit .btn { width: 100%; }

/* 顺序提示 toast */
.fill-toast {
  position: fixed; left: 50%; bottom: 30%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff;
  padding: 9px 16px; border-radius: 10px;
  font-size: 13px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease; z-index: 60;
}
.fill-toast.show { opacity: 1; }

/* ============================================================
 *  微信网页版登录弹窗
 * ============================================================ */
.login-modal { position: relative; max-width: 320px; text-align: center; padding: 28px 22px 22px; }
.login-close { position: absolute; top: 12px; right: 12px; }
.login-modal-brand { margin-bottom: 22px; }
.wx-badge {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px;
  background: #07C160; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(7,193,96,.3);
}
.login-modal-title { font-size: 19px; font-weight: 700; color: var(--text); }
.login-modal-sub { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.login-form { margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.login-field input {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--border, #e0e0e0); border-radius: 10px;
  font-size: 15px; color: var(--text); background: var(--bg-soft, #f7f7f7);
  outline: none; box-sizing: border-box;
}
.login-field input:focus { border-color: var(--primary); background: #fff; }
.login-wx-btn {
  width: 100%; background: #07C160; color: #fff; border: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 600; padding: 13px; border-radius: 12px;
}
.login-wx-btn:active { background: #06ad56; }
.login-modal-agree { font-size: 11px; color: var(--text-3); margin: 14px 0 0; }

/* ============================================================
 *  获取测评次数 / 详情 / 意见反馈
 * ============================================================ */

/* 首页剩余次数 · 红色获取入口 */
.get-count-link { color: var(--primary); font-weight: 700; cursor: pointer; margin-left: 6px; font-size: 13px; }

/* 个人中心 · 微信头像 / 红点 / 获取 */
.wechat-avatar {
  width: 54px; height: 54px; border-radius: 6px;
  background: var(--bg-soft, #f0f0f0); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.wechat-avatar.empty {
  background: var(--bg-soft, #f0f0f0);
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vip-badge {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 8px; min-width: 30px; height: 17px; padding: 0 6px;
  border-radius: 4px; font-size: 10px; font-weight: 800; letter-spacing: .5px;
  color: #B7BCC4; background: #F2F3F5; border: 1px solid #E5E7EB;
}
/* 已认证身份标记（VIP 之后展示） */
.cert-badge {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 8px; height: 17px; padding: 0 6px;
  border-radius: 4px; font-size: 10px; font-weight: 800; letter-spacing: .5px;
  color: #C8161D; background: #FBE7E8; border: 1px solid #F5C2C4;
}
/* 个人中心 · ID 下方 VIP 状态文案 */
.vip-status { font-size: 12px; margin-top: 6px; line-height: 1.4; }
.vip-status.off { color: var(--primary); font-weight: 600; cursor: pointer; }
.vip-status.on  { color: var(--text-3); }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 2px #fff; margin-right: 2px; }
.get-link { color: var(--primary); font-weight: 700; font-size: 13px; margin-right: 2px; }

/* 个人资料编辑 */
.profile-edit-screen { padding: 20px 16px; }
.profile-edit-screen .field { margin-bottom: 18px; }
.text-input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); color: var(--text); font-size: 15px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.text-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.btn-logout {
  margin-top: 10px; height: 46px; border-radius: var(--r-pill);
  background: var(--danger-soft); color: var(--danger);
  font-weight: 600; font-size: 15px; width: 100%;
}
.btn-logout:active { filter: brightness(.96); }

/* 获取次数主列表 */
.getcount-screen { padding: 16px 14px 24px; }
.getcount-tip { font-size: 14px; color: var(--text-2); text-align: center; margin: 6px 0 18px; line-height: 1.6; }
.getcount-list { display: flex; flex-direction: column; gap: 12px; }
.getcount-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px 16px;
  box-shadow: var(--sh-sm); cursor: pointer; transition: transform .12s ease;
}
.getcount-item:active { transform: scale(.98); }
.gc-ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.gc-meta { flex: 1; min-width: 0; }
.gc-name { font-size: 15px; font-weight: 600; color: var(--text); }
.gc-desc { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.getcount-item .arrow { color: var(--text-3); flex: 0 0 auto; }

/* 获取详情通用 */
.getdetail-screen { padding: 20px 18px 32px; display: flex; flex-direction: column; align-items: center; }
.mock-qr { width: 180px; height: 180px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-sm); margin: 8px 0 18px; }
.mock-qr svg { display: block; width: 100%; height: 100%; }
.gd-tip { font-size: 14px; color: var(--text-2); line-height: 1.8; text-align: left; width: 100%; }
.gd-foot { font-size: 11px; color: var(--text-3); margin-top: 16px; text-align: center; }

/* 分享获取 */
.share-stats { display: flex; gap: 12px; width: 100%; margin: 18px 0 22px; }
.ss-card { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 10px; text-align: center; box-shadow: var(--sh-sm); }
.ss-n { font-size: 26px; font-weight: 800; color: var(--primary); }
.ss-l { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.gd-share-btn { width: 100%; }

/* 意见反馈 */
.feedback-screen { padding: 18px 16px 24px; }
.feedback-tip { font-size: 14px; color: var(--text-2); text-align: center; margin-bottom: 16px; line-height: 1.6; }
.feedback-textarea {
  width: 100%; min-height: 150px; resize: none;
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  font-size: 14px; color: var(--text); line-height: 1.6; font-family: inherit;
  background: var(--card); box-sizing: border-box;
}
.feedback-textarea:focus { outline: none; border-color: var(--primary); }
.feedback-screen .btn { width: 100%; margin-top: 18px; }

/* 通用 toast */
.app-toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,.8); color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: 14px; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s ease;
  max-width: 80%; text-align: center;
}
.app-toast.show { opacity: 1; }
