/* ============================================================
   《我们的第二个十年》选图工作台 —— 书卷编辑部风视觉系统
   设计概念：一本可以翻阅、可以批注的纪念册
   ============================================================ */

:root {
  /* 纸张与墨色 */
  --paper: #f6f1e9;
  --paper-2: #efe7da;
  --card: #fbf7f0;
  --ink: #2b2320;
  --ink-soft: #5f534a;
  --muted: #9a8d80;

  /* 清华紫红品牌色 */
  --brand: #6b2a3a;
  --brand-deep: #4d1e2a;
  --brand-soft: #f2e5e4;

  /* 哑金点缀 */
  --gold: #b08d57;
  --gold-soft: #efe3cd;

  /* 分隔与边框 */
  --line: #e2d6c5;
  --line-strong: #cdbfaa;

  /* 语义色 */
  --keep: #3a6b4a;
  --keep-bg: #e9f0e7;
  --delete: #9c3a3a;
  --delete-bg: #f6e8e6;
  --pending: #9a7636;
  --pending-bg: #f3ecdd;

  /* 字体 */
  --font-display: "Songti SC", "STSong", "SimSun", "Noto Serif SC", "Times New Roman", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "Cormorant Garamond", "Didot", "Georgia", serif;

  /* 阴影 */
  --shadow: 0 2px 14px rgba(77, 30, 42, .07);
  --shadow-lg: 0 6px 28px rgba(77, 30, 42, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(176,141,87,.05), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(107,42,58,.04), transparent 50%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }

/* ============ 顶部导航 ============ */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  height: 52px;
  display: flex; align-items: center; gap: 18px;
  padding: 0 26px;
  background: linear-gradient(180deg, #5c2331, var(--brand));
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 2px 12px rgba(77,30,42,.25);
}
.topbar .site-name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; letter-spacing: 1px;
}
.topbar .site-sub { font-size: 12px; opacity: .65; letter-spacing: 2px; }
.topbar .spacer { flex: 1; }
.topbar .nav { display: flex; gap: 4px; }
.topbar .nav a {
  color: #eedde0; font-size: 13px; padding: 6px 14px; border-radius: 18px;
  transition: all .18s; letter-spacing: .5px;
}
.topbar .nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.topbar .nav a.active { background: #fff; color: var(--brand); font-weight: 600; }
#me-chip {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  background: rgba(255,255,255,.14); padding: 5px 14px; border-radius: 18px;
  font-size: 13px; transition: background .18s;
}
#me-chip:hover { background: rgba(255,255,255,.22); }

/* ============ 页面容器 ============ */
.wrap { max-width: 1040px; margin: 0 auto; padding: 32px 24px 96px; }

/* ============ 提示条 ============ */
.hint {
  background: var(--gold-soft); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 10px 16px; font-size: 13px; margin-bottom: 18px;
  color: var(--ink-soft);
}

/* ============ 首页：目录页 ============ */
.book-cover {
  text-align: center; padding: 40px 20px 40px; position: relative;
}
.book-cover .cover-gate {
  width: 200px; height: auto; margin: 0 auto 24px; display: block;
  opacity: .94; animation: riseIn .6s ease both;
}
.book-cover::after {
  content: ""; display: block; width: 60px; height: 2px;
  background: var(--gold); margin: 26px auto 0; border-radius: 2px;
}
.book-cover .book-title {
  font-family: var(--font-display); font-size: 40px; font-weight: 700;
  letter-spacing: 6px; color: var(--brand); margin: 0 0 10px;
}
.book-cover .book-sub {
  font-size: 14px; color: var(--muted); letter-spacing: 3px;
}
#book-progress {
  display: flex; justify-content: center; gap: 26px; margin-top: 26px;
  flex-wrap: wrap;
}
#book-progress .p-item {
  text-align: center; min-width: 92px;
}
#book-progress .p-num {
  font-family: var(--font-num); font-size: 30px; font-weight: 700; color: var(--brand);
}
#book-progress .p-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; }

