/* ============================================================
   拆掉你的隐形监狱 · 深夜书房 设计体系
   ============================================================ */

:root {
  --bg: #0e0d0b;
  --bg-deep: #0a0908;
  --surface: #16140f;
  --surface-2: #1c1913;
  --ink: #ece5d4;
  --ink-dim: #c8bfa9;
  --muted: #97906f;
  --gold: #d8a45b;
  --gold-soft: rgba(216, 164, 91, 0.14);
  --gold-line: rgba(216, 164, 91, 0.35);
  --line: rgba(236, 229, 212, 0.1);
  --line-strong: rgba(236, 229, 212, 0.18);
  --good: #9db98a;
  --again: #cf8a5b;
  --danger: #b85c4e;
  --serif: "Noto Serif SC", "Source Han Serif SC", Georgia, "SimSun", serif;
  --garamond: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --sidebar-w: 304px;
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(216, 164, 91, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(120, 100, 60, 0.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* 纸纹颗粒 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

::selection { background: var(--gold-soft); color: var(--gold); }

a { color: inherit; }

/* ---------- 骨架布局 ---------- */

#sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-deep) 100%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

#main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 56px clamp(24px, 6vw, 96px) 96px;
}

#topbar { display: none; }
#scrim { display: none; }

/* ---------- 侧边栏 ---------- */

.side-head { padding: 28px 22px 18px; border-bottom: 1px solid var(--line); }

.brand { text-decoration: none; display: block; }
.brand-eyebrow {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.brand-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.04em;
}

.side-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.ring { width: 56px; height: 56px; flex: none; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 5; }
.ring-fg {
  fill: none;
  stroke: var(--gold);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s var(--ease);
}
.ring-text {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 600;
  transform: rotate(90deg);
  transform-origin: 32px 32px;
}
.side-progress-text strong { display: block; font-size: 13.5px; }
.side-progress-text small { color: var(--muted); font-size: 11.5px; }

.side-nav { flex: 1; padding: 12px 12px 20px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--ink-dim);
  font-size: 13.5px;
  min-height: 44px;
  transition: background 0.2s, color 0.2s;
}
.nav-item:hover { background: rgba(236, 229, 212, 0.05); color: var(--ink); }
.nav-item.active { background: var(--gold-soft); color: var(--ink); }
.nav-item.active .nav-num { color: var(--gold); }

.nav-num {
  font-family: var(--garamond);
  font-size: 13px;
  color: var(--muted);
  width: 22px;
  flex: none;
  text-align: center;
}
.nav-text { flex: 1; line-height: 1.35; }
.nav-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.nav-bar {
  display: block;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.nav-bar i { display: block; height: 100%; background: var(--gold); transition: width 0.5s var(--ease); }
.nav-pct { font-size: 10.5px; color: var(--muted); flex: none; }
.nav-item.active .nav-pct { color: var(--gold); }

.nav-home, .nav-review { margin-bottom: 4px; }
.nav-review { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; padding-top: 14px; }

.side-foot {
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

/* ---------- 通用元素 ---------- */

.page { max-width: 860px; margin: 0 auto; }

h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin: 0.35em 0;
}

h2 { font-family: var(--serif); font-weight: 700; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-family: var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--gold-line); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(160deg, #e3b26c, #c8913f);
  border-color: transparent;
  color: #241a0d;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(216, 164, 91, 0.22);
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(216, 164, 91, 0.3); }

.btn-ghost { color: var(--ink-dim); }
.btn-ghost:hover { color: var(--ink); }

.btn-danger { border-color: rgba(184, 92, 78, 0.5); color: #d99286; }
.btn-danger:hover { background: rgba(184, 92, 78, 0.12); }

.btn-done { background: rgba(157, 185, 138, 0.12); border-color: rgba(157, 185, 138, 0.45); color: var(--good); }

.btn-file { position: relative; }

/* 渐显 */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

/* ---------- 总览页 ---------- */

.hero { padding: 20px 0 8px; }
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.26em;
  color: var(--gold);
  text-transform: uppercase;
  margin: 0 0 6px;
}
.hero-sub {
  font-family: var(--serif);
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--ink-dim);
  margin: 0 0 14px;
}
.hero-desc { color: var(--ink-dim); max-width: 62ch; margin: 0 0 18px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 12.5px; margin-bottom: 24px; }
.hero-meta span { position: relative; }
.hero-meta span + span::before { content: "·"; position: absolute; left: -12px; color: var(--line-strong); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 40px 0;
}
.stat { background: var(--surface); padding: 18px 16px; text-align: center; }
.stat strong { display: block; font-family: var(--garamond); font-size: 27px; color: var(--gold); }
.stat small { color: var(--muted); font-size: 12px; }

.howto { margin: 0 0 44px; }
.howto h2 { font-size: 19px; margin-bottom: 10px; }
.howto ol { margin: 0; padding-left: 22px; color: var(--ink-dim); }
.howto li { margin: 6px 0; }

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 52px;
}
.chapter-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 20px 16px;
  text-decoration: none;
  transition: transform 0.22s var(--ease), border-color 0.22s, box-shadow 0.22s;
}
.chapter-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
.card-top { display: flex; justify-content: space-between; align-items: baseline; }
.card-num { font-family: var(--garamond); font-size: 26px; color: var(--gold); }
.card-time { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.chapter-card h3 { margin: 0; font-family: var(--serif); font-size: 17.5px; line-height: 1.4; }
.card-sub { margin: 0; color: var(--muted); font-size: 12.5px; flex: 1; }
.card-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.card-minutes { font-size: 11px; color: var(--muted); flex: none; }
.card-progress { flex: 1; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.card-progress i { display: block; height: 100%; background: var(--gold); }
.card-pct { font-size: 11px; color: var(--muted); flex: none; }

.data-tools { border-top: 1px solid var(--line); padding-top: 30px; }
.data-tools h2 { font-size: 18px; margin: 0 0 6px; }
.data-desc { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.data-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 章节页 ---------- */

.ch-head { padding-bottom: 10px; }
.ch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--muted); font-size: 12.5px; }
.ch-badge {
  background: var(--gold-soft);
  color: var(--gold);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
}
.ch-sub { font-family: var(--serif); color: var(--ink-dim); font-size: 17px; margin: -4px 0 20px; }

.thesis {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 0 0 12px;
}
.thesis-label { font-size: 11px; letter-spacing: 0.2em; color: var(--gold); }
.thesis p { margin: 6px 0 0; color: var(--ink-dim); font-size: 15px; line-height: 1.85; }

.ch-section { margin: 46px 0; }
.ch-section h2 {
  font-size: clamp(20px, 2.6vw, 24px);
  line-height: 1.4;
  margin: 0 0 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.sec-index { font-family: var(--garamond); font-size: 15px; color: var(--gold); flex: none; }

.prose { max-width: 70ch; color: var(--ink-dim); font-size: 15.5px; line-height: 1.95; margin: 0 0 16px; }
.prose:first-of-type { color: var(--ink); }

.quote {
  margin: 0 0 22px;
  padding: 18px 22px;
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0 14px 14px 0;
}
.quote p {
  font-family: var(--garamond);
  font-style: italic;
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 10px;
}
.quote cite { font-style: normal; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.t-chip {
  font-family: var(--garamond);
  background: var(--gold-soft);
  color: var(--gold);
  padding: 1px 8px;
  border-radius: 5px;
  font-size: 12px;
}

.takeaway {
  margin: 52px 0;
  padding: 22px 26px;
  text-align: center;
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  background:
    radial-gradient(400px 120px at 50% 0%, rgba(216, 164, 91, 0.1), transparent),
    var(--surface);
}
.takeaway-label { font-size: 11px; letter-spacing: 0.28em; color: var(--gold); }
.takeaway p { font-family: var(--serif); font-size: 18.5px; line-height: 1.7; margin: 8px 0 0; }

/* ---------- 模型图 ---------- */

.model {
  margin: 26px 0 30px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.model-title { font-size: 12px; letter-spacing: 0.16em; color: var(--gold); margin-bottom: 16px; text-transform: uppercase; }
.model-note { color: var(--muted); font-size: 13px; margin: 16px 0 0; border-top: 1px dashed var(--line); padding-top: 12px; }

/* versus */
.model-versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.versus-col { border-radius: 10px; padding: 14px 16px; border: 1px solid var(--line); }
.versus-a { background: rgba(236, 229, 212, 0.03); }
.versus-b { background: var(--gold-soft); border-color: var(--gold-line); }
.versus-label { font-family: var(--serif); font-weight: 700; font-size: 14.5px; margin-bottom: 8px; }
.versus-b .versus-label { color: var(--gold); }
.versus-col ul { margin: 0; padding-left: 18px; color: var(--ink-dim); font-size: 13px; }
.versus-col li { margin: 5px 0; }
.versus-divider { display: flex; align-items: center; }
.versus-divider span { font-family: var(--garamond); font-style: italic; color: var(--muted); font-size: 13px; }

/* flow */
.model-flow { list-style: none; margin: 0; padding: 0; position: relative; }
.model-flow::before {
  content: "";
  position: absolute;
  left: 15px; top: 10px; bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, var(--gold-line), var(--line));
}
.flow-step { display: flex; gap: 16px; padding: 9px 0; position: relative; }
.flow-index {
  font-family: var(--garamond);
  flex: none;
  width: 31px; height: 31px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--gold-line);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px;
  z-index: 1;
}
.flow-label { font-weight: 600; font-size: 14.5px; }
.flow-desc { color: var(--muted); font-size: 13px; }

/* ladder */
.model-ladder { display: flex; flex-direction: column; gap: 6px; }
.ladder-level {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(216, 164, 91, calc(var(--lv) * 0.16)), transparent 70%);
}
.ladder-label { font-family: var(--serif); font-weight: 700; font-size: 14.5px; flex: none; }
.ladder-desc { color: var(--muted); font-size: 12.5px; }

/* prison */
.model-prison { display: flex; flex-direction: column; align-items: center; gap: 0; }
.prison-yard { position: relative; padding: 26px 34px; width: 100%; max-width: 460px; }
.guard {
  position: absolute;
  font-size: 11px;
  color: var(--again);
  border: 1px dashed rgba(207, 138, 91, 0.5);
  border-radius: 6px;
  padding: 2px 8px;
  background: var(--bg-deep);
}
.guard-1 { top: 6px; left: 12%; }
.guard-2 { top: 6px; right: 12%; }
.guard-3 { bottom: 6px; left: 8%; }
.guard-4 { bottom: 6px; right: 8%; }
.prison-wall {
  border: 2px dashed var(--line-strong);
  border-radius: 16px;
  padding: 26px;
  text-align: center;
  position: relative;
  background: rgba(236, 229, 212, 0.02);
}
.wall-label {
  position: absolute;
  top: -9px; left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  padding: 0 10px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.prison-you {
  width: 92px; height: 92px;
  margin: 6px auto;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  background: radial-gradient(circle at 35% 30%, rgba(216, 164, 91, 0.25), var(--surface-2));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 19px;
}
.prison-you small { font-size: 10px; color: var(--muted); font-family: var(--sans); }
.prison-power { display: flex; flex-direction: column; align-items: center; margin: 2px 0; }
.power-line { width: 1px; height: 26px; background: linear-gradient(180deg, var(--line-strong), var(--gold-line)); }
.power-label { font-size: 10.5px; color: var(--muted); letter-spacing: 0.2em; padding: 2px 0; }
.prison-generators { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 460px; }
.generator {
  border: 1px solid var(--gold-line);
  background: var(--gold-soft);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 13.5px;
}
.generator small { display: block; font-family: var(--sans); font-weight: 400; color: var(--muted); font-size: 10.5px; margin-top: 3px; }

/* split circle */
.model-split { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.model-split svg { width: 190px; height: 190px; flex: none; margin: 0 auto; }
.split-ring { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.split-light { fill: rgba(216, 164, 91, 0.18); }
.split-shadow { fill: rgba(10, 9, 8, 0.85); }
.split-line { stroke: var(--gold-line); stroke-width: 1.5; stroke-dasharray: 5 4; }
.split-legend { flex: 1; min-width: 210px; display: flex; flex-direction: column; gap: 14px; }
.legend-item { display: flex; gap: 12px; align-items: flex-start; }
.swatch { width: 16px; height: 16px; border-radius: 4px; flex: none; margin-top: 3px; border: 1px solid var(--line-strong); }
.swatch-light { background: rgba(216, 164, 91, 0.4); }
.swatch-dark { background: var(--bg-deep); }
.legend-item strong { font-size: 14px; display: block; }
.legend-item small { color: var(--muted); font-size: 12px; }

/* iceberg */
.model-iceberg { max-width: 480px; margin: 0 auto; }
.berg-top, .berg-bottom { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; position: relative; }
.berg-top { background: linear-gradient(180deg, rgba(236, 229, 212, 0.07), rgba(236, 229, 212, 0.02)); }
.berg-bottom {
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.4), rgba(10, 9, 8, 0.85));
  min-height: 190px;
}
.berg-pct { position: absolute; right: 16px; top: 12px; font-family: var(--garamond); font-size: 25px; color: var(--gold); opacity: 0.8; }
.berg-name { font-family: var(--serif); font-weight: 700; font-size: 16px; }
.berg-top small { color: var(--muted); font-size: 12px; }
.berg-waterline {
  text-align: center;
  margin: 8px 0;
  border-top: 1px dashed var(--gold-line);
  position: relative;
  height: 0;
}
.berg-waterline span {
  position: relative; top: -11px;
  background: var(--surface);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 0 12px;
}
.berg-bottom ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-dim); font-size: 13px; }
.berg-bottom li { margin: 5px 0; }

