/**
 * ============================================
 *  资料库网站 - 样式（CSS）
 * ============================================
 * 【小白说明】
 * - 这个文件只负责「外观」：颜色、大小、间距、圆角、动画。
 * - 顶部 :root 里 --primary 等是全局调色板，想整体换主题色
 *   只需改 --primary 一个值，全站跟着变。
 * - 区块从上往下：顶部导航 → 渐变头部 → 工具条 → 推荐 →
 *   资料网格 → 骨架屏 → 状态 → 加载更多 → 弹窗 → 页脚 → 返回顶部 → 响应式。
 */

:root {
  --primary: #FFB74D;         /* 主题橙（用户指定，偏淡） */
  --primary-deep: #FFA726;
  --primary-soft: #FFF3E0;
  --primary-grad: linear-gradient(135deg, #FFB74D 0%, #FFC266 55%, #FFD9A0 100%);
  --text-1: #1F2329;          /* 主文字：近黑 */
  --text-2: #4E5561;          /* 次级文字 */
  --text-3: #9AA1AB;          /* 弱文字 */
  --bg: #F6F7F9;              /* 页面背景 */
  --card: #FFFFFF;
  --line: #ECEFF3;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 10px rgba(31, 35, 41, 0.05);
  --shadow-hover: 0 10px 28px rgba(31, 35, 41, 0.10);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

/* =====================================================
  顶部导航栏（吸顶）
  ===================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 16px rgba(31, 35, 41, 0.06);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary-grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(255, 167, 38, 0.35);
}
.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: 1px;
}
/* 分类导航（内容区顶部，同小程序布局） */
.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.topnav::-webkit-scrollbar { display: none; }
.nav-item {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.nav-item:hover { color: var(--primary-deep); background: var(--primary-soft); }
.nav-item.active {
  background: var(--primary-grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 167, 38, 0.35);
}
.nav-item .nav-count {
  font-size: 11px;
  opacity: 0.85;
  margin-left: 4px;
}
/* 顶部搜索 */
.top-search { flex-shrink: 0; }
.top-search input {
  width: 190px;
  border: 1px solid var(--line);
  background: #F6F7F9;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  outline: none;
  transition: all .18s;
}
.top-search input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 183, 77, 0.18);
}

/* =====================================================
  渐变头部
  ===================================================== */
.hero {
  background: var(--primary-grad);
  padding: 52px 20px 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* 头部装饰圆（纯视觉） */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.hero::before { width: 320px; height: 320px; top: -160px; right: -80px; }
.hero::after { width: 220px; height: 220px; bottom: -140px; left: -60px; }
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 6px;
  text-shadow: 0 2px 12px rgba(255, 150, 40, 0.35);
}
.hero-sub {
  color: rgba(255, 255, 255, 0.94);
  font-size: 16px;
  margin-top: 10px;
  letter-spacing: 3px;
}
/* 数据统计胶囊 */
.hero-stats {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #A05A00;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(255, 150, 40, 0.2);
}
.stat-chip b { color: #E08600; font-size: 15px; }
/* 搜索框 */
.search-wrap { max-width: 720px; margin: 26px auto 0; position: relative; z-index: 2; }
.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 6px 8px 6px 22px;
  box-shadow: 0 10px 34px rgba(255, 150, 40, 0.28);
}
.search-icon { font-size: 16px; margin-right: 10px; opacity: 0.7; }
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text-1);
  background: transparent;
  min-width: 0;
}
.search-box input::placeholder { color: var(--text-3); }
.search-btn {
  background: var(--primary-grad);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(255, 167, 38, 0.4);
}
.search-btn:hover { transform: scale(1.04); }
.search-clear {
  border: none;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 12px;
  display: none;
  flex-shrink: 0;
}
.search-clear:hover { color: var(--primary-deep); }

/* =====================================================
  主体容器
  ===================================================== */
.container {
  max-width: 1200px;
  margin: -52px auto 0;
  padding: 0 20px 60px;
  position: relative;
  z-index: 5;
}

