* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warn: #d97706;
  --text: #1f2937;
  --text2: #6b7280;
  --line: #e5e7eb;
  --bg: #f3f6fb;
  --card: #ffffff;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  padding-bottom: 70px;
}
a { color: var(--primary); text-decoration: none; }
.wrap { max-width: 780px; margin: 0 auto; padding: 16px 14px; }
.card { background: var(--card); border-radius: 14px; padding: 18px; margin-bottom: 14px; box-shadow: 0 2px 12px rgba(15,23,42,.05); }
.card.tight { padding: 14px; }
h1 { font-size: 21px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.muted { color: var(--text2); font-size: 13px; }
.small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* 顶部导航 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 780px; margin: 0 auto; padding: 11px 14px; display: flex; align-items: center; gap: 12px; }
.brand { font-weight: 800; font-size: 17px; color: var(--primary); white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
.nav a { padding: 5px 10px; border-radius: 8px; color: var(--text2); font-size: 13px; white-space: nowrap; }
.nav a.active, .nav a:hover { background: #eff6ff; color: var(--primary); }
.userchip { font-size: 13px; color: var(--text2); white-space: nowrap; }

/* 底部导航 */
.bottombar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottombar a { flex: 1; text-align: center; font-size: 11px; color: #94a3b8; padding: 5px 0 2px; display:flex; flex-direction:column; align-items:center; gap:3px; transition:color .15s; }
.bottombar a.active { color: var(--primary); font-weight: 700; }
.bottombar a:active { opacity:.65; }
.bottombar .ico { display: block; width: 24px; height: 24px; stroke: currentColor; }
.bottombar .ico path, .bottombar .ico circle { vector-effect: non-scaling-stroke; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; padding: 10px 18px;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; text-align: center; line-height: 1.4;
}
.btn:hover { background: var(--primary-dark); }
.btn.block { display: flex; width: 100%; }
.btn.lg { padding: 13px 20px; font-size: 16px; }
.btn.sm { padding: 10px 12px; font-size: 12px; min-height: 40px; }
.btn.ghost { background: #eff6ff; color: var(--primary); }
.btn.ghost:hover { background: #dbeafe; }
.btn.gray { background: #f3f4f6; color: var(--text); }
.btn.green { background: var(--success); }
.btn.red { background: var(--danger); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* 表单 */
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; font-size: 15px; background: #fff; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea { min-height: 100px; resize: vertical; }

/* 试卷卡片 */
.paper { display: block; color: inherit; }
.paper .tag { display: inline-block; background: #eff6ff; color: var(--primary); padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.paper h2 { margin: 8px 0 4px; font-size: 16px; }
.paper .meta { color: var(--text2); font-size: 12px; }
.paper-foot { margin-top:12px; gap:10px; }
.paper-src { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.paper-foot .btn { flex:0 0 auto; white-space:nowrap; min-width:84px; }
.paper-foot .row .btn { min-width:84px; }

/* 统计块 */
.stats { display: flex; gap: 10px; }
.stat { flex: 1; background: #fff; border-radius: 12px; padding: 14px 10px; text-align: center; }
.stat .num { font-size: 22px; font-weight: 800; color: var(--primary); }
.stat .lbl { font-size: 11px; color: var(--text2); margin-top: 2px; }

/* 答题 */
.q-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.q-num { font-size: 13px; color: var(--text2); }
.q-stem { font-size: 16px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; margin-bottom: 14px; }
.q-source { font-size: 11px; color: #9ca3af; margin-top: 8px; }
.q-image { margin: 10px 0; width: 100%; overflow: hidden; }
.q-image img { display: block; max-width: 100% !important; width: auto; height: auto; max-height: 70vh; object-fit: contain; margin: 6px auto; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.q-stem img { max-width: 100% !important; height: auto; }
/* 题干里的图片防止被 pre-wrap 影响产生横向溢出 */
.q-stem { overflow-x: hidden; }
.opts { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 11px; cursor: pointer; background: #fff;
  transition: all .15s;
}
.opt:hover { border-color: #93c5fd; background: #f8fbff; }
.opt.selected { border-color: var(--primary); background: #eff6ff; }
.opt.right { border-color: var(--success); background: #f0fdf4; }
.opt.right .key { background: var(--success); color: #fff; }
.opt.wrongpick { border-color: var(--danger); background: #fef2f2; }
.opt.wrongpick .key { background: var(--danger); color: #fff; }
.opt.locked { cursor: default; }
.q-result { margin-top: 14px; }
.q-result.ok { border-left: 4px solid var(--success); background: #f0fdf4; border-radius: 0 10px 10px 0; padding: 12px 14px; }
.q-result.no { border-left: 4px solid var(--danger); background: #fef2f2; border-radius: 0 10px 10px 0; padding: 12px 14px; }
.q-result .verdict { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.q-result.ok .verdict { color: #15803d; }
.q-result.no .verdict { color: #b91c1c; }
.opt .key { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.opt.selected .key { background: var(--primary); color: #fff; }
.opt .val { flex: 1; white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.progress { height: 6px; background: #e5e7eb; border-radius: 10px; overflow: hidden; margin: 10px 0 16px; }
.progress > i { display: block; height: 100%; background: var(--primary); transition: width .2s; }
.exam-timer { background:#fef3c7; color:#92400e; font-weight:700; font-size:13px; padding:4px 10px; border-radius:8px; font-variant-numeric:tabular-nums; }

/* 结果 */
.score-box { text-align: center; padding: 22px 10px; }
.score-num { font-size: 52px; font-weight: 800; line-height: 1.1; color: var(--primary); }
.score-num.pass { color: var(--success); }
.score-num.fail { color: var(--danger); }
.score-lbl { font-size: 13px; color: var(--text2); margin-top: 4px; }
.result-item { border-top: 1px solid var(--line); padding: 14px 0; }
.result-item:first-child { border-top: 0; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.badge.ok { background: #dcfce7; color: #15803d; }
.badge.no { background: #fee2e2; color: #b91c1c; }
.badge.wait { background: #fef3c7; color: #b45309; }
.answer-box { background: #f8fafc; border-left: 3px solid var(--primary); padding: 10px 12px; border-radius: 0 8px 8px 0; font-size: 14px; white-space: pre-wrap; word-break: break-word; margin-top: 8px; }
.answer-box.wrong { border-left-color: var(--danger); }
.analysis { background: #fffbeb; padding: 10px 12px; border-radius: 8px; font-size: 13px; white-space: pre-wrap; word-break: break-word; margin-top: 8px; color: #78350f; }

/* 错题/复习 */
.wrong-item { border-left: 3px solid var(--danger); }
.wrong-item.graduated { border-left-color: var(--success); opacity: .7; }
.stage-dots { display: flex; gap: 4px; margin-top: 8px; }
.stage-dots i { width: 12px; height: 5px; border-radius: 3px; background: #e5e7eb; }
.stage-dots i.on { background: var(--success); }
.due { color: var(--danger); font-weight: 700; }
.empty { text-align: center; padding: 40px 16px; color: var(--text2); }
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 780px; border-radius: 18px 18px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 85vh; overflow-y: auto; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 16px 0; font-size: 13px; color: var(--text2); }
.pagination a { padding: 5px 12px; background: #fff; border-radius: 8px; }
.pagination span { color: var(--text2); }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--text2); font-weight: 600; background: #f9fafb; }

.alert { padding: 11px 13px; border-radius: 9px; font-size: 13px; margin-bottom: 12px; }
.alert.err { background: #fef2f2; color: #b91c1c; }
.alert.ok { background: #f0fdf4; color: #15803d; }
.alert.info { background: #eff6ff; color: #1e40af; }

/* ============ 卡片化改版 ============ */
:root {
  --blue: #2563eb; --blue2: #4f46e5;
  --grad: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  --shadow: 0 6px 20px rgba(37,99,235,.10);
}

/* 顶部栏：品牌 + 用户区 */
.topbar-inner { padding: 12px 14px; }
.brand { display:inline-flex; align-items:center; gap:8px; font-size:16px; overflow:hidden; text-overflow:ellipsis; max-width:62%; }
.brand-dot { width:9px; height:9px; border-radius:3px; background:var(--grad); flex:0 0 auto; box-shadow:0 2px 6px rgba(37,99,235,.4); }
.top-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.icon-btn { width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:10px; background:#eff6ff; color:var(--primary); font-size:17px; flex:0 0 auto; }
.userchip { display:inline-flex; align-items:center; gap:6px; color:var(--text); font-size:13px; }
.userchip .avatar { width:30px; height:30px; border-radius:50%; background:var(--grad); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; flex:0 0 auto; }
.userchip .uname { max-width:76px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Hero 横幅 */
.hero { background:var(--grad); color:#fff; border-radius:18px; padding:22px 20px; margin-bottom:18px; box-shadow:0 10px 28px rgba(37,99,235,.28); position:relative; overflow:hidden; }
.hero::after { content:""; position:absolute; right:-30px; top:-40px; width:150px; height:150px; border-radius:50%; background:rgba(255,255,255,.10); }
.hero-label { font-size:11px; opacity:.8; letter-spacing:.5px; margin-bottom:4px; }
.hero h1 { font-size:22px; font-weight:800; position:relative; }
.hero p { font-size:12px; opacity:.9; margin-top:8px; line-height:1.6; position:relative; }

/* 区块标题 */
.section { margin-bottom:20px; }
.section-title { font-size:15px; font-weight:800; margin:0 0 12px; display:flex; align-items:center; }
.section-title::before { content:""; width:4px; height:15px; border-radius:3px; background:var(--grad); margin-right:8px; }
.section-head { display:flex; align-items:center; justify-content:space-between; }
.section-more { font-size:12px; color:var(--primary); font-weight:600; }

/* 学习数据卡片 */
.stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.stat-card { background:#fff; border-radius:14px; padding:14px 6px; text-align:center; box-shadow:var(--shadow); color:var(--text); display:block; transition:transform .15s; }
.stat-card:active { transform:scale(.96); }
.stat-ico { width:32px; height:32px; border-radius:10px; display:flex; align-items:center; justify-content:center; margin:0 auto 8px; font-size:16px; font-weight:700; }
.s-blue{background:#eff6ff;color:#2563eb}.s-red{background:#fef2f2;color:#dc2626}.s-green{background:#f0fdf4;color:#16a34a}.s-orange{background:#fff7ed;color:#ea580c}.s-purple{background:#f5f3ff;color:#7c3aed}
.stat-num { font-size:21px; font-weight:800; line-height:1.1; color:var(--text); }
.stat-num.red{color:var(--danger)}.stat-num.green{color:var(--success)}.stat-num.orange{color:#ea580c}
.stat-lbl { font-size:10px; color:var(--text2); margin-top:4px; }
@media (max-width:360px){ .stat-grid{grid-template-columns:repeat(2,1fr)} }

/* 复习 CTA */
.cta-banner { display:flex; align-items:center; gap:12px; background:linear-gradient(135deg,#fff7ed,#ffedd5); border:1px solid #fed7aa; border-radius:14px; padding:14px 16px; margin:16px 0 0; color:#9a3412; }
.dash-grid + .dash-grid { margin-top:10px; }
.cta-ico { font-size:24px; flex:0 0 auto; }
.cta-text { font-size:15px; font-weight:700; flex:1; }
.cta-text em { display:block; font-size:11px; font-style:normal; font-weight:400; opacity:.8; margin-top:2px; }
.cta-arrow { font-size:20px; }

/* 快捷入口卡片 */
.quick-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.quick-card { background:#fff; border-radius:14px; padding:16px 6px 12px; text-align:center; box-shadow:var(--shadow); color:var(--text); display:flex; flex-direction:column; align-items:center; gap:8px; transition:transform .15s; }
.quick-card:active { transform:scale(.96); }
.quick-ico { width:42px; height:42px; border-radius:13px; display:flex; align-items:center; justify-content:center; font-size:19px; font-weight:700; color:#fff; }
.q-blue{background:linear-gradient(135deg,#3b82f6,#2563eb)}.q-orange{background:linear-gradient(135deg,#fb923c,#ea580c)}.q-red{background:linear-gradient(135deg,#f87171,#dc2626)}.q-purple{background:linear-gradient(135deg,#a78bfa,#7c3aed)}.q-dark{background:linear-gradient(135deg,#475569,#1e293b)}
.quick-name { font-size:11px; font-weight:600; }
@media (max-width:360px){ .quick-grid{grid-template-columns:repeat(3,1fr)} }

/* 额度条 */
.credit-strip { display:flex; align-items:center; justify-content:space-between; gap:12px; background:var(--grad); color:#fff; border-radius:14px; padding:14px 16px; margin-bottom:20px; box-shadow:var(--shadow); }
.credit-strip-label { font-size:11px; opacity:.85; }
.credit-strip-value { font-size:17px; font-weight:700; margin-top:2px; }
.credit-strip .btn.ghost { background:rgba(255,255,255,.2); color:#fff; }

.welcome-card { margin-bottom:0; }
.tips-card { background:#f8fafc; }

/* 支付方式选择卡 */
.pay-methods { display:grid; gap:10px; }
.pay-method { display:flex; align-items:center; gap:12px; border:2px solid var(--line); border-radius:13px; padding:14px; cursor:pointer; background:#fff; transition:all .15s; }
.pay-method.on { border-color:var(--primary); background:#eff6ff; }
.pay-method .pm-logo { width:40px; height:40px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:20px; font-weight:800; color:#fff; flex:0 0 auto; }
.pm-wx{background:#07c160}.pm-ali{background:#1677ff}.pm-manual{background:#6b7280}
.pay-method .pm-name { font-size:14px; font-weight:700; }
.pay-method .pm-desc { font-size:11px; color:var(--text2); }
.pay-method .pm-check { margin-left:auto; width:20px; height:20px; border-radius:50%; border:2px solid var(--line); flex:0 0 auto; }
.pay-method.on .pm-check { border-color:var(--primary); background:var(--primary); box-shadow:inset 0 0 0 4px #fff; }

/* 二维码弹层 */
.qr-box { text-align:center; padding:10px; }
.qr-box #qrcode { display:inline-block; padding:12px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.qr-box .qr-tip { font-size:12px; color:var(--text2); margin-top:12px; line-height:1.7; }

/* 套餐卡片 */
.plan-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.plan-card { background:#fff; border:2px solid var(--line); border-radius:14px; padding:16px 14px; cursor:pointer; transition:all .15s; position:relative; }
.plan-card.on { border-color:var(--primary); background:#f5f9ff; box-shadow:var(--shadow); }
.plan-card.on::after { content:"✓"; position:absolute; top:8px; right:10px; width:18px; height:18px; border-radius:50%; background:var(--primary); color:#fff; font-size:11px; display:flex; align-items:center; justify-content:center; }
.plan-name { font-size:14px; font-weight:700; }
.plan-price { font-size:26px; font-weight:800; color:var(--primary); margin:6px 0 4px; }
.plan-price small { font-size:14px; }
.plan-desc { font-size:11px; color:var(--text2); line-height:1.6; }

/* 开关 */
.switch { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text2); cursor:pointer; }
.switch input { width:auto; accent-color:var(--primary); }

/* 状态标签 */
.status-pill { display:inline-block; padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; }
.st-ok{background:#dcfce7;color:#15803d}.st-wait{background:#fef3c7;color:#92400e}.st-no{background:#fee2e2;color:#b91c1c}

@media (min-width: 700px) {
  .wrap { padding: 22px 16px; }
  .card { padding: 22px; }
  .stat-grid, .quick-grid { gap:14px; }
}

/* ============ 首页精致化 v2 ============ */
/* Hero：加柔光与能力标签 */
.hero { padding:24px 20px 22px; border-radius:20px; }
.hero-glow { position:absolute; right:-50px; top:-70px; width:190px; height:190px; border-radius:50%; background:radial-gradient(circle,rgba(255,255,255,.28),transparent 68%); pointer-events:none; }
.hero h1 { font-size:23px; }
.hero-wave { font-size:19px; display:inline-block; }
.hero-tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:15px; position:relative; }
.hero-tags span { background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.22); border-radius:20px; padding:4px 11px; font-size:11px; font-weight:600; color:#fff; }

/* 管理员入口做成小胶囊，不再占一个格子 */
.admin-entry { font-size:11px; font-weight:600; color:var(--text2); background:#f1f5f9; padding:5px 11px; border-radius:20px; white-space:nowrap; }
.admin-entry:hover { background:#e2e8f0; color:var(--primary); }

/* 快捷入口：4 格整齐 + 副标题 */
.entry-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.entry-card { background:#fff; border-radius:16px; padding:15px 5px 13px; display:flex; flex-direction:column; align-items:center; text-align:center; box-shadow:0 4px 16px rgba(15,23,42,.06); border:1px solid rgba(15,23,42,.03); color:var(--text); transition:transform .18s, box-shadow .18s; }
.entry-card:hover { transform:translateY(-3px); box-shadow:0 10px 24px rgba(37,99,235,.14); }
.entry-card:active { transform:scale(.96); }
.entry-ico { width:44px; height:44px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:20px; font-weight:700; color:#fff; margin-bottom:10px; }
.ec-blue{background:linear-gradient(135deg,#60a5fa,#2563eb);box-shadow:0 5px 12px rgba(37,99,235,.26)}
.ec-orange{background:linear-gradient(135deg,#fbbf24,#ea580c);box-shadow:0 5px 12px rgba(234,88,12,.24)}
.ec-red{background:linear-gradient(135deg,#fb7185,#dc2626);box-shadow:0 5px 12px rgba(220,38,38,.24)}
.ec-purple{background:linear-gradient(135deg,#c084fc,#7c3aed);box-shadow:0 5px 12px rgba(124,58,237,.24)}
.entry-name { font-size:12px; font-weight:700; }
.entry-desc { font-size:10px; color:var(--text2); margin-top:3px; line-height:1.4; }

/* 学习数据卡：顶部图标 + 大数字 + 底部彩条 */
.study-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.study-card { position:relative; background:#fff; border-radius:16px; padding:14px 4px 13px; text-align:center; box-shadow:0 4px 16px rgba(15,23,42,.06); border:1px solid rgba(15,23,42,.03); overflow:hidden; color:var(--text); display:flex; flex-direction:column; align-items:center; transition:transform .18s; }
.study-card:hover { transform:translateY(-3px); }
.study-card:active { transform:scale(.96); }
.study-ico { width:32px; height:32px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:700; margin-bottom:9px; }
.si-blue{background:#eff6ff;color:#2563eb}.si-red{background:#fef2f2;color:#dc2626}.si-green{background:#f0fdf4;color:#16a34a}.si-orange{background:#fff7ed;color:#ea580c}
.study-num { font-size:24px; font-weight:800; line-height:1; color:var(--text); }
.study-num.red{color:var(--danger)}.study-num.green{color:var(--success)}.study-num.orange{color:#ea580c}
.study-lbl { font-size:10px; color:var(--text2); margin-top:6px; }
.study-bar { position:absolute; bottom:0; left:22%; right:22%; height:3px; border-radius:3px 3px 0 0; }
.b-blue{background:#60a5fa}.b-red{background:#f87171}.b-green{background:#4ade80}.b-orange{background:#fbbf24}

/* 今日复习：独立大卡，与额度卡拉开间距 */
.review-section { margin-bottom:16px; }
.review-card { display:flex; align-items:center; gap:14px; background:linear-gradient(135deg,#fffbeb,#ffedd5); border:1px solid #fde3b8; border-radius:18px; padding:17px 16px; box-shadow:0 6px 18px rgba(217,119,6,.10); transition:transform .18s; }
.review-card:hover { transform:translateY(-2px); }
.review-art { font-size:34px; line-height:1; flex:0 0 auto; }
.review-info { flex:1; min-width:0; }
.review-title { display:block; font-size:16px; font-weight:800; color:#9a3412; }
.review-desc { display:block; font-size:11px; color:#b45309; margin-top:3px; line-height:1.5; }
.review-desc b { font-weight:800; color:#c2410c; }
.review-go { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; background:#ea580c; color:#fff; font-size:12px; font-weight:700; padding:10px 15px; border-radius:11px; white-space:nowrap; box-shadow:0 4px 10px rgba(234,88,12,.25); }

/* 额度：独立卡片 */
.credit-section { margin-bottom:20px; }
.credit-card { display:flex; align-items:center; gap:12px; background:linear-gradient(135deg,#4f46e5,#2563eb); color:#fff; border-radius:18px; padding:16px; box-shadow:0 8px 22px rgba(37,99,235,.25); }
.credit-ico { font-size:26px; line-height:1; flex:0 0 auto; }
.credit-info { flex:1; min-width:0; }
.credit-label { display:block; font-size:11px; opacity:.85; }
.credit-value { display:block; font-size:18px; font-weight:800; margin-top:2px; }
.credit-btn { flex:0 0 auto; background:rgba(255,255,255,.2); color:#fff; font-size:12px; font-weight:700; padding:10px 13px; border-radius:11px; white-space:nowrap; border:1px solid rgba(255,255,255,.28); }
.credit-btn:hover { background:rgba(255,255,255,.3); }
.credit-signin { flex:0 0 auto; background:rgba(255,255,255,.16); color:#fff; font-size:12px; font-weight:600; padding:10px 13px; border-radius:11px; white-space:nowrap; border:1px solid rgba(255,255,255,.28); cursor:pointer; font-family:inherit; }
.credit-signin:hover:not(:disabled) { background:rgba(255,255,255,.3); }
.credit-signin:disabled { opacity:.6; cursor:default; }
@media (max-width:360px){ .credit-card { flex-wrap:wrap; } .credit-info { flex-basis:100%; } }

/* ============ 学科分类与付费练习 ============ */
.cat-filter { display:flex; gap:8px; overflow-x:auto; padding:2px 2px 12px; margin-bottom:4px; -webkit-overflow-scrolling:touch; }
.cat-filter::-webkit-scrollbar { height:0; }
.cat-pill { flex:0 0 auto; padding:7px 15px; border-radius:20px; background:#fff; color:var(--text2); font-size:12px; font-weight:600; border:1px solid var(--line); white-space:nowrap; transition:all .15s; }
.cat-pill:hover { border-color:#93c5fd; color:var(--primary); }
.cat-pill.on { background:var(--grad); color:#fff; border-color:transparent; box-shadow:0 4px 12px rgba(37,99,235,.25); }
.cat-badge { display:inline-block; padding:2px 9px; border-radius:20px; font-size:11px; font-weight:700; border:1px solid #e5e7eb; white-space:nowrap; }
.paid-badge { display:inline-block; padding:2px 9px; border-radius:20px; font-size:11px; font-weight:700; background:linear-gradient(135deg,#fef3c7,#fde68a); color:#b45309; white-space:nowrap; }
.unlock-price { display:flex; align-items:baseline; gap:8px; margin-top:14px; padding:12px 14px; background:#fffbeb; border-radius:12px; border:1px solid #fde68a; }
.unlock-price-val { font-size:28px; font-weight:800; color:#d97706; }
.unlock-credit-val { font-size:16px; font-weight:700; color:#b45309; }

@media (max-width:400px){
  .entry-grid, .study-grid { grid-template-columns:repeat(2,1fr); }
  .entry-desc { display:none; }
}
@media (min-width:700px){
  .entry-grid, .study-grid { gap:14px; }
  .entry-card, .study-card { padding-top:18px; padding-bottom:16px; }
}

/* ===== 会员中心 profile.php ===== */
.btn.danger { background:#fee2e2; color:#b91c1c; }
.btn.danger:hover { background:#fecaca; }
.btn.danger:disabled { opacity:.55; cursor:not-allowed; }

.profile-guest { text-align:center; padding:34px 20px; }
.guest-avatar { width:70px; height:70px; margin:0 auto; border-radius:50%; background:#eff6ff; color:var(--primary); display:flex; align-items:center; justify-content:center; font-size:30px; font-weight:800; }

.profile-hero {
  display:flex; align-items:center; gap:16px;
  background:linear-gradient(135deg,#4f46e5,#2563eb);
  color:#fff; border-radius:20px; padding:22px 20px; margin-bottom:14px;
  box-shadow:0 10px 26px rgba(37,99,235,.22);
}
.ph-avatar { width:62px; height:62px; flex:0 0 auto; border-radius:50%; background:rgba(255,255,255,.22); border:2px solid rgba(255,255,255,.5); display:flex; align-items:center; justify-content:center; font-size:26px; font-weight:800; }
.ph-info { flex:1; min-width:0; }
.ph-name-row { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.ph-name { font-size:18px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:170px; }
.ph-tier { font-size:11px; font-weight:700; padding:3px 10px; border-radius:20px; background:rgba(255,255,255,.18); color:#fff; white-space:nowrap; }
.ph-tier.on { background:linear-gradient(135deg,#fbbf24,#d97706); color:#fff; }
.ph-meta { font-size:12px; color:rgba(255,255,255,.82); margin-top:6px; }
.ph-progress { height:6px; border-radius:6px; background:rgba(255,255,255,.25); margin-top:10px; overflow:hidden; }
.ph-progress > i { display:block; height:100%; border-radius:6px; background:#fbbf24; transition:width .3s; }
.ph-progress-tip { font-size:11px; color:rgba(255,255,255,.78); margin-top:5px; }

.profile-assets { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px; }
.asset-card { background:var(--card); border-radius:14px; padding:14px 16px; box-shadow:0 2px 12px rgba(15,23,42,.05); }
.asset-label { display:block; font-size:12px; color:var(--text2); }
.asset-value { display:block; font-size:24px; font-weight:800; color:var(--primary); margin-top:2px; }
.asset-actions { grid-column:1 / -1; display:flex; gap:10px; }
.asset-actions form, .asset-actions .btn { flex:1; }
.asset-actions .btn { text-align:center; }

.func-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px 8px; background:var(--card); border-radius:16px; padding:18px 12px; box-shadow:0 2px 12px rgba(15,23,42,.05); }
.func-item { display:flex; flex-direction:column; align-items:center; gap:7px; font-size:12px; color:var(--text); text-align:center; }
.func-ico { width:46px; height:46px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:17px; font-weight:800; }
.f-blue { background:#eff6ff; color:#2563eb; }
.f-red { background:#fef2f2; color:#dc2626; }
.f-amber { background:#fffbeb; color:#d97706; }
.f-gray { background:#f1f5f9; color:#475569; }

/* 底部导航 5 项：小屏文字略缩，图标尺寸保持 */
@media (max-width:360px){
  .bottombar a { font-size:10px; }
  .bottombar .ico { width:22px; height:22px; }
}

@media (max-width:360px){
  .func-grid { grid-template-columns:repeat(4,1fr); gap:12px 4px; padding:16px 6px; }
  .func-ico { width:42px; height:42px; }
  .ph-avatar { width:54px; height:54px; font-size:22px; }
  .ph-name { font-size:16px; max-width:130px; }
}

/* ===== 邀请好友 / 分享试卷 / 协议 ===== */
.si-amber{background:#fffbeb;color:#d97706}
.si-purple{background:#f5f3ff;color:#7c3aed}
.inv-hero { text-align:center; padding:24px 18px 20px; background:linear-gradient(135deg,#eef2ff,#fdf2f8); border-radius:20px; margin-bottom:16px; }
.inv-art { font-size:46px; line-height:1; }
.inv-hero h1 { font-size:19px; margin:12px 0 6px; }
.inv-hero p { font-size:13px; color:var(--text2); line-height:1.7; }
.inv-hero p b { color:#e11d48; }
.invite-link-card { padding:16px; }
.invite-code-row { display:flex; align-items:center; gap:10px; background:#f8fafc; border:1px dashed #cbd5e1; border-radius:12px; padding:12px 14px; }
.invite-code-label { font-size:12px; color:var(--text2); flex:0 0 auto; }
.invite-code { font-size:20px; font-weight:800; letter-spacing:2px; color:var(--primary); flex:1; min-width:0; }
.invite-url { margin-top:12px; background:#f1f5f9; border-radius:10px; padding:10px 12px; font-size:11px; color:#475569; word-break:break-all; line-height:1.6; }
.share-paper { display:flex; align-items:center; gap:12px; padding:14px; margin-bottom:10px; }
.legal-card { padding:20px 18px; line-height:1.9; font-size:13px; color:var(--text); }
.legal-card h2 { font-size:15px; margin:20px 0 8px; font-weight:800; }
.legal-card p { color:var(--text2); }
