/* ==========================================================================
   墨栖 · 样式表
   纸、墨、朱砂。衬线排版，安静的留白。
   ========================================================================== */

/* ---------- 1. 变量与基础 ---------- */
:root {
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN",
    SimSun, "Times New Roman", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui,
    -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;

  --paper: #f7f2e9;
  --paper-2: #fbf8f1;
  --surface: #fffdf8;
  --ink: #1e1b17;
  --ink-2: #4b453c;
  --muted: #857c6d;
  --faint: #a89f8f;
  --line: #e3dac8;
  --subtle: #ece5d6;
  --hover: rgba(120, 100, 70, 0.07);
  --accent: #a33b28;
  --accent-2: #c1593f;
  --accent-soft: #f2e2da;
  --jade: #33574e;
  --jade-soft: #e2ece7;
  --shadow-sm: 0 1px 2px rgba(60, 45, 25, 0.06);
  --shadow: 0 10px 30px -12px rgba(60, 45, 25, 0.22);
  --shadow-lg: 0 24px 60px -20px rgba(60, 45, 25, 0.32);
  --radius: 12px;
  --radius-lg: 18px;

  --header-h: 68px;
  --reading-bg: var(--paper);
  --reading-ink: #26221d;
}

html[data-theme="night"] {
  --paper: #15140f;
  --paper-2: #1a1913;
  --surface: #1e1c16;
  --ink: #ece4d5;
  --ink-2: #c2b8a6;
  --muted: #928a7b;
  --faint: #6d6659;
  --line: #302c23;
  --subtle: #262319;
  --hover: rgba(230, 220, 200, 0.06);
  --accent: #d4694c;
  --accent-2: #e0805f;
  --accent-soft: #33231d;
  --jade: #7fae9e;
  --jade-soft: #1e2b26;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  --reading-bg: #15140f;
  --reading-ink: #ddd4c2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(163, 59, 40, 0.035), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(51, 87, 78, 0.04), transparent 40%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
}

p {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 20px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--faint);
  background-clip: content-box;
}

/* ---------- 2. 布局 ---------- */
.app-root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1180px, 100% - 56px);
  margin-inline: auto;
}

.container-narrow {
  width: min(820px, 100% - 56px);
  margin-inline: auto;
}

main {
  flex: 1;
}

.page-enter {
  animation: pageIn 0.42s cubic-bezier(0.22, 0.8, 0.3, 1);
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 3. 启动屏 ---------- */
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
}

.boot-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent);
  color: #fdf8ef;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 30px;
  animation: breathe 2.4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.75; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1); }
}

.boot-text {
  font-family: var(--serif);
  letter-spacing: 0.2em;
  font-size: 13px;
}

/* ---------- 4. 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #fdf8ef;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 19px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), var(--shadow-sm);
}

.brand-name {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.16em;
  font-weight: 600;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--hover);
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  opacity: 0.55;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: 0.2s;
}

.icon-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.mobile-toggle {
  display: none;
}

/* 用户菜单 */
.user-menu {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 12px 0 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: 0.2s;
}

.user-chip:hover {
  border-color: var(--faint);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  color: #fdf8ef;
  background: linear-gradient(135deg, var(--jade), #5c8074);
  flex-shrink: 0;
  overflow: hidden;
}

.avatar.lg {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.avatar.xl {
  width: 76px;
  height: 76px;
  font-size: 32px;
}

.user-chip-name {
  font-size: 13px;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  animation: popIn 0.18s ease-out;
  z-index: 100;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.dropdown-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--subtle);
  margin-bottom: 6px;
}

.dropdown-head strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.dropdown-head span {
  font-size: 12px;
  color: var(--muted);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--hover);
  color: var(--ink);
}

.dropdown-item.danger {
  color: var(--accent);
}

.dropdown-divider {
  height: 1px;
  background: var(--subtle);
  margin: 6px 4px;
}

.badge-dot {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  font-family: var(--sans);
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 16px 20px;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-actions {
  display: flex;
  gap: 8px;
  padding: 6px 10px 10px;
}

.mobile-menu-actions .chip {
  height: 32px;
  font-size: 12.5px;
}

.mobile-menu > a,
.mobile-menu > button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  background: none;
  border-radius: 8px;
  font-size: 15px;
  text-align: left;
  color: var(--ink-2);
  cursor: pointer;
}

.mobile-menu a.active {
  color: var(--accent);
}

@media (max-width: 860px) {
  .nav { display: none; }
  .mobile-toggle { display: grid; }
  .header-inner { gap: 12px; }
}

