/* ============================================================
   沪学门户 · 页面补充样式（第二轮：详情页 / 信息流 / 资料库 / lightbox）
   依赖 styles/main.css 提供的基础 tokens 与通用组件。
   ============================================================ */

/* ---------- 公共小工具 ---------- */
.muted { color: #6E6A60; }
.muted-sm { color: #6E6A60; font-size: 13px; font-weight: 400; }
.link-ink { color: #B3643A; text-decoration: underline; text-underline-offset: 3px; }
.crumb { margin-bottom: 18px; font-size: 14px; }

/* 占位色块（相册/封面） */
.ph {
  width: 100%; height: 100%; min-height: 120px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(43,42,38,.55); font-family: "Noto Serif SC", serif; letter-spacing: 2px;
}

/* ============================================================
   详情页（教师 / 学校）
   ============================================================ */
.detail-head {
  background: #FFFDF8; border: 1px solid #EEE5D5; border-radius: 6px;
  padding: 26px 28px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(43,42,38,.04);
}
.detail-head.school { align-items: flex-start; }
.detail-avatar, .detail-logo {
  flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%;
  background: #B3643A; color: #FFFDF8;
  display: flex; align-items: center; justify-content: center;
  font-family: "Noto Serif SC", serif; font-size: 40px; letter-spacing: 0; box-shadow: inset 0 0 0 3px rgba(255,253,248,.35);
}
.detail-logo { border-radius: 6px; font-size: 34px; background: #54708A; }
.detail-hd { flex: 1 1 320px; min-width: 240px; }
.detail-name { font-family: "Noto Serif SC", serif; font-size: 26px; color: #2B2A26; font-weight: 600; letter-spacing: 1px; margin: 0 0 8px; }
.detail-sub { color: #6E6A60; font-size: 14px; margin-bottom: 10px; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-intro { color: #4a463c; line-height: 1.8; font-size: 15px; margin: 0; }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-stats { margin-top: 18px; }
.sr { background: #F6EFE2; border-radius: 4px; padding: 10px 16px; min-width: 92px; text-align: center; }
.sr b { display: block; font-family: "Noto Serif SC", serif; font-size: 22px; color: #B3643A; font-weight: 600; }
.sr span { font-size: 12px; color: #6E6A60; }

.detail-body { margin-top: 8px; }
.detail-block { margin-top: 30px; }
.detail-block h2 { font-family: "Noto Serif SC", serif; font-size: 20px; color: #2B2A26; font-weight: 600; letter-spacing: 1px; padding-left: 12px; border-left: 3px solid #B3643A; margin: 0 0 14px; }
.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

.prose p { color: #4a463c; line-height: 1.95; margin: 0 0 14px; text-align: justify; }
.prose p:last-child { margin-bottom: 0; }

.gen-list { margin: 0; padding-left: 20px; color: #4a463c; line-height: 1.9; }
.gen-list li + li { margin-top: 4px; }

.badge-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* 相册 */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-item { border: 1px solid #EEE5D5; border-radius: 5px; overflow: hidden; padding: 0; background: #FFFDF8; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.gallery-item:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(43,42,38,.10); border-color: #B3643A; }
.gallery-item .ph { min-height: 96px; }
.gallery-cap { display: block; padding: 8px; font-size: 13px; color: #6E6A60; text-align: center; border-top: 1px solid #F1E9DB; }

/* 视频 */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.video-card { border: 1px solid #EEE5D5; border-radius: 5px; overflow: hidden; background: #FFFDF8; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.video-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(43,42,38,.10); }
.video-thumb { position: relative; min-height: 140px; display: flex; align-items: center; justify-content: center; color: rgba(43,42,38,.6); }
.play-btn { width: 46px; height: 46px; border-radius: 50%; background: rgba(180,100,58,.9); color: #FFFDF8; display: flex; align-items: center; justify-content: center; font-size: 18px; padding-left: 3px; }
.video-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(43,42,38,.72); color: #FAF6EF; font-size: 11px; padding: 2px 7px; border-radius: 3px; }
.video-title-hint { position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: rgba(255,253,248,.92); text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.video-meta { padding: 10px 12px; }
.video-meta b { display: block; font-size: 14px; color: #2B2A26; margin-bottom: 4px; font-weight: 600; }
.video-player .video-thumb { min-height: 220px; }

/* 评价 */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.review-card { background: #FFFDF8; border: 1px solid #EEE5D5; border-radius: 5px; padding: 16px 18px; }
.review-card p { color: #3f3b31; line-height: 1.8; margin: 0 0 10px; font-size: 14.5px; }
.review-card .muted { font-size: 13px; }

/* 升学数据 */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-cell { background: #F6EFE2; border-radius: 5px; padding: 18px; text-align: center; }
.stat-cell b { display: block; font-family: "Noto Serif SC", serif; font-size: 22px; color: #B3643A; margin-bottom: 6px; font-weight: 600; }
.stat-cell span { font-size: 13px; color: #6E6A60; }
.stat-cell.none { background: #F2EEE6; border: 1px dashed #D8CFC0; }
.stat-cell.none b { color: #9B9488; font-size: 15px; letter-spacing: 0.02em; }
.stat-year { display: inline-block; font-style: normal; font-size: 11px; font-family: "Noto Sans SC", sans-serif; color: #6F7F64; background: #E8EDE2; border: 1px solid #CBD6C2; border-radius: 3px; padding: 1px 7px; letter-spacing: 0.04em; margin-bottom: 8px; }
.detail-site { margin-top: 14px; }
.btn { display: inline-block; background: #B3643A; color: #FFFDF8; border-radius: 5px; padding: 9px 18px; text-decoration: none; font-size: 14px; transition: background 0.25s ease, transform 0.25s ease; border: none; cursor: pointer; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn:hover { background: #9c522f; box-shadow: 0 2px 8px rgba(179,100,58,0.25); }

/* ============================================================
   Lightbox 图片放大
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(30,28,22,.88); display: none; align-items: center; justify-content: center; flex-direction: column; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox-close { position: absolute; top: 16px; right: 22px; background: none; border: none; color: #FAF6EF; font-size: 40px; line-height: 1; cursor: pointer; }
.lightbox-img { width: min(680px, 92vw); height: min(58vh, 440px); border-radius: 6px; font-family: "Noto Serif SC", serif; font-size: 34px; color: rgba(255,253,248,.85); display: flex; align-items: center; justify-content: center; letter-spacing: 4px; box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.lightbox-cap { margin-top: 16px; color: #EFE6D6; font-size: 14px; }

/* ============================================================
   资讯信息流（news.html feed + 详情）
   ============================================================ */
.feed-group { margin-top: 22px; }
.feed-group-label { font-family: "Noto Serif SC", serif; color: #8a8372; font-weight: 500; text-align: center; letter-spacing: 3px; margin: 0 0 14px; font-size: 14px; }
.feed-card {
  display: flex; gap: 16px; align-items: center; background: #FFFDF8; border: 1px solid #EEE5D5;
  border-radius: 6px; padding: 16px 18px; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feed-card + .feed-card { margin-top: 12px; }
.feed-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(43,42,38,.09); border-color: #B3643A; }
.feed-card.top { border-color: #B3643A; background: linear-gradient(90deg, #FBF3E6, #FFFDF8); }
.feed-main { flex: 1 1 auto; min-width: 0; }
.feed-cat { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.top-badge { background: #B3643A; color: #FFFDF8; font-size: 11px; padding: 2px 8px; border-radius: 3px; letter-spacing: 1px; }
.feed-title { font-family: "Noto Serif SC", serif; font-size: 17px; color: #2B2A26; font-weight: 600; line-height: 1.6; margin: 0 0 6px; }
.feed-summary { color: #6E6A60; font-size: 14px; line-height: 1.7; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-meta { display: flex; gap: 16px; flex-wrap: wrap; color: #9a9382; font-size: 12px; }
.news-cover { flex: 0 0 120px; min-height: 78px; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.news-cover.big { width: 100%; max-height: 300px; min-height: 200px; margin: 4px 0 22px; flex: auto; background: transparent; }
.news-cover .npic { color: rgba(43,42,38,.55); font-family: "Noto Serif SC", serif; letter-spacing: 3px; }
.news-cover-img { width: 100%; height: 100%; min-height: 100%; object-fit: cover; display: block; }
.news-cover.big .news-cover-img { border: 1px solid #e7e0d2; border-radius: 4px; box-shadow: 0 4px 16px rgba(43,42,38,.08); background: #fff; }

/* 资讯详情 article */
.article { max-width: 760px; }
.article-title { font-family: "Noto Serif SC", serif; font-size: clamp(24px, 5.2vw, 32px); line-height: 1.45; font-weight: 700; color: #2B2A26; margin: 18px 0 14px; letter-spacing: 1.5px; }
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; color: #8a8372; font-size: 13px; line-height: 1.6; padding-bottom: 16px; border-bottom: 1px solid #E9DFCF; margin-bottom: 22px; }
.art-h { font-family: "Noto Serif SC", serif; font-size: clamp(18px, 4.2vw, 22px); line-height: 1.5; font-weight: 600; color: #2B2A26; margin: 30px 0 14px; border-left: 4px solid #B3643A; padding-left: 12px; letter-spacing: 0.5px; }
.art-h2 { font-family: "Noto Serif SC", serif; font-size: clamp(16px, 3.8vw, 18px); line-height: 1.5; font-weight: 600; color: #3a362e; margin: 22px 0 10px; border-left: 3px solid #6F7F64; padding-left: 11px; letter-spacing: 0.3px; }
.art-h3 { font-family: "Noto Serif SC", serif; font-size: clamp(15px, 3.6vw, 16px); line-height: 1.5; font-weight: 600; color: #45413a; margin: 18px 0 8px; padding-left: 0; letter-spacing: 0.2px; }
.art-p { color: #413d35; line-height: 1.95; font-size: clamp(16px, 3.9vw, 17px); text-align: justify; margin: 0 0 16px; word-break: break-word; }
.art-p b, .art-p strong { font-weight: 700; color: #2b2320; }
.art-p i, .art-p em { font-style: italic; }
.art-p u { text-underline-offset: 3px; }
.art-p s { color: #8a8378; }
.art-p.art-center { text-align: center; }
.art-table td b, .art-table th b, .art-table td strong, .art-table th strong { font-weight: 700; }
.art-fig { margin: 22px 0; text-align: center; }
/* 图片为块级元素，text-align 对其无效；显式居中的图片用 auto 边距实现 */
.art-fig.art-center .art-img { margin-left: auto; margin-right: auto; }
.art-img { max-width: 100%; height: auto; border-radius: 4px; border: 1px solid #e7e0d2; box-shadow: 0 4px 16px rgba(43, 42, 38, 0.08); background: #fff; }
.art-table-wrap { margin: 22px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e7e0d2; border-radius: 4px; }
.art-table { width: 100%; border-collapse: collapse; font-size: clamp(13px, 3.4vw, 15px); line-height: 1.75; background: #fffdf8; }
.art-table th, .art-table td { border: 1px solid #e7e0d2; padding: 10px 14px; text-align: left; vertical-align: top; }
.art-table thead th { background: #f3ede1; color: #2b2a26; font-family: "Noto Serif SC", serif; font-size: clamp(14px, 3.6vw, 16px); font-weight: 600; white-space: nowrap; }
.art-table tbody tr:nth-child(even) { background: #f8f3ea; }
.art-table td { color: #45413a; }
.article-rel { margin-top: 36px; padding-top: 20px; border-top: 1px solid #E9DFCF; }
.sec-title { font-family: "Noto Serif SC", serif; font-size: 19px; color: #2B2A26; font-weight: 600; margin: 0 0 14px; }
.related-item { display: flex; gap: 12px; align-items: center; background: #FFFDF8; border: 1px solid #EEE5D5; border-radius: 6px; padding: 12px 14px; margin-top: 10px; cursor: pointer; transition: border-color .2s ease, transform .2s ease; }
.related-item:hover { border-color: #B3643A; transform: translateX(3px); }
.related-item .news-cover { flex: 0 0 84px; min-height: 56px; }
.related-item .feed-title { font-size: 15px; margin-bottom: 4px; }

/* 频道 tab（复用 filter-group chips） */
.pager { margin-top: 24px; text-align: center; }

/* ============================================================
   资料库（resources.html）
   ============================================================ */
.fchip {
  border: 1px solid #DDD2BE; background: #FFFDF8; color: #5a554a; font-size: 13px; padding: 5px 14px;
  border-radius: 20px; cursor: pointer; transition: all .2s ease; line-height: 1.4;
}
.fchip:hover { border-color: #B3643A; color: #B3643A; }
.fchip.active { background: #B3643A; border-color: #B3643A; color: #FFFDF8; }

/* 筛选区：各维度在手机端上下堆叠排布（每行一个维度），桌面端保持横向；主题标签云以小芯片紧凑全展示 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tc {
  border: 1px dashed #D8CCB6; background: #F8F2E6; color: #6E6A60; font-size: 12px; padding: 3px 10px; border-radius: 13px; cursor: pointer; transition: all .2s ease;
}
.tc:hover { border-color: #54708A; color: #54708A; }
.tc.active { background: #54708A; border-color: #54708A; color: #FFFDF8; }

/* 主题标签云：保留清单内的词始终显示，清单外标签折叠收纳，右侧展开/收起开关（手机/电脑一致） */
.tc-toggle {
  margin-left: 2px; align-self: flex-start; flex: none;
  background: none; border: none; color: #B3643A;
  font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; padding: 3px 2px;
}
.tc-toggle[hidden] { display: none; }
.tag-cloud.collapsed .tc.extra { display: none; }
.tag-cloud.open .tc.extra { display: inline-flex; }

.filter-select { border: 1px solid #DDD2BE; background: #FFFDF8; border-radius: 5px; padding: 7px 12px; font-size: 14px; color: #2B2A26; }

.sel-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.st-label { font-size: 13px; color: #6E6A60; }
.st { background: #FFFDF8; border: 1px solid #B3643A; color: #B3643A; font-size: 12.5px; padding: 3px 10px; border-radius: 15px; cursor: pointer; }
.st:hover { background: #B3643A; color: #FFFDF8; }

.resource-list { display: flex; flex-direction: column; gap: 10px; }
.resource-item {
  display: flex; align-items: stretch; gap: 12px; background: #FFFDF8; border: 1px solid #EEE5D5;
  border-radius: 6px; padding: 11px 14px; transition: box-shadow .2s ease, border-color .2s ease;
}
.resource-item:hover { box-shadow: 0 4px 12px rgba(43,42,38,.06); border-color: #D8CCB6; }
.resource-item.off { opacity: .72; }
.rext {
  flex: 0 0 46px; height: 46px; border-radius: 5px; background: #E8EEF3; color: #54708A;
  display: flex; align-items: center; justify-content: center; font-family: "Noto Serif SC", serif; font-weight: 600; font-size: 12px; letter-spacing: 1px;
}
.resource-body { flex: 1 1 auto; min-width: 0; }
.resource-title { font-family: "Noto Serif SC", serif; font-size: 14.5px; color: #2B2A26; font-weight: 600; line-height: 1.45; margin-bottom: 5px; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; word-break: break-word; }
.resource-title .online { display: inline-block; margin-left: 6px; font-size: 10.5px; color: #6F7F64; background: #E4EBDD; padding: 1px 7px; border-radius: 10px; vertical-align: 2px; font-family: "Noto Sans SC", sans-serif; font-weight: 400; }
.resource-meta { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 5px; }
.src-tag { color: #8a8372; font-size: 11px; margin-left: 4px; }
.resource-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 5px; }
.resource-coll { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.coll-tag { font-size: 11px; color: #7a4e2f; background: #EFE0D3; border: 1px dashed #c99a7a; padding: 1px 8px; border-radius: 3px; cursor: pointer; }
.coll-tag:hover { background: #E7D2BD; }
.mini-tag { font-size: 11px; color: #8a8372; background: #F3EDDF; padding: 1px 8px; border-radius: 3px; }
.tag-more { font-size: 11px; color: #B3643A; background: none; border: none; padding: 1px 2px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.tag-more:hover { text-decoration: underline; }
/* 桌面端不折叠：展开按钮始终隐藏，全部标签可见 */
@media (min-width: 861px) {
  .tag-more { display: none; }
}
.resource-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; color: #9a9382; font-size: 11px; }
.resource-dl {
  flex: 0 0 auto; align-self: center; background: #B3643A; color: #FFFDF8; border: 1px solid #B3643A;
  padding: 7px 16px; border-radius: 5px; font-size: 13px; cursor: pointer; text-decoration: none; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; transition: opacity .2s ease;
}
.resource-dl:hover { opacity: .88; }
.resource-dl.disabled { background: #E6DCD0; border-color: #E6DCD0; color: #aaa090; cursor: not-allowed; }
.resource-dl.ghost { background: transparent; border-color: #D8CCB6; color: #6E6A60; }
.resource-dl.ghost:hover { background: #F3EDDF; border-color: #B3643A; color: #B3643A; opacity: 1; }
.resource-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; align-self: center; }
.dl-count { color: #9a9382; }

/* 点击「网盘下载」后的加载过渡提示（等待第三方网盘页期间给即时反馈）
   注意：不能在元素上用 HTML hidden 属性——会被下方 display:flex 覆盖，导致一进页面就显示。
   必须用 .show 类控制（默认 display:none）。 */
.disk-open {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 120; display: none; align-items: center; gap: 12px;
  background: rgba(43,42,38,.92); color: #f2ede2;
  padding: 14px 26px; border-radius: 8px; font-size: 15px; letter-spacing: 1px;
  box-shadow: 0 12px 34px rgba(0,0,0,.25); white-space: nowrap;
}
.disk-open.show { display: flex; }
.disk-open .disk-open-spin {
  width: 18px; height: 18px; flex: none;
  border: 2px solid rgba(255,255,255,.3); border-top-color: var(--seal, #B3643A);
  border-radius: 50%; animation: diskSpin .8s linear infinite;
}
@keyframes diskSpin { to { transform: rotate(360deg); } }

/* 标签公共类（tag 基础样式，若主题 CSS 未定义则兜底） */
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 3px; letter-spacing: 1px; }
.tag-seal { background: #EFE0D3; color: #A9562E; }
.tag-bamboo { background: #E4EBDD; color: #5c6b52; }
.tag-indigo { background: #E3EAF1; color: #4a6279; }
.tag-ink { background: #EDE9DF; color: #5a554a; }

.empty { color: #8a8372; font-size: 14px; padding: 40px 0; text-align: center; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 860px) {
  .detail-cols, .video-grid, .review-grid, .stat-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .detail-head { padding: 20px 18px; text-align: center; justify-content: center; }
  .detail-avatar, .detail-logo { margin: 0 auto; }
  .detail-hd { flex-basis: 100%; }
  .feed-card { flex-direction: column; align-items: stretch; }
  .news-cover { flex: 0 0 160px; min-height: 160px; height: 160px; margin-top: 2px; }
  .detail-stats { justify-content: center; }
  .resource-item { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
  .resource-dl { width: 100%; }
  .rext { width: 100%; height: 34px; flex: auto; font-size: 11.5px; }
  .resource-actions { flex-direction: column; width: 100%; align-items: stretch; gap: 6px; margin-top: 2px; }
  .resource-dl { padding: 8px 12px; font-size: 13px; }
  .resource-title { font-size: 14px; line-height: 1.4; overflow-wrap: break-word; word-break: break-word; }
  .dl-count { display: block; max-width: 100%; overflow-wrap: break-word; word-break: break-word; }
  .resource-foot { flex-direction: column; align-items: flex-start; gap: 3px; font-size: 11px; }
  .tag, .mini-tag, .src-tag { font-size: 10.5px; }
  /* 卡片主题标签折叠：默认只露前 2 个，其余隐藏；点开 .open 后全部显示 */
  .resource-tags.collapsed .mini-tag:nth-child(n+3) { display: none; }
  .resource-tags.collapsed.open .mini-tag { display: inline-block; }
  /* 筛选区各维度上下排布（每行一个维度），标签与类别同处一行不换行；类别多了横向滚动省空间；条件全部保持可见 */
  .filter-bar { gap: 8px; padding: 12px 12px; }
  .filter-bar > * { min-width: 0; width: 100%; }
  .filter-row { flex-direction: row; align-items: center; gap: 8px; }
  .filter-label { width: 38px; flex: 0 0 38px; padding-top: 0; font-size: 12px; }
  .filter-group { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .filter-group::-webkit-scrollbar { display: none; }
  .fchip { white-space: nowrap; flex: 0 0 auto; padding: 4px 11px; font-size: 12.5px; }
  .tag-cloud-row { gap: 8px; }
  .tag-cloud { display: flex; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tag-cloud::-webkit-scrollbar { display: none; }
  .tc { white-space: nowrap; flex: 0 0 auto; padding: 3px 9px; font-size: 11.5px; border-radius: 12px; }
  .tc-toggle { font-size: 11.5px; flex: 0 0 auto; }
  /* 搜索行：输入框弹性收缩、按钮固定不换行，整行不溢出 */
  .filter-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; width: 100%; min-width: 0; }
  .filter-tools .search-input-sm { flex: 1 1 auto; min-width: 0; width: auto; }
  .filter-tools .btn { flex: 0 0 auto; white-space: nowrap; }
}

@media (max-width: 560px) {
  .filter-label { width: 38px; font-size: 12px; }
  .fchip { padding: 4px 11px; font-size: 12.5px; }
  .filter-bar { padding: 14px 14px; }
  .filter-select { max-width: 100%; }
  .page-hero { padding: 28px 0 22px; }
  .page-hero .page-sub { font-size: 13.5px; line-height: 1.7; }
  .resource-dl { font-size: 14px; }
}

/* ---------- 资料合集聚合页（collection.html） ---------- */
.section-desc { font-size: 13.5px; color: #6E6A60; margin-bottom: 18px; line-height: 1.7; }
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.coll-card {
  display: flex; flex-direction: column; gap: 10px;
  background: #FFFDF8; border: 1px solid #E7DCC8; border-radius: 6px;
  padding: 16px 16px 14px; text-decoration: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.coll-card:hover { border-color: #C99A7A; box-shadow: 0 6px 18px rgba(43,42,38,.07); transform: translateY(-2px); }
.coll-card.active { border-color: #B3643A; background: #FBF2E8; box-shadow: 0 0 0 1px #B3643A inset; }
.coll-card.active .coll-card-go { color: #B3643A; }
.coll-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.coll-card-name { font-family: "Noto Serif SC", serif; font-size: 16px; font-weight: 600; color: #2B2A26; }
.coll-card-n { font-size: 12px; color: #B3643A; background: #EFE0D3; padding: 2px 9px; border-radius: 12px; white-space: nowrap; }
.coll-samples { margin: 0; padding: 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.coll-sample { font-size: 12px; color: #6E6A60; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-sample.muted { color: #B9B2A2; }
.coll-card-go { font-size: 12.5px; color: #B3643A; font-weight: 500; margin-top: auto; }
@media (max-width: 560px) {
  .collection-grid { grid-template-columns: 1fr; gap: 12px; }
  .coll-sample { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* ---------- 合集详情页（collections.html?coll=） ---------- */
.coll-detail-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #EEE4D2;
}
.coll-detail-name { font-family: "Noto Serif SC", serif; font-size: 20px; font-weight: 600; color: #2B2A26; }
.coll-detail-count { font-size: 12.5px; color: #B3643A; background: #EFE0D3; padding: 3px 10px; border-radius: 12px; }
/* ============================================================
   个人中心（profile.html）
   ============================================================ */
.profile-wrap { max-width: 760px; margin: 0 auto; }
.profile-card {
  background: var(--card, #fffdf8); border: 1px solid rgba(43,42,38,.08);
  border-radius: var(--radius, 8px); padding: 26px; box-shadow: 0 4px 18px rgba(43,42,38,.05);
}
.profile-card-empty { text-align: center; }
.profile-empty { padding: 30px 8px; }
.profile-empty-ico {
  width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink, #2b2a26); color: var(--paper, #faf6ef); font-family: var(--serif, "Noto Serif SC", serif);
  font-size: 26px; font-weight: 600; margin-bottom: 16px;
}
.profile-title { font-family: var(--serif, "Noto Serif SC", serif); font-size: 18px; margin: 0 0 8px; }
.profile-desc { font-size: 13px; color: var(--ink-soft, #8a877e); margin: 0 0 20px; }
.profile-actions { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }

.profile-me { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.profile-me .auth-avatar { width: 46px; height: 46px; font-size: 20px; margin-right: 0; }
.profile-me-info .profile-name { font-size: 15px; font-weight: 600; word-break: break-all; }
.profile-me-info .profile-role { font-size: 12px; color: var(--seal, #b03a2e); margin-top: 2px; }
.profile-tip { font-size: 12px; color: var(--ink-soft, #8a877e); margin: 12px 0 18px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; }
.profile-cell {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid rgba(43,42,38,.08);
  border-radius: var(--radius, 8px); text-decoration: none; color: var(--ink, #2b2a26);
  transition: border-color .2s, transform .2s;
}
.profile-cell:hover { border-color: rgba(176,58,46,.35); transform: translateY(-1px); }
.profile-cell-ico {
  width: 34px; height: 34px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(176,58,46,.1); color: var(--seal, #b03a2e); font-size: 15px; margin-bottom: 6px;
}
.profile-cell b { font-size: 14px; font-weight: 600; }
.profile-cell small { font-size: 12px; color: var(--ink-soft, #8a877e); }
.profile-cell.is-disabled { cursor: default; opacity: .72; }
.profile-cell.is-disabled:hover { border-color: rgba(43,42,38,.08); transform: none; }
@media (max-width: 480px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-card { padding: 20px 16px; }
}

/* ============================================================
   试卷库 · 热门专区（考程节点快捷入口）
   高频考程独立成项，醒目、抓重点；次级分区弱化排在其下
   ============================================================ */
.quick-zones { padding: 18px 0 4px; }
.qz-row { display: flex; flex-wrap: wrap; gap: 10px; }
.qz-more { margin-top: 10px; padding-top: 12px; border-top: 1px dashed rgba(43,42,38,.14); }

.qz-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; cursor: pointer;
  background: #fff; border: 1px solid rgba(43,42,38,.14);
  color: #4a463f; font-size: 15px; line-height: 1;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.qz-chip .qz-count {
  font-size: 12px; color: #9a948a; min-width: 18px; text-align: center;
  background: rgba(43,42,38,.06); border-radius: 999px; padding: 2px 6px; line-height: 1.3;
}
.qz-chip:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(80,60,40,.10); border-color: rgba(179,100,58,.4); }

/* 热门专区：朱砂描边 + 浅朱砂底，突出抓眼 */
.qz-chip.hot {
  border-color: rgba(179,100,58,.42);
  background: linear-gradient(180deg,#fdf3ea,#faeadd);
  color: #8c4a22; font-weight: 600;
}
.qz-chip.hot .qz-count { background: rgba(179,100,58,.14); color: #a85a2c; }
.qz-chip.hot:hover { border-color: rgba(179,100,58,.7); box-shadow: 0 8px 20px rgba(179,100,58,.18); }

.qz-chip.active {
  background: #b3643a; border-color: #b3643a; color: #fff;
  box-shadow: 0 6px 16px rgba(179,100,58,.32);
}
.qz-chip.active .qz-count { background: rgba(255,255,255,.22); color: #fff; }
.qz-chip.active.hot { background: #9c4f28; border-color: #9c4f28; }

/* 已选条里的专区标签 */
.st.st-zone { background: #b3643a; border-color: #b3643a; color: #fff; }

@media (max-width: 740px) {
  .quick-zones { padding: 14px 0 2px; }
  .qz-row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 8px; padding-bottom: 4px; }
  .qz-row::-webkit-scrollbar { display: none; }
  .qz-chip { flex: 0 0 auto; padding: 8px 14px; font-size: 14px; }
  .qz-more { border-top: none; padding-top: 0; }
}
