/* 一生有准 · 阅读端（文章专栏形态，参考微信公众号文章/合集样式）
 * 设计目标：看起来是“一篇篇文章组成的专栏”，而不是电子书目录。
 * 保留旧正文的内联样式、图片、音视频与表格展示。
 */
:root {
  --wx-green: #07c160;
  --wx-green-soft: #eafaf1;
  --wx-bg: #f7f7f7;
  --wx-white: #ffffff;
  --wx-text: #191919;
  --wx-text-2: #5a5a5a;
  --wx-text-3: #999999;
  --wx-line: #ededed;
  --radius-lg: 12px;
  --radius-md: 8px;
  --article-width: 677px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  margin: 0;
  background: var(--wx-bg);
  color: var(--wx-text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

img {
  max-width: 100%;
}

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

.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;
}

/* ---------- 口令页 ---------- */
.gate-page {
  background: #f2f2f2;
}

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate-card {
  width: 100%;
  max-width: 360px;
  background: var(--wx-white);
  border-radius: 16px;
  padding: 40px 26px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.gate-brand {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 5px;
  color: var(--wx-green);
}

.gate-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
}

.gate-sub {
  margin: 0 0 24px;
  color: var(--wx-text-3);
  font-size: 13px;
}

.gate-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--wx-line);
  border-radius: 10px;
  background: #fafafa;
  font-size: 16px;
  margin-bottom: 14px;
  outline: none;
}

.gate-input:focus {
  border-color: var(--wx-green);
  background: #fff;
}

.primary-btn {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--wx-green);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.primary-btn.inline {
  display: inline-block;
  width: auto;
  padding: 10px 22px;
}

.form-error {
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #fdecec;
  color: #c0392b;
  font-size: 13px;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  font-size: 14px;
  color: var(--wx-text-2);
  cursor: pointer;
}

/* ---------- 顶部栏（公众号风格） ---------- */
.wx-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: calc(env(safe-area-inset-top)) 8px 0;
  background: var(--wx-white);
  border-bottom: 1px solid var(--wx-line);
}

.wx-topbar-back,
.wx-topbar-action {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--wx-text);
  background: none;
  border: 0;
}

.wx-topbar-action {
  width: auto;
  min-width: 40px;
  justify-content: flex-end;
  padding-right: 8px;
}

.wx-topbar-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wx-topbar-progress {
  flex: 0 0 auto;
  min-width: 48px;
  text-align: center;
  font-size: 12px;
  color: var(--wx-text-3);
}

/* ---------- 通用页面容器 ---------- */
.wx-page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 12px 40px;
}

.wx-list-hint {
  margin: 10px 4px;
  color: var(--wx-text-3);
  font-size: 12px;
}

.wx-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--wx-text-3);
  font-size: 14px;
}

/* ---------- 分类 tabs ---------- */
.wx-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}

.wx-tabs::-webkit-scrollbar {
  display: none;
}

.wx-tab {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--wx-text-2);
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

.wx-tab.is-active {
  background: var(--wx-green-soft);
  color: var(--wx-green);
  font-weight: 500;
}

/* ---------- 专栏列表（公众号合集列表样式） ---------- */
.column-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--wx-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.column-item + .column-item {
  border-top: 1px solid var(--wx-line);
}

.column-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
}

.column-link:active {
  background: #fafafa;
}

.column-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #eeeeee;
}

.column-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b5b5b5;
  font-size: 20px;
}

.column-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.column-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.column-meta {
  color: var(--wx-text-3);
  font-size: 12px;
}

.column-intro {
  color: var(--wx-text-3);
  font-size: 12.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.column-arrow,
.feed-arrow {
  flex: 0 0 auto;
  color: #c9c9c9;
  font-size: 20px;
  line-height: 1;
}

/* ---------- 专栏详情 ---------- */
.column-hero {
  background: var(--wx-white);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  margin-bottom: 12px;
}

.column-hero-cover {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #eeeeee;
  margin-bottom: 12px;
}

.column-hero-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.column-hero-meta {
  margin: 0 0 6px;
  color: var(--wx-text-3);
  font-size: 12.5px;
}

.column-hero-tags {
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.column-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--wx-green-soft);
  color: var(--wx-green);
  font-size: 11.5px;
}

