/* =====================================================================
   第五章《离婚制度》· 网页版小程序
   视觉：纸感米白 + 墨蓝 + 朱砂；移动优先，桌面居中呈现
   ===================================================================== */

:root {
  --ink: #17233b;
  --ink-2: #2c3a52;
  --ink-3: #4d5a70;
  --muted: #7c8596;
  --muted-2: #9aa1ad;
  --paper: #f7f2e8;
  --paper-2: #efe7d8;
  --card: #fffdf8;
  --line: rgba(23, 35, 59, .10);
  --line-strong: rgba(23, 35, 59, .18);
  --brand: #1e3557;
  --brand-2: #2d4f79;
  --brand-3: #47688f;
  --accent: #b0442e;
  --accent-2: #cf6a4d;
  --accent-soft: #f4e2da;
  --gold: #ac874d;
  --gold-soft: #f1e6cf;
  --green: #3d6750;
  --green-soft: #e2ede5;
  --red: #a83a2c;
  --red-soft: #f6e0db;
  --blue-soft: #e4eaf3;
  --shadow-sm: 0 2px 8px rgba(30, 39, 55, .05);
  --shadow: 0 10px 30px rgba(30, 39, 55, .08);
  --shadow-lg: 0 24px 60px rgba(23, 35, 59, .18);
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(255, 250, 238, .95), transparent 60%),
    radial-gradient(900px 500px at 110% 20%, rgba(214, 198, 170, .55), transparent 55%),
    linear-gradient(140deg, #e9e1d2 0%, #ded3c1 55%, #d4c8b4 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background-image:
    repeating-linear-gradient(0deg, rgba(60, 50, 35, .035) 0, rgba(60, 50, 35, .035) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(60, 50, 35, .02) 0, rgba(60, 50, 35, .02) 1px, transparent 1px, transparent 7px);
  mix-blend-mode: multiply;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(176, 68, 46, .2); }

/* ---------------- 外框 ---------------- */
.app {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  overflow: hidden;
  isolation: isolate;
}

.app-main {
  min-height: 100vh;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
  body { padding: 26px 0; }
  .app {
    min-height: calc(100vh - 52px);
    border-radius: 34px;
    box-shadow: 0 40px 100px rgba(40, 30, 18, .28), 0 0 0 1px rgba(255, 255, 255, .35) inset;
  }
  .app::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 34px;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
  }
}