/* 工具条：结果统计 + 排序 */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.result-count { font-size: 13px; color: var(--text-2); }
.result-count b { color: var(--primary-deep); font-size: 15px; }
.sortbar { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 13px; color: var(--text-3); }
.sort-select {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-2);
  outline: none;
  background: #F6F7F9;
  cursor: pointer;
  transition: all .15s;
}
.sort-select:focus { border-color: var(--primary); background: #fff; }

/* =====================================================
  推荐区
  ===================================================== */
.recommend { margin-bottom: 30px; }
.recommend-title {
  display: flex;
  align-items: center;
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-1);
}
.recommend-title::before {
  content: "";
  width: 6px;
  height: 22px;
  border-radius: 4px;
  background: var(--primary-grad);
  margin-right: 12px;
}
.recommend-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 168px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) #eee;
}
.recommend-row::-webkit-scrollbar { height: 6px; }
.recommend-row::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 6px; }
.rec-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.rec-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.rec-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
/* 封面完整展示：contain 不裁切，白底衬托 */
.rec-cover img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.rec-cover .ph {
  font-size: 52px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.rec-title {
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.45;
  padding: 11px 12px 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================================================
  资料网格
  ===================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 封面完整展示：contain 不裁切，白底衬托（用户要求封面不裁切） */
.cover img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.cover .ph {
  font-size: 64px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}
.cover .ph-cat {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  letter-spacing: 1px;
}
.cover-ph-0 { background: linear-gradient(160deg, #FFB74D, #FF9E2C); }
.cover-ph-1 { background: linear-gradient(160deg, #FFB74D, #F57C00); }
.cover-ph-2 { background: linear-gradient(160deg, #FFC266, #FF9800); }
.cover-ph-3 { background: linear-gradient(160deg, #FFD08A, #FFA726); }
.cover-ph-4 { background: linear-gradient(160deg, #FFA726, #F57C00); }
.cover-ph-5 { background: linear-gradient(160deg, #FFC266, #FF8F00); }
.card-body {
  padding: 15px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px;
}
/* 搜索命中关键词高亮 */
.card-title mark, .card-summary mark, .m-desc mark {
  background: #FFE3B3;
  color: #C26B00;
  border-radius: 4px;
  padding: 0 2px;
}
.card-summary {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  background: var(--primary-soft);
  color: #B0701C;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.card-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.card-foot .cat-name { color: var(--primary-deep); font-weight: 600; }
.card-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: #D5D8DD; }
.card-foot .hit { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; }

/* =====================================================
  骨架屏 / 状态 / 加载更多
  ===================================================== */
.skeleton {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.sk-cover {
  aspect-ratio: 3 / 4;
  background: linear-gradient(90deg, #F2F3F5 25%, #E8E9EC 37%, #F2F3F5 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-line {
  height: 14px;
  margin: 10px 14px 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #F2F3F5 25%, #E8E9EC 37%, #F2F3F5 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-line:last-child { margin-bottom: 16px; width: 60%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.status { text-align: center; padding: 64px 20px; color: var(--text-3); grid-column: 1 / -1; }
.status .icon { font-size: 52px; margin-bottom: 14px; }
.status .text { font-size: 15px; }
.status button {
  margin-top: 20px;
  background: var(--primary-grad);
  color: #fff;
  border: none;
  padding: 10px 34px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 167, 38, 0.35);
}

.load-more-wrap { text-align: center; margin-top: 40px; }
.load-more {
  background: #fff;
  color: var(--primary-deep);
  border: 1px solid var(--primary);
  padding: 12px 52px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  box-shadow: var(--shadow);
}
.load-more:hover { background: var(--primary-soft); }
.load-more:disabled { opacity: 0.5; cursor: default; }

/* =====================================================
  详情弹窗
  ===================================================== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 25, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 20px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 5;
}
.modal-head .m-title { font-size: 16px; font-weight: 700; }
.modal-close {
  border: none;
  background: #F2F3F5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-2);
  transition: all .15s;
}
.modal-close:hover { background: var(--primary-soft); color: var(--primary-deep); }
.modal-body { padding: 28px; }
.m-detail { display: flex; gap: 30px; }
/* 详情封面：contain 完整展示 */
.m-cover {
  width: 250px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.m-cover img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.m-cover .ph { font-size: 96px; font-weight: 800; color: rgba(255,255,255,0.94); text-shadow: 0 3px 10px rgba(0,0,0,0.15); }
.m-cover .ph-cat { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.88); font-size: 13px; }
.m-info { flex: 1; min-width: 0; }
.m-info h2 { font-size: 24px; font-weight: 800; line-height: 1.4; }
.m-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-3);
}
.m-meta .cat-name {
  color: var(--primary-deep);
  font-weight: 600;
  background: var(--primary-soft);
  padding: 3px 12px;
  border-radius: 999px;
}
.m-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.m-tags .tag { font-size: 12px; padding: 5px 13px; }
.m-desc { margin-top: 22px; }
.m-desc h3, .m-links h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}
.m-desc h3::before, .m-links h3::before {
  content: "";
  width: 5px;
  height: 16px;
  border-radius: 3px;
  background: var(--primary-grad);
  margin-right: 8px;
}
.m-desc p { font-size: 14px; color: var(--text-2); line-height: 1.9; white-space: pre-wrap; word-break: break-all; }
.m-links { margin-top: 24px; }
.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #F7F8FA;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: border-color .15s;
}
.link-item:hover { border-color: var(--primary); }
.link-item .link-name { font-size: 14px; font-weight: 600; }
.link-item .link-url { font-size: 12px; color: var(--text-3); word-break: break-all; margin-top: 3px; }
.link-actions { display: flex; gap: 8px; flex-shrink: 0; }
.link-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.link-btn.open { background: var(--primary-grad); color: #fff; box-shadow: 0 4px 12px rgba(255,167,38,0.3); }
.link-btn.open:hover { transform: translateY(-1px); }
.link-btn.copy { background: #fff; color: var(--primary-deep); border: 1px solid var(--primary); }
.link-btn.copy:hover { background: var(--primary-soft); }
.link-empty { background: #F7F8FA; border-radius: 12px; padding: 32px; text-align: center; color: var(--text-3); font-size: 14px; }
.m-hit { display: inline-flex; align-items: center; gap: 4px; }

/* =====================================================
  页脚 / 返回顶部 / Toast
  ===================================================== */
.footer {
  background: #23272E;
  color: #9AA1AB;
  text-align: center;
  padding: 40px 20px;
  margin-top: 40px;
}
.footer-title { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.footer-sub { font-size: 13px; margin-top: 6px; opacity: 0.85; }

.back-top {
  position: fixed;
  right: 26px;
  bottom: 34px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--primary-grad);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 167, 38, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .25s;
  z-index: 80;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-2px); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(23, 26, 33, 0.85);
  color: #fff;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 999px;
  opacity: 0;
  transition: all .25s;
  z-index: 300;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================================================
  响应式
  ===================================================== */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
  .top-search { display: none; }   /* 小屏隐藏顶部搜索，用 Hero 搜索框 */
  .topnav { flex: 1; }
}
@media (max-width: 720px) {
  .hero { padding: 40px 16px 84px; }
  .hero h1 { font-size: 32px; letter-spacing: 4px; }
  .hero-sub { font-size: 14px; letter-spacing: 1px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
  .card-title { font-size: 14px; min-height: 42px; }
  .toolbar { padding: 12px 16px; }
  .m-detail { flex-direction: column; }
  .m-cover { width: 100%; aspect-ratio: 3 / 4; }
  .link-item { flex-direction: column; align-items: flex-start; }
  .link-actions { width: 100%; }
  .link-actions .link-btn { flex: 1; text-align: center; }
  .modal-body { padding: 20px; }
  .back-top { right: 16px; bottom: 24px; width: 42px; height: 42px; }
}

/* =====================================================
  手机端专属优化（≤520px：iPhone / 主流安卓）
  ===================================================== */
/* 禁止整页横向滑动（防止推荐区横滑带动整页） */
@media (max-width: 520px) {
  html, body { overflow-x: hidden; }

  /* 顶部导航：更紧凑 */
  .topbar-inner { height: 52px; padding: 0 12px; gap: 12px; }
  .logo-icon { width: 32px; height: 32px; font-size: 17px; border-radius: 10px; }
  .logo-text { font-size: 17px; letter-spacing: 0; }
  /* 分类栏（内容区）手机适配 */
  .topnav { padding: 8px 10px; margin-bottom: 12px; gap: 6px; border-radius: 12px; }
  .nav-item { padding: 6px 12px; font-size: 13px; }
  .nav-item .nav-count { font-size: 10px; }

  /* 渐变头部：紧凑不臃肿 */
  .hero { padding: 30px 14px 76px; }
  .hero::before { width: 180px; height: 180px; top: -90px; right: -40px; }
  .hero::after { width: 130px; height: 130px; bottom: -80px; left: -30px; }
  .hero h1 { font-size: 26px; letter-spacing: 3px; }
  .hero-sub { font-size: 13px; letter-spacing: 1px; margin-top: 8px; }

  /* 统计胶囊：缩小防溢出 */
  .hero-stats { gap: 8px; margin-top: 14px; }
  .stat-chip { font-size: 12px; padding: 5px 12px; gap: 4px; }
  .stat-chip b { font-size: 13px; }

  /* 搜索框：全宽 + 输入 16px 防 iOS 自动放大 */
  .search-wrap { margin-top: 20px; }
  .search-box { padding: 4px 6px 4px 16px; }
  .search-icon { font-size: 14px; margin-right: 8px; }
  .search-box input { font-size: 16px; }
  .search-btn { padding: 10px 18px; font-size: 14px; }
  .search-clear { padding: 6px 8px; font-size: 12px; }

  /* 主体容器：边距收紧 */
  .container { margin-top: -44px; padding: 0 12px 50px; }

  /* 工具条：单行紧凑 */
  .toolbar { padding: 10px 14px; margin-bottom: 16px; border-radius: 12px; }
  .result-count { font-size: 12px; }
  .result-count b { font-size: 13px; }
  .sort-label { font-size: 12px; }
  .sort-select { padding: 5px 10px; font-size: 12px; }

  /* 推荐区：卡片更窄 */
  .recommend-row { grid-auto-columns: 138px; gap: 12px; }
  .rec-title { font-size: 12px; padding: 9px 10px 11px; }

  /* 资料网格：固定两列 */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { border-radius: 12px; }
  .cover { aspect-ratio: 3 / 4; }
  .cover img { padding: 6px; }
  .cover .ph { font-size: 52px; }
  .cover .ph-cat { font-size: 11px; bottom: 10px; }
  .card-body { padding: 11px 12px 12px; }
  .card-title { font-size: 14px; line-height: 1.45; min-height: 0; }
  /* 手机上摘要隐藏，卡片更紧凑 */
  .card-summary { display: none; }
  .card-tags { margin-top: 6px; gap: 4px; }
  .tag { font-size: 10px; padding: 2px 8px; }
  .card-foot { font-size: 11px; padding-top: 8px; gap: 5px; }

  /* 详情弹窗：手机全屏化 */
  .modal-mask { padding: 0; }
  .modal { max-width: 100%; max-height: 100vh; border-radius: 0; }
  .modal-head { padding: 13px 16px; }
  .modal-body { padding: 16px; }
  .m-cover { width: 62%; margin: 0 auto; aspect-ratio: 3 / 4; border-radius: 12px; }
  .m-cover .ph { font-size: 72px; }
  .m-info h2 { font-size: 20px; }
  .m-meta { gap: 8px; font-size: 12px; margin-top: 10px; }
  .m-desc p { font-size: 13px; }
  .link-item { padding: 12px 14px; }
  .link-btn { padding: 9px 0; font-size: 13px; }

  /* 页脚 / 返回顶部 / Toast */
  .footer { padding: 28px 16px; }
  .footer-title { font-size: 15px; }
  .footer-sub { font-size: 12px; }
  .back-top { right: 14px; bottom: 20px; width: 40px; height: 40px; font-size: 18px; }
  .toast { font-size: 13px; padding: 10px 22px; bottom: 46px; width: 86%; text-align: center; }
}
