/* ==========================================================================
   阿哈错题 · 样式表
   纸色为底，墨色为字，钴蓝紫只用来表示"可以操作"，
   深绿表示对了、赭红表示错了——颜色只用在这三件事上。
   ========================================================================== */

:root {
  --ink: #26241f;
  --ink-2: #6b665c;
  --ink-3: #9c968a;
  --line: #e5ded0;
  --line-soft: #efe9dd;
  --paper: #f8f5ee;
  --paper-2: #fffdf8;
  --accent: #4351cf;
  --accent-2: #5a68ea;
  --accent-soft: #eef0fd;
  --ok: #2e7d5b;
  --ok-bg: #f9fcfa;
  --ok-line: #dcebe2;
  --bad: #a9503a;
  --bad-bg: #fbf4f1;
  --bad-line: #e7cec5;
  --warn: #b4651f;
  --warn-bg: #fdf4e9;
  --ok-text: #2f7a4f;
  --radius: 16px;
  --shadow-card: 0 1px 1px rgba(80, 68, 50, .05), 0 10px 24px -20px rgba(80, 68, 50, .45);
  --shadow-sheet: 0 1px 1px rgba(80, 68, 50, .05), 0 8px 20px -14px rgba(80, 68, 50, .22),
    0 28px 50px -34px rgba(80, 68, 50, .26);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow-x: hidden; }

body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.65 -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.05'/></svg>"),
    radial-gradient(1100px 560px at 50% -12%, rgba(255, 255, 255, .85), transparent 70%),
    linear-gradient(180deg, #faf7f1, #f2eee5);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

/* ---------------- 顶部：悬浮玻璃条 ---------------- */
.top-inner { display: flex; align-items: center; gap: 16px; width: 100%; min-width: 0; }

.top {
  position: sticky; top: 12px; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  max-width: 1240px; margin: 12px auto 0; padding: 0 14px 0 16px; height: 64px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 253, 246, .74), rgba(250, 246, 236, .56));
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 0 rgba(255, 255, 255, .32),
    0 0 0 .5px rgba(140, 128, 105, .14),
    0 1px 1px rgba(80, 68, 50, .05),
    0 16px 30px -22px rgba(70, 60, 45, .55);
}

.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.logo {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: Georgia, serif; font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 6px rgba(67, 81, 207, .3);
}
.wordmark { display: flex; flex-direction: column; line-height: 1.22; }
.wordmark b { font-size: 16px; letter-spacing: .02em; }
.wordmark span { font-size: 10.5px; color: var(--ink-3); letter-spacing: .12em; margin-top: 1px; }

/* 导航：一颗颗药丸，选中那颗浮起来 */
.tabs { display: flex; align-items: center; gap: 1px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; display: flex; align-items: center; gap: 7px; flex: 0 0 auto;
  border: 0; background: transparent; color: #6f6a60; font: inherit; font-size: 13px;
  letter-spacing: .015em; padding: 9px 13px; border-radius: 12px; cursor: pointer;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.tab svg {
  width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.4; fill: none;
  stroke-linecap: round; stroke-linejoin: round; opacity: .85;
}
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .42); }
.tab.is-on {
  color: var(--ink); font-weight: 500;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(252, 250, 245, .9));
  box-shadow:
    inset 0 1px 0 #fff,
    0 0 0 .5px rgba(140, 128, 105, .14),
    0 4px 10px -6px rgba(67, 81, 207, .45);
}
.tab.is-on svg { stroke: var(--accent); opacity: 1; }

.topstatus { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: 0 0 auto; }
.topstatus .date { font-size: 12px; color: var(--ink-3); letter-spacing: .05em; }
.streak {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 11px;
  font-size: 12px; color: #3b4699; background: rgba(67, 81, 207, .07);
  box-shadow: inset 0 0 0 .5px rgba(67, 81, 207, .16);
}
.streak b { font-weight: 600; }
.gem { width: 6px; height: 6px; border-radius: 1.5px; background: var(--accent); transform: rotate(45deg); }

/* ---------------- 主体布局 ---------------- */
.shell { display: grid; gap: 26px; max-width: 1240px; margin: 0 auto; padding: 22px 20px 96px; }
.stage { min-width: 0; }

/* 左栏（只在宽屏出现） */
.rail { display: none; }