/* ---------- 5. 按钮 ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.2s, background 0.2s, border-color 0.2s, opacity 0.2s;
  white-space: nowrap;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  --btn-bg: var(--accent);
  --btn-fg: #fffaf3;
  box-shadow: 0 8px 20px -10px rgba(163, 59, 40, 0.9);
}

.btn-primary:hover {
  --btn-bg: var(--accent-2);
}

.btn-ink {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
}

.btn-ghost {
  --btn-bd: var(--line);
  --btn-bg: var(--surface);
}

.btn-ghost:hover {
  --btn-bd: var(--faint);
}

.btn-quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink-2);
  padding: 0 12px;
}

.btn-quiet:hover {
  --btn-bg: var(--hover);
}

.btn-danger {
  --btn-bd: color-mix(in srgb, var(--accent) 45%, transparent);
  --btn-fg: var(--accent);
  --btn-bg: transparent;
}

.btn-danger:hover {
  --btn-bg: var(--accent-soft);
}

.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-xs {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 13.5px;
  cursor: pointer;
}

.btn-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 6. 通用元素 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.section {
  padding: 58px 0;
}

.section-tight {
  padding: 34px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: 0.08em;
  font-weight: 600;
}

.section-title .cn-num {
  color: var(--accent);
  margin-right: 8px;
  font-size: 0.82em;
}

.section-desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent { color: var(--accent); }
.serif { font-family: var(--serif); }

.dot-sep::before {
  content: "·";
  margin: 0 8px;
  color: var(--faint);
}

/* 标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--hover);
  color: var(--ink-2);
  font-size: 12px;
  border: 1px solid transparent;
  transition: 0.2s;
  cursor: pointer;
}

a.chip:hover,
button.chip:hover {
  border-color: var(--line);
  color: var(--accent);
}

.chip.solid {
  background: var(--accent-soft);
  color: var(--accent);
}

.chip.jade {
  background: var(--jade-soft);
  color: var(--jade);
}

.chip.plain {
  background: transparent;
  border-color: var(--line);
}

.chip.ghost-static {
  cursor: default;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  background: var(--hover);
  color: var(--muted);
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.published {
  background: var(--jade-soft);
  color: var(--jade);
}

.status-pill.draft {
  background: var(--hover);
  color: var(--muted);
}

.status-pill.pending {
  background: #f6ecd8;
  color: #9a6b18;
}

.status-pill.rejected {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.admin {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.author {
  background: var(--jade-soft);
  color: var(--jade);
}

/* 空状态 */
.empty {
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}

.empty-mark {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--faint);
  opacity: 0.6;
  margin-bottom: 10px;
}

.empty-title {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.empty p {
  font-size: 13.5px;
}

/* ---------- 7. 首页 ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 84px) 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto 40%;
  height: 120%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 72%);
  opacity: 0.85;
  pointer-events: none;
}

.hero-watermark {
  position: absolute;
  right: -2vw;
  top: -8vw;
  font-family: var(--serif);
  font-size: clamp(200px, 30vw, 400px);
  line-height: 1;
  color: var(--ink);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding-bottom: 44px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 7.4vw, 78px);
  line-height: 1.12;
  letter-spacing: 0.04em;
  margin-top: 20px;
  font-weight: 600;
}

.hero-line {
  display: block;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink-2);
  max-width: 33em;
  font-family: var(--serif);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-stats {
  display: flex;
  gap: clamp(24px, 5vw, 52px);
  margin-top: 46px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.stat-item .num {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.stat-item .num small {
  font-size: 13px;
  margin-left: 3px;
  color: var(--muted);
}

.stat-item .label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.14em;
}

.hero-side-note {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 96px;
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.42em;
  color: var(--faint);
  opacity: 0.8;
  display: none;
}

@media (min-width: 1100px) {
  .hero-side-note { display: block; }
}

/* 作品卡片 */
.work-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 34px 26px;
  align-items: flex-start;
}

/* 编辑荐读 */
.spotlight {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    110deg,
    var(--surface),
    color-mix(in srgb, var(--accent-soft) 42%, var(--surface))
  );
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.spotlight:hover {
  border-color: var(--faint);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.spotlight-cover .cover {
  box-shadow: 0 14px 30px -16px rgba(50, 35, 15, 0.6);
}

.spotlight-title {
  font-family: var(--serif);
  font-size: clamp(24px, 3.2vw, 36px);
  letter-spacing: 0.06em;
  margin-top: 10px;
  line-height: 1.25;
}

.spotlight-summary {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink-2);
  max-width: 42em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.spotlight-cta {
  margin-top: 22px;
  pointer-events: none;
}

@media (max-width: 640px) {
  .spotlight {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    align-items: start;
  }
  .spotlight-summary {
    display: none;
  }
  .spotlight-meta {
    margin-top: 10px;
    font-size: 12px;
  }
  .spotlight-cta {
    margin-top: 14px;
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
  }
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: 1 1 200px;
  max-width: 236px;
  min-width: 0;
}

.cover {
  position: relative;
  aspect-ratio: 3 / 4.1;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden;
  background: var(--subtle);
  box-shadow: 0 10px 24px -14px rgba(50, 35, 15, 0.55), 0 2px 4px rgba(50, 35, 15, 0.08);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s;
  isolation: isolate;
}

.cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 9px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.02));
  z-index: 3;
  pointer-events: none;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 12, 4, 0.34));
  z-index: 2;
  pointer-events: none;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card:hover .cover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px -16px rgba(50, 35, 15, 0.6), 0 3px 6px rgba(50, 35, 15, 0.1);
}

