/* ============================================================
   默闻风和 - 清新响应式主题样式
   双主题：奶白（默认）/ 暗黑，通过 [data-theme="dark"] 切换
   主色与圆角由后台配置注入 CSS 变量（--mowen-primary / --mowen-radius）
   ============================================================ */

:root {
  --mowen-bg: #f4f5f7;
  --mowen-card: #ffffff;
  --mowen-text: #3d3d3d;
  --mowen-text-muted: #8a8a8a;
  --mowen-border: #e5e7eb;
  --mowen-hover: #f0f1f3;
  --mowen-header-bg: rgba(255, 255, 255, 0.92);
  --mowen-primary: #6ba368;
  --mowen-radius: 10px;
  --mowen-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --mowen-bg: #1b1b1b;
  --mowen-card: #262626;
  --mowen-text: #d8d8d8;
  --mowen-text-muted: #7a7a7a;
  --mowen-border: #333333;
  --mowen-hover: #2e2e2e;
  --mowen-header-bg: rgba(27, 27, 27, 0.92);
  --mowen-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html, body { overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--mowen-text);
  background: var(--mowen-bg);
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--mowen-text); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--mowen-primary); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部欢迎条 ---------- */
.welcome-bar {
  background: var(--mowen-header-bg, rgba(255, 255, 255, 0.72));
  border-bottom: 1px solid var(--mowen-border);
  font-size: 13px;
  color: var(--mowen-text-muted);
}
.welcome-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  gap: 12px;
}
.welcome-left { color: var(--mowen-text-muted); }
.welcome-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.welcome-right a {
  color: var(--mowen-text-muted);
  padding: 0 4px;
  white-space: nowrap;
  transition: color 0.2s;
}
.welcome-right a:hover { color: var(--mowen-primary); }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--mowen-header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mowen-border);
}
.header-inner { position: relative; display: flex; align-items: center; min-height: 80px; gap: 20px; }

.site-brand { flex-shrink: 0; margin-left: -30px; }
.site-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}
.site-logo { display: inline-block; }
.site-logo img { height: 60px; width: auto; }
/* 双 Logo 切换：默认显示浅色，暗黑模式显示暗黑 Logo */
.site-logo .logo-dark { display: none; }
[data-theme="dark"] .site-logo .logo-light { display: none; }
[data-theme="dark"] .site-logo .logo-dark { display: inline-block; }

.site-nav { flex: 1; }
.site-nav ul { display: flex; list-style: none; gap: 4px; flex-wrap: wrap; }
.site-nav ul li a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--mowen-radius);
  font-size: 15px;
}
.site-nav ul li a:hover { background: var(--mowen-hover); color: var(--mowen-primary); }
.site-nav ul li.on > a {
  color: #fff;
  font-weight: 600;
  background: var(--mowen-primary);
  border-radius: var(--mowen-radius);
}

/* 二级菜单（下拉） */
.site-nav ul li { position: relative; }
.site-nav ul li ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: var(--mowen-card);
  border: 1px solid var(--mowen-border);
  border-radius: var(--mowen-radius);
  box-shadow: var(--mowen-shadow);
  padding: 6px;
  display: none;
  z-index: 100;
  flex-direction: column;
}
/* 二级子项：默认普通样式，不受父项 .on 影响 */
.site-nav ul li ul li a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--mowen-radius);
  white-space: nowrap;
  font-size: 14px;
  color: var(--mowen-text);
  background: transparent;
}
/* 二级菜单各项之间灰色虚线分隔（最后一项不加） */
.site-nav ul li ul li:not(:last-child) { border-bottom: 1px dashed var(--mowen-border); }
.site-nav ul li ul li a:hover { background: var(--mowen-hover); color: var(--mowen-primary); }
.site-nav ul li:hover > ul { display: flex; }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.auth-page .header-actions { margin-left: auto; }

