:root {
  --bg: #f6f1e7;
  --bg-soft: #fbf6ec;
  --bg-card: #ffffff;
  --text: #3a2f25;
  --text-muted: #7a6b5e;
  --line: #e9dfce;
  --primary: #e08a4a;
  --primary-dark: #c8723a;
  --secondary: #6b8e6b;
  --accent: #c45c4d;
  --shadow-sm: 0 2px 6px rgba(58, 47, 37, 0.06);
  --shadow-md: 0 8px 24px rgba(58, 47, 37, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1180px;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--text); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--primary); }

h1, h2, h3, h4 { color: var(--text); margin: 0 0 .6em; line-height: 1.3; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  z-index: 999;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo {
  /* header 是 68px 高、图片原生 128×52；选 48px 既能给 header 留边距，又最大化保真（≈92% 原始尺寸） */
  height: 48px;
  width: auto;        /* 按原比例自动算宽 ≈ 118px */
  display: block;
}
.brand-slogan {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 12px;
  border-left: 1px solid var(--line);
  line-height: 1.2;
}

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
}
.site-nav a:hover { color: var(--text); background: rgba(224, 138, 74, 0.08); }
.site-nav a.active { color: var(--primary); background: rgba(224, 138, 74, 0.14); }
.site-nav .nav-cta {
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
}
.site-nav .nav-cta:hover { background: var(--primary-dark); color: #fff; }

@media (max-width: 700px) {
  .site-nav a { padding: 6px 10px; font-size: 13px; }
  .brand-slogan { display: none; }
}

/* ---------- breadcrumbs ---------- */

.breadcrumbs {
  background: transparent;
  padding: 14px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.breadcrumbs li::after { content: "›"; margin-left: 6px; color: var(--line); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }

/* ---------- hero ---------- */

.hero {
  background: radial-gradient(ellipse at top right, rgba(224, 138, 74, 0.18), transparent 55%),
              radial-gradient(ellipse at bottom left, rgba(107, 142, 107, 0.14), transparent 60%),
              var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 64px 24px 72px;
}
.hero-text h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.hero-sub { font-size: 1.05rem; color: var(--text-muted); max-width: 36em; margin-bottom: 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-stats {
  display: flex;
  gap: 36px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.5rem; color: var(--primary); }
.hero-stats span { font-size: 13px; color: var(--text-muted); }

.hero-art {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
}
.hero-circle-1 {
  width: 240px; height: 240px;
  background: radial-gradient(circle at 30% 30%, #f5b884, #e08a4a);
  top: 20px; right: 20px;
  opacity: 0.85;
}
.hero-circle-2 {
  width: 160px; height: 160px;
  background: radial-gradient(circle at 70% 70%, #a3c5a3, #6b8e6b);
  bottom: 10px; left: 30px;
  opacity: 0.8;
}
.hero-pinecone {
  position: relative;
  font-size: 8rem;
  z-index: 1;
  filter: drop-shadow(0 6px 16px rgba(58,47,37,0.25));
}

@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; padding: 40px 24px 48px; gap: 32px; }
  .hero-text h1 { font-size: 2rem; }
  .hero-art { height: 220px; }
  .hero-pinecone { font-size: 5rem; }
  .hero-stats { gap: 24px; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-disabled {
  background: var(--line);
  color: var(--text-muted);
  cursor: not-allowed;
  padding: 12px 22px;
  border-radius: 999px;
}

/* ---------- sections ---------- */

.section { padding: 56px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-more { color: var(--text-muted); font-size: 14px; }
.section-more:hover { color: var(--primary); }

.section-cta {
  background: linear-gradient(135deg, rgba(224,138,74,0.12), rgba(107,142,107,0.08));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-inner h2 { margin: 0 0 6px; }
.cta-inner p { margin: 0; color: var(--text-muted); }

.empty-tip { color: var(--text-muted); padding: 32px 0; text-align: center; }

/* ---------- category chips ---------- */

.cat-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 0;
}
.cat-chips a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 14px;
}
.cat-chips a:hover { color: var(--primary); border-color: var(--primary); }
.cat-chips a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- card grid & post-card ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.post-card-cover {
  position: relative;
  aspect-ratio: 2 / 1;
  background: linear-gradient(135deg, #f5dfc8, #e7d3b6);
  display: block;
  overflow: hidden;
}
.post-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* 无封面时把置顶/精选徽章挪到卡片正文上方；用静态内联，避免 .badge 默认 absolute 浮到整张卡片右上角覆盖分类 */
.post-card-flags {
  display: block;
  padding: 14px 18px 0;
  line-height: 1;
}
.post-card-flags .badge {
  position: static;
  display: inline-block;
}
/* 紧接着的 body 不再需要全量 padding-top，避免叠加出大块留白 */
.post-card-flags + .post-card-body {
  padding-top: 10px;
}
/* 没封面也没徽章时，body 顶部稍微收一点，让纯文字卡视觉上更紧凑 */
.post-card > .post-card-body:first-child {
  padding-top: 18px;
}
.post-card-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.post-card-cat {
  display: inline-block;
  font-size: 12px;
  color: var(--secondary);
  margin-bottom: 8px;
}
.post-card-title { font-size: 1.05rem; line-height: 1.45; margin: 0 0 8px; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--primary); }
.post-card-summary {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.badge-top { background: var(--accent); }
.badge-featured { background: var(--secondary); }

/* ---------- list head ---------- */

.list-head {
  background: var(--bg-soft);
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--line);
}
.list-head h1 { margin: 0; }
.list-head-sub { color: var(--text-muted); margin-top: 6px; }

/* ---------- pager ---------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 36px;
  font-size: 14px;
}
.pager-link {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
}
.pager-link:hover { border-color: var(--primary); color: var(--primary); }
.pager-link.is-disabled { color: var(--text-muted); background: transparent; cursor: not-allowed; pointer-events: none; }
.pager-info { color: var(--text-muted); }

/* ---------- detail ---------- */

.post-detail { padding: 32px 0 80px; }
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 1000px) {
  .post-layout { grid-template-columns: 1fr; }
}

.post-main { background: #fff; border-radius: var(--radius); padding: 36px 40px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.post-header { margin-bottom: 24px; }
.post-cat {
  display: inline-block;
  font-size: 13px;
  color: var(--secondary);
  margin-bottom: 6px;
}
.post-header h1 { font-size: 2rem; line-height: 1.3; margin: 6px 0 12px; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  align-items: center;
}
.post-meta-author { display: inline-flex; align-items: center; gap: 6px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 22px; height: 22px; }
.avatar-fallback {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
}

.post-cover { margin: 0 0 28px; border-radius: var(--radius-sm); overflow: hidden; }

.post-body { font-size: 16px; line-height: 1.85; }
.post-body h2 {
  font-size: 1.4rem;
  margin: 32px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
}
.post-body h3 { font-size: 1.15rem; margin: 24px 0 10px; color: var(--primary-dark); }
.post-body p { margin: 0 0 1em; }
.post-body img { border-radius: var(--radius-sm); margin: 12px 0; }
.post-body blockquote {
  border-left: 3px solid var(--line);
  padding: 8px 16px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-radius: 4px;
  margin: 16px 0;
}
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body code {
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.post-body pre {
  background: #2c241d;
  color: #f6f1e7;
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 13px;
}

.post-faq { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-faq h2 { font-size: 1.3rem; }
.post-faq dt { font-weight: 600; margin-top: 12px; }
.post-faq dd { margin: 4px 0 12px; color: var(--text-muted); }

.post-cta {
  margin-top: 36px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(224,138,74,0.12), rgba(107,142,107,0.08));
  border-radius: var(--radius);
  text-align: center;
}
.post-cta h3 { margin: 0 0 4px; }
.post-cta p { margin: 0 0 14px; color: var(--text-muted); }

/* ---------- sidebar ---------- */

.post-aside { display: flex; flex-direction: column; gap: 18px; }
.aside-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.aside-card h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.aside-author-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.author-name { font-weight: 600; }
.author-role { font-size: 12px; color: var(--text-muted); }
.author-bio { font-size: 13px; color: var(--text-muted); margin: 6px 0 0; }

.aside-toc ol { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.aside-toc li { margin: 6px 0; line-height: 1.5; }
.aside-toc .toc-l3 { padding-left: 14px; font-size: 13px; color: var(--text-muted); }
.aside-toc a { color: var(--text); }
.aside-toc a:hover { color: var(--primary); }

.aside-related ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.aside-related li { margin: 8px 0; line-height: 1.5; }
.aside-related a { color: var(--text); }
.aside-related a:hover { color: var(--primary); }

/* ---------- about / download ---------- */

.about-hero {
  background: var(--bg-soft);
  padding: 60px 0;
  border-bottom: 1px solid var(--line);
}
.about-lead { font-size: 1.1rem; color: var(--text-muted); max-width: 40em; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.about-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.about-card h2 { font-size: 1.15rem; }
.about-card p { color: var(--text-muted); margin: 0; }

.download-hero {
  background: radial-gradient(ellipse at top right, rgba(224, 138, 74, 0.18), transparent 55%), var(--bg-soft);
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}
.download-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 800px) {
  .download-inner { grid-template-columns: 1fr; }
}
.download-text h1 { font-size: 2.2rem; }
.download-sub { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 20px; }
.download-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.download-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}
.download-art { display: flex; justify-content: center; }
.download-phone {
  width: 240px;
  height: 460px;
  background: linear-gradient(180deg, #fff, #f0e6d4);
  border-radius: 36px;
  border: 6px solid #2c241d;
  padding: 40px 18px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.download-screen {
  background: var(--bg-soft);
  border-radius: 18px;
  height: 100%;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.screen-line {
  height: 16px;
  background: rgba(58,47,37,0.1);
  border-radius: 999px;
}
.screen-line.short { width: 60%; }

/* ---------- footer ---------- */

.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 36px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.footer-brand strong { color: var(--text); font-size: 1rem; }
.footer-brand p { margin: 6px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }
.footer-meta { display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr; }
}