/* 章节（栏目） */
.chapter { margin-bottom: 34px; }
.chapter-head {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px;
}
.chapter-head .ch-no {
  font-family: var(--font-num); font-size: 22px; color: var(--gold);
  font-weight: 700; letter-spacing: 1px;
}
.chapter-head .ch-title {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  color: var(--brand); letter-spacing: 2px;
}
.chapter-head .ch-meta { font-size: 12px; color: var(--muted); margin-left: auto; }

/* 文章行（节） */
.article-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; border-radius: 8px; cursor: pointer;
  transition: all .2s; border: 1px solid transparent; color: var(--ink);
}
.article-row:hover {
  background: var(--card); border-color: var(--line);
  box-shadow: var(--shadow); transform: translateX(4px);
}
.article-row .art-no {
  font-family: var(--font-num); font-size: 14px; color: var(--gold);
  width: 30px; text-align: right; flex-shrink: 0;
}
.article-row .art-title {
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
  flex: 1; color: var(--ink);
}
.article-row:hover .art-title { color: var(--brand); }
.article-row .art-author { font-size: 12px; color: var(--muted); width: 64px; text-align: right; flex-shrink: 0; }
.article-row .art-stat { font-size: 12px; color: var(--muted); min-width: 92px; text-align: right; flex-shrink: 0; }
.article-row .art-stat b { color: var(--brand); font-weight: 600; }

/* 章节进场动效 */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.chapter { animation: riseIn .5s ease both; }
.chapter:nth-child(1) { animation-delay: .05s; }
.chapter:nth-child(2) { animation-delay: .12s; }
.chapter:nth-child(3) { animation-delay: .19s; }
.chapter:nth-child(4) { animation-delay: .26s; }
.chapter:nth-child(5) { animation-delay: .33s; }
.chapter:nth-child(6) { animation-delay: .40s; }
.chapter:nth-child(7) { animation-delay: .47s; }
.chapter:nth-child(8) { animation-delay: .54s; }

