/* ========================================================================
   小麦读书 · 品牌主题样式（多巴胺配色 · 儿童化设计 · 小麦 IP）
   ------------------------------------------------------------------------
   ⚠️ 2026-09-20：网页版学生端（read/login/history）已下线，本文件现存两重身份：
     ① 老师后台 /admin.html 的样式表（唯一线上消费者）；
     ② .selfcheck/mp-parity.js 的 H5 侧样式基准 —— 标注「read.html 专用」的段落
        仍参与契约比对，**不要当死代码删掉**（删了门禁会红）。
   ⚠️ 2026-10-05 全量引用链核对（.selfcheck/css-ref-chain.js）：还有第三重身份——
     ③ .frozen-h5/ 冻结存档（read/history/login，勿改勿删）仍直接 <link> 本文件。
     275 个类中约 186 个在现役两页（admin/index）零引用，但绝大多数被冻结存档或
     mp-parity 契约使用；**真正全项目零引用的只有约 18 个**（admin-tbl、ti-icon、
     user-badge 等），删除收益几 KB、误删风险是冻结页裸奔 → 结论：本文件不做
     「死样式清理」，未来要动必须先跑 css-ref-chain.js 核对引用链。
   ======================================================================== */

:root {
  /* 品牌主色 —— 亮蓝+明黄（参考 Lexiaoshi English 风格） */
  --primary: #3D6DF2;           /* 亮蓝主色 */
  --primary-light: #B9CCFF;
  --primary-dark: #2A52C4;
  --secondary: #FFC53D;          /* 明黄点缀 */
  --accent-yellow: #FFC53D;      /* 阳光黄 */
  --accent-mint: #4ECDC4;        /* 薄荷青 */
  --accent-blue: #5BB6FF;        /* 天空蓝 */
  --accent-lavender: #A78BFA;    /* 薰衣紫 */
  --accent-lime: #A8E063;        /* 嫩芽绿 */
  --accent-coral: #FF6B6B;       /* 珊瑚红 */

  /* ===== 核心纯色调色板（所有页面统一） =====
     改这里一处，全站生效；不要写内联渐变。 */
  --blue-deep:   #1E3A8A;   /* 深蓝：勋章面板背景 / 进度条未达段 */
  --orange-deep: #3D6DF2;   /* 历史页 hero 背景 / 主题强调（现为主蓝） */
  --gold:        #FFC53D;   /* 金黄：进度条已得段 / 星星数 / 等级强调 */
  --gray-soft:   #9CA3AF;   /* 灰：默认头像底色 */

  /* 中性色 */
  --success: #4ECDC4;
  --warning: #FFC53D;
  --danger:  #FF6B6B;
  --info:    #5BB6FF;
  --bg:      #EEF2FB;            /* 淡紫蓝底 */
  --bg-soft: #F7F9FD;
  --card-bg: #FFFFFF;
  --text:    #1F2849;
  --text-light: #6B7280;
  --text-muted: #9CA3AF;
  --border:  #E2E8F6;
  --border-strong: #CBD6EE;

  /* 阴影：彩色辉光效果 */
  --shadow:        0 4px 14px rgba(61, 109, 242, 0.12);
  --shadow-hover:  0 8px 28px rgba(61, 109, 242, 0.20);
  --shadow-pop:    0 12px 32px rgba(255, 197, 61, 0.20);

  --radius:        22px;     /* 主圆角，斑马风 */
  --radius-sm:     14px;
  --radius-pill:   999px;

  --transition:    all 0.25s ease;
}

/* ============== 基础重置 ============== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: ui-rounded, "MiSans", "Yuanti SC", "YouYuan", "Varela Round", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* 模拟手机状态栏（顶部刘海），斑马风格 */
.app-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 18px 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
}
.app-status-bar .right { display: flex; gap: 6px; align-items: center; }
.app-status-bar .battery {
  border: 1.5px solid var(--text);
  border-radius: 4px; padding: 1px 4px; font-size: 10px;
}

/* ============== 登录页（全新设计） ============== */
.login-page {
  min-height: 100vh;
  background: #EEF2FB;
  padding: 30px 24px 40px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; top: 50px; right: -40px;
  width: 140px; height: 140px;
  filter: blur(20px);
  opacity: 0.5;
  z-index: 0;
}
.login-page::after {
  content: '';
  position: absolute; bottom: 80px; left: -50px;
  width: 160px; height: 160px;
  filter: blur(20px);
  opacity: 0.4;
  z-index: 0;
}

.login-card {
  max-width: 460px;
  margin: 30px auto;
  padding: 36px 28px 32px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(61, 109, 242, 0.18);
  position: relative;
  z-index: 1;
}

