/* ============================================================
 * libui.css · 三库统一主界面（文章库 / 课件库 / 笔记库）
 * 标题栏高度、按钮、搜索框、二维码、标签栏、吸顶栏 尺寸全站一致
 * 主题：深绿 #1E4A36 / 米黄 #FAF7F0 / 金 #C9A227 / 铜 #8B5E3C
 * ============================================================ */
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:#FAF7F0;color:#2B2B28;
  font-family:"Microsoft YaHei","微软雅黑","PingFang SC","Hiragino Sans GB","Heiti SC",sans-serif;
  line-height:1.7;-webkit-font-smoothing:antialiased}
a{color:#8B5E3C}
img{max-width:100%}

/* ---------- 标题栏（各库一致高度） ---------- */
.lib-hd{background:linear-gradient(160deg,#1E4A36 0%,#163A2A 62%,#122E22 100%);
  color:#FFFDF8;padding:24px 0 22px;position:relative;overflow:hidden;
  border-bottom:3px solid #8B5E3C}
.lib-hd-in{max-width:1180px;margin:0 auto;padding:0 20px;
  display:flex;align-items:flex-start;justify-content:space-between;gap:28px}
.lib-hd-left{flex:1 1 auto;min-width:0}
.lib-title{margin:0 0 16px;font-size:30px;font-weight:700;letter-spacing:2px;line-height:1.2;color:#FFFDF8}
/* 按钮行：[赞 说点什么 全文搜索(engage注入)] / 传送门（回到首页统一走传送门八格） */
.lib-btns{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
/* 首按钮与标题左边缘严格对齐：空锚点不占 flex 间距，注入工具条自带的左留白归零 */
.lib-btns > .lib-eng{display:none}
.lib-btns > .eng-bar{margin-left:0!important}
.lib-btn{display:inline-flex;align-items:center;justify-content:center;height:38px;padding:0 16px;
  border:1px solid rgba(244,233,214,.45);border-radius:999px;color:#F4E9D6;font-size:14px;
  text-decoration:none;background:rgba(255,253,248,.06);cursor:pointer;font-family:inherit;
  white-space:nowrap;transition:.15s}
.lib-btn:hover{background:rgba(244,233,214,.18);border-color:rgba(244,233,214,.7)}
a.lib-btn{color:#F4E9D6}
/* 「显示介绍」开关：标题栏「随便看看」右侧 */
.lib-intro-toggle{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 14px;
  border:1px solid rgba(244,233,214,.45);border-radius:999px;color:#F4E9D6;font-size:14px;
  background:rgba(255,253,248,.06);cursor:pointer;font-family:inherit;white-space:nowrap;
  user-select:none;transition:.15s}
.lib-intro-toggle:hover{background:rgba(244,233,214,.18);border-color:rgba(244,233,214,.7)}
.lib-intro-toggle input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
.lib-intro-toggle .track{position:relative;flex:0 0 auto;width:34px;height:18px;border-radius:999px;
  background:rgba(255,253,248,.24);transition:background .18s}
.lib-intro-toggle .track::after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;
  border-radius:50%;background:#FFFDF8;box-shadow:0 1px 2px rgba(0,0,0,.22);transition:transform .18s}
.lib-intro-toggle.on .track{background:#C9A227}
.lib-intro-toggle.on .track::after{transform:translateX(16px)}
.lib-intro-toggle .lbl{line-height:1}
/* 隐藏 engage 在非库页自动注入的「去往课件库/去往笔记库」(统一用传送门代替) */
.lib-btns .eng-cw{display:none!important}
/* 库内搜索框（按钮行下方，与「只看优秀共读笔记」开关同行） */
.lib-search{margin-top:14px;max-width:680px;display:flex;align-items:center;gap:14px}
.lib-search input{flex:1 1 auto;width:auto;height:42px;border:1px solid rgba(255,253,248,.5);
  background:rgba(255,253,248,.12);color:#FFFDF8;border-radius:999px;padding:0 20px;
  font-size:15px;font-family:inherit;outline:none}
.lib-search input::placeholder{color:rgba(255,253,248,.6)}

/* ---------- 标题栏右侧四二维码 ---------- */
.lib-qrs{flex:0 0 auto;display:flex;gap:14px;flex-wrap:wrap}
.lib-qrs a.qr{display:flex;flex-direction:column;align-items:center;gap:4px;text-decoration:none;cursor:pointer}
.lib-qrs .qr img{width:76px;height:76px;object-fit:contain;border-radius:4px;
  border:1px solid rgba(244,233,214,.5);background:#fff;padding:3px;display:block;transition:.18s}
.lib-qrs a.qr:hover img{border-color:#F4E9D6}
.lib-qrs .ql{font-size:12px;color:#E8C96A;letter-spacing:.04em;font-weight:600}
.lib-qrs .qd{font-size:10px;color:rgba(255,253,248,.72);line-height:1.3;text-align:center;max-width:84px}

/* ---------- 标签栏（标题下方，默认一行收起，可展开） ---------- */
.lib-tags{max-width:1180px;margin:0 auto;padding:16px 20px 0}
.lib-tags-in{display:flex;flex-wrap:wrap;gap:9px;max-height:42px;overflow:hidden;transition:max-height .25s ease;position:relative}
.lib-tags.open .lib-tags-in{max-height:1200px}
.lib-tags-in button{border:1px solid #D8C9AE;background:#FFFDF8;color:#3C5A4B;border-radius:20px;
  padding:0 15px;height:34px;font-size:13px;cursor:pointer;font-family:inherit;transition:.15s;white-space:nowrap}
.lib-tags-in button:hover{border-color:#8B5E3C;color:#8B5E3C}
.lib-tags-in button.on{background:#1E4A36;color:#FFFDF8;border-color:#1E4A36}
.lib-tags-in button .n{font-size:12px;opacity:.7;margin-left:4px}
.lib-tags-toggle{margin-top:10px;border:none;background:transparent;color:#8B5E3C;font-size:13px;
  cursor:pointer;font-family:inherit;padding:2px 0}
.lib-tags-toggle:hover{text-decoration:underline}

/* ---------- 年份筛选行（文章库：标题栏与标签栏之间） ---------- */
.lib-years{max-width:1180px;margin:0 auto;padding:14px 20px 0}
.lib-years-in{display:flex;flex-wrap:wrap;gap:9px;position:relative}
.lib-years-in button{border:1px solid #D8C9AE;background:#FBF6EC;color:#6B5228;border-radius:20px;
  padding:0 15px;height:32px;font-size:13px;cursor:pointer;font-family:inherit;transition:.15s;white-space:nowrap}
.lib-years-in button:hover{border-color:#8B5E3C;color:#8B5E3C}
.lib-years-in button.on{background:#8B5E3C;color:#FFFDF8;border-color:#8B5E3C}

/* ---------- 吸顶固化栏（标题栏滚出后显示） ---------- */
.lib-sticky{position:fixed;top:0;left:0;right:0;z-index:99990;display:none;
  background:linear-gradient(160deg,#1E4A36 0%,#163A2A 100%);color:#FFFDF8;
  box-shadow:0 6px 22px rgba(18,46,34,.28);border-bottom:2px solid #8B5E3C}
.lib-sticky.show{display:block}
.lib-sticky-in{max-width:1180px;margin:0 auto;padding:9px 20px;display:flex;align-items:center;
  gap:9px;flex-wrap:wrap}
.lib-sbtn{display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 14px;
  border:1px solid rgba(244,233,214,.45);border-radius:999px;color:#F4E9D6;font-size:13.5px;
  background:rgba(255,253,248,.06);cursor:pointer;font-family:inherit;white-space:nowrap;text-decoration:none}
.lib-sbtn:hover{background:rgba(244,233,214,.18)}
a.lib-sbtn{color:#F4E9D6}
.lib-ssearch{flex:1 1 130px;min-width:96px;height:36px;border:1px solid rgba(255,253,248,.5);
  background:rgba(255,253,248,.12);color:#FFFDF8;border-radius:999px;padding:0 16px;
  font-size:14px;font-family:inherit;outline:none}
.lib-ssearch::placeholder{color:rgba(255,253,248,.6)}
/* 吸顶栏「搜索」按钮（回车或点击才提交，不在每次按键时触发） */
.lib-sgo{display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 16px;flex:0 0 auto;
  border:1px solid rgba(244,233,214,.55);border-radius:999px;color:#1E4A36;font-size:13.5px;font-weight:600;
  background:#F4E9D6;cursor:pointer;font-family:inherit;white-space:nowrap}
.lib-sgo:hover{background:#E8D9BC}
/* 吸顶栏「显示介绍」开关：固定不伸缩、对齐 36px 按钮高度，置于最右 */
.lib-sticky-in .lib-intro-toggle{height:36px;padding:0 12px;flex:0 0 auto}
/* engage 注入锚点：仅占位，无视觉 */
.lib-eng{display:inline}

/* 「显示介绍」关闭时，主页面卡片不展示简介，节省界面空间 */
body.no-intro .card .brief,
body.no-intro .card .br,
body.no-intro .card .intro{display:none}

/* ---------- 弹窗（传送门 / 标签过滤） ---------- */
.lib-mask{position:fixed;inset:0;background:rgba(20,30,25,.55);z-index:100000;
  display:none;align-items:center;justify-content:center;padding:24px}
.lib-mask.on{display:flex}
.lib-modal{background:#FFFDF8;border-radius:16px;max-width:560px;width:100%;max-height:86vh;
  overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.lib-modal-h{position:sticky;top:0;background:#1E4A36;color:#FFFDF8;padding:14px 20px;
  display:flex;justify-content:space-between;align-items:center;z-index:2}
.lib-modal-h b{font-size:18px;font-weight:600}
.lib-modal-h .lib-x{cursor:pointer;font-size:22px;line-height:1;color:rgba(255,253,248,.8)}
.lib-modal-h .lib-x:hover{color:#FFF}
.lib-modal-b{padding:20px}
/* 传送门四宫格 */
.lib-portal-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.lib-portal-grid a{display:flex;flex-direction:column;gap:4px;text-decoration:none;
  background:#FBF6EC;border:1px solid #E7DDC4;border-radius:14px;padding:18px 20px;transition:.15s}
.lib-portal-grid a:hover{box-shadow:0 6px 18px rgba(139,94,60,.18);border-color:#C9A227}
.lib-portal-grid .pn{font-size:18px;font-weight:700;color:#1E4A36;letter-spacing:.5px}
.lib-portal-grid .ps{font-size:12.5px;color:#8A8378}
/* 窄屏：八格传送门保持两列，压缩内边距与字号，避免出现「一行一个、需滚动」 */
@media (max-width:560px){
  .lib-mask{padding:12px}
  .lib-modal-b{padding:12px}
  .lib-portal-grid{gap:9px}
  .lib-portal-grid a{padding:12px 12px;gap:3px}
  .lib-portal-grid .pn{font-size:15.5px}
  .lib-portal-grid .ps{font-size:11.5px;line-height:1.42}
}
/* 标签过滤网格 */
.lib-tag-grid{display:flex;flex-wrap:wrap;gap:10px}
.lib-tag-grid button{border:1px solid #D8C9AE;background:#FFFDF8;color:#3C5A4B;border-radius:20px;
  padding:7px 16px;font-size:14px;cursor:pointer;font-family:inherit;transition:.15s}
.lib-tag-grid button:hover{border-color:#8B5E3C;color:#8B5E3C}
.lib-tag-grid button.on{background:#1E4A36;color:#FFFDF8;border-color:#1E4A36}
.lib-tag-grid button .n{font-size:12px;opacity:.7;margin-left:4px}
.lib-empty{padding:30px;text-align:center;color:#9A8E76;font-size:14px}

/* engage 注入的赞/说点什么/全文搜索 在库头内统一尺寸 */
.lib-btns .eng-like,.lib-btns .eng-say,.lib-btns .eng-search{
  display:inline-flex!important;align-items:center;justify-content:center;height:38px!important;
  padding:0 16px!important;margin:0!important;border-radius:999px!important;font-size:14px!important;
  font-family:inherit!important;white-space:nowrap;line-height:1.5!important;
  border:1px solid rgba(244,233,214,.45)!important;background:rgba(255,253,248,.06)!important;
  color:#F4E9D6!important;cursor:pointer;box-sizing:border-box!important}
.lib-btns .eng-like:hover,.lib-btns .eng-say:hover,.lib-btns .eng-search:hover{background:rgba(244,233,214,.18)!important}

/* 汉堡下拉：桌面端 .hamb 为 display:contents，不影响原排版 */
.hamb{display:contents}
.hamb-toggle{display:none}

/* 移动端（含折叠屏展开态的 717/768px：按钮收进汉堡，避免标题栏按钮行折成两行） */
@media (max-width:820px){
  .lib-hd{overflow:visible}
  .lib-hd-in{flex-direction:column;align-items:stretch;gap:16px}
  .lib-title{font-size:24px}
  .lib-qrs{width:100%;display:grid;grid-template-columns:repeat(4,1fr);gap:8px;justify-items:center}
  .lib-qrs .qr img{width:58px;height:58px}
  .lib-qrs .qd{display:none}

  /* 标题栏动作按钮 + 分类标签：移动端改用汉堡下拉，放弃左右横滑 */
  .hamb{display:block;position:relative;width:100%}
  .hamb-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;
    height:40px;padding:0 16px;margin:0;border:1px solid rgba(244,233,214,.45);border-radius:999px;
    background:rgba(255,253,248,.06);color:#F4E9D6;font-family:inherit;font-size:14px;cursor:pointer}
  .hamb-toggle .hamb-caret{transition:transform .2s}
  .hamb.open .hamb-toggle .hamb-caret{transform:rotate(180deg)}

  /* 动作行：深色下拉面板 */
  .hamb > .lib-btns{display:none}
  .hamb.open > .lib-btns{display:flex;flex-direction:column;align-items:stretch;gap:8px;
    position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:99999;
    background:#1E4A36;border:1px solid rgba(244,233,214,.25);border-radius:14px;
    padding:10px;box-shadow:0 14px 40px rgba(0,0,0,.32);max-height:64vh;overflow:auto}
  .hamb.open > .lib-btns .lib-btn,
  .hamb.open > .lib-btns .eng-like,
  .hamb.open > .lib-btns .eng-say,
  .hamb.open > .lib-btns .eng-search{flex:1 1 auto;width:100%;justify-content:flex-start}
  .hamb.open > .lib-btns .lib-intro-toggle{flex:1 1 auto;width:100%;justify-content:flex-start}

  /* 分类标签：奶油色下拉面板（两列） */
  .lib-tags .hamb-toggle{background:#FFFDF8;color:#3C5A4B;border-color:#D8C9AE}
  .lib-tags .hamb > .lib-tags-in{display:none}
  .lib-tags .hamb.open > .lib-tags-in{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-content:start;
    position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:99999;
    background:#FFFDF8;border:1px solid #E7DDC4;border-radius:14px;
    padding:10px;box-shadow:0 14px 40px rgba(0,0,0,.18);max-height:64vh;overflow:auto}
  .lib-tags .hamb.open > .lib-tags-in button{width:100%;justify-content:space-between}
  .lib-tags-toggle{display:none}

  /* 吸顶固化栏：维持原横滑体验（文章库/课件库/笔记库用户确认保留） */
  .lib-sticky-in{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;gap:6px;padding-bottom:2px}
  .lib-sticky-in::-webkit-scrollbar{display:none}
  .lib-sbtn,.lib-sgo{flex:0 0 auto}
  .lib-ssearch{flex:0 0 auto;min-width:0;width:118px}
  .lib-sbtn{padding:0 10px;font-size:12.5px;height:34px}
  .lib-sticky-in{
    -webkit-mask-image:linear-gradient(to right,#000 calc(100% - 26px),transparent);
    mask-image:linear-gradient(to right,#000 calc(100% - 26px),transparent)}
}

/* ---------- 折叠屏 / 极窄屏：固定栏一律单行，搜索栏主动让位 ----------
   外屏最窄处只有 280~344px。按钮保持不换行、不裁切到不可达，
   搜索框按宽度逐级缩短；吸顶栏内部始终单行横滑，不折成两行。 */
@media (max-width:430px){
  .lib-hd-in{padding:0 12px}
  .lib-tags,.lib-years{padding-left:12px;padding-right:12px}
  .lib-qrs{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px}
  .lib-qrs a.qr{min-width:0}
  .lib-qrs .qr img{width:100%;max-width:58px;height:auto;aspect-ratio:1}
  .lib-sticky-in{gap:5px;padding:7px 9px;align-items:center;flex-wrap:nowrap}
  .lib-sbtn{padding:0 8px;font-size:11.5px;height:32px}
  .lib-sgo{padding:0 9px;font-size:11.5px;height:32px}
  .lib-ssearch{width:80px;min-width:0;flex:0 0 auto;height:32px;padding:0 10px;font-size:12px}
  .lib-search input{min-width:0;padding:0 12px;font-size:13px}
  .lib-search{gap:8px}
}
@media (max-width:340px){
  .lib-ssearch{width:56px;padding:0 7px}
  .lib-sbtn{padding:0 6px;font-size:11px}
  .lib-sgo{padding:0 6px}
  .lib-search{gap:6px}
}

/* ===== 2026-11-14 库内搜索栏：输入框 + 搜索本库 + 全文搜索（同一个胶囊） ===== */
/* 2026-11-15：按钮文案缩短腾出空间，搜索框随页面宽度自适应铺满左栏 */
.lib-search{margin-top:14px;max-width:none;width:100%}
.lib-search-in{flex:1 1 auto;display:flex;align-items:center;gap:6px;height:42px;min-width:0;
  border:1px solid rgba(255,253,248,.5);background:rgba(255,253,248,.12);
  border-radius:999px;padding:0 6px 0 18px}
.lib-search-in input{flex:1 1 auto;min-width:0;height:100%;border:0;background:transparent;
  color:#FFFDF8;font-size:15px;font-family:inherit;outline:none;padding:0}
.lib-search-in input::placeholder{color:rgba(255,253,248,.6)}
.lib-sbtn{flex:0 0 auto;height:32px;padding:0 14px;border-radius:999px;font-family:inherit;
  font-size:13px;letter-spacing:.02em;cursor:pointer;white-space:nowrap;border:1px solid transparent;
  transition:background .15s,color .15s,border-color .15s}
.lib-sbtn-local{background:transparent;border-color:rgba(244,233,214,.5);color:#F4E9D6}
.lib-sbtn-local:hover{background:rgba(244,233,214,.14)}
.lib-sbtn-full{background:#F4E9D6;border-color:#F4E9D6;color:#1E4A36;font-weight:600}
.lib-sbtn-db{background:#F4E9D6;border-color:#F4E9D6;color:#1E4A36;font-weight:600}
.lib-sbtn-full:hover{background:#E8D9BC}
.lib-sbtn-sm{height:28px;padding:0 10px;font-size:12px;letter-spacing:0}

/* 吸顶栏「介绍」按钮：与「海报」等按钮同尺寸，点亮即表示卡片显示简介（2026-11-16 由滑块改按钮） */
.lib-intro-btn{border-color:rgba(244,233,214,.5)}
.lib-intro-btn:hover{background:rgba(244,233,214,.18)}
.lib-intro-btn.on{background:#F4E9D6;border-color:#F4E9D6;color:#1E4A36;font-weight:600}
.lib-intro-btn.on:hover{background:#E8D9BC}

/* 标题栏原来的「全文搜索」撤掉：已经挪进搜索栏 */
.lib-hd .lib-btns .eng-search{display:none !important}

/* 吸顶栏：全文搜索塞进搜索框里，不占额外位置 */
.lib-sbar{flex:1 1 200px;display:flex;align-items:center;gap:4px;height:36px;min-width:auto;
  border:1px solid rgba(255,253,248,.5);background:rgba(255,253,248,.12);
  border-radius:999px;padding:0 4px 0 14px}
/* 2026-11-15：吸顶栏再窄也给搜索框留 ≥10 个字符的输入空间，不能收缩没了（窄屏沿用横滑） */
.lib-sbar .lib-ssearch{flex:1 1 auto;width:auto;min-width:10em;height:100%;border:0;
  background:transparent;padding:0;font-size:14px;color:#FFFDF8}
.lib-sbar .lib-ssearch::placeholder{color:rgba(255,253,248,.6)}

@media (max-width:760px){
  .lib-search{margin-top:12px;max-width:none}
  .lib-search-in{height:38px;padding:0 4px 0 12px;gap:4px}
  .lib-search-in input{font-size:13px}
  .lib-sbtn{height:28px;padding:0 9px;font-size:12px}
  .lib-sbar{height:32px;padding:0 3px 0 10px}
  .lib-sbar .lib-ssearch{font-size:12px}
  .lib-sbtn-sm{height:26px;padding:0 7px;font-size:11.5px}

  /* 汉堡菜单：按钮自动换行，不再一个按钮占一整行 */
  .hamb.open > .lib-btns{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;align-items:center}
  .hamb.open > .lib-btns .lib-btn,
  .hamb.open > .lib-btns a.lib-btn,
  .hamb.open > .lib-btns .eng-like,
  .hamb.open > .lib-btns .eng-say,
  .hamb.open > .lib-btns .eng-search{flex:0 1 auto;width:auto;justify-content:center;padding:0 10px}
  .hamb.open > .lib-btns .lib-intro-toggle{flex:1 1 100%;width:auto;justify-content:flex-start}
}

/* 课件库自带 .lib-search-row 的 input 规则会压过来，这里用 id 提权重压回去 */
.lib-search-in input#libSearch{min-width:0;padding:0;height:100%;border:0;background:transparent;
  font-size:15px;color:#FFFDF8}
.lib-sbar input#libSearch{min-width:0;padding:0;border:0;background:transparent}
@media (max-width:760px){
  .lib-search-in input#libSearch{font-size:13px}
}

/* 移动端吸顶栏：搜索框给「本库 / 全文」留位，并保足 ≥10 个字符的输入空间，不收缩没了 */
@media (max-width:760px){
  .lib-sticky-in .lib-sbar{flex:1 1 200px;min-width:220px}
  .lib-sbar .lib-sbtn-sm{padding:0 8px;font-size:11px}
}

/* 2026-11-15：吸顶栏改为按用户指定顺序（回顶层 → 海报 → ♡ → 留言 → 传送门 → 搜索栏 → 标签 → …）。
   不再把搜索栏 order:-1 提到最前，DOM 顺序即视觉顺序，各页面追加的按钮跟在后面。 */

/* ===== 2026-11-15 「有课件」开关 =====
   与「显示介绍」同款开关：标题栏放在搜索栏右边、吸顶栏放在「标签过滤」右边。
   开关自身不伸缩，同一行里的搜索胶囊按 flex 自动收窄，不另起一行。 */
.lib-cw-toggle{flex:0 0 auto;background:rgba(201,162,39,.12);border-color:rgba(230,199,105,.7)}
.lib-cw-toggle:hover{background:rgba(201,162,39,.24);border-color:rgba(244,233,214,.8)}
.lib-search.has-cw-toggle .lib-search-in{min-width:0}
@media (max-width:760px){
  .lib-search.has-cw-toggle{gap:8px}
  .lib-search.has-cw-toggle .lib-cw-toggle{height:32px;padding:0 9px;font-size:12px;gap:5px}
  /* 吸顶栏搜索条同样保足输入空间（≥10 字符），不再压缩到只剩几十像素 */
  .lib-sticky-in.has-cw-toggle .lib-sbar{flex:1 1 200px;min-width:220px}
}
@media (max-width:430px){
  .lib-sticky-in .lib-cw-toggle{height:32px;padding:0 8px;font-size:11.5px;gap:5px}
  .lib-sticky-in.has-cw-toggle .lib-sbar{min-width:220px}
}

/* ===== 2026-11-19 六库筛选结果计数 =====
   形如「共 42 本」，跟着标签 / 搜索 / 月份 / 开关一起变，量词由 data-lib-count 决定。
   放在各库筛选条的最右或紧邻筛选说明，深色标题栏与浅色内容区都适用同一套配色。 */
[data-lib-count]{display:inline-flex;align-items:center;flex:0 0 auto;height:30px;padding:0 12px;
  border-radius:999px;background:#F3ECDC;border:1px solid #DFD3B8;color:#1E4A36;
  font-size:13px;font-weight:600;letter-spacing:.02em;white-space:nowrap;font-variant-numeric:tabular-nums}
@media (max-width:430px){[data-lib-count]{height:28px;padding:0 10px;font-size:12px}}

/* ===== 2026-11-23 吸顶工具条收口 =====
   问题：按钮一多（课件库 13 个），1100px 左右会折成两行；窄屏下搜索胶囊里的
   「本库/全文/书库」会溢出胶囊边框，压到旁边的「标签/介绍」上。
   口径：整条永远单行，放不下就横向滑动；胶囊自身裁剪，内部按钮不许伸出边框。 */
.lib-sticky-in{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
  -webkit-overflow-scrolling:touch;gap:8px}
.lib-sticky-in::-webkit-scrollbar{display:none}
.lib-sticky-in > .lib-sbtn,.lib-sticky-in > .lib-sgo,.lib-sticky-in > .lib-cw-toggle,
.lib-sticky-in > .lib-intro-toggle{flex:0 0 auto}
.lib-sticky-in > .lib-sbar{flex:1 1 300px;min-width:280px;overflow:hidden}
.lib-sticky-in > .lib-sbar .lib-ssearch{min-width:6em;flex:1 1 auto;width:auto}
@media (max-width:820px){
  .lib-sticky-in{gap:6px;padding:7px 12px}
  .lib-sticky-in > .lib-sbar{flex:1 1 240px;min-width:236px}
}
@media (max-width:430px){
  .lib-sticky-in > .lib-sbar{min-width:228px;flex:1 1 228px;padding:0 3px 0 9px}
  .lib-sticky-in > .lib-sbar .lib-ssearch{min-width:4.5em}
}
@media (max-width:1200px){
  .lib-sticky-in{gap:6px}
  .lib-sticky-in > .lib-sbtn,.lib-sticky-in > .lib-sgo{padding:0 11px;font-size:13px}
  .lib-sticky-in > .lib-sbar{flex:1 1 244px;min-width:244px}
}
@media (max-width:1200px){
  /* 胶囊内三个小按钮再收两像素，保证 244px 里放得下「输入框 + 本库/全文/书库」 */
  .lib-sticky-in > .lib-sbar .lib-sbtn-sm{padding:0 6px;font-size:11px}
}
