:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #2f2a24;
  --ink-2: #8a8378;
  --line: #e7e2d8;
  --accent: #c96f4a;
  --accent-soft: #f3e3da;
  --green: #6b8e6b;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(47, 42, 36, .06), 0 6px 18px rgba(47, 42, 36, .05);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶栏 ---------- */
.site-header {
  background: linear-gradient(135deg, #3d3830 0%, #52473b 100%);
  color: #f7f3ec;
  padding: 34px 20px 30px;
}
.header-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-title { font-size: 26px; font-weight: 700; letter-spacing: 1px; }
.site-subtitle { color: #c8bfb2; font-size: 13px; margin-top: 4px; }
.admin-link {
  color: #f7f3ec; text-decoration: none; font-size: 13px;
  border: 1px solid rgba(247, 243, 236, .35); border-radius: 999px;
  padding: 7px 16px; transition: all .2s;
}
.admin-link:hover { background: rgba(247, 243, 236, .12); }

/* ---------- 时间线 ---------- */
.page { max-width: 960px; margin: 0 auto; padding: 28px 20px 60px; }
.timeline { display: flex; flex-direction: column; gap: 22px; }

.day-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.day-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, #fbf9f5, #ffffff);
}
.day-date { font-size: 16px; font-weight: 700; }
.day-meta { font-size: 12px; color: var(--ink-2); }

/* 一篇日志内的两个段落 */
.sections { display: grid; grid-template-columns: 1fr 1fr; }
.section { padding: 18px 22px 20px; min-width: 0; }
.section + .section { border-left: 1px dashed var(--line); }
.section-label {
  font-size: 13px; font-weight: 700; color: var(--accent);
  display: flex; align-items: center; gap: 7px; margin-bottom: 8px;
}
.section-label.life { color: var(--green); }
.section-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.section-label small { font-weight: 400; color: var(--ink-2); font-size: 11px; }

.section-text { font-size: 14px; color: #55504a; white-space: pre-wrap; word-break: break-word; }
.section-text.clamped { max-height: 9em; overflow: hidden; position: relative; }
.section-text.clamped::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.4em;
  background: linear-gradient(transparent, #ffffff);
}
.section-empty { color: #bbb4a9; font-size: 13px; font-style: italic; }
.expand-btn { background: none; border: none; color: var(--accent); font-size: 12.5px; cursor: pointer; padding: 6px 0 0; }

.post-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.post-images img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; display: block;
}

.empty-page { text-align: center; color: var(--ink-2); padding: 60px 10px; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(20, 17, 14, .86);
  display: none; align-items: center; justify-content: center; z-index: 100;
  cursor: zoom-out; padding: 24px;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }

/* ---------- 页脚 ---------- */
.site-footer { text-align: center; color: var(--ink-2); font-size: 12px; padding: 0 0 30px; }

/* ---------- 移动端 ---------- */
@media (max-width: 700px) {
  .site-header { padding: 26px 18px 22px; }
  .site-title { font-size: 21px; }
  .page { padding: 20px 14px 40px; }
  .sections { grid-template-columns: 1fr; }
  .section + .section { border-left: none; border-top: 1px dashed var(--line); }
  .section { padding: 16px 18px 18px; }
  .day-head { padding: 12px 18px; }
}