/* ---------------- 首页 ---------------- */
.hero { padding: 6px 0 2px; }
.hero-date { display: none; }
.hero-title {
  font-family: "Songti SC", Georgia, serif;
  font-size: 30px; line-height: 1.45; font-weight: 500; letter-spacing: .01em;
  margin: 0 0 8px; color: #2c2937;
}
.hero-title .num {
  font-size: 40px; letter-spacing: -.01em;
  background: linear-gradient(135deg, #5a68ea, #4150d8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.75; }

.home-main { display: grid; gap: 10px; margin: 24px 0 30px; }
.cta {
  display: flex; align-items: baseline; gap: 14px; width: 100%; text-align: left;
  border: 0; border-radius: 18px; padding: 22px 24px; cursor: pointer;
  background: linear-gradient(180deg, #5a68ea, #4150d8); color: #fff; font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 28px -16px rgba(67, 81, 207, .8);
  transition: transform .12s ease, box-shadow .16s ease;
}
.cta:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 18px 34px -16px rgba(67, 81, 207, .85); }
.cta:active { transform: translateY(0) scale(.997); }
.cta-num { font-family: Georgia, serif; font-size: 38px; line-height: 1; }
.cta-text { font-size: 14px; opacity: .82; }
.cta-text em { display: block; font-style: normal; font-size: 15px; color: #fff; margin-top: 2px; }
.cta-ghost {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0;
  border: 1px solid var(--line); background: var(--paper-2); color: var(--ink);
  border-radius: 18px; padding: 15px 20px; font: inherit; font-size: 15px; cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: border-color .14s ease, background-color .14s ease;
}
.cta-ghost:hover { border-color: #c8cdee; background: #fbfaff; }
.cta-ghost em {
  font-style: normal; font-size: 12.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52%;
}

/* 进度环 */
.home-ring-row { display: flex; align-items: center; gap: 20px; margin: 0 0 24px; }
.ring { width: 96px; height: 96px; flex: 0 0 96px; transform: rotate(0deg); }
.ring-bg { fill: none; stroke: #e8e1d3; stroke-width: 7; }
.ring-fg {
  fill: none; stroke: url(#railGrad); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 264; stroke-dashoffset: 264; transition: stroke-dashoffset .5s ease;
}
.ring-copy p { margin: 0; }
.ring-num { font-family: Georgia, serif; font-size: 26px; line-height: 1.1; }
.ring-num i { font-style: normal; color: var(--ink-3); font-size: 18px; margin: 0 3px; }
.ring-copy .hint { display: block; margin-top: 6px; }
.ring-copy .hint em { display: block; font-style: normal; font-size: 11.5px; }

.home-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 16px 0; margin-bottom: 24px;
}
.hs { display: flex; flex-direction: column; gap: 3px; }
.hs b { font-family: Georgia, serif; font-size: 22px; font-weight: 500; color: #35314a; }
.hs span { font-size: 12px; color: var(--ink-3); }

.section-label { font-size: 10.5px; letter-spacing: .2em; color: var(--ink-3); margin: 0 0 10px; }
.recent-list { display: grid; }
.recent-item {
  display: flex; align-items: baseline; gap: 10px; padding: 12px 2px;
  border-bottom: 1px solid var(--line-soft);
}
.recent-item:last-child { border-bottom: 0; }
.recent-item .r-stem {
  flex: 1; min-width: 0; font-size: 14px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.recent-item .r-topic {
  flex: 0 1 auto; max-width: 34%; font-size: 11px; color: #4a5699;
  background: #f1f2fa; padding: 2px 8px; border-radius: 999px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.recent-item .r-date { flex: 0 0 auto; font-size: 11px; color: var(--ink-3); }

.home-foot { margin: 22px 0 0; font-size: 11.5px; color: var(--ink-3); }
.empty-note { padding: 18px 0; color: var(--ink-2); font-size: 14px; line-height: 1.85; }

/* ---------------- 通用排版 ---------------- */
.lead { color: var(--ink-2); font-size: 14px; margin: 4px 0 18px; line-height: 1.75; }
.hint { color: var(--ink-3); font-size: 12.5px; }
.h3 { font-size: 13.5px; color: var(--ink-2); margin: 24px 0 10px; font-weight: 600; letter-spacing: .02em; }

/* ---------------- 录入 ---------------- */
.shot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filebtn {
  display: inline-block; padding: 11px 20px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, #5a68ea, #4150d8); color: #fff; font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 18px -12px rgba(67, 81, 207, .8);
  transition: filter .12s ease;
}
.filebtn:hover { filter: brightness(1.06); }
.preview {
  display: block; width: 100%; max-height: 340px; object-fit: contain; margin: 14px 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2);
  box-shadow: var(--shadow-card);
}
.status {
  margin: 12px 0; padding: 10px 13px; border-radius: 11px;
  background: var(--accent-soft); color: #3b4699; font-size: 13.5px;
}
.status.err { background: var(--warn-bg); color: var(--warn); }
.status.ok { background: var(--ok-bg); color: var(--ok-text); }

.drafts { display: grid; gap: 14px; margin-top: 16px; }
.card {
  position: relative; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 16px 14px; box-shadow: var(--shadow-card);
}
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-no { font-size: 12.5px; color: var(--ink-2); letter-spacing: .04em; }
.card-conf { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.card.is-skipped { opacity: .55; background: #fbf9f3; }
.card.is-error { border-color: var(--bad-line); box-shadow: 0 0 0 3px rgba(169, 80, 58, .08); }

.warn {
  margin: 0 0 10px; padding: 7px 11px; border-radius: 9px;
  background: var(--warn-bg); color: var(--warn); font-size: 12.5px;
}

label.field { display: block; font-size: 12px; color: var(--ink-2); margin: 10px 0 5px; letter-spacing: .02em; }
textarea, input[type="text"], input[type="password"], input[type="url"], select {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--ink);
  background: #fffefb; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  transition: border-color .14s ease, box-shadow .14s ease;
}
textarea { min-height: 66px; line-height: 1.65; resize: vertical; }
textarea:focus, input:focus, select:focus { outline: none; border-color: #b9c0ef; box-shadow: 0 0 0 3px var(--accent-soft); }

.opts { display: grid; gap: 8px; margin-top: 6px; }
.opt { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; }
.opt-letter { font-weight: 600; color: var(--ink-2); font-size: 12.5px; text-align: center; }

.pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pick-label { font-size: 12px; color: var(--ink-2); min-width: 62px; }
.pill {
  border: 1px solid var(--line); background: #fffefb; color: var(--ink-2);
  font: inherit; font-size: 13px; padding: 5px 13px; border-radius: 999px; cursor: pointer;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.pill:hover { border-color: #b9c0ef; color: var(--accent); }
.pill.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill.is-bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.pickhint { margin: 8px 0 0; font-size: 12.5px; color: var(--warn); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.skipbtn {
  margin-left: auto; border: 1px solid var(--line); background: #fffefb; color: var(--ink-3);
  font: inherit; font-size: 11.5px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  transition: color .12s ease, border-color .12s ease, background-color .12s ease;
}
.skipbtn:hover { color: var(--accent); border-color: #b9c0ef; }
.card.is-skipped .skipbtn { color: var(--accent); border-color: #c4cbee; background: var(--accent-soft); }

.savebar {
  position: sticky; bottom: 84px; margin-top: 18px; padding: 12px 0 14px;
  background: linear-gradient(to bottom, rgba(248, 245, 238, 0), var(--paper) 45%);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
button.primary {
  border: 0; border-radius: 12px; padding: 12px 20px; cursor: pointer;
  font: inherit; font-size: 14.5px; color: #fff;
  background: linear-gradient(180deg, #5a68ea, #4150d8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 20px -14px rgba(67, 81, 207, .85);
  transition: filter .12s ease, transform .08s ease;
}
button.primary:hover { filter: brightness(1.05); }
button.primary:active { transform: translateY(1px); }
button.primary[disabled] { opacity: .5; cursor: default; filter: none; }

/* ---------------- 重做 ---------------- */
.duebox { display: flex; align-items: baseline; gap: 10px; margin: 16px 0; }
.due-num { font-family: Georgia, serif; font-size: 42px; line-height: 1; letter-spacing: -.01em; }

.quiz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.qstem {
  font-family: "Songti SC", Georgia, serif; font-size: 21px; line-height: 1.95;
  margin: 4px 0 20px; letter-spacing: .01em; white-space: pre-line;
}
.qopts { display: grid; gap: 10px; }
.qopt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: #fffefb; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px;
  font: inherit; font-size: 16px; color: var(--ink); cursor: pointer;
  box-shadow: inset 0 1px 0 #fff, 0 2px 4px -2px rgba(120, 105, 80, .18);
  transition: border-color .12s ease, background-color .12s ease;
}
.qopt:hover:not(:disabled) { border-color: #c4cbee; background: #fbfaff; }
.qopt:disabled { cursor: default; }
.qletter {
  flex: 0 0 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  background: linear-gradient(180deg, #fdfbf5, #f2ecdf); border: 1px solid #e4dbc9;
}
.qopt.is-right { border-color: var(--ok-line); background: var(--ok-bg); }
.qopt.is-right .qletter { background: var(--ok); border-color: transparent; color: #fff; }
.qopt.is-wrong { border-color: var(--bad-line); background: var(--bad-bg); }
.qopt.is-wrong .qletter { background: var(--bad); border-color: transparent; color: #fff; }

.feedback { margin-top: 18px; padding: 15px 16px; border-radius: 13px; font-size: 14px; }
.feedback.good { background: var(--ok-bg); border: 1px solid var(--ok-line); }
.feedback.bad { background: var(--bad-bg); border: 1px solid var(--bad-line); }
.fb-line { font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.feedback.good .fb-line { color: var(--ok-text); }
.feedback.bad .fb-line { color: var(--bad); }
.fb-body p { margin: 6px 0; color: var(--ink-2); line-height: 1.8; }
.fb-body b { color: var(--ink); font-weight: 600; margin-right: 8px; }
.quiz-foot { margin-top: 18px; }

.done-title { font-family: "Songti SC", Georgia, serif; font-size: 21px; margin: 8px 0 16px; }
.done-stats, .statgrid { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 16px; }
.metric { display: flex; flex-direction: column; gap: 3px; }
.mnum { font-family: Georgia, serif; font-size: 28px; font-weight: 500; line-height: 1.15; }

/* ---------------- 错题本 ---------------- */
.listhead { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 14px; }
.list { display: grid; gap: 12px; }
.item {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 16px; box-shadow: var(--shadow-card);
}
.item-head { display: flex; align-items: flex-start; gap: 8px; }
.item-stem { font-size: 15px; line-height: 1.7; margin: 0 0 8px; white-space: pre-line; flex: 1; min-width: 0; }
.item-opts { color: var(--ink-2); font-size: 13.5px; display: grid; gap: 2px; margin-bottom: 10px; }
.item-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); align-items: center; }
.badge { padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: #3b4699; font-size: 11.5px; }
.explain { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 11px; font-size: 13.5px; color: var(--ink-2); }
.explain p { margin: 5px 0; line-height: 1.8; }
.explain b { color: var(--ink); font-weight: 600; margin-right: 8px; }
.editbtn {
  flex: 0 0 auto; border: 0; background: transparent; color: var(--ink-3); font: inherit; font-size: 12.5px;
  padding: 4px 8px; border-radius: 8px; cursor: pointer;
  transition: color .12s ease, background-color .12s ease;
}
.editbtn:hover { color: var(--accent); background: var(--accent-soft); }

/* ---------------- 数据 ---------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.tbl th { color: var(--ink-3); font-weight: 500; font-size: 12px; letter-spacing: .04em; }

/* ---------------- 编辑弹层 ---------------- */
.modal { position: fixed; inset: 0; background: rgba(30, 26, 20, .34); display: grid; place-items: center; z-index: 80; padding: 16px; }
.sheet {
  background: var(--paper-2); border-radius: 16px; padding: 20px; width: min(96vw, 580px);
  max-height: 88vh; overflow: auto; box-shadow: 0 30px 60px -30px rgba(60, 50, 35, .5);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-foot { display: flex; gap: 10px; margin-top: 18px; align-items: center; flex-wrap: wrap; }
.plainbtn {
  border: 1px solid var(--line); background: #fffefb; color: var(--ink-2); font: inherit; font-size: 13px;
  padding: 8px 15px; border-radius: 10px; cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.plainbtn:hover { color: var(--accent); border-color: #c4cbee; }

/* ---------------- 提示条 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 13px;
  background: #26241f; color: #fff; font-size: 13.5px; line-height: 1.55;
  box-shadow: 0 14px 34px rgba(40, 34, 24, .3); z-index: 90;
  animation: toast-in .16s ease-out;
}
.toast.ok { background: #245c43; }
.toast.err { background: #8f3a2b; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------------- 口令页 ---------------- */
.gate { width: 100%; max-width: 340px; padding: 0 16px; text-align: center; }
.gate h1 { font-family: "Songti SC", Georgia, serif; font-size: 20px; margin: 0 0 6px; }
.gate p { color: var(--ink-3); font-size: 13px; margin: 0 0 18px; }
.gate input { text-align: center; letter-spacing: .2em; font-size: 18px; }
.gate button { width: 100%; margin-top: 12px; }
#err { color: var(--bad); font-size: 13px; min-height: 20px; margin-top: 10px; }

/* ---------------- 手机：导航沉到底部 ---------------- */
@media (max-width: 899px) {
  .top {
    top: 0; margin: 0; border-radius: 0; height: 56px;
    background: rgba(251, 248, 241, .97);
    /* 这里不能用 backdrop-filter：它会让内部 position:fixed 的底部导航以顶栏为参照 */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 0 rgba(140, 128, 105, .14);
    padding: 0 16px;
  }
  .topstatus { display: none; }
  .wordmark span { display: none; }
  .tabs {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50;
    justify-content: space-between; gap: 1px; padding: 5px;
    border-radius: 18px; overflow: visible;
    background: linear-gradient(180deg, rgba(255, 253, 246, .86), rgba(250, 246, 236, .74));
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .9),
      0 0 0 .5px rgba(140, 128, 105, .16),
      0 12px 26px -16px rgba(70, 60, 45, .5);
  }
  .tab {
    flex: 1 1 0; flex-direction: column; gap: 3px; padding: 7px 4px;
    font-size: 10.5px; border-radius: 13px; justify-content: center;
  }
  .tab svg { width: 18px; height: 18px; }
  .tab.is-on { box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(60, 50, 90, .1); }
  .shell { padding: 16px 16px 108px; gap: 0; }
  .hero-title { font-size: 26px; }
  .cta-num { font-size: 32px; }
  .home-stats { gap: 8px; }
  .row2 { grid-template-columns: 1fr; }
  .savebar { bottom: 84px; }
  .toast { bottom: 100px; }
  .qstem { font-size: 19px; }
  .sheet { width: 96vw; padding: 16px; }
}

/* ---------------- 宽屏：桌面双栏 ---------------- */
@media (min-width: 1024px) {
  .shell { grid-template-columns: 320px 1fr; align-items: start; padding-top: 26px; }
  .rail {
    display: flex; flex-direction: column; gap: 0;
    position: sticky; top: 92px;
    background: var(--paper-2); border: 1px solid var(--line); border-radius: 18px;
    padding: 20px 20px 16px; box-shadow: var(--shadow-card);
  }
  .rail .kicker { font-size: 10.5px; letter-spacing: .22em; color: var(--ink-3); margin: 0 0 14px; }
  .rail-ring { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
  .rail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
  .rm {
    background: #fbf8f1; border: 1px solid var(--line-soft); border-radius: 11px; padding: 9px 10px;
  }
  .rm b { display: block; font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
  .rm span { font-size: 11px; color: var(--ink-3); }
  .rail-label { font-size: 10.5px; letter-spacing: .22em; color: var(--ink-3); margin: 0 0 8px; }
  .rail-list { display: grid; }
  .rail-list .ri {
    display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-top: 1px dashed var(--line-soft);
    font-size: 12.5px;
  }
  .rail-list .ri:first-child { border-top: 0; }
  .rail-list .ri .s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
  .rail-list .ri .t { font-size: 10.5px; color: #4a5699; background: #f1f2fa; border-radius: 999px; padding: 1px 7px; }
  .rail-foot {
    display: flex; justify-content: space-between; margin-top: 16px; padding-top: 12px;
    border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--ink-3);
  }
  /* 宽屏时首页里重复的块交给左栏，不再重复显示 */
  .home-ring-row, .home-stats { display: none; }
  .rail-list, .rail-label { display: none; }
  .hero-title { font-size: 32px; }
  .home-main { grid-template-columns: 1fr 300px; align-items: stretch; }
  .cta-ghost { align-items: center; }
  .home-main .cta-ghost { display: flex; }
}

/* 首页：按知识点（真实统计，填满桌面下半屏） */
.home-more { margin-top: 26px; }
.topic-list { display: grid; gap: 10px; }
.topic-row { display: grid; grid-template-columns: 132px 1fr 74px; gap: 12px; align-items: center; font-size: 13px; }
.topic-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-bar { height: 6px; border-radius: 99px; background: #ede7da; overflow: hidden; }
.topic-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5a68ea, #4150d8); }
.topic-rate { text-align: right; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .topic-row { grid-template-columns: 96px 1fr 62px; } }

/* 最近录的：来源与日期靠右，桌面限宽 */
.recent-item .r-src { flex: 0 0 auto; font-size: 11px; color: var(--ink-3); }
.rail-ring.is-zero .ring { opacity: .45; }
/* 左栏这句是两行：主句 + 说明，别粘成一行 */
.rail .hint em, .ring-copy .hint em { display: block; font-style: normal; font-size: 11.5px; margin-top: 3px; }
@media (min-width: 1024px) {
  .home-recent { max-width: 760px; }
  .recent-item { gap: 12px; }
}

/* ================= 知识点 ================= */
.crumb { font-size: 10.5px; letter-spacing: .2em; color: var(--ink-3); margin: 0 0 8px; }
.topic-cards { display: grid; gap: 12px; }
.tcard {
  display: block; width: 100%; text-align: left; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px;
  box-shadow: var(--shadow-card); cursor: pointer; font: inherit; color: var(--ink);
  transition: border-color .14s ease, transform .12s ease;
}
.tcard:hover { border-color: #c9cef0; transform: translateY(-1px); }
.tcard-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.tcard-name { font-size: 16px; font-weight: 600; }
.tcard-n { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.tcard-bar { height: 5px; border-radius: 99px; background: #ede7da; overflow: hidden; margin: 10px 0 8px; }
.tcard-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg,#5a68ea,#4150d8); }
.tcard-meta { display: flex; gap: 12px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.tcard-meta b { color: var(--ink-2); font-weight: 500; }

.topic-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.topic-head h2 { font-family: "Songti SC", Georgia, serif; font-size: 30px; font-weight: 500; margin: 0; }
.pmeta { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-3); padding-bottom: 5px; }
.pmeta b { color: var(--ink-2); font-weight: 500; }
.topic-actions { margin-left: auto; padding-bottom: 3px; }

.kptabs { position: relative; display: flex; gap: 2px; margin: 20px 0 18px; padding: 5px; border-radius: 15px; width: fit-content;
  background: rgba(255,255,255,.5); box-shadow: inset 0 0 0 .5px rgba(140,128,105,.16), inset 0 1px 2px rgba(90,78,60,.06); }
.kp-pill { position: absolute; top: 5px; height: calc(100% - 10px); left: 0; width: 0; border-radius: 11px; z-index: 0;
  background: linear-gradient(180deg,#fff,#fbf8f1);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 .5px rgba(140,128,105,.16), 0 4px 10px -7px rgba(67,81,207,.5);
  transition: transform .36s cubic-bezier(.22,1,.36,1), width .36s cubic-bezier(.22,1,.36,1); }
.kt { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; border: 0; background: transparent;
  color: #6f6a60; font: inherit; font-size: 13.5px; padding: 9px 14px; border-radius: 11px; cursor: pointer; white-space: nowrap; }
.kt i { font-style: normal; font-family: Georgia, serif; font-size: 11px; color: var(--ink-3); }
.kt em { font-style: normal; font-size: 10.5px; color: #fff; background: var(--ink-3); border-radius: 99px; padding: 1px 6px; }
.kt.on { color: var(--ink); font-weight: 500; }
.kt.on i { color: var(--accent); }
.kt.on em { background: var(--accent); }

.kp-panel { animation: kp-in .26s cubic-bezier(.22,1,.36,1) both; }
@keyframes kp-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.kp-block { background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow-card); }
.kp-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.kp-num { font-family: Georgia, serif; font-size: 11.5px; color: var(--ink-3); letter-spacing: .1em; }
.kp-title { font-size: 15px; font-weight: 600; }
.kp-aside { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.tldr { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; padding: 12px 16px;
  border-radius: 11px; background: #f4f6fd; border-left: 2px solid #c9d0f0; }
.tldr span { font-size: 10.5px; letter-spacing: .18em; color: #7c86b8; flex: 0 0 auto; }
.tldr b { font-size: 15px; font-weight: 600; }
.sblock { margin-bottom: 18px; }
.sblock:last-child { margin-bottom: 0; }
.slabel { font-size: 11px; letter-spacing: .16em; color: var(--ink-3); margin: 0 0 6px; }
.sbody { font-size: 14.5px; line-height: 1.95; color: var(--ink-2); margin: 0; max-width: 76ch; }
.trap { margin-top: 10px; border-left: 2px solid #d9c39a; background: #fdf8ec; border-radius: 0 10px 10px 0;
  padding: 9px 14px; font-size: 13px; color: #7a5f2c; line-height: 1.8; }
.steps { display: grid; gap: 12px; counter-reset: s; }
.step { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.step::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; border-radius: 50%;
  background: #f1f2fa; color: #4a5699; font-size: 11.5px; display: grid; place-items: center; font-family: Georgia, serif; }
.step b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.step p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.85; }

.kp-q { border-top: 1px solid var(--line-soft); padding: 16px 0 4px; }
.kp-q:first-child { border-top: 0; padding-top: 2px; }
.kp-qhead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.kp-qidx { font-family: Georgia, serif; font-size: 11.5px; color: var(--ink-3); letter-spacing: .1em; }
.kp-qmeta { font-size: 11px; color: var(--ink-3); }
.kp-qstem { font-family: "Songti SC", Georgia, serif; font-size: 16.5px; line-height: 1.95; margin: 0 0 10px; white-space: pre-line; }
.kp-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 18px; font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.kp-opt { display: grid; grid-template-columns: 14px 1fr; gap: 8px; }
.kp-opt i { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.kp-opt.ok { color: var(--ok); font-weight: 600; }
.kp-opt.bad { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; }
.kp-why { font-size: 13.5px; color: var(--ink-2); border-left: 2px solid var(--bad-line); padding: 2px 0 2px 14px; margin: 0 0 10px; line-height: 1.85; }
.kp-why span, .kp-exp span { font-size: 10.5px; letter-spacing: .14em; color: var(--ink-3); margin-right: 10px; }
.kp-why span { color: var(--bad); }
.kp-exp { font-size: 13.5px; color: var(--ink-2); line-height: 1.9; margin: 0; }
.empty { padding: 22px 0; text-align: center; color: var(--ink-2); font-size: 14px; line-height: 1.9; }
.rel { display: grid; }
.rel-item { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--ink-2); }
.rel-item:first-child { border-top: 0; }
.rel-item .s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 10.5px; border-radius: 99px; padding: 2px 8px; border: 1px solid; flex: 0 0 auto; }
.tag.mine { color: #3b4699; border-color: #c9cef0; background: #f1f2fa; }
.tag.ai { color: var(--ink-3); border-color: var(--line); background: #fbf9f3; }
.kp-foot { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

@media (max-width: 899px) {
  .topic-head h2 { font-size: 24px; }
  .topic-actions { margin-left: 0; width: 100%; }
  .topic-actions .primary { width: 100%; }
  .kptabs { overflow-x: auto; max-width: 100%; }
  .kp-opts { grid-template-columns: 1fr; }
  .kp-block { padding: 16px; }
}

/* 品牌可点：回到首页 */
a.brand { text-decoration: none; color: inherit; border-radius: 12px; padding: 4px 6px; margin: -4px -6px;
  transition: background-color .14s ease; }
a.brand:hover { background: rgba(255, 255, 255, .45); }

/* 页脚：每个页面都有，通向作品集 */
.site-foot {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; justify-content: center;
  margin: 34px 0 0; padding-top: 16px; border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--ink-3); letter-spacing: .02em;
}
.site-foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid transparent;
  transition: color .14s ease, border-color .14s ease; }
.site-foot a:hover { color: var(--accent); border-color: #c9cef0; }
.gate-foot { margin: 22px 0 0; font-size: 12px; }
.gate-foot a { color: var(--ink-3); text-decoration: none; border-bottom: 1px solid var(--line); }
.gate-foot a:hover { color: var(--accent); }
@media (max-width: 899px) { .site-foot { margin-top: 22px; } }