.cover-art {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 16px 16px 22px;
  color: #fdf8ef;
}

.cover-char {
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 52px);
  line-height: 1;
  opacity: 0.92;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.cover-caption {
  position: relative;
  z-index: 4;
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  opacity: 0.88;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  padding-right: 4px;
  color: #fdf8ef;
}

.cover-caption .ct {
  max-width: 78%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover-seal {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(253, 248, 239, 0.65);
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-size: 9px;
  letter-spacing: 0;
  opacity: 0.75;
  flex-shrink: 0;
}

.work-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.work-title {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.work-title:hover {
  color: var(--accent);
}

.work-meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 0;
  min-width: 0;
}

.work-meta .author {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.empty-cover-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 12px;
}

/* 首页：双栏 */
.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

@media (max-width: 900px) {
  .home-split { grid-template-columns: 1fr; }
}

.update-list {
  display: flex;
  flex-direction: column;
}

.update-item {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 16px 2px;
  border-bottom: 1px solid var(--subtle);
  transition: 0.2s;
}

.update-item:hover {
  border-bottom-color: var(--line);
}

.update-item:hover .u-title {
  color: var(--accent);
}

.u-index {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--faint);
  width: 22px;
  flex-shrink: 0;
  letter-spacing: 0.06em;
}

.u-main {
  flex: 1;
  min-width: 0;
}

.u-chapter {
  font-size: 15px;
  font-family: var(--serif);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.u-title {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.u-time {
  font-size: 12px;
  color: var(--faint);
  flex-shrink: 0;
}

.author-list {
  display: grid;
  gap: 2px;
}

.author-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  transition: 0.2s;
}

.author-item:hover {
  background: var(--hover);
}

.author-item .meta {
  min-width: 0;
}

.author-item .name {
  font-size: 14px;
}

.author-item .desc {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-item .count {
  margin-left: auto;
  font-size: 12px;
  color: var(--faint);
  flex-shrink: 0;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 首页征稿条 */
.callout {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 46px);
  background: linear-gradient(120deg, var(--surface), color-mix(in srgb, var(--accent-soft) 55%, var(--surface)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.callout h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: 0.06em;
}

.callout p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 14px;
  max-width: 40em;
}

.callout-mark {
  position: absolute;
  right: 24px;
  bottom: -34px;
  font-family: var(--serif);
  font-size: 150px;
  color: var(--accent);
  opacity: 0.07;
  pointer-events: none;
}

/* ---------- 8. 书库 ---------- */
.page-head {
  padding: 46px 0 26px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.page-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 22px 0;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  transition: 0.2s;
}

.search-box input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.select {
  height: 42px;
  padding: 0 34px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background-color: var(--surface);
  font-size: 13.5px;
  color: var(--ink-2);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23857c6d' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 20px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--subtle);
  margin-bottom: 30px;
  gap: 16px;
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 52px;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.page-btn:hover {
  background: var(--hover);
}

.page-btn.active {
  background: var(--ink);
  color: var(--paper);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-ellipsis {
  color: var(--faint);
  padding: 0 4px;
}

/* ---------- 9. 作品详情 ---------- */
.work-hero {
  padding: 44px 0 46px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.work-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 120% at 85% 0%, var(--accent-soft), transparent 65%);
  opacity: 0.5;
  pointer-events: none;
}

.work-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

@media (max-width: 680px) {
  .work-hero-inner {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 22px;
  }
}

.work-hero .cover {
  aspect-ratio: 3 / 4.1;
  box-shadow: 0 18px 40px -18px rgba(50, 35, 15, 0.6), 0 3px 8px rgba(50, 35, 15, 0.1);
}

.work-hero .cover-char {
  font-size: 46px;
}

.work-hero-title {
  font-family: var(--serif);
  font-size: clamp(30px, 4.6vw, 46px);
  letter-spacing: 0.05em;
  line-height: 1.15;
  font-weight: 600;
}

.work-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.work-hero-summary {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink-2);
  max-width: 46em;
  white-space: pre-wrap;
}

.work-hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  flex-wrap: wrap;
  align-items: center;
}

.work-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.work-stats-bar b {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  margin-right: 3px;
}

.chapter-panel {
  padding: 44px 0 70px;
}

.chapter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.chapter-list {
  border-top: 1px solid var(--line);
}

.chapter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 10px;
  border-bottom: 1px solid var(--subtle);
  transition: 0.18s;
}

a.chapter-row:hover {
  background: var(--hover);
  padding-left: 16px;
}

.chapter-num {
  font-family: var(--serif);
  font-size: 12.5px;
  color: var(--faint);
  min-width: 30px;
  letter-spacing: 0.05em;
}

.chapter-name {
  font-family: var(--serif);
  font-size: 15.5px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-words {
  font-size: 12px;
  color: var(--faint);
  flex-shrink: 0;
}

.chapter-date {
  font-size: 12px;
  color: var(--faint);
  flex-shrink: 0;
  width: 92px;
  text-align: right;
}

@media (max-width: 600px) {
  .chapter-date { display: none; }
}

.author-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-top: 34px;
}

.author-card .bio {
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 6px;
  line-height: 1.8;
}

/* ---------- 10. 阅读器 ---------- */
.reader-page {
  --reader-size: 19px;
  --reader-line: 2.05;
  background: var(--reading-bg);
  min-height: calc(100vh - var(--header-h));
  transition: background 0.3s;
}

.reader-page[data-reader-theme="paper"] {
  --reading-bg: #f9f5ec;
  --reading-ink: #241f19;
  --reader-line-color: #e6ddca;
  --reader-muted: #8a8171;
}

.reader-page[data-reader-theme="sepia"] {
  --reading-bg: #f2e5cc;
  --reading-ink: #3a2c1c;
  --reader-line-color: #ddc9a4;
  --reader-muted: #8a7554;
}

.reader-page[data-reader-theme="night"] {
  --reading-bg: #16150f;
  --reading-ink: #cfc6b4;
  --reader-line-color: #2c281f;
  --reader-muted: #7e7768;
}

.reader-page[data-reader-theme="graphite"] {
  --reading-bg: #1d1f21;
  --reading-ink: #c8cacb;
  --reader-line-color: #2e3133;
  --reader-muted: #7f8486;
}

.reader-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--reading-bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--reader-line-color);
}