.login-logo-wrap {
  text-align: center;
  margin-bottom: 18px;
  position: relative;
}
.login-logo-wrap img.brand-logo {
  height: 110px; width: auto;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(31, 40, 73, 0.20);
}
.login-logo-wrap .ip-helper {
  position: absolute;
  right: -16px; top: -8px;
  width: 76px; height: auto;
  transform: rotate(8deg);
  filter: drop-shadow(0 4px 12px rgba(255, 197, 61, 0.3));
  animation: ipBounce 2.4s ease-in-out infinite;
}
@keyframes ipBounce {
  0%, 100% { transform: rotate(8deg) translateY(0); }
  50%      { transform: rotate(8deg) translateY(-6px); }
}
.login-card h1 {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(135deg, #3D6DF2 0%, #2A52C4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.login-card .subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 22px;
}

.login-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.login-badges span {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}
.login-badges span:nth-child(1) { background: #E8EFFF; color: #3D6DF2; }
.login-badges span:nth-child(2) { background: #FFF4D6; color: #C88A00; }
.login-badges span:nth-child(3) { background: #E8EFFF; color: #2A52C4; }

.input-group { margin-bottom: 16px; }
.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}
.input-group input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}
.input-group input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(61, 109, 242, 0.12);
}

.error-msg {
  background: #FFE6E6;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.error-msg.show { display: block; }

.btn-primary {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--secondary);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(61, 109, 242, 0.35);
  transition: var(--transition);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(61, 109, 242, 0.45); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.test-accounts {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-strong);
}
.test-accounts p {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}
.test-accounts .account {
  display: inline-block;
  margin: 4px 4px 0 0;
  padding: 6px 12px;
  background: #FFF4D6;
  color: #B45309;
  border-radius: var(--radius-pill);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.test-accounts .account:hover { transform: scale(1.05); }
.test-accounts .account.autumn {
  background: #E0F8F6;
  color: #0E9B8F;
  border: 1.5px solid #4ECDC4;
}
.test-accounts .account.first-login {
  background: #F3E8FF;
  color: #7C3AED;
  border: 1.5px dashed #A78BFA;
}

/* ============== 应用通用框架 ============== */
.read-page {
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 90px; /* 给底部 Tab 留位置 */
}

/* 顶部品牌头（仿手机状态栏+品牌条）：真机上有系统状态栏，属冗余装饰 → 全站隐藏 */
.page-header { display: none !important; }
.page-header {
  background: linear-gradient(135deg, #3D6DF2 0%, #2A52C4 100%);
  padding: 0;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(61, 109, 242, 0.30);
}
.page-header .app-status-bar { color: #fff; }
.page-header .app-status-bar .battery { border-color: #fff; }
.page-header .brand-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px 16px;
}
.page-header .brand-bar .logo-wrap {
  display: flex; align-items: center; gap: 10px;
}
.page-header .brand-bar .logo-wrap img {
  height: 38px; width: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.page-header .brand-bar .brand-name {
  font-size: 18px; font-weight: 800; letter-spacing: 0.5px;
}
.page-header .brand-bar .user-info {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.2);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.page-header .brand-bar .user-info .avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

/* 容器 */
.container {
  max-width: 540px;
  margin: 0 auto;
  padding: 18px;
}

/* 区域标题 */
.section-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* （旧的 .welcome-banner 样式已废弃，被 .medal-panel 取代） */

/* 多巴胺分类Tab（彩色pill） */
.dopa-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 14px 0 18px;
  padding: 4px 2px;
  scrollbar-width: none;
}
.dopa-tabs::-webkit-scrollbar { display: none; }
.dopa-tab {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
  color: var(--text-light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.dopa-tab.active {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.dopa-tab[data-color="1"].active { background: var(--secondary); }
.dopa-tab[data-color="2"].active { background: var(--primary); }
.dopa-tab[data-color="3"].active { background: #F59E0B; }
.dopa-tab[data-color="4"].active { background: #8B5CF6; }
.dopa-tab[data-color="5"].active { background: #84CC16; }

/* ============== 书卡（新设计） ============== */
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.book-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.book-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--secondary);
}
.book-card[data-color="1"]::before { background: var(--secondary); }
.book-card[data-color="2"]::before { background: #14B8A6; }
.book-card[data-color="3"]::before { background: #F59E0B; }
.book-card[data-color="4"]::before { background: #8B5CF6; }
.book-card[data-color="5"]::before { background: #84CC16; }
.book-card[data-color="6"]::before { background: #EF4444; }
.book-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.12); }
.book-card .book-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  margin-bottom: 10px;
}
.book-card[data-color="1"] .book-icon { background: #E8EFFF; }
.book-card[data-color="2"] .book-icon { background: #E0F8F6; }
.book-card[data-color="3"] .book-icon { background: #FFF4D6; }
.book-card[data-color="4"] .book-icon { background: #F0E6FF; }
.book-card[data-color="5"] .book-icon { background: #EEFBE0; }
.book-card[data-color="6"] .book-icon { background: #FFE6E6; }
.book-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-card .book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 10px;
}
.book-card .book-meta span {
  background: var(--bg-soft);
  padding: 3px 8px;
  border-radius: 8px;
}
.book-card .book-type-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}
.book-card .chip-qa {
  background: #E0F2FF;
  color: #1E88E5;
}
.book-card .chip-rec {
  background: #FFF4D6;
  color: #B45309;
}
.book-card button {
  width: 100%;
  padding: 9px;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}
.book-card[data-color="1"] button { background: var(--secondary); }
.book-card[data-color="2"] button { background: #14B8A6; }
.book-card[data-color="3"] button { background: #F59E0B; }
.book-card[data-color="4"] button { background: #8B5CF6; }
.book-card[data-color="5"] button { background: #84CC16; }
.book-card[data-color="6"] button { background: #EF4444; }
.book-card button:hover { transform: scale(1.02); }

/* ============== 朗读卡片 ============== */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.reading-text {
  /* 首选内置霞鹜文楷（手机无楷体字体时兜底），再退本机楷体 */
  font-family: "LXGW WenKai Lite", "Kaiti SC", "STKaiti", KaiTi, "楷体", "FZKai-Z03S", "BiauKai", serif;
  font-size: 19px;
  line-height: 2.15;
  background: transparent;
  border-radius: 0;
  padding: 6px 4px;
  color: var(--text);
  /* 长文处理：卡片内滚动，配合识别高亮自动定位 */
  max-height: 52vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  /* 隐藏滚动条（含 Windows 箭头），移动端靠高亮自动定位无需拖动 */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.reading-text::-webkit-scrollbar { display: none; width: 0; height: 0; }

.reading-text p {
  margin: 0 0 14px;
  text-indent: 2em;
}

.reading-text p:last-child {
  margin-bottom: 0;
}

/* 逐句识别变色（提交评分后） */
.rd-sent { transition: background .4s, color .4s; border-radius: 6px; padding: 1px 2px; }
.rd-sent.sent-read { background: #E8F8EE; color: #1E7A46; }
.rd-sent.sent-mid  { background: #FFF4D6; color: #8A5500; }
.rd-sent.sent-miss { background: #FDECEC; color: #B03A2E; box-shadow: inset 0 -2px 0 #E8837B; }

/* ============== 背诵书目结构化展示 ==============
   突出词语（圆角词条、一排多个）与句子（整行卡片）；解释弱化（词条内小字）；
   作者弱化右对齐。判定只算词语+句子本身（rd-sent 只挂在它们身上） */
.rec-sec-title {
  font-size: 13px; font-weight: 800; color: var(--primary);
  letter-spacing: 1px; margin: 14px 2px 8px;
}
.rec-sec-title:first-child { margin-top: 2px; }
.rec-word-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.rec-word {
  display: inline-flex; flex-direction: column;
  background: #F0F4FF; border: 1.5px solid #DCE5FA;
  border-radius: 14px; padding: 7px 12px 6px;
  max-width: calc(50% - 4px); /* 手机屏下词语尽量两两同排，解释过长在词条内换行 */
  box-sizing: border-box;
  transition: background .4s, color .4s, border-color .4s;
}
.rec-word b { font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.3; }
.rec-word i { font-style: normal; font-size: 10px; color: var(--text-muted); line-height: 1.45; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* 词条读到变色：整体胶囊变色更醒目 */
.rec-word.sent-read { background: #E8F8EE; border-color: #A9DCBB; }
.rec-word.sent-read b, .rec-word.sent-read i { color: #1E7A46; }
.rec-word.sent-mid  { background: #FFF4D6; border-color: #F2C94C; }
.rec-word.sent-mid b, .rec-word.sent-mid i { color: #8A5500; }
.rec-word.sent-miss { background: #FDECEC; border-color: #F5B7AE; }
.rec-word.sent-miss b, .rec-word.sent-miss i { color: #B03A2E; }
.rec-word.s-read { background: #CDEFDA; border-color: #6FBF8F; }
.rec-word.s-read b, .rec-word.s-read i { color: #176B3D; }
.rec-word.s-cur  { background: #FFE9A8; border-color: #F2C94C; }
.rec-word.s-cur b, .rec-word.s-cur i { color: #7A5300; }

.rec-line { margin: 0 0 10px; }
.rec-sent {
  display: block; background: #F7F9FE; border: 1.5px solid #E4EAF6;
  border-radius: 12px; padding: 10px 14px;
  font-size: 16px; line-height: 1.8; color: var(--text); font-weight: 600;
}
.rec-sent.sent-read { background: #E8F8EE; border-color: #A9DCBB; }
.rec-sent.sent-mid  { background: #FFF4D6; border-color: #F2C94C; }
.rec-sent.sent-miss { background: #FDECEC; border-color: #F5B7AE; }
.rec-sent.s-read { background: #CDEFDA; border-color: #6FBF8F; }
.rec-sent.s-cur  { background: #FFE9A8; border-color: #F2C94C; }

.rec-author {
  text-align: right; font-size: 12px; color: var(--text-muted);
  margin: -6px 4px 12px 0; font-weight: 400;
}
/* 朗读中实时逐句变色：绿=这句已经读到；琥珀=正在读/下一个要读的目标 */
.rd-sent.s-read { background: #CDEFDA; color: #176B3D; box-shadow: inset 0 -1.5px 0 #6FBF8F; }
.rd-sent.s-cur  { background: #FFE9A8; color: #7A5300; box-shadow: 0 0 0 1.5px #F2C94C inset; animation: curPulse 1.6s ease-in-out infinite; }
@keyframes curPulse {
  0%, 100% { box-shadow: 0 0 0 1.5px #F2C94C inset; }
  50%      { box-shadow: 0 0 0 3px #F7B955 inset; }
}

/* ========== 朗读阶段：整页蓝底 + 白卡（参考课表风格） ========== */
body.reading-stage {
  background: linear-gradient(180deg, #3D6DF2 0%, #2A52C4 60%, #24449F 100%);
  background-attachment: fixed;
}
/* read-page 自带浅色底，会盖住 body 渐变，朗读阶段需透明 */
body.reading-stage .read-page { background: transparent; }
body.reading-stage #stage-read .section-title { color: #fff; }
body.reading-stage #stage-read .btn.btn-secondary {
  background: rgba(255, 255, 255, 0.94);
  color: #2A52C4;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(10, 25, 80, 0.25);
}
/* 蓝底上的课文卡：白色圆角大卡，文字直接放里面 */
body.reading-stage #stage-read .reading-card {
  box-shadow: 0 8px 28px rgba(10, 25, 80, 0.28);
}
body.reading-stage .recorder {
  box-shadow: 0 8px 28px rgba(10, 25, 80, 0.28);
}

/* 学习记录页/得分页：整页锁定一屏，仅中间内容区内部滚动（底部 Tab 固定不动）。
   body 用 position:fixed 硬锁，iOS 橡皮筋回弹也动不了整页 */
body.hist-fixed,
body.result-stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.hist-fixed .read-page,
body.result-stage .read-page {
  flex: 1;
  min-height: 0; /* flex 链关键：允许被压缩，内容区才能内部滚动 */
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
body.hist-fixed .container,
body.result-stage .container {
  flex: 1;
  min-height: 0;
  min-width: 0; /* flex 项关键：内部（趋势图等）的最小内容宽度不得撑破容器 */
  width: 100%; /* 关键：flex 项 margin:0 auto 会禁用 stretch 致收缩成内容宽（数据少时整页被压扁），必须显式铺满 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 100px; /* 底部 Tab 固定，内容区滚动到底不被遮挡 */
}

/* ========== 朗读阶段手机适配：整页锁定 + 课文区内滚 + 录音按钮悬浮 ========== */
/* 滑动口径：朗读阶段整页（body）不可滚动，唯一可滚的是课文文字区（内部滚动）；
   选书/问答/结果阶段保持整页正常滚动，不受影响。 */
body.reading-stage {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.reading-stage .read-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
body.reading-stage .page-header {
  position: static;
  flex-shrink: 0;
}
body.reading-stage .container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 10px;
}
body.reading-stage #stage-read {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.reading-stage #stage-read > div:first-child { flex-shrink: 0; }

/* 课文区：恢复白色卡片边框；占满剩余高度、仅内部滚动，悬浮按钮压在卡片上方 */
body.reading-stage #stage-read .reading-card {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin-bottom: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(10, 25, 80, 0.28);
  display: flex;
  flex-direction: column;
}
body.reading-stage #stage-read .reading-text {
  flex: 1;
  min-height: 0;
  height: auto;
  max-height: none;
  /* 底部预留：悬浮话筒层（bottom:92px + 按钮/提示高度）压在课文卡下沿，
     不预留的话最后两三行文字会被盖住滚不出来 */
  padding-bottom: 170px;
}

/* 录音区：悬浮在课文上方，只留按钮和提示（无卡片矩形） */
body.reading-stage #stage-read .recorder {
  position: fixed;
  left: 50%;
  bottom: 92px; /* 底部 Tab 导航上方 */
  transform: translateX(-50%);
  z-index: 60;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  /* 显式宽度：fixed+width:auto 会收缩成内容宽，配合 flex-wrap 会把话筒挤到第二行 */
  width: min(92vw, 480px);
}
/* 悬浮区：提示文字与话筒按钮同行（文字在左、按钮在右） */
body.reading-stage #stage-read .recorder #recordSection {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  /* 一行放不下时状态胶囊自动换到第二行，不再被挤成竖条 */
  flex-wrap: wrap;
  row-gap: 6px;
}
body.reading-stage #stage-read .recorder #readHint {
  display: inline-block;
  flex: none; /* 不被压缩，文字单行铺开 */
  white-space: nowrap;
  font-size: 11px !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  background: rgba(16, 35, 90, 0.55);
  border-radius: 999px;
  padding: 4px 12px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
/* 悬浮话筒按钮：整体缩小（原 110px → 56px） */
body.reading-stage #stage-read .recorder .record-btn {
  width: 56px;
  height: 56px;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(255, 197, 61, 0.5);
}
body.reading-stage #stage-read .recorder .record-btn img.record-ip {
  transform: scale(0.5);
}
body.reading-stage #stage-read .recorder .recording-timer {
  color: #fff;
  font-size: 12px;
  text-shadow: 0 2px 8px rgba(10, 25, 80, 0.45);
}
body.reading-stage #stage-read .recorder .recording-status {
  /* 朗读阶段默认隐藏（"准备好了就开始吧"不再展示），录音开始时由 JS 临时显示 */
  display: none;
  flex: none;            /* 不许被 flex 挤压：宁可整颗换行也不缩成竖条 */
  white-space: nowrap;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(16, 35, 90, 0.55);
  border-radius: 999px;
  padding: 3px 10px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
body.reading-stage .recorder #liveModeChip {
  flex: 1 1 100%; /* 独占一整行（配合容器 flex-wrap）：长提示自己换行，不挤压话筒行 */
  justify-content: center;
  text-align: center;
  max-width: 100%;
}

/* 录音完成面板：固定居中弹出（独立于悬浮录音区） */
body.reading-stage #recordDone {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 70;
  width: min(92vw, 420px);
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 24px 64px rgba(10, 25, 80, 0.45);
  max-height: 78vh;
  overflow-y: auto;
}
body.reading-stage #recordDone #recordDuration { color: var(--text-light) !important; }

/* 录音区 */
.recorder {
  text-align: center;
  background: #EEF2FB;
}
.record-btn {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  font-size: 44px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 197, 61, 0.45);
  transition: var(--transition);
  display: inline-flex; align-items: center; justify-content: center;
}
.record-btn:hover { transform: scale(1.05); }
.record-btn.recording {
  background: #EF4444;
  animation: recordPulse 1.2s ease-in-out infinite;
}
@keyframes recordPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(255, 107, 107, 0.45); }
  50%      { box-shadow: 0 10px 50px rgba(255, 107, 107, 0.75); }
}
.recording-timer {
  font-size: 24px; font-weight: 800; color: var(--primary);
  margin-top: 12px; font-variant-numeric: tabular-nums;
}
.recording-status {
  font-size: 14px; color: var(--text-light); margin-top: 6px;
}

/* ============== 问答面板 ============== */
.progress-bar {
  height: 8px;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-bar .fill {
  height: 100%;
  background: var(--secondary);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.question-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 2px solid var(--bg);
}
.question-header {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 16px;
}
.question-number {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px;
  flex-shrink: 0;
}
.question-text {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}
.question-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}
.type-factual   { background: #E0F2FF; color: #1E88E5; }
.type-comprehension { background: #E8EFFF; color: #3D6DF2; }
.type-open      { background: #FFF4D6; color: #B45309; }

.answer-input {
  width: 100%;
  min-height: 100px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: var(--transition);
}
.answer-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(61, 109, 242, 0.10);
}

.result-feedback {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 12px;
}
.result-correct { background: #E0F8F6; color: #0E9B8F; border-left: 4px solid #4ECDC4; }
.result-wrong   { background: #FFE6E6; color: #C04848; border-left: 4px solid #FF6B6B; }

.hint-box {
  background: #FFF4D6;
  border-left: 4px solid #FFC53D;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  color: #8A5500;
  margin-top: 10px;
}
/* AI 老师个性化引导：更醒目、更口语化 */
.ai-hint-box {
  background: linear-gradient(135deg, #F7F9FD 0%, #E8EFFF 100%);
  border-left: 4px solid #3D6DF2;
  border-radius: 14px;
  font-size: 16px;
  line-height: 1.7;
  color: #5A3A8A;
  padding: 14px 18px;
  box-shadow: 0 4px 14px rgba(61, 109, 242, 0.10);
}
.correct-answer {
  background: #F0F6FF;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-top: 10px;
}

/* 免提条 */
#hfBar {
  margin: 12px 0 10px;
  padding: 10px 14px;
  background: #E0F2FF;
  border-radius: 14px;
  font-size: 13px;
  border: 1px solid #5BB6FF;
}
#hfBar label { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
#hfBar b { color: #1E88E5; }

/* 音色条 */
#voiceBar {
  margin: 0 0 10px;
  padding: 8px 14px;
  background: var(--bg-soft);
  border-radius: 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========== 问答页（stage-qa，蓝黄主题统一） ========== */
.qa-progress-pill {
  background: #fff;
  border: 1.5px solid var(--border-strong);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.qa-score-card { padding: 18px 20px; }
.qa-score-top { display: flex; align-items: center; gap: 14px; }
.qa-score-avatar {
  width: 54px; height: 54px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(61, 109, 242, 0.18));
}
.qa-score-label { font-size: 13px; color: var(--text-light); }
.qa-score-value {
  font-size: 30px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.15;
}
/* AI 老师的话：暖金气泡（替代旧的紫色调） */
.qa-coach-say {
  background: linear-gradient(135deg, #FFF7E0, #FFFCF2);
  border: 1.5px solid #FFE1A0;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.7;
  color: #7A5200;
}
.qa-voice-bar {
  margin: 0 0 10px;
  padding: 8px 14px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.qa-mode-bar {
  padding: 8px 14px;
  background: #EDF3FE;
  border: 1.5px solid var(--primary-light);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text);
}

/* ============== 结果页（学习小结卡：蓝hero+星星弧+麦豆+白卡） ============== */
.result-wrap {
  position: relative;
  background: linear-gradient(180deg, #4D79F5 0%, #2A52C4 64%);
  border-radius: 26px;
  padding: 34px 18px 26px;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}
/* 装饰气泡圆 */
.result-wrap::before {
  content: '';
  position: absolute;
  top: -46px; left: -40px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.09);
}
.result-wrap::after {
  content: '';
  position: absolute;
  top: 30px; right: -50px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.result-hero {
  position: relative;
  /* 高于 result-card，保证麦豆头像压在白卡交界之上不被遮挡 */
  z-index: 2;
  padding-bottom: 46px;
  text-align: center;
}
/* 星星弧：中间高两边低，通用星星图（star-coin），未点亮为半透明白星 */
.result-stars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
}
.result-stars .rstar {
  width: 40px; height: 40px;
  object-fit: contain;
  /* 未点亮：银白暗星（去色提亮，保留星星浮雕） */
  filter: brightness(1.9) saturate(0.25);
  opacity: .5;
  transform: translateY(10px) rotate(-10deg);
}
.result-stars .rstar:nth-child(2), .result-stars .rstar:nth-child(4) {
  transform: translateY(3px) rotate(-4deg);
  width: 45px; height: 45px;
}
.result-stars .rstar:nth-child(3) {
  transform: translateY(0);
  width: 51px; height: 51px;
}
.result-stars .rstar:nth-child(4) { transform: translateY(3px) rotate(4deg); }
.result-stars .rstar:nth-child(5) { transform: translateY(10px) rotate(10deg); }
.result-stars .rstar.lit {
  opacity: 1;
  filter: drop-shadow(0 5px 10px rgba(30, 58, 138, 0.35)) drop-shadow(0 0 10px rgba(255, 197, 61, 0.5));
}
/* 麦豆头像：金边白圆，压在 hero 与白卡交界 */
.result-avatar {
  position: absolute;
  left: 50%; bottom: -46px;
  transform: translateX(-50%);
  width: 92px; height: 92px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--gold);
  box-shadow: 0 8px 22px rgba(30, 58, 138, 0.30);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}
.result-avatar img { width: 76%; object-fit: contain; }

.result-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  padding: 56px 20px 24px;
  text-align: center;
}
.result-card h2.result-title {
  font-size: 23px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.result-card h2.result-title #resultEmoji { font-size: 26px; }
.score-display {
  font-size: 68px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin: 18px 0 6px;
  text-shadow: 0 6px 18px rgba(61, 109, 242, 0.22);
  /* 数字再加粗：描边同色，视觉字重拉满 */
  -webkit-text-stroke: 2.4px var(--primary);
  paint-order: stroke fill;
}
.score-total-label {
  font-size: 14px;
  font-weight: 700;
  color: #7C93D8;
  letter-spacing: 4px;
  margin-bottom: 18px;
}
.score-breakdown {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
}
.score-item {
  background: #F5F8FF;
  border-radius: 16px;
  padding: 14px;
}
.score-item .label {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 4px;
}
.score-item .value {
  font-size: 30px;
  font-weight: 900;
  color: #F0A32A;
}
.summary-box {
  background: #F5F7FC;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  margin-bottom: 16px;
  line-height: 1.7;
}
.summary-box .summary-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.wechat-sent-notice {
  background: #E0F8F6;
  color: #0E9B8F;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

/* 按钮辅助色 */
.btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
  padding: 12px 24px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--border); }

.btn-success {
  background: #14B8A6;
  color: #fff;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.35);
}

.btn-large { padding: 16px 32px; font-size: 17px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ============== 历史记录 ============== */
/* --- 历史 Hero（橙色主题：参考图重做） --- */
.hist-hero {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(61, 109, 242, 0.25);
}
.hist-hero-bg {
  position: relative;
  background: var(--orange-deep);
  padding: 22px 22px 0 22px;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.hist-hero-title {
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 1px;
  margin: 6px 0 0;
  text-shadow: 0 2px 6px rgba(180, 60, 0, 0.25);
}
.hist-hero-ip {
  width: 134px;
  height: auto;
  margin-top: -10px;
  filter: drop-shadow(0 6px 14px rgba(120, 30, 0, 0.35));
  user-select: none;
}

/* 白色卡片压住橙色底 */
.hist-hero-card {
  background: #fff;
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: -8px;
  position: relative;
}

/* 用户行：头像 + 昵称 + 勋章 chip */
.hist-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hist-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gray-soft);
  color: #fff;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.hist-user-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hist-user-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.hist-medal-chip {
  display: inline-block;
  padding: 4px 12px;
  background: var(--orange-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.5px;
  width: fit-content;
  box-shadow: 0 2px 6px rgba(255, 75, 31, 0.35);
}

/* 三列统计（数字超大橙色） */
.hist-stats-3col {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background: #EEF2FB;
  border-radius: 16px;
  padding: 14px 8px;
  gap: 4px;
}
.hist-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  min-width: 0;
}
.hist-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: #5C5C66;
  white-space: nowrap;
}
.hist-stat-num {
  font-size: 36px;
  font-weight: 900;
  color: #FF5722;
  line-height: 1;
  font-family: "DIN Alternate", "PingFang SC", system-ui, sans-serif;
}
.hist-divider {
  width: 1px;
  background: #E8C9B5;
  margin: 6px 0;
}

/* 星星币行 */
.hist-coins-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px 0;
}
.hist-coin {
  width: 28px; height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(255, 165, 0, 0.4));
}
.hist-coins-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.hist-coins-num {
  font-size: 18px;
  font-weight: 800;
  color: #F7A600;
}

/* 进度条 + 大勋章图 */
.hist-progress-wrap {
  position: relative;
  padding-right: 86px; /* 给右边勋章留位 */
  margin-top: 2px;
}
.hist-progress {
  width: 100%;
  height: 14px;
  background: #E5E5EA;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}
.hist-progress-bar {
  height: 100%;
  background: var(--orange-deep);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.hist-progress-text {
  font-size: 12px;
  color: #FF5722;
  font-weight: 600;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hist-medal-big {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-55%);
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}

/* 移动端 */
@media (max-width: 480px) {
  .hist-hero-bg { padding: 16px 16px 0 16px; min-height: 116px; }
  .hist-hero-title { font-size: 24px; }
  .hist-hero-ip { width: 104px; }
  .hist-hero-card { padding: 14px 14px 12px; }
  .hist-avatar { width: 46px; height: 46px; font-size: 22px; }
  .hist-stat-num { font-size: 30px; }
  .hist-progress-wrap { padding-right: 70px; }
  .hist-medal-big { width: 64px; height: 64px; }
}

.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  border-left: 5px solid;
}
.history-item.s-rec { border-left-color: #FFC53D; }
.history-item.s-qa  { border-left-color: #3D6DF2; }
.history-item .h-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.history-item.s-rec .h-icon { background: #FFF4D6; }
.history-item.s-qa  .h-icon { background: #E8EFFF; }
.history-item .h-info { flex: 1; min-width: 0; }
.history-item .h-info h3 {
  font-size: 15px; font-weight: 700;
  margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.history-item .h-info .h-meta {
  font-size: 12px; color: var(--text-light);
}
/* 教练评语（2026-09-11）：孩子答题时只闪一次，家长回看记录也要看得到 */
.h-coach {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.65;
  color: #5B6B82;
  background: #F6F8FE;
  border-radius: 5px;
  padding: 5px 7px;
}
.history-item .h-score {
  text-align: right;
  flex-shrink: 0;
}
.history-item .h-score .v {
  font-size: 26px; font-weight: 800;
  background: var(--secondary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.history-item .h-score .l {
  font-size: 11px; color: var(--text-light);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
/* （旧 .empty-ip 样式已废弃） */

/* ============== 管理后台 ============== */
.admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--secondary);
}
.stat-card[data-color="1"]::before { background: var(--secondary); }
.stat-card[data-color="2"]::before { background: #14B8A6; }
.stat-card[data-color="3"]::before { background: #F59E0B; }
.stat-card[data-color="4"]::before { background: #8B5CF6; }
.stat-card .v {
  font-size: 32px; font-weight: 800;
  background: var(--secondary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .l {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

table.admin-tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table.admin-tbl th {
  background: #E8EFFF;
  padding: 14px 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  color: var(--text);
}
table.admin-tbl td {
  padding: 12px;
  font-size: 13px;
  border-top: 1px solid var(--bg);
}
table.admin-tbl tr:hover td { background: var(--bg-soft); }

/* ============== 底部 Tab 导航（斑马AI学风） ============== */
.bottom-tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  /* 压到最窄：上下内边距最小化；iOS 安全区（底部小黑条）自动让位 */
  padding: 3px 0 calc(3px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(61, 109, 242, 0.12);
  z-index: 100;
  border-top: 1px solid var(--bg);
}
/* 底部 Tab：只留图标去文字，释放空间给主体内容 */
.bottom-tabbar .tab-item span { display: none; }
.bottom-tabbar .tab-item .ti-img { width: 28px; height: 28px; }
.tab-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
  padding: 2px;
  font-size: 11px;
  color: var(--text-light);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}
.tab-item .ti-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  filter: grayscale(0.6);
  transition: var(--transition);
}
.tab-item .ti-img {
  width: 27px; height: 27px;
  display: block;
  filter: grayscale(0.55) opacity(0.75);
  transition: var(--transition);
}
.tab-item.active {
  color: var(--primary);
  font-weight: 700;
}
.tab-item.active .ti-icon {
  filter: grayscale(0);
  transform: translateY(-2px);
}
.tab-item.active .ti-img {
  filter: grayscale(0) opacity(1);
  transform: translateY(-2px) scale(1.1);
}
.tab-item.active::before {
  content: '';
  position: absolute;
  top: -2px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 3px;
  background: var(--secondary);
  border-radius: 2px;
}
.tab-item.center-cta {
  margin-top: -22px;
}
.tab-item.center-cta .ti-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  filter: none;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(61, 109, 242, 0.45);
  border: 4px solid #fff;
}

/* ============== 旧类兼容（让现有HTML无大改动可用） ============== */
.user-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.25);
  border-radius: var(--radius-pill);
  font-weight: 600;
}
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.nav-links .nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
}
.nav-links .nav-link:hover { background: rgba(255,255,255,0.15); }
.nav-links .nav-link.active { background: rgba(255,255,255,0.3); color: #fff; }

.improvement-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 14px;
  background: #84CC16;
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 700;
}

/* 适配小屏 */
@media (max-width: 480px) {
  .login-card { padding: 28px 22px; }
  .login-card h1 { font-size: 26px; }
  .book-grid { grid-template-columns: 1fr; }
  .container { padding: 14px; }
}

/* ========================================================================
   组件补全（多巴胺统一）：通用按钮 / 内页Tab / 弹窗 / 标签 / 表格 / 统计别名
   ======================================================================== */

/* 通用按钮基类：让 .btn-* 组合在任意容器中自适应宽度 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border: none; cursor: pointer; font-family: inherit;
  text-decoration: none; transition: var(--transition); line-height: 1.2;
}
.btn-primary { width: auto; border-radius: var(--radius-sm); }
.btn-large   { padding: 16px 32px; font-size: 17px; }
.btn-sm      { padding: 8px 16px; font-size: 13px; border-radius: 12px; }
.login-card .btn-primary { width: 100%; }
.btn-danger {
  background: #EF4444;
  color: #fff; font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 107, 107, 0.3);
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(255,107,107,0.45); }

/* 内页 Tab 内容切换（后台/历史共用） */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 弹窗（后台添加用户/群组） */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(31, 40, 73, 0.55);
  align-items: center; justify-content: center;
  padding: 22px; z-index: 300;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; width: 100%; max-width: 400px;
  max-height: 86vh; overflow-y: auto;
  border-radius: 24px; padding: 26px 20px 22px;
  box-shadow: 0 24px 60px rgba(31, 40, 73, 0.3);
  animation: popIn 0.25s ease;
}
.modal h3 {
  font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 16px;
  background: var(--secondary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.modal select {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--border); border-radius: 12px;
  background: var(--bg-soft); font-size: 15px; color: var(--text);
  outline: none;
}
.modal-actions { display: flex; gap: 10px; margin-top: 10px; }
.modal-actions .btn { flex: 1; }
@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---- 首次登录填姓名弹窗 ---- */
.name-modal { text-align: center; }
.name-modal .nm-emoji { font-size: 52px; line-height: 1.1; margin-bottom: 2px; }
.name-modal h3 { margin-bottom: 8px; }
.name-modal .nm-sub {
  font-size: 15px; color: var(--text-light); margin-bottom: 18px;
}
.name-modal .nm-input-wrap { margin-bottom: 14px; }
.name-modal .nm-input-wrap input {
  width: 100%; padding: 14px 18px; text-align: center;
  border: 2.5px solid var(--border-strong); border-radius: 16px;
  font-size: 20px; font-weight: 700; color: var(--text); outline: none;
  background: var(--bg-soft); transition: var(--transition);
}
.name-modal .nm-input-wrap input:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(61, 109, 242, 0.12);
}
.name-modal .nm-input-wrap input::placeholder {
  color: var(--text-muted); font-weight: 400; font-size: 15px;
}
.name-modal .nm-avatar-tip { font-size: 13px; color: var(--text-light); margin-bottom: 10px; }
.name-modal .nm-avatars { display: flex; gap: 12px; justify-content: center; margin-bottom: 6px; }
.name-modal .nm-avatar {
  width: 56px; height: 56px; border-radius: 50%; border: 2.5px solid var(--border);
  background: var(--bg-soft); font-size: 26px; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.name-modal .nm-avatar.sel {
  border-color: var(--primary); background: #E8EFFF;
  transform: scale(1.12); box-shadow: 0 4px 12px rgba(61, 109, 242, 0.25);
}
.name-modal .error-msg { display: none; }
.name-modal .error-msg.show { display: block; }
.name-modal .modal-actions { margin-top: 18px; }

/* 彩色小标签（等级/群成员/微信发送状态） */
.tag {
  display: inline-block; padding: 3px 11px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.tag-green  { background: #E0F8F6; color: #0E9B8F; }
.tag-blue   { background: #E0F2FF; color: #1E88E5; }
.tag-orange { background: #FFF4D6; color: #B45309; }
.tag-red    { background: #FFE6E6; color: #C04848; }
.tag-purple { background: #F0E6FF; color: #7C3AED; }

/* 卡片内普通表格（后台列表） */
.card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.card th {
  text-align: left; padding: 10px 8px; white-space: nowrap;
  background: var(--bg-soft); color: var(--text);
  font-size: 13px; font-weight: 700;
}
.card td { padding: 10px 8px; border-top: 1px solid var(--bg); color: var(--text); }
.card tr:hover td { background: var(--bg-soft); }

/* 统计卡别名（.stat-icon/.stat-value/.stat-label 兼容老结构） */
.stat-card .stat-icon { font-size: 28px; margin-bottom: 2px; }
.stat-card .stat-value {
  font-size: 32px; font-weight: 800;
  background: var(--secondary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .stat-label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* 无 data-color 时按位置轮播彩色顶条（后台概览/历史统计） */
.admin-stats .stat-card:nth-child(6n+2)::before { background: #14B8A6; }
.admin-stats .stat-card:nth-child(6n+3)::before { background: #F59E0B; }
.admin-stats .stat-card:nth-child(6n+4)::before { background: #8B5CF6; }
.admin-stats .stat-card:nth-child(6n+5)::before { background: #84CC16; }
.admin-stats .stat-card:nth-child(6n)::before   { background: #EF4444; }

/* 进步标签（历史页） */
.improvement-tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #fff;
  background: var(--secondary);
  box-shadow: 0 4px 12px rgba(61, 109, 242, 0.3);
  flex-shrink: 0;
}

/* ============== 登录页 · 老师入口（低调小字） ============== */
.teacher-entry {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--bg-deep, #e8ecf3);
  text-align: center;
}
.teacher-entry a {
  font-size: 12px;
  color: var(--text-light, #8a94a6);
  text-decoration: none;
  opacity: 0.85;
  transition: var(--transition);
}
.teacher-entry a:hover { opacity: 1; color: var(--primary, #3D6DF2); }

/* ============== 打卡页 · 勋章面板（深蓝渐变） ============== */
.medal-panel {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 18px;
  padding: 18px 18px 14px;
  margin-bottom: 16px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(61, 109, 242, 0.3);
  position: relative;
  overflow: hidden;
}
.medal-panel::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  pointer-events: none;
}

/* 顶部：左（头像+昵称+金币数+累计）右（勋章）；左列拉伸与勋章等高，累计行沉底消空隙 */
.medal-top {
  display: flex; align-items: stretch; justify-content: space-between;
  gap: 10px;
}
.medal-left {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 12px;
}
.medal-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.medal-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: #FFB300;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; overflow: hidden; flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.medal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.medal-user-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.medal-nick-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.medal-nick {
  font-size: 20px; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 130px;
}
.medal-grade-chip {
  display: inline-block; flex-shrink: 0;
  background: var(--secondary);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(61, 109, 242, 0.35);
}
.medal-coins {
  display: flex; align-items: center; gap: 6px;
}
.medal-star-count {
  font-size: 50px; font-weight: 900; color: #fff;
  line-height: 1;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}
.medal-star-coin {
  width: 42px; height: 42px; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.5));
}

/* 右侧：勋章 + 称号 */
.medal-display {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; flex-shrink: 0; width: 118px;
}
.medal-image {
  width: 104px; height: 104px; object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
  transition: transform 0.3s ease;
}
.medal-image:hover { transform: scale(1.05) rotate(-3deg); }

/* 累计阅读 / 背诵（左对齐加粗，强制单行不换行） */
.medal-stats {
  display: flex; justify-content: flex-start; align-items: baseline;
  gap: 12px;
  flex-wrap: nowrap; /* 阅读/背诵永远同一行，绝不折行 */
  white-space: nowrap;
  margin-top: 12px;
  font-size: 15px; font-weight: 800; color: #fff;
}
.ms-item { font-weight: 800; display: inline-flex; align-items: baseline; gap: 2px; }
.ms-item .ms-sep {
  display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255,255,255,0.55); margin-right: 8px; vertical-align: middle;
}
.ms-item b {
  font-size: 19px; font-weight: 900; color: #FFD54F;
  margin: 0 2px;
}

/* 进度条 */
.medal-progress { margin-top: 4px; }
.medal-progress-bar {
  height: 10px; background: rgba(255,255,255,0.18);
  border-radius: 999px; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}
.medal-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(255, 201, 60, 0.6);
}
.medal-progress-fill.is-max {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.8);
}
.medal-progress-text {
  font-size: 12px; color: rgba(255,255,255,0.85);
  text-align: center; margin-top: 6px;
}
.medal-progress-text b {
  color: #FFD54F; font-weight: 900; font-size: 14px;
  margin: 0 2px;
}

/* 历史页顶部小勋章徽标 */
.medal-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-deep);
  color: #FFD54F; padding: 4px 10px 4px 4px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(27, 44, 92, 0.25);
}
.medal-badge img { width: 22px; height: 22px; border-radius: 50%; background: #fff; }
.medal-badge .lv { font-weight: 900; color: #fff; }

/* 移动端适配 */
@media (max-width: 480px) {
  .medal-panel { padding: 14px 14px 12px; }
  .medal-image { width: 88px; height: 88px; }
  .medal-avatar { width: 54px; height: 54px; font-size: 28px; }
  .medal-star-count { font-size: 42px; }
  .medal-star-coin { width: 36px; height: 36px; }
  .medal-nick { max-width: 100px; font-size: 16px; }
  /* 移动端同样强制单行：缩字号缩间距，绝不折行 */
  .medal-stats { font-size: 13px; gap: 8px; }
  .ms-item b { font-size: 16px; }
}

/* 已读完的书：变灰 + 右上角徽标；点卡片仍可“再读一次” */
.book-card { position: relative; }
.book-card.done {
  filter: grayscale(1);
  opacity: 0.68;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.book-card.done:hover { transform: none; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.book-card.done::before { background: #CBD5E1 !important; }
.book-card.done .book-icon { background: #EEF1F5 !important; }
.book-card.done button {
  background: #94A3B8 !important;
}
.book-card .done-badge {
  position: absolute; top: 10px; right: 10px;
  background: #E2E8F0; color: #64748B;
  font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 999px;
  z-index: 2;
}

/* ========== 后台书目管理（独立桌面排版） ========== */
/* 工具栏 */
.book-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.book-toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tinput {
  background: #fff; border: 2px solid var(--border); border-radius: 10px;
  padding: 8px 12px; font-size: 14px; color: var(--text); outline: none; transition: var(--transition);
}
.tinput:focus { border-color: var(--primary); }
.book-toolbar-actions .btn-sm { padding: 8px 14px; font-size: 13px; }
.admin-empty { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* 横向书目卡（后台列表风格） */
.admin-book-grid { display: flex; flex-direction: column; gap: 10px; }
.abook-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 2px solid var(--border); border-radius: 16px;
  padding: 12px 16px; transition: var(--transition);
}
.abook-card:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.abook-card.off { background: #F6F8F7; opacity: 0.82; }
.abook-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; background: #E0F8F6;
}
.abook-card.off .abook-icon { background: #EEF1F5; filter: grayscale(1); }
.abook-info { flex: 1; min-width: 0; }
.abook-title { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.4; }
.abook-sub { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.abook-tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.abook-actions { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.abook-card.off .abook-title { color: var(--text-light); }

/* 宽弹窗（书目编辑/批量导入） */
.modal.wide { max-width: 680px; max-height: 88vh; overflow-y: auto; }
.book-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.book-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.6; }
.modal textarea, .q-field, .q-answer, .q-keywords {
  width: 100%; border: 2px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; color: var(--text);
  box-sizing: border-box; outline: none; resize: vertical; background: #fff; transition: var(--transition);
}
.modal textarea:focus, .q-field:focus, .q-answer:focus, .q-keywords:focus { border-color: var(--primary); }

/* 类型切换 */
.type-switch { display: flex; gap: 8px; flex-wrap: wrap; }
.type-chip {
  flex: 1; min-width: 200px; padding: 10px 14px; border-radius: 12px; cursor: pointer;
  border: 2px dashed var(--border-strong); background: #fff; color: var(--text-light);
  font-size: 14px; font-weight: 700; transition: var(--transition);
}
.type-chip.active {
  border-style: solid; border-color: var(--primary); color: var(--primary);
  background: rgba(76,205,196,0.12);
}
.type-chip[data-role="reading"].active { border-color: #A78BFA; color: #7C5CD6; background: #F4EFFF; }
.type-chip[data-role="recitation"].active { border-color: var(--primary); color: var(--primary); background: #E9F7F1; }

/* 题目编辑器 */
.q-item { background: #F7FAF9; border: 2px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.q-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.q-index { font-size: 13px; font-weight: 800; color: var(--primary); }
.q-del { font-size: 12px; color: #C04848; background: none; border: none; cursor: pointer; font-weight: 700; padding: 2px 6px; }
.q-del:hover { text-decoration: underline; }
.q-field { margin-bottom: 8px; }
.q-row2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-bottom: 8px; }
.q-type, .modal select { background: #fff; border: 2px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.q-answer, .q-keywords, .q-hints { margin-bottom: 8px; }
.q-hints { min-height: 34px; }

/* 批量导入 */
.import-block {
  border: 2px dashed var(--border-strong); border-radius: 14px; padding: 14px;
  margin-bottom: 12px; background: #FCFDFC;
}
.import-block-title { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.import-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1.5px solid var(--border); border-radius: 10px; margin-bottom: 6px; background: #fff;
}
.import-idx { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.import-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.import-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-meta { font-size: 12px; color: var(--text-muted); }
.tag-grey { background: #EDEFF2 !important; color: #64748B !important; }

/* ========== 书卡V2（read.html 专用：白底圆角卡 + 浅色书封立绘 + 轻投影，方案一） ========== */
/* 隐藏旧版顶部色条 */
.book-card.sky-card::before { display: none; }
.book-card.sky-card {
  background: #fff;
  border-radius: 18px;
  padding: 13px 14px;
  display: flex;
  gap: 13px;
  align-items: center;
  box-shadow: 0 4px 14px rgba(31,40,73,0.10);
}
.book-card.sky-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(31,40,73,0.16);
}
.book-card.sky-card.done:hover { transform: none; }

/* ---- 书封：浅色渐变 + 底部同色系草坡 ---- */
.sky-card .cover {
  position: relative;
  flex-shrink: 0;
  width: 108px; height: 146px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(31,40,73,0.16);
}
.sky-card .cover .shine {
  position: absolute; top: 7px; right: 9px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  filter: blur(2.5px);
  z-index: 1;
  pointer-events: none;
}
.sky-card .cover .band {
  position: absolute; bottom: -16px; left: -10%; right: -10%;
  height: 52px;
  border-radius: 50% 50% 0 0;
  z-index: 2;
  pointer-events: none;
}
.sky-card .cover .char {
  position: absolute; left: 50%; bottom: 2px;
  transform: translateX(-50%);
  height: 116px; width: auto;
  z-index: 3;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.16));
  pointer-events: none;
}
/* 六色浅底书封 + 草坡色（沿用莫兰迪六色） */
.sky-card[data-color="1"] .cover { background: linear-gradient(170deg, #F2DCE3, #E7C3CE); }
.sky-card[data-color="2"] .cover { background: linear-gradient(170deg, #DDEEE7, #BBD9CE); }
.sky-card[data-color="3"] .cover { background: linear-gradient(170deg, #F2E7D2, #E3CCAA); }
.sky-card[data-color="4"] .cover { background: linear-gradient(170deg, #E7E0F0, #CCC0E0); }
.sky-card[data-color="5"] .cover { background: linear-gradient(170deg, #EAEEDC, #D2DAB6); }
.sky-card[data-color="6"] .cover { background: linear-gradient(170deg, #F0DEDB, #E0BFBB); }
.sky-card[data-color="1"] .cover .band { background: #A85D77; }
.sky-card[data-color="2"] .cover .band { background: #5D8F7E; }
.sky-card[data-color="3"] .cover .band { background: #B08D5E; }
.sky-card[data-color="4"] .cover .band { background: #8B7AB0; }
.sky-card[data-color="5"] .cover .band { background: #8F975F; }
.sky-card[data-color="6"] .cover .band { background: #B07068; }

/* ---- 右侧信息区 ---- */
.sky-card .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sky-card .trow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.sky-card .bname {
  font-size: 19px;
  font-weight: 800;
  color: #1F2849;
  line-height: 1.3;
}
.sky-card .chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.sky-card .chip-gold { background: #FFF4D6; color: #A06F00; }
.sky-card .chip-star { background: #FFF4D6; color: #B07A00; }
.sky-card .chip-done { background: #EDEFF2; color: #64748B; }
.sky-card .mrow { display: flex; gap: 6px; margin-bottom: 6px; }
.sky-card .mchip {
  font-size: 10.5px;
  color: #64748B;
  background: #F3F5FA;
  border-radius: 6px;
  padding: 2px 8px;
}
.sky-card .qline {
  font-size: 11.5px;
  font-style: italic;
  color: #94A3B8;
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sky-card .sline { font-size: 11px; margin-bottom: 8px; }
.sky-card .s-active { color: #2E7D5B; font-weight: 700; }
.sky-card .s-up { color: #94A3B8; }
.sky-card .s-over { color: #D64545; font-weight: 800; }
.sky-card .dstrip { font-size: 11px; color: #94A3B8; margin-bottom: 8px; }

/* ---- 按钮：金色胶囊（未读）/ 灰色（已读） ---- */
.book-card.sky-card button.go-btn {
  width: auto;
  align-self: flex-start;
  margin: 0;
  padding: 8px 22px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  background: linear-gradient(90deg, #FFC53D, #FFB020);
  color: #fff;
  box-shadow: 0 3px 8px rgba(255,176,32,0.32);
}
.book-card.sky-card button.go-btn:hover { filter: brightness(1.06); }

/* 已读：封面去饱和 + 按钮置灰（信息仍清晰） */
.book-card.sky-card.done {
  filter: none;
  opacity: 1;
  box-shadow: 0 4px 14px rgba(31,40,73,0.10);
}
.book-card.sky-card.done .cover { filter: grayscale(0.9); opacity: 0.72; }
.book-card.sky-card.done .cover .shine { display: none; }
.book-card.sky-card.done button.go-btn {
  background: #CBD5E1;
  color: #F8FAFC;
  box-shadow: none;
}
.book-card.sky-card.done button.go-btn:hover { filter: none; }

/* 未开始（未来周）：按钮置灰弱化，点击卡片只弹解锁提示，不进入阅读 */
.book-card.sky-card button.go-btn.go-locked {
  background: #E2E8F0;
  color: #64748B;
  box-shadow: none;
}
.book-card.sky-card button.go-btn.go-locked:hover { filter: none; }

/* ========== 录音卡主题化：深蓝夜空 + 金色按钮 + IP话筒图标（read.html 专用） ========== */
.recorder {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #1B3A7A 0%, #122457 100%);
  color: #fff;
}
.recorder::before {
  content: '';
  position: absolute; top: -46px; right: -46px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
  pointer-events: none;
}
.recorder::after {
  content: '';
  position: absolute; bottom: -34px; left: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 60% 40%, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  pointer-events: none;
}
.recorder #readHint { color: rgba(255,255,255,0.92) !important; }
.recorder .record-btn {
  width: 122px; height: 122px;
  background: linear-gradient(165deg, #F2C14E 0%, #E0A93C 100%);
  border: 4px solid rgba(255,255,255,0.92);
  box-shadow: 0 10px 26px rgba(0,0,0,0.32);
  position: relative; z-index: 1;
}
.recorder .record-ip {
  height: 90px; width: auto; pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.18));
}
.recorder .record-btn.recording {
  background: #EF4444;
  animation: recordPulse 1.2s ease-in-out infinite;
}
@keyframes recordPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50% { box-shadow: 0 0 0 14px rgba(239,68,68,0); }
}
.recorder .recording-timer { color: #FFE9A8; position: relative; z-index: 1; }
.recorder .recording-status { color: rgba(255,255,255,0.75); position: relative; z-index: 1; }
.recorder .record-visualizer .visualizer-bar { background: #F2C14E; }

/* ===== 背诵遮罩（2026-09-08）：背诵内容默认模糊防偷看，停止录音后显现 ===== */
body.reading-stage #stage-read .reading-card { position: relative; }
.reading-text > * { transition: filter 0.3s ease; }
.reading-text.rec-masked > * {
  filter: blur(9px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
#recPeekBtn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 22px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  background: rgba(42, 82, 196, 0.92);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  line-height: 1.4;
  box-shadow: 0 6px 20px rgba(10, 25, 80, 0.35);
}
#recPeekBtn .rec-peek-sub { font-size: 12px; font-weight: 600; opacity: 0.85; }