.column-tag-sub {
  background: #f2f2f2;
  color: var(--wx-text-3);
}

.column-hero-desc {
  margin: 8px 0 0;
  color: var(--wx-text-2);
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-line;
}

/* ---------- 文章流（专栏内） ---------- */
.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--wx-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feed-item + .feed-item {
  border-top: 1px solid var(--wx-line);
}

.feed-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 14px;
}

.feed-link:active {
  background: #fafafa;
}

.feed-index {
  flex: 0 0 auto;
  width: 26px;
  color: #c2c2c2;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.feed-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feed-title {
  font-size: 15.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-meta {
  display: flex;
  gap: 6px;
}

.feed-badge {
  padding: 0 6px;
  border-radius: 4px;
  background: var(--wx-green-soft);
  color: var(--wx-green);
  font-size: 11px;
  line-height: 18px;
}

/* ---------- 文章页（公众号文章样式） ---------- */
.article-page {
  background: #ededed;
}

.wx-article-page {
  width: 100%;
  max-width: var(--article-width);
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  background: var(--wx-white);
  padding: 24px 18px 40px;
}

.wx-article-title {
  margin: 4px 0 12px;
  font-size: 22px;
  line-height: 1.42;
  font-weight: 600;
  color: var(--wx-text);
  word-break: break-word;
}

.wx-article-meta {
  margin: 0 0 22px;
  color: var(--wx-text-3);
  font-size: 13px;
  line-height: 1.6;
}

.wx-article-meta a {
  color: var(--wx-green);
}

.wx-article-audio,
.wx-article-video {
  display: block;
  width: 100%;
  margin: 16px 0;
  border-radius: var(--radius-md);
}

.wx-article-audio {
  height: 46px;
  background: #f5f5f5;
}

.wx-article-video {
  background: #000;
}

/* 正文：尽量保留旧内联样式，只做基础排版兜底 */
.article-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--wx-text);
  word-break: break-word;
  overflow-wrap: break-word;
}

.article-content p {
  margin: 0 0 0.9em;
}

.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 14px auto;
}

.article-content video {
  max-width: 100%;
  height: auto;
}

.article-content blockquote {
  margin: 16px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--wx-green);
  background: #f7f7f7;
  color: var(--wx-text-2);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin: 1.2em 0 0.5em;
  line-height: 1.5;
}

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

.article-content .table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
}

.article-content table {
  border-collapse: collapse;
  min-width: 60%;
  max-width: none;
}

.article-content td,
.article-content th {
  border: 1px solid var(--wx-line);
  padding: 6px 10px;
  font-size: 15px;
}

.article-content .admin-custom-mark {
  display: none !important;
}

.article-content img[src='/static/img/media-pending.svg'] {
  max-width: 220px;
  opacity: 0.6;
}

.media-missing-note {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px dashed var(--wx-line);
  border-radius: var(--radius-md);
  background: #fafafa;
  color: var(--wx-text-3);
  font-size: 13.5px;
  text-align: center;
}

/* ---------- 文章底部：所属专栏卡片 + 上一篇/下一篇 ---------- */
.wx-column-card {
  margin: 32px 0 18px;
  background: #f7f7f7;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.wx-column-card-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.wx-column-card-cover {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: #e9e9e9;
}

.wx-column-card-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wx-column-card-label {
  color: var(--wx-text-3);
  font-size: 11px;
}

.wx-column-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wx-column-card-meta {
  color: var(--wx-text-3);
  font-size: 11.5px;
}

.wx-column-card-arrow {
  color: #c9c9c9;
  font-size: 20px;
}

.wx-article-nav {
  border-top: 1px solid var(--wx-line);
}

.wx-nav-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 2px;
}

.wx-nav-row + .wx-nav-row {
  border-top: 1px solid var(--wx-line);
}

.wx-nav-label {
  color: var(--wx-green);
  font-size: 12px;
}