.reader-topbar-inner {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.reader-title {
  font-family: var(--serif);
  font-size: 14.5px;
  color: var(--reading-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-align: center;
  opacity: 0.85;
}

.reader-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.reader-tool {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--reader-muted);
  cursor: pointer;
  transition: 0.18s;
}

.reader-tool:hover {
  background: var(--hover);
  color: var(--reading-ink);
}

.reader-progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 2px;
  background: var(--accent);
  z-index: 70;
  width: 0;
  transition: width 0.1s linear;
}

.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--reader-muted);
  flex-shrink: 0;
}

.reader-back:hover {
  color: var(--reading-ink);
}

.article-wrap {
  padding: clamp(34px, 6vw, 64px) 0 80px;
}

.article {
  width: min(44em, 100% - 48px);
  margin-inline: auto;
  color: var(--reading-ink);
  font-family: var(--serif);
  font-size: var(--reader-size);
  line-height: var(--reader-line);
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}

.article-head {
  margin-bottom: 40px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--reader-line-color);
  text-align: center;
}

.article-kicker {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--reader-muted);
  text-transform: uppercase;
}

.article-title {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.3;
  letter-spacing: 0.05em;
  margin-top: 12px;
  font-weight: 600;
}

.article-sub {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--reader-muted);
  letter-spacing: 0.06em;
}

.article p {
  margin: 0 0 1.35em;
  text-indent: 2em;
  text-align: justify;
}

.article h1,
.article h2,
.article h3,
.article h4 {
  font-family: var(--serif);
  text-indent: 0;
  margin: 2.2em 0 0.9em;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.article h1 { font-size: 1.55em; }
.article h2 { font-size: 1.32em; }
.article h3 { font-size: 1.14em; }
.article h4 { font-size: 1em; color: var(--reader-muted); }

.article blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 1.2em;
  border-left: 2px solid var(--accent);
  color: var(--reader-muted);
  font-style: normal;
}

.article blockquote p {
  text-indent: 0;
  margin-bottom: 0.6em;
}

.article ul,
.article ol {
  margin: 1.2em 0 1.5em;
  padding-left: 1.6em;
}

.article li {
  margin-bottom: 0.4em;
}

.article hr {
  border: 0;
  height: 1px;
  background: var(--reader-line-color);
  margin: 2.6em 0;
}

.article hr.fancy {
  height: auto;
  background: none;
  text-align: center;
}

.article hr.fancy::after {
  content: "· · ·";
  letter-spacing: 0.6em;
  color: var(--reader-muted);
  font-size: 0.9em;
}

.article img {
  border-radius: 6px;
  margin: 1.8em auto;
  max-width: 100%;
}

.article a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.article strong { font-weight: 600; }
.article em { font-style: italic; }
.article code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--hover);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
.article pre {
  background: var(--hover);
  padding: 1em 1.2em;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.86em;
  line-height: 1.7;
}
.article pre code {
  background: none;
  padding: 0;
}
.article .note {
  text-indent: 0;
  font-family: var(--sans);
  font-size: 0.78em;
  color: var(--reader-muted);
  border-top: 1px dashed var(--reader-line-color);
  padding-top: 1em;
  margin-top: 3em;
}

