/* 乐乐妈妈家庭作业辅导 · Web 用户站（对齐网站原型：暖纸底 #e9e5dd、主色 #e0603a、科目色、圆角阴影） */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&display=swap');
* { box-sizing: border-box; }
[v-cloak] { display: none; }
:root {
  --accent: #e0603a; --accent-deep: #c44e2c;
  --accent-soft: rgba(224, 96, 58, .09);
  --accent-soft2: rgba(224, 96, 58, .6);
  --accent-softb: rgba(224, 96, 58, .27);
  --ink: #221e1a; --ink2: #443d35; --ink3: #6a6055;
  --muted: #8a8178; --faint: #a59a8d;
  --line: #f0ebe3; --line2: #ece6dc; --line3: #e6ddd0; --line4: #e3dccf;
  --bg-soft: #f6f2ea; --bg-soft2: #faf7f1;
  --gold: #c99a3a; --gold-bg: #fbf1de;
  --green: #2f9e6b; --green-bg: #e9f5ee;
}
body {
  margin: 0; background: radial-gradient(1400px 800px at 50% -10%, #f4efe7, #e6e1d8);
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
button { font-family: inherit; }
.sc::-webkit-scrollbar { width: 8px; }
.sc::-webkit-scrollbar-thumb { background: #d8d0c4; border-radius: 4px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slidein { from { transform: translateX(100%); } to { transform: translateX(0); } }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

/* ---------- 应用外框（grid：左列侧栏从顶栏下开始；公告/动态条只占内容列） ---------- */
.app {
  max-width: 1360px; margin: 26px auto; background: #fff; border-radius: 14px;
  box-shadow: 0 40px 90px -30px rgba(60, 44, 30, .45);
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  grid-template-areas:
    "top top"
    "side main";
  min-height: calc(100vh - 52px); position: relative;
}
/* 非浏览视图（VIP 等）：无侧栏，单列全宽 */
.app.plain {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "main";
}
/* 主列（公告/动态/内容/VIP）自成 flex 纵列：行高只由自身内容决定。
   旧结构里侧栏跨 nb/act/body 三行，筛选后内容变矮时侧栏多余高度会被 grid
   均摊到三个 auto 行上，把公告/动态条撑高（41→169px / 122→250px），故重构 */
.main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }

/* ---------- 顶部导航 ---------- */
.topbar {
  grid-area: top;
  height: 62px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px; padding: 0 26px; z-index: 20;
  border-radius: 14px 14px 0 0; position: sticky; top: 0;
}
.brand { display: flex; align-items: center; flex: none; cursor: pointer; }
/* 横版品牌 logo（已裁透明留白至 840×276 透明底深字，白顶栏用）：高度定值、宽度按比例自适应 */
.brand-img { height: 46px; width: auto; display: block; }
.region-wrap { position: relative; flex: none; }
.region-btn {
  border: 1px solid var(--line2); background: var(--accent-soft); border-radius: 9px;
  padding: 8px 12px; display: flex; align-items: center; gap: 6px; cursor: pointer;
}
.region-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.region-btn b { font-size: 13px; font-weight: 700; color: var(--ink); }
.region-btn small { font-size: 10px; color: var(--muted); }
.searchbar {
  flex: 1; background: var(--bg-soft); border: 1.5px solid var(--line2); border-radius: 10px; height: 40px;
  display: flex; align-items: center; gap: 10px; padding: 0 6px 0 14px;
}
.search-ico { width: 16px; height: 16px; border: 2px solid #b3a595; border-radius: 50%; position: relative; flex: none; }
.search-ico::after {
  content: ""; position: absolute; width: 6px; height: 2px; background: #b3a595; bottom: -3px; right: -4px; transform: rotate(45deg);
}
.searchbar input { flex: 1; border: none; background: none; outline: none; font-size: 14px; font-family: inherit; color: var(--ink); }
.search-go {
  border: none; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px;
  padding: 8px 22px; border-radius: 8px; cursor: pointer;
}
.nav-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.nav-link { border: none; background: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink2); padding: 0; }
.nav-link.on { font-weight: 800; color: var(--accent); }
.btn-upload {
  border: 1px solid var(--accent); background: #fff; color: var(--accent); font-weight: 700; font-size: 13px;
  padding: 7px 14px; border-radius: 9px; cursor: pointer;
}
.btn-upload:hover { background: var(--accent-soft); }
.user-chip { display: flex; align-items: center; gap: 7px; padding-left: 4px; }
.points-chip { font-size: 12px; color: var(--gold); font-weight: 700; background: var(--gold-bg); padding: 5px 10px; border-radius: 8px; white-space: nowrap; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.points-chip:hover { border-color: var(--gold); }
.avatar {
  height: 32px; min-width: 32px; max-width: 120px; padding: 0 12px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12.5px; cursor: pointer; border: none;
  white-space: nowrap; overflow: hidden;
}

/* ---------- 地区菜单 ---------- */
.region-menu {
  position: absolute; top: 46px; left: 0; z-index: 40; background: #fff; border: 1px solid var(--line2);
  border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(60, 44, 30, .3); padding: 14px; width: 300px;
  animation: fade .15s ease;
}
.rm-tip { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.rm-nation {
  width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 9px 12px; font-size: 13px; font-weight: 700; cursor: pointer; margin-bottom: 10px; color: #332d26;
}
.rm-nation.on { border-color: var(--accent); background: var(--accent-soft); }
.rm-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.rm-city {
  border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 9px 4px; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.rm-city.on { border-color: var(--accent); background: var(--accent-soft); }
.rm-city b { font-size: 12.5px; font-weight: 700; color: #332d26; }
.rm-city.on b { color: var(--accent); }
.rm-city small { font-size: 10px; color: var(--faint); }

/* ---------- 右上角 App 下载弹层 ---------- */
.apk-wrap { position: relative; flex: none; }
.nav-apk {
  border: 1px solid var(--line2); background: #fff; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--ink2); padding: 6px 12px; border-radius: 9px; white-space: nowrap;
}
.nav-apk:hover { border-color: var(--accent); color: var(--accent); }
.apk-menu {
  position: absolute; top: 46px; right: 0; z-index: 40; background: #fff; border: 1px solid var(--line2);
  border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(60, 44, 30, .3); padding: 14px; width: 216px;
  text-align: center; animation: fade .15s ease;
}
.apk-tip { font-size: 12px; font-weight: 700; color: var(--ink2); margin-bottom: 10px; }
.apk-qr { display: flex; align-items: center; justify-content: center; min-height: 168px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.apk-qr img { display: block; }
.apk-noqr { font-size: 12px; color: var(--muted); line-height: 1.7; padding: 30px 0; }
.apk-link {
  display: block; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--accent);
  text-decoration: none; padding: 8px; border-radius: 9px; background: var(--accent-soft);
}
.apk-link:hover { background: var(--accent); color: #fff; }
.apk-sub { font-size: 10.5px; color: var(--faint); margin-top: 9px; line-height: 1.6; }

/* ---------- 浏览：侧栏（左列，与公告/动态条并排）+ 内容 ---------- */
.side {
  grid-area: side;
  border-right: 1px solid var(--line); padding: 18px 16px;
  position: sticky; top: 62px; align-self: start; max-height: calc(100vh - 62px); overflow-y: auto;
}
.local-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-radius: 12px;
  padding: 14px; color: #fff; margin-bottom: 18px;
}
.lc-kicker { font-size: 11px; opacity: .9; font-weight: 500; margin-bottom: 5px; }
.lc-title { font-size: 15px; font-weight: 900; line-height: 1.35; }
.lc-badge {
  margin-top: 8px; font-size: 11px; background: rgba(255, 255, 255, .22); display: inline-block;
  padding: 3px 8px; border-radius: 12px; font-weight: 600;
}
.fgroup { margin-bottom: 18px; }
.fg-title { font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 9px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line2); background: #fff; color: var(--ink3); font-size: 12px; font-weight: 500;
  padding: 5px 11px; border-radius: 16px; cursor: pointer;
}
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.content { min-width: 0; padding: 18px 24px; animation: fade .2s ease; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.crumb-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.crumb { font-size: 18px; font-weight: 900; color: var(--ink); }
.crumb-count { font-size: 13px; color: var(--muted); }
.crumb-count b { color: var(--accent); }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.sorts { display: flex; gap: 14px; font-size: 13px; }
.sort { color: var(--muted); cursor: pointer; font-weight: 500; }
.sort.on { font-weight: 800; color: var(--accent); }
.flowtoggle { display: flex; background: var(--line); border-radius: 8px; padding: 3px; }
.ft-btn {
  border: none; cursor: pointer; padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 700;
  background: transparent; color: var(--muted);
}
.ft-btn.on { background: #fff; color: var(--accent); }

.batchbar {
  background: var(--accent-soft); border: 1px solid var(--accent-softb); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.batchbar span { font-size: 13px; color: #7a5a3a; }
.batchbar b { color: var(--accent-deep); }
.batch-btn {
  border: none; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px;
  padding: 7px 16px; border-radius: 8px; cursor: pointer; flex: none;
}
.batch-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 卡片网格（A4 竖版封面：210:297 真实试卷比例 + 悬浮标签，下载按钮直接下载） ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rcard {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px;
  box-shadow: 0 2px 10px rgba(120, 80, 40, .05); position: relative;
  display: flex; flex-direction: column;
}
.rcard-sel { position: absolute; top: 12px; right: 12px; z-index: 2; }
/* 封面横幅：无封面时科目色底纹 + 居中 PDF 图标占位（旧版 60×78 缩略图过小、右侧大量留白） */
/* 封面按 A4 比例（预览图即 A4 页渲染，cover 不裁切）；无封面时科目色底纹 + 居中 PDF 图标占位 */
.rcover {
  position: relative; width: 100%; aspect-ratio: 210 / 297; border-radius: 10px; overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--sttint), var(--sttint) 7px, #fff 7px, #fff 9px);
  border: 1px solid var(--sttint);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.rcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-empty { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--stcolor); }
.rc-empty .ico { width: 34px; height: 34px; opacity: .8; }
.rc-empty b { font-size: 10.5px; font-weight: 800; letter-spacing: 2px; }
.rtags { position: absolute; left: 8px; top: 8px; display: flex; gap: 5px; }
.rtag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; box-shadow: 0 1px 4px rgba(40, 26, 12, .16); }
.rtitle {
  margin-top: 10px; min-height: 2.7em; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.35; cursor: pointer;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.rtitle:hover { color: var(--accent-deep); }
.rmeta { font-size: 11px; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.rfoot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.rprice { font-size: 15px; font-weight: 800; color: var(--accent); }
.rprice small { font-size: 11px; font-weight: 500; color: var(--faint); }
.btn-dl {
  border: none; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px;
  padding: 6px 14px; border-radius: 8px; cursor: pointer;
}
.btn-dl:hover { background: var(--accent); color: #fff; }

/* ---------- 列表视图 ---------- */
.ltable { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
/* 列表视图表头/行（改名 lthead/ltrow：原 .lhead/.lrow 与登录弹窗撞名，会把
   padding/灰底/hover 泄漏进登录框，造成输入行缩进错位） */
.lthead, .ltrow { display: flex; align-items: center; padding: 11px 16px; }
.lthead { background: var(--bg-soft2); font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.ltrow { border-bottom: 1px solid #f4efe7; font-size: 13px; }
.ltrow:last-child { border-bottom: none; }
.ltrow:hover { background: #fdfbf7; }
.lcol-sel { width: 28px; flex: none; }
.lcol-title { flex: 1; min-width: 0; }
.lcol-title-in { font-weight: 600; color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: 8px; min-width: 0; }
.lcol-title-in em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcol-title-in:hover em { color: var(--accent-deep); }
.lbar { width: 5px; height: 20px; border-radius: 3px; flex: none; }
.lcol-subj { width: 80px; font-weight: 700; }
.lcol-ver { width: 100px; color: var(--muted); }
.lcol-page { width: 60px; color: var(--muted); }
.lcol-pt { width: 70px; color: var(--accent); font-weight: 800; }
.lcol-act { width: 80px; }
.loc-pill { font-size: 10px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; flex: none; }

/* ---------- 分页 / 空态 ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 22px; }
.pg {
  min-width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line2); background: #fff; color: var(--ink3); border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer; padding: 0 6px;
}
.pg.on { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 800; }
.pg.dis { opacity: .4; cursor: not-allowed; }
.empty { text-align: center; padding: 70px 0; color: var(--muted); font-size: 14px; }
.empty .big { font-size: 40px; margin-bottom: 12px; }
.loading { text-align: center; padding: 40px 0; color: var(--faint); font-size: 13px; }

/* ---------- VIP 视图 ---------- */
.vipwrap { overflow-y: auto; animation: fade .2s ease; }
.viphero { background: linear-gradient(140deg, #3a2f26, #221a14); padding: 40px 48px; color: #f4e9d8; }
.viphero .kicker { font-size: 13px; letter-spacing: 2px; color: #d4a95a; font-weight: 700; margin-bottom: 8px; }
.viphero h2 { font-size: 28px; font-weight: 900; margin: 0 0 6px; }
.viphero p { font-size: 14px; color: #c7b596; margin: 0; }
.vipbody { padding: 32px 48px; }
.vipgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.vcard {
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 22px;
  box-shadow: 0 4px 16px rgba(120, 80, 40, .06); position: relative;
}
.vcard.owned { border-color: #2f9e6b55; }
.vowned {
  position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700;
  color: var(--green); background: var(--green-bg); padding: 3px 10px; border-radius: 12px;
}
.vgrade { font-size: 18px; font-weight: 900; color: var(--ink); }
.vprice { margin-top: 12px; display: flex; align-items: baseline; gap: 2px; }
.vprice .cur { font-size: 15px; color: var(--gold); font-weight: 700; }
.vprice .num { font-size: 36px; font-weight: 900; color: var(--gold); }
.vprice .per { font-size: 13px; color: var(--faint); }
.vbenefits { margin-top: 12px; font-size: 12.5px; color: var(--ink3); line-height: 1.9; }
.vweekly { margin-top: 10px; font-size: 12px; color: var(--muted); background: var(--bg-soft); border-radius: 8px; padding: 8px 10px; }
.vbtn {
  width: 100%; margin-top: 16px; border: none; cursor: pointer; background: var(--accent); color: #fff;
  font-weight: 800; font-size: 14px; padding: 11px; border-radius: 10px;
}
.vbtn.owned { background: var(--green-bg); color: var(--green); }

/* ---------- 详情抽屉 ---------- */
.mask { position: fixed; inset: 0; background: rgba(20, 14, 8, .35); z-index: 50; animation: fade .2s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 94vw; background: var(--bg-soft);
  overflow-y: auto; animation: slidein .28s cubic-bezier(.2, .9, .3, 1);
  box-shadow: -20px 0 50px -20px rgba(60, 44, 30, .35); z-index: 51;
}
.d-inner { padding: 26px 28px 0; }
.d-close {
  border: none; background: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 18px;
  cursor: pointer; color: var(--ink2); box-shadow: 0 2px 8px rgba(120, 80, 40, .1); margin-bottom: 16px;
}
.d-title { font-size: 21px; font-weight: 900; line-height: 1.4; color: var(--ink); }
.dtags { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.dtag { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.dmeta {
  background: #fff; border-radius: 14px; padding: 18px; display: grid;
  grid-template-columns: repeat(3, 1fr); gap: 16px; box-shadow: 0 2px 12px rgba(120, 80, 40, .06);
}
.dm-num { font-size: 17px; font-weight: 900; }
.dm-num.acc { color: var(--accent); }
.dm-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.d-sec-title { margin: 20px 0 10px; font-size: 15px; font-weight: 900; }
.d-sec-title small { font-size: 12px; font-weight: 500; color: var(--faint); }
.d-preview { padding: 0 28px; }
.preview-card { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 12px; box-shadow: 0 2px 12px rgba(120, 80, 40, .06); }
.preview-card img { width: 100%; display: block; border-radius: 6px; }
.locknote { text-align: center; padding: 16px; font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- 详情抽屉 · 评论打分 ---------- */
.d-comments { padding: 4px 28px 24px; }
.cm-head { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 12px; }
.cm-title { font-size: 15px; font-weight: 900; }
.cm-avg { font-size: 14px; font-weight: 800; color: var(--gold, #c99a3a); }
.cm-avg small { font-size: 11.5px; font-weight: 500; color: var(--faint); }
.cm-avg.none { font-size: 12px; font-weight: 500; color: var(--faint); }
.cm-list { display: flex; flex-direction: column; gap: 10px; }
.cm-item { display: flex; gap: 10px; background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 2px 12px rgba(120, 80, 40, .06); }
.cm-ava { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.cm-main { flex: 1; min-width: 0; }
.cm-top { display: flex; align-items: center; gap: 8px; }
.cm-top b { font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.cm-top small { font-size: 11px; color: var(--faint); }
.cm-del { margin-left: auto; border: none; background: none; font-size: 11.5px; color: var(--faint); cursor: pointer; padding: 2px 4px; }
.cm-del:hover { color: #c0392b; }
.cm-stars { display: inline-flex; }
.cm-stars i { font-style: normal; font-size: 12px; color: var(--line3); line-height: 1; }
.cm-stars i.on { color: #e8a33d; }
.cm-text { font-size: 13px; color: var(--ink2); line-height: 1.65; margin-top: 5px; word-break: break-word; }
.cm-text.none { color: var(--faint); font-size: 12px; }
.cm-empty { text-align: center; font-size: 12.5px; color: var(--faint); padding: 22px 0; background: #fff; border-radius: 12px; }
.cm-editor { margin-top: 14px; background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 2px 12px rgba(120, 80, 40, .06); }
.cm-picker { display: flex; align-items: center; gap: 4px; }
.cm-pick-label { font-size: 12px; color: var(--muted); margin-right: 6px; }
.cm-star { border: none; background: none; font-size: 22px; line-height: 1; color: var(--line3); cursor: pointer; padding: 2px; transition: transform .1s ease; }
.cm-star.on { color: #e8a33d; }
.cm-star:hover { transform: scale(1.15); }
.cm-picker b { font-size: 13px; color: var(--ink2); margin-left: 8px; }
.cm-ta { width: 100%; margin-top: 10px; border: 1.5px solid var(--line2); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-family: inherit; outline: none; resize: vertical; min-height: 64px; background: var(--bg-soft); box-sizing: border-box; }
.cm-ta:focus { border-color: var(--accent); background: #fff; }
.cm-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cm-note { font-size: 11.5px; color: var(--faint); }
.cm-submit { border: none; background: linear-gradient(120deg, var(--accent), var(--accent-deep)); color: #fff; font-weight: 800; font-size: 13px; padding: 9px 22px; border-radius: 10px; cursor: pointer; }
.cm-submit:disabled { opacity: .6; cursor: default; }
.dfoot {
  position: sticky; bottom: 0; background: rgba(246, 242, 234, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line3); padding: 16px 28px; display: flex; gap: 12px; align-items: center;
}
.dl-flag { font-size: 12px; color: var(--green); background: var(--green-bg); padding: 4px 10px; border-radius: 8px; font-weight: 700; flex: none; }
.btn-fav {
  border: none; background: #fff; border: 1px solid var(--line3); cursor: pointer; padding: 12px 16px;
  border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--muted); flex: none;
}
.btn-fav.on { color: #e05656; border-color: #f3c9c9; background: #fbeeed; }
/* 合并下载主按钮：默认积分色；有该年级 VIP 时金色 + 星标（后端 /file 自动 VIP 优先 → 积分兜底） */
.btn-dlmain {
  flex: 1; border: none; background: linear-gradient(120deg, var(--accent), var(--accent-deep)); color: #fff;
  font-weight: 800; font-size: 15px; padding: 13px; border-radius: 11px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit;
}
.btn-dlmain.vip { background: linear-gradient(120deg, #d4a95a, #c99a3a); }
.btn-dlmain:disabled { opacity: .7; cursor: wait; }

/* ---------- 上传弹窗 ---------- */
.umask { position: fixed; inset: 0; background: rgba(20, 14, 8, .4); z-index: 60; display: flex; align-items: center; justify-content: center; animation: fade .2s ease; }
.umodal {
  width: 680px; max-width: 94vw; max-height: 88vh; background: var(--bg-soft); border-radius: 18px;
  overflow-y: auto; box-shadow: 0 30px 70px -20px rgba(60, 44, 30, .5);
}
.u-head {
  padding: 24px 28px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: var(--bg-soft); z-index: 2;
}
.u-head b { font-size: 18px; font-weight: 900; }
.u-x { border: none; background: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 16px; cursor: pointer; color: var(--ink2); }
.u-body { padding: 22px 28px 28px; }
.u-tip {
  background: linear-gradient(115deg, var(--accent-soft), #fff); border: 1px solid var(--accent-softb);
  border-radius: 12px; padding: 12px 16px; font-size: 13px; color: #7a5a3a; margin-bottom: 18px;
}
.dropzone {
  border: 2px dashed var(--accent); border-radius: 14px; padding: 34px; text-align: center;
  background: #fff; margin-bottom: 20px; cursor: pointer;
}
.dropzone.drag { background: var(--accent-soft); }
.dz-ico { font-size: 34px; }
.dz-main { font-size: 15px; font-weight: 700; margin-top: 10px; }
.dz-sub { font-size: 12px; color: var(--faint); margin-top: 5px; }
.dz-file { margin-top: 10px; font-size: 13px; color: var(--accent-deep); font-weight: 700; }
.u-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.u-field-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.u-field-label i { font-style: normal; color: #d9534f; }
.u-select {
  width: 100%; border: 1px solid var(--line3); background: #fff; border-radius: 9px; padding: 10px 12px;
  font-size: 13px; font-weight: 600; color: var(--ink); font-family: inherit; outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23c2b8ab' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px;
}
.u-select.ph { color: #c2b8ab; font-weight: 500; }
.u-codes { grid-column: 1 / -1; }
.u-input {
  width: 100%; border: 1px solid var(--line3); background: #fff; border-radius: 9px; padding: 10px 12px;
  font-size: 13px; font-family: inherit; outline: none; color: var(--ink);
}
.u-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; cursor: pointer; }
.u-check input { margin-top: 1px; }
.u-check span { font-size: 12px; color: #7a7268; line-height: 1.55; }
.dkp { margin-top: 10px; font-size: 12.5px; color: var(--ink2); background: var(--bg-soft, #f6f2ea); border-radius: 8px; padding: 8px 12px; line-height: 1.6; }
.u-submit {
  width: 100%; margin-top: 20px; border: none; background: linear-gradient(120deg, var(--accent), var(--accent-deep));
  color: #fff; font-weight: 800; font-size: 15px; padding: 14px; border-radius: 12px; cursor: pointer;
  box-shadow: 0 8px 20px -6px var(--accent-soft2);
}
.u-submit:disabled { opacity: .6; cursor: wait; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-8px); z-index: 100;
  background: #2f2a24; color: #fff; font-size: 13px; font-weight: 600; padding: 11px 18px;
  border-radius: 10px; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .4); opacity: 0;
  pointer-events: none; transition: all .2s ease; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #8c3a2a; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .grid3 { grid-template-columns: repeat(2, 1fr); }
  .vipgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .app, .app.plain {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "side" "main";
  }
  .side { position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--line); }
  .grid3 { grid-template-columns: 1fr; }
  .vipgrid { grid-template-columns: 1fr; }
  .lcol-ver, .lcol-page { display: none; }
  .topbar { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 10px; }
  .searchbar { order: 9; flex-basis: 100%; }
}

/* ══════════ 登录弹窗 ══════════ */
.lmask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(34, 26, 18, .45);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade .2s ease;
}
.lcard {
  width: 400px; max-width: 100%;
  /* lmask 是 flex 容器，本卡为 item：min-width:auto（内容最小宽）会越过 max-width:100%
     把卡撑出屏幕（移动端 16px 输入框内在宽 ~314px → 整卡 474px > 视口 390px，实测溢出）。
     显式 min-width:0 才能让 max-width 收住；.lrow .li 的 min-width:0 负责让输入框随之收缩 */
  min-width: 0;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 70px -25px rgba(60, 44, 30, .45);
  padding: 26px 28px 24px;
  animation: floatup .25s ease;
}
.lhead { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.llogo {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 900;
}
.llogo img { width: 32px; height: 32px; display: block; }
.lhead-t { flex: 1; min-width: 0; }
.lt { font-size: 17px; font-weight: 900; }
.ls { font-size: 12px; color: var(--muted); margin-top: 3px; }
.lx {
  border: none; background: var(--bg-soft, #f6f2ea); color: var(--muted);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 13px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.lx:hover { background: var(--line2, #ece6dc); color: var(--ink); }
.ltabs {
  display: flex; gap: 4px; background: var(--bg-soft, #f6f2ea);
  border-radius: 11px; padding: 4px; margin: 20px 0 16px;
}
.ltabs button {
  flex: 1; border: none; background: none; padding: 9px 0; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer;
  font-family: inherit;
}
.ltabs button.on { background: #fff; color: var(--accent); font-weight: 800; box-shadow: 0 2px 8px rgba(120, 80, 40, .12); }
.li {
  width: 100%; height: 46px; border: 1.5px solid var(--line2, #ece6dc); border-radius: 11px;
  padding: 0 14px; font-size: 14px; outline: none;
  background: var(--bg-soft, #f6f2ea); font-family: inherit; box-sizing: border-box;
}
.li:focus { border-color: var(--accent); background: #fff; }
.li + .li, .lrow + .li { margin-top: 12px; }
.lrow { display: flex; gap: 10px; }
/* min-width:0 必需：input 内在宽度按 size=20 字符 × 字体均宽估算，16px 字号（防 iOS 缩放）
   + Noto Sans SC 下约 314px，会把「获取验证码」按钮挤出卡片、整卡溢出视口，须允许收缩 */
.lrow .li { flex: 1; min-width: 0; }
.lcode {
  flex: none; height: 46px; border: 1.5px solid var(--accent-softb, rgba(224, 96, 58, .27));
  background: var(--accent-soft, rgba(224, 96, 58, .09)); color: var(--accent);
  font-weight: 700; font-size: 12.5px; border-radius: 11px; padding: 0 14px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.lcode:disabled { border-color: var(--line2, #ece6dc); background: var(--bg-soft, #f6f2ea); color: var(--faint); cursor: not-allowed; }
.lhint {
  margin-top: 10px; font-size: 12.5px; color: var(--gold, #c99a3a);
  background: var(--gold-bg, #fbf1de); border-radius: 9px; padding: 8px 12px;
}
.lerr { margin-top: 10px; font-size: 12.5px; color: var(--red, #c0392b); background: var(--red-bg, #fbeeed); border-radius: 9px; padding: 8px 12px; }
.lbtn {
  width: 100%; height: 46px; margin-top: 16px; border: none; border-radius: 12px;
  background: linear-gradient(120deg, var(--accent), var(--accent-deep));
  color: #fff; font-weight: 800; font-size: 15px; padding: 0; cursor: pointer;
  font-family: inherit;
}
.lbtn:disabled { opacity: .6; cursor: not-allowed; }
.ltip { margin-top: 14px; font-size: 11.5px; color: var(--faint); text-align: center; line-height: 1.7; }

/* ══════════ 微信扫码支付弹窗 ══════════ */
.pmask {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(34, 26, 18, .5);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade .2s ease;
}
.pcard {
  width: 340px; max-width: 100%;
  background: #fff; border-radius: 20px;
  box-shadow: 0 30px 70px -25px rgba(60, 44, 30, .5);
  padding: 30px 28px 24px; text-align: center;
  animation: floatup .25s ease;
}
.pt { font-size: 18px; font-weight: 900; }
.psub { font-size: 13px; color: var(--muted); margin-top: 8px; }
.psub b { color: var(--accent); font-size: 16px; }
.pqr {
  width: 210px; height: 210px; margin: 20px auto 0;
  border: 1px solid var(--line); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px; box-sizing: border-box;
}
.pqr img { display: block; }
.pfall { margin-top: 14px; font-size: 12px; color: var(--red, #c0392b); word-break: break-all; }
.ptip { margin-top: 14px; font-size: 11.5px; color: var(--faint); line-height: 1.7; }
.pok, .pfail {
  width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900; color: #fff;
  animation: floatup .3s ease;
}
.pok { background: var(--green, #2f9e6b); }
.pfail { background: var(--faint, #a59a8d); }
.pclose {
  margin-top: 18px; width: 100%; border: none; border-radius: 11px;
  background: var(--bg-soft, #f6f2ea); color: var(--ink2);
  font-weight: 700; font-size: 13.5px; padding: 11px 0; cursor: pointer;
  font-family: inherit;
}
.pclose:hover { background: var(--line2, #ece6dc); }

/* ══════════ 积分充值弹窗 ══════════ */
.rcmask { position: fixed; inset: 0; z-index: 60; background: rgba(30, 24, 18, .5); display: flex; align-items: center; justify-content: center; padding: 22px; animation: rcfade .18s ease; }
@keyframes rcfade { from { opacity: 0; } }
.rccard { background: #fff; border-radius: 16px; width: min(430px, 94vw); box-shadow: 0 30px 70px -20px rgba(40, 26, 12, .5); padding: 22px 22px 16px; }
.rchead { display: flex; align-items: flex-start; gap: 12px; }
.rct-wrap { flex: 1; min-width: 0; }
.rct { font-size: 17px; font-weight: 900; }
.rcs { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.rcx { border: none; background: none; font-size: 15px; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.rcx:hover { background: var(--bg-soft); color: var(--ink); }
.rcgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.rcitem { position: relative; border: 1.5px solid var(--line2); background: var(--bg-soft); border-radius: 13px; padding: 16px 10px 13px; cursor: pointer; text-align: center; transition: all .15s ease; font-family: inherit; overflow: hidden; }
.rcitem:hover:not(:disabled) { border-color: var(--gold); background: #fffdf8; transform: translateY(-1px); }
.rcitem:disabled { opacity: .55; cursor: default; }
.rc-tag { position: absolute; top: 0; right: 0; font-size: 10px; font-weight: 800; color: #fff; background: var(--gold); padding: 2px 8px; border-radius: 0 0 0 8px; }
.rc-pts { font-size: 21px; font-weight: 900; color: var(--gold); }
.rc-pts small { font-size: 11px; color: var(--muted); font-weight: 600; }
.rc-yuan { font-size: 13px; font-weight: 700; color: var(--ink2); margin-top: 4px; }
.rcfoot { font-size: 11.5px; color: var(--faint); line-height: 1.7; margin-top: 15px; border-top: 1px solid var(--line); padding-top: 11px; }

/* ══════════ 意见反馈弹窗 ══════════ */
.fbmask { position: fixed; inset: 0; z-index: 60; background: rgba(30, 24, 18, .5); display: flex; align-items: center; justify-content: center; padding: 22px; animation: rcfade .18s ease; }
.fbcard { background: #fff; border-radius: 16px; width: min(470px, 94vw); max-height: 88vh; overflow-y: auto; box-shadow: 0 30px 70px -20px rgba(40, 26, 12, .5); }
.fbhead { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft); border-radius: 16px 16px 0 0; position: sticky; top: 0; }
.fbt-wrap { flex: 1; min-width: 0; }
.fbt { font-size: 17px; font-weight: 900; }
.fbs { font-size: 12px; color: var(--muted); margin-top: 5px; }
.fbx { border: none; background: none; font-size: 15px; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.fbx:hover { background: var(--line); color: var(--ink); }
.fbbody { padding: 16px 22px 20px; }
.fbtypes { display: flex; flex-wrap: wrap; gap: 8px; }
.fbtype { border: 1.5px solid var(--line2); background: var(--bg-soft); color: var(--ink3); font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.fbtype.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.fbrel { font-size: 12px; color: var(--ink2); background: var(--gold-bg); border-radius: 8px; padding: 8px 11px; margin-top: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbta { width: 100%; box-sizing: border-box; min-height: 110px; border: 1.5px solid var(--line2); background: var(--bg-soft); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; font-family: inherit; outline: none; margin-top: 12px; resize: vertical; }
.fbta:focus { border-color: var(--accent); background: #fff; }
.fbcontact { width: 100%; border: 1.5px solid var(--line2); background: var(--bg-soft); border-radius: 10px; padding: 10px 14px; font-size: 13px; font-family: inherit; outline: none; margin-top: 10px; }
.fbcontact:focus { border-color: var(--accent); background: #fff; }
.fbsubmit { width: 100%; margin-top: 14px; border: none; background: linear-gradient(120deg, var(--accent), var(--accent-deep)); color: #fff; font-weight: 800; font-size: 14.5px; padding: 12px; border-radius: 11px; cursor: pointer; }
.fbsubmit:disabled { opacity: .6; cursor: default; }
.fbmine-t { font-size: 13px; font-weight: 800; color: var(--ink); margin: 18px 0 10px; }
.fbmine { display: flex; flex-direction: column; gap: 10px; }
.fbmi { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.fbmi-head { display: flex; align-items: center; gap: 8px; }
.fbmi-type { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--ink3); }
.fbmi-type.t-纠错 { color: #d98a2b; background: #fbf2e4; }
.fbmi-type.t-版权举报 { color: #c0392b; background: #fbeeed; }
.fbmi-type.t-求资料 { color: var(--accent); background: var(--accent-soft); }
.fbmi-status { font-size: 11px; font-weight: 700; }
.fbmi-status.s-待处理 { color: var(--gold); }
.fbmi-status.s-处理中 { color: #3f7fd9; }
.fbmi-status.s-已回复 { color: var(--green); }
.fbmi-time { margin-left: auto; font-size: 10.5px; color: var(--faint); }
.fbmi-content { font-size: 12.5px; color: var(--ink2); line-height: 1.6; margin-top: 7px; }
.fbmi-reply { font-size: 12px; color: var(--ink2); background: var(--green-bg); border-radius: 8px; padding: 8px 10px; margin-top: 8px; line-height: 1.6; }
.fbmi-reply b { color: var(--green); }

/* ══════════ 首页公告条 ══════════ */
.noticebar {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 24px 0; padding: 10px 18px;
  background: var(--gold-bg); border: 1px solid rgba(201, 154, 58, .28);
  border-radius: 11px; animation: nbslide .25s ease;
}
@keyframes nbslide { from { opacity: 0; transform: translateY(-6px); } }
.nb-ico { font-size: 15px; flex: none; }
.nb-txt { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: #8a6a1f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-x { border: none; background: none; color: #c99a3a; font-size: 12px; cursor: pointer; padding: 3px 6px; border-radius: 6px; flex: none; }
.nb-x:hover { background: rgba(201, 154, 58, .18); }

/* ══════════ 空结果 求资料引导 ══════════ */
.eg-row { margin-top: 18px; display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; }
.eg-btn { border: none; background: linear-gradient(120deg, var(--accent), var(--accent-deep)); color: #fff; font-weight: 800; font-size: 13.5px; padding: 10px 26px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.eg-btn:hover { filter: brightness(1.05); }
.eg-note { font-size: 12px; color: var(--faint); }

/* ══════════ 预览图灯箱 ══════════ */
.lbmask {
  position: fixed; inset: 0; z-index: 80; background: rgba(24, 19, 14, .82);
  display: flex; align-items: center; justify-content: center; gap: 18px; animation: rcfade .18s ease;
}
.lb-stage { display: flex; flex-direction: column; align-items: center; max-width: min(760px, 82vw); }
.lb-stage img {
  max-width: 100%; max-height: 78vh; border-radius: 10px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .7); background: #fff;
  animation: lbzoom .18s ease;
}
@keyframes lbzoom { from { opacity: 0; transform: scale(.96); } }
.lb-cap { margin-top: 14px; font-size: 13px; color: rgba(255, 255, 255, .82); text-align: center; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.lb-nav {
  border: none; width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; cursor: pointer;
  transition: background .15s ease;
}
.lb-nav:hover:not(:disabled) { background: rgba(255, 255, 255, .3); }
.lb-nav:disabled { opacity: .3; cursor: default; }
.lb-x { position: fixed; top: 22px; right: 26px; border: none; background: rgba(255, 255, 255, .14); color: #fff; font-size: 15px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.lb-x:hover { background: rgba(255, 255, 255, .3); }
.preview-card { position: relative; cursor: zoom-in; }
.preview-card .pv-zoom {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; line-height: 30px;
  text-align: center; border-radius: 50%; font-size: 14px;
  background: rgba(30, 24, 18, .55); color: #fff; opacity: 0; transition: opacity .15s ease;
}
.preview-card:hover .pv-zoom { opacity: 1; }

/* ── 学习圈动态条（首页滚动播报：谁下载/上传了什么，4 行一屏翻页） ── */
.actbar {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 24px 0; padding: 8px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 1px 4px rgba(31, 23, 18, .04);
}
.act-ico { flex: none; font-size: 14px; animation: actspin 6s linear infinite; }
@keyframes actspin { to { transform: rotate(360deg); } }
.act-roll { flex: 1; min-width: 0; height: 104px; overflow: hidden; position: relative; }  /* 4 × 26px 行 */
.act-block { display: block; }
.act-line {
  display: flex; align-items: center; gap: 6px;
  width: 100%; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
  font-size: 13px; color: #6b5b50; white-space: nowrap; overflow: hidden;
}
.act-line b { color: var(--accent-deep, #c44e2c); font-weight: 700; flex: none; }
.act-line small { color: #b3a294; font-size: 11px; flex: none; }
.act-line:hover { color: var(--accent); }
.act-title { font-style: normal; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.act-page { flex: none; font-size: 11px; color: #b3a294; font-variant-numeric: tabular-nums; }
.actup-enter-active, .actup-leave-active { transition: all .38s ease; }
.actup-enter-from { opacity: 0; transform: translateY(14px); }
.actup-leave-to { opacity: 0; transform: translateY(-14px); }

/* ══════════ 头像账号菜单 + 私信入口 ══════════ */
.uwrap { position: relative; }
.umsg-btn { position: relative; border: 1px solid var(--line2); background: #fff; border-radius: 9px; font-size: 14px; color: var(--ink2); padding: 7px 10px; cursor: pointer; line-height: 1; }
.umsg-btn:hover { border-color: var(--accent); color: var(--accent); }
.umsg-badge { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; background: #e05656; color: #fff; font-size: 10px; font-weight: 800; padding: 0 4px; text-align: center; }
.umenu { position: absolute; top: 44px; right: 0; z-index: 40; background: #fff; border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(60, 44, 30, .3); padding: 8px; width: 212px; animation: fade .15s ease; }
.umenu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.umenu-head b { display: block; font-size: 14px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu-head small { font-size: 11px; color: var(--faint); }
.umenu-item { display: flex; align-items: center; gap: 8px; width: 100%; border: none; background: none; text-align: left; font-size: 13px; font-weight: 600; color: var(--ink2); padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.umenu-item:hover { background: var(--bg-soft); }
.umenu-item.danger { color: #c0392b; }
.umenu-badge { margin-left: auto; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--accent); border-radius: 9px; padding: 1px 7px; flex: none; }

/* ══════════ 详情页上传者条 + 评论区私信 ══════════ */
.d-uploader { display: flex; align-items: center; gap: 10px; background: var(--bg-soft2); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 14px; margin-top: 12px; font-size: 12.5px; color: var(--ink3); }
.d-uploader b { color: var(--ink2); }
.du-btn { margin-left: auto; border: 1px solid var(--accent-softb); background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; padding: 5px 12px; border-radius: 8px; cursor: pointer; flex: none; }
.du-btn:hover { background: var(--accent); color: #fff; }
.cm-dm { border: none; background: none; font-size: 11.5px; color: var(--accent); cursor: pointer; padding: 2px 4px; }
.cm-dm:hover { text-decoration: underline; }

/* ══════════ 昵称与宝贝资料弹窗 ══════════ */
.pfcard { text-align: left; }
.pf-tabs { margin: 14px 0; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pf-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.pf-preview { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink3); background: var(--gold-bg); border-radius: 8px; padding: 8px 12px; }
.pf-preview b { color: var(--gold); font-size: 14px; margin-left: 6px; }
.pf-roles { display: flex; gap: 8px; }
.pf-role { border: 1.5px solid var(--line2); background: var(--bg-soft); border-radius: 999px; padding: 9px 20px; font-size: 13px; font-weight: 600; color: var(--ink3); cursor: pointer; }
.pf-role.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.pf-grade { margin-top: 14px; }
.pf-grades { display: flex; flex-wrap: wrap; gap: 7px; }
.pf-grades .pf-role { padding: 6px 13px; font-size: 12px; }

/* ══════════ 私信抽屉（IM 聊天风格） ══════════ */
.msgdrawer { width: 460px; display: flex; flex-direction: column; overflow: hidden; }
.msgdrawer > .d-inner { padding-top: 22px; }
.msg-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 0 28px 24px; }
.msg-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 12px; cursor: pointer; text-align: left; }
.msg-row:hover { border-color: var(--accent-softb); }
.msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.msg-top { display: flex; align-items: baseline; gap: 8px; }
.msg-top b { font-size: 13.5px; }
.msg-top small { margin-left: auto; font-size: 10.5px; color: var(--faint); flex: none; }
.msg-last { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-row .umsg-badge { position: static; flex: none; }
/* 头像圆（会话列表 40 / 聊天区 32） */
.msg-ava { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; user-select: none; }
.msg-ava.sm { width: 32px; height: 32px; font-size: 13px; }
.msg-ava.me { background: linear-gradient(135deg, #f7d9a8, #eec27b); color: #8a5a17; }
.msg-chathead { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line3); background: var(--bg-soft); flex: none; }
.msg-back { border: 1px solid var(--line2); background: #fff; border-radius: 50%; width: 32px; height: 32px; font-size: 16px; font-weight: 700; color: var(--ink3); cursor: pointer; flex: none; line-height: 1; }
.msg-back:hover { color: var(--accent); border-color: var(--accent); }
.msg-peer { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-peer b { font-size: 14.5px; }
.msg-peer small { font-size: 11px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-chathead .d-close { margin-bottom: 0; width: 30px; height: 30px; font-size: 15px; flex: none; }
/* 聊天画布：暖灰底（微信式），气泡浮在其上 */
.msg-thread { flex: 1; overflow-y: auto; padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-soft2); }
.msg-more { align-self: center; border: 1px solid var(--line3); background: #fff; border-radius: 999px; font-size: 11.5px; color: var(--muted); padding: 5px 14px; cursor: pointer; margin-bottom: 4px; }
.msg-day { text-align: center; font-size: 12px; color: var(--faint); padding: 18px 0; }
/* 时间分隔条：居中小灰药丸（今天 14:30 / 昨天 / 9月14日） */
.msg-sep { align-self: center; background: #e8e1d5; color: var(--faint); font-size: 11px; border-radius: 999px; padding: 3px 10px; margin: 6px 0 2px; flex: none; }
/* 气泡行：对方头像在左、我的头像在右（row-reverse） */
.bub-row { display: flex; align-items: flex-start; gap: 8px; }
.bub-row.me { flex-direction: row-reverse; }
.bub-wrap { max-width: 74%; display: flex; flex-direction: column; align-items: flex-start; }
.bub-row.me .bub-wrap { align-items: flex-end; }
.bub { background: #fff; border-radius: 4px 12px 12px 12px; padding: 8px 12px; font-size: 13.5px; line-height: 1.65; color: var(--ink); box-shadow: 0 1px 4px rgba(120, 80, 40, .07); word-break: break-word; white-space: pre-wrap; }
.bub-row.me .bub { background: linear-gradient(120deg, var(--accent), var(--accent-deep)); color: #fff; border-radius: 12px 4px 12px 12px; }
/* 组末回执：已读/未读（挂在同发送方连续组的最后一条下） */
.bub-meta { font-size: 10px; color: var(--faint); margin-top: 3px; }
.msg-inputbar { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line3); background: var(--bg-soft); flex: none; }
.msg-inputbar textarea { flex: 1; min-width: 0; border: 1.5px solid var(--line2); border-radius: 10px; padding: 9px 12px; font-size: 13px; font-family: inherit; outline: none; resize: none; height: 44px; background: #fff; }
.msg-inputbar textarea:focus { border-color: var(--accent); }
.msg-send { border: none; background: linear-gradient(120deg, var(--accent), var(--accent-deep)); color: #fff; font-weight: 800; font-size: 13.5px; padding: 0 22px; border-radius: 10px; cursor: pointer; }
.msg-send:disabled { opacity: .5; cursor: default; }

/* ═══════════════════════════════════════════════════════════
   2026-09 视觉升级：SVG 图标体系 + 控件对齐统一 + 交互细节
   （追加于文件末尾，同名规则按后者优先覆盖）
   ═══════════════════════════════════════════════════════════ */

/* ---- 图标基础：24 网格 stroke 图标，随文字颜色（currentColor） ---- */
.ico { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px; }
.ico.sm { width: 14px; height: 14px; vertical-align: -2.5px; }
.ico.xs { width: 12px; height: 12px; vertical-align: -2px; }
.ico.lg { width: 20px; height: 20px; vertical-align: -4px; }
.ico.xl { width: 30px; height: 30px; }
/* 图标与文字的内联间距（行内场景） */
.u-tip .ico, .dkp .ico, .locknote .ico, .fbrel .ico { margin-right: 6px; vertical-align: -2px; }
.lc-kicker .ico { margin-right: 4px; vertical-align: -2px; }
.nb-ico { display: flex; color: #c99a3a; }
.act-ico { display: flex; color: var(--accent); }
.search-i { color: #b3a595; }
.dz-svg { width: 44px; height: 44px; color: var(--accent); opacity: .85; }
.empty-big { width: 46px; height: 46px; color: #d8d0c4; display: block; margin: 0 auto 14px; }
.pv-zoom { display: flex; align-items: center; justify-content: center; }
.rtag-local { color: var(--accent); background: var(--accent-soft); display: inline-flex; align-items: center; gap: 3px; }
.rmeta-eye { display: inline-flex; align-items: center; gap: 3px; }
.loc-pill { display: inline-flex; align-items: center; }
.cm-avg .ico { color: #e8a33d; }

/* ---- 顶栏控件统一：同一行内所有控件等高（38px）、同圆角（10px）、图标-文字等距 ---- */
.region-btn, .nav-apk, .btn-upload, .points-chip, .umsg-btn {
  height: 38px; display: flex; align-items: center; border-radius: 10px;
}
.region-btn { padding: 0 12px; gap: 6px; }
.nav-apk { padding: 0 12px; gap: 5px; }
.btn-upload { padding: 0 14px; gap: 5px; }
.points-chip { padding: 0 11px; gap: 4px; }
.umsg-btn { padding: 0 10px; }
.searchbar { height: 38px; }
.search-go { height: 28px; padding: 0 18px; border-radius: 8px; }
.avatar { height: 38px; }
.user-chip { gap: 8px; }

/* ---- 圆形关闭/返回按钮：统一为图标居中 ---- */
.d-close, .u-x, .lx, .rcx, .fbx, .nb-x, .lb-x, .msg-back, .pok, .pfail {
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.pok .ico, .pfail .ico { color: #fff; }

/* ---- 顶栏其余图标按钮的图标-文字间距 ---- */
.du-btn, .ft-btn, .eg-btn, .rct, .fbt, .cm-title, .umenu-item, .apk-tip, .apk-link, .rm-nation {
  display: flex; align-items: center; gap: 6px;
}
.rct .ico, .fbt .ico, .cm-title .ico { color: var(--accent); }

/* ---- 焦点可达性 + 统一过渡 ---- */
button { transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid rgba(224, 96, 58, .45); outline-offset: 2px;
}
button:active:not(:disabled) { transform: scale(.97); }

/* ---- 卡片/分页悬浮反馈 ---- */
.rcard { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.rcard:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(120, 80, 40, .18); border-color: var(--line3); }
.vcard { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.vcard:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(120, 80, 40, .15); }
.pg:hover:not(.on):not(.dis) { border-color: var(--accent); color: var(--accent); }
.chip:hover:not(.on) { border-color: var(--accent-softb); color: var(--ink2); }

/* ---- 详情元信息：六格数值居中 + 等宽数字（位数不同也对齐） ---- */
.dmeta { text-align: center; gap: 14px; }
.dm-num { font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.dm-label { margin-top: 4px; letter-spacing: 1px; }

/* ---- 底部操作栏按钮：图标-文字对齐、同高 ---- */
.dfoot .btn-fav { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 16px; }
.dfoot .btn-fav.on .ico { color: #e05656; }

/* ---- 评论星：SVG 星星排版 ---- */
.cm-stars i { display: inline-flex; margin-right: 1px; }
.cm-stars i.on { color: #e8a33d; }
.cm-star { display: inline-flex; padding: 2px; }
.cm-star.on { color: #e8a33d; }

/* ---- 抽屉标题行：关闭按钮与标题呼吸感 ---- */
.d-close { margin-bottom: 14px; color: var(--muted); }
.d-close:hover { color: var(--ink); background: var(--line2); }
.u-x:hover, .lx:hover, .rcx:hover, .fbx:hover { background: var(--line2); color: var(--ink); }

/* ---- 学习圈动态：图标旋转与文字基线 ---- */
.act-ico .ico { animation: actspin 9s linear infinite; }
.act-line { gap: 7px; }

/* ---- VIP 受益清单：对勾统一缩进节奏 ---- */
.vbenefits { line-height: 2; }

/* ═══════════════════════════════════════════════════════════
   2026-09 移动端适配（≤768px）
   · 顶栏两行：品牌+地区+账号 → 整行搜索；动作入口移到底部 Tabbar
   · 侧栏筛选 → <details> 折叠面板（摘要带已选计数徽标）
   · 卡片双列紧凑、详情抽屉全屏、上传弹窗底部抽屉化
   · 输入框 16px 防 iOS 聚焦缩放；Tabbar/操作栏避开安全区
   ═══════════════════════════════════════════════════════════ */

/* ---- 桌面基础（移动段的前置结构）：顶栏动作组容器 / Tabbar 恒隐 / 折叠摘要恒隐 ---- */
.nav-links { display: flex; align-items: center; gap: 16px; }
.tabbar { display: none; }
.side-box summary { display: none; }
.umenu-item { text-decoration: none; }

@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }

  /* 外框：全出血贴边（去白边卡片壳） */
  .app { margin: 0; border-radius: 0; box-shadow: none; min-height: calc(100vh - 58px); }

  /* ---- 顶栏：两行布局 ---- */
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 12px; gap: 8px; border-radius: 0; }
  .brand-img { height: 32px; }
  .nav-links { display: none; }            /* 分类浏览/会员/App下载/上传 → 底部 Tabbar */
  .nav-actions { margin-left: auto; gap: 7px; }
  .region-btn { padding: 0 9px; }
  .region-btn b { font-size: 12px; }
  .points-chip { padding: 0 9px; font-size: 11.5px; }
  .umsg-btn { padding: 0 8px; }
  .avatar { min-width: 34px; max-width: 76px; padding: 0 10px; font-size: 11.5px; }
  .searchbar { order: 9; flex-basis: 100%; height: 42px; }
  .searchbar input { font-size: 16px; }     /* ≥16px 防 iOS 聚焦自动放大 */

  /* 顶栏弹出菜单 → 居中/贴边浮层，避免小屏溢出 */
  .region-menu { position: fixed; left: 12px; right: 12px; top: 108px; width: auto; }
  .umenu { position: fixed; right: 10px; top: 108px; }
  .apk-menu { position: fixed; right: 12px; top: 108px; }

  /* ---- 底部 Tabbar（z 低于遮罩 50：弹层打开时被盖住） ---- */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line2);
    padding: 5px 0 calc(5px + env(safe-area-inset-bottom));
  }
  .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    border: none; background: none; cursor: pointer; padding: 4px 0;
    font-size: 10.5px; font-weight: 600; color: var(--muted); font-family: inherit;
  }
  .tabbar button .ico { width: 22px; height: 22px; }
  .tabbar button.on { color: var(--accent); font-weight: 800; }
  .tabbar button:active:not(:disabled) { transform: scale(.94); }

  /* ---- 侧栏 → 折叠筛选面板 ---- */
  .side { position: static; max-height: none; overflow: visible; border-right: none;
          border-bottom: 1px solid var(--line); padding: 0 0 4px; }
  .local-card { display: none; }            /* 地区信息顶栏已有，省首屏空间 */
  .side-box summary {
    display: flex; align-items: center; gap: 7px; list-style: none; cursor: pointer;
    padding: 12px 14px; font-size: 14px; font-weight: 800; color: var(--ink);
  }
  .side-box summary::-webkit-details-marker { display: none; }
  .side-box summary::after {
    content: "▾"; margin-left: auto; color: var(--faint); font-size: 12px; transition: transform .2s ease;
  }
  .side-box[open] summary::after { transform: rotate(180deg); }
  .summary-count {
    min-width: 17px; height: 17px; line-height: 17px; text-align: center; border-radius: 9px;
    background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; padding: 0 5px;
  }
  .side-box .fgroup { margin-bottom: 14px; padding: 0 14px; }
  .side-box .fgroup:first-of-type { padding-top: 2px; }
  .chip { padding: 7px 13px; }              /* 触控目标加大 */

  /* ---- 内容区收紧 ---- */
  .content { padding: 13px 12px 18px; }
  .toolbar { margin-bottom: 12px; }
  .crumb { font-size: 16px; }
  .noticebar { margin: 10px 12px 0; padding: 9px 12px; }
  .actbar { margin: 8px 12px 0; padding: 7px 12px; }
  .pager { gap: 5px; margin-top: 18px; }
  .pg { min-width: 34px; height: 34px; }

  /* ---- 卡片双列紧凑（封面横幅同步收窄） ---- */
  .grid3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rcard { padding: 10px; border-radius: 12px; }
  .rcover { border-radius: 9px; }
  .rtags { left: 6px; top: 6px; }
  .rtitle { font-size: 13px; margin-top: 8px; min-height: 2.6em; }
  .rmeta { font-size: 10.5px; gap: 5px; margin: 6px 0 8px; }
  .rfoot { gap: 8px; }
  .rprice { font-size: 14px; }
  .btn-dl { padding: 6px 12px; }
  @media (max-width: 380px) { .grid3 { grid-template-columns: 1fr; } }

  /* ---- 列表视图列宽收紧 ---- */
  .lthead, .ltrow { padding: 10px 12px; }
  .lcol-sel { width: 22px; }
  .lcol-subj { width: 56px; }
  .lcol-pt { width: 52px; }
  .lcol-act { width: 62px; }

  /* ---- VIP 页 ---- */
  .viphero { padding: 26px 16px; }
  .viphero h2 { font-size: 20px; }
  .viphero p { font-size: 12.5px; }
  .vipbody { padding: 18px 12px 26px; }
  .vprice .num { font-size: 30px; }

  /* ---- 详情抽屉 → 全屏面板，底栏按钮重排（收藏行 + 双下载按钮行） ---- */
  .drawer { width: 100%; max-width: 100%; }
  .d-inner { padding: 16px 14px 0; }
  .d-preview, .d-comments { padding-left: 14px; padding-right: 14px; }
  .d-title { font-size: 18px; }
  .dmeta { gap: 10px; padding: 14px; }
  .dfoot {
    flex-wrap: wrap; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .dfoot .btn-fav { flex: 1 1 0; justify-content: center; padding: 10px 6px; font-size: 12.5px; }
  .dl-flag { order: 4; flex-basis: 100%; text-align: center; }
  .dfoot .btn-dlmain { flex-basis: 100%; font-size: 15px; padding: 13px 8px; }

  /* ---- 上传弹窗 → 底部抽屉 ---- */
  .umask { align-items: flex-end; }
  .umodal { width: 100%; max-width: 100%; max-height: 90vh; border-radius: 16px 16px 0 0; }
  .u-head { padding: 14px 16px; }
  .u-head b { font-size: 16px; }
  .u-body { padding: 14px 16px 20px; }
  .u-tip { font-size: 12px; }
  .dropzone { padding: 22px 12px; }
  .dz-svg { width: 36px; height: 36px; }
  .u-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .u-select, .u-input { font-size: 16px; }  /* 防 iOS 聚焦缩放 */

  /* ---- 各弹窗贴小屏 + 输入 16px ---- */
  .lmask, .pmask, .rcmask, .fbmask { padding: 14px; }
  .lcard { width: 100%; }
  .li, .cm-ta, .fbta, .fbcontact { font-size: 16px; }
  .pf-grid { grid-template-columns: 1fr; }

  /* ---- 灯箱：翻页箭头悬浮图侧，关闭键避开刘海 ---- */
  .lbmask { gap: 0; }
  .lb-stage { max-width: calc(100vw - 92px); }
  .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; }
  .lb-nav:active:not(:disabled) { transform: translateY(-50%) scale(.94); }
  .lb-nav.prev { left: 6px; }
  .lb-nav.next { right: 6px; }
  .lb-x { top: calc(12px + env(safe-area-inset-top)); right: 12px; }

  /* ---- 私信抽屉全屏 ---- */
  .msgdrawer { width: 100%; }
  .msgdrawer > .d-inner { padding-top: 16px; }
  .msg-list { padding: 0 12px 16px; }
  .msg-thread { padding: 12px 12px 16px; }
  .msg-inputbar { padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); }
  .msg-inputbar textarea { font-size: 16px; height: 42px; }

  .empty { padding: 48px 0; }
}
