/* 我的生活记事 · 暖米白 + 砖橙 + 深棕 */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FAF6F0;
  --paper: #FFFFFF;
  --line: #EDE3D5;
  --line-soft: #F4ECE0;
  --ink: #2E2620;
  --ink-2: #5C5046;
  --ink-3: #9A8B7C;
  --brand: #D9603B;
  --brand-deep: #B84A28;
  --brand-soft: #F8E1D6;
  --brand-pale: #FDF1EA;
  --brown: #3A2E26;
  --max: 900px;
}

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; }

/* 顶部：细线条 header，不吸顶 */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 22px;
  height: 58px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.brand-name {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16.5px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.03em;
}
.site-nav { display: flex; gap: 2px; }
.site-nav a {
  font-size: 14px; color: var(--ink-2);
  padding: 7px 13px; border-radius: 999px;
  transition: background .18s, color .18s;
}
.site-nav a:hover { background: var(--brand-pale); color: var(--brand-deep); }
.site-nav a.active { background: var(--brand); color: #fff; }
.menu-btn {
  display: none; background: none; border: none;
  padding: 8px; cursor: pointer; color: var(--ink);
}

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

.crumb { padding: 20px 0 4px; font-size: 13px; color: var(--ink-3); }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--brand-deep); }
.crumb .sep { margin: 0 7px; color: var(--line); }
.crumb .now { color: var(--ink-2); }

/* 首页 hero：便签感 */
.hero {
  padding: 56px 0 30px;
}
.hero-tag {
  display: inline-block; font-size: 12.5px; color: var(--brand-deep);
  background: var(--brand-soft); padding: 4px 12px; border-radius: 999px;
  margin-bottom: 18px; letter-spacing: 0.05em;
}
.hero h1 {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(26px, 4.4vw, 38px); font-weight: 700;
  color: var(--ink); line-height: 1.45; margin-bottom: 18px;
}
.hero h1 em { color: var(--brand); font-style: normal; }
.hero p {
  font-size: 15.5px; color: var(--ink-2); max-width: 620px; line-height: 2;
}

.page-head { padding: 44px 0 8px; }
.page-head h1 {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(24px, 3.6vw, 32px); font-weight: 700;
  color: var(--ink); margin-bottom: 10px; line-height: 1.5;
}
.page-head .lead {
  font-size: 14.5px; color: var(--ink-3); max-width: 620px; line-height: 1.9;
}

.section { padding: 36px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.section-head h2 {
  font-family: "Noto Serif SC", serif; font-size: 18px;
  color: var(--ink); font-weight: 700;
}
.section-head a.more { font-size: 13px; color: var(--brand-deep); }
.section-head a.more:hover { text-decoration: underline; }

/* 便签卡片网格 */
.notes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.note {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.note::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--brand); opacity: 0; transition: opacity .18s;
}
.note:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(217, 96, 59, 0.12); border-color: var(--brand-soft); }
.note:hover::before { opacity: 1; }
.note .num {
  font-size: 12px; color: var(--brand); letter-spacing: 0.1em; font-weight: 600;
}
.note h3 {
  font-family: "Noto Serif SC", serif; font-size: 17px;
  color: var(--ink); font-weight: 700;
}
.note p { font-size: 13.5px; color: var(--ink-3); line-height: 1.75; flex: 1; }
.note .go {
  font-size: 13px; color: var(--brand-deep); font-weight: 500;
  margin-top: 6px;
}
.note:hover .go { text-decoration: underline; }

/* 工具操作区 */
.stage {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px; margin-bottom: 18px;
}
.stage label {
  display: block; font-size: 13px; color: var(--ink-3);
  margin-bottom: 6px; letter-spacing: 0.03em;
}
.stage input, .stage select {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: #FDFAF5; border: 1px solid var(--line);
  border-radius: 9px; padding: 11px 13px; outline: none;
  transition: border-color .18s, background .18s;
  appearance: none; -webkit-appearance: none;
}
.stage input:focus, .stage select:focus {
  border-color: var(--brand); background: #fff;
}
.stage-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.stage-row input { flex: 1; min-width: 140px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 10px 22px;
  font-family: inherit; font-size: 14.5px; font-weight: 500;
  color: #fff; background: var(--brand); border: none;
  border-radius: 9px; cursor: pointer;
  transition: background .18s;
}
.btn:hover { background: var(--brand-deep); }
.btn.ghost {
  background: var(--brand-pale); color: var(--brand-deep);
}
.btn.ghost:hover { background: var(--brand-soft); }

