/* =========================================================================
   暖纸书房主题 · meta 界面专用（战斗画面不受影响）
   用法：所有非战斗屏统一包一层 .camp，变量在作用域内覆盖战斗默认冷灰主题。
   配色：米纸底 + 暖白卡片 + 墨黑文字 + 青墨绿主色 + 琥珀金点亮色。
   字体：标题衬线（书卷气），正文无衬线。
   ========================================================================= */

.camp {
  --bg: #FAF6EF;            /* 米纸 */
  --panel: #FFFDF8;         /* 暖白卡片 */
  --panel-soft: #F3EDE0;    /* 次面板 */
  --line: #E5DCC9;          /* 分隔线（纸边） */
  --ink: #2B2620;           /* 墨黑 */
  --ink-soft: #6B6258;      /* 灰墨 */
  --accent: #3A6B5C;        /* 青墨绿 */
  --accent-soft: rgba(58,107,92,.12);
  --accent-deep: #2C5548;
  --amber: #D9A441;         /* 琥珀金（点亮专用） */
  --gold: #E8B84B;
  --danger: #B5542F;
  --shadow-sm: 0 1px 3px rgba(64,50,25,.08);
  --shadow: 0 6px 20px rgba(64,50,25,.12);

  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #fff;
  color: var(--ink);
}
.camp h1, .camp h2, .camp .sm-title, .camp .ph-title, .camp .pj-title, .camp .db-title, .camp .ig-title {
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  letter-spacing: .5px;
}
.camp button { font-family: inherit; }