.header-search {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  padding: 10px 16px;
  background: var(--mowen-card);
  border-bottom: 1px solid var(--mowen-border);
  box-shadow: var(--mowen-shadow);
  z-index: 50;
}
.header-search.open { display: block; }
.header-search form { display: flex; align-items: center; }
.header-search input {
  width: 260px;
  padding: 10px 16px;
  border: 1px solid var(--mowen-border);
  border-radius: 22px;
  background: var(--mowen-card);
  color: var(--mowen-text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.header-search input:focus { border-color: var(--mowen-primary); }
.header-search button {
  margin-left: -36px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 15px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle, .nav-toggle, .search-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--mowen-border);
  border-radius: 50%;
  background: var(--mowen-card);
  cursor: pointer;
  font-size: 17px;
  color: var(--mowen-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover, .nav-toggle:hover, .search-toggle:hover { border-color: var(--mowen-primary); }
.nav-toggle { display: none; }
.search-toggle { display: flex; }

/* ---------- 分类封面横幅 ---------- */
.catbanner-area { padding: 0 0 20px; }
.catbanner {
  position: relative;
  height: 240px;
  border-radius: var(--mowen-radius);
  overflow: hidden;
  box-shadow: var(--mowen-shadow);
}
.catbanner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.catbanner:hover img { transform: scale(1.05); }
.catbanner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}
.catbanner-name {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 35px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* ---------- 首页推荐位 ---------- */
.layout-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.recommend-area { margin-bottom: 10px; }
.rec-section {
  background: var(--mowen-card);
  border-radius: var(--mowen-radius);
  box-shadow: var(--mowen-shadow);
  padding: 12px;
  margin-bottom: 10px;
}
.rec-section:last-child { margin-bottom: 0; }
.rec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.rec-articles { grid-template-columns: repeat(2, 1fr); }
.rec-cats { grid-template-columns: repeat(5, 1fr); }
.rec-art {
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4px;
  gap: 12px;
  border-radius: 6px;
  transition: background 0.2s;
}
.rec-art:hover { background: var(--mowen-hover); }
.rec-art-thumb {
  position: relative;
  flex-shrink: 0;
  width: 130px;
  height: 90px;
  background: var(--mowen-hover);
  overflow: hidden;
  border-radius: 6px;
}
.rec-art-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rec-art-thumb i {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: var(--mowen-border);
}
.rec-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1.4;
}
.rec-art-info { flex: 1; min-width: 0; }
.rec-art-title {
  font-size: 14px;
  color: var(--mowen-text);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}
.rec-art-meta {
  font-size: 12px;
  color: var(--mowen-text-muted);
}
.rec-cat {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 6px;
  transition: background 0.2s;
}
.rec-cat:hover { background: var(--mowen-hover); }
.rec-cat-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--mowen-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}
.rec-cat-icon img { width: 100%; height: 100%; object-fit: cover; }
.rec-cat-icon i { font-size: 24px; color: var(--mowen-border); }
.rec-cat-info { flex: 1; min-width: 0; }
.rec-cat-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--mowen-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}
.rec-cat-count {
  font-size: 12px;
  color: var(--mowen-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 横幅 ---------- */
.banner-area { padding: 0 0 20px; }
.banner-slider { position: relative; overflow: hidden; border-radius: var(--mowen-radius); box-shadow: var(--mowen-shadow); height: 360px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.banner-item {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  pointer-events: none;
}
.banner-item.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.banner-item a { display: block; width: 100%; height: 100%; }
.banner-item img { width: 100%; height: 100%; object-fit: cover; }
/* Ken Burns 缩放：当前图从放大缓慢回缩，过渡更自然 */
.banner-item.active img { animation: bannerZoom 6s ease forwards; }
@keyframes bannerZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.banner-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 20px 16px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
}
.banner-dots {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  z-index: 5;
}
/* 圆点指示器：未展示的是小圆点，只有当前展示的是带进度条的胶囊，统一 6px 高保证水平对齐 */
.banner-dot {
  position: relative;
  width: 8px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  overflow: hidden;
  transition: width 0.3s, background 0.3s;
}
.banner-dot:hover { background: rgba(255, 255, 255, 0.8); }
.banner-dot.active {
  width: 24px;
  background: rgba(255, 255, 255, 0.3);
}
/* 进度填充条：仅活动时 scaleX 从 0 → 1（JS 实时驱动），走完即切换下一张 */
.banner-dot-bar {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 100%;
  background: #fff;
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: none;
}

/* ---------- 布局 ---------- */
.layout { display: flex; align-items: flex-start; gap: 24px; padding-top: 0; padding-bottom: 40px; }
.main {
  flex: 1;
  min-width: 0;
  background: var(--mowen-card);
  border-radius: var(--mowen-radius);
  box-shadow: var(--mowen-shadow);
  padding: 8px 12px;
}
.sidebar { width: 300px; flex-shrink: 0; }
.layout.no-sidebar .main { flex: 1 1 100%; max-width: none; }

/* ---------- 面包屑（当前位置导航） ---------- */
.breadcrumb {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 14px;
  color: var(--mowen-text-muted);
}
.breadcrumb-inner {
  background: transparent;
  border-radius: var(--mowen-radius);
  box-shadow: none;
  padding: 8px 0;
}
.breadcrumb a { color: var(--mowen-text-muted); }
.breadcrumb a:hover { color: var(--mowen-primary); }
.breadcrumb .bc-home i { margin-right: 4px; color: var(--mowen-primary); }
.breadcrumb .bc-sep { margin: 0 8px; color: var(--mowen-text-muted); opacity: 0.6; }
.breadcrumb .bc-current { color: var(--mowen-text); }
/* 首页公告（首页位置显示，宽度和面包屑一致） */
.breadcrumb-inner.site-notice { color: var(--mowen-text-muted); display: flex; align-items: center; }
.breadcrumb-inner.site-notice i { color: var(--mowen-primary); margin-right: 8px; flex-shrink: 0; }
[data-theme="dark"] .breadcrumb a { color: #c9c9c9; }
[data-theme="dark"] .breadcrumb .bc-sep { color: #c9c9c9; opacity: 0.7; }
[data-theme="dark"] .breadcrumb .bc-current { color: #f0f0f0; }

/* ---------- 文章列表（左右两栏式，分割线分隔） ---------- */
.post-row {
  display: flex;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--mowen-border);
}
.post-row:last-child { border-bottom: none; }
.post-row:hover .post-row-title a { color: var(--mowen-primary); }

.post-row-thumb {
  position: relative;
  flex-shrink: 0;
  width: 200px;
  height: 140px;
  overflow: hidden;
  border-radius: var(--mowen-radius);
  background: var(--mowen-hover);
}
.post-row-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post-row:hover .post-row-thumb img { transform: scale(1.05); }

.post-row-cate {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.post-row-top-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 10px;
  background: var(--mowen-primary);
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
}
.post-row-top-badge i { margin-right: 3px; }

.post-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.post-row-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-row-title a:hover { color: var(--mowen-primary); }

.post-row-excerpt {
  color: var(--mowen-text-muted);
  font-size: 14px;
  line-height: 1.7;
  /* 改用普通块级 + 限高，保证 <p>/<br> 换行生效（-webkit-box 布局会压扁换行标签） */
  display: block;
  max-height: 5.1em; /* 约 3 行（line-height 1.7），超出截断 */
  overflow: hidden;
  margin-bottom: 8px;
}

.post-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--mowen-text-muted);
}
.post-row-meta i {
  margin-right: 4px;
  color: var(--mowen-primary);
  font-size: 12px;
}

.istop-row {
  background: linear-gradient(90deg, var(--mowen-hover), transparent);
  padding-left: 12px;
}

/* 文章详情页标题与 meta（post-single.php 使用） */
.post-title { font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.post-title a:hover { color: var(--mowen-primary); }
.post-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--mowen-text-muted); margin-bottom: 12px; }
.post-meta a { color: var(--mowen-text-muted); }
.post-meta a:hover { color: var(--mowen-primary); }

/* ---------- 文章页 ---------- */
.post.single, .post.page {
  padding: 24px 0;
}
.post.single .post-title { font-size: 26px; margin-bottom: 16px; }
.post.page .post-title { text-align: center; font-size: 30px; font-weight: 700; }
.post-body { font-size: 16px; line-height: 1.5; word-wrap: break-word; overflow-wrap: break-word; max-width: 100%; box-sizing: border-box; }
/* 覆盖编辑器内联的 text-wrap-mode: nowrap（禁止换行导致溢出）——内联样式优先级高，需 !important */
.post-body span, .post-body p, .post-body div {
  text-wrap-mode: wrap !important;
  white-space: normal !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
/* 正文图片：覆盖全局 img{display:block}，改用 inline-block 让编辑器通过 p 的 text-align 控制左/中/右对齐，并支持一行多图并排。
   全局 img{display:block} 会把正文图片强制块级化，导致 text-align 居中失效、两张图各占一行（不并排）。 */
.post-body img,
.post-body a img,
.post-body figure img,
.post-body p img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--mowen-radius);
  box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
  margin: 6px 2px;
}
/* 表格、嵌入视频、iframe、长链接等超宽内容统一限制，防止撑破手机屏 */
.post-body table { max-width: 100%; display: block; overflow-x: auto; border-collapse: collapse; box-sizing: border-box; }
.post-body iframe, .post-body embed, .post-body object { max-width: 100% !important; box-sizing: border-box; }
/* 视频自动识别横竖屏：宽度撑满、高度随视频真实比例自适应，防止手机端挤压变形 */
.post-body video { max-width: 100% !important; height: auto !important; box-sizing: border-box; display: block; border-radius: var(--mowen-radius); }
.post-body a { word-break: break-all; max-width: 100%; }
.post-body p { margin-bottom: 16px; }
/* 单页纯文本：段落间距收紧（后台含大量空 <p><br/> 撑大间距） */
.post.page .post-body p { margin-bottom: 6px; }
.post.page .post-body p:empty { margin-bottom: 0; }
.post-body h2, .post-body h3, .post-body h4 { margin: 24px 0 12px; }
.post-body blockquote {
  border-left: 4px solid var(--mowen-primary);
  background: var(--mowen-hover);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 var(--mowen-radius) var(--mowen-radius) 0;
}
.post-body pre { background: var(--mowen-hover); padding: 16px; border-radius: var(--mowen-radius); overflow-x: auto; margin: 16px 0; }
.post-body code { background: var(--mowen-hover); padding: 2px 6px; border-radius: 4px; }

