/* ============================================================
   学习台 · 墨水屏「学习版」皮肤 v3
   目标设备：海信 A5 Pro CC（彩色墨水屏 4096 色 / 1440x720 / 43fps）

   配色铁律（针对墨水屏的物理特性）：
   1) 底色 100% 纯白：彩色墨水屏的浅色底会发灰发绿，只有纯白最干净
   2) 文字接近纯黑：灰字在墨水屏上会糊，正文用 #1a1a1a，标题纯黑
   3) 只保留 1 个强调色（墨绿 #17564a），且只用于「实心按钮/当前页签」
      —— 大面积彩色块在墨水屏上显脏、显旧，一律不用
   4) 所有渐变、阴影、毛玻璃全部拍平成纯色线条
   5) 边框代替阴影：1.5px 深灰实线，边界清楚、无灰雾
   6) 点击区 ≥ 46px，正面白底，按下反色，避免误触

   仅在 html.eink 下生效，电脑端完全不受影响。
   ============================================================ */

/* ---------- 1. 覆盖主题变量（一次改全局） ---------- */
html.eink {
  --bg: #ffffff;
  --card: #ffffff;
  --card2: #f4f4f4;
  --border: #9a9a9a;
  --border-strong: #6f6f6f;
  --text: #1a1a1a;
  --title: #000000;
  --muted: #4a4a4a;

  --teal: #17564a;
  --teal-dark: #0f3f36;
  --teal-bg: #e9eeec;

  --green: #1f6b3f;
  --amber: #7a5200;
  --coral: #8c2f27;
  --purple: #3f3a63;
  --blue: #1d4f70;
  --gold: #6b4a00;

  /* 原始皮肤里写死的浅黄/浅米底，一并拉成中性灰白 */
  --warmSoft: #f4f4f4;
  --warmSoft2: #f4f4f4;
  --gold-bg: #f2f2f2;
  --accentSoft: #e9eeec;

  --nav-bg: #ffffff;
  --shadow-sm: none;
  --shadow: none;
  --radius: 10px;

  font-size: 17px;
  color-scheme: light;
}

/* ---------- 2. 基础面 ---------- */
html.eink,
html.eink body {
  background: #ffffff !important;
  color: #1a1a1a !important;
}

/* 动态背景层纯属浪费刷新，直接撤掉 */
html.eink #dynamicBg,
html.eink #dynamicBgImg,
html.eink #loginCanvas,
html.eink #loginBgImg,
html.eink .dynamic-bg,
html.eink .dynamic-bg-img {
  display: none !important;
}

/* 过渡/模糊/文字阴影全部关掉：一次重绘到位，减少残影 */
html.eink *,
html.eink *::before,
html.eink *::after {
  transition: none !important;
  animation-duration: .001s !important;
  animation-delay: 0s !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: none !important;
}

/* 渐变一律拍平（原皮肤有 31 处渐变，墨水屏上全是灰雾） */
html.eink .btn,
html.eink .card,
html.eink .topbar,
html.eink .bottom-tabs,
html.eink .tabs,
html.eink .bt,
html.eink .tab,
html.eink .pts-chip,
html.eink .badge,
html.eink .pill,
html.eink .logo,
html.eink .modal,
html.eink .celebrate-bar,
html.eink button {
  background-image: none !important;
  box-shadow: none !important;
}

/* ---------- 3. 卡片：白底 + 深灰实线 ---------- */
html.eink .card,
html.eink .empty,
html.eink .modal,
html.eink .card2-text {
  background: #ffffff !important;
  border: 1.5px solid #9a9a9a !important;
  border-radius: 10px !important;
  color: #1a1a1a !important;
}

/* ---------- 4. 文字 ---------- */
html.eink h1,
html.eink h2,
html.eink h3,
html.eink h4,
html.eink .card h3 {
  color: #000 !important;
  font-weight: 800 !important;
}
html.eink .muted,
html.eink small,
html.eink .sub,
html.eink .desc,
html.eink .hint {
  color: #4a4a4a !important;
}

/* ---------- 5. 顶栏 ---------- */
html.eink .topbar {
  background: #ffffff !important;
  border-bottom: 2px solid #333 !important;
  position: sticky;
  top: 0;
}