.output {
  margin-top: 14px; padding: 14px 16px;
  background: var(--brand-pale); border-radius: 9px;
  font-size: 15px; color: var(--ink); line-height: 1.8;
  white-space: pre-wrap; word-break: break-all; min-height: 44px;
}
.output.empty {
  background: #F6EFE4; color: var(--ink-3);
}
.tip { font-size: 13px; color: var(--ink-3); margin-top: 10px; line-height: 1.8; }

/* 说明卡 */
.note-card {
  background: var(--paper); border: 1px dashed var(--line);
  border-radius: 14px; padding: 22px 24px;
}
.note-card h2 {
  font-family: "Noto Serif SC", serif; font-size: 16px;
  color: var(--ink); margin-bottom: 10px;
}
.note-card p { font-size: 14.5px; color: var(--ink-2); margin-bottom: 10px; line-height: 1.95; }
.note-card p:last-child { margin-bottom: 0; }

/* 文章列表 */
.arts { display: flex; flex-direction: column; }
.art {
  padding: 16px 0; border-bottom: 1px solid var(--line-soft);
  display: block;
}
.art:last-child { border-bottom: none; }
.art .t {
  font-family: "Noto Serif SC", serif; font-size: 16px;
  color: var(--ink); font-weight: 700; margin-bottom: 4px;
}
.art:hover .t { color: var(--brand-deep); }
.art .d { font-size: 13.5px; color: var(--ink-3); line-height: 1.75; }
.art .tag {
  display: inline-block; font-size: 11.5px; color: var(--brand-deep);
  background: var(--brand-pale); padding: 2px 8px; border-radius: 999px;
  margin-right: 8px; font-weight: normal;
}

/* 文章正文 */
.article { max-width: 660px; padding: 16px 0 40px; }
.article p {
  font-size: 15.5px; line-height: 2.05; color: var(--ink-2);
  margin-bottom: 18px;
}
.article p:last-child { margin-bottom: 0; }
.article code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13.5px; background: var(--brand-pale);
  color: var(--brand-deep); padding: 1px 6px; border-radius: 4px;
}

.plain { max-width: 660px; padding: 16px 0 40px; }
.plain h2 {
  font-family: "Noto Serif SC", serif; font-size: 17px;
  color: var(--ink); margin: 24px 0 12px;
}
.plain h2:first-child { margin-top: 0; }
.plain p {
  font-size: 15px; line-height: 2; color: var(--ink-2);
  margin-bottom: 14px;
}

/* 页脚 */
.site-footer {
  margin-top: 50px; padding: 36px 0 calc(36px + env(safe-area-inset-bottom));
  background: var(--brown); color: #C9BBAE;
  text-align: center; font-size: 13px; line-height: 2.1;
}
.site-footer .op { color: #E8D8C8; font-family: "Noto Serif SC", serif; letter-spacing: 0.05em; }
.site-footer a { color: #C9BBAE; }
.site-footer a:hover { color: #fff; }
.site-footer .beian {
  display: inline-block; border-bottom: 1px dashed #6B5A4C;
  padding-bottom: 1px;
}
.site-footer .links { font-size: 12.5px; margin-top: 4px; }
.site-footer .links .sep { margin: 0 8px; color: #6B5A4C; }
.site-footer .copy { font-size: 12.5px; color: #8A7A6C; margin-top: 4px; }

@media (max-width: 720px) {
  .header-inner { padding: 0 16px; }
  .menu-btn { display: block; }
  .site-nav {
    display: none; position: absolute; top: 58px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 2px; padding: 8px 12px 12px;
    z-index: 30;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 14px; border-radius: 8px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 36px 0 20px; }
  .notes { grid-template-columns: 1fr; gap: 12px; }
  .stage { padding: 18px; }
  .stage-row { flex-direction: column; }
}