.post-copyright {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--mowen-hover);
  border-left: 4px solid var(--mowen-primary);
  border-radius: var(--mowen-radius);
  font-size: 14px;
  color: var(--mowen-text-muted);
}
.post-copyright > i { color: var(--mowen-primary); margin-right: 6px; }
.post-copyright strong { color: var(--mowen-text); margin-right: 8px; }
.post-copyright-body { margin-top: 10px; line-height: 1.8; }
.post-copyright-body p { margin-bottom: 6px; }
.post-copyright-body a { color: var(--mowen-primary); }
.post-copyright-body a:hover { text-decoration: underline; }

.post-tags { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-tags a {
  padding: 4px 12px;
  background: var(--mowen-hover);
  border-radius: 20px;
  font-size: 13px;
}
.post-tags a:hover { background: var(--mowen-primary); color: #fff; }
.post-tags-label { font-size: 13px; line-height: 1; }

.post-nav { display: flex; gap: 16px; margin-top: 20px; }
.post-nav-item {
  flex: 1;
  min-width: 0;
  background: var(--mowen-card);
  border-radius: var(--mowen-radius);
  box-shadow: var(--mowen-shadow);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.post-nav-item.next { text-align: right; }
.post-nav-item span { font-size: 12px; color: var(--mowen-text-muted); }
.post-nav-item strong {
  font-size: 14px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  font-weight: 600;
}

/* ---------- 相关文章 ---------- */
.related { margin-top: 24px; background: var(--mowen-card); border-radius: var(--mowen-radius); box-shadow: var(--mowen-shadow); padding: 24px; }
.related-title { font-size: 18px; margin-bottom: 16px; }
.related-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.related-item { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--mowen-border); }
.related-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-date { color: var(--mowen-text-muted); font-size: 12px; flex-shrink: 0; }

/* ---------- 评论 ---------- */
.comments-area { margin-top: 24px; background: var(--mowen-card); border-radius: var(--mowen-radius); box-shadow: var(--mowen-shadow); padding: 24px; }
.comments-title { font-size: 18px; margin-bottom: 16px; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--mowen-border); }
.comment-avatar img { width: 40px; height: 40px; border-radius: 50%; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.comment-name { font-weight: 600; }
.comment-time { color: var(--mowen-text-muted); }
.comment-reply { color: var(--mowen-primary); font-size: 14px; }
.comment-ua { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--mowen-text-muted); font-size: 14px; }
.comment-ua .ua-item { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.comment-ua .ua-item i { font-size: 15px; flex-shrink: 0; }
.comment-ua .ua-text { white-space: nowrap; }
/* 品牌图标配色 */
.comment-ua .ua-item .fa-chrome { color: #4285f4; }
.comment-ua .ua-item .fa-firefox-browser { color: #ff7139; }
.comment-ua .ua-item .fa-edge { color: #0078d7; }
.comment-ua .ua-item .fa-safari { color: #1b88ca; }
.comment-ua .ua-item .fa-weixin { color: #07c160; }
.comment-ua .ua-item .fa-qq { color: #12b7f5; }
.comment-ua .ua-item .fa-atom { color: #1677ff; }
.comment-ua .ua-item .fa-dog { color: #f68b1f; }
.comment-ua .ua-item .fa-paw { color: #e67e22; }
.comment-ua .ua-item .fa-shield-halved { color: #00c800; }
.comment-ua .ua-item .fa-compass { color: #16a085; }
.comment-content { margin-top: 6px; font-size: 14px; word-wrap: break-word; }

.commentpost-title { font-size: 18px; margin: 16px 0; }
.commentpost-fields { display: flex; gap: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.commentpost-fields input {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  border: 1px solid var(--mowen-border);
  border-radius: var(--mowen-radius);
  background: var(--mowen-bg);
  color: var(--mowen-text);
  outline: none;
}
.commentpost textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--mowen-border);
  border-radius: var(--mowen-radius);
  background: var(--mowen-bg);
  color: var(--mowen-text);
  outline: none;
  resize: vertical;
  font-family: inherit;
}
.commentpost input:focus, .commentpost textarea:focus { border-color: var(--mowen-primary); }

/* 验证码：输入框占整行 1/3，图片紧跟其后同一行 */
.commentpost-verify {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.commentpost-verify input {
  width: 33.333%;
  flex: none;
  padding: 10px 14px;
  border: 1px solid var(--mowen-border);
  border-radius: var(--mowen-radius);
  background: var(--mowen-bg);
  color: var(--mowen-text);
  outline: none;
}
.commentpost-verify input:focus { border-color: var(--mowen-primary); }
.commentpost-verify .verify-img {
  height: 38px;
  width: auto;
  flex-shrink: 0;
  border: 1px solid var(--mowen-border);
  border-radius: var(--mowen-radius);
  cursor: pointer;
  display: block;
}

.commentpost-submit { margin-top: 10px; }
.commentpost-submit .button {
  padding: 10px 28px;
  background: var(--mowen-primary);
  color: #fff;
  border: none;
  border-radius: var(--mowen-radius);
  cursor: pointer;
  font-size: 15px;
}
.commentpost-submit .button:hover { opacity: 0.9; }

/* ---------- 分页 ---------- */
.pagebar { margin: 24px 0; }
.pagebar-inner { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.page-btn {
  display: inline-block;
  padding: 8px 14px;
  background: var(--mowen-hover);
  border-radius: var(--mowen-radius);
  font-size: 14px;
}
.page-btn.now { background: var(--mowen-primary); color: #fff; }
.page-btn:hover { background: var(--mowen-primary); color: #fff; }

/* ---------- 侧栏 ---------- */
.sidebar-module {
  background: var(--mowen-card);
  border-radius: var(--mowen-radius);
  box-shadow: var(--mowen-shadow);
  padding: 20px;
  margin-bottom: 10px;
}
.module-title { font-size: 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--mowen-border); }
.module-content { font-size: 14px; }
.module-content ul { list-style: none; }
.module-content ul li { padding: 6px 0; border-bottom: 1px dashed var(--mowen-border); }
.module-content ul li:last-child { border-bottom: none; }
.sidebar-module .search form, .sidebar-module input[type="text"], .sidebar-module input[type="search"] {
  width: 100%; padding: 8px 12px; border: 1px solid var(--mowen-border); border-radius: var(--mowen-radius); background: var(--mowen-bg); color: var(--mowen-text); outline: none;
}

/* 博主信息卡片 */
.mowen-blogger { text-align: center; }
.blogger-avatar { margin: 0 auto 12px; width: 90px; height: 90px; border-radius: 50%; overflow: hidden; border: 3px solid var(--mowen-primary); }
.blogger-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blogger-name { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.blogger-desc { font-size: 13px; color: var(--mowen-text-muted); margin-bottom: 12px; }
.blogger-social { font-size: 18px; margin-bottom: 14px; }
.blogger-social a { display: inline-block; margin: 0 5px; color: var(--mowen-text-muted); }
.blogger-social a:hover { color: var(--mowen-primary); }
.blogger-social .blogger-social-text { font-size: 13px; vertical-align: middle; }
.blogger-stats { display: flex; border-top: 1px solid var(--mowen-border); padding-top: 14px; }
.blogger-stats .stat { flex: 1; font-size: 12px; color: var(--mowen-text-muted); }
.blogger-stats .stat em { display: block; font-style: normal; font-size: 18px; font-weight: 700; color: var(--mowen-primary); margin-bottom: 2px; }

/* 随机文章模块 */
.mowen-suji .suji-list { list-style: none; margin: 0; padding: 0; }
.mowen-suji .suji-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--mowen-border);
}
.mowen-suji .suji-item:last-child { border-bottom: none; padding-bottom: 0; }
.mowen-suji .suji-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--mowen-text);
}
.mowen-suji .suji-link:hover .suji-title { color: var(--mowen-primary); }
.mowen-suji .suji-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 54px;
  border-radius: 6px;
  background: var(--mowen-hover);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mowen-suji .suji-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mowen-suji .suji-thumb i { font-size: 22px; color: var(--mowen-border); }
.mowen-suji .suji-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 54px;
}
.mowen-suji .suji-title {
  font-size: 13px;
  line-height: 1.4;
  color: var(--mowen-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.mowen-suji .suji-meta {
  font-size: 12px;
  color: var(--mowen-text-muted);
  text-align: right;
}
.mowen-week .week-empty {
  font-size: 14px;
  color: var(--mowen-text-muted);
  text-align: center;
  padding: 20px 0;
}
/* 最新评论模块 */
.mowen-comment .cmt-list { list-style: none; margin: 0; padding: 0; }
.mowen-comment .cmt-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--mowen-border);
}
.mowen-comment .cmt-item:last-child { border-bottom: none; padding-bottom: 0; }
.mowen-comment .cmt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.mowen-comment .cmt-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--mowen-hover);
}
.mowen-comment .cmt-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mowen-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}
.mowen-comment .cmt-name:hover { color: var(--mowen-primary); }
.mowen-comment .cmt-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--mowen-text-muted);
}
.mowen-comment .cmt-bubble {
  display: block;
  margin-left: 0;
  padding: 8px 12px;
  background: var(--mowen-hover);
  border-radius: 6px;
  font-size: 13px;
  color: var(--mowen-text);
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: break-word;
  transition: background 0.2s;
}
.mowen-comment .cmt-bubble:hover { background: var(--mowen-border); }
.mowen-comment .cmt-from {
  margin-left: 0;
  margin-top: 6px;
  font-size: 12px;
  color: var(--mowen-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mowen-comment .cmt-post {
  color: var(--mowen-primary);
  transition: color 0.2s;
}
.mowen-comment .cmt-post:hover { color: var(--mowen-primary); opacity: 0.8; }
.mowen-comment .cmt-empty {
  font-size: 14px;
  color: var(--mowen-text-muted);
  text-align: center;
  padding: 20px 0;
}
/* 模块标题前绿色竖线 */
.mowen-comment > .module-title {
  position: relative;
  padding-left: 12px;
}
.mowen-comment > .module-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--mowen-primary);
}
/* 排行榜模块（三 tab） */
.mowen-hot .hot-tabs {
  display: flex;
  border-bottom: 1px solid var(--mowen-border);
  margin: -20px -20px 12px;
}
.mowen-hot .hot-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0;
  font-size: 13px;
  color: var(--mowen-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}
.mowen-hot .hot-tab i { margin-right: 4px; }
.mowen-hot .hot-tab:hover { color: var(--mowen-primary); }
.mowen-hot .hot-tab.is-active {
  color: var(--mowen-primary);
  border-bottom-color: var(--mowen-primary);
  font-weight: 600;
}
.mowen-hot .hot-pane { display: none; }
.mowen-hot .hot-pane.is-active { display: block; }

/* 时光静好模块 */
.mowen-time .time-now {
  text-align: center;
  font-size: 14px;
  color: var(--mowen-text);
  font-weight: 600;
  padding: 10px 12px;
  background: var(--mowen-hover);
  border-radius: 6px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.mowen-time .time-rings {
  display: flex;
  justify-content: center;
}
.mowen-time .time-ring {
  flex: 0 0 25%;
  text-align: center;
}
.mowen-time .time-ring svg {
  width: 70px;
  height: 70px;
  display: block;
  margin: 0 auto;
  transform: rotate(-90deg);
}
.mowen-time .ring-bg {
  fill: none;
  stroke: var(--mowen-border);
  stroke-width: 6;
  opacity: 0.3;
}
.mowen-time .ring-fg {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.mowen-time .ring-blue { stroke: #5b9bd5; }
.mowen-time .ring-pink { stroke: #e6739f; }
.mowen-time .ring-green { stroke: #7bb87b; }
.mowen-time .ring-orange { stroke: #f0ad4e; }
.mowen-time .time-ring text {
  font-size: 14px;
  font-weight: 700;
  fill: var(--mowen-text);
  transform: rotate(90deg);
  transform-origin: 32px 32px;
}
.mowen-time .ring-label {
  font-size: 13px;
  color: var(--mowen-text);
  margin-top: 6px;
}
.mowen-time .ring-sub {
  font-size: 12px;
  color: var(--mowen-text-muted);
  margin-top: 2px;
}

/* 网易云音乐模块 */
.mowen-music { padding: 0 !important; }
.mowen-music .module-content { margin: 0; padding: 0; }
.mowen-music .music-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  border: none;
  border-radius: 0;
}
.mowen-music .music-empty {
  font-size: 14px;
  color: var(--mowen-text-muted);
  text-align: center;
  padding: 20px 0;
}

/* 网站概况模块 */
.mowen-stats > .module-title i {
  color: var(--mowen-primary);
  margin-right: 6px;
}
.mowen-stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 12px;
  margin-top: 8px;
}
.mowen-stats .stats-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 13px;
  min-height: 28px;
}
.mowen-stats .stats-label { color: var(--mowen-text); flex-shrink: 0; }
.mowen-stats .stats-val {
  font-weight: 600;
  color: var(--mowen-text);
  background: var(--mowen-hover);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  min-width: 32px;
  white-space: nowrap;
  text-align: center;
}
.mowen-stats .stats-val.is-orange { background: rgba(240, 173, 78, 0.18); color: #d48806; }
.mowen-stats .stats-val.is-pink { background: rgba(230, 115, 159, 0.18); color: #c14b7c; }
.mowen-stats .stats-val.is-blue { background: rgba(91, 155, 213, 0.18); color: #3a7bc8; }
.mowen-stats .stats-val.is-green { background: rgba(123, 184, 123, 0.18); color: #4a8b4a; }
.mowen-stats .stats-val.is-purple { background: rgba(155, 120, 195, 0.18); color: #7656a0; }
.mowen-stats .stats-val.is-red { background: rgba(217, 102, 102, 0.18); color: #c44b4b; }

/* 自建音乐播放器 */
.mowen-player { padding: 0 !important; border-radius: 5px !important; overflow: hidden; }
.mowen-player .module-content { margin: 0; padding: 0; }
.mowen-player .player { text-align: center; padding: 16px 14px; }
.mowen-player .player-empty {
  font-size: 14px;
  color: var(--mowen-text-muted);
  text-align: center;
  padding: 20px 0;
}
.mowen-player .player-cover-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 14px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--mowen-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.mowen-player .player-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: player-spin 18s linear infinite;
}
@keyframes player-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.mowen-player .player-info { margin-bottom: 12px; }
.mowen-player .player-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--mowen-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mowen-player .player-artist {
  font-size: 13px;
  color: var(--mowen-text-muted);
  margin-top: 2px;
}
.mowen-player .player-progress { margin-bottom: 10px; }
.mowen-player .player-bar {
  height: 4px;
  background: var(--mowen-border);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}
.mowen-player .player-bar-inner {
  height: 100%;
  width: 0;
  background: var(--mowen-primary);
  border-radius: 2px;
  transition: width 0.15s linear;
}
.mowen-player .player-time {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--mowen-text-muted);
  margin-top: 4px;
}
.mowen-player .player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 0 8px;
}
.mowen-player .player-shuffle {
  margin-right: auto;
  font-size: 16px;
}
.mowen-player .player-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--mowen-text);
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  padding: 4px;
}
.mowen-player .player-btn:hover { color: var(--mowen-primary); }
.mowen-player .player-play {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--mowen-primary);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mowen-player .player-play:hover { color: #fff; opacity: 0.9; }
.mowen-player .player-vol-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}
.mowen-player .player-vol-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--mowen-text);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.mowen-player .player-vol-btn:hover { color: var(--mowen-primary); }
.mowen-player .player-vol-pop {
  position: absolute;
  bottom: 46px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 110px;
  background: var(--mowen-card);
  border: 1px solid var(--mowen-border);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 12px 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
.mowen-player .player-vol-wrap.open .player-vol-pop { display: flex; }
.mowen-player .player-vol-bar {
  position: relative;
  width: 4px;
  height: 100%;
  background: var(--mowen-border);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}
.mowen-player .player-vol-inner {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--mowen-primary);
  border-radius: 2px;
}
.mowen-player .player-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
  max-height: 220px;
  overflow-y: auto;
}
.mowen-player .player-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.mowen-player .player-item:hover { background: var(--mowen-hover); }
.mowen-player .player-item.active { background: var(--mowen-hover); }
.mowen-player .player-item-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--mowen-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mowen-player .player-item.active .player-item-title { color: var(--mowen-primary); font-weight: 600; }
.mowen-player .player-item-artist {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--mowen-text-muted);
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--mowen-border);
  padding: 32px 0;
  margin-top: 40px;
  background: var(--mowen-card);
}
.footer-inner { text-align: center; color: var(--mowen-text-muted); font-size: 13px; }
.footer-custom { margin-bottom: 14px; }
.footer-beian, .footer-copyright { margin: 4px 0; }
.footer-beian { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 8px; }
.footer-beian a { color: var(--mowen-text); display: inline-flex; align-items: center; font-size: 14px; }
.footer-beian a:hover { color: var(--mowen-primary); }
.footer-beian a img { width: 14px; height: 14px; margin-right: 4px; vertical-align: middle; }
.footer-copyright { color: var(--mowen-text); font-size: 14px; }
.footer-copyright a { color: var(--mowen-text); }
.footer-copyright a:hover { color: var(--mowen-primary); }

/* 页脚友情链接 */
.footer-links {
  margin: 0 0 14px;
  line-height: 1.9;
  text-align: left;
}
.footer-links-title {
  color: var(--mowen-text-muted);
  font-size: 13px;
}
.footer-link {
  margin-right: 12px;
  color: var(--mowen-primary);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.footer-link:hover { text-decoration: underline; }

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--mowen-primary);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.back-to-top.show { display: block; }

.page-heading { font-size: 24px; margin-bottom: 20px; }
.no-result { text-align: center; color: var(--mowen-text-muted); padding: 60px 0; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 992px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
}

@media (max-width: 768px) {
  /* 移动端头部三栏：导航按钮左、logo 居中、主题切换右 */
  .header-inner { gap: 12px; }
  /* 移动端把 header-actions 摊平，让搜索/用户/主题图标参与 header-inner 的 flex 排列，间距正常不挤 */
  .header-actions { display: contents; }
  .site-brand { flex: 1; display: flex; justify-content: center; order: 2; min-width: 0; }
  .nav-toggle { order: 1; }
  .search-toggle { order: 1; }
  .auth-user-menu, .auth-login-icon, .auth-user { order: 3; }
  .theme-toggle { order: 3; }
  .site-nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--mowen-card);
    border-bottom: 1px solid var(--mowen-border);
    padding: 12px 24px;
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul li a { padding: 12px 4px; display: flex; align-items: center; border-bottom: 1px solid var(--mowen-border); }
  .site-nav ul li a i { margin-right: 10px; flex-shrink: 0; }
  /* 移动端二级菜单：直接竖排展开 */
  .site-nav ul li { position: static; }
  .site-nav ul li ul {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    min-width: 0;
  }
  .site-nav ul li ul li a { border-bottom: none; padding: 8px 0; }
  .nav-toggle { display: flex; }
  .search-toggle { display: flex; }
  /* 移动端搜索框：默认隐藏，点击搜索按钮后展开在顶栏下方 */
  .site-header { position: relative; }
  .header-search {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: var(--mowen-card);
    border-bottom: 1px solid var(--mowen-border);
    box-shadow: var(--mowen-shadow);
  }
  .header-search.open { display: block; }
  .header-search form { width: 100%; }
  .header-search input { width: 100%; }
  .header-search input:focus { width: 100%; }
  .sidebar { display: none; }
  .main { padding: 8px; overflow: hidden; max-width: 100%; width: 100%; }
  .layout { max-width: 100%; }
  .layout-left { max-width: 100%; min-width: 0; }
  .recommend-area { max-width: 100%; }
  .related { padding: 14px; }
  .comments-area { padding: 14px; }
  .footer-beian { flex-direction: column; align-items: center; gap: 2px 0; }
  .banner-slider { height: 200px; }
  .post.single, .post.page { padding: 18px 0; }
  .post.single .post-title { font-size: 22px; }
  .related-list { grid-template-columns: 1fr; }
  .post-nav { flex-direction: column; }
  .post-nav-item.next { text-align: left; }
  .post-row { gap: 12px; padding: 14px 0; }
  .post-row-thumb { width: 130px; height: 90px; }
  .post-row-title { font-size: 16px; }
  /* 移动端推荐位 */
  .rec-section { padding: 8px; }
  .rec-grid { min-width: 0; }
  .rec-grid > * { min-width: 0; }
  .rec-articles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .rec-art { flex-direction: column; align-items: stretch; padding: 0; }
  .rec-art-thumb { width: 100%; height: 90px; margin-bottom: 6px; }
  .rec-art-info { padding: 0 4px 6px; }
  .rec-art-title { font-size: 13px; }
  .rec-cats { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .rec-cat { flex-direction: column; align-items: center; text-align: center; padding: 8px 2px; }
  .rec-cat-icon { width: 40px; height: 40px; margin-right: 0; margin-bottom: 6px; }
  .rec-cat-info { width: 100%; }
  .rec-cat-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rec-cat-count { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .site-title { font-size: 19px; }
  .post-title { font-size: 18px; }
  .post-row { gap: 10px; padding: 12px 0; }
  .post-row-thumb { width: 100px; height: 75px; }
  .post-row-excerpt { max-height: 5.1em; } /* 移动端摘要最多 3 行，换行仍生效 */
  .breadcrumb { padding: 0 14px; }
  .breadcrumb-inner { padding: 10px 14px; }
}

/* ============================================================
   Font Awesome 图标整合样式
   ============================================================ */
.theme-toggle i, .nav-toggle i, .search-toggle i, .header-search button i, .back-to-top i {
  color: var(--mowen-text);
  transition: color 0.2s;
}
.theme-toggle:hover i, .nav-toggle:hover i, .search-toggle:hover i { color: var(--mowen-primary); }
.back-to-top i { color: #fff; }
.header-search button i { color: var(--mowen-text-muted); }

/* 文章 meta 图标 */
.post-meta i {
  margin-right: 4px;
  color: var(--mowen-primary);
  font-size: 13px;
}


/* 标签、相关文章、评论标题图标 */
.related-title i, .comments-title i, .commentpost-title i {
  color: var(--mowen-primary);
  margin-right: 6px;
}
.post-nav-item span i { margin-right: 4px; }
.post-nav-item.next span i { margin-left: 4px; margin-right: 0; }

/* ============================================================
   文章工具栏（点赞 / 打赏 / 分享 / 复制链接 / 二维码）
   ============================================================ */
.post-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--mowen-border);
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--mowen-border);
  border-radius: 20px;
  background: var(--mowen-card);
  color: var(--mowen-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.tool-btn:hover {
  border-color: var(--mowen-primary);
  color: var(--mowen-primary);
}
.tool-btn i { font-size: 14px; }
.tool-btn.liked {
  background: var(--mowen-primary);
  border-color: var(--mowen-primary);
  color: #fff;
}

/* 浮层遮罩 + 弹窗 */
.tool-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tool-overlay.open { display: flex; }
.tool-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--mowen-card);
  border-radius: var(--mowen-radius);
  box-shadow: var(--mowen-shadow);
  padding: 28px 24px 24px;
  animation: toolFadeIn 0.2s ease;
}
@keyframes toolFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tool-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--mowen-hover);
  color: var(--mowen-text);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-modal-close:hover { color: var(--mowen-primary); }
.tool-modal-title {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
}
.tool-reward-text {
  text-align: center;
  color: var(--mowen-text-muted);
  font-size: 13px;
  margin-top: 16px;
}

/* 打赏 Tab 切换 */
.tool-reward-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}
.tool-reward-tab {
  padding: 7px 20px;
  border: 1px solid var(--mowen-border);
  border-radius: 20px;
  background: var(--mowen-card);
  color: var(--mowen-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.tool-reward-tab:hover { border-color: var(--mowen-primary); color: var(--mowen-primary); }
.tool-reward-tab.active {
  background: var(--mowen-primary);
  border-color: var(--mowen-primary);
  color: #fff;
}
.tool-reward-panels { display: flex; justify-content: center; }
.tool-reward-panel {
  display: none;
  text-align: center;
}
.tool-reward-panel.active { display: block; }
.tool-reward-panel img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border: 1px solid var(--mowen-border);
  border-radius: 8px;
  background: #fff;
}

/* 分享列表 */
.tool-share-list {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.tool-share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 72px;
  padding: 12px 0;
  border: 1px solid var(--mowen-border);
  border-radius: var(--mowen-radius);
  background: var(--mowen-card);
  color: var(--mowen-text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.tool-share-item:hover { border-color: var(--mowen-primary); color: var(--mowen-primary); }
.tool-share-item i { font-size: 24px; }
.tool-share-item[data-share="wechat"] i { color: #07c160; }
.tool-share-item[data-share="qq"] i { color: #12b7f5; }

/* 二维码 */
.tool-qrcode-box {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.tool-qrcode-box img, .tool-qrcode-box canvas {
  border: 1px solid var(--mowen-border);
  border-radius: 8px;
}
.tool-qrcode-tip {
  text-align: center;
  color: var(--mowen-text-muted);
  font-size: 13px;
}

/* 轻提示 toast */
.tool-toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(10px);
  z-index: 1000;
  padding: 10px 22px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 14px;
  border-radius: 22px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.tool-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.tool-toast.comment-toast {
  top: 50%;
  bottom: auto;
  max-width: 80vw;
  text-align: center;
  line-height: 1.5;
  transform: translateX(-50%) translateY(-50%);
}
.tool-toast.comment-toast.show { transform: translateX(-50%) translateY(-50%); }
.tool-toast.comment-toast.toast-ok { background: rgba(107, 163, 104, 0.94); }
.tool-toast.comment-toast.toast-err { background: rgba(200, 80, 70, 0.94); }

/* ============================================================
   登录/注册入口（header-actions）
   ============================================================ */
.auth-login, .auth-register, .auth-user {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s;
}
.auth-login {
  border: 1px solid var(--mowen-border);
  color: var(--mowen-text);
}
.auth-login:hover { border-color: var(--mowen-primary); color: var(--mowen-primary); }
.auth-register {
  background: var(--mowen-primary);
  color: #fff;
}
.auth-register:hover { color: #fff; opacity: 0.88; }
.auth-login-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--mowen-border);
  border-radius: 50%;
  background: var(--mowen-card);
  font-size: 17px;
  color: var(--mowen-text);
  cursor: pointer;
  transition: all 0.2s;
}
.auth-login-icon:hover { border-color: var(--mowen-primary); }
.auth-login-icon i { color: var(--mowen-text); transition: color 0.2s; }
.auth-login-icon:hover i { color: var(--mowen-primary); }
.auth-user {
  border: 1px solid var(--mowen-border);
  color: var(--mowen-text);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-user:hover { border-color: var(--mowen-primary); color: var(--mowen-primary); }
.auth-user i { color: var(--mowen-primary); }
.auth-user .auth-caret { font-size: 11px; margin-left: 6px; color: var(--mowen-text-muted); }
.auth-user-menu { position: relative; display: inline-flex; }
.auth-user-menu .auth-user { cursor: pointer; background: transparent; }
.auth-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--mowen-card);
  border: 1px solid var(--mowen-border);
  border-radius: 10px;
  box-shadow: var(--mowen-shadow);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s;
  z-index: 100;
}
.auth-user-menu:hover .auth-dropdown,
.auth-user-menu:focus-within .auth-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.auth-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--mowen-text);
  white-space: nowrap;
}
.auth-dropdown a:hover { background: var(--mowen-bg); color: var(--mowen-primary); }
.auth-dropdown a i { width: 16px; text-align: center; color: var(--mowen-text-muted); }
.auth-dropdown a:hover i { color: var(--mowen-primary); }
.auth-dropdown a + a { border-top: 1px solid var(--mowen-border); }

/* ============================================================
   登录/注册独立页面
   ============================================================ */
.auth-container {
  display: flex;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 60px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--mowen-card);
  border: 1px solid var(--mowen-border);
  border-radius: var(--mowen-radius);
  box-shadow: var(--mowen-shadow);
  padding: 36px 32px 28px;
}
.auth-card-wide { max-width: 520px; }
/* 个人中心侧栏布局 */
.profile-container {
  padding-top: 0;
  padding-bottom: 60px;
}
.profile-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.profile-sidebar {
  flex: 0 0 240px;
  background: var(--mowen-card);
  border: 1px solid var(--mowen-border);
  border-radius: var(--mowen-radius);
  box-shadow: var(--mowen-shadow);
  overflow: hidden;
}
.profile-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--mowen-border);
}
.profile-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
}
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--mowen-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex: 0 0 auto;
}
.profile-user-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--mowen-text);
}
.profile-user-level {
  font-size: 12px;
  color: var(--mowen-text-muted);
  margin-top: 2px;
}
.profile-nav {
  padding: 8px;
}
.profile-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--mowen-text);
  transition: all 0.2s;
}
.profile-nav-item i { width: 16px; text-align: center; color: var(--mowen-text-muted); }
.profile-nav-item:hover { background: var(--mowen-bg); color: var(--mowen-primary); }
.profile-nav-item:hover i { color: var(--mowen-primary); }
.profile-nav-item.active {
  background: var(--mowen-primary);
  color: #fff;
}
.profile-nav-item.active i { color: #fff; }
.profile-main {
  flex: 1;
  min-width: 0;
}
.profile-panel {
  background: var(--mowen-card);
  border: 1px solid var(--mowen-border);
  border-radius: var(--mowen-radius);
  box-shadow: var(--mowen-shadow);
  padding: 28px 32px;
}
.profile-panel-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--mowen-text);
}
.profile-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 16px;
  text-align: center;
  color: var(--mowen-text-muted);
  font-size: 14px;
}
.profile-placeholder i {
  font-size: 40px;
  margin-bottom: 16px;
  color: var(--mowen-border);
}
/* 我的评论列表 */
.mowen-cmt-list { margin-top: 12px; }
.mowen-cmt-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--mowen-border);
}
.mowen-cmt-item:last-child { border-bottom: none; }
.mowen-cmt-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--mowen-text);
  word-wrap: break-word;
  margin-bottom: 8px;
}
.mowen-cmt-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--mowen-text-muted);
}
.mowen-cmt-post {
  color: var(--mowen-primary);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mowen-cmt-post:hover { opacity: 0.8; }
.mowen-cmt-time i, .mowen-cmt-post i { margin-right: 4px; }
.mowen-cmt-checking {
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  background: var(--mowen-warn-bg, #fff7e6);
  color: var(--mowen-warn, #d48806);
}
.mowen-cmt-pager {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.mowen-cmt-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--mowen-border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--mowen-text);
  transition: all 0.2s;
}
.mowen-cmt-page:hover { border-color: var(--mowen-primary); color: var(--mowen-primary); }
.mowen-cmt-page.current {
  background: var(--mowen-primary);
  border-color: var(--mowen-primary);
  color: #fff;
}
.mowen-cmt-page.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.profile-info { margin-top: 12px; }
.profile-item {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px dashed var(--mowen-border);
  font-size: 14px;
}
.profile-item:last-child { border-bottom: none; }
.profile-label {
  flex: 0 0 80px;
  color: var(--mowen-text-muted);
  font-size: 13px;
  line-height: 1.6;
}
.profile-value {
  flex: 1;
  min-width: 0;
  color: var(--mowen-text);
  word-break: break-all;
  line-height: 1.6;
}
.profile-value a { color: var(--mowen-primary); }
.profile-value a:hover { text-decoration: underline; }
.profile-empty { color: var(--mowen-text-muted); opacity: 0.6; }
.profile-form .profile-item { align-items: center; }
.profile-item-top { align-items: flex-start !important; }
.profile-item-top .profile-label { padding-top: 11px; }
.profile-value input[type="text"],
.profile-value input[type="password"],
.profile-value textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--mowen-border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  background: var(--mowen-bg);
  color: var(--mowen-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.profile-value textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.6;
  font-family: inherit;
}
.profile-value input[type="text"]:focus,
.profile-value input[type="password"]:focus,
.profile-value textarea:focus {
  outline: none;
  border-color: var(--mowen-primary);
  box-shadow: 0 0 0 3px rgba(107, 163, 104, 0.15);
}
.profile-value input[type="text"]:disabled,
.profile-value input[type="password"]:disabled {
  background: var(--mowen-bg);
  color: var(--mowen-text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}
.profile-tip {
  color: var(--mowen-text-muted);
  font-size: 12px;
  margin-top: 6px;
}
.profile-submit {
  margin-top: 20px;
}
.profile-submit .auth-submit {
  width: auto;
  padding: 0 32px;
  height: 42px;
}
.auth-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}
.auth-subtitle {
  text-align: center;
  color: var(--mowen-text-muted);
  font-size: 13px;
  margin-bottom: 24px;
}
.auth-form .auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mowen-text);
}
.auth-field input[type="text"],
.auth-field input[type="password"] {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--mowen-border);
  border-radius: 8px;
  background: var(--mowen-bg);
  color: var(--mowen-text);
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--mowen-primary);
  box-shadow: 0 0 0 3px rgba(107, 163, 104, 0.15);
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--mowen-text-muted);
  margin-bottom: 18px;
  cursor: pointer;
}
.auth-remember input { width: 15px; height: 15px; }
.auth-submit {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 22px;
  background: var(--mowen-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 2px;
  transition: opacity 0.2s;
}
.auth-submit:hover { opacity: 0.88; }
.auth-code-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.auth-code-row input {
  flex: 1;
}
.auth-getcode {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--mowen-primary);
  border-radius: 8px;
  color: var(--mowen-primary);
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s;
}
.auth-getcode:hover { background: var(--mowen-primary); color: #fff; }
.auth-getcode.is-counting {
  border-color: var(--mowen-border);
  color: var(--mowen-text-sub, #999);
  cursor: not-allowed;
  pointer-events: none;
}
.auth-getcode.is-counting:hover { background: transparent; }
.auth-verify-img {
  height: 42px;
  border: 1px solid var(--mowen-border);
  border-radius: 8px;
  cursor: pointer;
  flex: 0 0 auto;
  background: #fff;
}
.auth-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  font-size: 13px;
}
.auth-links a { color: var(--mowen-text-muted); }
.auth-links a:hover { color: var(--mowen-primary); }
.auth-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
}
.auth-msg-success {
  background: #e8f7ee;
  color: #2a9d5a;
  border: 1px solid #bfe8cf;
}
.auth-msg-error {
  background: #fdecec;
  color: #d64545;
  border: 1px solid #f5c2c2;
}
[data-theme="dark"] .auth-msg-success { background: #1c3326; color: #5ec98a; border-color: #2c4a38; }
[data-theme="dark"] .auth-msg-error { background: #3a2424; color: #e88282; border-color: #553232; }

/* ============================================================
   登录可见内容提示（文章页 [login]...[/login]）
   ============================================================ */
.mowen-login-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  margin: 12px 0;
  background: #fff8e6;
  border: 1px dashed #e8c878;
  border-radius: 8px;
  color: #b8860b;
  font-size: 14px;
}
.mowen-login-tip i { font-size: 15px; }
.mowen-login-tip a {
  color: var(--mowen-primary);
  font-weight: 600;
  text-decoration: underline;
}
[data-theme="dark"] .mowen-login-tip {
  background: #332b1a;
  border-color: #5a4a24;
  color: #e0b95c;
}

/* 个人中心响应式：小屏侧栏变顶部纵排，导航纵向堆叠，表单字段纵向堆叠 */
@media (max-width: 768px) {
  .profile-container {
    padding-top: 16px;
    padding-bottom: 40px;
  }
  .profile-layout {
    flex-direction: column;
    gap: 16px;
  }
  .profile-sidebar,
  .profile-main,
  .profile-panel,
  .profile-form {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .profile-sidebar {
    flex: none;
  }
  .profile-user-card {
    padding: 14px 16px;
    justify-content: center;
    gap: 10px;
  }
  .profile-avatar {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }
  .profile-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 6px;
  }
  .profile-nav-item {
    padding: 11px 6px;
    font-size: 13px;
    justify-content: center;
    border: 1px solid var(--mowen-border);
    border-radius: 8px;
  }
  .profile-nav-item.active {
    border-color: var(--mowen-primary);
  }
  .profile-panel {
    padding: 20px 16px;
  }
  .profile-item {
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
  }
  .profile-label {
    flex: none;
    width: 100%;
    font-size: 12px;
  }
  .profile-value {
    width: 100%;
  }
  .profile-submit .auth-submit {
    width: 100%;
  }
  /* 移动端头部用户名过长时截断，登录/注册按钮精简 */
  .auth-user {
    max-width: 90px;
  }
  .auth-user .auth-caret {
    display: none;
  }
  .auth-dropdown {
    right: -40px;
  }
}

/* ============================================================
   头像上传 + 裁剪
   ============================================================ */
.avatar-upload {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}
.avatar-preview-box {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--mowen-border);
  flex: 0 0 auto;
  background: var(--mowen-bg);
}
.avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-preview-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  background: var(--mowen-primary);
}
.avatar-upload-info {
  flex: 1;
  min-width: 200px;
}
.avatar-upload-info p {
  color: var(--mowen-text-muted);
  font-size: 13px;
  margin: 0 0 16px;
  line-height: 1.6;
}
.avatar-upload-info .auth-submit {
  width: auto;
  padding: 0 28px;
  height: 42px;
}

