/* 慢游旅居手记 · 测试版（个人旅居博客）共享样式 */
:root {
  --paper: #FAF5EC;
  --card: #FFFDF8;
  --ink: #2E2A26;
  --muted: #8A8177;
  --line: #E4DACB;
  --accent: #C05B2E;
  --accent-soft: #F5E3D6;
  --teal: #3E7C6F;
  --teal-soft: #E3EEEA;
  --serif: Georgia, "Songti SC", "SimSun", serif;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- 头部 ---------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--card); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-name { font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: 1px; color: var(--ink); }
.brand-name:hover { text-decoration: none; color: var(--accent); }
.brand-tag { font-size: 13px; color: var(--muted); }
.test-badge {
  font-size: 12px; color: var(--accent); background: var(--accent-soft);
  border: 1px dashed var(--accent); border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}
.site-nav { display: flex; gap: 18px; align-items: center; font-size: 15px; }
.site-nav a { color: var(--ink); }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav a.on { color: var(--accent); font-weight: 600; }
.nav-wip { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: 2px; }

/* ---------- 首页 intro ---------- */
.intro { padding: 40px 0 8px; }
.intro h1 { font-family: var(--serif); font-size: 30px; line-height: 1.5; margin: 0 0 12px; }
.intro p { color: var(--muted); margin: 0 0 8px; max-width: 640px; }
.intro .sig { color: var(--accent); font-weight: 600; }

/* ---------- 文章列表 ---------- */
.post-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 28px 0 48px; }
.post-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(60, 45, 30, .10); }
.post-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h2 { font-family: var(--serif); font-size: 20px; line-height: 1.5; margin: 0; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--accent); text-decoration: none; }
.post-card .dek { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.post-card .meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.post-card .meta .tag { color: var(--teal); background: var(--teal-soft); border-radius: 4px; padding: 0 6px; }
/* 第 5 篇横版特写：占满整行，避免奇数卡片留下半行空位 */
.post-card.wide { grid-column: 1 / -1; flex-direction: row; }
.post-card.wide .thumb { aspect-ratio: auto; flex: 0 0 42%; width: 42%; }
.post-card.wide .body { justify-content: center; }

/* ---------- 文章页 ---------- */
.article-head { padding: 36px 0 8px; }
.article-head .kicker { color: var(--accent); font-size: 13px; letter-spacing: 2px; margin: 0 0 8px; }
.article-head h1 { font-family: var(--serif); font-size: 32px; line-height: 1.5; margin: 0 0 12px; }
.article-head .dek { color: var(--muted); font-size: 16px; margin: 0 0 12px; }
.article-head .meta { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.article-hero { margin: 24px 0 8px; }
.article-hero img { width: 100%; border-radius: 14px; }
.article-body { padding: 8px 0 8px; }
.article-body p { margin: 0 0 18px; }
.article-body h2 {
  font-family: var(--serif); font-size: 22px; margin: 34px 0 14px;
  padding-left: 12px; border-left: 4px solid var(--accent);
}
.article-body figure { margin: 24px 0; }
.article-body figure img { width: 100%; border-radius: 12px; }
.article-body figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.article-body .pull {
  font-family: var(--serif); font-size: 18px; color: var(--accent);
  border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
  padding: 14px 4px; margin: 26px 0; text-align: center;
}

/* 数据小卡 */
.factbox { background: var(--teal-soft); border: 1px solid #CFE0DA; border-radius: 12px; padding: 18px 20px; margin: 26px 0; }
.factbox .fb-title { font-size: 14px; font-weight: 700; color: var(--teal); margin: 0 0 12px; letter-spacing: 1px; }
.factbox .fb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.factbox .fb-item .k { display: block; font-size: 12px; color: var(--muted); }
.factbox .fb-item .v { display: block; font-size: 18px; font-weight: 700; color: var(--ink); font-family: var(--serif); }
.factbox .fb-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

/* 物产 chips */
.produce { margin: 22px 0; }
.produce .p-label { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.produce .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.produce .chip { font-size: 13px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 12px; }
.produce .chip.agri { color: var(--teal); background: var(--teal-soft); }
.produce .p-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* ---------- 留言 ---------- */
.comments { border-top: 1px solid var(--line); margin-top: 36px; padding: 28px 0 48px; }
.comments h2 { font-family: var(--serif); font-size: 22px; margin: 0 0 6px; }
.comments .c-hint { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.c-form { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 22px; }
.c-form input, .c-form textarea {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.c-form input { margin-bottom: 10px; }
.c-form textarea { min-height: 88px; resize: vertical; line-height: 1.7; }
.c-form input:focus, .c-form textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.c-form .c-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.c-form .c-count { font-size: 12px; color: var(--muted); }
.btn {
  font-family: var(--sans); font-size: 15px; color: #fff; background: var(--accent);
  border: none; border-radius: 999px; padding: 9px 26px; cursor: pointer;
}
.btn:hover { background: #A84D26; }
.c-list { display: flex; flex-direction: column; gap: 14px; }
.c-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.c-item .c-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.c-item .c-name { font-weight: 700; font-size: 15px; }
.c-item .c-time { font-size: 12px; color: var(--muted); }
.c-item .c-text { margin: 6px 0 0; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.c-item .c-del { font-size: 12px; color: var(--muted); background: none; border: none; cursor: pointer; padding: 0; }
.c-item .c-del:hover { color: var(--accent); text-decoration: underline; }
.c-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 18px 0; }
.c-toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 14px; border-radius: 999px;
  padding: 8px 20px; opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 50;
}
.c-toast.show { opacity: .92; }

/* ---------- 旅行计划（建设中） ---------- */
.wip-hero { padding: 48px 0 12px; text-align: center; }
.wip-hero h1 { font-family: var(--serif); font-size: 30px; margin: 0 0 10px; }
.wip-hero p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.wip-box {
  position: relative; border: 2px dashed var(--accent); border-radius: 16px;
  background: var(--card); padding: 40px 28px; margin: 28px 0 40px; text-align: center;
}
.wip-stamp {
  display: inline-block; transform: rotate(-6deg); color: var(--accent);
  border: 3px double var(--accent); border-radius: 8px; font-family: var(--serif);
  font-size: 26px; font-weight: 700; letter-spacing: 6px; padding: 6px 22px; margin-bottom: 18px;
}
.wip-box p { color: var(--muted); margin: 0 0 6px; }
.wip-teasers { text-align: left; max-width: 520px; margin: 22px auto 0; display: flex; flex-direction: column; gap: 10px; }
.wip-teasers .t { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.wip-teasers .t .dot { color: var(--accent); }
.wip-teasers .t .st { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- 页脚 ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--card); margin-top: 20px; }
.site-foot .wrap { padding: 26px 20px 34px; text-align: center; }
.site-foot .copy { font-size: 14px; color: var(--ink); margin: 0 0 6px; }
.site-foot .fine { font-size: 12px; color: var(--muted); margin: 0 0 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .post-list { grid-template-columns: 1fr; }
  .post-card.wide { flex-direction: column; }
  .post-card.wide .thumb { aspect-ratio: 16 / 9; flex: none; width: 100%; }
  .intro h1 { font-size: 25px; }
  .article-head h1 { font-size: 26px; }
  .factbox .fb-grid { grid-template-columns: repeat(2, 1fr); }
  .site-head .wrap { justify-content: center; text-align: center; }
  .brand { flex-direction: column; align-items: center; gap: 2px; }
}