/* 生活分享日志 - multi-cms 极简杂志主题 */
:root {
  --pri: #d1bb95;
  --pri-dark: #a98e62;
  --soft: #f7f5f0;
  --surface: #f2f4f5;
  --bg: #ffffff;
  --ink: #191919;
  --body: #595959;
  --muted: #8c8c8c;
  --line: #ebebeb;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

a:hover {
  color: var(--pri-dark);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.35;
}

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cms-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad {
  padding: 72px 0;
}

.section-pad-sm {
  padding: 44px 0 72px;
}

/* 顶部公告广告位（无内容时隐藏） */
.top-notice-bar {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--body);
}

.top-notice-bar .cms-wrap {
  padding-top: 8px;
  padding-bottom: 8px;
  text-align: center;
}

.top-notice-bar .cms-wrap:empty {
  display: none;
}

/* 页头导航 */
.header-area {
  position: relative;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 20px;
}

.brand-wrap {
  min-width: 0;
  flex: 0 1 auto;
}

.nav-brand.logo-text {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  line-height: 1.2;
}

.nav-brand.logo-text:hover {
  color: var(--pri-dark);
}

.classynav .cms-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 28px;
}

.classynav .cms-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink);
  position: relative;
}

.classynav .cms-nav li.on a,
.classynav .cms-nav a:hover {
  color: var(--pri-dark);
}

.classynav .cms-nav li.on a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  background: var(--pri);
}

/* 手机汉堡按钮 */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 首屏 Hero：延续 Nikki 50/50 左右杂志分栏 */
.hero-area {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.single-hero-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
  max-width: 1440px;
  margin: 0 auto;
}

.slide-post-thumbnail {
  position: relative;
  overflow: hidden;
  background: #e9e6e0;
  min-height: 360px;
}

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

.slide-post-content {
  display: flex;
  align-items: center;
  padding: 56px 64px;
  background: var(--surface);
}

.slide-post-text {
  max-width: 520px;
}

.post-date {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pri-dark);
  margin-bottom: 14px;
  font-weight: 500;
}

.post-date a {
  color: var(--pri-dark);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 18px;
}

.slide-post-text .post-excerpt {
  font-size: 16px;
  color: var(--body);
  line-height: 1.85;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.nikki-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--pri);
}

.nikki-btn:hover {
  background: var(--pri);
  color: #ffffff;
  border-color: var(--pri);
}

.nikki-btn-ghost {
  background: transparent;
  border-color: var(--ink);
}

.nikki-btn-ghost:hover {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

/* 专题分类条 #categories */
.category-strip-area {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 36px 0;
}

.strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 20px;
}

.strip-head h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0;
}

.strip-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.category-strip-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.category-strip-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-bottom: 2px solid transparent;
  color: var(--ink);
}

.category-strip-list a:hover {
  border-bottom-color: var(--pri);
  background: var(--bg);
  color: var(--pri-dark);
}

.cat-num {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--pri-dark);
  font-weight: 600;
}

.cat-name {
  font-size: 14px;
  font-weight: 500;
}

/* 区块标题 */
.section-heading {
  text-align: center;
  margin-bottom: 44px;
}

.section-heading-left {
  text-align: left;
  margin-bottom: 32px;
}

.section-heading .eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--pri-dark);
  margin-bottom: 8px;
  font-weight: 600;
}

.section-heading h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  margin-bottom: 8px;
}

.section-heading p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* 生活精选专题 #products */
.products-section {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
}

.product-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-thumb img {
  transform: scale(1.04);
}

.product-body {
  padding: 20px 22px 24px;
}

.product-code {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--pri-dark);
  margin-bottom: 6px;
}

.product-body h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  margin-bottom: 8px;
}

.product-body p:last-child {
  font-size: 14px;
  color: var(--body);
  margin: 0;
  line-height: 1.7;
}

/* 杂志两栏布局（主栏 + 侧栏） */
.magazine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}

.o-sidebar-none .magazine-layout {
  grid-template-columns: minmax(0, 1fr);
}