/* ============ 文章页 ============ */
.article-nav {
  position: fixed; top: 52px; left: 50%; transform: translateX(-50%);
  width: min(1040px, calc(100% - 40px));
  z-index: 15;
  background: var(--card);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.article-nav .nav-pos {
  font-size: 12px; color: var(--brand); background: var(--brand-soft);
  padding: 4px 12px; border-radius: 12px; white-space: nowrap; font-weight: 600;
}
.article-nav .nav-btn {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 18px;
  padding: 5px 15px; font-size: 13px; cursor: pointer; color: var(--brand);
  font-weight: 600; transition: all .18s; white-space: nowrap;
}
.article-nav .nav-btn:hover {
  background: var(--brand); color: #fff; border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(107,42,58,.22);
}
.article-nav .nav-btn.disabled { opacity: .35; pointer-events: none; }
.article-nav select {
  flex: 1; min-width: 180px; padding: 7px 14px; border: 1px solid var(--line-strong);
  border-radius: 18px; font-size: 13px; background: #fff; color: var(--ink-soft);
  cursor: pointer; outline: none; font-family: var(--font-body);
}
.article-nav select:focus { border-color: var(--brand); }
.article-nav .nav-spacer { flex: 1; }

/* 文章头部 */
.article-head { margin: 8px 0 20px; text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.article-head h1 {
  font-family: var(--font-display); font-size: 32px; font-weight: 700;
  letter-spacing: 2px; color: var(--brand); margin: 0 0 10px; line-height: 1.4;
}
.article-head .author {
  font-size: 13px; color: var(--muted); letter-spacing: 1px;
}

/* 文章正文（书页排版） */
.article-body {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 40px 46px; box-shadow: var(--shadow);
}
.article-body p { text-indent: 2em; margin: .7em 0; color: var(--ink); }
.article-body p:first-of-type { text-indent: 2em; }
.article-body blockquote {
  margin: 16px 0; padding: 14px 20px; background: var(--brand-soft);
  border-left: 3px solid var(--brand); color: var(--ink-soft);
  border-radius: 0 8px 8px 0; font-family: var(--font-display);
}
.article-body blockquote p { text-indent: 0; }
.article-body h1, .article-body h2 {
  font-family: var(--font-display); font-size: 20px; color: var(--brand);
  letter-spacing: 1px;
}
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

/* ============ 图片卡片 ============ */
.img-card {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  margin: 16px 0; background: #fff; box-shadow: var(--shadow);
}
.img-card .img-wrap { background: var(--paper-2); text-align: center; padding: 12px; position: relative; }
.img-card img { max-width: 100%; max-height: 400px; display: inline-block; border-radius: 4px; }
.img-card .img-meta {
  padding: 8px 16px; font-size: 12px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  border-top: 1px dashed var(--line); background: var(--card);
}
.badge {
  display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 11px; font-weight: 600;
}
.badge.ok { background: var(--keep-bg); color: var(--keep); }
.badge.bad { background: var(--delete-bg); color: var(--delete); }
.badge.warn { background: var(--pending-bg); color: var(--pending); }
.badge.emf { background: #ece7df; color: var(--ink-soft); }
.caption { font-size: 12px; color: var(--ink-soft); margin-left: 4px; }

.mark-bar {
  padding: 9px 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  border-top: 1px solid var(--line);
}
.mark-btn {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 18px;
  padding: 5px 16px; font-size: 13px; cursor: pointer; transition: all .18s;
  font-family: var(--font-body);
}
.mark-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(77,30,42,.12); }
.mark-btn.active-keep { background: var(--keep); color: #fff; border-color: var(--keep); }
.mark-btn.active-delete { background: var(--delete); color: #fff; border-color: var(--delete); }
.mark-btn.active-pending { background: var(--pending); color: #fff; border-color: var(--pending); }
.note-toggle { font-size: 12px; color: var(--muted); cursor: pointer; margin-left: 4px; }
.note-box { flex-basis: 100%; }
.note-box textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 12px;
  font-size: 13px; font-family: var(--font-body); resize: vertical; background: #fff;
}
.mark-history { padding: 8px 16px 12px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); background: var(--card); }
.mark-history .marker { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }

/* ============ 文章总体意见 ============ */
#opinion-panel {
  background: var(--gold-soft); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 16px 20px; margin: 0 0 24px;
}
#opinion-panel .op-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 10px; color: var(--brand); }
.opinion-item {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 8px; font-size: 14px;
  box-shadow: 0 1px 4px rgba(77,30,42,.04);
}
.opinion-item .op-meta {
  font-size: 12px; color: var(--muted); display: flex; gap: 10px;
  flex-wrap: wrap; align-items: center; margin-top: 6px;
}
.op-label {
  display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 11px;
  background: var(--brand-soft); color: var(--brand); margin-right: 4px; font-weight: 600;
}
.op-status { cursor: pointer; }
.op-status.pending { color: var(--pending); }
.op-status.done { color: var(--keep); text-decoration: line-through; }
.op-del { color: var(--delete); cursor: pointer; font-size: 12px; margin-left: 6px; }
.label-chip {
  display: inline-block; padding: 3px 12px; border-radius: 14px; font-size: 12px;
  border: 1px solid var(--line-strong); cursor: pointer; background: #fff; margin: 3px;
  transition: all .15s;
}
.label-chip.sel { background: var(--brand); color: #fff; border-color: var(--brand); }
.op-form { margin-top: 12px; }
.op-form textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px;
  font-size: 13px; font-family: var(--font-body); resize: vertical; min-height: 56px; background: #fff;
}

/* ============ 汇总/意见页 ============ */
.col-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.col-card h2 { font-family: var(--font-display); margin: 0 0 6px; font-size: 20px; color: var(--brand); }
.col-card .col-meta { color: var(--muted); font-size: 12px; margin-bottom: 12px; }

.img-row {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 10px; display: flex; gap: 14px; align-items: flex-start;
}
.img-row .thumb { width: 90px; height: 70px; object-fit: cover; border-radius: 6px; background: var(--paper-2); flex-shrink: 0; }
.img-row .info { flex: 1; min-width: 0; }
.img-row .info .f { font-family: Menlo, monospace; font-size: 12px; color: var(--muted); }
.img-row .votes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.vote-chip {
  font-size: 12px; padding: 2px 10px; border-radius: 12px; border: 1px solid var(--line);
  display: flex; gap: 5px; align-items: center; background: #fff;
}
.vote-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.vote-chip .act { font-weight: 600; }
.conflict { border-color: var(--delete); box-shadow: 0 0 0 1px var(--delete); }
.conflict-tag { font-size: 11px; color: var(--delete); font-weight: 700; }

.btn {
  background: var(--brand); color: #fff; border: none; border-radius: 8px;
  padding: 9px 20px; font-size: 14px; cursor: pointer; font-family: var(--font-body);
  transition: all .18s; letter-spacing: 1px;
}
.btn:hover { background: var(--brand-deep); box-shadow: 0 3px 10px rgba(107,42,58,.25); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }

.filters { margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input {
  padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  font-size: 13px; background: #fff; color: var(--ink); font-family: var(--font-body);
}

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar .hint2 { font-size: 12px; color: var(--muted); }

/* ============ 身份弹窗 ============ */
.overlay {
  position: fixed; inset: 0; background: rgba(43,35,32,.45); display: none;
  align-items: center; justify-content: center; z-index: 100;
}
.overlay.show { display: flex; }
.modal { background: var(--card); border-radius: 14px; padding: 26px 30px; width: 380px; box-shadow: var(--shadow-lg); }
.modal h3 { font-family: var(--font-display); margin: 0 0 12px; color: var(--brand); }
.color-pick { display: flex; gap: 8px; margin: 10px 0 16px; flex-wrap: wrap; }
.color-dot { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform .15s; }
.color-dot:hover { transform: scale(1.12); }
.color-dot.sel { border-color: var(--ink); }
.modal input[type=text] { width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 14px; font-family: var(--font-body); }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* 历史身份项 */
.hist-item {
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 16px; padding: 5px 12px;
  font-size: 13px; background: #fff; transition: all .15s;
}
.hist-item:hover { border-color: var(--brand); background: var(--brand-soft); }

/* 角落协作徽章（低调显示） */
.mode-badge {
  position: fixed; right: 14px; bottom: 14px; z-index: 995;
  font-size: 11px; color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 3px 11px;
  display: flex; align-items: center; gap: 6px; opacity: .7;
  pointer-events: none;
}
.mode-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--keep); }
.mode-badge.local .dot { background: #bbb; }

/* ============ 文章页左侧书签侧边栏 ============ */
.article-sidebar {
  position: fixed !important; top: 52px !important; left: 0 !important; bottom: 0 !important;
  width: 262px; z-index: 14;
  background: linear-gradient(90deg, #f1e9dc, #fbf7f0);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 22px 14px 30px;
}
.article-sidebar .sb-col {
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  color: var(--brand); letter-spacing: 2px; margin-bottom: 4px;
  text-align: center; line-height: 1.5;
}
.article-sidebar .sb-col-no {
  font-family: var(--font-num); font-size: 13px; color: var(--gold);
  text-align: center; letter-spacing: 1px; margin-bottom: 14px;
}
.article-sidebar .sb-nav {
  display: flex; gap: 6px; margin-bottom: 14px;
}
.article-sidebar .sb-nav-btn {
  flex: 1; text-align: center; border: 1px solid var(--line-strong);
  background: #fff; border-radius: 14px; padding: 6px 0;
  font-size: 13px; cursor: pointer; color: var(--brand);
  font-weight: 600; transition: all .15s; text-decoration: none;
}
.article-sidebar .sb-nav-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.article-sidebar .sb-nav-btn.disabled { opacity: .35; pointer-events: none; }
.article-sidebar .sb-list-title {
  font-size: 11px; color: var(--muted); letter-spacing: 1px;
  padding: 0 8px; margin-bottom: 6px;
}
.article-sidebar .sb-item {
  display: flex; align-items: baseline; gap: 6px;
  padding: 7px 12px; border-radius: 8px;
  font-size: 13px; color: var(--ink-soft); cursor: pointer;
  transition: all .15s; text-decoration: none; line-height: 1.5;
}
.article-sidebar .sb-item:hover { background: var(--brand-soft); color: var(--brand); }
.article-sidebar .sb-item.current {
  background: var(--brand); color: #fff; font-weight: 600;
}
.article-sidebar .sb-item .sb-no {
  font-family: var(--font-num); font-size: 12px; color: var(--gold);
  flex-shrink: 0; width: 20px; text-align: right;
}
.article-sidebar .sb-item.current .sb-no { color: #e8c98a; }
.article-sidebar .sb-all {
  margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.article-sidebar .sb-all select {
  width: 100%; padding: 7px 10px; border: 1px solid var(--line-strong);
  border-radius: 8px; font-size: 12px; background: #fff; color: var(--ink-soft);
  font-family: var(--font-body);
}

/* 正文区给侧边栏让位 */
.wrap.article-main { max-width: 880px; margin-left: 302px; margin-right: auto; }

/* 移动端：侧边栏收起为顶部横条 */
@media (max-width: 640px) {
  .article-sidebar {
    position: static !important; width: auto; bottom: auto;
    border-right: none; border-bottom: 1px solid var(--line);
    padding: 12px 14px; max-height: 260px;
  }
  .wrap.article-main { margin-left: auto; max-width: 1040px; }
}

/* ============ 悬浮导航（与协作徽章同逻辑：fixed 固定） ============ */
#nav-float {
  position: fixed !important; left: 14px; bottom: 14px; z-index: 990;
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 22px; padding: 6px 8px; box-shadow: var(--shadow-lg);
}
#nav-float .nf-btn {
  border: none; background: transparent; border-radius: 16px;
  padding: 5px 12px; font-size: 15px; cursor: pointer; color: var(--brand);
  font-weight: 700; transition: all .15s; line-height: 1.4;
  text-decoration: none; white-space: nowrap;
}
#nav-float .nf-btn:hover { background: var(--brand-soft); }
#nav-float .nf-btn.disabled { opacity: .35; pointer-events: none; }
#nav-float .nf-pos {
  font-size: 12px; color: var(--muted); background: var(--paper-2);
  padding: 3px 10px; border-radius: 12px; white-space: nowrap;
}
#nav-float .nf-jump {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 14px;
  padding: 5px 8px; font-size: 12px; color: var(--ink-soft);
  font-family: var(--font-body); max-width: 160px; cursor: pointer;
}

/* ============ 统计面板（汇总页/意见页） ============ */
.stats-panel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 10px; text-align: center; box-shadow: var(--shadow);
}
.stat-card .s-num {
  font-family: var(--font-num); font-size: 28px; font-weight: 700;
  color: var(--brand); line-height: 1.1;
}
.stat-card .s-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-top: 4px; }
.stat-card.hl { border-color: var(--gold); }
.stat-card.hl .s-num { color: var(--gold); }

