:root {
  --text: #222;
  --muted: #727272;
  --line: #e5e5e5;
  --background: #fff;
  --accent: #087f5b;
  --content: 820px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--background); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.75; }
a { color: inherit; }
button, input { font: inherit; }

.site-header { height: 62px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; line-height: 1.1; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 4px; background: var(--accent); color: #fff; font-weight: 700; }
.brand strong { display: block; font-size: 15px; }
.brand small { display: none; }
.top-nav { display: flex; gap: 24px; font-size: 14px; }
.top-nav a { color: var(--muted); text-decoration: none; }
.top-nav a:hover { color: var(--accent); }
.icon-button { display: none; width: 38px; height: 38px; padding: 8px; border: 0; background: transparent; }
.icon-button span { display: block; height: 2px; margin: 5px 0; background: var(--text); }
.reading-progress { position: fixed; top: 61px; left: 0; z-index: 30; width: 0; height: 2px; background: var(--accent); }

#app { min-height: calc(100vh - 124px); }
.home, .about { max-width: var(--content); margin: 0 auto; padding: 64px 24px 80px; }
.intro { padding-bottom: 42px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 700; }
.intro h1, .about h1 { margin: 0; font-size: 34px; line-height: 1.25; letter-spacing: 0; }
.intro h1 br { display: none; }
.intro-copy { max-width: 590px; margin-top: 14px; color: var(--muted); font-size: 15px; }
.intro-copy strong { display: inline; margin-right: 4px; color: var(--text); font-size: inherit; }
.collection-head { padding-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.collection-head h2 { margin: 0; font-size: 20px; }
.search { width: 240px; position: relative; }
.search input { width: 100%; height: 38px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--background); outline: none; }
.search input:focus { border-color: var(--accent); }
.search span { position: absolute; top: 5px; right: 11px; color: var(--muted); }
.articles { display: block; }
.article-card { padding: 24px 0; display: grid; grid-template-columns: 38px 1fr; gap: 12px; border-bottom: 1px solid var(--line); text-decoration: none; }
.article-index { padding-top: 4px; color: var(--muted); font: 12px/1.5 ui-monospace, monospace; }
.article-card h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.35; }
.article-card p { margin: 0; color: var(--muted); font-size: 14px; }
.article-meta { margin-top: 9px; display: flex; gap: 12px; color: var(--muted); font-size: 12px; }
.article-card:hover h3 { color: var(--accent); }
.empty { padding: 30px 0; color: var(--muted); }