.wx-nav-title {
  color: var(--wx-text-2);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 页脚 / 错误页 ---------- */
.site-foot {
  padding: 24px 16px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  color: #b5b5b5;
  font-size: 12px;
}

.article-page .site-foot {
  background: #ededed;
}

.error-page {
  padding-top: 60px;
  text-align: center;
}

.error-status {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
  color: var(--wx-green);
}

.error-message {
  margin: 8px 0 22px;
  color: var(--wx-text-2);
}

/* ---------- 平板 / 桌面 ---------- */
@media (min-width: 720px) {
  .wx-page {
    padding: 16px 16px 56px;
  }
  .column-thumb {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }
  .column-hero-cover {
    width: 104px;
    height: 104px;
  }
  .wx-article-page {
    padding: 32px 40px 56px;
  }
  .wx-article-title {
    font-size: 24px;
  }
}

/* ---------- 文章地点卡片（文章页 / 文章预览页）：正文上方，仅地点名称 + 地图 ---------- */
.wx-map-card {
  margin: 14px 0 18px;
  background: var(--wx-white);
  border: 1px solid var(--wx-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.wx-map-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.wx-map-card-name {
  display: block;
  margin: 0;
  padding: 10px 14px 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--wx-text);
  word-break: break-word;
}

.wx-map-card-map img {
  display: block;
  width: 100%;
  height: auto;
  background: #f2f2f2;
}

/* ---------- 新山海经地图入口（专栏首页） ---------- */
.map-entry-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #eafaf1 0%, #ffffff 72%);
  border: 1px solid #d6f0e2;
  border-radius: var(--radius-lg);
}

.map-entry-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--wx-green);
  color: #ffffff;
}

.map-entry-icon svg {
  width: 22px;
  height: 22px;
}

.map-entry-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-entry-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.map-entry-meta {
  color: var(--wx-text-3);
  font-size: 12px;
}

.map-entry-arrow {
  flex: 0 0 auto;
  color: #c9c9c9;
  font-size: 20px;
  line-height: 1;
}

/* ---------- 新山海经地图页（/map） ---------- */
.map-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #ffffff;
}

.map-page .site-foot {
  display: none;
}

.map-page-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.map-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--wx-line);
}

.map-search {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f5f5f5;
  color: #999999;
}

.map-search-icon {
  flex: 0 0 auto;
}

.map-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--wx-text);
}

.map-location-count {
  flex: 0 0 auto;
  color: var(--wx-text-3);
  font-size: 12px;
}

.shj-map {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  position: relative;
  background: #eef1ee;
}

.map-hint {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  color: var(--wx-text-3);
  font-size: 12px;
  background: #ffffff;
  border-top: 1px solid var(--wx-line);
}

.map-fallback {
  flex: 0 0 auto;
  max-height: 45vh;
  overflow: auto;
  padding: 10px 14px 16px;
  background: #ffffff;
  border-top: 1px solid var(--wx-line);
}

.map-fallback-tip {
  margin: 0 0 8px;
  color: var(--wx-text-3);
  font-size: 12.5px;
}

.map-fallback-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-fallback-link {
  color: var(--wx-green);
  font-size: 13px;
}

.map-fallback-more {
  color: var(--wx-text-3);
  font-size: 12px;
}