/* 桌面两侧的“书页”装饰 */
@supports (overflow: clip) {
  .app { overflow: clip; }
}
.desk-mark {
  display: none;
  position: fixed;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
  color: rgba(43, 52, 66, .55);
  font-family: var(--serif);
  letter-spacing: .5em;
  writing-mode: vertical-rl;
  font-size: 13px;
}
.desk-mark b { font-weight: 600; color: rgba(43, 52, 66, .78); }
.desk-note {
  display: none;
  position: fixed;
  right: 26px;
  bottom: 40px;
  z-index: 0;
  font-size: 10px;
  letter-spacing: .28em;
  color: rgba(43, 52, 66, .45);
  writing-mode: vertical-rl;
}
@media (min-width: 1120px) {
  .desk-mark, .desk-note { display: block; }
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: calc(10px + env(safe-area-inset-top)) 16px 8px;
  background: linear-gradient(to bottom, rgba(247, 242, 232, .96), rgba(247, 242, 232, .82) 70%, rgba(247, 242, 232, 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .25s ease;
}
.topbar.scrolled { box-shadow: 0 8px 24px rgba(40, 30, 18, .06); }

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.brand-mini { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-seal {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff7ec;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(176, 68, 46, .25);
  flex: none;
}
.brand-text { min-width: 0; }
.brand-text b {
  display: block;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text small {
  display: block;
  margin-top: -1px;
  font-size: 9.5px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.capsule {
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 0;
  height: 32px;
  padding: 0 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 253, 248, .7);
  color: var(--ink-2);
  flex: none;
}
#searchBtn { margin-left: auto; flex: none; }
.capsule span {
  display: grid; place-items: center;
  width: 38px; height: 30px;
  font-size: 12px;
  letter-spacing: 1px;
}
.capsule .dots { display: flex; align-items: center; justify-content: center; gap: 3px; }
.capsule .dots i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  display: block;
}
.capsule .capsule-sep { width: 1px; height: 15px; background: var(--line-strong); padding: 0; }
.capsule .circ { width: 11px; height: 11px; border: 1.5px solid currentColor; border-radius: 50%; display: inline-block; }

/* ---------------- 页面基础 ---------------- */
.page { padding: 4px 16px 30px; animation: pageIn .38s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head { padding: 14px 2px 18px; }
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
.display {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 29px;
  letter-spacing: .02em;
  line-height: 1.2;
}
.lead { margin-top: 8px; color: var(--ink-3); font-size: 13.5px; line-height: 1.75; }

/* ---------------- 首页 Hero ---------------- */
.hero {
  position: relative;
  margin: 6px 0 16px;
  border-radius: var(--r-lg);
  padding: 22px 20px 18px;
  overflow: hidden;
  color: #f8f3e9;
  background:
    radial-gradient(120% 130% at 0% 0%, #35587f 0%, #1e3557 45%, #14253f 100%);
  box-shadow: 0 18px 40px rgba(23, 35, 59, .26);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .08) 0, rgba(255, 255, 255, .08) 1px, transparent 1px, transparent 9px),
    radial-gradient(circle at 80% 10%, rgba(207, 169, 107, .3), transparent 38%);
  pointer-events: none;
}
.hero::after {
  content: "05";
  position: absolute;
  right: -8px;
  bottom: -42px;
  font-family: var(--serif);
  font-size: 168px;
  line-height: 1;
  font-weight: 700;
  color: rgba(255, 255, 255, .055);
  letter-spacing: -.05em;
  pointer-events: none;
}
.hero-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; }
.hero-top .eyebrow { color: #d9b982; }
.hero-top .eyebrow::before { background: #d9b982; }
.h5-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .08);
  white-space: nowrap;
}
.h5-badge i { width: 5px; height: 5px; border-radius: 50%; background: #d9b982; box-shadow: 0 0 0 3px rgba(217, 185, 130, .18); }

.hero-title {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: .05em;
  font-weight: 700;
}
.hero-title small {
  display: block;
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .3em;
  color: rgba(248, 243, 233, .55);
  font-weight: 500;
}
.hero-sub {
  position: relative;
  z-index: 1;
  max-width: 86%;
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(248, 243, 233, .74);
}
.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 16px;
  font-size: 10.5px;
  color: rgba(248, 243, 233, .66);
  letter-spacing: .03em;
}
.hero-stats b { color: #f0d9ac; font-weight: 700; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 9px; margin-top: 18px; }
.hero-seal {
  position: absolute;
  right: 18px;
  top: 64px;
  z-index: 1;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 185, 130, .55);
  border-radius: 6px;
  color: #e8c990;
  font-family: var(--serif);
  font-size: 23px;
  transform: rotate(6deg);
  background: rgba(255, 255, 255, .03);
}
.hero-seal::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(217, 185, 130, .3);
  border-radius: 3px;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  border: 1px solid transparent;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--accent);
  color: #fff8ee;
  box-shadow: 0 8px 20px rgba(176, 68, 46, .3);
}
.btn-primary:hover { background: #9e3b27; }
.btn-light {
  background: #f4e7d0;
  color: #3b2c18;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}
.btn-ghost {
  border-color: rgba(255, 255, 255, .26);
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .04);
}
.btn-outline {
  border-color: var(--line-strong);
  background: rgba(255, 253, 248, .7);
  color: var(--ink-2);
}
.btn-dark { background: var(--brand); color: #f8f3e9; }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--ink-3);
  transition: background .18s ease, color .18s ease;
}
.icon-btn:hover { background: rgba(23, 35, 59, .05); color: var(--ink); }
.icon-btn.active { color: var(--accent); }

/* ---------------- 卡片 / 通用 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 17px; }
.soft { background: linear-gradient(160deg, #fffdf8, #f9f4ea); }
.dark-card { background: var(--brand); color: #f6efe3; border-color: transparent; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 24px 2px 11px;
}
.section-title {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .02em;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 15px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: -1px;
}
.section-more {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.divider { height: 1px; background: var(--line); margin: 14px 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 10.5px; }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.6;
  color: var(--ink-3);
  background: var(--paper-2);
  white-space: nowrap;
}
.tag.accent { color: var(--accent); background: var(--accent-soft); }
.tag.green { color: var(--green); background: var(--green-soft); }
.tag.gold { color: #7c5b26; background: var(--gold-soft); }
.tag.blue { color: var(--brand-2); background: var(--blue-soft); }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--ink-3);
  background: rgba(255, 253, 248, .75);
  transition: all .18s ease;
  white-space: nowrap;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #f8f3e9; box-shadow: 0 6px 14px rgba(30, 53, 87, .18); }
.chip:hover { border-color: var(--line-strong); }

/* ---------------- 首页：进度 ---------------- */
.progress-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px;
}
.ring {
  --p: 0;
  width: 76px; height: 76px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(23, 35, 59, .08) 0);
  position: relative;
  transition: background .5s ease;
}
.ring::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ring-inner { position: relative; z-index: 1; text-align: center; line-height: 1.1; }
.ring-inner b { display: block; font-family: var(--serif); font-size: 20px; }
.ring-inner small { font-size: 8.5px; color: var(--muted); letter-spacing: .04em; }
.progress-meta { flex: 1; min-width: 0; }
.progress-meta h3 { font-family: var(--serif); font-size: 16px; }
.progress-meta p { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.mini-stats { display: flex; gap: 14px; margin-top: 9px; }
.mini-stats div { line-height: 1.2; }
.mini-stats b { display: block; font-size: 15px; font-family: var(--serif); }
.mini-stats span { font-size: 9.5px; color: var(--muted); }

/* ---------------- 学习路径 ---------------- */
.path { display: flex; flex-direction: column; gap: 0; padding: 3px 0; }
.path-item { display: flex; gap: 13px; position: relative; padding: 0 0 15px; cursor: pointer; }
.path-item:last-child { padding-bottom: 2px; }
.path-item::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 29px;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
}
.path-item:last-child::before { display: none; }
.path-dot {
  width: 29px; height: 29px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--card);
  font-family: var(--serif);
  font-size: 11px;
  color: var(--ink-3);
  position: relative;
  z-index: 1;
}
.path-item.done .path-dot { background: var(--green); border-color: var(--green); color: #fff; }
.path-item.active .path-dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.path-body { min-width: 0; padding-top: 2px; flex: 1; }
.path-body h4 { font-family: var(--serif); font-size: 14.5px; }
.path-body p { margin-top: 2px; font-size: 11px; color: var(--muted); }
.path-body .tag { margin-top: 5px; }

/* ---------------- 快捷入口 ---------------- */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  text-align: left;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease;
}
.quick:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.quick-icon {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink-2);
}
.quick b { display: block; font-size: 12.5px; }
.quick small { display: block; font-size: 9.5px; color: var(--muted); margin-top: -1px; }
.quick.accent .quick-icon { background: var(--accent-soft); color: var(--accent); }
.quick.green .quick-icon { background: var(--green-soft); color: var(--green); }
.quick.gold .quick-icon { background: var(--gold-soft); color: #7c5b26; }

/* ---------------- 今日法条 ---------------- */
.law-of-day {
  position: relative;
  overflow: hidden;
  padding: 18px 17px 16px;
  border-radius: var(--r);
  background: linear-gradient(145deg, #223b5c, #182b46);
  color: #f6efe3;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.law-of-day::before {
  content: "“";
  position: absolute;
  right: 12px;
  top: -18px;
  font-family: Georgia, serif;
  font-size: 110px;
  line-height: 1;
  color: rgba(255, 255, 255, .07);
}
.lotd-label { display: flex; align-items: center; gap: 7px; font-size: 9.5px; letter-spacing: .18em; color: #d9b982; }
.lotd-label::before { content: ""; width: 14px; height: 1px; background: currentColor; }
.lotd-title { margin-top: 9px; font-family: var(--serif); font-size: 16px; }
.lotd-text {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.9;
  color: rgba(246, 239, 227, .82);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lotd-foot { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 10px; color: rgba(246, 239, 227, .5); }
.lotd-foot .spacer { flex: 1; }

/* ---------------- 提醒条 ---------------- */
.notice {
  display: flex;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(176, 68, 46, .16);
  background: linear-gradient(140deg, #fbf0ea, #f8e9e0);
  color: var(--ink-2);
}
.notice-icon {
  width: 26px; height: 26px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.notice b { font-size: 12px; }
.notice p { margin-top: 2px; font-size: 10.5px; line-height: 1.6; color: var(--ink-3); }
.notice .link { color: var(--accent); font-weight: 700; white-space: nowrap; }

/* ---------------- 知识体系 ---------------- */
.tree { margin-top: 6px; }
.tree-root {
  position: relative;
  margin: 0 auto 14px;
  width: fit-content;
  padding: 10px 22px;
  border-radius: 12px;
  background: var(--brand);
  color: #f8f3e9;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .08em;
  box-shadow: 0 8px 20px rgba(30, 53, 87, .2);
}
.tree-root::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}
.tree-branch {
  position: relative;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tree-branch::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--bcolor, var(--brand));
}
.tree-branch-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px 13px 17px;
  text-align: left;
}
.tree-no {
  width: 32px; height: 32px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--bsoft, var(--paper-2));
  color: var(--bcolor, var(--brand));
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
}
.tree-branch-title { min-width: 0; flex: 1; }
.tree-branch-title b { display: block; font-family: var(--serif); font-size: 14.5px; }
.tree-branch-title small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.tree-chevron { color: var(--muted); transition: transform .22s ease; flex: none; }
.tree-branch.open .tree-chevron { transform: rotate(180deg); }
.tree-branch-body { display: none; padding: 0 14px 13px 17px; }
.tree-branch.open .tree-branch-body { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.point-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-top: 1px dashed var(--line);
  text-align: left;
}
.point-row:first-child { border-top: 0; }
.point-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bcolor, var(--accent)); flex: none; }
.point-row.done .point-dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.point-title { flex: 1; min-width: 0; font-size: 12.5px; }
.point-title small { display: block; color: var(--muted); font-size: 9.5px; }
.point-row .arrow { color: var(--muted-2); flex: none; }