.reader { max-width: 1080px; margin: 0 auto; padding: 52px 24px 84px; display: grid; grid-template-columns: minmax(0, 760px) 180px; gap: 56px; }
.article-head { margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.back-link { color: var(--accent); font-size: 13px; text-decoration: none; }
.article-head h1 { margin: 15px 0 10px; font-size: 36px; line-height: 1.25; letter-spacing: 0; }
.prose { font-size: 16px; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 82px; line-height: 1.4; letter-spacing: 0; }
.prose h2 { margin: 2.3em 0 .7em; padding-bottom: .3em; border-bottom: 1px solid var(--line); font-size: 25px; }
.prose h3 { margin: 1.8em 0 .5em; font-size: 20px; }
.prose h4 { font-size: 17px; }
.prose p { margin: 1em 0; }
.prose ul { padding-left: 1.3em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; margin: 14px 0; border: 1px solid var(--line); }
.inline-code { padding: .12em .3em; border-radius: 3px; background: #edf5f1; color: #086c50; font: .9em ui-monospace, monospace; }
.code-wrap { position: relative; margin: 20px 0; }
.code-wrap pre { margin: 0; padding: 20px; overflow-x: auto; border-radius: 4px; background: #202522; color: #e7ece9; font: 13px/1.7 "SFMono-Regular", Consolas, monospace; tab-size: 4; }
.code-lang { position: absolute; top: 8px; right: 43px; color: #95a099; font: 10px/1 monospace; text-transform: uppercase; }
.copy { position: absolute; top: 4px; right: 6px; width: 32px; height: 32px; border: 0; background: transparent; color: #aab4ae; cursor: pointer; }
.copy:hover { color: #fff; }
.toc { position: sticky; top: 90px; align-self: start; padding-left: 16px; border-left: 1px solid var(--line); }
.toc strong { display: block; margin-bottom: 10px; font-size: 12px; }
.toc a { display: block; margin: 7px 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-decoration: none; }
.toc a.level-3 { padding-left: 10px; }
.toc a:hover, .toc a.active { color: var(--accent); }
.about p { color: var(--muted); }
.loading { min-height: 60vh; display: grid; place-content: center; color: var(--muted); }
.loading span { width: 22px; height: 22px; margin: 0 auto 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.site-footer { max-width: var(--content); margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .site-header { height: 58px; padding: 0 16px; }
  .reading-progress { top: 57px; }
  .icon-button { display: block; }
  .top-nav { display: none; position: absolute; top: 57px; left: 0; right: 0; padding: 16px; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); background: #fff; }
  .top-nav.open { display: flex; }
  .home, .about { padding: 42px 18px 60px; }
  .intro { padding-bottom: 34px; }
  .intro h1, .about h1 { font-size: 29px; }
  .collection-head { align-items: stretch; flex-direction: column; gap: 14px; }
  .search { width: 100%; }
  .article-card { grid-template-columns: 30px 1fr; }
  .article-card h3 { font-size: 18px; }
  .reader { padding: 36px 18px 64px; grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .article-head h1 { font-size: 30px; }
  .prose { font-size: 15px; }
  .prose h2 { font-size: 22px; }
  .site-footer { margin: 0 18px; padding: 18px 0; flex-direction: column; gap: 4px; }
}

/* Jinggai journal */
:root { --accent: #42634b; --content: 860px; }
.brand-mark { border-radius: 50%; background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.intro { padding-top: 20px; padding-bottom: 54px; }
.intro h1 { font-family: Georgia, "Songti SC", "SimSun", serif; font-weight: 600; font-size: clamp(28px, 4vw, 40px); }
.article-card { padding: 30px 0; }
.article-card h3 { font-weight: 600; }
.code-wrap pre { padding-top: 30px; }
.toc { max-height: calc(100vh - 120px); overflow-y: auto; }
@media (max-width: 760px) { .intro { padding-top: 0; padding-bottom: 36px; } }

:root { --text: #303b50; --muted: #718093; --line: #dce7ef; --accent: #a04c69; --content: 1040px; }
body { background: radial-gradient(ellipse at 85% 0%, #edf6ff 0, transparent 45%), #fbfdff; }
.site-header { border-bottom: 1px solid #e3ebf4; background: #ffffffed; padding-inline: max(24px, calc((100vw - 1040px) / 2)); }
.brand-avatar { image-rendering: pixelated; width: 40px; height: 40px; object-fit: contain; }
.brand strong { color: #4e4268; letter-spacing: .04em; }
.home { padding-top: 54px; }
.snow-intro { display: grid; grid-template-columns: 1fr 290px; align-items: center; gap: 40px; padding-bottom: 52px; }
.eyebrow { color: #8d7caa; letter-spacing: .15em; font-size: 10px; }
.intro h1 { font-family: inherit; color: #a04c69; font-size: 42px; line-height: 1.5; font-weight: 800; }
.intro h1 br { display: block; }
.intro h1 span { color: #303b50; font-size: 29px; letter-spacing: -.035em; }
.intro-copy { font-size: 14px; line-height: 1.95; margin-top: 16px; }
.snow-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.snow-tags span { font-size: 11px; padding: 4px 12px; border: 1px solid #dce7ef; background: #fff; border-radius: 20px; color: #70839b; }
.snow-tags span:first-child { color: #a04c69; background: #fff5f7; border-color: #f0d9e0; }
.snow-postcard { position: relative; padding: 14px 14px 10px; border-radius: 18px; background: #fff; border: 1px solid #e0e9f2; box-shadow: 0 12px 32px #7087a218; transform: rotate(2deg); }
.postcard-label { position: absolute; z-index: 2; top: -12px; left: 45px; right: 45px; padding: 3px 8px; text-align: center; background: #e8dff1ed; color: #756384; font-size: 10px; letter-spacing: .1em; transform: rotate(-4deg); }
.mascot-button { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #eaf4ff; border-radius: 10px; cursor: pointer; }
.snow-scene { display: block; width: 100%; height: auto; border-radius: 10px; image-rendering: pixelated; }
.mascot-bubble { position: absolute; top: 25%; left: 42%; padding: 7px 13px; border-radius: 14px 14px 14px 2px; border: 1px solid #d5c7e5; background: #fffffff5; color: #99516e; font-size: 14px; font-weight: 700; box-shadow: 0 3px 8px #52658015; white-space: nowrap; transform: rotate(-2deg); }
.postcard-caption { display: block; text-align: center; margin-top: 8px; color: #8191a1; font-size: 10px; letter-spacing: .12em; }
.collection-head { border: 0; margin-bottom: 8px; }
.collection-head h2 { font-size: 17px; }
.collection-head h2::before { content: '✳'; margin-right: 9px; color: #9fbdd2; }
.search input { border-radius: 20px; background: #fff; padding-left: 16px; font-size: 12px; }
.articles { display: grid; gap: 14px; }
.article-card { padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .2s, transform .2s; }
.article-card:hover { border-color: #c6accf; transform: translateY(-2px); }
.article-index { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #9575a5; background: #f3eff7; padding: 0; margin-top: 1px; }
.article-card:nth-child(2) .article-index { color: #7295b1; background: #eef6fc; }
.article-card h3 { font-size: 19px; }
.article-card p { font-size: 13px; }
.article-meta span:last-child { color: #9781a7; }
.site-footer { gap: 10px; flex-wrap: wrap; font-size: 10px; }
.site-footer a { color: #8a96a6; text-decoration: none; }
.reader { max-width: 1120px; background: #fff; margin-top: 24px; border: 1px solid #edf1f7; border-radius: 20px; padding: 42px 32px 64px; gap: 40px; }
.article-head h1 { font-size: 32px; }
.prose h2 { font-size: 23px; }
.code-wrap pre { background: #293244; border-radius: 12px; }
.inline-code { background: #f3eef7; color: #846092; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #baa3cf; outline-offset: 4px; }
@media (max-width: 760px) {
  .home { padding-top: 32px; }
  .snow-intro { grid-template-columns: 1fr 230px; gap: 20px; padding-bottom: 36px; }
  .intro h1 { font-size: 32px; }
  .intro h1 span { font-size: 22px; }
  .intro-copy { font-size: 12px; }
  .snow-tags { gap: 5px; margin-top: 16px; }
  .snow-tags span { padding: 3px 8px; font-size: 10px; }
  .reader { margin: 14px 8px 0; padding: 28px 18px 48px; }
  .article-head h1 { font-size: 27px; }
  .article-card { padding: 22px 18px; }
}
@media (max-width: 540px) {
  .snow-intro { grid-template-columns: 1fr; gap: 30px; }
  .intro h1 { font-size: 36px; }
  .intro h1 span { font-size: 25px; }
  .snow-postcard { width: 250px; justify-self: center; }
  .intro-copy { font-size: 14px; }
  .collection-head { gap: 12px; }
  .article-card h3 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Reading layout: independent left navigation and a paper-like content column. */
.about-jinggai { max-width: 790px; margin: 34px auto 60px; padding: 40px 46px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.about-heading { display: flex; align-items: center; gap: 20px; }
.about-heading img { image-rendering: pixelated; border-radius: 8px; }
.about-heading h1 { font-size: 29px; }
.about-jinggai .about-lead { margin-top: 25px; color: #60516e; }
.about-scene { display: block; width: 100%; max-width: 640px; height: auto; margin: 26px auto 0; border-radius: 10px; }
.about-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 32px; }
.about-chips span { font-size: 12px; padding: 4px 12px; border-radius: 20px; background: #f5f0f8; color: #856393; }
.about-jinggai h2 { font-size: 21px; margin: 32px 0 12px; }
.about-jinggai p { line-height: 1.95; font-size: 15px; }
.about-signoff { margin: 32px 0; padding: 18px 24px; border-left: 3px solid #c8afd7; background: #f8f5fb; border-radius: 0 10px 10px 0; }
.about-signoff > span { color: #a04c69; font-size: 23px; font-weight: 700; }
.about-signoff p { margin: 6px 0 0; }
@media (max-width: 640px) {
  .about-jinggai { margin: 18px 12px 40px; padding: 26px 20px; }
  .about-heading { gap: 12px; }
  .about-heading h1 { font-size: 23px; }
  .about-heading img { width: 48px; height: 48px; }
}
.reader { max-width: 1220px; grid-template-columns: 205px minmax(0, 790px); justify-content: center; gap: 34px; padding: 28px 24px 80px; margin-top: 0; background: transparent; border: 0; border-radius: 0; }
.reader > article { min-width: 0; padding: 42px 46px 56px; background: #fff; border: 1px solid #e1e8f0; border-radius: 10px; box-shadow: 0 6px 24px #677e9410; }
.toc { display: block; border: 0; padding: 18px 10px 20px 0; top: 82px; scrollbar-width: thin; }
.toc-label { display: block; color: #a191b2; font: 10px/1.4 ui-monospace, monospace; letter-spacing: .2em; margin-bottom: 6px; }
.toc strong { font-size: 16px; color: #4c405e; padding-bottom: 14px; border-bottom: 1px solid #dce4ef; margin-bottom: 12px; }
.toc a { padding: 7px 10px; margin: 2px 0; border-left: 2px solid #e1e6ee; font-size: 12px; line-height: 1.65; }
.toc a.level-3 { padding-left: 22px; font-size: 11px; }
.toc a:hover, .toc a:focus-visible { background: #f0eaf6; border-left-color: #aa81b6; border-radius: 0 6px 6px 0; color: #80518b; }
.article-head { padding-bottom: 25px; margin-bottom: 32px; border-bottom: 2px solid #ece6f2; }
.article-head h1 { font-size: 30px; line-height: 1.45; letter-spacing: -.025em; }
.article-head .article-meta { margin-top: 18px; }
.article-head .article-meta span { background: #f4f6fa; padding: 3px 10px; border-radius: 4px; }
.prose { line-height: 1.95; font-size: 15px; color: #3b4555; }
.prose h2 { border-bottom: 0; border-left: 3px solid #b597c8; padding: 3px 0 3px 13px; font-size: 22px; margin-top: 2.5em; color: #34384c; }
.prose h3 { font-size: 18px; }
.prose li { margin-bottom: 8px; }
.prose .inline-code { padding: 2px 5px; margin: 0 2px; border: 1px solid #e6ddec; border-radius: 4px; color: #805c91; background: #f5f0f8; font-size: .88em; line-height: inherit; overflow-wrap: anywhere; }
.code-wrap pre { border: 1px solid #dae3ee; background: #f4f7fb; color: #36455b; padding: 36px 20px 20px; border-radius: 8px; line-height: 1.8; }
.code-lang { top: 13px; left: 20px; right: auto; color: #8695a9; }
.copy { color: #72819a; top: 7px; }
.copy:hover { color: #805c91; }
@media (max-width: 900px) {
  .reader { grid-template-columns: 165px minmax(0, 1fr); gap: 20px; padding: 22px 16px 60px; }
  .reader > article { padding: 30px 25px 40px; }
  .article-head h1 { font-size: 26px; }
}
@media (max-width: 640px) {
  .reader { display: flex; flex-direction: column; padding: 18px 12px 40px; margin: 0; gap: 16px; }
  .toc { position: static; max-height: 210px; width: 100%; padding: 16px; border: 1px solid #e1e8f0; background: #ffffffa8; border-radius: 10px; }
  .toc strong { font-size: 14px; padding-bottom: 8px; }
  .toc-label { display: none; }
  .reader > article { padding: 25px 18px 36px; width: 100%; }
  .article-head h1 { font-size: 24px; }
  .prose { font-size: 14px; }
  .prose h2 { font-size: 20px; }
}