/* 地图点位 / 聚合点 */
.shj-marker {
  position: relative;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.shj-marker-dot {
  display: block;
  width: 14px;
  height: 14px;
  margin: 1px;
  border-radius: 50%;
  background: var(--wx-green);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

/* 单点名称标签（跟着点位显示，避免只看到一个绿色坐标点分不清是哪里） */
.shj-marker-label {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  color: #1f2329;
  font-size: 11px;
  line-height: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.shj-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(7, 193, 96, 0.92);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(7, 193, 96, 0.45);
  cursor: pointer;
}


/* 地图页：从文章地点卡片跳转过来的信息窗 */
.shj-info {
  min-width: 160px;
  max-width: 240px;
  padding: 2px 2px 0;
}

.shj-info-name {
  color: #1f2329;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  word-break: break-word;
}

.shj-info-meta {
  margin-top: 2px;
  color: #86909c;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.shj-info-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--wx-green);
  font-size: 12.5px;
}

/* ---------- 文章详情页版权保护 ---------- */
/* 禁止选中文章文字（配合 article-protect.js 拦截复制/剪切/右键） */
body.article-page .wx-article {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* 禁止拖拽正文图片（拖到桌面/其它窗口即等于保存图片） */
body.article-page .wx-article-content img {
  -webkit-user-drag: none;
}

/* 尝试复制时的轻提示 */
.copy-protect-tip {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 9999;
  max-width: 80vw;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(29, 33, 41, 0.86);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.copy-protect-tip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- 文章详情页：顶部操作栏（分享 / 字体大小 / 音频） ---------- */
:root {
  --article-pad: 18px;
}

@media (min-width: 720px) {
  :root {
    --article-pad: 40px;
  }
}

.wx-article-page {
  padding-left: var(--article-pad);
  padding-right: var(--article-pad);
}

.wx-topbar-article {
  justify-content: center;
  padding: calc(env(safe-area-inset-top)) 0 0;
}

.wx-topbar-article .wx-topbar-inner {
  width: 100%;
  max-width: var(--article-width);
  min-width: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.wx-topbar-article .wx-topbar-back {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: var(--wx-text);
  text-decoration: none;
}

.wx-topbar-article .wx-topbar-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wx-topbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.wx-topbar-icon-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--wx-text-2);
  cursor: pointer;
}

.wx-topbar-icon-btn:active {
  background: #f2f3f5;
}

.wx-topbar-icon-btn svg {
  width: 20px;
  height: 20px;
}

.wx-topbar-tt {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}

.wx-topbar-audio-btn .wx-icon-pause {
  display: none;
}

.wx-topbar-audio-btn.is-playing .wx-icon-play {
  display: none;
}

.wx-topbar-audio-btn.is-playing .wx-icon-pause {
  display: block;
}

/* ---------- 文章详情页：字体大小四档（第 1 档 = 原默认） ---------- */
.article-content {
  font-size: var(--article-font-size, 17px);
  line-height: var(--article-line-height, 1.8);
}

.article-content p {
  margin: 0 0 var(--article-para-gap, 1em);
}

.article-content td,
.article-content th {
  font-size: 0.88em;
}

html[data-font-level='2'] .article-content {
  --article-font-size: 19.5px;
  --article-line-height: 2;
  --article-para-gap: 1.2em;
}

html[data-font-level='3'] .article-content {
  --article-font-size: 21px;
  --article-line-height: 2.2;
  --article-para-gap: 1.4em;
}

html[data-font-level='4'] .article-content {
  --article-font-size: 25px;
  --article-line-height: 2.6;
  --article-para-gap: 1.6em;
}

/* ---------- 字体大小弹窗 ---------- */
.font-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.font-modal[hidden] {
  display: none;
}

.font-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.font-modal-panel {
  position: relative;
  width: min(92vw, 420px);
  padding: 18px 18px 14px;
  border-radius: 14px;
  background: var(--wx-white);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.font-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.font-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--wx-text);
}

.font-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f3f5;
  color: var(--wx-text-2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.font-modal-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.font-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 1px solid var(--wx-line);
  border-radius: 10px;
  background: #fafafa;
  color: var(--wx-text-2);
  cursor: pointer;
}

.font-option-preview {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 26px;
  color: var(--wx-text);
  font-weight: 600;
  line-height: 1;
}

.font-preview-1 {
  font-size: 15px;
}

.font-preview-2 {
  font-size: 17px;
}

.font-preview-3 {
  font-size: 19px;
}

.font-preview-4 {
  font-size: 21px;
}

.font-option-label {
  font-size: 12px;
}

.font-option.is-active {
  border-color: var(--wx-green);
  background: #e8f7f1;
  color: var(--wx-green);
}

.font-option.is-active .font-option-preview {
  color: var(--wx-green);
}

.font-modal-hint {
  margin: 12px 0 0;
  text-align: center;
  color: var(--wx-text-3);
  font-size: 12px;
  line-height: 1.6;
}

body.font-modal-open {
  overflow: hidden;
}

/* ---------- 轻提示（复制链接等） ---------- */
.wx-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 70;
  max-width: 80vw;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(29, 33, 41, 0.86);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.wx-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* 小屏：顶部按钮略收窄，给标题留出空间 */
@media (max-width: 359px) {
  .wx-topbar-icon-btn {
    width: 34px;
  }
}
