.article-shell {
  min-height: 100vh;
  background: var(--bg);
}

.article-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 30px;
  background: rgba(247, 243, 235, .82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--rule-soft);
}

.article-nav a {
  color: var(--ink);
  text-decoration: none;
}

.article-nav .brand {
  font-family: var(--display);
  font-size: 20px;
}

.article-nav .back {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
}

.article-wrap {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 110px;
}

.article-head {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 38px;
  margin-bottom: 42px;
}

.article-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 12px;
}

.article-tag {
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 4px;
  padding: 4px 9px;
  font-family: var(--serif);
  font-size: 14px;
}

.article-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.18;
  letter-spacing: 0;
}

.article-summary {
  margin: 24px 0 0;
  max-width: 760px;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.85;
}

.article-body {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 2;
  color: var(--ink-2);
}

.article-body h2 {
  margin: 48px 0 12px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.45;
  font-weight: 600;
}

.article-body p {
  margin: 18px 0;
}

.article-body blockquote {
  margin: 34px 0;
  padding: 22px 26px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}

.article-empty {
  padding: 70px 0;
  text-align: center;
  color: var(--mute);
}

.article-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  color: var(--mute);
  font-size: 14px;
}
.consult-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  background: var(--accent-soft, #f7f3eb);
  border: 1px solid var(--rule-soft, #ece6da);
  border-radius: 14px;
  padding: 26px 20px;
}
.consult-title {
  font-family: var(--serif, Georgia, serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink, #1a1814);
  letter-spacing: .02em;
}
.consult-qr {
  width: 180px;
  height: 180px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(26,24,20,.08);
}
.consult-caption {
  font-size: 13.5px;
  color: var(--mute, #8a8275);
  line-height: 1.6;
  max-width: 360px;
}

/* ── 分享海报 ───────────────────────────────────────────────── */
.poster-share {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.poster-btn {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif, Georgia, serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 11px 22px;
  border-radius: 999px;
  background: transparent;
  color: var(--accent, #a8431f);
  border: 1px solid var(--accent, #a8431f);
  transition: background .18s ease, color .18s ease;
}
.poster-btn:hover {
  background: var(--accent, #a8431f);
  color: #fff;
}
.poster-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  background: rgba(20, 18, 14, .82);
  backdrop-filter: blur(2px);
  overflow: auto;
}
.poster-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, .14);
}
.poster-modal-close:hover { background: rgba(255, 255, 255, .26); }
.poster-modal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 90vw;
}
.poster-img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.poster-loading {
  color: #f7f3eb;
  font-family: var(--serif, Georgia, serif);
  font-size: 15px;
  padding: 40px 20px;
}
.poster-caption {
  color: #f7f3eb;
  font-size: 14px;
  letter-spacing: .02em;
  text-align: center;
}

@media (max-width: 720px) {
  .article-nav {
    padding: 14px 18px;
  }

  .article-wrap {
    width: min(100% - 28px, 920px);
    padding-top: 46px;
  }

  .article-body {
    font-size: 18px;
    line-height: 1.9;
  }

  .article-footer {
    flex-direction: column;
  }
}

/* ── Comment Section ─────────────────────────────────────────────────────────── */
.cmt-section {
  max-width: 720px;
  margin: 4rem auto 0;
  padding: 2rem 1.5rem 4rem;
  border-top: 1px solid var(--border, rgba(0,0,0,.1));
}

.cmt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.cmt-title {
  font-family: var(--display, serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text, #1a1814);
  margin: 0;
}

.cmt-user-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cmt-username {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text, #1a1814);
}

/* Buttons */
.cmt-btn-outline {
  background: none;
  border: 1px solid var(--accent, #a8431f);
  color: var(--accent, #a8431f);
  border-radius: 4px;
  cursor: pointer;
  font-size: .85rem;
  padding: .35rem .8rem;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.cmt-btn-outline:hover { background: var(--accent, #a8431f); color: #fff; }

.cmt-btn-primary {
  background: var(--accent, #a8431f);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: .875rem;
  padding: .4rem 1.1rem;
  font-family: inherit;
  transition: opacity .15s;
}
.cmt-btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.cmt-btn-primary.full { width: 100%; padding: .6rem; font-size: .95rem; margin-top: .75rem; }

.cmt-btn-ghost {
  background: none;
  border: 1px solid var(--border, rgba(0,0,0,.15));
  color: var(--text-secondary, #555);
  border-radius: 4px;
  cursor: pointer;
  font-size: .85rem;
  padding: .3rem .7rem;
  font-family: inherit;
  transition: border-color .15s;
}
.cmt-btn-ghost:hover { border-color: var(--accent, #a8431f); color: var(--accent, #a8431f); }
.cmt-btn-ghost:disabled { opacity: .5; cursor: not-allowed; }
.cmt-btn-ghost.sm { padding: .2rem .5rem; font-size: .78rem; }

/* Form */
.cmt-form { margin-bottom: 2rem; }

.cmt-textarea {
  width: 100%;
  min-height: 80px;
  padding: .7rem 1rem;
  border: 1px solid var(--border, rgba(0,0,0,.15));
  border-radius: 6px;
  background: var(--bg-subtle, rgba(0,0,0,.02));
  color: var(--text, #1a1814);
  font-size: .9rem;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color .2s;
}
.cmt-textarea:focus { outline: none; border-color: var(--accent, #a8431f); }

.cmt-form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: .5rem;
}
.cmt-char { font-size: .8rem; color: var(--muted, #999); }
.cmt-err { color: #c00; font-size: .85rem; margin: .2rem 0 0; flex: 1; }

/* Comment list */
.cmt-list { display: flex; flex-direction: column; gap: 1.25rem; }
.cmt-empty { text-align: center; color: var(--muted, #999); font-size: .9rem; padding: 2rem 0; }

.cmt-item { display: flex; gap: .9rem; }
.cmt-body { flex: 1; min-width: 0; }

.cmt-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .3rem;
}
.cmt-name { font-weight: 500; font-size: .875rem; color: var(--text, #1a1814); }
.cmt-date { font-size: .78rem; color: var(--muted, #aaa); }
.cmt-del {
  margin-left: auto;
  background: none; border: none;
  color: var(--muted, #bbb); cursor: pointer;
  font-size: .75rem; padding: 0;
}
.cmt-del:hover { color: #c00; }

.cmt-content {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-secondary, #444);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Modal */
.cmt-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: 1rem;
}
.cmt-modal {
  background: var(--bg, #f7f3eb);
  border-radius: 10px;
  padding: 1.75rem;
  width: 100%; max-width: 360px;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
.cmt-modal-close {
  position: absolute; top: .6rem; right: .9rem;
  background: none; border: none;
  font-size: 1.35rem; color: var(--muted, #aaa);
  cursor: pointer; line-height: 1;
}
.cmt-modal-title { margin: 0 0 .4rem; font-size: 1.1rem; color: var(--text, #1a1814); }
.cmt-modal-sub { font-size: .85rem; color: var(--muted, #999); margin: 0 0 1rem; }

.cmt-input {
  width: 100%;
  padding: .6rem .9rem;
  border: 1px solid var(--border, rgba(0,0,0,.15));
  border-radius: 6px;
  background: var(--bg-subtle, rgba(0,0,0,.02));
  color: var(--text, #1a1814);
  font-size: .95rem;
  box-sizing: border-box;
  font-family: inherit;
  margin-bottom: .6rem;
  transition: border-color .2s;
}
.cmt-input:focus { outline: none; border-color: var(--accent, #a8431f); }

.cmt-row-end { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; }

.cmt-avatar-row {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;
}

/* Dark theme overrides */
[data-theme="night"] .cmt-modal { background: #1a1a1e; }
[data-theme="night"] .cmt-textarea,
[data-theme="night"] .cmt-input { background: rgba(255,255,255,.05); color: #e8e6e1; border-color: rgba(255,255,255,.12); }
[data-theme="night"] .cmt-content { color: #b8b4ae; }

/* ── Comment v2: submitted notice, pinned/featured, admin reply, personal center */
.cmt-submitted-notice {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  padding: .85rem 1rem; background: rgba(0,120,0,.07); border-radius: 6px;
  font-size: .875rem; color: var(--text, #1a1814); margin-bottom: .5rem;
}

.cmt-pin-badge {
  font-size: .75rem; padding: 1px 6px; border-radius: 10px;
  background: #e8f0fe; color: #3a60c0; margin-right: 2px;
}
.cmt-feat-badge {
  font-size: .75rem; padding: 1px 6px; border-radius: 10px;
  background: #fdf8e1; color: #b08000; margin-right: 2px;
}
.cmt-item.cmt-featured { border-left: 3px solid #e6b800; padding-left: .75rem; }

.cmt-admin-reply {
  margin-top: .75rem; padding: .65rem .9rem;
  background: var(--bg-subtle, rgba(0,0,0,.04)); border-radius: 6px; border-left: 3px solid var(--accent, #a8431f);
}
.cmt-admin-label {
  font-size: .75rem; font-weight: 600; color: var(--accent, #a8431f);
  margin-right: .5rem; background: rgba(168,67,31,.1); padding: 1px 6px; border-radius: 10px;
}

/* Status badges */
.cmt-status-badge { font-size: .73rem; padding: 1px 7px; border-radius: 10px; font-weight: 500; }
.badge-pending   { background: #fff3e0; color: #c07010; }
.badge-published { background: #e8f5e9; color: #2a7a2a; }
.badge-hidden    { background: #f0f0f0; color: #888; }

/* Personal center modal wide */
.cmt-modal-wide { max-width: 520px; }
.my-cmt-list { display: flex; flex-direction: column; gap: .85rem; max-height: 60vh; overflow-y: auto; }
.my-cmt-item { padding: .75rem; background: var(--bg-subtle, rgba(0,0,0,.03)); border-radius: 6px; }
.my-cmt-item.is-pinned { border-left: 3px solid var(--accent, #a8431f); }
.my-cmt-item.is-featured { border-left: 3px solid #e6b800; }
.my-cmt-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-bottom: .35rem; font-size: .78rem; }
.my-cmt-article { color: var(--muted, #999); }


/* ── Comment v3: refined modals (profile / my comments) ──────────────────────── */
.cmt-modal {
  max-width: 420px;
  padding: 28px 24px 22px;
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0,0,0,.25);
}

.cmt-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--muted, #888);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  padding: 0;
}
.cmt-modal-close:hover { background: rgba(0,0,0,.06); color: var(--text, #1a1814); }

.cmt-modal-title { font-family: var(--display, serif); font-size: 1.35rem; margin: 0 0 .35rem; font-weight: 600; }
.cmt-modal-sub { font-size: .82rem; color: var(--muted, #999); margin: 0 0 1.25rem; line-height: 1.5; }

/* ── Profile modal ────────────────────────────────────────────────────────────── */
.cmt-modal-profile { max-width: 380px; }

.cmt-profile-card {
  display: flex; align-items: center; gap: 18px;
  padding: 16px;
  background: var(--bg-subtle, rgba(0,0,0,.03));
  border-radius: 10px;
  margin-bottom: 1.25rem;
}
.cmt-profile-actions { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.cmt-upload-label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .45rem .9rem;
  cursor: pointer;
  width: fit-content;
  font-size: .85rem;
}
.cmt-upload-hint { font-size: .72rem; color: var(--muted, #999); }

.cmt-field-group { margin-bottom: 1rem; }
.cmt-field-label {
  display: block;
  font-size: .8rem;
  color: var(--muted, #888);
  margin-bottom: .4rem;
  font-weight: 500;
  letter-spacing: .02em;
}

.cmt-modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,.06);
}
.cmt-modal-footer .cmt-btn-primary { padding: .55rem 1.4rem; }

/* ── My comments modal ────────────────────────────────────────────────────────── */
.cmt-modal-mine {
  max-width: 560px;
  max-height: 80vh;
  display: flex; flex-direction: column;
}

.cmt-modal-mine .my-cmt-list {
  flex: 1;
  display: flex; flex-direction: column; gap: 12px;
  margin: 0;
  padding: 4px 2px;
  overflow-y: auto;
  max-height: calc(80vh - 130px);
}

.my-cmt-card {
  position: relative;
  background: var(--bg-subtle, #faf6ee);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.my-cmt-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent, #a8431f);
  box-shadow: 0 6px 18px rgba(168,67,31,.12);
}
.my-cmt-card.is-pinned   { border-left: 3px solid var(--accent, #a8431f); }
.my-cmt-card.is-featured { border-left: 3px solid #e6b800; }

.my-cmt-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.my-cmt-article-title {
  font-size: .88rem; font-weight: 600;
  color: var(--text, #1a1814);
  display: flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.my-cmt-icon { font-size: 14px; flex-shrink: 0; }
.my-cmt-jump {
  font-size: .76rem;
  color: var(--accent, #a8431f);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}
.my-cmt-card:hover .my-cmt-jump { opacity: 1; }

.my-cmt-content {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text-secondary, #444);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.my-cmt-footer {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: .75rem;
  padding-top: 8px;
  border-top: 1px dashed rgba(0,0,0,.08);
}
.my-cmt-footer .cmt-date { margin-left: auto; }

.my-cmt-del {
  background: none; border: none;
  color: var(--muted, #aaa);
  font-size: .72rem; padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.my-cmt-del:hover { background: rgba(192,0,0,.08); color: #c00; }

/* Dark theme */
[data-theme="night"] .cmt-modal-close:hover { background: rgba(255,255,255,.08); color: #e8e6e1; }
[data-theme="night"] .cmt-profile-card { background: rgba(255,255,255,.04); }
[data-theme="night"] .my-cmt-card {
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.08);
}
[data-theme="night"] .my-cmt-card:hover { border-color: var(--accent, #a8431f); }
[data-theme="night"] .my-cmt-footer { border-top-color: rgba(255,255,255,.08); }
[data-theme="night"] .cmt-modal-footer { border-top-color: rgba(255,255,255,.08); }

/* Mobile */
@media (max-width: 480px) {
  .cmt-modal { padding: 24px 18px 18px; max-width: calc(100vw - 24px); }
  .cmt-modal-mine { max-height: 85vh; }
  .my-cmt-card { padding: 12px 14px; }
  .my-cmt-jump { opacity: 1; }
}

/* ── Rich media: images, video, iframes ───────────────────────────────────────── */
.article-fig {
  margin: 28px 0;
}

.article-img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
}

.article-img-caption {
  text-align: center;
  font-size: 0.85em;
  color: var(--mute, #888);
  margin-top: 10px;
  font-family: var(--mono, monospace);
}

.article-video {
  max-width: 100%;
  display: block;
  margin: 28px auto;
  border-radius: 8px;
}

.article-iframe-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 28px 0;
  border-radius: 8px;
}

.article-iframe-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

.article-h1 {
  margin: 52px 0 14px;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.35;
  font-weight: 700;
}

.article-body h3 {
  margin: 36px 0 10px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.5;
  font-weight: 600;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--rule, rgba(0,0,0,.12));
  margin: 40px 0;
}

.article-body ol {
  padding-left: 1.4em;
}

/* 推荐阅读 */
.article-recs { max-width: 920px; margin: 56px auto 0; padding-top: 30px; border-top: 1px solid var(--rule, #e6e0d6); }
.article-recs-title { font-family: var(--serif, Georgia, serif); font-size: 20px; font-weight: 700; color: var(--ink, #1a1814); margin: 0 0 20px; letter-spacing: .02em; }
.article-recs-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rec-card { display: flex; flex-direction: column; text-decoration: none; background: var(--accent-soft, #f7f3eb); border: 1px solid var(--rule-soft, #ece6da); border-radius: 12px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.rec-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(26,24,20,.10); border-color: var(--accent, #a8431f); }
.rec-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #efe9dd; }
.rec-body { display: flex; flex-direction: column; gap: 7px; padding: 13px 14px 15px; flex: 1; }
.rec-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-tag { font-size: 11px; color: var(--accent, #a8431f); background: rgba(168,67,31,.08); border-radius: 4px; padding: 1px 7px; letter-spacing: .02em; }
.rec-title { font-family: var(--serif, Georgia, serif); font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--ink, #1a1814); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-sub { font-size: 12.5px; line-height: 1.6; color: var(--mute, #8a8275); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-meta { margin-top: auto; padding-top: 2px; font-size: 11.5px; color: var(--mute, #8a8275); font-family: var(--mono, monospace); }
@media (max-width: 720px) {
  .article-recs { margin-top: 40px; padding-left: 18px; padding-right: 18px; }
  .article-recs-list { grid-template-columns: 1fr; gap: 16px; }
}
