:root {
  --ink: #24302b;
  --paper: #f3efe4;
  --panel: #fbf8f2;
  --pink: #e7cbb6;
  --yellow: #e4d7b4;
  --mint: #d7e6d2;
  --sky: #d5e4e2;
  --line: 3px solid #24302b;
  --shadow: 5px 5px 0 #24302b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(36, 48, 43, .14) 1.15px, transparent 1.2px);
  background-size: 13px 13px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: #3d5c49; }
button, input, textarea { font: inherit; color: inherit; }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  padding: 6px 10px;
  border: var(--line);
}
.skip:focus { top: 8px; }
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.wrap { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }
.top {
  background: rgba(251, 248, 242, .94);
  border-bottom: var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.top-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 220px; }
.brand img { border: var(--line); border-radius: 18px; background: var(--yellow); }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1.45rem; letter-spacing: .04em; }
.brand-text em { font-style: normal; font-size: .82rem; }
.top-search { display: flex; flex: 1; gap: 8px; }
.top-search input, .search-form input {
  flex: 1;
  border: var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
}
.top-search button, .search-form button, .pager a, .pager .now {
  border: var(--line);
  border-radius: 999px;
  background: var(--yellow);
  padding: 8px 14px;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}
.nav-toggle {
  display: none;
  border: var(--line);
  background: var(--pink);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 12px; }
.nav a {
  text-decoration: none;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  background: #fff;
}
.nav a:nth-child(3n) { background: var(--pink); }
.nav a:nth-child(3n+1) { background: var(--yellow); }
.nav a:nth-child(3n+2) { background: var(--mint); }
.nav a.on { background: var(--ink); color: #fff; }
.page { padding: 22px 0 36px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.hero, .panel, .bubble-card, .side-box, .cover-fallback {
  background: var(--panel);
  border: var(--line);
  box-shadow: var(--shadow);
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-radius: 26px;
  padding: 18px 18px 16px;
  margin-bottom: 18px;
  background-image: radial-gradient(#c9d7c4 1.2px, transparent 1.3px);
  background-size: 10px 10px;
}
.hero h1, .list-head h1, .article-head h1 { font-size: clamp(1.6rem, 3vw, 2.35rem); line-height: 1.25; margin: 6px 0; }
.sticker, .post-cat a, .tags a {
  display: inline-block;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}
.feed { display: flex; flex-direction: column; gap: 14px; }
.feed-title { margin: 0 0 10px; }
.post { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: var(--line);
  border-radius: 50%;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
}
.avatar.mini { width: 28px; height: 28px; font-size: .85rem; display: inline-grid; margin-right: 6px; vertical-align: middle; }
.a0 { background: #e7cbb6; }
.a1 { background: #e4d7b4; }
.a2 { background: #d7e6d2; }
.a3 { background: #d5e4e2; }
.a4 { background: #efe6d6; }
.bubble-card { position: relative; border-radius: 8px 22px 22px 22px; padding: 12px 14px; }
.bubble-card::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 16px;
  border-width: 8px 12px 8px 0;
  border-style: solid;
  border-color: transparent var(--ink) transparent transparent;
}
.bubble-card h2 { font-size: 1.15rem; margin: 4px 0; }
.bubble-card h2 a { color: var(--ink); text-decoration: none; }
.bubble-card h2 a:hover { text-decoration: underline; }
.sum { margin: 6px 0; }
.post-meta, .crumbs { color: #5c4a3a; font-size: .92rem; }
.post-meta { display: flex; gap: 10px; align-items: center; }
.side-col { display: flex; flex-direction: column; gap: 14px; }
.side-box { border-radius: 18px; padding: 12px 14px; }
.side-box h2, .feed-title { font-size: 1.05rem; }
.cat-list, .mini-list, .plain, .toc { margin: 0; padding-left: 0; list-style: none; }
.cat-list a, .mini-list a { display: flex; justify-content: space-between; gap: 8px; text-decoration: none; color: var(--ink); padding: 6px 0; border-bottom: 1px dashed #24302b; }
.cat-list em { font-style: normal; background: var(--pink); border: 2px solid var(--ink); border-radius: 999px; min-width: 1.6em; text-align: center; }
.plain li { margin: 6px 0; }
.toc a { color: var(--ink); text-decoration: none; }
.toc .sub { padding-left: 12px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.crumbs a { color: var(--ink); }
.list-head { margin-bottom: 12px; }
.article-card { border-radius: 24px; padding: 18px 18px 8px; }
.cover { margin: 8px 0 0; }
.cover img { border: var(--line); border-radius: 16px; }
.cover-fallback {
  border-radius: 18px;
  min-height: 160px;
  display: grid;
  place-items: center;
  margin: 8px 0 0;
}
.cover-fallback span { font-size: 4rem; font-weight: 800; }
.cat-pinpai { background: #e7efe4; }
.cat-yuanliao { background: #f0e2cf; }
.cat-daigong { background: #e4ebe4; }
.cat-pingzi { background: #dce8e6; }
.cat-zhihe { background: #efe6d4; }
.cat-dayang { background: #e6ead8; }
.cat-jiaoqi { background: #eadfce; }
.cat-shudong { background: #dfe8df; }
.prose { font-size: 1.05rem; line-height: 1.9; overflow-wrap: anywhere; }
.prose h2, .prose h3 { line-height: 1.35; }
.prose img { border: var(--line); border-radius: 14px; }
.prose blockquote {
  margin: 16px 0 16px 8px;
  padding: 12px 14px;
  background: #fff;
  border: var(--line);
  border-radius: 6px 18px 18px 18px;
}
.prose blockquote::before {
  content: "接一句";
  display: inline-block;
  margin-bottom: 6px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  padding: 0 8px;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.search-form { display: flex; gap: 8px; margin: 8px 0 14px; }
.search-status { min-height: 1.2em; font-weight: 700; }
.pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pager a { text-decoration: none; color: var(--ink); background: #fff; }
.pager .now { background: var(--ink); color: #fff; }
.empty { padding: 18px; border: var(--line); border-radius: 18px; background: #fff; }
.footer { border-top: var(--line); background: #fbf8f2; padding: 18px 0 28px; }
.friends { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.friends span { font-weight: 800; }
.friends a { text-decoration: none; color: var(--ink); background: var(--sky); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 8px; }
.copy, .fine, .icp { margin: 4px 0; }
.text-link { font-weight: 800; }
.author-box { display: flex; gap: 10px; align-items: center; }
:focus-visible { outline: 3px solid #8a6a45; outline-offset: 2px; }
@media (min-width: 900px) {
  .side-col { position: sticky; top: 92px; }
}
@media (max-width: 899px) {
  .cols { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; }
  .nav.open { display: flex; }
  .top-row { flex-wrap: wrap; }
  .top-search { order: 3; width: 100%; flex: none; }
  .hero { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