/* ============ 图片流卡片（汇总页） ============ */
.img-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.img-card2 {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.img-card2:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.img-card2.conflict { border: 2px solid var(--delete); }
.img-card2 .thumb-wrap {
  aspect-ratio: 4/3; overflow: hidden; background: var(--paper-2);
  position: relative;
}
.img-card2 .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-card2 .conflict-tag2 {
  position: absolute; top: 6px; right: 6px; background: var(--delete); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600;
}
.img-card2 .card-body { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.img-card2 .cb-title { font-size: 13px; color: var(--ink); font-weight: 600; line-height: 1.4; }
.img-card2 .cb-file { font-family: Menlo, monospace; font-size: 11px; color: var(--muted); }
.img-card2 .cb-votes { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }

/* ============ 动效与细节 ============ */
.wrap { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 按压反馈 */
.mark-btn:active, .btn:active, #nav-float .nf-btn:active,
.article-row:active, .img-card2:active { transform: scale(.97); }

/* 空状态 */
.empty-state {
  text-align: center; color: var(--muted); padding: 44px 20px; font-size: 14px;
}

/* ============ 登录锁屏（书卷风） ============ */
.lock-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--paper);
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(176,141,87,.08), transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(107,42,58,.06), transparent 55%);
  display: flex; align-items: center; justify-content: center;
}
.lock-card {
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 18px; padding: 44px 42px 36px; text-align: center;
  box-shadow: var(--shadow-lg); width: 380px; max-width: 90vw;
}
.lock-img {
  width: 250px; height: auto;
  margin: 0 auto 16px; display: block;
}
.lock-title {
  font-family: var(--font-display); font-size: 30px; font-weight: 700;
  color: var(--brand); letter-spacing: 6px; line-height: 1.4;
}
.lock-sub { font-size: 13px; color: var(--muted); letter-spacing: 3px; margin: 10px 0 0; }
.lock-divider { width: 52px; height: 2px; background: var(--gold); margin: 22px auto; border-radius: 2px; }
.lock-input {
  width: 100%; padding: 13px 16px; border: 1px solid var(--line-strong);
  border-radius: 10px; font-size: 16px; text-align: center;
  font-family: var(--font-body); background: #fff; color: var(--ink);
  letter-spacing: 2px;
}
.lock-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(107,42,58,.08); }
.lock-btn {
  width: 100%; margin-top: 18px; background: var(--brand); color: #fff;
  border: none; border-radius: 10px; padding: 13px; font-size: 15px;
  cursor: pointer; letter-spacing: 6px; font-family: var(--font-body);
  transition: background .18s;
}
.lock-btn:hover { background: var(--brand-deep); }
.lock-err { color: var(--delete); font-size: 13px; margin-top: 14px; min-height: 20px; }