/* 积分胶囊：白底黑框，不要橙色渐变 */
html.eink .pts-chip {
  background: #ffffff !important;
  border: 1.5px solid #333 !important;
  color: #000 !important;
  border-radius: 9px !important;
}

/* ---------- 6. 底部导航 ---------- */
html.eink .bottom-tabs {
  background: #ffffff !important;
  border-top: 2px solid #333 !important;
}
html.eink .bottom-tabs .bt {
  min-height: 58px;
  font-size: 13px;
  font-weight: 700;
  color: #333 !important;
  background: #fff !important;
  border-radius: 0 !important;
}
html.eink .bottom-tabs .bt.active {
  color: #fff !important;
  background: #17564a !important;
}
html.eink .bottom-tabs .bt .ic {
  font-size: 21px;
}

/* 底部导航里的「小四门」入口（a 标签伪装成 .bt） */
html.eink .bottom-tabs a.bt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  gap: 2px;
  padding: 6px 0;
  text-decoration: none;
  color: #333 !important;
  font-size: 13px;
  font-weight: 700;
  border-left: 1px solid #ccc;
}
html.eink .bottom-tabs a.bt .ic { font-size: 21px; line-height: 1; }
html.eink .bottom-tabs a.bt:active { background: #e8e8e8 !important; }

/* ---------- 7. 顶部横向 tab ---------- */
html.eink .tabs .tab {
  font-weight: 700;
  color: #333 !important;
  background: #fff !important;
  border: 1.5px solid #bbb !important;
  border-radius: 8px !important;
  margin: 3px;
  padding: 9px 14px;
  min-height: 42px;
}
html.eink .tabs .tab.active {
  background: #17564a !important;
  color: #fff !important;
  border-color: #17564a !important;
}

/* ---------- 8. 按钮 ---------- */
html.eink .btn,
html.eink button.btn,
html.eink .logout-btn {
  min-height: 46px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border: 1.5px solid #333 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #111 !important;
}
html.eink .btn.primary,
html.eink .btn.primary * {
  background: #17564a !important;
  color: #fff !important;
  border-color: #17564a !important;
}
html.eink .btn.ok {
  background: #1f6b3f !important;
  color: #fff !important;
  border-color: #1f6b3f !important;
}
html.eink .btn.warn {
  background: #fff !important;
  color: #7a5200 !important;
  border-color: #7a5200 !important;
}
/* 按下反色，墨水屏反馈更明确 */
html.eink .btn:active,
html.eink .logout-btn:active {
  background: #111 !important;
  color: #fff !important;
}

/* ---------- 9. 统计条 / 徽章 ---------- */
html.eink .stat-strip {
  background: #fff !important;
  border: 1.5px solid #9a9a9a !important;
  color: #111 !important;
}
html.eink .ts-item {
  background: transparent !important;
  border: none !important;
  color: #111 !important;
}
html.eink .badge,
html.eink .pill {
  background: #fff !important;
  border: 1px solid #777 !important;
  color: #111 !important;
}

/* ---------- 10. 进度条：白底黑框 + 墨绿填充 ---------- */
html.eink .progress,
html.eink .bar,
html.eink [class*="progress"] {
  background: #fff !important;
  border: 1px solid #777 !important;
}
html.eink .progress > i,
html.eink .bar > i,
html.eink [class*="progress"] > i {
  background: #17564a !important;
}

/* ---------- 11. 表单 ---------- */
html.eink input,
html.eink textarea,
html.eink select {
  background: #fff !important;
  color: #000 !important;
  border: 1.5px solid #666 !important;
  min-height: 46px;
  font-size: 16px;
}

/* ---------- 12. 图片不做滤镜 ---------- */
html.eink img {
  filter: none !important;
  opacity: 1 !important;
}

/* 禁止回弹动画 */
html.eink body {
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 13. 登录页（墨水屏上白底黑字） ---------- */
html.eink .login-wrap,
html.eink .login-grid,
html.eink .brand-side {
  background: #fff !important;
  background-image: none !important;
  color: #111 !important;
}

/* ---------- 14. 庆祝横幅：纯色、不位移 ---------- */
html.eink .celebrate-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 62px;
  background: #17564a !important;
  color: #fff !important;
  padding: 12px;
  text-align: center;
  font-weight: 800;
  border-top: 2px solid #0d332c;
}

/* ---------- 15. 兜底：任何漏网的浅色底统一拉白 ---------- */
html.eink [style*="background:linear-gradient"],
html.eink [style*="background: linear-gradient"] {
  background-image: none !important;
}

/* ============================================================
   16. 单词天天练卡（首页第一大卡）
   原样：淡绿渐变 #f1f8f5→#eaf3ef + 右上角径向光斑 + 绿色投影
   墨水屏上这三样叠加 = 一整块脏绿雾，改成纯白 + 墨绿竖线识别
   ============================================================ */
html.eink details.wtp {
  background: #ffffff !important;
  background-image: none !important;
  border: 1.5px solid #9a9a9a !important;
  border-left: 5px solid #17564a !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  margin-bottom: 14px !important;
}
html.eink details.wtp::after { display: none !important; }

/* 左侧书本图标：实心墨绿，去掉渐变与投影 */
html.eink .wtp-icon {
  background: #17564a !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #fff !important;
  border-radius: 8px !important;
}

/* 「8年级 0/1341」胶囊：白底细黑框 */
html.eink .wtp-sum .pill2,
html.eink .pill2 {
  background: #ffffff !important;
  background-image: none !important;
  color: #111 !important;
  border: 1px solid #6f6f6f !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
}
html.eink .wtp-chev { color: #111 !important; }

/* 进度条：白槽 + 墨绿实心填充 */
html.eink .wtp-bar {
  background: #ffffff !important;
  border: 1px solid #6f6f6f !important;
  height: 10px !important;
}
html.eink .wtp-bar-fill {
  background: #17564a !important;
  background-image: none !important;
}
html.eink .chip {
  background: #ffffff !important;
  border: 1px solid #9a9a9a !important;
  box-shadow: none !important;
}
html.eink .chip .n { color: #000 !important; }
html.eink .chip .l { color: #4a4a4a !important; }

/* 「今日新词 / 待复习 / 共N词」三个圆角胶囊：原来分别是橙调、青调、灰调 */
html.eink .vocab-today span,
html.eink .vt-new,
html.eink .vt-rev,
html.eink .vt-total {
  background: #ffffff !important;
  background-image: none !important;
  color: #111 !important;
  border: 1.4px solid #6f6f6f !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
}

/* 词族辐射提示条：原为奶油黄渐变 */
html.eink .wtp-radiate .wa-tip,
html.eink .wtp-radiate .wa-tip * {
  background: #ffffff !important;
  background-image: none !important;
  color: #1a1a1a !important;
}
html.eink .wtp-radiate .wa-tip { border: 1.4px solid #9a9a9a !important; }
html.eink .wtp-radiate .wa-chip,
html.eink .wtp-radiate .wa-chip-root {
  background: #ffffff !important;
  border: 1.4px solid #6f6f6f !important;
  color: #111 !important;
}
html.eink .wtp-radiate .wa-chip b,
html.eink .wtp-radiate .wa-chip-root b { color: #17564a !important; }

/* 幽灵按钮（听写测试）：白底黑框，跟实心绿按钮形成主次 */
html.eink .btn.ghost {
  background: #ffffff !important;
  background-image: none !important;
  border: 1.5px solid #333 !important;
  color: #111 !important;
}
html.eink .btn.ghost:active { background: #111 !important; color: #fff !important; }

/* ============================================================
   17. 「今日应复习」CTA 卡
   原样：flex 横排 + 长文案，720px 下按钮被挤出卡片外（实测溢出）
   改为竖排堆叠，按钮满宽，拇指更好按
   ============================================================ */
html.eink .review-cta {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
  background: #ffffff !important;
  background-image: none !important;
  border: 1.5px solid #9a9a9a !important;
}
html.eink .review-cta > div { line-height: 1.65 !important; }
html.eink .review-cta b { color: #000 !important; font-size: 19px !important; }
html.eink .review-cta .btn { width: 100% !important; }

/* 18. 优化建议卡（原米黄渐变） */
html.eink .optimize-card {
  background: #ffffff !important;
  background-image: none !important;
  border: 1.5px solid #9a9a9a !important;
}

/* 19. 状态标签（学科现状表格里的「待提升」等）：色底换线框 */
html.eink .tag,
html.eink .tag.a,
html.eink .tag.b,
html.eink .tag.red,
html.eink .tag.new {
  background: #ffffff !important;
  background-image: none !important;
  color: #111 !important;
  border: 1px solid #6f6f6f !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
}

/* 20. 折叠标题与表格线 */
html.eink .fold-title { color: #000 !important; }
html.eink table th {
  background: #f2f2f2 !important;
  color: #000 !important;
  border-bottom: 1.5px solid #6f6f6f !important;
}
html.eink table td { border-bottom: 1px solid #cfcfcf !important; }

/* ============================================================
   21. 浏览器全屏模式适配
   海信自带浏览器「菜单 → 全屏」是原生全屏（不是网页 Fullscreen API），
   地址栏 / 底部工具栏 / 安卓导航栏全部消失，但会在右下角留一个
   56×56 的灰色浮标（距右、距底各 24px，且不会自动淡出）。
   这里给底部导航留出安全区，避免「小四门」被浮标压住点不到。
   ============================================================ */
html.eink .bottom-tabs {
  padding-right: 92px !important;
}
/* 6 个标签 + 右侧安全区在 720px 下会把「小四门」挤成两行，禁止换行并收一点字号 */
html.eink .bottom-tabs .bt,
html.eink .bottom-tabs a.bt {
  white-space: nowrap !important;
  min-width: 0 !important;
  font-size: 12px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
html.eink .bottom-tabs a.bt span {
  white-space: nowrap !important;
  display: block;
}
html.eink .content {
  padding-bottom: 104px !important;
}

/* 全屏下顶部贴边，给状态区留一点呼吸，避免第一行文字顶到屏幕边缘 */
html.eink .topbar {
  padding-top: 10px !important;
}

/* 横向永不出滚动条（全屏后 1px 溢出会露出灰边） */
html.eink,
html.eink body {
  overflow-x: hidden !important;
}

/* ============================================================
   23. 纯学习模式：去掉激励与消费类入口（2026-11-05）
   用户明确要求：不要积分、不要商城、不要排行榜、不要打卡。
   这些入口留着只会把注意力从"学"上拉走，直接下线。
   仅在学习机（html.eink）里隐藏，电脑端不受影响。
   ============================================================ */
html.eink .pts-chip,
html.eink .celebrate-bar,
html.eink .bottom-tabs .bt[data-tab="mall"],
html.eink .tabs .tab[data-tab="mall"],
html.eink .tabs .tab[data-tab="leaderboard"],
html.eink .tabs .tab[data-tab="checkin"],
html.eink .tabs .tab[data-tab="scores"] {
  display: none !important;
}

/* 底部少一项后，右侧安全区收窄，把空间还给五个标签 */
html.eink .bottom-tabs {
  padding-right: 72px !important;
}
html.eink .bottom-tabs .bt,
html.eink .bottom-tabs a.bt {
  font-size: 13px !important;
}

/* 积分/金币数字一律不显示文字，避免"分数"暗示 */
html.eink [data-pts],
html.eink .coin,
html.eink .points-num {
  display: none !important;
}


/* ============================================================
   22. 彩色 Emoji 去色
   彩色墨水屏只有 4096 色，emoji 会被渲染成发灰发脏的小色块，
   在底部导航这种重复、放大的位置尤其明显。
   grayscale 不改字形只改色，仍保留"图标感"，但不再抢戏。
   ============================================================ */
html.eink .bottom-tabs .bt .ic {
  filter: grayscale(1) contrast(1.15) !important;
  font-size: 22px !important;
  line-height: 1.1 !important;
}
html.eink .bottom-tabs .bt.active .ic {
  filter: grayscale(1) brightness(0) invert(1) !important;  /* 选中态反白 */
}
