/* 我的生活记事 · 全站样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:#FAF6F0; --bg-soft:#F2EBE0; --card:#FFFFFF;
  --border:#E5DCCC; --border-soft:#F0EADD;
  --ink:#2C241B; --ink-2:#5C5044; --ink-3:#96897A;
  --accent:#B26B3A; --accent-deep:#8C4E24;
  --accent-soft:#EBD5C0; --accent-pale:#F7EEE2;
  --max:920px;
}

html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Microsoft YaHei", sans-serif;
  font-size: 15.5px; line-height: 1.85; color: var(--ink-2);
  background: var(--bg); -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
main { display: block; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.brand-name {
  font-family: "Noto Serif SC", serif; font-size: 16.5px; font-weight: 600;
  color: var(--ink); letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  font-size: 14px; color: var(--ink-2);
  padding: 7px 13px; border-radius: 6px;
  transition: color .18s, background .18s;
}
.site-nav a:hover { color: var(--accent-deep); background: var(--accent-pale); }
.site-nav a.active { color: var(--accent-deep); background: var(--accent-pale); }
.menu-btn {
  display: none; background: none; border: none;
  padding: 8px; cursor: pointer; color: var(--ink); border-radius: 8px;
}
.menu-btn:hover { background: var(--accent-pale); }

/* ---------- 页内主容器 ---------- */
.wrap {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
}

/* ---------- 面包屑 ---------- */
.crumb {
  padding: 22px 0 6px;
  font-size: 13px; color: var(--ink-3);
}
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--accent-deep); }
.crumb .sep { margin: 0 8px; color: var(--border); }
.crumb .now { color: var(--ink-2); }

/* ---------- 首页 Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero-hi { font-size: 14px; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 20px; }
.hero h1 {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(26px, 4.2vw, 40px); font-weight: 700; color: var(--ink);
  line-height: 1.45; letter-spacing: 0.02em; margin-bottom: 24px;
}
.hero-desc { font-size: 15.5px; line-height: 2; color: var(--ink-2); max-width: 620px; }

/* ---------- 页面标题块 ---------- */
.page-head { padding: 52px 0 12px; }
.page-head h1 {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(24px, 3.6vw, 34px); font-weight: 700;
  color: var(--ink); line-height: 1.5; margin-bottom: 14px;
}
.page-head .lead { font-size: 15px; color: var(--ink-3); line-height: 1.9; max-width: 620px; }

/* ---------- Section ---------- */
.section { padding: 44px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; padding-bottom: 14px;
  border-bottom: 1px solid var(--border); margin-bottom: 22px;
}
.section-head h2 {
  font-family: "Noto Serif SC", serif; font-size: 18px;
  font-weight: 600; color: var(--ink); letter-spacing: 0.06em;
}
.section-head p { font-size: 13.5px; color: var(--ink-3); }
.section-head a.more { font-size: 13px; color: var(--accent-deep); }
.section-head a.more:hover { text-decoration: underline; }

/* ---------- 工具卡片列表 ---------- */
.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px;
}
.tool-card {
  display: block; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 24px; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tool-card:hover {
  border-color: var(--accent-soft); transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(178, 107, 58, 0.08);
}
.tool-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.tool-head h3 {
  font-family: "Noto Serif SC", serif; font-size: 16.5px;
  font-weight: 600; color: var(--ink);
}
.tool-head .idx { font-size: 12px; color: var(--accent); letter-spacing: 0.08em; }
.tool-desc { font-size: 13.5px; color: var(--ink-3); line-height: 1.8; }
.tool-go {
  margin-top: 12px; font-size: 13px; color: var(--accent-deep);
  display: inline-block; font-weight: 500;
}
.tool-card:hover .tool-go { text-decoration: underline; }

/* ---------- 工具详情页 ---------- */
.tool-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 26px 28px; margin-bottom: 26px;
}
.tool-panel .tool-body { font-size: 14px; }

.tool-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.tool-row label {
  flex-shrink: 0; font-size: 13px; color: var(--ink-3); width: 76px;
}

.tool-body input[type="text"],
.tool-body input[type="date"],
.tool-body textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: #FCFAF6; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  transition: border-color .18s; outline: none;
  appearance: none; -webkit-appearance: none;
}
.tool-body input:focus, .tool-body textarea:focus {
  border-color: var(--accent); background: #fff;
}
.tool-body textarea { resize: vertical; min-height: 110px; line-height: 1.7; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 10px 22px; font-family: inherit; font-size: 14px;
  font-weight: 500; color: #fff; background: var(--accent); border: none;
  border-radius: 8px; cursor: pointer; transition: background .18s;
  margin-top: 6px;
}
.btn:hover { background: var(--accent-deep); }

