/* 前台补充：占位图、空状态、文章页排版、移动菜单 */
:root {
  --cg-accent: #9a2e31;
}

/* 无封面时的纯 CSS 占位（不加载任何外部图片） */
.cg-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  color: rgba(255, 255, 255, .55);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -3px;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .18);
}
.tone-1  { background: linear-gradient(135deg, #2f3a44, #8d979f); }
.tone-2  { background: linear-gradient(135deg, #7c3b34, #d9a08c); }
.tone-3  { background: linear-gradient(135deg, #2c3b33, #9db3a5); }
.tone-4  { background: linear-gradient(135deg, #4a4038, #c2b39c); }
.tone-5  { background: linear-gradient(135deg, #3b3a4a, #a8a4bd); }
.tone-6  { background: linear-gradient(135deg, #1f2b38, #93adc1); }
.tone-7  { background: linear-gradient(135deg, #5c4032, #caa78c); }
.tone-8  { background: linear-gradient(135deg, #3d4a3c, #adbea5); }
.tone-9  { background: linear-gradient(135deg, #33363a, #9ea3aa); }
.tone-10 { background: linear-gradient(135deg, #463443, #b39caf); }
.tone-11 { background: linear-gradient(135deg, #5a3220, #d09a76); }
.tone-12 { background: linear-gradient(135deg, #24343c, #94b2bd); }

/* 页头广告位占位 */
.cg-banner-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 88px;
  border: 1px dashed #d5d5d5;
  background: repeating-linear-gradient(45deg, #fafafa, #fafafa 8px, #f4f4f4 8px, #f4f4f4 16px);
  color: #9b9b9b;
  font-family: "Oswald", "PingFang SC", sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
}

/* 空状态 */
.cg-empty {
  flex: 0 0 100%;
  width: 100%;
  margin: 30px 0 44px;
  padding: 44px 28px;
  border: 1px dashed #dcdcdc;
  background: #fafafa;
  text-align: center;
}
.cg-empty h2 {
  margin: 0 0 10px;
  font-family: "Playfair Display", "Songti SC", Georgia, serif;
  font-size: 26px;
  color: #111;
}
.cg-empty p { margin: 0 0 14px; color: #777; font-size: 14px; }
.cg-admin-link {
  display: inline-block;
  padding: 9px 18px;
  background: #111;
  color: #fff !important;
  font-family: "Oswald", sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.cg-admin-link:hover { background: var(--cg-accent); }

/* 文章页 */
.cg-single-post {
  background: #fff;
  padding: 26px 30px 30px;
  margin: 10px 0 22px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12), 0 0 40px rgba(0, 0, 0, .04) inset;
}
.cg-single-post .entry-title { text-align: left; }
.cg-single-post .entry-meta { text-align: left; }
.cg-related-block {
  background: #fff;
  padding: 20px 22px 6px;
  margin: 0 0 22px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12), 0 0 40px rgba(0, 0, 0, .04) inset;
}
.cg-related-title { margin-top: 0; }
.entry-header { margin: 0 0 10px; }
.entry-title {
  font-family: "Playfair Display", "Songti SC", Georgia, serif;
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: -.5px;
  color: #111;
}
.entry-meta {
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid #eaeaea;
  font-family: "Oswald", "PingFang SC", sans-serif;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #8f8f8f;
}
.entry-meta a { color: var(--cg-accent); }
.entry-content {
  max-width: 820px;
  font-family: "Domine", "PingFang SC", "Noto Sans CJK SC", Georgia, serif;
  font-size: 15.5px;
  line-height: 1.95;
  color: #2f2f2f;
}
.entry-content p { margin: 0 0 18px; }
.entry-content h2 {
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #111;
  font-family: "Oswald", "PingFang SC", sans-serif;
  font-size: 17px;
  letter-spacing: 1px;
}
.entry-content h3 { margin: 22px 0 8px; font-family: "Playfair Display", "Songti SC", serif; font-size: 20px; }
.entry-content img { max-width: 100%; height: auto; display: block; margin: 20px auto; }
.entry-content blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--cg-accent);
  background: #fafafa;
  font-family: "Playfair Display", "Songti SC", serif;
  font-size: 17px;
  color: #444;
}
.entry-content ul, .entry-content ol { margin: 0 0 18px; padding-left: 1.4em; }
.entry-content li { margin-bottom: 6px; }
.entry-content a { color: var(--cg-accent); text-decoration: underline; text-underline-offset: 2px; }
.entry-content code { background: #f3f3f3; padding: 1px 5px; font-size: .92em; }
.entry-content pre { overflow: auto; padding: 14px 16px; background: #f6f6f6; border-left: 3px solid #ddd; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.entry-content th, .entry-content td { border: 1px solid #e5e5e5; padding: 8px 10px; text-align: left; }

/* 文章页封面 */
.clean-grid-post-thumbnail-single { margin: 0 0 20px; }
.clean-grid-post-thumbnail-single img { width: 100%; height: auto; display: block; }

/* 标签 */
.cg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 0; padding-top: 16px; border-top: 1px solid #eaeaea; }
.cg-tags a {
  padding: 5px 9px;
  background: #f4f4f4;
  font-family: "Oswald", "PingFang SC", sans-serif;
  font-size: 10.5px;
  letter-spacing: 1px;
  color: #666;
  text-transform: uppercase;
}
.cg-tags a:hover { background: #111; color: #fff; }

/* 上一篇 / 下一篇 */
.post-navigation { margin: 26px 0 0; }
.post-navigation .nav-links { display: flex; gap: 12px; }
.post-navigation a {
  flex: 1 1 50%;
  display: block;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  font-size: 13.5px;
  line-height: 1.5;
}
.post-navigation a:hover { border-color: #111; background: #fff; }
.post-navigation .meta-nav {
  display: block;
  margin-bottom: 4px;
  font-family: "Oswald", sans-serif;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #999;
}

/* 相关文章 */
.cg-related-title {
  margin: 34px 0 2px;
  padding-bottom: 10px;
  border-bottom: 3px solid #111;
  font-family: "Oswald", "PingFang SC", sans-serif;
  font-size: 15px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

/* 搜索框：主题默认点击图标才显示，这里改为导航右侧常显 */
.clean-grid-social-search-box {
  display: block;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  padding: 0;
  border: 0;
  background: transparent;
}
.clean-grid-search-form { display: flex; align-items: center; margin: 0; }
.clean-grid-search-field {
  width: 160px;
  padding: 6px 9px;
  border: 1px solid #555;
  background: #3d3d3d;
  color: #fff;
  font-size: 12px;
  outline: none;
}
.clean-grid-search-field::placeholder { color: #aaa; }
.clean-grid-search-submit {
  padding: 6px 10px;
  border: 1px solid #555;
  border-left: 0;
  background: #000;
  color: #fff;
  font-family: "Oswald", "PingFang SC", sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
}
.clean-grid-search-submit:hover { background: #9a2e31; }

/* 移动菜单按钮 */
.cg-menu-toggle {
  display: none;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 9px 14px;
  border: 0;
  background: #333;
  color: #fff;
  font-family: "Oswald", "PingFang SC", sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 20;
}

@media (max-width: 980px) {
  .clean-grid-menu-container-inside { position: relative; }
  .cg-menu-toggle { display: block; }
  .clean-grid-nav-primary { display: none; width: 100%; }
  .clean-grid-nav-primary.cg-open { display: block; }
  .clean-grid-nav-menu { float: none !important; width: 100%; }
  .clean-grid-nav-menu li { float: none !important; width: 100%; border-bottom: 1px solid rgba(255,255,255,.08); }
  .clean-grid-nav-menu li a { padding: 13px 16px; }
  .clean-grid-social-search-box { width: 100%; padding: 10px 14px; }
  .clean-grid-search-form { width: 100%; }
  .clean-grid-search-field { width: calc(100% - 70px); }
  .entry-title { font-size: 27px; }
  .post-navigation .nav-links { flex-direction: column; }
}

@media (max-width: 520px) {
  .cg-noimg { font-size: 46px; }
  .cg-banner-placeholder { height: 64px; }
}
