*{box-sizing:border-box}body{margin:0;background:#f6f8fb;color:#172033;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}button,input{font:inherit}button{cursor:pointer}
.topbar{height:72px;background:#fff;border-bottom:1px solid #e8edf3;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100% - 1180px)/2));position:sticky;top:0;z-index:10}.brand{display:flex;align-items:center;gap:12px}.logo{width:42px;height:42px;border-radius:12px;background:#edf5ff;display:grid;place-items:center;font-size:22px}.brand b{display:block;font-size:17px}.brand span{display:block;color:#8792a5;font-size:12px;margin-top:3px}.ghost{border:1px solid #dfe6ef;background:#fff;border-radius:10px;padding:9px 13px;color:#3d6fae}
main{max-width:1180px;margin:auto;padding:34px 24px 70px}.hero{background:linear-gradient(135deg,#eef6ff,#fff);border:1px solid #e0ebf8;border-radius:13px;padding:9px 16px;display:flex;justify-content:space-between;align-items:center;min-height:58px}.eyebrow{font-size:11px;letter-spacing:2px;color:#6b92bf}.hero h1{font-size:18px;margin:3px 0 3px}.hero p{margin:0;color:#6f7b8e;font-size:12px}.hero-card{min-width:86px;text-align:center;background:#fff;border:1px solid #e5ebf2;border-radius:11px;padding:7px 10px}.hero-card span,.hero-card small{display:block;color:#8a95a7;font-size:10px}.hero-card strong{font-size:22px;line-height:1.15;display:inline-block;margin:2px}
.search-row{display:flex;gap:8px;align-items:center;margin:10px 0}.search{height:46px;background:#fff;border:1px solid #dfe5ed;border-radius:12px;display:flex;align-items:center;padding:0 14px;flex:1}.search span{font-size:24px;color:#8d98a8}.search input{border:0;outline:0;width:100%;padding-left:9px;background:transparent}.filters{display:flex;gap:7px;flex-wrap:wrap}.filter{border:1px solid #dfe5ed;background:#fff;border-radius:10px;padding:8px 11px;font-size:13px;color:#657185}.filter.active{background:#edf5ff;border-color:#c9ddf5;color:#3974b5}
.section-head{margin:20px 0 10px;display:flex;justify-content:space-between;align-items:end}.section-head h2{font-size:21px;margin:0 0 4px}.section-head span{font-size:13px;color:#8a95a5}.split{align-items:center}.text-btn{border:0;background:none;color:#3974b5;padding:5px}.danger{color:#b86a6a}
.modules{display:none}.module{display:none;padding:0;text-align:left;transition:.18s}.module:hover{transform:translateY(-2px);box-shadow:0 8px 22px #1d385d0d}.module .ico,.module b,.module small{display:none}
.knowledge-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.knowledge{background:#fff;border:1px solid #e2e7ee;border-radius:12px;padding:14px;position:relative}.tag{font-size:11px;color:#4b7caf;background:#edf5ff;padding:5px 8px;border-radius:7px}.knowledge h3{font-size:15px;margin:10px 0 6px}.knowledge p{font-size:12px;line-height:1.6;color:#687486;margin:0 0 16px}.card-foot{display:flex;justify-content:space-between;align-items:center}.fav{border:0;background:#f5f7fa;border-radius:8px;padding:7px 10px}.fav.on{background:#fff2d8}.learn{border:0;background:#edf5ff;color:#3974b5;border-radius:8px;padding:7px 10px}
.quiz-card{background:#fff;margin-top:12px;border:1px solid #e1e7ef;border-radius:18px;padding:23px}.quiz-meta{font-size:12px;color:#7192b5}.quiz-card h3{font-size:18px;margin:12px 0 17px}.options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.option{background:#f7f9fb;border:1px solid #e0e6ed;border-radius:11px;text-align:left;padding:12px}.option:hover{border-color:#9fc0e2}.option.correct{background:#edf9f1;border-color:#8ac99d}.option.wrong{background:#fff0f0;border-color:#e2a0a0}.answer{margin-top:15px;padding:12px;background:#f6f8fb;border-radius:10px;color:#657184;font-size:13px;display:none}.answer.show{display:block}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.stat{background:#fff;border:1px solid #e2e7ee;border-radius:14px;padding:18px}.stat span{font-size:12px;color:#8a95a5}.stat b{display:block;font-size:27px;margin-top:6px}.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);opacity:0;background:#1e2938;color:#fff;padding:10px 15px;border-radius:10px;font-size:13px;transition:.2s;z-index:30}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:850px){.modules{grid-template-columns:repeat(3,1fr)}.knowledge-grid{grid-template-columns:1fr 1fr}.search-row{align-items:stretch;flex-direction:column}.hero{padding:25px}.hero-card{min-width:110px}}@media(max-width:560px){main{padding:14px 12px 45px}.topbar{padding:0 14px}.brand span{display:none}.hero{padding:11px 13px}.hero h1{font-size:18px}.hero-card{min-width:82px}.modules{grid-template-columns:repeat(2,1fr)}.knowledge-grid,.options,.stats{grid-template-columns:1fr}.ghost{font-size:12px}}

.hint-line{margin:8px 0 0;padding:7px 9px;border-radius:8px;background:#f7f9fc;color:#667487;font-size:12px}
.formula{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#f3f6fa;padding:3px 6px;border-radius:5px;color:#315b88}
.process{letter-spacing:.2px}

.quiz-card{min-height:190px}

/* 今日推荐：横向滑动卡片 */
.knowledge-grid{
  display:flex;
  gap:12px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  padding:2px 2px 10px;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.knowledge-grid::-webkit-scrollbar{display:none}
.knowledge-grid .knowledge{
  flex:0 0 min(82vw,330px);
  scroll-snap-align:start;
  min-height:188px;
  display:flex;
  flex-direction:column;
}
.knowledge-grid .knowledge .card-foot{margin-top:auto}
.carousel-hint{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#8a95a5;
  font-size:12px;
  margin-left:8px;
}
@media(max-width:560px){
  .knowledge-grid{gap:10px;padding-bottom:8px}
  .knowledge-grid .knowledge{
    flex-basis:84vw;
    min-height:180px;
  }
}

/* ===== V0.1c 精细优化 ===== */
.top-random,
#randomTop,
#randomBtn,
#nextQuiz{
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:4px 0 !important;
  color:#3974b5 !important;
  font-size:14px;
  font-weight:500;
}
#randomTop{font-size:14px}
.text-btn:hover{background:transparent !important}

.hero{
  min-height:66px !important;
  padding:10px 16px !important;
  border-radius:12px !important;
}
.hero h1{font-size:19px !important;margin:2px 0 !important}
.hero p{font-size:11px !important;line-height:1.35}
.hero .eyebrow{font-size:9px}
.hero-card{
  min-width:74px !important;
  padding:5px 8px !important;
  border-radius:10px !important;
}
.hero-card strong{font-size:20px !important;margin:1px !important}
.hero-card span,.hero-card small{font-size:9px !important}

.search-row{margin:9px 0 !important}
.search{height:42px !important}
.filters{display:none !important}

/* 今日推荐：一屏只放一张卡，手指左右滑动换下一张 */
.knowledge-grid{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  width:100% !important;
  gap:10px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scroll-snap-type:x mandatory !important;
  scroll-behavior:smooth !important;
  scrollbar-width:none !important;
  padding:0 0 7px !important;
}
.knowledge-grid::-webkit-scrollbar{display:none !important}
.knowledge-grid .knowledge{
  display:flex !important;
  flex:0 0 100% !important;
  width:100% !important;
  min-width:100% !important;
  max-width:100% !important;
  min-height:172px !important;
  height:172px !important;
  scroll-snap-align:start !important;
  scroll-snap-stop:always !important;
  padding:14px !important;
  border-radius:14px !important;
}
.knowledge-grid .knowledge h3{
  font-size:16px !important;
  margin:9px 0 5px !important;
}
.knowledge-grid .knowledge p{
  font-size:12px !important;
  line-height:1.55 !important;
  margin-bottom:8px !important;
}
.knowledge-grid .knowledge .card-foot{
  margin-top:auto !important;
}
.knowledge-grid .knowledge .fav,
.knowledge-grid .knowledge .learn{
  padding:5px 9px !important;
  border-radius:8px !important;
  font-size:12px !important;
}
.knowledge-grid .knowledge .fav{
  background:#f6f8fb !important;
}
.knowledge-grid .knowledge .learn{
  background:#edf5ff !important;
}
.carousel-hint{
  font-size:11px !important;
  color:#98a4b4 !important;
  margin-left:5px !important;
  font-weight:400 !important;
}
.section-head{margin:18px 0 9px !important}
.section-head h2{font-size:20px !important}
.section-head span{font-size:11px}
.quiz-card{
  min-height:190px !important;
}
@media(max-width:560px){
  .hero{min-height:62px !important}
  .hero-card{min-width:66px !important}
  .knowledge-grid .knowledge{
    flex-basis:100% !important;
    width:100% !important;
    min-width:100% !important;
    height:168px !important;
    min-height:168px !important;
  }
}

/* ===== V0.1e：今日推荐真正单卡片 ===== */
.knowledge-viewport{
  width:100%;
  height:172px;
  overflow:hidden !important;
  position:relative;
  touch-action:pan-y;
}
.knowledge-viewport .knowledge{
  width:100% !important;
  min-width:100% !important;
  max-width:100% !important;
  height:172px !important;
  min-height:172px !important;
  box-sizing:border-box;
  display:flex !important;
  flex-direction:column !important;
  padding:14px !important;
  margin:0 !important;
  border-radius:14px !important;
  transform:translateX(0);
  transition:transform .22s ease, opacity .18s ease;
}
.knowledge-viewport .knowledge .card-foot{margin-top:auto !important}
.knowledge-viewport .knowledge .fav,
.knowledge-viewport .knowledge .learn{
  padding:5px 9px !important;
  font-size:12px !important;
  border-radius:8px !important;
}
@media(max-width:560px){
  .knowledge-viewport,
  .knowledge-viewport .knowledge{
    height:168px !important;
    min-height:168px !important;
  }
}

/* 当前推荐卡片：手势切换 */
.knowledge-viewport{
  touch-action: pan-y;
  user-select:none;
  -webkit-user-select:none;
}
.knowledge-viewport .knowledge{
  transition:transform .18s ease, opacity .18s ease;
}

/* ===== V0.1g 最终首页布局 ===== */
.search-row{display:none !important}
.category-head{margin:16px 0 8px !important}
.modules{
  display:grid !important;
  grid-template-columns:repeat(6,1fr) !important;
  gap:8px !important;
  margin-bottom:4px !important;
}
.module{
  display:block !important;
  width:auto !important;
  border:1px solid #e1e7ef !important;
  background:#fff !important;
  border-radius:12px !important;
  padding:9px 5px !important;
  text-align:center !important;
  color:#172033 !important;
  box-shadow:none !important;
}
.module.active{
  background:#edf5ff !important;
  border-color:#c7def7 !important;
  color:#3974b5 !important;
}
.module .ico{display:block !important;font-size:20px !important;margin-bottom:3px !important}
.module b{display:block !important;font-size:12px !important;margin:0 !important}
.module small{display:block !important;font-size:8px !important;color:#929cab !important;margin-top:2px !important}
.knowledge-viewport{
  width:100% !important;
  height:168px !important;
  overflow:hidden !important;
  position:relative !important;
  touch-action:pan-y !important;
}
.knowledge-viewport .knowledge{
  width:100% !important;
  min-width:100% !important;
  height:168px !important;
  min-height:168px !important;
  margin:0 !important;
  padding:14px !important;
  box-sizing:border-box !important;
  display:flex !important;
  flex-direction:column !important;
  transform:translate3d(0,0,0);
  transition:transform .18s ease;
  will-change:transform;
}
.knowledge-viewport.dragging .knowledge{transition:none !important}
.knowledge-viewport .card-foot{margin-top:auto !important}
.knowledge-viewport .fav,.knowledge-viewport .learn{
  padding:5px 9px !important;
  font-size:12px !important;
  border-radius:8px !important;
}
@media(max-width:700px){
  .modules{grid-template-columns:repeat(3,1fr) !important}
}
@media(max-width:560px){
  .modules{grid-template-columns:repeat(3,1fr) !important;gap:7px !important}
  .module{padding:8px 4px !important}
  .module .ico{font-size:19px !important}
  .module b{font-size:11px !important}
  .module small{font-size:8px !important}
  .knowledge-viewport,.knowledge-viewport .knowledge{
    height:164px !important;
    min-height:164px !important;
  }
}

/* ===== V0.1h：取消页面顶部品牌横幅 ===== */
.topbar{display:none !important}
main{
  padding-top:14px !important;
}
@media(max-width:560px){
  main{
    padding-top:10px !important;
  }
}

/* ===== V0.1i：整体紧凑化 ===== */

/* 页面主体 */
main{
  padding-bottom:38px !important;
}

/* 各区块标题：缩小字号 + 减少上下距离 */
.section-head{
  margin:13px 0 6px !important;
}
.section-head h2{
  font-size:18px !important;
  line-height:1.25 !important;
  margin:0 0 2px !important;
}
.section-head span{
  font-size:10px !important;
  line-height:1.25 !important;
}

/* 功能模块标题更紧 */
.category-head{
  margin-top:10px !important;
  margin-bottom:5px !important;
}

/* 功能模块整体间距 */
.modules{
  gap:6px !important;
  margin-bottom:1px !important;
}

/* 功能卡片高度压缩 */
.module{
  padding:7px 5px !important;
  border-radius:11px !important;
}
.module .ico{
  font-size:18px !important;
  margin-bottom:2px !important;
}
.module b{
  font-size:12px !important;
  line-height:1.2 !important;
}
.module small{
  font-size:8px !important;
  line-height:1.15 !important;
  margin-top:2px !important;
}

/* 快速练习标题与卡片距离 */
.section-head.split{
  margin-top:13px !important;
  margin-bottom:6px !important;
}

/* 快速练习卡片内部适当压缩，但不压缩成小卡 */
.quiz-card{
  min-height:175px !important;
  padding:18px !important;
  border-radius:15px !important;
}

/* 题目区域字体层级稍微缩小 */
.quiz-card h3{
  font-size:17px !important;
  line-height:1.4 !important;
  margin:9px 0 13px !important;
}
.quiz-meta{
  font-size:11px !important;
}
.options{
  gap:7px !important;
}
.option{
  padding:10px 11px !important;
  border-radius:10px !important;
  font-size:14px !important;
}

/* 今日推荐更靠近快速练习 */
.knowledge-viewport{
  height:164px !important;
}
.knowledge-viewport .knowledge{
  height:164px !important;
  min-height:164px !important;
}

/* 今日推荐卡内部紧凑 */
.knowledge-viewport .knowledge h3{
  font-size:15px !important;
  margin:7px 0 4px !important;
}
.knowledge-viewport .knowledge p{
  font-size:11px !important;
  line-height:1.5 !important;
}
.knowledge-viewport .knowledge .tag{
  font-size:10px !important;
  padding:4px 7px !important;
}
.knowledge-viewport .knowledge .card-foot{
  margin-top:auto !important;
}

/* 我的学习也收紧 */
.stats{
  gap:7px !important;
}
.stat{
  padding:12px !important;
  border-radius:11px !important;
}
.stat b{
  font-size:22px !important;
}

/* 手机端再收一点 */
@media(max-width:560px){
  main{
    padding-top:8px !important;
    padding-bottom:30px !important;
  }

  .section-head{
    margin:11px 0 5px !important;
  }
  .section-head h2{
    font-size:18px !important;
  }

  .category-head{
    margin-top:7px !important;
    margin-bottom:4px !important;
  }

  .modules{
    gap:5px !important;
  }

  .module{
    padding:7px 4px !important;
  }

  .module .ico{
    font-size:17px !important;
  }

  .module b{
    font-size:11px !important;
  }

  .module small{
    font-size:7px !important;
  }

  .quiz-card{
    min-height:170px !important;
    padding:16px !important;
  }

  .quiz-card h3{
    font-size:16px !important;
    margin:8px 0 11px !important;
  }

  .option{
    padding:9px 10px !important;
    font-size:13px !important;
  }

  .knowledge-viewport,
  .knowledge-viewport .knowledge{
    height:158px !important;
    min-height:158px !important;
  }
}

/* ===== V0.1j：我的学习小卡片 ===== */
.my-learning-head{
  margin-top:12px !important;
  margin-bottom:6px !important;
}
.my-learning-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:92px;
  padding:14px 16px;
  box-sizing:border-box;
  background:#fff;
  border:1px solid #e1e7ef;
  border-radius:14px;
}
.learning-main{
  min-width:0;
}
.learning-main span,
.learning-side span{
  display:block;
  color:#94a0b0;
  font-size:10px;
  line-height:1.2;
}
.learning-main strong{
  display:block;
  margin-top:4px;
  color:#172033;
  font-size:30px;
  line-height:1;
}
.learning-side{
  display:flex;
  gap:16px;
  align-items:center;
}
.learning-side > div{
  min-width:48px;
  text-align:center;
}
.learning-side b{
  display:block;
  margin-top:4px;
  color:#172033;
  font-size:18px;
  line-height:1;
}
.my-learning-head .danger{
  color:#c66a6a !important;
  font-size:11px !important;
}
@media(max-width:560px){
  .my-learning-card{
    min-height:82px;
    padding:12px 14px;
    border-radius:13px;
  }
  .learning-main strong{
    font-size:27px;
  }
  .learning-side{
    gap:10px;
  }
  .learning-side > div{
    min-width:42px;
  }
  .learning-side b{
    font-size:16px;
  }
}


/* ===== V0.3 搜索 + 全部列表 ===== */
.search-row{display:flex !important;margin:9px 0 !important;}
.search{width:100%;height:42px;display:flex;align-items:center;gap:8px;padding:0 12px;box-sizing:border-box;background:#fff;border:1px solid #e1e7ef;border-radius:12px;}
.search span{font-size:15px;line-height:1;}
.search input{width:100%;border:0;outline:0;background:transparent;color:#172033;font:inherit;font-size:13px;}
.search input::placeholder{color:#9aa5b4;}
.section-actions{display:flex;align-items:center;gap:10px;white-space:nowrap;}
.list-modal{position:fixed;inset:0;background:rgba(15,23,42,.42);display:none;z-index:100;}
.list-modal.show{display:flex;align-items:flex-end;}
.list-modal-content{width:100%;height:80vh;background:#f6f8fb;border-radius:20px 20px 0 0;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 -8px 30px rgba(0,0,0,.12);}
.list-modal-header{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:#fff;border-bottom:1px solid #e8edf3;flex:0 0 auto;}
.list-modal-header h3{margin:0;font-size:16px;color:#172033;}
.list-modal-body{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:10px;-webkit-overflow-scrolling:touch;}
.list-modal-body .knowledge{width:100% !important;min-width:0 !important;height:auto !important;min-height:0 !important;box-sizing:border-box;}
.list-modal-body .knowledge h3{font-size:15px;}
.list-modal-body .knowledge p{font-size:12px;}
.empty-state{display:flex;align-items:center;justify-content:center;min-height:120px;color:#98a3b2;font-size:13px;}
@media(max-width:560px){.list-modal-content{height:82vh;border-radius:18px 18px 0 0;}.list-modal-header{padding:12px 15px;}.list-modal-body{padding:10px;gap:8px}.section-actions{gap:8px}.search{height:40px}}

/* ===== V0.4 修复 ===== */
.modules{
  grid-template-columns:repeat(4,1fr) !important;
  gap:6px !important;
}
.module{
  padding:6px 3px !important;
  border-radius:10px !important;
}
.module .ico{
  font-size:16px !important;
  margin-bottom:1px !important;
}
.module b{
  font-size:11px !important;
  line-height:1.15 !important;
}
.module small{
  font-size:7px !important;
  line-height:1.1 !important;
  margin-top:1px !important;
}
.learned-strip{
  display:flex;
  gap:10px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  padding:0 0 8px;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  min-height:92px;
}
.learned-strip::-webkit-scrollbar{display:none !important}
.learned-card{
  flex:0 0 220px;
  width:220px;
  height:92px;
  min-height:92px;
  background:#fff;
  border:1px solid #e1e7ef;
  border-radius:14px;
  padding:12px 14px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  gap:5px;
  scroll-snap-align:start;
  position:relative;
  overflow:hidden;
}
.learned-card .tag{
  font-size:10px !important;
  padding:3px 6px !important;
  align-self:flex-start;
  white-space:nowrap;
}
.learned-card h4{
  font-size:13px;
  margin:0;
  color:#172033;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  padding-right:16px;
}
.learned-remove{
  position:absolute;
  top:6px;
  right:8px;
  background:transparent;
  border:0;
  color:#a8b3c2;
  font-size:16px;
  line-height:1;
  padding:2px 6px;
  cursor:pointer;
  border-radius:6px;
}
.learned-remove:hover{color:#c66a6a;background:#f8f2f2}
#viewAllBtn,
#randomBtn{
  font-size:14px !important;
  font-weight:500 !important;
  padding:4px 0 !important;
  color:#3974b5 !important;
  border:0 !important;
  background:transparent !important;
}
@media(max-width:560px){
  .modules{gap:5px !important}
  .module{padding:6px 3px !important}
  .module .ico{font-size:15px !important}
  .module b{font-size:10px !important}
  .module small{font-size:7px !important}
  .learned-strip{min-height:82px}
  .learned-card{
    flex:0 0 200px;
    width:200px;
    height:82px;
    min-height:82px;
    padding:10px 12px;
  }
  .learned-card h4{font-size:12px}
}

/* ===== V0.5 收藏/错题/进度/主题/导入导出 ===== */
.learning-item{
  border:0;
  background:transparent;
  padding:0;
  min-width:48px;
  text-align:center;
  cursor:pointer;
  font-family:inherit;
  color:inherit;
  border-radius:8px;
  transition:background .15s;
}
.learning-item:active{background:#edf5ff;}
.learning-item span{display:block;color:#94a0b0;font-size:10px;line-height:1.2;}
.learning-item b{display:block;margin-top:4px;color:#172033;font-size:18px;line-height:1;}

.wrong-item{
  background:#fff;
  border:1px solid #e1e7ef;
  border-radius:12px;
  padding:14px 16px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.wrong-item h3{font-size:14px;margin:0;line-height:1.45;color:#172033;}
.wrong-meta{font-size:11px;color:#8a95a5;}
.wrong-answer{
  background:#edf9f1;
  border-left:3px solid #8ac99d;
  padding:8px 10px;
  border-radius:6px;
  font-size:12px;
  color:#356d47;
}
.wrong-answer b{color:#1f5c34;}
.wrong-explain{
  font-size:12px;
  color:#657184;
  background:#f6f8fb;
  padding:8px 10px;
  border-radius:6px;
  line-height:1.5;
}
.wrong-remove{
  align-self:flex-start;
  border:1px solid #e2a0a0;
  background:#fff;
  color:#b86a6a;
  border-radius:8px;
  padding:5px 10px;
  font-size:12px;
}

.my-learning-head .section-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.my-learning-head .text-btn{
  font-size:12px !important;
  padding:4px 6px !important;
  white-space:nowrap;
}
.hero-card small b{
  color:#3974b5;
  font-weight:600;
  font-size:11px;
}

/* 深色模式 */
html.dark body{background:#0f172a;color:#e5ecf5;}
html.dark .hero{background:linear-gradient(135deg,#1a2332,#131c2b);border-color:#2a3546;}
html.dark .hero h1,
html.dark .hero-card strong,
html.dark .section-head h2,
html.dark .module b,
html.dark .knowledge h3,
html.dark .quiz-card h3,
html.dark .learning-main strong,
html.dark .learning-item b,
html.dark .learned-card h4,
html.dark .list-modal-header h3,
html.dark .wrong-item h3{color:#e5ecf5;}
html.dark .hero p,
html.dark .eyebrow,
html.dark .section-head span,
html.dark .module small,
html.dark .learning-main span,
html.dark .learning-item span,
html.dark .wrong-meta{color:#94a3b8;}
html.dark .hero-card{background:#1a2332;border-color:#2a3546;}
html.dark .hero-card span,
html.dark .hero-card small{color:#94a3b8;}
html.dark .hero-card small b{color:#7bb0e8;}
html.dark .module{background:#1a2332;border-color:#2a3546;color:#e5ecf5;}
html.dark .module.active{background:#1e3a5f;border-color:#3a5a86;color:#7bb0e8;}
html.dark .quiz-card,
html.dark .knowledge,
html.dark .my-learning-card,
html.dark .learned-card,
html.dark .wrong-item{background:#1a2332;border-color:#2a3546;}
html.dark .option{background:#232f42;border-color:#2f3e54;color:#e5ecf5;}
html.dark .option:hover{border-color:#4a6fa5;}
html.dark .option.correct{background:#173a26;border-color:#3d7a52;color:#b8e6c8;}
html.dark .option.wrong{background:#3a1e1e;border-color:#7a3d3d;color:#f0c0c0;}
html.dark .answer{background:#232f42;color:#b8c5d6;}
html.dark .tag{background:#1e3a5f;color:#7bb0e8;}
html.dark .search{background:#1a2332;border-color:#2a3546;}
html.dark .search input{color:#e5ecf5;}
html.dark .search span{color:#94a3b8;}
html.dark .list-modal-content{background:#131c2b;}
html.dark .list-modal-header{background:#1a2332;border-color:#2a3546;}
html.dark .list-modal-body{background:#131c2b;}
html.dark .empty-state{color:#64748b;}
html.dark .fav{background:#232f42;color:#e5ecf5;}
html.dark .fav.on{background:#3a2f1a;color:#f0c26b;}
html.dark .learn{background:#1e3a5f;color:#7bb0e8;}
html.dark .text-btn{color:#7bb0e8;}
html.dark .text-btn.danger{color:#e08a8a !important;}
html.dark .learning-item:active{background:#1e3a5f;}
html.dark .wrong-answer{background:#173a26;border-color:#3d7a52;color:#b8e6c8;}
html.dark .wrong-answer b{color:#a4e0ba;}
html.dark .wrong-explain{background:#232f42;color:#b8c5d6;}
html.dark .wrong-remove{background:#1a2332;border-color:#7a3d3d;color:#e08a8a;}
html.dark .learned-remove{color:#64748b;}
html.dark .learned-remove:hover{background:#3a1e1e;color:#e08a8a;}
html.dark .list-modal{background:rgba(0,0,0,.6);}
html.dark .toast{background:#e5ecf5;color:#172033;}

@media(max-width:560px){
  .learning-item{min-width:42px;}
  .learning-item b{font-size:16px;}
  .my-learning-head .section-actions{gap:4px;}
  .my-learning-head .text-btn{font-size:11px !important;padding:3px 4px !important;}
}


/* ===== V0.6 按钮统一样式 ===== */

.my-learning-head .section-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.my-learning-head .text-btn {
  border: 1px solid #dfe6ef !important;
  background: #fff !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  color: #3974b5 !important;
  line-height: 1.2 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  transition: background .15s, border-color .15s;
}
.my-learning-head .text-btn:active {
  background: #edf5ff !important;
  border-color: #c7def7 !important;
}
.my-learning-head .text-btn.danger {
  color: #b86a6a !important;
}
.my-learning-head .text-btn.danger:active {
  background: #fdf2f2 !important;
  border-color: #e2a0a0 !important;
}

.learning-item {
  border: 1px solid #e1e7ef !important;
  background: #f8fafc !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  min-width: 64px !important;
  cursor: pointer;
  transition: all .15s ease;
}
.learning-item:active {
  background: #edf5ff !important;
  border-color: #c7def7 !important;
  transform: scale(0.97);
}
.learning-item span {
  color: #64748b !important;
  font-size: 10px !important;
}
.learning-item b {
  color: #0f172a !important;
  font-size: 18px !important;
  margin-top: 4px !important;
}

html.dark .my-learning-head .text-btn {
  border-color: #2a3546 !important;
  background: #1a2332 !important;
  color: #7bb0e8 !important;
}
html.dark .my-learning-head .text-btn:active {
  background: #1e3a5f !important;
  border-color: #3a5a86 !important;
}
html.dark .my-learning-head .text-btn.danger {
  color: #e08a8a !important;
}
html.dark .my-learning-head .text-btn.danger:active {
  background: #3a1e1e !important;
  border-color: #7a3d3d !important;
}
html.dark .learning-item {
  border-color: #2a3546 !important;
  background: #232f42 !important;
}
html.dark .learning-item:active {
  background: #1e3a5f !important;
  border-color: #3a5a86 !important;
}
html.dark .learning-item span {
  color: #94a3b8 !important;
}
html.dark .learning-item b {
  color: #e5ecf5 !important;
}

@media(max-width: 560px) {
  .my-learning-head .section-actions {
    gap: 5px;
  }
  .my-learning-head .text-btn {
    padding: 5px 9px !important;
    font-size: 11px !important;
  }
  .learning-item {
    min-width: 56px !important;
    padding: 6px 10px !important;
  }
  .learning-item b {
    font-size: 16px !important;
  }
}


/* ===== V0.7 按钮样式统一 ===== */

/* 1. 下一题、查看全部、随机学 统一为胶囊按钮 */
#nextQuiz,
#viewAllBtn,
#randomBtn {
  border: 1px solid #dfe6ef !important;
  background: #fff !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  color: #3974b5 !important;
  line-height: 1.2 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
  transition: background .15s, border-color .15s !important;
  white-space: nowrap;
}
#nextQuiz:active,
#viewAllBtn:active,
#randomBtn:active {
  background: #edf5ff !important;
  border-color: #c7def7 !important;
}

.knowledge-viewport .fav,
.knowledge-viewport .learn {
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  box-sizing: border-box;
}
.knowledge-viewport .fav {
  background: #f6f8fb !important;
  border-color: #e1e7ef !important;
  color: #64748b !important;
}
.knowledge-viewport .fav.on {
  background: #fff2d8 !important;
  border-color: #f0d9a8 !important;
  color: #b8860b !important;
}
.knowledge-viewport .learn {
  background: #edf5ff !important;
  border-color: #c7def7 !important;
  color: #3974b5 !important;
}
html.dark #nextQuiz,
html.dark #viewAllBtn,
html.dark #randomBtn {
  border-color: #2a3546 !important;
  background: #1a2332 !important;
  color: #7bb0e8 !important;
}
html.dark #nextQuiz:active,
html.dark #viewAllBtn:active,
html.dark #randomBtn:active {
  background: #1e3a5f !important;
  border-color: #3a5a86 !important;
}
html.dark .knowledge-viewport .fav {
  background: #232f42 !important;
  border-color: #2f3e54 !important;
  color: #94a3b8 !important;
}
html.dark .knowledge-viewport .fav.on {
  background: #3a2f1a !important;
  border-color: #6b5424 !important;
  color: #f0c26b !important;
}
html.dark .knowledge-viewport .learn {
  background: #1e3a5f !important;
  border-color: #3a5a86 !important;
  color: #7bb0e8 !important;
}
@media(max-width: 560px) {
  #nextQuiz,
  #viewAllBtn,
  #randomBtn {
    padding: 5px 10px !important;
    font-size: 11px !important;
  }
  .knowledge-viewport .fav,
  .knowledge-viewport .learn {
    padding: 5px 10px !important;
    font-size: 11px !important;
    min-height: 28px;
  }
}

/* ===== V0.9 Tab 白底 + 位置调整 ===== */

.tab-bar{
  display:flex;
  gap:8px;
  margin:14px 0 10px;
  padding:0;
}
.tab-btn{
  flex:1;
  border:1px solid #e1e7ef;
  background:#fff;
  border-radius:10px;
  padding:10px 12px;
  font-size:14px;
  font-weight:500;
  color:#64748b;
  cursor:pointer;
  transition:all .15s ease;
  box-shadow:0 1px 2px rgba(0,0,0,0.02);
}
.tab-btn.active{
  background:#edf5ff;
  border-color:#c7def7;
  color:#3974b5;
  font-weight:600;
}
.tab-btn:active{transform:scale(0.98);}

html.dark .tab-btn{
  background:#1a2332;
  border-color:#2a3546;
  color:#94a3b8;
}
html.dark .tab-btn.active{
  background:#1e3a5f;
  border-color:#3a5a86;
  color:#7bb0e8;
}

/* ===== V0.9 工具页与工具弹窗 ===== */
.tools-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}
.tool-card{appearance:none;border:1px solid #e1e7ef;background:#fff;border-radius:12px;padding:14px;text-align:left;display:flex;flex-direction:column;gap:5px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.03);transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.tool-card:active{transform:scale(.98)}
.tool-card .tool-icon{font-size:24px;line-height:1.2}
.tool-card b{font-size:14px;color:#1f2937}
.tool-card small{font-size:12px;color:#64748b;line-height:1.4}
.tool-modal{position:fixed;inset:0;z-index:1000;background:rgba(15,23,42,.45);display:none;align-items:flex-end;justify-content:center;padding:16px}
.tool-modal.show{display:flex}
.tool-modal-content{width:min(100%,520px);max-height:86vh;overflow:auto;background:#fff;border-radius:16px;padding:16px;box-shadow:0 16px 50px rgba(0,0,0,.2)}
.tool-modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.tool-modal-header h3{margin:0;font-size:18px;color:#1f2937}
.tool-modal-body{font-size:14px}
.tool-field{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.tool-field label{font-size:13px;color:#475569;font-weight:600}
.tool-field input,.tool-field select,.tool-field textarea{box-sizing:border-box;width:100%;border:1px solid #dbe3ec;border-radius:10px;padding:10px 11px;background:#fff;color:#1f2937;font:inherit;outline:none}
.tool-field input:focus,.tool-field select:focus,.tool-field textarea:focus{border-color:#9fc4e8;box-shadow:0 0 0 3px rgba(59,116,181,.08)}
.tool-btn{width:100%;border:0;border-radius:10px;padding:10px 12px;margin:7px 0;background:#3974b5;color:#fff;font-size:14px;font-weight:600;cursor:pointer}
.tool-btn:active{transform:scale(.99)}
.tool-result{margin:10px 0;padding:10px 11px;border-radius:10px;background:#f5f8fc;color:#334155;min-height:20px;line-height:1.55}
.tool-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tool-result-grid>div{padding:9px;border-radius:9px;background:#fff;border:1px solid #e6ebf2;display:flex;flex-direction:column;gap:3px}
.tool-result-grid span{font-size:11px;color:#64748b}.tool-result-grid b{font-size:17px;color:#1f2937}
.tool-hr{border:0;border-top:1px solid #e8edf3;margin:16px 0}
.tool-note{font-size:12px;color:#94a3b8;line-height:1.5;margin:9px 0}
html.dark .tool-card{background:#1a2332;border-color:#2a3546}
html.dark .tool-card b{color:#e2e8f0}html.dark .tool-card small{color:#94a3b8}
html.dark .tool-modal{background:rgba(2,6,23,.62)}html.dark .tool-modal-content{background:#111827}
html.dark .tool-modal-header h3{color:#e2e8f0}
html.dark .tool-field label{color:#cbd5e1}
html.dark .tool-field input,html.dark .tool-field select,html.dark .tool-field textarea{background:#1a2332;border-color:#334155;color:#e2e8f0}
html.dark .tool-result{background:#1a2332;color:#cbd5e1}html.dark .tool-result-grid>div{background:#111827;border-color:#334155}html.dark .tool-result-grid b{color:#e2e8f0}
@media (max-width:480px){.tools-grid{gap:8px}.tool-card{padding:12px}.tool-modal{padding:10px}.tool-modal-content{border-radius:14px;padding:14px}}


/* ===== V0.10 工具模块区动态卡片 ===== */
#toolModules{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
  margin-bottom:4px;
}
#toolModules .module{
  display:block;
  border:1px solid #e1e7ef;
  background:#fff;
  border-radius:11px;
  padding:7px 5px;
  text-align:center;
  color:#172033;
  cursor:pointer;
  transition:all .15s ease;
}
#toolModules .module.active{
  background:#edf5ff;
  border-color:#c7def7;
  color:#3974b5;
}
#toolModules .module:active{transform:scale(0.98);}
#toolModules .module .ico{display:block;font-size:18px;margin-bottom:2px;}
#toolModules .module b{display:block;font-size:12px;line-height:1.2;margin:0;font-weight:500;}
#toolModules .module small{display:block;font-size:8px;line-height:1.15;color:#929cab;margin-top:2px;}

html.dark #toolModules .module{background:#1a2332;border-color:#2a3546;color:#e5ecf5;}
html.dark #toolModules .module.active{background:#1e3a5f;border-color:#3a5a86;color:#7bb0e8;}
html.dark #toolModules .module small{color:#94a3b8;}

@media(max-width:560px){
  #toolModules{gap:5px;}
  #toolModules .module{padding:7px 4px;}
  #toolModules .module .ico{font-size:17px;}
  #toolModules .module b{font-size:11px;}
  #toolModules .module small{font-size:7px;}
}


/* ===== V0.11 Tab 互斥显隐 ===== */
.hidden{ display: none !important; }


/* ===== V0.12 工具窗口 ===== */
.tool-window{
  height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e1e7ef;
  border-radius: 16px;
  padding: 16px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.tool-window .tool-field{margin-bottom:12px;}
.tool-window .empty-state{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;
  color:#98a3b2;
  font-size:13px;
}

/* 工具卡片选中态 */
.tool-card.active{
  background:#edf5ff;
  border-color:#c7def7;
}
.tool-card.active b{color:#3974b5;}

/* 夜间模式 */
html.dark .tool-window{background:#1a2332;border-color:#2a3546;}
html.dark .tool-window .empty-state{color:#64748b;}
html.dark .tool-card.active{background:#1e3a5f;border-color:#3a5a86;}
html.dark .tool-card.active b{color:#7bb0e8;}

@media(max-width:560px){
  .tool-window{
    height: 280px;
    padding: 14px;
    border-radius: 14px;
  }
}


/* ===== V0.13 工具窗口内嵌列表 ===== */
.tool-window{
  min-height: 320px;
}
.tool-window .tools-grid{
  margin-bottom: 0;
}

@media(max-width:560px){
  .tool-window{
    min-height: 280px;
  }
}


/* ===== V0.14 修复工具窗口滚动穿透 ===== */
.tool-window{
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* 工具窗口内表单元素阻止事件冒泡引起的页面滚动 */
.tool-window input,
.tool-window select,
.tool-window textarea,
.tool-window button{
  touch-action: manipulation;
}

/* ===== V0.14 缩小工具模块图标 ===== */
#toolModules .module .ico{
  font-size: 15px !important;
  margin-bottom: 1px !important;
}
#toolModules .module b{
  font-size: 11px !important;
  line-height: 1.15 !important;
}
#toolModules .module small{
  font-size: 7px !important;
  line-height: 1.1 !important;
  margin-top: 1px !important;
}
#toolModules .module{
  padding: 6px 3px !important;
  border-radius: 10px !important;
}

@media(max-width:560px){
  #toolModules .module{
    padding: 6px 3px !important;
  }
  #toolModules .module .ico{
    font-size: 14px !important;
  }
  #toolModules .module b{
    font-size: 10px !important;
  }
  #toolModules .module small{
    font-size: 7px !important;
  }
}


/* ===== V0.15 工具窗口紧凑化 ===== */
.tool-window .tool-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px;}
.tool-window .tool-row .tool-field{margin-bottom:0;min-width:0;}
.tool-window .tool-row input,.tool-window .tool-row select{min-width:0;}
.tool-window .tool-field{margin-bottom:10px;gap:4px;}
.tool-window .tool-field label{font-size:12px;}
.tool-window .tool-field input,.tool-window .tool-field select,.tool-window .tool-field textarea{padding:8px 10px;font-size:13px;border-radius:8px;}
.tool-window .tool-field input[type="date"]{min-height:38px;}
.tool-window .tool-field textarea{line-height:1.45;}
.tool-window .tool-btn{padding:9px 12px;font-size:13px;border-radius:8px;margin:4px 0 8px;}
.tool-window .tool-result{padding:9px 11px;font-size:13px;border-radius:8px;margin:8px 0;line-height:1.5;}
.tool-window .tool-result b{font-size:15px;}
.tool-window .tool-result-grid{gap:6px;}
.tool-window .tool-result-grid > div{padding:7px 8px;border-radius:8px;gap:2px;}
.tool-window .tool-result-grid span{font-size:10px;}
.tool-window .tool-result-grid b{font-size:15px;}
.tool-window .tool-hr{margin:12px 0;}
.tool-window .tool-note{font-size:11px;margin:6px 0 0;line-height:1.45;}
@media(max-width:560px){.tool-window .tool-row{gap:6px;}.tool-window .tool-field input,.tool-window .tool-field select,.tool-window .tool-field textarea{padding:7px 9px;font-size:13px;}.tool-window .tool-btn{padding:8px 10px;font-size:13px;}}


/* ===== V0.16 修复日期输入框溢出 ===== */
.tool-window .tool-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;}
.tool-window .tool-row .tool-field{min-width:0 !important;max-width:100% !important;}
.tool-window .tool-row input,.tool-window .tool-row select{width:100% !important;min-width:0 !important;max-width:100% !important;box-sizing:border-box !important;-webkit-appearance:none;appearance:none;}
.tool-window .tool-row input[type="date"]{display:block;}
.tool-window .tool-row input[type="date"]::-webkit-calendar-picker-indicator{margin-left:0;padding:0;}

/* ===== V0.16 实验工具 + 小贴士 ===== */
#expViewport .knowledge{display:flex;flex-direction:column;}
#expViewport .knowledge h3{font-size:15px;}
#expViewport .knowledge p{font-size:12px;margin-bottom:10px;}
.tool-note-inline{font-size:11px;color:#94a0b0;}
#tipsStrip .learned-card{height:auto !important;min-height:92px !important;padding:12px 14px !important;}
#tipsStrip .learned-card h4{-webkit-line-clamp:1;padding-right:0;margin-bottom:2px;}
.tip-body{font-size:11px;color:#687486;line-height:1.45;margin:0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
html.dark .tip-body{color:#94a3b8;} html.dark .tool-note-inline{color:#94a3b8;}


/* ===== V0.17 实验工具 + 工具使用时间 ===== */
#expStrip .learned-card{height:auto !important;min-height:92px !important;padding:12px 14px !important;cursor:default;}
#expStrip .learned-card.exp-ready{cursor:pointer;border-color:#c7def7;background:#f6fbff;}
#expStrip .learned-card.exp-ready:active{transform:scale(0.98);}
#expStrip .learned-card h4{-webkit-line-clamp:1;padding-right:0;margin-bottom:2px;}
#expStrip .learned-card .tip-body{margin:0;}
#toolStatsStrip .learned-card{height:auto !important;min-height:92px !important;padding:12px 14px !important;}
#toolStatsStrip .learned-card h4{-webkit-line-clamp:1;padding-right:0;margin-bottom:2px;}
#toolStatsStrip .learned-card .tip-body{margin:0;}
html.dark #expStrip .learned-card.exp-ready{background:#14263a;border-color:#3a5a86;}


/* ===== V0.18 Hero 收窄 + 动态文案 ===== */
.hero{
  min-height: 62px !important;
  padding: 8px 14px !important;
  border-radius: 12px !important;
}
.hero-text{
  flex: 1;
  min-width: 0;
}
.hero h1{
  font-size: 16px !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}
.hero p{
  font-size: 11px !important;
  margin: 3px 0 0 !important;
  line-height: 1.3 !important;
  color: #6f7b8e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-card{
  min-width: 70px !important;
  padding: 5px 8px !important;
  border-radius: 10px !important;
}
.hero-card strong{font-size: 18px !important;}
.hero-card span,
.hero-card small{font-size: 9px !important;}

@media(max-width:560px){
  .hero{
    min-height: 58px !important;
    padding: 7px 12px !important;
  }
  .hero h1{font-size: 15px !important;}
  .hero p{font-size: 10px !important;}
  .hero-card{
    min-width: 64px !important;
    padding: 4px 7px !important;
  }
  .hero-card strong{font-size: 17px !important;}
}

/* ===== V0.19 工具窗口返回按钮 ===== */
#toolBackBtn{
  border: 1px solid #dfe6ef !important;
  background: #fff !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  color: #3974b5 !important;
  line-height: 1.2 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
  transition: background .15s, border-color .15s !important;
  white-space: nowrap;
  font-weight: 500;
}
#toolBackBtn:active{
  background: #edf5ff !important;
  border-color: #c7def7 !important;
}

html.dark #toolBackBtn{
  border-color: #2a3546 !important;
  background: #1a2332 !important;
  color: #7bb0e8 !important;
}
html.dark #toolBackBtn:active{
  background: #1e3a5f !important;
  border-color: #3a5a86 !important;
}

@media(max-width:560px){
  #toolBackBtn{
    padding: 5px 12px !important;
    font-size: 11px !important;
  }
}

/* ===== V0.20 修复移动端输入框自动放大 ===== */
@media(max-width:560px){
  .tool-window .tool-field input,
  .tool-window .tool-field select,
  .tool-window .tool-field textarea{
    font-size: 16px !important;
  }
  .tool-window .tool-row input,
  .tool-window .tool-row select{
    font-size: 16px !important;
  }
}

/* ===== V0.21 功能模块改胶囊按钮 ===== */
#modules,#toolModules{display:grid !important;grid-template-columns:repeat(4,1fr) !important;gap:6px !important;margin-bottom:4px !important}
#modules .module,#toolModules .module{display:flex !important;align-items:center !important;justify-content:center !important;gap:4px !important;padding:8px 8px !important;border:1px solid #e1e7ef !important;background:#fff !important;border-radius:999px !important;text-align:center !important;color:#172033 !important;box-shadow:none !important;min-height:34px !important;height:34px !important;box-sizing:border-box !important;transition:all .15s ease !important;cursor:pointer;white-space:nowrap;overflow:hidden}
#modules .module.active,#toolModules .module.active{background:#edf5ff !important;border-color:#c7def7 !important;color:#3974b5 !important}
#modules .module:active,#toolModules .module:active{transform:scale(0.97)}
#modules .module .ico,#toolModules .module .ico{display:inline-block !important;font-size:14px !important;margin:0 !important;line-height:1 !important}
#modules .module b,#toolModules .module b{display:inline-block !important;font-size:12px !important;line-height:1 !important;margin:0 !important;font-weight:500 !important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:calc(100% - 20px)}
#modules .module small,#toolModules .module small{display:none !important}
html.dark #modules .module,html.dark #toolModules .module{background:#1a2332 !important;border-color:#2a3546 !important;color:#e5ecf5 !important}
html.dark #modules .module.active,html.dark #toolModules .module.active{background:#1e3a5f !important;border-color:#3a5a86 !important;color:#7bb0e8 !important}
@media(max-width:560px){#modules,#toolModules{grid-template-columns:repeat(4,1fr) !important;gap:5px !important}#modules .module,#toolModules .module{padding:7px 6px !important;min-height:32px !important;height:32px !important}#modules .module .ico,#toolModules .module .ico{font-size:13px !important}#modules .module b,#toolModules .module b{font-size:11px !important}}


/* ===== V0.22 修复 Tab 互斥失效 ===== */
#modules:not(.hidden),
#toolModules:not(.hidden){
  display: grid !important;
}
#modules.hidden,
#toolModules.hidden{
  display: none !important;
}


/* ===== V0.23 修复查看全部弹窗卡片 ===== */
#listModalBody .knowledge,
#listModalBody .knowledge.list-item{
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 130px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 14px 16px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  gap: 4px;
}

#listModalBody .knowledge .tag{
  display: inline-block !important;
  align-self: flex-start;
  font-size: 11px !important;
  padding: 4px 8px !important;
}

#listModalBody .knowledge h3{
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  margin: 8px 0 4px !important;
  color: #172033;
}

#listModalBody .knowledge p{
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  margin: 0 0 10px !important;
  color: #687486;
}

#listModalBody .knowledge .card-foot{
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: auto !important;
  gap: 10px;
}

#listModalBody .knowledge .fav,
#listModalBody .knowledge .learn{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 6px 12px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  min-height: 30px;
  box-sizing: border-box;
}

/* 夜间模式 */
html.dark #listModalBody .knowledge h3{color:#e5ecf5;}
html.dark #listModalBody .knowledge p{color:#94a3b8;}
html.dark #listModalBody .knowledge .fav{
  background:#232f42 !important;
  border-color:#2f3e54 !important;
  color:#94a3b8 !important;
}
html.dark #listModalBody .knowledge .fav.on{
  background:#3a2f1a !important;
  border-color:#6b5424 !important;
  color:#f0c26b !important;
}
html.dark #listModalBody .knowledge .learn{
  background:#1e3a5f !important;
  border-color:#3a5a86 !important;
  color:#7bb0e8 !important;
}

/* ===== V0.24 打卡日历 + 进度条 + 今日必答 ===== */
.learning-main .progress-bar{width:100%;max-width:140px;height:6px;background:#eef2f7;border-radius:999px;margin-top:8px;overflow:hidden;}
.learning-main .progress-fill{height:100%;width:0%;background:linear-gradient(90deg,#6ba9e8,#3974b5);border-radius:999px;transition:width .3s ease;}
.learning-main .progress-text{display:block;font-size:10px;color:#94a0b0;margin-top:3px;line-height:1.2;}
.checkin-strip{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-bottom:4px;}
.checkin-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 2px;border-radius:10px;background:#f6f8fb;border:1px solid #e8edf3;color:#94a0b0;transition:all .15s ease;}
.checkin-day span{font-size:10px;line-height:1;}
.checkin-day b{font-size:13px;font-weight:600;line-height:1;}
.checkin-day.on{background:#edf5ff;border-color:#c7def7;color:#3974b5;}
.checkin-day.on b{color:#3974b5;}
.today-badge{display:inline-block;vertical-align:middle;margin-left:6px;padding:2px 7px;border-radius:999px;background:#fff2d8;color:#b8860b;font-size:10px;font-weight:500;line-height:1.4;}
.today-badge.done{background:#e6f6ea;color:#2f8f47;}
html.dark .learning-main .progress-bar{background:#232f42;}
html.dark .learning-main .progress-fill{background:linear-gradient(90deg,#4a7cb8,#7bb0e8);}
html.dark .learning-main .progress-text{color:#94a3b8;}
html.dark .checkin-day{background:#1a2332;border-color:#2a3546;color:#64748b;}
html.dark .checkin-day.on{background:#1e3a5f;border-color:#3a5a86;color:#7bb0e8;}
html.dark .checkin-day.on b{color:#7bb0e8;}
html.dark .today-badge{background:#3a2f1a;color:#f0c26b;}
html.dark .today-badge.done{background:#173a26;color:#7ee89a;}
@media(max-width:560px){
  .learning-main .progress-bar{max-width:110px;}
  .checkin-strip{gap:4px;}
  .checkin-day{padding:6px 1px;border-radius:8px;}
  .checkin-day span{font-size:9px;}
  .checkin-day b{font-size:12px;}
}

/* ===== V0.25 D 体验细节 ===== */
.wrong-redo{
  border: 1px solid #c7def7;
  background: #edf5ff;
  color: #3974b5;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
}
.wrong-redo:active{background:#d8e9fb;}
html.dark .wrong-redo{background:#1e3a5f;border-color:#3a5a86;color:#7bb0e8;}

#clearAllFavBtn{
  border: 1px solid #dfe6ef;
  background: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  color: #b86a6a;
}
html.dark #clearAllFavBtn{background:#1a2332;border-color:#2a3546;color:#e08a8a;}


/* ===== V0.26 搜索升级 ===== */
.search-hint-row{margin:-4px 0 10px;padding:6px 12px;background:#edf5ff;border-radius:8px;font-size:12px;color:#3974b5;}
html.dark .search-hint-row{background:#1e3a5f;color:#7bb0e8;}
.tool-note-inline{font-size:11px;color:#94a0b0;}
html.dark .tool-note-inline{color:#94a3b8;}

/* ===== V0.28 新办公工具 ===== */
.tool-window .tool-result code{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #334155;
  background: #f3f6fa;
  padding: 2px 6px;
  border-radius: 5px;
  word-break: break-all;
}
html.dark .tool-window .tool-result code{
  background: #232f42;
  color: #cbd5e1;
}
.tool-cat-row{display:flex;gap:8px;margin-bottom:10px;overflow-x:auto;}
.tool-cat-btn,.tool-common-btn{border:1px solid #dfe6ef;background:#fff;border-radius:9px;padding:7px 11px;font-size:12px;color:#526173;white-space:nowrap;}
.tool-cat-btn.active{background:#edf5ff;border-color:#bcd7f3;color:#3974b5;font-weight:600;}
.tool-common-title{font-size:12px;color:#7a8797;margin:4px 0 6px;}
.tool-common-row{display:flex;gap:7px;overflow-x:auto;margin-bottom:10px;}
.tool-common-btn{background:#f7f9fc;}
.tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
html.dark .tool-cat-btn,html.dark .tool-common-btn{background:#1a2332;border-color:#2a3546;color:#cbd5e1;}
html.dark .tool-cat-btn.active{background:#1e3a5f;border-color:#3a5a86;color:#7bb0e8;}
@media(max-width:420px){.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}


/* ===== V0.29 修复工具模块布局错乱 ===== */
#toolModules{
  display: block !important;
  margin-bottom: 4px !important;
}
.tool-cat-row{
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tool-cat-row::-webkit-scrollbar{ display: none; }
.tool-cat-btn{
  border: 1px solid #dfe6ef;
  background: #fff;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 13px;
  color: #526173;
  white-space: nowrap;
  font-weight: 500;
  flex-shrink: 0;
  cursor: pointer;
  transition: all .15s ease;
}
.tool-cat-btn.active{
  background: #edf5ff;
  border-color: #bcd7f3;
  color: #3974b5;
  font-weight: 600;
}
.tool-common-title{
  font-size: 12px;
  color: #7a8797;
  margin: 4px 0 8px;
  font-weight: 500;
}
.tool-common-row{
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tool-common-row::-webkit-scrollbar{ display: none; }
.tool-common-btn{
  border: 1px solid #dfe6ef;
  background: #f7f9fc;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 12px;
  color: #526173;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all .15s ease;
}
.tool-common-btn:active{ transform: scale(0.97); }
.tool-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tool-grid .module{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 10px 4px !important;
  border: 1px solid #e1e7ef !important;
  background: #fff !important;
  border-radius: 12px !important;
  text-align: center !important;
  color: #172033 !important;
  box-shadow: none !important;
  min-height: 68px !important;
  height: auto !important;
  cursor: pointer;
  transition: all .15s ease;
}
.tool-grid .module.active{
  background: #edf5ff !important;
  border-color: #c7def7 !important;
  color: #3974b5 !important;
}
.tool-grid .module .ico{
  display: inline-block !important;
  font-size: 20px !important;
  margin: 0 !important;
  line-height: 1 !important;
}
.tool-grid .module b{
  display: block !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  font-weight: 500 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
html.dark #toolModules .tool-cat-btn,
html.dark #toolModules .tool-common-btn{
  background: #1a2332;
  border-color: #2a3546;
  color: #cbd5e1;
}
html.dark #toolModules .tool-cat-btn.active{
  background: #1e3a5f;
  border-color: #3a5a86;
  color: #7bb0e8;
}
html.dark .tool-grid .module{
  background: #1a2332 !important;
  border-color: #2a3546 !important;
  color: #e5ecf5 !important;
}
html.dark .tool-grid .module.active{
  background: #1e3a5f !important;
  border-color: #3a5a86 !important;
  color: #7bb0e8 !important;
}
@media(max-width: 560px){
  .tool-grid{
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .tool-grid .module{
    min-height: 62px !important;
  }
  .tool-grid .module .ico{
    font-size: 18px !important;
  }
  .tool-grid .module b{
    font-size: 10px !important;
  }
}


/* ===== V0.30 彻底修复工具模块布局错乱 ===== */
#toolModules:not(.hidden) {
  display: block !important;
  grid-template-columns: none !important;
}
#toolModules .tool-cat-row {
  display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important;
  overflow-x: auto !important; gap: 8px !important; padding-bottom: 6px !important; margin-bottom: 10px !important;
  scrollbar-width: none !important; -webkit-overflow-scrolling: touch !important;
}
#toolModules .tool-cat-row::-webkit-scrollbar { display: none !important; }
#toolModules .tool-cat-btn {
  display: block !important; height: auto !important; min-height: 36px !important; border-radius: 999px !important;
  padding: 8px 16px !important; flex-shrink: 0 !important; border: 1px solid #dfe6ef !important;
  background: #fff !important; font-size: 13px !important; color: #526173 !important;
}
#toolModules .tool-cat-btn.active { background:#edf5ff !important; border-color:#bcd7f3 !important; color:#3974b5 !important; font-weight:600 !important; }
#toolModules .tool-common-row {
  display:flex !important; flex-direction:row !important; flex-wrap:nowrap !important; overflow-x:auto !important;
  gap:8px !important; padding-bottom:8px !important; margin-bottom:12px !important; scrollbar-width:none !important;
  -webkit-overflow-scrolling:touch !important;
}
#toolModules .tool-common-row::-webkit-scrollbar { display:none !important; }
#toolModules .tool-common-btn {
  display:block !important; height:auto !important; min-height:36px !important; border-radius:9px !important;
  padding:8px 14px !important; flex-shrink:0 !important; border:1px solid #dfe6ef !important;
  background:#f7f9fc !important; font-size:12px !important; color:#526173 !important;
}
#toolModules .tool-grid { display:grid !important; grid-template-columns:repeat(4,1fr) !important; gap:8px !important; }
#toolModules .tool-grid .module {
  display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:center !important;
  height:auto !important; min-height:68px !important; border-radius:12px !important; padding:10px 4px !important;
  white-space:normal !important; gap:4px !important; border:1px solid #e1e7ef !important; background:#fff !important;
  color:#172033 !important; box-shadow:none !important;
}
#toolModules .tool-grid .module.active { background:#edf5ff !important; border-color:#c7def7 !important; color:#3974b5 !important; }
#toolModules .tool-grid .module .ico { display:block !important; font-size:20px !important; margin:0 !important; line-height:1 !important; }
#toolModules .tool-grid .module b {
  display:block !important; font-size:11px !important; line-height:1.2 !important; margin:0 !important; width:100% !important;
  text-align:center !important; white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important;
}
html.dark #toolModules .tool-cat-btn, html.dark #toolModules .tool-common-btn { background:#1a2332 !important; border-color:#2a3546 !important; color:#cbd5e1 !important; }
html.dark #toolModules .tool-cat-btn.active { background:#1e3a5f !important; border-color:#3a5a86 !important; color:#7bb0e8 !important; }
html.dark #toolModules .tool-grid .module { background:#1a2332 !important; border-color:#2a3546 !important; color:#e5ecf5 !important; }
html.dark #toolModules .tool-grid .module.active { background:#1e3a5f !important; border-color:#3a5a86 !important; color:#7bb0e8 !important; }
@media(max-width:560px) {
  #toolModules .tool-grid { grid-template-columns:repeat(3,1fr) !important; gap:6px !important; }
  #toolModules .tool-grid .module { min-height:62px !important; }
  #toolModules .tool-grid .module .ico { font-size:18px !important; }
  #toolModules .tool-grid .module b { font-size:10px !important; }
}


/* ===== V0.31 常用工具下移 ===== */
#commonStrip .learned-card{
  cursor: pointer;
}
#commonStrip .learned-card:active{
  transform: scale(0.98);
  background: #f6fbff;
}
#commonStrip .learned-card h4{
  -webkit-line-clamp: 1;
  padding-right: 0;
  margin-bottom: 2px;
}
#commonStrip .learned-card .tip-body{
  margin: 0;
}
html.dark #commonStrip .learned-card:active{
  background: #14263a;
}


/* ===== V0.33 工具页模块与学习页统一 + 分类上移 ===== */

/* 1. 分类按钮与"点击切换内容"同行 */
.category-sub{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.category-sub > span{
  font-size: 10px;
  color: #8a95a5;
  line-height: 1.25;
}
.tool-cats{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tool-cat-btn{
  border: 1px solid #dfe6ef;
  background: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  color: #526173;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s ease;
  line-height: 1.3;
}
.tool-cat-btn.active{
  background: #edf5ff;
  border-color: #bcd7f3;
  color: #3974b5;
  font-weight: 600;
}
.tool-cat-btn:active{ transform: scale(0.97); }

/* 2. 工具网格改为学习页胶囊样式 */
#toolModules .tool-grid{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 6px !important;
}
#toolModules .tool-grid .module{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 8px 6px !important;
  border: 1px solid #e1e7ef !important;
  background: #fff !important;
  border-radius: 999px !important;
  text-align: center !important;
  color: #172033 !important;
  box-shadow: none !important;
  min-height: 34px !important;
  height: 34px !important;
  box-sizing: border-box !important;
  cursor: pointer;
  transition: all .15s ease !important;
  white-space: nowrap;
  overflow: hidden;
}
#toolModules .tool-grid .module.active{
  background: #edf5ff !important;
  border-color: #c7def7 !important;
  color: #3974b5 !important;
}
#toolModules .tool-grid .module .ico{
  display: inline-block !important;
  font-size: 14px !important;
  margin: 0 !important;
  line-height: 1 !important;
  flex-shrink: 0;
}
#toolModules .tool-grid .module b{
  display: inline-block !important;
  font-size: 12px !important;
  line-height: 1 !important;
  margin: 0 !important;
  font-weight: 500 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 20px);
}

/* 3. 分类按钮与工具网格间距压缩 */
#toolModules{
  margin-bottom: 2px !important;
}

/* 4. 夜间模式 */
html.dark .tool-cat-btn{
  background: #1a2332;
  border-color: #2a3546;
  color: #94a3b8;
}
html.dark .tool-cat-btn.active{
  background: #1e3a5f;
  border-color: #3a5a86;
  color: #7bb0e8;
}
html.dark #toolModules .tool-grid .module{
  background: #1a2332 !important;
  border-color: #2a3546 !important;
  color: #e5ecf5 !important;
}
html.dark #toolModules .tool-grid .module.active{
  background: #1e3a5f !important;
  border-color: #3a5a86 !important;
  color: #7bb0e8 !important;
}

/* 5. 手机端微调 */
@media(max-width:560px){
  #toolModules .tool-grid{
    grid-template-columns: repeat(4, minmax(0,1fr)) !important;
    gap: 5px !important;
  }
  #toolModules .tool-grid .module{
    padding: 7px 5px !important;
    min-height: 32px !important;
    height: 32px !important;
  }
  #toolModules .tool-grid .module .ico{
    font-size: 13px !important;
  }
  #toolModules .tool-grid .module b{
    font-size: 11px !important;
  }
  .tool-cat-btn{
    padding: 3px 9px;
    font-size: 10px;
  }
}

/* ===== V0.34 工具按钮增加文字提示 ===== */
#toolModules .tool-grid{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: 8px !important;
}
#toolModules .tool-grid .module{
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border: 1px solid #e1e7ef !important;
  background: #fff !important;
  border-radius: 12px !important;
  text-align: left !important;
  color: #172033 !important;
  box-shadow: none !important;
  min-height: 60px !important;
  height: auto !important;
  box-sizing: border-box !important;
  cursor: pointer;
  transition: all .15s ease !important;
  white-space: normal;
  overflow: hidden;
}
#toolModules .tool-grid .module.active{
  background: #edf5ff !important;
  border-color: #c7def7 !important;
  color: #3974b5 !important;
}
#toolModules .tool-grid .module .ico{
  display: block !important;
  font-size: 22px !important;
  margin: 0 !important;
  line-height: 1 !important;
  flex-shrink: 0;
  width: 26px;
  text-align: center;
}
#toolModules .tool-grid .module .tool-info{
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
#toolModules .tool-grid .module b{
  display: block !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  font-weight: 600 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#toolModules .tool-grid .module small{
  display: block !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
  color: #94a0b0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.dark #toolModules .tool-grid .module{
  background: #1a2332 !important;
  border-color: #2a3546 !important;
  color: #e5ecf5 !important;
}
html.dark #toolModules .tool-grid .module.active{
  background: #1e3a5f !important;
  border-color: #3a5a86 !important;
  color: #7bb0e8 !important;
}
html.dark #toolModules .tool-grid .module small{
  color: #94a3b8 !important;
}
@media(max-width: 560px){
  #toolModules .tool-grid{
    gap: 6px !important;
  }
  #toolModules .tool-grid .module{
    padding: 8px 10px !important;
    min-height: 56px !important;
    gap: 8px !important;
  }
  #toolModules .tool-grid .module .ico{
    font-size: 20px !important;
    width: 22px;
  }
  #toolModules .tool-grid .module b{
    font-size: 12px !important;
  }
  #toolModules .tool-grid .module small{
    font-size: 10px !important;
  }
}


/* ===== V0.35 工具网格紧凑化（4 列，带描述） ===== */
#toolModules .tool-grid{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 6px !important;
}
#toolModules .tool-grid .module{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  padding: 8px 4px !important;
  border: 1px solid #e1e7ef !important;
  background: #fff !important;
  border-radius: 10px !important;
  text-align: center !important;
  color: #172033 !important;
  box-shadow: none !important;
  min-height: 62px !important;
  height: auto !important;
  box-sizing: border-box !important;
  cursor: pointer;
  transition: all .15s ease !important;
  overflow: hidden;
}
#toolModules .tool-grid .module.active{
  background: #edf5ff !important;
  border-color: #c7def7 !important;
  color: #3974b5 !important;
}
#toolModules .tool-grid .module .ico{
  display: block !important;
  font-size: 16px !important;
  margin: 0 !important;
  line-height: 1 !important;
  flex-shrink: 0;
  width: auto;
  text-align: center;
}
#toolModules .tool-grid .module .tool-info{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 100%;
  min-width: 0;
}
#toolModules .tool-grid .module b{
  display: block !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  margin: 0 !important;
  font-weight: 600 !important;
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#toolModules .tool-grid .module small{
  display: block !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  color: #94a0b0 !important;
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.dark #toolModules .tool-grid .module{
  background: #1a2332 !important;
  border-color: #2a3546 !important;
  color: #e5ecf5 !important;
}
html.dark #toolModules .tool-grid .module.active{
  background: #1e3a5f !important;
  border-color: #3a5a86 !important;
  color: #7bb0e8 !important;
}
html.dark #toolModules .tool-grid .module small{
  color: #94a3b8 !important;
}
@media(max-width: 560px){
  #toolModules .tool-grid{
    gap: 5px !important;
  }
  #toolModules .tool-grid .module{
    padding: 7px 3px !important;
    min-height: 60px !important;
  }
  #toolModules .tool-grid .module .ico{
    font-size: 15px !important;
  }
  #toolModules .tool-grid .module b{
    font-size: 10px !important;
  }
  #toolModules .tool-grid .module small{
    font-size: 8px !important;
  }
}

/* ===== V0.36 工具按钮对齐学习页胶囊样式 ===== */
#toolModules .tool-grid{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 6px !important;
}
#toolModules .tool-grid .module{
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 8px 6px !important;
  border: 1px solid #e1e7ef !important;
  background: #fff !important;
  border-radius: 999px !important;
  text-align: center !important;
  color: #172033 !important;
  box-shadow: none !important;
  min-height: 34px !important;
  height: 34px !important;
  box-sizing: border-box !important;
  cursor: pointer;
  transition: all .15s ease !important;
  white-space: nowrap;
  overflow: hidden;
}
#toolModules .tool-grid .module.active{
  background: #edf5ff !important;
  border-color: #c7def7 !important;
  color: #3974b5 !important;
}
#toolModules .tool-grid .module .ico{
  display: inline-block !important;
  font-size: 14px !important;
  margin: 0 !important;
  line-height: 1 !important;
  flex-shrink: 0;
  width: auto;
}
#toolModules .tool-grid .module b{
  display: inline-block !important;
  font-size: 12px !important;
  line-height: 1 !important;
  margin: 0 !important;
  font-weight: 500 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 20px);
}
/* 隐藏之前加的描述文字 */
#toolModules .tool-grid .module small{
  display: none !important;
}
html.dark #toolModules .tool-grid .module{
  background: #1a2332 !important;
  border-color: #2a3546 !important;
  color: #e5ecf5 !important;
}
html.dark #toolModules .tool-grid .module.active{
  background: #1e3a5f !important;
  border-color: #3a5a86 !important;
  color: #7bb0e8 !important;
}
@media(max-width: 560px){
  #toolModules .tool-grid{
    gap: 5px !important;
  }
  #toolModules .tool-grid .module{
    padding: 7px 4px !important;
    min-height: 32px !important;
    height: 32px !important;
  }
  #toolModules .tool-grid .module .ico{
    font-size: 13px !important;
  }
  #toolModules .tool-grid .module b{
    font-size: 11px !important;
  }
}

/* 2026-10-15: local outline icons and complete night palette */
.ti{width:1.15em;height:1.15em;display:inline-block;vertical-align:-.2em;flex-shrink:0;pointer-events:none;color:inherit}
.ico .ti{width:20px;height:20px;vertical-align:middle}
.search .ti{width:20px;height:20px}
html.dark{color-scheme:dark;--night-bg:#101722;--night-card:#192332;--night-raised:#223044;--night-border:#35465d;--night-text:#e6edf7;--night-muted:#aab8cc;--night-accent:#92bff5}
html.dark body{background:var(--night-bg);color:var(--night-text)}
html.dark .hero{background:linear-gradient(135deg,#182b42,#192332);border-color:var(--night-border)}
html.dark :is(.hero-card,.quiz-card,.knowledge,.my-learning-card,.learned-card,.wrong-item,.tool-window,.list-modal-content,.list-modal-header,.list-modal-body,.stats){background:var(--night-card);border-color:var(--night-border);color:var(--night-text)}
html.dark :is(h1,h2,h3,h4,.hero-card strong,.learning-main strong,.learning-item b){color:var(--night-text)}
html.dark :is(.hero p,.hero-card span,.hero-card small,.section-head span,.knowledge p,.learned-card p,.learned-card small,.tool-note,.tool-note-inline,.tip-body,.empty-state,.quiz-meta,.progress-text,.learning-item span,.category-sub){color:var(--night-muted)}
html.dark :is(input,textarea,select){background:var(--night-bg);color:var(--night-text);border-color:var(--night-border)}
html.dark :is(input,textarea)::placeholder{color:#99a9bf;opacity:1}
html.dark .search{background:var(--night-card);border-color:var(--night-border)}
html.dark .search input{background:transparent}
html.dark :is(.option,.fav,.tool-cat-btn,.tool-common-btn,.filter,.ghost){background:var(--night-raised);border-color:var(--night-border);color:var(--night-text)}
html.dark .option.correct{background:#173b2e;border-color:#4e9973;color:#b8efd0}
html.dark .option.wrong{background:#46272d;border-color:#a56c75;color:#ffd1d7}
html.dark :is(.answer,.wrong-explain,.tool-result,.hint-line,.formula){background:var(--night-raised);color:#c7d9f1;border-color:var(--night-border)}
html.dark .tool-result [style*="color:"]{color:var(--night-text)!important}
html.dark .tool-result [style*="border-bottom:"]{border-color:var(--night-border)!important}
html.dark :is(.tag,.learn,.tab-btn.active,.tool-cat-btn.active,.wrong-redo,.tool-card.active){background:#233d5e;color:var(--night-accent);border-color:#4c6f9b}
html.dark .fav.on{background:#433921;color:#f5d189}
html.dark :is(.text-btn,a){color:var(--night-accent)}
html.dark :is(.danger,.wrong-remove){color:#f3a8b0!important}
html.dark .checkin-day{background:var(--night-card);color:var(--night-muted);border-color:var(--night-border)}
html.dark .checkin-day.on{background:#233d5e;color:var(--night-accent)}
html.dark .list-modal{background:rgba(0,0,0,.72)}
html.dark .toast{background:#dfebfa;color:#142238;box-shadow:0 6px 24px #0006}
html.dark :is(button,input,textarea,select,a):focus-visible{outline:2px solid #92bff5;outline-offset:3px}
html.dark .tool-result textarea{background:transparent}
html.dark :is(.learned-strip,.list-modal-body){scrollbar-color:#586e8b #192332}

/* Compact text-only portal return; 26px appearance and 44px touch height. */
.portal-return-row{display:flex;align-items:center;min-height:44px;margin:0;padding-top:env(safe-area-inset-top,0px)}
.portal-return-pill{position:relative;display:inline-flex;align-items:center;justify-content:center;height:26px;padding:0 10px;border:1px solid #dce5ef;border-radius:999px;background:rgba(232,239,247,.55);color:#58718d;font-size:11px;font-weight:400;line-height:1;text-decoration:none;white-space:nowrap;-webkit-tap-highlight-color:transparent;transition:background-color .15s,border-color .15s}
.portal-return-pill::before{content:"";position:absolute;inset:-9px 0;border-radius:999px}
.portal-return-pill:active{background:#e1eaf5;border-color:#bfd0e3}
.portal-return-pill:focus-visible{outline:2px solid #3974b5;outline-offset:3px}
html.dark .portal-return-pill{background:rgba(35,48,66,.55);border-color:#35465d;color:#a8c3e2}
html.dark .portal-return-pill:active{background:#293d56;border-color:#526e90}
@media(prefers-reduced-motion:reduce){.portal-return-pill{transition:none}}
