/* 云猫 yunmao.cloud · 阅读型站点样式。系统字体栈，浅色/深色随系统，正文行宽约 680px。 */

:root {
  --bg: #fbfaf7;
  --bg-raised: #ffffff;
  --text: #1c1a16;
  --text-muted: #5c574c;
  --text-faint: #8a8477;
  --border: #e6e1d6;
  --accent: #b5541f;
  --accent-soft: #f3e6da;
  --link: #8a4416;
  --code-bg: #f1ede3;
  --ad-bg: #fbeee0;
  --ad-text: #8a5a1c;
  --shadow: 0 1px 2px rgba(28, 26, 22, 0.06);
  --max-width: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161512;
    --bg-raised: #1e1c18;
    --text: #eae6dc;
    --text-muted: #b3ad9e;
    --text-faint: #837c6d;
    --border: #34302a;
    --accent: #e08a4f;
    --accent-soft: #3a2a1c;
    --link: #eba268;
    --code-bg: #262319;
    --ad-bg: #332616;
    --ad-text: #e0a860;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/* 顶部导航 */
.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
}

.brand svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

/* 页面容器 */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.wide {
  max-width: 760px;
}

/* 首页 */
.hero {
  padding: 8px 0 28px;
}

.hero h1 {
  font-size: 26px;
  line-height: 1.4;
  margin: 0 0 10px;
}

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

.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

@media (max-width: 480px) {
  .scene-grid {
    grid-template-columns: 1fr;
  }
}

.scene-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-raised);
  transition: border-color 0.15s ease;
}

.scene-card:hover {
  border-color: var(--accent);
}

.scene-card .scene-num {
  color: var(--text-faint);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.scene-card h3 {
  margin: 4px 0 6px;
  font-size: 16px;
  line-height: 1.5;
}

.scene-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.ad-note {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13.5px;
  line-height: 1.7;
}

/* 文章页 */
.article-meta {
  color: var(--text-faint);
  font-size: 14px;
  margin: 0 0 4px;
}

.article-ad-banner {
  display: inline-block;
  margin: 4px 0 22px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--ad-bg);
  color: var(--ad-text);
  font-size: 13px;
}

article h1 {
  font-size: 25px;
  line-height: 1.45;
  margin: 0 0 18px;
}

article h2 {
  font-size: 20px;
  margin: 40px 0 14px;
  padding-top: 4px;
}

article h3 {
  font-size: 17px;
  margin: 26px 0 10px;
}

article p {
  margin: 0 0 16px;
}

article ul,
article ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

article li {
  margin-bottom: 6px;
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 15px;
}

article th,
article td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

article th {
  background: var(--code-bg);
  font-weight: 600;
}

article code {
  background: var(--code-bg);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

article blockquote {
  margin: 0 0 16px;
  padding: 4px 16px;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

.toc {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 28px;
  background: var(--bg-raised);
  font-size: 14.5px;
}

.toc-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

.toc li {
  margin-bottom: 4px;
}

/* 「怎么买」区块 */
.buy-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 22px 0 30px;
  background: var(--bg-raised);
}

.buy-box h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.buy-box .buy-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 12px;
}

.buy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.buy-row:last-child {
  margin-bottom: 0;
}

.buy-btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
}

.buy-btn:hover {
  opacity: 0.9;
}

.ad-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--ad-bg);
  color: var(--ad-text);
  font-size: 12px;
  font-weight: 600;
}

.buy-program {
  color: var(--text-faint);
  font-size: 12.5px;
}

/* 相关阅读 */
.related {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.related h2 {
  font-size: 17px;
  margin: 0 0 12px;
}

.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related li {
  margin-bottom: 8px;
}

/* about / 首页文字块 */
.prose h2 {
  font-size: 19px;
  margin: 32px 0 12px;
}

.prose p {
  margin: 0 0 14px;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13.5px;
}

.site-footer-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  line-height: 1.8;
}

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

/* 404 */
.not-found {
  text-align: center;
  padding: 80px 16px;
}

.not-found h1 {
  font-size: 22px;
}