.tool-result {
  margin-top: 14px; padding: 12px 14px;
  background: var(--accent-pale); border-radius: 8px;
  font-size: 14.5px; color: var(--ink); line-height: 1.75;
  white-space: pre-wrap; word-break: break-all; min-height: 42px;
}
.tool-result.empty { color: var(--ink-3); background: var(--bg-soft); }

.wc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.wc-item { background: var(--bg-soft); border-radius: 8px; padding: 10px 8px; text-align: center; }
.wc-item .n {
  display: block; font-family: "Noto Serif SC", serif;
  font-size: 19px; font-weight: 700; color: var(--accent-deep); line-height: 1.2;
}
.wc-item .l { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------- 说明文字块 ---------- */
.tool-note { font-size: 14px; color: var(--ink-2); line-height: 1.95; margin-bottom: 14px; }
.tool-note:last-child { margin-bottom: 0; }
.tool-note h2 {
  font-family: "Noto Serif SC", serif; font-size: 16px;
  color: var(--ink); margin-bottom: 10px; letter-spacing: 0.04em;
}

/* ---------- 相关文章 / 相关工具 ---------- */
.rel-list { display: flex; flex-direction: column; gap: 0; }
.rel-item {
  padding: 14px 0; border-bottom: 1px solid var(--border-soft);
  display: block;
}
.rel-item:last-child { border-bottom: none; }
.rel-item .t {
  font-family: "Noto Serif SC", serif; font-size: 15px;
  color: var(--ink); margin-bottom: 4px; font-weight: 600;
}
.rel-item .d { font-size: 13.5px; color: var(--ink-3); line-height: 1.75; }
.rel-item:hover .t { color: var(--accent-deep); }

/* ---------- 文章正文 ---------- */
.article-wrap { padding: 12px 0 40px; }
.article-body { font-size: 15.5px; line-height: 2.05; color: var(--ink-2); max-width: 660px; }
.article-body p { margin-bottom: 18px; }
.article-body p:last-child { margin-bottom: 0; }

/* ---------- 关于 / 合规页 ---------- */
.plain { padding: 12px 0 40px; max-width: 660px; }
.plain p { font-size: 15px; line-height: 2.05; color: var(--ink-2); margin-bottom: 16px; }
.plain p:last-child { margin-bottom: 0; }
.plain h2 {
  font-family: "Noto Serif SC", serif; font-size: 17px;
  color: var(--ink); margin: 26px 0 14px; letter-spacing: 0.04em;
}
.plain h2:first-child { margin-top: 0; }
.plain ul { margin: 0 0 16px 22px; font-size: 15px; line-height: 2.05; }
.plain li { margin-bottom: 6px; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 40px;
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  text-align: center; font-size: 13px; color: var(--ink-3);
  line-height: 2.1; border-top: 1px solid var(--border-soft);
  background: var(--bg-soft);
}
.foot-line {
  font-family: "Noto Serif SC", serif; font-size: 14px;
  color: var(--ink-2); letter-spacing: 0.06em; margin-bottom: 6px;
}
.foot-beian {
  display: inline-block; color: var(--ink-3);
  border-bottom: 1px dashed var(--border); padding-bottom: 1px;
  transition: color .18s, border-color .18s;
}
.foot-beian:hover { color: var(--accent-deep); border-color: var(--accent); }
.foot-links { font-size: 12.5px; margin-top: 4px; }
.foot-links a { color: var(--ink-3); transition: color .18s; }
.foot-links a:hover { color: var(--accent-deep); }
.foot-links .sep { margin: 0 8px; color: var(--border); }
.foot-copy { font-size: 12.5px; margin-top: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .header-inner { padding: 0 18px; }
  .menu-btn { display: block; }
  .site-nav {
    display: none; position: absolute; top: 64px;
    left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 2px; padding: 8px 12px 14px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 14px; font-size: 15px; }

  .wrap, .header-inner { padding: 0 18px; }

  .hero { padding: 44px 0 24px; }
  .page-head { padding: 32px 0 8px; }

  .section { padding: 30px 0; }
  .section-head { gap: 8px; }

  .tools-grid { grid-template-columns: 1fr; gap: 14px; }
  .tool-panel { padding: 20px 20px; }
  .wc-grid { grid-template-columns: repeat(2, 1fr); }
}