/* ---------- 自测 / 实践 / 手记 ---------- */

.zone-title {
  font-size: 20px;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.zone-title small { font-family: var(--sans); font-weight: 400; font-size: 12.5px; color: var(--muted); }

.recall-zone, .practice-zone, .note-zone { margin: 58px 0; padding-top: 34px; border-top: 1px solid var(--line); }

.recall-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.recall-q, .recall-a { display: flex; gap: 12px; }
.recall-q p { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.75; }
.recall-a { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.recall-a p { margin: 0; color: var(--ink-dim); font-size: 14.5px; line-height: 1.85; }
.q-mark {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.a-mark { background: rgba(157, 185, 138, 0.14); color: var(--good); }

.recall-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn-flip { min-height: 38px; padding: 6px 16px; font-size: 13px; }
.rate-group { display: flex; gap: 8px; }
.btn-rate { min-height: 38px; padding: 6px 16px; font-size: 13px; }
.btn-good.on { background: rgba(157, 185, 138, 0.15); border-color: rgba(157, 185, 138, 0.55); color: var(--good); }
.btn-again.on { background: rgba(207, 138, 91, 0.15); border-color: rgba(207, 138, 91, 0.55); color: var(--again); }
.rate-chip { font-size: 11.5px; border-radius: 20px; padding: 3px 12px; margin-left: auto; }
.rate-chip.good { background: rgba(157, 185, 138, 0.14); color: var(--good); }
.rate-chip.again { background: rgba(207, 138, 91, 0.14); color: var(--again); }
.rate-chip.none { background: rgba(236, 229, 212, 0.06); color: var(--muted); }

.task {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.task-head { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 30px; }
.task-check {
  appearance: none;
  width: 21px; height: 21px;
  flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.task-check:checked { background: var(--gold); border-color: var(--gold); }
.task-check:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #241a0d;
  font-size: 13px;
  font-weight: 700;
}
.task-check:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.task-title { font-family: var(--serif); font-weight: 700; font-size: 15.5px; }
.task-desc { color: var(--muted); font-size: 13.5px; margin: 8px 0 12px; line-height: 1.8; }

.task-input, .note-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.8;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.2s;
}
.task-input:focus, .note-input:focus { outline: none; border-color: var(--gold-line); }
.task-input::placeholder, .note-input::placeholder { color: rgba(151, 144, 111, 0.55); white-space: pre-line; }

.ch-foot {
  margin-top: 54px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ch-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.ch-nav .btn { font-size: 13px; }

/* ---------- 复习室 ---------- */

.review-head { margin-bottom: 26px; }
.filter-tabs { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.tab {
  min-height: 40px;
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-dim);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--ink); }
.tab.on { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.review-src { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.review-src a { font-size: 12px; color: var(--muted); text-decoration: none; }
.review-src a:hover { color: var(--gold); }
.review-empty { color: var(--muted); text-align: center; padding: 60px 0; }

/* ---------- 移动端 ---------- */

@media (max-width: 960px) {
  #topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 90;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(14, 13, 11, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .topbar-title { font-family: var(--serif); font-weight: 700; font-size: 16px; }
  #menu-toggle {
    min-width: 44px; min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font-size: 17px;
    cursor: pointer;
  }
  #menu-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

  #sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
    width: min(320px, 86vw);
    z-index: 120;
  }
  body.sidebar-open #sidebar { transform: none; }
  body.sidebar-open #scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 110;
  }

  #main { margin-left: 0; padding: 28px 18px 80px; }

  .model-versus { grid-template-columns: 1fr; }
  .versus-divider { justify-content: center; }
  .prison-generators { grid-template-columns: 1fr; max-width: 300px; }
  .guard-1 { left: 4%; } .guard-2 { right: 4%; }
  .rate-chip { margin-left: 0; }
  .hero-actions .btn { flex: 1; }
}

@media (min-width: 961px) {
  body.sidebar-open #scrim { display: none; }
}