/* 裁剪弹窗 */
.avatar-crop-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.avatar-crop-dialog {
  background: var(--mowen-card);
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.avatar-crop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--mowen-border);
  font-size: 16px;
  font-weight: 600;
  color: var(--mowen-text);
}
.avatar-crop-close {
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--mowen-text-muted);
  cursor: pointer;
}
.avatar-crop-close:hover { color: var(--mowen-text); }
.avatar-crop-body {
  padding: 20px;
}
.avatar-crop-stage {
  position: relative;
  width: 100%;
  height: 320px;
  background: #000;
  overflow: hidden;
  border-radius: 8px;
}
.avatar-crop-stage img {
  position: absolute;
  user-select: none;
  -webkit-user-drag: none;
}
.avatar-crop-box {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  cursor: move;
  box-sizing: border-box;
}
.avatar-crop-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px);
  background-size: 33.33% 33.33%;
}
.avatar-crop-handle {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 20px;
  height: 20px;
  background: #fff;
  border: 2px solid #409eff;
  border-radius: 50%;
  cursor: nwse-resize;
  z-index: 2;
}
.avatar-crop-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--mowen-border);
}
.avatar-crop-status {
  margin-right: auto;
  font-size: 13px;
  color: var(--mowen-text-muted);
}
.avatar-crop-status-loading { color: #409eff; }
.avatar-crop-status-ok { color: #2a9d5a; }
.avatar-crop-status-err { color: #d64545; }
.avatar-crop-cancel {
  border: 1px solid var(--mowen-border);
  background: var(--mowen-card);
  color: var(--mowen-text);
  border-radius: 20px;
  height: 40px;
  padding: 0 24px;
  font-size: 14px;
  cursor: pointer;
}
.avatar-crop-cancel:hover { border-color: var(--mowen-primary); color: var(--mowen-primary); }
.avatar-crop-footer .auth-submit {
  width: auto;
  height: 40px;
  padding: 0 28px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .avatar-upload {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .avatar-upload-info p {
    margin-bottom: 12px;
  }
  .avatar-crop-stage {
    height: 240px;
  }
}

/* ============================================================
   文章图片灯箱（点击放大 / 左右切换 / 手机滑动）
   ============================================================ */
.mowen-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.mowen-lightbox.open {
  opacity: 1;
  visibility: visible;
}
.mowen-lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 40px;
  box-sizing: border-box;
}
.mowen-lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.mowen-lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.mowen-lb-close:hover { background: rgba(255, 255, 255, 0.25); }
.mowen-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.mowen-lb-arrow:hover { background: rgba(255, 255, 255, 0.25); }
.mowen-lb-prev { left: 20px; }
.mowen-lb-next { right: 20px; }
.mowen-lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: #fff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 14px;
  border-radius: 14px;
  pointer-events: none;
}

/* 手机端：箭头缩小、计数器下移，滑动切换为主 */
@media (max-width: 768px) {
  .mowen-lb-stage { padding: 16px; }
  .mowen-lb-arrow { width: 40px; height: 40px; font-size: 18px; }
  .mowen-lb-prev { left: 8px; }
  .mowen-lb-next { right: 8px; }
  .mowen-lb-close { width: 40px; height: 40px; top: 10px; right: 10px; }
  .mowen-lb-counter { bottom: 16px; }
}