.article-end {
  margin: 56px 0 4px;
  text-align: center;
  color: var(--reader-muted);
  font-size: 12px;
  letter-spacing: 0.3em;
}

.article-end::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--reader-line-color);
  margin: 0 auto 18px;
}

.chapter-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: min(44em, 100% - 48px);
  margin: 18px auto 0;
}

.chapter-nav-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--reader-line-color);
  border-radius: 10px;
  color: var(--reading-ink);
  transition: 0.2s;
  min-width: 0;
  background: color-mix(in srgb, var(--reading-ink) 2%, transparent);
}

.chapter-nav-btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.chapter-nav-btn.next {
  text-align: right;
  align-items: flex-end;
}

.chapter-nav-btn .k {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--reader-muted);
}

.chapter-nav-btn .t {
  font-family: var(--serif);
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.chapter-nav-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* 阅读设置面板 */
.reader-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 268px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 80;
  animation: popIn 0.18s ease-out;
  color: var(--ink);
}

.reader-panel h4 {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 500;
}

.reader-panel + .reader-panel {
  bottom: 300px;
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.theme-swatch {
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 13px;
}

.theme-swatch.active {
  box-shadow: 0 0 0 2px var(--accent);
}

.swatch-paper { background: #f9f5ec; color: #241f19; }
.swatch-sepia { background: #f2e5cc; color: #3a2c1c; }
.swatch-night { background: #16150f; color: #cfc6b4; }
.swatch-graphite { background: #1d1f21; color: #c8cacb; }

.size-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.size-row button {
  width: 38px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--serif);
  cursor: pointer;
}

.size-row button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.size-row .val {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* 目录抽屉 */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 6, 0.4);
  backdrop-filter: blur(2px);
  z-index: 90;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 88vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  z-index: 91;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.26s cubic-bezier(0.22, 0.8, 0.3, 1);
  box-shadow: var(--shadow-lg);
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: none; }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.drawer-head h3 {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.08em;
}

.drawer-body {
  overflow-y: auto;
  padding: 10px 0 24px;
}

.toc-item {
  display: flex;
  gap: 12px;
  padding: 11px 22px;
  font-size: 14px;
  color: var(--ink-2);
  border-left: 2px solid transparent;
}

.toc-item:hover {
  background: var(--hover);
}

.toc-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.toc-item .n {
  color: var(--faint);
  font-size: 12px;
  font-family: var(--serif);
  min-width: 20px;
  padding-top: 1px;
}

/* ---------- 11. 认证页 ---------- */
.auth-wrap {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: grid;
  place-items: center;
  padding: 56px 0 80px;
}

.auth-card {
  width: min(430px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 42px);
  box-shadow: var(--shadow);
  position: relative;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.auth-title {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.1em;
  text-align: center;
}

.auth-sub {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 8px;
  margin-bottom: 30px;
}

.auth-foot {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

.auth-foot a {
  color: var(--accent);
}

.auth-foot a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 表单 */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.field > label {
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field .hint {
  font-size: 11.5px;
  color: var(--faint);
}

.input,
.textarea,
.select-field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
  padding: 10px 13px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input {
  height: 42px;
}

.textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.8;
}

.input:focus,
.textarea:focus,
.select-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
  background: var(--surface);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--faint);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  line-height: 1.6;
}

.check input {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.form-error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}

.form-note {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--hover);
  border-radius: 9px;
  padding: 11px 14px;
  line-height: 1.75;
}

/* ---------- 12. 个人中心 ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 860px) {
  .profile-grid { grid-template-columns: 1fr; }
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px;
  text-align: center;
}

.profile-card .avatar {
  margin: 0 auto 14px;
}

.profile-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.06em;
}

.profile-handle {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

.profile-bio {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.8;
  text-align: left;
  padding-top: 16px;
  border-top: 1px solid var(--subtle);
  white-space: pre-wrap;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  overflow-x: auto;
}

.tab {
  padding: 11px 16px;
  border: 0;
  background: none;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(20px, 3vw, 30px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.panel-title {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.06em;
}

/* ---------- 13. 工作台 ---------- */
.workspace {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  padding: 34px 0 90px;
  align-items: start;
}

@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; gap: 18px; }
  .side-nav { display: flex; overflow-x: auto; border: 0; padding: 0; gap: 4px; }
}

.side-nav {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  border-right: 1px solid var(--line);
  padding-right: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

@media (max-width: 860px) {
  .side-nav {
    position: static;
    flex-direction: row;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: 0.18s;
  white-space: nowrap;
}

.side-link:hover {
  background: var(--hover);
}

.side-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.side-link svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.side-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--faint);
  padding: 14px 12px 6px;
  text-transform: uppercase;
}

