/* ===== 西瓜doing · 样式 ===== */
:root[data-theme="watermelon"] { --primary:#3FA963; --primary2:#7EDB9A; --bg:#F2FBF4; --soft:#DFF4E6; --soft2:#C7ECD9; --ink:#23463A; --muted:#7FA094; --line:#E2F2EA; --ring:#D8F0E0; --ok:#2FA77C; --card:#FFFFFF; --tab-ico:#5CCB82; }
:root[data-theme="tomato"]  { --primary:#FF6B4A; --primary2:#FF9A5C; --bg:#FFF7F0; --soft:#FFE8DD; --soft2:#FFD9C9; --ink:#4A2E22; --muted:#A48B7E; --line:#F3E2D8; --ring:#FFE0D4; --ok:#2FA77C; --card:#FFFFFF; --tab-ico:#FF8A66; }
:root[data-theme="sky"]   { --primary:#4A90E2; --primary2:#8FC0F2; --bg:#F1F7FF; --soft:#E1EDFC; --soft2:#CDE2FA; --ink:#253B57; --muted:#7E97B5; --line:#DFEAF8; --ring:#D8E7FA; --ok:#2FA77C; --card:#FFFFFF; --tab-ico:#6DA8E8; }

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { height:100%; }
body {
  font-family: "PingFang SC","HarmonyOS Sans SC","Microsoft YaHei",system-ui,sans-serif;
  background: var(--bg); color: var(--ink);
  overscroll-behavior-y:none; user-select:none; -webkit-user-select:none;
}
input, textarea, select { user-select:text; -webkit-user-select:text; font-family:inherit; }
button { font-family:inherit; border:none; background:none; cursor:pointer; color:inherit; }

#app { max-width:520px; margin:0 auto; padding:0 16px 96px; }
.page { display:none; padding-top:14px; animation:fade .25s ease; }
.page.active { display:block; }
@keyframes fade { from { opacity:0; transform:translateY(6px);} to { opacity:1; transform:none;} }

/* 顶栏 */
.top { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.top-left { display:flex; align-items:center; gap:10px; }
.logo { width:42px; height:42px; border-radius:14px; background:linear-gradient(135deg,var(--primary),var(--primary2)); display:flex; align-items:center; justify-content:center; font-size:22px; box-shadow:0 6px 14px rgba(255,107,74,.30); }
.logo-mint { background:linear-gradient(135deg,#2FA77C,#6FD3AE); box-shadow:0 6px 14px rgba(47,167,124,.30); }
.logo-sky { background:linear-gradient(135deg,#4A90E2,#8FC0F2); box-shadow:0 6px 14px rgba(74,144,226,.30); }
.logo-gold { background:linear-gradient(135deg,#F2A33C,#F7C86B); box-shadow:0 6px 14px rgba(242,163,60,.30); }
.app-name { font-size:18px; font-weight:800; }
.date-line { font-size:12px; color:var(--muted); margin-top:2px; }
.top-right { display:flex; align-items:center; gap:8px; }
.icon-btn { width:38px; height:38px; border-radius:12px; background:var(--card); box-shadow:0 3px 10px rgba(74,46,34,.08); font-size:18px; display:flex; align-items:center; justify-content:center; }
.countdown-badge { background:var(--soft); color:var(--primary); font-size:12px; font-weight:700; padding:7px 12px; border-radius:999px; }

.greet { font-size:15px; font-weight:700; margin:2px 0 12px; }

/* 科目选择 */
.subject-row { display:flex; gap:8px; overflow-x:auto; padding:2px 0 12px; scrollbar-width:none; }
.subject-row::-webkit-scrollbar { display:none; }
.subject-chip { flex:0 0 auto; padding:8px 14px; border-radius:999px; background:var(--card); color:var(--muted); font-size:13px; font-weight:700; box-shadow:0 2px 8px rgba(74,46,34,.06); transition:.15s; }
.subject-chip.on { background:linear-gradient(135deg,var(--primary),var(--primary2)); color:#fff; box-shadow:0 4px 12px rgba(255,107,74,.35); }

/* 计时卡片 */
.timer-card { background:var(--card); border-radius:24px; padding:20px 18px 18px; box-shadow:0 10px 30px rgba(74,46,34,.08); text-align:center; }
.timer-status { font-size:14px; color:var(--muted); font-weight:600; }
.timer-status.running { color:var(--primary); }
.ring-wrap { position:relative; width:240px; height:240px; margin:14px auto 8px; }
.ring { width:100%; height:100%; transform:rotate(-90deg); }
.ring-bg { fill:none; stroke:var(--ring); stroke-width:14; }
.ring-fg { fill:none; stroke:url(#none); stroke:var(--primary); stroke-width:14; stroke-linecap:round; stroke-dasharray:741.6; stroke-dashoffset:0; transition:stroke-dashoffset .3s linear; }
.ring-center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.timer-num { font-size:52px; font-weight:800; letter-spacing:1px; font-variant-numeric:tabular-nums; }
.timer-sub { font-size:13px; color:var(--muted); margin-top:4px; }
.preset-row { display:flex; justify-content:center; gap:8px; margin-bottom:16px; }
.preset { padding:6px 12px; border-radius:10px; background:var(--soft); color:var(--primary); font-size:12px; font-weight:700; }
.preset.on { background:var(--primary); color:#fff; }
.timer-controls { display:flex; align-items:center; justify-content:center; gap:18px; }
.ctrl-btn { border-radius:999px; font-weight:800; }
.ctrl-btn.primary { width:160px; padding:15px 0; font-size:17px; color:#fff; background:linear-gradient(135deg,var(--primary),var(--primary2)); box-shadow:0 8px 20px rgba(255,107,74,.40); }
.ctrl-btn.primary.pause { background:linear-gradient(135deg,#F0A030,#F5B75C); box-shadow:0 8px 20px rgba(240,160,48,.40); }
.ctrl-btn.secondary { width:44px; height:44px; font-size:19px; color:var(--muted); background:var(--soft); }
.quote-line { margin-top:14px; font-size:12.5px; color:var(--muted); min-height:18px; }
.task-pick { margin-top:10px; text-align:left; }
.task-pick-title { font-size:12px; color:var(--muted); margin-bottom:6px; }
.task-pick-row { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; }
.task-pick-row::-webkit-scrollbar { display:none; }
.task-pick-chip { flex:0 0 auto; padding:6px 12px; border-radius:10px; background:var(--soft); font-size:12px; font-weight:700; color:var(--primary); }

/* 今日卡片 */
.today-card { margin-top:14px; background:var(--card); border-radius:20px; padding:16px 18px; box-shadow:0 6px 20px rgba(74,46,34,.06); }
.today-head { display:flex; justify-content:space-between; font-size:14px; font-weight:800; margin-bottom:10px; }
.today-num { color:var(--primary); }
.progress { height:10px; border-radius:999px; background:var(--soft); overflow:hidden; }
.progress-fill { height:100%; width:0%; border-radius:999px; background:linear-gradient(90deg,var(--primary),var(--primary2)); transition:width .6s ease; }
.today-foot { display:flex; justify-content:space-between; font-size:12px; color:var(--muted); margin-top:8px; }

/* 计划页 */
.plan-progress { margin-bottom:12px; font-size:13px; font-weight:700; color:var(--muted); }
.plan-list { display:flex; flex-direction:column; gap:10px; }
.plan-item { display:flex; align-items:center; gap:12px; background:var(--card); border-radius:16px; padding:14px; box-shadow:0 4px 14px rgba(74,46,34,.06); }
.plan-check { width:26px; height:26px; border-radius:50%; border:2.5px solid var(--soft2); flex:0 0 auto; display:flex; align-items:center; justify-content:center; font-size:14px; color:transparent; transition:.2s; }
.plan-item.done .plan-check { background:var(--ok); border-color:var(--ok); color:#fff; }
.plan-main { flex:1; min-width:0; }
.plan-title { font-size:14.5px; font-weight:700; }
.plan-item.done .plan-title { color:var(--muted); text-decoration:line-through; }
.plan-meta { font-size:11.5px; color:var(--muted); margin-top:4px; display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.subject-tag { padding:2px 8px; border-radius:6px; background:var(--soft); color:var(--primary); font-weight:700; }
.pomo-dots { letter-spacing:2px; }
.plan-del { width:30px; height:30px; border-radius:10px; background:var(--bg); color:var(--muted); font-size:15px; }
.plan-empty { text-align:center; color:var(--muted); padding:48px 0; font-size:14px; }
.plan-empty .big { font-size:44px; margin-bottom:10px; }

/* 题库页 */
.bank-tabs { display:flex; background:var(--card); border-radius:14px; padding:4px; margin-bottom:12px; box-shadow:0 3px 10px rgba(74,46,34,.06); }
.bank-tab { flex:1; padding:10px 0; border-radius:11px; font-size:14px; font-weight:800; color:var(--muted); }
.bank-tab.on { background:linear-gradient(135deg,var(--primary),var(--primary2)); color:#fff; box-shadow:0 4px 12px rgba(255,107,74,.30); }
.cat-row { display:flex; gap:7px; overflow-x:auto; margin-bottom:12px; scrollbar-width:none; }
.cat-row::-webkit-scrollbar { display:none; }
.cat-chip { flex:0 0 auto; padding:7px 13px; border-radius:999px; background:var(--card); color:var(--muted); font-size:12.5px; font-weight:700; box-shadow:0 2px 6px rgba(74,46,34,.05); }
.cat-chip.on { background:var(--primary); color:#fff; }
.section-label { font-size:13px; font-weight:800; color:var(--muted); margin:14px 0 8px; display:flex; align-items:center; gap:6px; }
.book-card { background:var(--card); border-radius:16px; padding:14px; margin-bottom:10px; box-shadow:0 4px 14px rgba(74,46,34,.06); }
.book-head { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.book-title { font-size:14.5px; font-weight:800; line-height:1.4; }
.book-author { font-size:12px; color:var(--muted); margin-top:3px; }
.book-stars { color:#F2A33C; font-size:13px; letter-spacing:1px; white-space:nowrap; }
.book-note { font-size:12.5px; color:#7A6459; margin-top:8px; line-height:1.6; background:var(--bg); border-radius:10px; padding:8px 10px; }
.book-foot { display:flex; justify-content:space-between; align-items:center; margin-top:10px; }
.book-status { font-size:12px; color:var(--muted); }
.book-btn { padding:7px 14px; border-radius:999px; font-size:12.5px; font-weight:800; background:var(--soft); color:var(--primary); }
.book-btn.step2 { background:var(--primary); color:#fff; }
.book-btn.step3 { background:var(--ok); color:#fff; }

/* 刷题 */
.quiz-progress-card { background:var(--card); border-radius:16px; padding:14px 16px; margin-bottom:12px; box-shadow:0 4px 14px rgba(74,46,34,.06); display:flex; justify-content:space-between; align-items:center; }
.quiz-p { font-size:13px; font-weight:800; }
.quiz-p small { color:var(--muted); font-weight:600; font-size:11px; }
.quiz-p .acc { color:var(--ok); }
.q-card { background:var(--card); border-radius:20px; padding:18px; box-shadow:0 6px 20px rgba(74,46,34,.07); }
.q-tag { display:inline-block; font-size:11px; font-weight:800; color:var(--primary); background:var(--soft); padding:4px 10px; border-radius:999px; margin-bottom:10px; }
.q-text { font-size:15px; font-weight:700; line-height:1.75; margin-bottom:14px; }
.q-opt { display:flex; gap:10px; align-items:flex-start; width:100%; text-align:left; background:var(--bg); border-radius:12px; padding:12px 14px; margin-bottom:9px; font-size:14px; line-height:1.6; transition:.15s; border:2px solid transparent; }
.q-opt .opt-key { flex:0 0 auto; width:22px; height:22px; border-radius:7px; background:var(--card); color:var(--muted); font-weight:800; font-size:12px; display:flex; align-items:center; justify-content:center; }
.q-opt.correct { background:#E7F7EF; border-color:var(--ok); }
.q-opt.correct .opt-key { background:var(--ok); color:#fff; }
.q-opt.wrong { background:#FDEBE7; border-color:#E85A4A; }
.q-opt.wrong .opt-key { background:#E85A4A; color:#fff; }
.q-opt.dim { opacity:.45; }
.q-exp { background:var(--soft); border-radius:12px; padding:12px 14px; margin-top:12px; font-size:13px; line-height:1.7; color:var(--ink); display:none; }
.q-exp.show { display:block; animation:fade .2s ease; }
.q-exp b { color:var(--primary); }
.q-actions { display:flex; gap:10px; margin-top:14px; }
.q-next { flex:1; padding:13px 0; border-radius:14px; background:linear-gradient(135deg,var(--primary),var(--primary2)); color:#fff; font-size:15px; font-weight:800; box-shadow:0 6px 16px rgba(255,107,74,.35); }
.q-quit { padding:13px 18px; border-radius:14px; background:var(--soft); color:var(--muted); font-size:14px; font-weight:700; }
.quiz-end { text-align:center; padding:30px 0; }
.quiz-end .big { font-size:52px; }
.quiz-end .t { font-size:18px; font-weight:800; margin:8px 0 4px; }
.quiz-end .s { font-size:13px; color:var(--muted); }

/* 统计页 */
.profile-card { display:flex; align-items:center; gap:14px; background:linear-gradient(135deg,var(--primary),var(--primary2)); border-radius:20px; padding:18px; color:#fff; box-shadow:0 8px 22px rgba(255,107,74,.35); margin-bottom:12px; }
.avatar { width:58px; height:58px; border-radius:50%; background:rgba(255,255,255,.28); display:flex; align-items:center; justify-content:center; font-size:30px; flex:0 0 auto; }
.nickname { font-size:18px; font-weight:800; }
.slogan { font-size:12.5px; opacity:.9; margin-top:3px; }
.stat-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:12px; }
.stat-box { background:var(--card); border-radius:16px; padding:14px 8px; text-align:center; box-shadow:0 4px 14px rgba(74,46,34,.06); }
.stat-num { font-size:20px; font-weight:800; color:var(--primary); }
.stat-label { font-size:11px; color:var(--muted); margin-top:4px; }
.card { background:var(--card); border-radius:18px; padding:16px; margin-bottom:12px; box-shadow:0 4px 14px rgba(74,46,34,.06); }
.card-title { font-size:14px; font-weight:800; margin-bottom:12px; }
.bar-chart { display:flex; align-items:flex-end; gap:8px; height:110px; }
.bar-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; justify-content:flex-end; }
.bar-val { font-size:10px; color:var(--muted); }
.bar { width:100%; max-width:26px; border-radius:6px 6px 3px 3px; background:linear-gradient(180deg,var(--primary2),var(--primary)); min-height:3px; transition:height .5s ease; }
.bar-day { font-size:10px; color:var(--muted); }
.subject-dist { display:flex; flex-direction:column; gap:9px; }
.dist-row { display:flex; align-items:center; gap:8px; font-size:12px; }
.dist-name { flex:0 0 64px; color:var(--muted); }
.dist-bar { flex:1; height:10px; border-radius:999px; background:var(--soft); overflow:hidden; }
.dist-fill { height:100%; border-radius:999px; background:linear-gradient(90deg,var(--primary),var(--primary2)); }
.dist-min { flex:0 0 44px; text-align:right; color:var(--muted); font-weight:700; }
.quiz-stats-line { display:flex; justify-content:space-between; font-size:13px; padding:6px 0; }
.quiz-stats-line b { color:var(--primary); }

/* 底部导航 */
.tabbar { position:fixed; left:0; right:0; bottom:0; max-width:520px; margin:0 auto; background:rgba(255,255,255,.94); backdrop-filter:blur(12px); display:flex; padding:6px 8px calc(10px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); z-index:50; }
.tab { flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 0; color:var(--muted); font-size:11px; font-weight:700; }
.tab .tab-ico { font-size:20px; filter:grayscale(1); opacity:.55; transition:.2s; }
.tab.active { color:var(--primary); }
.tab.active .tab-ico { filter:none; opacity:1; transform:translateY(-1px); }

/* 弹层 */
.mask { position:fixed; inset:0; background:rgba(40,26,18,.45); z-index:90; opacity:0; pointer-events:none; transition:.25s; }
.mask.show { opacity:1; pointer-events:auto; }
.sheet { position:fixed; left:0; right:0; bottom:0; max-width:520px; margin:0 auto; background:var(--card); border-radius:24px 24px 0 0; padding:12px 20px calc(24px + env(safe-area-inset-bottom)); z-index:100; transform:translateY(105%); transition:transform .3s cubic-bezier(.2,.9,.3,1); max-height:84vh; overflow-y:auto; }
.sheet.show { transform:none; }
.sheet-wide { padding-bottom:30px; }
.sheet-handle { width:44px; height:5px; border-radius:99px; background:var(--line); margin:4px auto 14px; }
.sheet-title { font-size:17px; font-weight:800; margin-bottom:14px; }
.sheet-title-sm { font-size:13px; font-weight:800; color:var(--muted); margin-bottom:10px; }
.field { margin-bottom:14px; }
.field label { display:block; font-size:12.5px; font-weight:700; color:var(--muted); margin-bottom:7px; }
.field select, .field input[type="text"] { width:100%; padding:12px 14px; border-radius:12px; border:2px solid var(--line); background:var(--bg); font-size:14.5px; color:var(--ink); outline:none; }
.field select:focus, .field input:focus { border-color:var(--primary); }
.stepper { display:flex; align-items:center; gap:16px; }
.stepper button { width:38px; height:38px; border-radius:12px; background:var(--soft); color:var(--primary); font-size:20px; font-weight:800; }
.stepper span { font-size:18px; font-weight:800; min-width:24px; text-align:center; }
.sheet-btn { width:100%; padding:15px 0; border-radius:15px; background:linear-gradient(135deg,var(--primary),var(--primary2)); color:#fff; font-size:16px; font-weight:800; box-shadow:0 8px 20px rgba(255,107,74,.35); }
.sheet-btn.ghost { background:var(--soft); color:var(--muted); box-shadow:none; margin-top:10px; }

.set-group { margin-bottom:16px; }
.set-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); }
.set-name { font-size:14px; font-weight:700; }
.set-desc { font-size:11px; color:var(--muted); margin-top:2px; }
.set-desc.warn { color:#E85A4A; }
.seg { display:flex; background:var(--bg); border-radius:11px; padding:3px; flex:0 0 auto; }
.seg button { padding:7px 11px; border-radius:9px; font-size:12.5px; font-weight:800; color:var(--muted); }
.seg button.on { background:var(--primary); color:#fff; box-shadow:0 3px 8px rgba(255,107,74,.3); }
.switch { width:46px; height:26px; border-radius:999px; background:var(--line); position:relative; transition:.2s; flex:0 0 auto; }
.switch i { position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; transition:.2s; box-shadow:0 2px 5px rgba(0,0,0,.15); }
.switch.on { background:var(--primary); }
.switch.on i { left:23px; }
.mini-btn { padding:8px 16px; border-radius:999px; background:var(--soft); color:var(--primary); font-size:12.5px; font-weight:800; flex:0 0 auto; }
.mini-btn.danger { background:#FDEBE7; color:#E85A4A; }
.about-line { text-align:center; font-size:12px; color:var(--muted); padding:10px 0 4px; }

/* 完成/休息弹层 */
.overlay { position:fixed; inset:0; background:rgba(40,26,18,.5); z-index:120; display:flex; align-items:center; justify-content:center; padding:24px; }
.overlay-card { background:var(--card); border-radius:24px; padding:30px 24px; max-width:340px; width:100%; text-align:center; animation:pop .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { transform:scale(.8); opacity:0;} to { transform:none; opacity:1;} }
.big-emoji { font-size:54px; }
.overlay-title { font-size:19px; font-weight:800; margin-top:10px; }
.overlay-sub { font-size:13px; color:var(--muted); margin:8px 0 18px; }
.break-num { font-size:44px; font-weight:800; color:var(--primary); margin-top:8px; font-variant-numeric:tabular-nums; }

#confetti { position:fixed; inset:0; pointer-events:none; z-index:130; }/* ===== 下载页与下载横幅 ===== */
.dl-banner { display:flex; align-items:center; gap:10px; background:linear-gradient(135deg,var(--primary),var(--primary2)); border-radius:16px; padding:12px 14px; color:#fff; margin-bottom:14px; box-shadow:0 6px 16px rgba(63,169,99,.35); animation:fade .3s ease; }
.dl-banner.hide { display:none; }
.dl-banner-ico { font-size:26px; }
.dl-banner-txt { flex:1; min-width:0; }
.dl-banner-t { font-size:14px; font-weight:800; }
.dl-banner-s { font-size:11px; opacity:.9; margin-top:2px; }
.dl-banner-btn { padding:8px 16px; border-radius:999px; background:#fff; color:var(--primary); font-size:13px; font-weight:800; flex:0 0 auto; }
.dl-banner-close { width:26px; height:26px; border-radius:50%; background:rgba(255,255,255,.25); color:#fff; font-size:12px; flex:0 0 auto; }
.dl-card { background:var(--card); border-radius:24px; padding:28px 22px 22px; box-shadow:0 10px 30px rgba(35,70,58,.08); text-align:center; }
.dl-logo { width:84px; height:84px; border-radius:22px; margin:0 auto 14px; display:flex; align-items:center; justify-content:center; font-size:44px; background:linear-gradient(135deg,var(--primary),var(--primary2)); box-shadow:0 8px 20px rgba(63,169,99,.35); }
.dl-name { font-size:24px; font-weight:800; }
.dl-sub { font-size:13px; color:var(--muted); margin:4px 0 18px; }
.dl-apk-btn { display:block; width:100%; padding:16px 0; border-radius:16px; background:linear-gradient(135deg,var(--primary),#2E8B56); color:#fff; font-size:17px; font-weight:800; box-shadow:0 10px 24px rgba(63,169,99,.35); }
.dl-apk-btn.loading { opacity:.7; pointer-events:none; }
.dl-meta { font-size:12px; color:var(--muted); margin:10px 0 18px; }
.dl-steps { text-align:left; background:var(--bg); border-radius:16px; padding:14px 16px; margin-bottom:14px; }
.dl-steps-t { font-size:13px; font-weight:800; color:var(--ink); margin-bottom:8px; }
.dl-steps ul { counter-reset:s; }
.dl-steps li { font-size:13px; color:#4E6E63; line-height:1.9; list-style:none; padding-left:24px; position:relative; }
.dl-steps li::before { content:counter(s); counter-increment:s; position:absolute; left:0; top:3px; width:18px; height:18px; border-radius:50%; background:var(--primary); color:#fff; font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.dl-platform { font-size:13px; color:var(--muted); background:var(--bg); border-radius:12px; padding:12px 14px; line-height:1.8; margin-bottom:14px; text-align:left; }
.dl-warn { font-size:12px; color:#B08968; line-height:1.7; margin-top:10px; }
.dl-web-btn { display:block; width:100%; margin-top:14px; padding:13px 0; border-radius:14px; background:var(--soft); color:var(--primary); font-size:14px; font-weight:800; }
/* ===== 西瓜doing v1.1 · 阅读器 / 错题本 / 美化 ===== */

/* 书卡新布局 */
.book-card { display:flex; gap:12px; border-radius:18px; padding:14px; }
.book-card.tip-card { display:block; }
.book-cover { flex:0 0 auto; width:64px; height:84px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:30px; box-shadow:0 4px 12px rgba(74,46,34,.12); }
.book-main { flex:1; min-width:0; }
.book-main .book-note { font-size:12px; color:var(--muted); margin-top:7px; line-height:1.55; background:var(--bg); border-radius:10px; padding:8px 10px; }
.book-progress { display:flex; align-items:center; gap:8px; margin-top:8px; }
.bp-bar { flex:1; height:6px; border-radius:999px; background:var(--soft); overflow:hidden; }
.bp-bar i { display:block; height:100%; background:linear-gradient(90deg,var(--primary),var(--primary2)); border-radius:999px; transition:width .4s ease; }
.book-progress span { font-size:11px; color:var(--muted); font-weight:700; flex:0 0 auto; }
.book-acts { display:flex; gap:8px; }
.book-btn.read { background:linear-gradient(135deg,var(--primary),var(--primary2)); color:#fff; box-shadow:0 4px 10px rgba(63,169,99,.3); }
.book-btn.read.step3 { background:var(--ok); }
.book-btn.state { background:var(--soft); color:var(--primary); }
.book-btn.state.step2 { background:var(--soft2); }
.book-btn.state.step3 { background:var(--ok); color:#fff; }
.book-status.reading { color:var(--primary); font-weight:700; }
.book-status.done { color:var(--ok); font-weight:700; }

/* 书籍阅读器 */
.reader-overlay { z-index:140; padding:0; align-items:stretch; }
.reader { width:100%; max-width:520px; margin:0 auto; background:var(--bg); display:flex; flex-direction:column; height:100%; animation:slideUp .28s ease; }
@keyframes slideUp { from { transform:translateY(30px); opacity:0; } to { transform:none; opacity:1; } }
.reader-head { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:var(--card); box-shadow:0 2px 10px rgba(35,70,58,.06); position:sticky; top:0; z-index:5; }
.reader-back { width:36px; height:36px; border-radius:12px; background:var(--soft); font-size:18px; color:var(--primary); font-weight:800; }
.reader-head-t { font-size:15px; font-weight:800; }
.reader-head-r { width:36px; }
.reader-body { padding:20px 18px 40px; overflow-y:auto; flex:1; }
.br-cover-box { width:86px; height:112px; border-radius:14px; margin:0 auto 14px; display:flex; align-items:center; justify-content:center; font-size:42px; box-shadow:0 8px 20px rgba(74,46,34,.15); }
.br-title { text-align:center; font-size:19px; font-weight:800; }
.br-meta { text-align:center; font-size:12px; color:var(--muted); margin-top:5px; }
.br-progress-box { display:flex; align-items:center; gap:10px; margin:14px auto 6px; max-width:280px; }
.br-progress { flex:1; height:8px; border-radius:999px; background:var(--soft); overflow:hidden; }
.br-progress i { display:block; height:100%; background:linear-gradient(90deg,var(--primary),var(--primary2)); border-radius:999px; transition:width .4s ease; }
.br-pct { font-size:12px; font-weight:800; color:var(--primary); }
.br-section { background:var(--card); border-radius:16px; padding:14px 16px; margin-top:12px; box-shadow:0 4px 14px rgba(74,46,34,.05); }
.br-sec-title { font-size:13.5px; font-weight:800; margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; }
.br-sec-title small { font-size:11px; color:var(--muted); font-weight:600; }
.br-guide { font-size:13px; line-height:1.8; color:var(--ink); }
.br-tags { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.br-tags span { font-size:11px; font-weight:700; color:var(--primary); background:var(--soft); padding:5px 10px; border-radius:999px; }
.br-chapter { background:var(--bg); border-radius:14px; margin-bottom:10px; overflow:hidden; box-shadow:0 2px 8px rgba(74,46,34,.04); transition:.15s; }
.br-chapter.done { background:#EAF8F0; }
.br-ch-head { display:flex; align-items:center; gap:10px; padding:12px 12px; cursor:pointer; user-select:none; }
.br-ch-head:active { background:var(--soft); }
.br-chk { flex:0 0 auto; width:22px; height:22px; border-radius:50%; border:2px solid var(--soft2); display:flex; align-items:center; justify-content:center; font-size:12px; color:transparent; font-weight:800; transition:.15s; }
.br-chapter.done .br-chk { background:var(--ok); border-color:var(--ok); color:#fff; }
.br-ch-txt { flex:1; font-size:13px; font-weight:700; line-height:1.5; }
.br-chapter.done .br-ch-txt { color:var(--muted); }
.br-ch-meta { flex:0 0 auto; font-size:10.5px; font-weight:800; color:var(--primary); background:var(--soft); padding:3px 8px; border-radius:999px; }
.br-chapter.done .br-ch-meta { color:var(--ok); }
.br-ch-arrow { flex:0 0 auto; font-size:12px; color:var(--muted); transition:transform .22s ease; }
.br-chapter.open .br-ch-arrow { transform:rotate(180deg); }
.br-ch-body { display:none; padding:4px 14px 6px; border-top:1px dashed var(--line); }
.br-chapter.open .br-ch-body { display:block; animation:brFade .2s ease; }
@keyframes brFade { from { opacity:0; transform:translateY(-4px);} to { opacity:1; transform:none;} }
.br-sec-item { margin-top:12px; }
.br-sec-item:first-child { margin-top:10px; }
.br-sec-t { font-size:13px; font-weight:800; color:var(--primary); margin-bottom:6px; display:flex; align-items:center; gap:6px; }
.br-sec-t::before { content:''; width:4px; height:13px; border-radius:2px; background:var(--primary2); }
.br-sec-p { font-size:13px; line-height:1.9; color:var(--ink); }
.br-sec-p p { margin:0 0 8px; }
.br-sec-p p:last-child { margin-bottom:0; }
.br-ch-done { display:block; margin:12px 14px 14px; width:calc(100% - 28px); padding:9px; border:none; border-radius:10px; background:var(--soft); color:var(--primary); font-size:12px; font-weight:800; cursor:pointer; transition:.15s; }
.br-ch-done:active { transform:scale(.97); }
.br-chapter.done .br-ch-done { background:transparent; color:var(--ok); box-shadow:inset 0 0 0 1.5px rgba(56,168,110,.35); }
.br-point { display:flex; gap:10px; align-items:flex-start; padding:8px 0; border-bottom:1px dashed var(--line); }
.br-point:last-child { border-bottom:none; }
.br-pt-idx { flex:0 0 auto; width:20px; height:20px; border-radius:7px; background:var(--soft); color:var(--primary); font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; margin-top:1px; }
.br-point span:last-child { font-size:12.5px; line-height:1.65; color:var(--ink); }
.br-use { font-size:12.5px; line-height:1.75; color:var(--muted); }
.br-empty { text-align:center; color:var(--muted); font-size:12.5px; padding:12px 0; }

/* 题库页卡片 */
.q-meta { display:flex; align-items:center; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.q-point { font-size:11.5px; color:var(--muted); font-weight:700; background:var(--bg); padding:4px 9px; border-radius:999px; }
.q-feats { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.q-feats span { font-size:11px; color:var(--primary); background:var(--soft); padding:4px 9px; border-radius:999px; font-weight:700; }
.opt-ok { margin-left:auto; color:var(--ok); font-weight:800; font-size:16px; }
.q-exp-title { font-size:12.5px; font-weight:800; color:var(--primary); margin-bottom:8px; }
.exp-sec { padding:9px 0; border-bottom:1px dashed var(--line); }
.exp-sec:last-child { border-bottom:none; }
.exp-tag { display:inline-block; font-size:11px; font-weight:800; margin-bottom:4px; }
.exp-考点 .exp-tag { color:#9B6BD6; }
.exp-解析 .exp-tag { color:var(--primary); }
.exp-技巧 .exp-tag { color:#F2A33C; }
.exp-sec div { font-size:12.5px; line-height:1.7; color:var(--ink); }

/* 难度徽章 */
.wq-diff { display:inline-flex; align-items:center; gap:3px; font-size:11px; font-weight:800; padding:4px 9px; border-radius:999px; white-space:nowrap; }
.wq-diff.d1 { background:#EAF8F0; color:#2FA77C; }
.wq-diff.d2 { background:#FFF3D6; color:#D98E04; }
.wq-diff.d3 { background:#FDE8E8; color:#E85A4A; }

/* 错题本 */
.wrong-head { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:12px; }
.wrong-stat { background:var(--card); border-radius:16px; padding:14px 8px; text-align:center; box-shadow:0 4px 14px rgba(74,46,34,.06); }
.wrong-stat b { display:block; font-size:22px; font-weight:800; color:var(--primary); }
.wrong-stat span { font-size:11px; color:var(--muted); }
.wrong-practice { width:100%; padding:14px 0; border-radius:14px; background:linear-gradient(135deg,var(--primary),var(--primary2)); color:#fff; font-size:15px; font-weight:800; box-shadow:0 6px 16px rgba(63,169,99,.32); margin-bottom:6px; }
.wq-card { background:var(--card); border-radius:18px; padding:16px; margin-bottom:12px; box-shadow:0 4px 14px rgba(74,46,34,.06); }
.wq-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.wq-head .q-tag { margin-bottom:0; }
.wq-q { font-size:14px; font-weight:700; line-height:1.7; margin-bottom:10px; }
.wq-ans { background:var(--bg); border-radius:12px; padding:10px 12px; margin-bottom:10px; }
.wq-line { display:flex; gap:8px; align-items:flex-start; font-size:12.5px; line-height:1.55; padding:3px 0; }
.wq-key { flex:0 0 auto; font-size:11px; font-weight:800; padding:2px 8px; border-radius:6px; }
.wq-line.wrong .wq-key { background:#FDEBE7; color:#E85A4A; }
.wq-line.right .wq-key { background:#E7F7EF; color:var(--ok); }
.wq-line.wrong span:last-child { color:#B4493C; }
.wq-line.right span:last-child { color:#2FA77C; }
.wq-point { font-size:12px; font-weight:700; color:#9B6BD6; margin-bottom:8px; }
.wq-exp { background:var(--soft); border-radius:12px; padding:6px 12px; margin-bottom:10px; }
.wq-acts { display:flex; gap:10px; }
.wq-btn { flex:1; padding:11px 0; border-radius:12px; font-size:13.5px; font-weight:800; }
.wq-btn.redo { background:linear-gradient(135deg,var(--primary),var(--primary2)); color:#fff; }
.wq-btn.master { background:var(--soft); color:var(--muted); }
.wrong-empty { text-align:center; padding:46px 0 30px; }
.wrong-empty .big { font-size:52px; }
.wrong-empty .t { font-size:17px; font-weight:800; margin:8px 0 4px; }
.wrong-empty .s { font-size:12.5px; color:var(--muted); line-height:1.7; }

/* 三个标签页自适应 */
.bank-tabs { border-radius:14px; }
.bank-tab { font-size:13px; padding:10px 0; }

/* 书单分类chip带数量 */
.cat-chip { transition:.15s; }
.cat-chip:active { transform:scale(.95); }

/* 阅读器显隐修复 */
.reader-overlay.show { display:flex !important; }