.o-sidebar-none .post-sidebar-area {
  display: none;
}

/* 文章列表网格 */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 28px;
}

.posts-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 头条大卡（占满两列） */
.featured-post-area {
  grid-column: 1 / -1;
  padding-bottom: 36px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.featured-post-area .post-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 22px;
  background: var(--surface);
}

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

.featured-post-content .post-title {
  font-family: var(--font-serif);
  font-size: 26px;
  margin-bottom: 12px;
}

.featured-post-content .post-excerpt {
  font-size: 15px;
  color: var(--body);
  line-height: 1.85;
  margin-bottom: 16px;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--pri-dark);
}

/* 普通文章卡片 */
.single-blog-post {
  display: flex;
  flex-direction: column;
}

.single-blog-post .post-thumbnail {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--surface);
}

.single-blog-post .cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.single-blog-post:hover .cover-img {
  transform: scale(1.04);
}

.no-cover-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soft);
  border: 1px solid var(--line);
}

.no-cover-box a {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--pri-dark);
  letter-spacing: 0.1em;
}

.single-blog-post .post-title {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.single-blog-post .post-excerpt {
  font-size: 14px;
  color: var(--body);
  line-height: 1.75;
  margin: 0;
}

/* 侧栏 */
.post-sidebar-area {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.single-widget-area {
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.single-widget-area.ad-widget:empty {
  display: none;
}

.widget-title {
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.widget-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 44px;
  height: 2px;
  background: var(--pri);
}

.widget-title h2 {
  font-family: var(--font-serif);
  font-size: 17px;
  margin: 0;
}

.about-text {
  font-size: 14px;
  color: var(--body);
  line-height: 1.8;
  margin: 0;
}

.sidebar-post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-post-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sidebar-post-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.thumb-link {
  flex: 0 0 72px;
  width: 72px;
  height: 56px;
  overflow: hidden;
  background: var(--surface);
}

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

.thumb-meta {
  min-width: 0;
  flex: 1;
}

.thumb-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 4px;
}

.thumb-date {
  font-size: 12px;
  color: var(--muted);
}

/* 热门标签与文章标签 */
.cms-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cms-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 2px 12px;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--body);
}

.cms-tags a:hover {
  background: var(--pri);
  border-color: var(--pri);
  color: #ffffff;
}

/* 分站导航 #sites */
.sites-section {
  background: var(--soft);
  border-top: 1px solid var(--line);
}

.sites-nav-wrap .cms-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.sites-nav-wrap .cms-nav li:first-child {
  display: none;
}

.sites-nav-wrap .cms-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
}

.sites-nav-wrap .cms-nav a:hover {
  border-color: var(--pri);
  color: var(--pri-dark);
}

/* 独立站首屏与简介 */
.channel-hero {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding: 56px 0;
  text-align: center;
}

.channel-kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--pri-dark);
  margin-bottom: 10px;
  font-weight: 600;
}

.channel-hero h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  margin-bottom: 14px;
}

.channel-desc {
  max-width: 720px;
  margin: 0 auto;
  font-size: 15px;
  color: var(--body);
}

.intro-card {
  padding: 28px 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--pri);
}

.intro-title {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 14px;
}

/* 面包屑 */
.breadcrumb-area {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.local-breadcrumb,
.cms-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--muted);
}

.local-breadcrumb a,
.cms-breadcrumb a {
  color: var(--body);
}

.local-breadcrumb .current,
.cms-breadcrumb .current {
  color: var(--muted);
}

/* 文章详情与单页 */
.post-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.post-header .post-title {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.38;
  margin-bottom: 12px;
}

.post-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.post-cover-wrap {
  margin-bottom: 32px;
  overflow: hidden;
  background: var(--surface);
}

.post-cover {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* 正文排版 */
.content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--body);
  word-wrap: break-word;
}

.content p {
  margin-bottom: 1.25em;
}

.content h2, .content h3, .content h4 {
  font-family: var(--font-serif);
  margin: 1.6em 0 0.7em;
  color: var(--ink);
}