.ws-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.ws-title {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.08em;
}

.ws-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
}

.stat-card .k {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.stat-card .v {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.3;
  margin-top: 6px;
}

.stat-card .v small {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--sans);
  margin-left: 4px;
}

/* 表格 */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 640px;
}

.table th {
  text-align: left;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: color-mix(in srgb, var(--paper-2) 60%, transparent);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--subtle);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: var(--hover);
}

.table .cell-title {
  font-family: var(--serif);
  font-size: 14.5px;
}

.table .actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.row-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-user .meta {
  min-width: 0;
}

.row-user .name {
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-user .sub {
  font-size: 11.5px;
  color: var(--faint);
}

/* 作品管理卡片 */
.work-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: 0.2s;
}

.work-row:hover {
  border-color: var(--faint);
  box-shadow: var(--shadow-sm);
}

.mini-cover {
  width: 46px;
  height: 62px;
  border-radius: 3px 6px 6px 3px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: rgba(253, 248, 239, 0.9);
  font-family: var(--serif);
  font-size: 19px;
  box-shadow: var(--shadow-sm);
}

.work-row-main {
  flex: 1;
  min-width: 0;
}

.work-row-title {
  font-family: var(--serif);
  font-size: 15.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.work-row-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.work-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .work-row { flex-wrap: wrap; }
  .work-row-actions { width: 100%; justify-content: flex-start; }
}

/* ---------- 14. 编辑器 ---------- */
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.editor-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.editor-title-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--serif);
  font-size: 24px;
  padding: 8px 0 12px;
  letter-spacing: 0.04em;
}

.editor-title-input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.toolbar {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: var(--paper-2);
  position: sticky;
  top: var(--header-h);
  z-index: 10;
}

.toolbar button {
  height: 32px;
  min-width: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.toolbar button:hover {
  background: var(--hover);
  color: var(--accent);
}

.toolbar .sep {
  width: 1px;
  background: var(--line);
  margin: 5px 4px;
}

.editor-textarea {
  width: 100%;
  min-height: 58vh;
  border: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  padding: 24px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
  resize: vertical;
}

.editor-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.preview-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 32px;
}

.preview-box .article {
  width: 100%;
  --reader-size: 17px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--hover);
  gap: 2px;
}

.segmented button {
  border: 0;
  background: none;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}

.segmented button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* 封面上传 */
.cover-picker {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.cover-preview {
  width: 118px;
  aspect-ratio: 3 / 4.1;
  border-radius: 4px 9px 9px 4px;
  overflow: hidden;
  background: var(--subtle);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 12px;
  border: 1px dashed var(--line);
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 15. 审核 ---------- */
.review-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  margin-bottom: 14px;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.review-head .who {
  font-size: 14px;
}

.review-head .time {
  margin-left: auto;
  font-size: 12px;
  color: var(--faint);
}

.review-body {
  margin: 16px 0;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink-2);
  white-space: pre-wrap;
  border-left: 2px solid var(--subtle);
  padding-left: 14px;
}

.review-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--subtle);
}

.review-actions .input {
  flex: 1;
  min-width: 160px;
  height: 34px;
  font-size: 13px;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-bottom: 18px;
  font-size: 13.5px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  border: 2px solid var(--paper);
}

.timeline-item.done::before {
  background: var(--jade);
}

.timeline-item.now::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.timeline-item .t {
  color: var(--faint);
  font-size: 12px;
  margin-top: 2px;
}