/* 对比表 */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.compare { min-width: 520px; }
.compare-row { display: grid; grid-template-columns: 96px 1fr 1.25fr; border-top: 1px solid var(--line); }
.compare-row:first-child { border-top: 0; }
.compare-cell { padding: 10px 11px; font-size: 11px; line-height: 1.6; border-left: 1px solid var(--line); }
.compare-cell:first-child { border-left: 0; font-weight: 700; color: var(--ink-2); background: rgba(239, 231, 216, .45); }
.compare-head .compare-cell { background: var(--brand); color: #f8f3e9; font-size: 11px; font-weight: 700; }
.compare-head .compare-cell:first-child { background: var(--brand); color: #d9b982; }
.compare .hl { color: var(--accent); font-weight: 700; }

/* 数字速记 */
.num-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.num-card {
  padding: 12px 12px 11px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--card);
}
.num-big { font-family: var(--serif); font-size: 23px; color: var(--accent); line-height: 1.1; }
.num-big small { font-size: 11px; margin-left: 2px; }
.num-card b { display: block; margin-top: 4px; font-size: 11px; }
.num-card p { margin-top: 2px; font-size: 9.5px; color: var(--muted); line-height: 1.5; }

/* ---------------- 法条库 ---------------- */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.search-box svg { flex: none; color: var(--muted); }
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-clear { color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 4px; }

.law-card {
  width: 100%;
  display: block;
  text-align: left;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, transform .18s ease;
  margin-bottom: 8px;
}
.law-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.law-top { display: flex; align-items: center; gap: 7px; }
.source-badge {
  display: inline-flex;
  padding: 1.5px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  background: var(--blue-soft);
  color: var(--brand-2);
}
.source-badge.j1 { background: var(--gold-soft); color: #7c5b26; }
.source-badge.j2 { background: var(--green-soft); color: var(--green); }
.source-badge.reg { background: var(--accent-soft); color: var(--accent); }
.source-badge.cpl { background: #e9e4ef; color: #5a4b6b; }
.law-num { font-size: 10.5px; color: var(--muted); }
.law-card h4 { margin-top: 5px; font-family: var(--serif); font-size: 14.5px; }
.law-preview {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.law-meta { display: flex; align-items: center; gap: 5px; margin-top: 7px; flex-wrap: wrap; }

.article-body { padding: 2px 1px; }
.article-body p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2;
  color: var(--ink-2);
  margin-bottom: 9px;
  text-align: justify;
}
.article-note {
  margin-top: 12px;
  padding: 11px 12px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: #faf4e7;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-3);
}
.article-note b { color: #7c5b26; }
.ref-block { margin-top: 16px; }
.ref-block h5 { font-size: 10px; letter-spacing: .15em; color: var(--muted); margin-bottom: 7px; }

/* 校勘 */
.correction {
  padding: 14px 14px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 9px;
}
.correction-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.level {
  padding: 1.5px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  background: var(--red-soft);
  color: var(--red);
}
.level.gold { background: var(--gold-soft); color: #7c5b26; }
.level.green { background: var(--green-soft); color: var(--green); }
.correction h4 { margin-top: 6px; font-family: var(--serif); font-size: 14px; }
.correction .orig {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f0e7;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
  text-decoration: line-through;
  text-decoration-color: rgba(168, 58, 44, .35);
}
.correction .fix { margin-top: 7px; font-size: 11.5px; line-height: 1.75; color: var(--ink-2); }
.correction .basis { margin-top: 6px; font-size: 9.5px; color: var(--muted); }

/* ---------------- 案例 ---------------- */
.case-card {
  width: 100%;
  display: flex;
  gap: 12px;
  text-align: left;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  margin-bottom: 9px;
  transition: transform .18s ease, border-color .18s ease;
}
.case-card:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.case-no {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
}
.case-body { min-width: 0; flex: 1; }
.case-title { display: block; font-family: var(--serif); font-size: 14px; line-height: 1.4; }
.case-sub { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); line-height: 1.55; }
.case-foot { display: flex; align-items: center; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.case-foot .diff { margin-left: auto; color: var(--muted-2); font-size: 9px; letter-spacing: .06em; }

.case-hero {
  padding: 20px 18px 18px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(145deg, #223b5c, #182b46);
  color: #f6efe3;
}
.case-hero .eyebrow { color: #d9b982; }
.case-hero .eyebrow::before { background: #d9b982; }
.case-hero h2 { margin-top: 7px; font-family: var(--serif); font-size: 21px; line-height: 1.35; }
.case-hero p { margin-top: 6px; font-size: 11px; color: rgba(246, 239, 227, .62); }
.case-block { margin-top: 16px; }
.case-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--accent);
}
.case-label::before { content: ""; width: 14px; height: 1px; background: currentColor; }
.case-text {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-2);
  text-align: justify;
}
.case-text p + p { margin-top: 7px; }
.issue-box {
  padding: 12px 13px;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid rgba(176, 68, 46, .12);
  font-size: 12px;
  line-height: 1.75;
  color: #6a2f22;
}
.reveal-box {
  margin-top: 12px;
  padding: 15px;
  border-radius: 13px;
  border: 1px dashed var(--line-strong);
  background: #faf6ed;
  text-align: center;
}
.reveal-box p { font-size: 10.5px; color: var(--muted); margin-bottom: 9px; }
.rule-list { counter-reset: rule; }
.rule-list li {
  position: relative;
  padding: 7px 0 7px 26px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.rule-list li:first-child { border-top: 0; }
.rule-list li::before {
  counter-increment: rule;
  content: counter(rule);
  position: absolute;
  left: 0; top: 9px;
  width: 17px; height: 17px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}
.insight {
  margin-top: 13px;
  padding: 12px 13px;
  border-radius: 11px;
  background: var(--green-soft);
  border-left: 3px solid var(--green);
  font-size: 11.5px;
  line-height: 1.75;
  color: #2f4f3e;
}

/* ---------------- 演练 ---------------- */
.quiz-start-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 19px;
  border-radius: var(--r-lg);
  background: linear-gradient(145deg, #a94831, #8c3322);
  color: #fff5e9;
  box-shadow: 0 16px 36px rgba(140, 51, 34, .24);
}
.quiz-start-hero::after {
  content: "?";
  position: absolute;
  right: 12px;
  bottom: -38px;
  font-family: Georgia, serif;
  font-size: 150px;
  color: rgba(255, 255, 255, .08);
}
.quiz-start-hero .eyebrow { color: #f3cfae; }
.quiz-start-hero .eyebrow::before { background: #f3cfae; }
.quiz-start-hero h2 { margin-top: 8px; font-family: var(--serif); font-size: 25px; }
.quiz-start-hero p { margin-top: 5px; font-size: 11.5px; color: rgba(255, 245, 233, .72); max-width: 80%; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.mode {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
}
.mode:hover { border-color: var(--accent); }
.mode-icon {
  width: 32px; height: 32px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}
.mode b { display: block; font-size: 12px; }
.mode small { display: block; font-size: 9px; color: var(--muted); margin-top: 1px; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}
.stat-strip div { padding: 12px 8px; text-align: center; border-left: 1px solid var(--line); }
.stat-strip div:first-child { border-left: 0; }
.stat-strip b { display: block; font-family: var(--serif); font-size: 19px; }
.stat-strip span { font-size: 9px; color: var(--muted); }

.quiz-top { display: flex; align-items: center; gap: 9px; padding: 4px 2px 12px; }
.quiz-count { font-family: var(--serif); font-size: 15px; white-space: nowrap; }
.quiz-count small { font-size: 10px; color: var(--muted); }
.quiz-progress { flex: 1; height: 5px; border-radius: 99px; background: rgba(23, 35, 59, .09); overflow: hidden; }
.quiz-progress i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s ease; }
.quiz-tag { font-size: 9px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 7px; white-space: nowrap; }

.q-card { padding: 19px 17px 17px; }
.q-type { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--accent); letter-spacing: .12em; font-weight: 700; }
.q-stem {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
}
.options { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; }
.option {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  text-align: left;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
  transition: all .16s ease;
}
.option:hover { border-color: var(--line-strong); }
.option-key {
  width: 22px; height: 22px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
}
.option.selected { border-color: var(--accent); background: #fdf1ec; }
.option.selected .option-key { background: var(--accent); color: #fff; }
.option.correct { border-color: var(--green); background: var(--green-soft); }
.option.correct .option-key { background: var(--green); color: #fff; }
.option.wrong { border-color: var(--red); background: var(--red-soft); }
.option.wrong .option-key { background: var(--red); color: #fff; }
.option .mark { margin-left: auto; font-size: 13px; font-weight: 700; }
.option.correct .mark { color: var(--green); }
.option.wrong .mark { color: var(--red); }

.feedback {
  margin-top: 13px;
  padding: 13px 13px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 11.5px;
  line-height: 1.78;
}
.feedback.ok { background: var(--green-soft); border-color: rgba(61, 103, 80, .16); }
.feedback.bad { background: var(--red-soft); border-color: rgba(168, 58, 44, .14); }
.feedback-head { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 3px; }
.feedback.ok .feedback-head { color: var(--green); }
.feedback.bad .feedback-head { color: var(--red); }
.feedback .refs { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.quiz-actions { display: flex; gap: 9px; margin-top: 14px; }
.quiz-actions .btn { flex: 1; }

.result-card { padding: 24px 18px 18px; text-align: center; }
.score-ring {
  --p: 0;
  width: 128px; height: 128px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(23, 35, 59, .08) 0);
  position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--card); }
.score-inner { position: relative; z-index: 1; }
.score-inner b { display: block; font-family: var(--serif); font-size: 38px; line-height: 1; }
.score-inner small { font-size: 9px; color: var(--muted); letter-spacing: .1em; }
.result-card h3 { margin-top: 13px; font-family: var(--serif); font-size: 20px; }
.result-card p { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.result-actions { display: flex; gap: 8px; margin-top: 17px; }
.result-actions .btn { flex: 1; }

/* 记忆卡 */
.flashcard { perspective: 1200px; margin-top: 6px; }
.flash-inner {
  position: relative;
  width: 100%;
  min-height: 320px;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}
.flashcard.flipped .flash-inner { transform: rotateY(180deg); }
.flash-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow-y: auto;
}
.flash-front { background: linear-gradient(160deg, #fffdf8, #f4ecdc); }
.flash-back { transform: rotateY(180deg); background: linear-gradient(160deg, #223b5c, #182b46); color: #f6efe3; border-color: transparent; }
.flash-label { font-size: 9px; letter-spacing: .2em; color: var(--accent); font-weight: 700; }
.flash-back .flash-label { color: #d9b982; }
.flash-q { margin-top: 16px; font-family: var(--serif); font-size: 19px; line-height: 1.6; }
.flash-a { margin-top: 14px; font-family: var(--serif); font-size: 14px; line-height: 1.95; color: rgba(246, 239, 227, .9); }
.flash-hint { margin-top: auto; padding-top: 18px; font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.flash-back .flash-hint { color: rgba(246, 239, 227, .45); }
.flash-actions { display: flex; gap: 8px; margin-top: 13px; }
.flash-actions .btn { flex: 1; }
.flash-progress { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted); margin-top: 12px; }
.flash-progress .bar { flex: 1; height: 4px; border-radius: 9px; background: rgba(23, 35, 59, .08); overflow: hidden; }
.flash-progress .bar i { display: block; height: 100%; background: var(--green); border-radius: 9px; }

/* 错题 / 列表 */
.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.list-item:first-child { border-top: 0; }
.list-item .idx { width: 24px; height: 24px; flex: none; border-radius: 7px; background: var(--paper-2); display: grid; place-items: center; font-size: 10px; color: var(--ink-3); }
.list-item .txt { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.55; }
.list-item .txt small { display: block; color: var(--muted); font-size: 9.5px; }

/* ---------------- 弹层 ---------------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(18, 24, 34, .46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .24s ease;
}
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 91;
  transform: translate(-50%, 102%);
  width: min(560px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  box-shadow: 0 -20px 60px rgba(23, 35, 59, .25);
  transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.sheet.show { transform: translate(-50%, 0); }
.sheet.full { max-height: 94vh; height: 94vh; }
.sheet-grab { width: 36px; height: 4px; border-radius: 99px; background: rgba(23, 35, 59, .16); margin: 9px auto 0; flex: none; }
.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 9px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 242, 232, .96);
  backdrop-filter: blur(8px);
  flex: none;
}
.sheet-head h3 { font-family: var(--serif); font-size: 15px; }
.sheet-head .sub { font-size: 9.5px; color: var(--muted); }
.sheet-close { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: rgba(23, 35, 59, .06); display: grid; place-items: center; color: var(--ink-3); flex: none; }
.sheet-body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-body.tight { padding: 0 0 18px; }

@media (min-width: 900px) {
  .sheet { bottom: 4vh; border-radius: 24px; max-height: 84vh; }
  .sheet.show { transform: translate(-50%, 0); }
  .sheet.full { height: 86vh; max-height: 86vh; }
  .sheet-grab { display: none; }
  .sheet-head { padding-top: 13px; }
}

/* 搜索 */
.search-result-group { margin-top: 15px; }
.search-result-group > h4 { font-size: 9.5px; letter-spacing: .16em; color: var(--muted); margin-bottom: 5px; }
.result-item {
  width: 100%;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  text-align: left;
}
.result-item .ri-main { flex: 1; min-width: 0; font-size: 12px; }
.result-item .ri-main small { display: block; color: var(--muted); font-size: 9.5px; }
.result-item .tag { flex: none; }
.empty { padding: 34px 10px; text-align: center; color: var(--muted); font-size: 12px; }
.empty b { display: block; font-family: var(--serif); font-size: 16px; color: var(--ink-3); margin-bottom: 3px; }

/* ---------------- 底部标签栏 ---------------- */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 50;
  width: min(560px, 100%);
  display: flex;
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 252, 245, .93);
  border-top: 1px solid rgba(23, 35, 59, .09);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -8px 30px rgba(40, 30, 18, .06);
}
@media (min-width: 900px) {
  .tabbar {
    bottom: 26px;
    border-radius: 0 0 34px 34px;
    width: 560px;
  }
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 3px 0 1px;
  color: var(--muted);
  transition: color .18s ease, transform .18s ease;
  min-width: 0;
}
.tab svg { width: 21px; height: 21px; }
.tab span { font-size: 9.5px; letter-spacing: .02em; white-space: nowrap; }
.tab.active { color: var(--accent); }
.tab.active svg { transform: translateY(-1px); }
.tab.active span { font-weight: 700; }
.tab:active { transform: scale(.94); }

/* ---------------- 页脚 ---------------- */
.footer {
  margin-top: 26px;
  padding: 16px 4px 8px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.8;
}
.footer b { color: var(--ink-3); font-weight: 600; }
.footer .seal-line { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 3px; color: var(--accent); font-family: var(--serif); font-size: 11px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 10px);
  z-index: 120;
  padding: 9px 15px;
  border-radius: 99px;
  background: rgba(23, 35, 59, .92);
  color: #f8f3e9;
  font-size: 11.5px;
  opacity: 0;
  pointer-events: none;
  transition: all .22s ease;
  max-width: 82vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 杂项 ---------------- */
.kbd {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  background: #fff;
}
.hr-label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 9px; letter-spacing: .16em; margin: 18px 0 10px; }
.hr-label::before, .hr-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.mt6 { margin-top: 6px; } .mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; } .mt18 { margin-top: 18px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn .25s ease both; }