/* ============ 页脚（二校门水印） ============ */
.site-footer {
  text-align: center; padding: 44px 20px 26px; opacity: .55;
}
.site-footer .footer-gate {
  width: 56px; height: auto; margin: 0 auto 10px; display: block; opacity: .45;
}
.site-footer .footer-text {
  font-family: var(--font-display); font-size: 12px; color: var(--muted); letter-spacing: 3px;
}

/* ============ 响应式 ============ */
@media (max-width: 720px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar .site-sub { display: none; }
  .topbar .nav a { padding: 5px 9px; font-size: 12px; }
  .wrap { padding: 20px 14px 72px; }
  .book-cover .book-title { font-size: 30px; letter-spacing: 4px; }
  .article-body { padding: 22px 18px; }
  .article-head h1 { font-size: 25px; }
  .article-row { gap: 8px; padding: 9px 10px; }
  .article-row .art-author { display: none; }

  /* 移动端：悬浮导航更紧凑，给正文留出底部空间 */
  #nav-float { left: 10px; bottom: 10px; gap: 4px; padding: 5px 7px; }
  #nav-float .nf-jump { max-width: 110px; font-size: 11px; }
  #nav-float .nf-pos { font-size: 11px; padding: 2px 8px; }
  #nav-float .nf-btn { padding: 4px 10px; font-size: 14px; }

  /* 图片流卡片移动端单列 */
  .img-grid { grid-template-columns: 1fr; }
  .stats-panel { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-card .s-num { font-size: 22px; }
}