/* ---------- 16. 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 46px 0 40px;
  margin-top: auto;
  background: color-mix(in srgb, var(--paper-2) 55%, transparent);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 340px;
}

.footer-brand .brand-name {
  font-size: 18px;
}

.footer-desc {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.9;
  white-space: pre-wrap;
}

.footer-links {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
}

.footer-col h5 {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--faint);
  font-weight: 500;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  padding: 4px 0;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--subtle);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--faint);
}

/* ---------- 17. 弹窗 / 提示 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(24, 16, 8, 0.42);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.18s;
}

.modal {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 26px;
  animation: modalIn 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal h3 {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.06em;
}

.modal p {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.8;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

.toast-root {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--ink);
  color: var(--paper);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.26s cubic-bezier(0.2, 0.8, 0.3, 1);
  max-width: min(88vw, 460px);
}

.toast.error {
  background: var(--accent);
  color: #fff;
}

.toast.success {
  background: var(--jade);
  color: #fff;
}

.toast.out {
  animation: toastOut 0.2s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px); }
}

/* ---------- 18. 骨架 / 加载 ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--subtle) 25%, var(--hover) 37%, var(--subtle) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.loading-block {
  padding: 80px 0;
  text-align: center;
  color: var(--faint);
  font-family: var(--serif);
  letter-spacing: 0.2em;
  font-size: 13px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- 19. 杂项 ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 20px 0 0;
  flex-wrap: wrap;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  color: var(--faint);
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 22px;
}

.notice.warn {
  border-color: color-mix(in srgb, #b8860b 35%, transparent);
  background: color-mix(in srgb, #f6ecd8 60%, var(--surface));
}

.notice.danger {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: var(--accent-soft);
}

.notice svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.prose-block {
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.hr-text {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  margin: 28px 0;
}

.hr-text::before,
.hr-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hide { display: none !important; }

@media (max-width: 640px) {
  .container,
  .container-narrow {
    width: calc(100% - 32px);
  }
  .section { padding: 40px 0; }
  .work-grid { gap: 26px 16px; }
  .work-card { flex: 1 1 calc(50% - 8px); max-width: none; }
  .work-title { font-size: 15px; }
  .hero h1 { font-size: clamp(33px, 9.4vw, 50px); }
  .hero-stats { gap: 24px; }
  .article { width: calc(100% - 32px); }
  .chapter-nav { width: calc(100% - 32px); }
  .reader-title { display: none; }
  .reader-panel { right: 12px; left: 12px; bottom: 12px; width: auto; }
  .site-footer { padding: 34px 0 30px; }
}

@media print {
  .site-header, .site-footer, .reader-topbar, .reader-tools, .chapter-nav, .reader-panel { display: none !important; }
  .article { width: 100%; }
}

/* ==========================================================================
   20. 补充：阅读模式、进度条、细节修正
   ========================================================================== */

/* 沉浸阅读时隐藏站点外壳 */
body.reading-mode .site-header,
body.reading-mode .site-footer {
  display: none;
}

body.reading-mode .reader-page {
  min-height: 100vh;
}

/* 路由切换进度条 */
.route-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 500;
  opacity: 0;
  transition: width 0.4s ease, opacity 0.3s ease;
  pointer-events: none;
}

.icon {
  display: inline-block;
  vertical-align: -0.145em;
  flex-shrink: 0;
}

/* 申请页：正文在左，说明在右 */
.profile-grid.reverse {
  grid-template-columns: minmax(0, 1fr) 300px;
}

@media (max-width: 900px) {
  .profile-grid.reverse {
    grid-template-columns: 1fr;
  }
  .dash-cols {
    grid-template-columns: 1fr !important;
  }
}

/* 侧栏按钮化链接 */
button.side-link {
  width: 100%;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.side-nav .badge-dot {
  margin-left: auto;
}

/* 章节列表里的图标按钮 */
.chapter-row .icon-btn {
  color: var(--faint);
}

.chapter-row .icon-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* 文章中的插图 */
.article figure {
  margin: 1.9em 0;
  text-indent: 0;
}

.article figcaption {
  text-align: center;
  font-size: 0.82em;
  color: var(--reader-muted);
  margin-top: 0.6em;
}

/* 编辑器 */
textarea.editor-textarea {
  display: block;
  tab-size: 2;
}

.editor-textarea::placeholder {
  color: var(--faint);
}

/* 移动端顶栏 */
@media (max-width: 560px) {
  .header-right [data-action="search"],
  .header-right [data-action="theme"] {
    display: none;
  }
  .user-chip-name {
    display: none;
  }
  .user-chip {
    padding: 0 8px 0 4px;
  }
  .hero-side-note {
    display: none;
  }
  .work-hero .cover {
    max-width: 132px;
  }
  .mobile-menu-actions {
    display: flex;
    gap: 8px;
    padding: 6px 10px 10px;
  }
}

/* 阅读页在窄屏的留白 */
@media (max-width: 640px) {
  .article-head {
    margin-bottom: 28px;
  }
  .article {
    font-size: var(--reader-size);
  }
  .reader-topbar-inner {
    height: 52px;
  }
}

/* 表格里的链接 */
.table a:hover {
  color: var(--accent);
}

/* 首页悬浮封面在大屏 */
@media (min-width: 1200px) {
  .work-grid {
    gap: 38px 30px;
  }
}

/* 可访问性：减少动画 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   21. 收藏 · 评论 · 版权存证
   ========================================================================== */

/* 收藏按钮 */
.fav-btn {
  gap: 7px;
}

.fav-btn .fav-count {
  font-size: 12px;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.reader-tool.fav-tool {
  width: auto;
  padding: 0 8px;
  gap: 5px;
}

.reader-tool.fav-tool .fav-count {
  font-size: 11.5px;
  color: var(--reader-muted);
}

.reader-tool.fav-tool.is-on {
  color: var(--accent);
}

/* 版权与存证卡片 */
.rights-box {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  padding: 16px 18px;
}

.rights-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--subtle);
}

.rights-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px 20px;
  margin: 14px 0 0;
}

.rights-item dt {
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.rights-item dd {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}

.rights-item .rights-note {
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 3px;
  line-height: 1.6;
}

.fingerprint {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--hover);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.chapter-comments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--faint);
  margin-right: 14px;
  flex-shrink: 0;
}