.content h2 { font-size: 22px; }
.content h3 { font-size: 19px; }

.content ul, .content ol {
  margin: 0 0 1.2em 1.4em;
}

.content ul { list-style: disc; }
.content ol { list-style: decimal; }

.content li {
  margin-bottom: 0.45em;
}

.content blockquote {
  margin: 1.5em 0;
  padding: 18px 22px;
  background: var(--soft);
  border-left: 3px solid var(--pri);
  color: var(--ink);
}

.content img {
  max-width: 100%;
  height: auto;
  margin: 1.2em auto;
}

.content pre {
  padding: 16px;
  background: var(--surface);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  display: block;
  overflow-x: auto;
}

.content th, .content td {
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.post-tags-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tags-label {
  font-size: 13px;
  color: var(--muted);
}

.article-bottom-ad {
  margin-top: 24px;
}

.article-bottom-ad:empty {
  display: none;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.post-nav-item {
  font-size: 14px;
}

.nav-dir {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.next-item {
  text-align: right;
}

.related-posts {
  margin-top: 48px;
}

.related-posts .headline {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.single-page-card {
  max-width: 860px;
  margin: 0 auto;
}

/* 分页 */
.pagination-wrap {
  margin-top: 48px;
}

.cms-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.cms-pagination a,
.cms-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
}

.cms-pagination a:hover,
.cms-pagination .current {
  background: var(--pri);
  border-color: var(--pri);
  color: #ffffff;
}

/* 404 页面 */
.notfound-box {
  max-width: 560px;
  margin: 24px auto;
  text-align: center;
  padding: 48px 24px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.notfound-code {
  font-family: var(--font-serif);
  font-size: 64px;
  line-height: 1;
  color: var(--pri);
  margin-bottom: 12px;
}

.notfound-desc {
  color: var(--body);
  margin-bottom: 24px;
}

/* 友情链接区（footer.html 自动输出） */
.site-links {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 20px 0;
  font-size: 13px;
  color: var(--muted);
}

.cms-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  line-height: 1.8;
}

.cms-links-title {
  color: var(--body);
  font-weight: 500;
}

.cms-links a {
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.cms-links a:hover {
  color: var(--pri-dark);
}

/* 页脚 */
.footer-area {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 52px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  margin-bottom: 12px;
}

.footer-about .site-desc {
  font-size: 14px;
  color: var(--body);
  margin-bottom: 8px;
}

.footer-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.footer-contact-line {
  font-size: 14px;
  color: var(--body);
  margin-bottom: 6px;
}

.copywrite-text {
  padding-top: 22px;
  text-align: center;
}

.copywrite-text p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.copywrite-text a {
  color: var(--muted);
}

/* 响应式：平板与手机（含 375px 适配） */
@media (max-width: 992px) {
  .single-hero-post {
    grid-template-columns: 1fr;
  }
  .slide-post-thumbnail {
    aspect-ratio: 16 / 10;
    min-height: 240px;
  }
  .slide-post-content {
    padding: 36px 24px;
  }
  .category-strip-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .products-grid,
  .posts-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .magazine-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 760px) {
  .cms-wrap {
    padding: 0 16px;
  }
  .section-pad {
    padding: 48px 0;
  }
  .header-inner {
    min-height: 64px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .nav-brand.logo-text {
    font-size: 20px;
    max-width: 220px;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .classynav {
    display: none;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .classynav.is-open {
    display: block;
  }
  .classynav .cms-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .classynav .cms-nav a {
    width: 100%;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
  }
  .classynav .cms-nav li:last-child a {
    border-bottom: none;
  }
  .hero-title {
    font-size: 28px;
  }
  .category-strip-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .products-grid,
  .posts-grid,
  .posts-grid-3,
  .footer-grid,
  .post-nav {
    grid-template-columns: 1fr;
  }
  .next-item {
    text-align: left;
  }
  .channel-hero {
    padding: 36px 0;
  }
  .channel-hero h1,
  .post-header .post-title {
    font-size: 24px;
  }
  .intro-card {
    padding: 20px;
  }
}