/* ================= 立项仪式 ================= */
.pj { display: flex; align-items: center; justify-content: center; padding: 20px 14px; min-height: 100%; }
.pj-card {
  width: 100%; max-width: 460px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 24px 20px; box-shadow: var(--shadow);
}
.pj-kicker {
  display: inline-block; background: var(--accent); color: #F5EFE2; font-weight: 800;
  padding: 4px 14px; border-radius: 999px; font-size: 12px; letter-spacing: 1px; margin-bottom: 12px;
}
.pj-title { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.pj-lead { color: var(--ink-soft); font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.pj-field { margin-bottom: 14px; }
.pj-field label { display: block; font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.pj-field label small { color: var(--ink-soft); font-weight: 600; }
.pj-field input, .pj-field textarea {
  width: 100%; background: #FBF7EE; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 13px; font-family: inherit; font-size: 14px; color: var(--ink); resize: vertical;
}
.pj-field input:focus, .pj-field textarea:focus { outline: none; border-color: var(--accent); }
.pj-field input.pj-err { border-color: var(--danger); }
.pj-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.pj-chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--panel-soft); transition: .12s;
}
.pj-chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.pj-actions { display: flex; gap: 10px; margin-top: 18px; }
.pj-skip {
  flex: 1; border: 1.5px solid var(--line); background: transparent; color: var(--ink-soft);
  border-radius: 14px; padding: 12px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.pj-go {
  flex: 2; border: none; background: linear-gradient(180deg, var(--gold), var(--amber));
  color: #3A2A08; border-radius: 14px; padding: 12px; font-size: 15px; font-weight: 900; cursor: pointer;
  box-shadow: 0 4px 0 #B8892F;
}
.pj-go:active { transform: translateY(2px); box-shadow: 0 2px 0 #B8892F; }
.pj-tier { display: flex; gap: 8px; }
.pj-tier-static {
  display: block; width: 100%; padding: 11px 13px; font-size: 13px; line-height: 1.6; font-weight: 600;
  border: 1.5px dashed var(--amber); background: var(--accent-soft); color: var(--accent-deep);
  border-radius: 12px;
}

/* ================= 战前：位置导航条 / 上次回顾 / 对话体 ================= */
.sd-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--accent); color: #F0EBDD; border-radius: 12px; padding: 9px 13px;
  font-size: 12.5px; font-weight: 800; margin: 10px 0;
}
.sd-nav span { font-weight: 600; opacity: .8; font-size: 11.5px; }
.sd-recall {
  background: linear-gradient(90deg, rgba(217,164,65,.16), rgba(217,164,65,.05));
  border-left: 3px solid var(--amber); border-radius: 8px; padding: 8px 12px;
  font-size: 12.5px; color: var(--ink); margin-bottom: 10px;
}
.sd-dialog { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
/* 对话气泡：整行（含头像）作为一个白色卡片，hover 时加亮外框包围头像+文字 */
.dlg-row {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid transparent; border-radius: 12px;
  padding: 10px 12px; transition: all .15s ease;
}
.dlg-row:hover {
  background: #F7F8FA; border-color: #E5E5E5;
  transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.06);
}
.dlg-avatar {
  flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-size: 17px; background: #F2F3F5; border: 1px solid #E5E5E5;
}
.dlg-bubble {
  background: transparent; border: none; border-radius: 0;
  padding: 0; box-shadow: none; max-width: 85%; flex: 1 1 auto;
}
.dlg-bubble small { display: block; font-size: 10.5px; color: #999; font-weight: 700; margin-bottom: 2px; }
.dlg-bubble p { font-size: 13.5px; line-height: 1.65; white-space: pre-line; margin: 0; }
.dlg-you { flex-direction: row-reverse; }
.dlg-you .dlg-avatar { background: #E9F2EC; border-color: rgba(58,107,92,.25); }
.dlg-enemy .dlg-avatar { background: #FBF1E2; border-color: rgba(217,164,65,.40); }
/* 刚显示出来的对话气泡：默认高亮框（.is-current），往上滚离开视口后由 JS 移除 */
.dlg-row.is-current {
  background: #F7F8FA; border-color: #E5E5E5;
  box-shadow: 0 6px 16px rgba(0,0,0,.06); transform: translateY(-2px);
}

/* 阅读/听书 子页面切换 Tab */
.study-tabs {
  flex: 0 0 auto; margin-left: auto; display: inline-flex; gap: 2px;
  background: var(--panel-soft); border: 1.5px solid var(--line); border-radius: 11px;
  padding: 3px;
}
.study-tab {
  border: none; background: transparent; color: var(--ink-soft); font-size: 13.5px; font-weight: 700;
  padding: 5px 13px; border-radius: 8px; cursor: pointer; transition: .12s; white-space: nowrap;
}
.study-tab:hover { color: var(--ink); }
.study-tab.on {
  background: linear-gradient(180deg, var(--gold), var(--amber)); color: #3A2A08;
  box-shadow: 0 2px 0 #B8892F;
}
/* 两个可切换子页面（阅读 / 听书）：.study 为 flex 列容器，子页各自占满并内部控制滚动 */
.study-pane {
  display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.study-pane[data-pane="read"] { padding-bottom: 28px; }
.study-pane[data-pane="listen"] { display: none; overflow: hidden; padding: 12px 14px 16px; }

/* ================= 听全书页（学习地图 → 🎧 听全书：整本书连播） ================= */
.camp.study.listenall { padding: 0 16px; }
.la-head { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.la-title { font-size: 15px; font-weight: 800; color: var(--accent); }
.la-sub {
  font-size: 11.5px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.la-count {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 800; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.la-pane {
  display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto;
  overflow: hidden; padding: 12px 0 16px;
}

/* 续播询问：进页面先问一句「继续上次收听？」，不静默接管播放位置 */
.la-resume-mask {
  position: absolute; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 24px;
  background: rgba(43, 38, 32, .42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.la-resume {
  width: 100%; max-width: 330px; padding: 22px 20px 18px; text-align: center;
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 18px;
  box-shadow: 0 20px 50px rgba(120, 80, 50, .28);
}
.la-resume-ico { font-size: 34px; line-height: 1; }
.la-resume-h { font-size: 17px; font-weight: 800; color: var(--ink); margin: 8px 0 6px; }
.la-resume-p { font-size: 13px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 16px; }
.la-resume-p b { display: block; margin-top: 4px; font-size: 14px; color: var(--ink); }
.la-resume-p span {
  display: block; margin-top: 2px; font-weight: 800; color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}
.la-resume-acts { display: flex; flex-direction: column; gap: 9px; }
.la-resume-yes, .la-resume-no {
  border-radius: 13px; padding: 12px; font-size: 14.5px; font-weight: 800;
  cursor: pointer; font-family: inherit; transition: .12s;
}
.la-resume-yes {
  border: none; background: linear-gradient(180deg, var(--gold), var(--amber));
  color: #3A2A08; box-shadow: 0 4px 0 #B8892F;
}
.la-resume-yes:active { transform: translateY(2px); box-shadow: 0 2px 0 #B8892F; }
.la-resume-no { border: 1.5px solid var(--line); background: transparent; color: var(--ink-soft); }
.la-resume-no:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ================= 听书子页（嵌入学习页，单页有声书） ================= */
.ab-mounted { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ab-panel {
  flex: 1; min-height: 0; background: var(--bg); border-radius: 16px;
  border: 1.5px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.08);
  display: flex; flex-direction: column; overflow: hidden;
}
.ab-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1.5px solid var(--line); background: var(--panel);
}
.ab-title { font-family: var(--serif, serif); font-size: 16px; font-weight: 700; color: var(--accent); }
.ab-nav {
  flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--panel); color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: .12s;
}
.ab-nav:hover:not([disabled]) { border-color: var(--accent); background: rgba(217,164,65,.12); }
.ab-nav[disabled] { opacity: .35; cursor: not-allowed; }
.ab-pos {
  flex: 0 0 auto; padding: 5px 16px; font-size: 12px; color: var(--ink-soft); background: var(--panel-soft);
  border-bottom: 1.5px solid var(--line); font-variant-numeric: tabular-nums;
}
.ab-loading { padding: 28px 16px; text-align: center; color: var(--ink-soft); font-size: 14px; }
/* 自动播放被浏览器拦下时的兜底入口：一条可点的提示（任意手势也会自动续播） */
.ab-blocked {
  flex: 0 0 auto; width: 100%; border: none; border-top: 1.5px solid var(--line);
  background: rgba(217, 164, 65, .14); color: var(--accent-deep);
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  padding: 10px 16px; cursor: pointer; text-align: center; transition: .12s;
}
.ab-blocked:hover { background: rgba(217, 164, 65, .24); }
.ab-blocked b { color: var(--accent); }
.ab-player {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--panel-soft); border-bottom: 1.5px solid var(--line);
}
.ab-play {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 18px; cursor: pointer; transition: .12s;
}
.ab-play:hover { background: #2f5849; }
.ab-prog { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.ab-prog > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--amber)); }
.ab-time { flex: 0 0 auto; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ab-speed { position: relative; flex: 0 0 auto; }
.ab-speed-btn {
  min-width: 46px; height: 34px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--panel); color: var(--accent); font-size: 13px; font-weight: 800; cursor: pointer;
  font-variant-numeric: tabular-nums; transition: .12s;
}
.ab-speed-btn:hover { border-color: var(--accent); }
.ab-speed-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: flex; flex-direction: column;
  gap: 2px; padding: 6px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.16); min-width: 78px;
}
.ab-speed-menu[hidden] { display: none; }
.ab-speed-opt {
  border: none; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer;
  text-align: left; padding: 7px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; transition: .1s;
}
.ab-speed-opt:hover { background: var(--panel-soft); }
.ab-speed-opt.on { background: rgba(217,164,65,.16); color: var(--accent-deep); }
.ab-transcript {
  flex: 1; overflow-y: auto; padding: 16px 20px; line-height: 1.9; font-size: 16px;
  color: var(--ink-soft);
}
.ab-sent {
  margin: 0 0 14px; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  transition: background .2s, color .2s; border-left: 3px solid transparent;
}
.ab-sent:hover { background: var(--panel-soft); }
.ab-sent.ab-cur {
  background: linear-gradient(90deg, rgba(217,164,65,.16), rgba(217,164,65,.04));
  color: var(--ink); border-left-color: var(--amber);
  box-shadow: 0 0 0 1px rgba(217,164,65,.25);
}
.ab-empty {
  margin: auto; padding: 28px 20px; text-align: center; color: var(--ink-soft); font-size: 14px; line-height: 1.7;
}

/* ================= 实操验证题型引擎 ================= */
.ix-box { margin-top: 4px; }
.ix-q { font-weight: 800; font-size: 14.5px; line-height: 1.6; margin-bottom: 12px; color: var(--ink); }
.ix-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: 13px;
  padding: 11px 13px; margin-bottom: 8px; cursor: pointer; transition: .12s;
  font-size: 13.5px; font-weight: 600; line-height: 1.45; color: var(--ink);
}
.ix-opt:hover { border-color: var(--accent); }
.ix-opt .ix-oc {
  flex: 0 0 26px; height: 26px; border-radius: 8px; background: var(--panel-soft);
  display: grid; place-items: center; font-weight: 900; font-size: 13px; color: var(--ink-soft);
}
.ix-opt .ix-ot { flex: 1; }
.ix-opt.ok { border-color: #4CA572; background: #E6F4EA; }
.ix-opt.ok .ix-oc { background: #4CA572; color: #fff; }
.ix-opt.no { border-color: #E56A88; background: #FBE7EC; }
.ix-opt.no .ix-oc { background: #E56A88; color: #fff; }
.ix-opt.locked { pointer-events: none; opacity: .85; }
.ix-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ix-btn {
  border: none; background: linear-gradient(180deg, var(--gold), var(--amber)); color: #3A2A08;
  border-radius: 12px; padding: 11px 20px; font-size: 14px; font-weight: 900; cursor: pointer;
  box-shadow: 0 3px 0 #B8892F;
}
.ix-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #B8892F; }
.ix-btn.ghost { background: var(--panel-soft); color: var(--ink-soft); box-shadow: 0 3px 0 #D8CFBB; }
.ix-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.ix-chip {
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); transition: .12s;
}
.ix-chip.sel { border-color: var(--amber); background: rgba(217,164,65,.14); outline: 2px solid rgba(217,164,65,.4); }
.ix-bins { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ix-bin { border-radius: 13px; padding: 10px; min-height: 88px; border: 2px dashed var(--line); cursor: pointer; }
.ix-bin.b0 { border-color: #3E8E5A; background: rgba(62,142,90,.05); }
.ix-bin.b1 { border-color: var(--danger); background: rgba(181,84,47,.04); }
.ix-bin-h { font-weight: 800; font-size: 12.5px; margin-bottom: 7px; }
.ix-bin.b0 .ix-bin-h { color: #2C6E42; }
.ix-bin.b1 .ix-bin-h { color: var(--danger); }
.ix-bin-items { display: flex; flex-direction: column; gap: 5px; }
.ix-placed {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px;
  font-size: 12px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 6px;
}
.ix-placed.good { background: rgba(62,142,90,.12); border-color: rgba(62,142,90,.35); }
.ix-placed.bad { background: rgba(181,84,47,.12); border-color: rgba(181,84,47,.35); }
.ix-placed .ix-rm { cursor: pointer; color: var(--danger); font-size: 13px; }
.ix-field { margin-bottom: 10px; }
.ix-field label { display: block; font-weight: 800; font-size: 12.5px; margin-bottom: 5px; color: var(--ink); }
.ix-field textarea {
  width: 100%; background: #FBF7EE; border: 1.5px solid var(--line); border-radius: 11px;
  padding: 10px 12px; font-family: inherit; font-size: 13.5px; color: var(--ink); resize: vertical;
}
.ix-field textarea:focus { outline: none; border-color: var(--accent); }

/* ================= 认知解锁 ================= */
.lg-box {
  text-align: center; background: linear-gradient(180deg, rgba(217,164,65,.18), rgba(217,164,65,.06));
  border: 1px solid rgba(217,164,65,.45); border-radius: 18px; padding: 22px 18px;
  animation: lgIn .4s ease;
}
@keyframes lgIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.lg-ico { font-size: 40px; display: block; margin-bottom: 6px; animation: lgBob 2s infinite; }
@keyframes lgBob { 50% { transform: translateY(-6px); } }
.lg-t { font-weight: 900; color: #8A6410; font-size: 16px; }
.lg-d { color: var(--ink); font-size: 13.5px; margin-top: 6px; line-height: 1.65; }
.lg-kn { margin-top: 10px; font-size: 12.5px; font-weight: 800; color: var(--accent-deep); }
.lg-box .ix-btn { margin-top: 14px; }
/* ================= 点亮仪式 ================= */
.ig { display: flex; align-items: center; justify-content: center; padding: 24px 14px; min-height: 100%; }
.ig-panel {
  width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 22px; padding: 26px 20px; box-shadow: var(--shadow); text-align: center;
  animation: lgIn .45s ease;
}
.ig-kicker {
  display: inline-block; background: rgba(217,164,65,.18); color: #8A6410; font-weight: 900;
  padding: 4px 14px; border-radius: 999px; font-size: 12px; letter-spacing: 1px; margin-bottom: 10px;
}
.ig-title { font-size: 22px; font-weight: 900; margin-bottom: 20px; }
.ig-chain { display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.ig-node { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ig-emoji {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  background: var(--panel-soft); border: 2px solid var(--line);
}
.ig-node.lit .ig-emoji {
  background: radial-gradient(circle at 35% 30%, #FFE9B0, var(--gold));
  border-color: var(--amber); box-shadow: 0 0 14px rgba(217,164,65,.55);
}
.ig-node.locked { opacity: .45; filter: grayscale(.6); }
.ig-node.new .ig-emoji { animation: igPulse 1.6s ease-in-out infinite; }
@keyframes igPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(217,164,65,.5); transform: scale(1); }
  50% { box-shadow: 0 0 26px rgba(217,164,65,.95); transform: scale(1.12); }
}
.ig-step { font-size: 11.5px; font-weight: 800; color: var(--ink-soft); }
.ig-node.lit .ig-step { color: #8A6410; }
.ig-line { width: 22px; height: 3px; border-radius: 3px; background: var(--line); margin: 0 2px 16px; }
.ig-line.lit { background: var(--amber); }
.ig-line.grow { animation: igGrow .9s ease both; }
@keyframes igGrow { from { transform: scaleX(0); opacity: .2; } to { transform: scaleX(1); opacity: 1; } }
.ig-caption { font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 14px; }
.ig-caption b { color: #8A6410; }
.ig-next {
  background: rgba(58,107,92,.08); border: 1px dashed rgba(58,107,92,.35); border-radius: 12px;
  padding: 10px 12px; font-size: 13px; color: var(--ink); margin-bottom: 16px;
}
.ig-conquer {
  background: linear-gradient(180deg, rgba(217,164,65,.16), rgba(217,164,65,.05));
  border: 1px solid rgba(217,164,65,.4); border-radius: 12px;
  padding: 12px 14px; font-size: 13.5px; line-height: 1.75; margin-bottom: 16px;
}
.ig-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ig-btn {
  border: none; background: linear-gradient(180deg, var(--gold), var(--amber)); color: #3A2A08;
  border-radius: 14px; padding: 12px 24px; font-size: 15px; font-weight: 900; cursor: pointer;
  box-shadow: 0 4px 0 #B8892F;
}
.ig-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #B8892F; }
.ig-btn.ghost { background: var(--panel-soft); color: var(--ink); box-shadow: 0 4px 0 #D8CFBB; }

/* ================= 备战间 ================= */
.db { padding: 14px 14px 28px; }
.db-head { text-align: center; padding: 6px 4px 12px; }
.db-kicker {
  display: inline-block; background: var(--accent-soft); color: var(--accent-deep); font-weight: 800;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; margin-bottom: 8px;
}
.db-title { font-size: 21px; font-weight: 900; }
.db-lead { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.6; }
.db-lead b { color: var(--ink); }
/* 敌方情报面板（备战间 · 选卡参考） */
.db-intel {
  text-align: left; background: #F7F2E6; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 12px;
}
.db-intel-head { font-size: 12.5px; font-weight: 900; color: var(--accent-deep); margin-bottom: 8px; }
.db-intel-boss {
  background: rgba(217,164,65,.1); border: 1px dashed rgba(217,164,65,.5); border-radius: 10px;
  padding: 8px 10px; margin-bottom: 8px;
}
.db-intel-boss-line { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.db-intel-boss-line b { font-size: 14px; }
.db-intel-tag { margin-left: auto; font-size: 10px; color: #A8761B; font-weight: 700; }
.db-intel-boss-desc { font-size: 11.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.6; }
.db-intel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 10px; }
/* 敌方僵尸卡片（与卡牌列表卡片风格统一） */
.db-intel-z {
  cursor: help; text-align: center; padding: 8px 6px; border-radius: 10px;
  background: #FDFAF2; border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.db-intel-z:hover { transform: translateY(-2px); border-color: var(--accent-deep); box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.db-intel-emoji { font-size: 24px; line-height: 1; }
.db-intel-z-name { font-size: 11.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.db-intel-z-stat { font-size: 9.5px; color: var(--ink-soft); }
.db-intel-tip { font-size: 11px; color: var(--ink-soft); background: rgba(58,107,92,.07); border-radius: 8px; padding: 6px 8px; line-height: 1.5; }
/* 全局卡片悬停提示气泡 */
.card-tip {
  position: fixed; z-index: 9999; pointer-events: none; max-width: 260px;
  background: #fffdf7; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; font-size: 12px; line-height: 1.5; color: var(--ink);
  box-shadow: 0 6px 18px rgba(0,0,0,.14); text-align: left;
}
.card-tip.hidden { display: none; }
.card-tip b { font-size: 13.5px; }
.card-tip small { display: block; color: var(--ink-soft); margin-top: 3px; }
.card-tip p { margin: 6px 0 0; color: var(--ink-soft); line-height: 1.6; }
.card-tip .tip-concept { color: var(--accent-deep); }
.card-tip .tip-weak { color: var(--accent-deep); font-weight: 600; }
.card-tip .tip-boss { color: #A8761B; font-style: italic; }
.db-slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin-bottom: 8px; }
.db-slot {
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 8px 2px 6px; text-align: center; cursor: pointer; position: relative; min-height: 74px;
}
.db-slot.empty { border-style: dashed; display: grid; place-items: center; color: var(--ink-soft); font-size: 11px; cursor: default; }
.db-slot.pinned { border-color: var(--amber); background: linear-gradient(180deg, #FFF7E2, var(--panel)); cursor: not-allowed; }
.db-lock { position: absolute; top: 2px; right: 4px; font-size: 10px; }
.db-slot-emoji { font-size: 22px; }
.db-slot-name { font-size: 10px; font-weight: 800; margin-top: 2px; line-height: 1.2; }
.db-slot-cost { font-size: 9px; color: var(--ink-soft); margin-top: 1px; }
.db-count { text-align: center; font-size: 12px; font-weight: 800; color: var(--ink-soft); margin-bottom: 12px; }
.db-count.ok { color: #2C6E42; }
.db-sec { font-size: 12.5px; font-weight: 800; margin-bottom: 8px; color: var(--ink); }
.db-pool { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.db-card {
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 4px 8px; text-align: center; cursor: pointer; transition: .12s;
}
.db-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.db-card.used { opacity: .35; cursor: not-allowed; }
.db-card.used:hover { transform: none; }
.db-card-emoji { font-size: 24px; }
.db-card-name { font-size: 11px; font-weight: 800; margin-top: 3px; }
.db-card-cost { font-size: 10px; color: var(--ink-soft); margin-top: 2px; }
.db-actions { display: flex; gap: 10px; }
.db-auto {
  flex: 1; border: 1.5px solid var(--line); background: var(--panel-soft); color: var(--ink);
  border-radius: 14px; padding: 12px; font-size: 14px; font-weight: 800; cursor: pointer;
}
.db-go {
  flex: 2; border: none; background: linear-gradient(180deg, var(--gold), var(--amber));
  color: #3A2A08; border-radius: 14px; padding: 12px; font-size: 15px; font-weight: 900; cursor: pointer;
  box-shadow: 0 4px 0 #B8892F;
}
.db-go:disabled { filter: grayscale(.6) brightness(.92); cursor: not-allowed; box-shadow: none; }
.db-go:not(:disabled):active { transform: translateY(2px); box-shadow: 0 2px 0 #B8892F; }

/* =========================================================================
   章末故事（chapterStory）· 卷首页排版
   金色顶线 → 居中题头（眉标 / 徽记 / 衬线标题 / 双线◆） → 左对齐正文 → 居中金句 → 尾注
   ========================================================================= */
.cs-card {
  position: relative; overflow: hidden;
  margin: 22px 2px 18px; padding: 22px 20px 18px;
  background: linear-gradient(180deg, #FFFDF8 0%, #FBF6EC 100%);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 3px 14px rgba(46, 42, 36, .07);
  animation: csIn .42s ease both;
}
@keyframes csIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* 顶部一道金线，像精装书的天头烫金 */
.cs-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: .85;
}
.cs-head { text-align: center; }
.cs-kicker {
  display: block; font-size: 10.5px; font-weight: 900; letter-spacing: .34em;
  color: var(--accent); opacity: .8;
}
.cs-badge { font-size: 26px; line-height: 1.25; margin-top: 6px; }
.cs-title {
  margin: 3px 0 0; font-size: 17.5px; font-weight: 900; color: var(--ink); letter-spacing: .6px;
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
}
.cs-rule { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 18px; }
.cs-rule i { width: 46px; height: 1px; background: linear-gradient(90deg, transparent, rgba(217,164,65,.85)); }
.cs-rule i:last-of-type { background: linear-gradient(270deg, transparent, rgba(217,164,65,.85)); }
.cs-rule span { font-size: 7px; color: var(--amber); }
/* 正文：宽松行距 + 层次灰阶，长段落也不压眼 */
.cs-body { text-align: left; }
.cs-p { margin: 0 0 14px; font-size: 14px; line-height: 1.95; color: var(--ink-soft); letter-spacing: .2px; }
.cs-p:last-child { margin-bottom: 0; }
.cs-p b { color: var(--accent-deep); font-weight: 800; }
.cs-scene { color: var(--ink); font-weight: 600; }
/* 金句：上下细金线夹一段居中衬线斜体，右下角一枚极淡引号水印 */
.cs-quote {
  position: relative; overflow: hidden;
  margin: 20px 0 0; padding: 15px 20px; text-align: center;
  border-top: 1px solid rgba(217,164,65,.5); border-bottom: 1px solid rgba(217,164,65,.5);
}
.cs-quote::before {
  content: '“'; position: absolute; right: 6px; bottom: -26px;
  font-family: Georgia, "Times New Roman", serif; font-size: 78px; line-height: 1;
  color: rgba(217,164,65,.15); pointer-events: none;
}
.cs-quote p {
  position: relative; margin: 0;
  font-family: Georgia, "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: 15px; line-height: 1.9; font-style: italic;
  color: var(--accent-deep); letter-spacing: .3px;
}
/* 尾注：两侧短线夹「第 N 章 · 完」 */
.cs-foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.cs-foot i { width: 26px; height: 1px; background: rgba(58,107,92,.28); }
.cs-foot span { font-size: 10.5px; font-weight: 800; letter-spacing: .28em; color: var(--accent); opacity: .65; }
/* 未解锁：预览两段 + 底部渐隐 + 锁提示 */
.cs-body-fade {
  max-height: 116px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
}
.cs-lock {
  margin-top: 14px; padding: 9px 12px; border-radius: 12px; text-align: center;
  background: rgba(58,107,92,.06); border: 1px dashed rgba(58,107,92,.38);
  color: var(--accent-deep); font-size: 12px; font-weight: 700; letter-spacing: .3px;
}
/* 窄屏：收紧留白，保持呼吸感 */
@media (max-width: 400px) {
  .cs-card { padding: 18px 15px 15px; }
  .cs-title { font-size: 16px; }
  .cs-p { font-size: 13.5px; }
}
/* 身份卡里的项目行 */
.sm-id-proj { font-size: 11.5px; color: #8A6410; font-weight: 700; margin-top: 3px; }

/* hl-kicker 副标题（实操验证步骤条用） */
.hl-kicker small { display: block; font-weight: 600; font-size: 11px; opacity: .75; margin-top: 2px; }

/* =========================================================================
   通用底部弹窗 · 多邻国风 Bottom Sheet
   - 居中信箱（≤ 480px）+ 圆角向上
   - 顶部 5 个简化大水花，入场到位时"啵啵"蹦出后放大消失
   ========================================================================= */
.bs-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  background: rgba(28, 40, 34, .42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: bsFadeIn .26s ease both;
  padding: 0 12px 0;
}
.bs-overlay.is-closing { animation: bsFadeOut .26s ease both; }

/* 无遮罩模式：学习页反馈框等，不置灰主页面、点击穿透到背景 */
.bs-overlay.bs-no-dim {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: none;
  pointer-events: none;          /* 让主页面可交互 */
}
.bs-overlay.bs-no-dim .bs-sheet {
  pointer-events: auto;          /* 弹窗自身仍可点击 */
}

.bs-sheet {
  position: relative;
  width: 100%; max-width: 480px;
  background: var(--panel);
  border-radius: 0;
  box-shadow: 0 -16px 44px rgba(20, 28, 40, .22);
  display: flex; flex-direction: column;
  max-height: 88vh;
  overflow: visible;       /* 让顶部水花溢出可见 */
  animation: bsSheetUp .42s cubic-bezier(.22, 1.4, .36, 1) both;
}
.bs-overlay.is-closing .bs-sheet { animation: bsSheetDown .28s ease both; }

/* 反馈弹窗整块底色，与对错色调统一 */
.bs-sheet.tone-ok { background: #E6F4EA; }
.bs-sheet.tone-no { background: #FBE7EC; }

.bs-grab {
  width: 44px; height: 5px; border-radius: 999px;
  background: var(--line);
  margin: 10px auto 4px;
}

.bs-head {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 10px;
  border-bottom: 1px solid var(--line);
}
.bs-title {
  flex: 1; margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  font-size: 17px; font-weight: 800; color: var(--ink);
  letter-spacing: .3px;
}
.bs-close {
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  background: var(--panel-soft); color: var(--ink-soft);
  font-size: 18px; font-weight: 700; cursor: pointer;
  transition: transform .12s ease;
}
.bs-close:active { transform: scale(.88); }

.bs-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 16px 28px;
}

@keyframes bsSheetUp {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}
@keyframes bsSheetDown {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(105%); opacity: .6; }
}
@keyframes bsFadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes bsFadeOut { from { opacity: 1 } to { opacity: 0 } }

/* =========================================================================
   底部弹窗顶部水花（多邻国 V2：8 颗有机水滴状水花，在滑上来的弹窗顶部边缘弹起后掉落消失）
   ========================================================================= */
.info-splash {
  position: absolute; left: -4px; right: -4px; top: -28px; height: 60px; z-index: 4;
  pointer-events: none; overflow: visible;
}
.info-cloud {
  position: absolute; bottom: 0;
  background: #A8F070;                 /* 多邻国亮绿水花 */
  opacity: 0;
  animation: waterPop .8s cubic-bezier(.22, .61, .36, 1) forwards;
  box-sizing: border-box;
}
.info-cloud-shape {
  width: 100%; height: 100%;
  background-size: cover;
  transform: rotate(var(--rot, 0deg));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M 50 0 C 70 0, 80 20, 80 40 C 80 60, 90 70, 70 80 C 50 90, 30 80, 20 60 C 10 40, 30 0, 50 0 Z' fill='%23A8F070'/%3E%3C/svg%3E");
}
/* 8 颗水花：错落分布 + 延迟，形成水花四溅 */
.info-cloud.d1 { left: 10%; width: 30px; height: 30px; animation-delay: .34s; --rot: 15deg; }
.info-cloud.d2 { left: 25%; width: 16px; height: 16px; animation-delay: .44s; --rot: -10deg; }
.info-cloud.d3 { left: 45%; width: 22px; height: 22px; animation-delay: .39s; --rot: 40deg; }
.info-cloud.d4 { left: 60%; width: 35px; height: 35px; animation-delay: .49s; --rot: -20deg; }
.info-cloud.d5 { left: 75%; width: 18px; height: 18px; animation-delay: .42s; --rot: 5deg; }
.info-cloud.d6 { left: 85%; width: 25px; height: 25px; animation-delay: .54s; --rot: -35deg; }
.info-cloud.d7 { left: 15%; width: 12px; height: 12px; animation-delay: .59s; --rot: 60deg; }
.info-cloud.d8 { left: 55%; width: 14px; height: 14px; animation-delay: .64s; --rot: -5deg; }

@keyframes waterPop {
  0%   { opacity: 0; transform: translateY(0)     scale(.3);  }
  15%  { opacity: 1; transform: translateY(-45px) scale(1.2); }   /* 弹起放大（冲出顶边） */
  35%  { opacity: 1; transform: translateY(-25px) scale(1);   }   /* 微回落 */
  50%  { transform: translateY(-45px) scale(1.1); }               /* 二次微弹 */
  100% { opacity: 0; transform: translateY(15px)  scale(.8);  }   /* 落回顶边消失 */
}

/* =========================================================================
   交互反馈弹窗内容（学习页点选项后弹出的信息框 · 多邻国式）
   底部滑上 + 顶部彩色大水花由 openBottomSheet 统一提供，这里只管内容排版
   ========================================================================= */
.fb-sheet {
  text-align: center; padding: 6px 4px 6px; border-radius: 14px;
}
/* 正确：按钮浅绿（整框底色由外层 .bs-sheet.tone-ok 统一） */
.fb-sheet.tone-ok .fb-btn {
  color: #F5EFE2; background: linear-gradient(180deg, #6FBF8B, #4CA572);
  box-shadow: 0 5px 0 rgba(76,165,114,.35);
}
.fb-sheet.tone-ok .fb-btn:active { box-shadow: 0 2px 0 rgba(76,165,114,.35); }
/* 错误：按钮粉红（整框底色由外层 .bs-sheet.tone-no 统一） */
.fb-sheet.tone-no .fb-btn {
  color: #F5EFE2; background: linear-gradient(180deg, #F18DA6, #E56A88);
  box-shadow: 0 5px 0 rgba(229,106,136,.35);
}
.fb-sheet.tone-no .fb-btn:active { box-shadow: 0 2px 0 rgba(229,106,136,.35); }
.fb-emoji { font-size: 52px; line-height: 1.1; animation: fbPop .5s cubic-bezier(.34,1.56,.64,1) both; }
.fb-title {
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  font-size: 19px; font-weight: 900; color: var(--ink); margin-top: 10px;
  animation: fbIn .4s ease both;
}
.fb-msg {
  font-size: 14px; line-height: 1.7; color: var(--ink-soft);
  margin-top: 8px; animation: fbIn .4s ease .06s both;
}
.fb-msg b, .fb-msg strong { color: var(--ink); }
.fb-btn {
  margin-top: 18px; width: 100%; padding: 13px; font-size: 15px; font-weight: 800;
  border: none; border-radius: 14px; cursor: pointer;
  color: #F5EFE2; background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  box-shadow: 0 5px 0 rgba(58,107,92,.35); transition: transform .1s, box-shadow .1s;
  animation: fbIn .4s ease .12s both;
}
.fb-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(58,107,92,.35); }
@keyframes fbPop {
  0%   { transform: scale(.2);   opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}
@keyframes fbIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