/* 阅读页版权注脚 */
.article-license {
  margin-top: 18px;
  text-align: center;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--reader-muted);
  line-height: 1.9;
}

/* 评论区 */
.comments {
  --c-line: var(--line);
  --c-text: var(--ink);
  --c-muted: var(--muted);
  --c-soft: var(--surface);
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--c-line);
}

.work-comments {
  margin-top: 44px;
}

.comments-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.comments-title {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--c-text);
}

.comments-count {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--c-muted);
  margin-left: 6px;
}

.comments-hint {
  font-size: 11.5px;
  color: var(--c-muted);
}

.comment-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px dashed var(--c-line);
  border-radius: 10px;
  color: var(--c-muted);
  font-size: 13px;
  margin-bottom: 22px;
}

.comment-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.comment-form .avatar {
  flex-shrink: 0;
}

.comment-input-wrap {
  flex: 1;
  min-width: 0;
}

.comment-input {
  width: 100%;
  border: 1px solid var(--c-line);
  background: var(--c-soft);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.75;
  resize: vertical;
  min-height: 58px;
  color: inherit;
  font-family: inherit;
}

.comment-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.comment-form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.comment-rule {
  font-size: 11.5px;
  color: var(--c-muted);
}

.comment-list {
  display: flex;
  flex-direction: column;
}

.comment {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--c-line);
}

.comment:first-child {
  border-top: 0;
}

.comment.is-muted {
  opacity: 0.62;
}

.comment .avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--c-muted);
}

.comment-name {
  font-size: 13.5px;
  color: var(--c-text);
  font-weight: 500;
}

.comment-time {
  color: var(--c-muted);
  font-size: 11.5px;
}

.comment-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
  color: var(--c-text);
  overflow-wrap: anywhere;
}

.comment-actions {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

.comment-action {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  color: var(--c-muted);
  cursor: pointer;
}

.comment-action:hover {
  color: var(--accent);
}

.comment-action.danger:hover {
  color: var(--accent);
}

.comment-replies {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 1px solid var(--c-line);
}

.comment-replies .comment {
  padding: 12px 0;
}

.comment-empty {
  padding: 26px 0;
  font-size: 13px;
  color: var(--c-muted);
}

.reply-form {
  margin: 10px 0 4px;
}

.pill-mini {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pill-mini.admin {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill-mini.author {
  background: var(--jade-soft);
  color: var(--jade);
}

.pill-mini.pending {
  background: #f6ecd8;
  color: #9a6b18;
}

.pill-mini.hidden {
  background: var(--hover);
  color: var(--muted);
}

/* 阅读页内的评论跟随阅读主题 */
.reader-page .comments {
  --c-line: var(--reader-line-color);
  --c-text: var(--reading-ink);
  --c-muted: var(--reader-muted);
  --c-soft: transparent;
}

.reader-comments {
  width: min(44em, 100% - 48px);
  margin: 40px auto 0;
}

.reader-page .comment-input {
  background: color-mix(in srgb, var(--reading-ink) 3%, transparent);
}

.reader-page .pill-mini.admin {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

.reader-page .pill-mini.author {
  background: color-mix(in srgb, var(--jade) 20%, transparent);
}

.reader-page .comment-login {
  border-color: var(--reader-line-color);
}

/* 版权说明页 */
.copyright-body {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}

.copyright-body section {
  padding: 26px 0;
  border-bottom: 1px solid var(--subtle);
}

.copyright-body h2 {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.copyright-body p {
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.copyright-body ul,
.copyright-body ol {
  margin: 8px 0 12px;
  padding-left: 1.4em;
}

.copyright-body li {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.copyright-body a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.copyright-body strong {
  color: var(--ink);
}

@media (max-width: 640px) {
  .comment-form .avatar {
    display: none;
  }
  .comment-rule {
    display: none;
  }
  .rights-grid {
    grid-template-columns: 1fr 1fr;
  }
  .reader-comments {
    width: calc(100% - 32px);
  }
}

/* 收藏按钮在阅读器顶栏内保持一行 */
.reader-tool.fav-tool {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

/* 长指纹允许换行，不撑破卡片 */
.fingerprint {
  word-break: break-all;
}

.rights-item dd {
  overflow-wrap: anywhere;
}

/* 访客昵称评论 */
.comment-name-input {
  margin-bottom: 8px;
  height: 38px;
  font-size: 13.5px;
}

.avatar.guest {
  background: linear-gradient(135deg, #8a7f6e, #b0a28c);
}

.pill-mini.guest {
  background: var(--hover);
  color: var(--ink-2);
}

.reader-page .pill-mini.guest {
  background: color-mix(in srgb, var(--reading-ink) 8%, transparent);
  color: var(--reader-muted);
}
