/*
 * 墨溟 · Moming — 博客
 * 共用的令牌、刊头、页脚、按钮在主站的 /assets/css/core.css?v=c56a960c 里，这里只写博客自己的部分。
 */

.mast { background: transparent; }
.mast::before { opacity: 1; }

.search-btn {
  width: 36px; height: 36px;
  margin-right: -10px;
  display: grid; place-items: center;
  padding: 0; border: 0; background: none;
  color: var(--ink);
  border-radius: 50%;
}
.search-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.search-btn:hover { color: var(--seal); }

/* 阅读进度：刊头下一根朱线 */
.progress { position: fixed; inset: var(--mast-h) 0 auto 0; z-index: 39; height: 2px; pointer-events: none; transition: transform .6s var(--ease); }
.progress span { display: block; height: 100%; background: var(--seal); transform-origin: left; transform: scaleX(0); }
.mast.is-away + .progress { transform: translateY(calc(var(--mast-h) * -1)); }

/* ------------------------------------------------------------------ 首页的头 */

.bhead, .ahead {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: end;
  padding: calc(var(--mast-h) + clamp(56px, 10vh, 120px)) var(--margin) 0;
}
.bhead__label, .ahead__kind { grid-column: 1 / -1; margin-bottom: clamp(18px, 3vh, 34px); }
.ahead__kind a:hover { color: var(--ink); }
.bhead__title {
  grid-column: 1 / span 6;
  font-size: clamp(110px, 17vw, 280px);
  font-weight: 900;
  line-height: .88;
  letter-spacing: .02em;
}
.bhead__side { grid-column: 8 / span 5; padding-bottom: .5em; }
.bhead__lede { font-size: var(--t-lead); line-height: 1.75; letter-spacing: .03em; }
.bhead__stats { display: flex; gap: clamp(24px, 3vw, 48px); margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--hair); }
.bhead__stats dd { margin-top: 6px; font-size: 22px; letter-spacing: .02em; }

.cats {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px clamp(18px, 2.4vw, 36px);
  flex-wrap: wrap;
  margin-top: clamp(48px, 8vh, 88px);
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--hair);
}
.cats__item { position: relative; font-size: 15px; letter-spacing: .16em; padding: 4px 0; }
.cats__item sup { margin-left: 4px; font-size: 10px; letter-spacing: 0; color: var(--ink-3); vertical-align: 6px; }
.cats__item::after { content: ''; position: absolute; left: 0; right: .16em; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.cats__item:hover::after { transform: scaleX(1); transform-origin: left; }
.cats__item[aria-current="page"]::after { transform: scaleX(1); background: var(--seal); }

/* 列表页、搜索、分类的头 */
.ahead { padding-bottom: clamp(36px, 6vh, 64px); border-bottom: 1px solid var(--ink); margin: 0 var(--margin); padding-left: 0; padding-right: 0; }
.ahead__name { grid-column: 1 / span 9; font-size: clamp(56px, 8vw, 132px); font-weight: 900; line-height: 1; letter-spacing: .02em; overflow-wrap: anywhere; }
.ahead__count { grid-column: 10 / span 3; justify-self: end; padding-bottom: .5em; font-size: 15px; color: var(--ink-2); letter-spacing: .08em; }
.ahead__count b { font-weight: 500; color: var(--ink); }
.ahead--big .ahead__name { font-size: clamp(96px, 14vw, 230px); }

/* ------------------------------------------------------------------ 文章索引 */

.listing { padding: clamp(24px, 4vh, 48px) var(--margin) clamp(96px, 14vh, 160px); }
.year {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-top: clamp(32px, 5vh, 56px);
}
.year__head {
  grid-column: 1 / span 3;
  align-self: start;
  position: sticky;
  top: calc(var(--mast-h) + 28px);
  display: grid;
  gap: 4px;
  font-weight: 400;
}
.year__num { font-size: clamp(56px, 6vw, 104px); line-height: .9; letter-spacing: -.02em; }
.year__gz { font-size: 14px; letter-spacing: .3em; color: var(--ink-3); }
.year__gz b { font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.entries, .ledger__list { grid-column: 4 / -1; border-top: 1px solid var(--hair-2); }

.entry__link {
  --mx: 50%; --my: 50%;
  position: relative;
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr) auto 2em;
  column-gap: var(--gutter);
  align-items: baseline;
  padding: clamp(22px, 3vh, 34px) 0;
  border-bottom: 1px solid var(--hair-2);
  isolation: isolate;
}
.entry__link::before {          /* 指针处洇开一小片淡墨 */
  content: '';
  position: absolute;
  inset: 0 -18px;
  z-index: -1;
  background: var(--ink);
  opacity: .055;
  -webkit-mask: url(/assets/img/blot.svg?v=56d38b5e) no-repeat;
  mask: url(/assets/img/blot.svg?v=56d38b5e) no-repeat;
  --bs: 0px;
  -webkit-mask-size: var(--bs) var(--bs);
  mask-size: var(--bs) var(--bs);
  -webkit-mask-position: calc(var(--mx) + 18px - var(--bs) / 2) calc(var(--my) - var(--bs) / 2);
  mask-position: calc(var(--mx) + 18px - var(--bs) / 2) calc(var(--my) - var(--bs) / 2);
  transition: --bs 1.15s cubic-bezier(.3, .02, .18, 1);
}
@property --bs { syntax: '<length>'; inherits: false; initial-value: 0px; }
.entry__link:hover::before, .entry__link:focus-visible::before { --bs: 2400px; }
.entry__when { display: grid; gap: 2px; }
.entry__date { font-size: 13px; color: var(--ink-2); letter-spacing: .04em; transition: color .4s; }
.entry__term { font-size: 12px; letter-spacing: .24em; color: var(--ink-3); }
.entry__link:hover .entry__date { color: var(--seal); }
.entry__title {
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: .02em;
  text-wrap: balance;
  transition: transform .7s var(--ease);
}
.entry__link:hover .entry__title { transform: translateX(6px); }
.entry__excerpt {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 40em;
}
.entry__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: var(--ink-3); letter-spacing: .08em; white-space: nowrap; }
.entry__go { justify-self: end; font-size: 22px; opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .6s var(--ease); }
.entry__link:hover .entry__go { opacity: 1; transform: none; }
.entry__cover { display: none; }

/* 有头图的文章：悬停时在右侧浮出 */
@media (hover: hover) and (min-width: 1100px) {
  .entry__cover {
    display: block;
    position: absolute;
    right: 3em;
    top: 50%;
    width: 220px;
    aspect-ratio: 4 / 3;
    margin-top: -82px;
    border-radius: 6px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px) rotate(1.5deg) scale(.96);
    transition: opacity .5s var(--ease), transform .8s var(--ease);
    box-shadow: var(--shadow);
  }
  .entry__cover img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
  .entry__link:hover .entry__cover { opacity: 1; transform: none; }
  .entry__link:hover .entry__meta { opacity: 0; }
}

.empty { display: grid; justify-items: start; gap: 18px; padding: clamp(64px, 12vh, 140px) 0; max-width: 36em; }
.seal--lg { width: 30px; margin-bottom: 10px; }
.empty__title { font-size: var(--t-h2); font-weight: 600; letter-spacing: .04em; }
.empty__text { color: var(--ink-2); font-size: var(--t-lead); line-height: 1.8; }

/* 翻页 */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: clamp(48px, 8vh, 80px); font-family: var(--mono); font-size: 13px; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; color: var(--ink-2); transition: background-color .3s, color .3s; }
.pager a:hover { background: var(--paper-2); color: var(--ink); }
.pager .is-current, .pager .is-current a { background: var(--ink); color: var(--paper); }
.pager__prev a, .pager__next a { font-family: var(--serif); letter-spacing: .1em; }

/* ------------------------------------------------------------------ 文章 */

.post { padding: calc(var(--mast-h) + clamp(48px, 9vh, 110px)) var(--margin) 0; }
.post__head, .post__layout, .post__foot, .near, .comments {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
.post__head > *, .post__foot > *, .comments > * { grid-column: 4 / span 8; }
.post__crumbs { display: flex; gap: 10px; margin-bottom: clamp(18px, 3vh, 30px); }
.post__crumbs a:hover { color: var(--ink); }
.post__title {
  font-size: clamp(38px, 4.6vw, 74px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: .01em;
  text-wrap: balance;
}
.post__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  margin-top: clamp(26px, 4vh, 40px);
  padding: 16px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--hair);
  font-size: 14px;
  color: var(--ink-2);
  letter-spacing: .06em;
}
.post__when { display: flex; gap: 18px; align-items: baseline; }
.post__when time { font-size: 13px; color: var(--ink); }
.post__almanac { letter-spacing: .2em; }
.post__facts { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.post__facts b { font-weight: 500; color: var(--ink); }

.post__cover {
  grid-column: 1 / -1;
  margin: clamp(40px, 7vh, 72px) calc(var(--margin) * -1) 0;
  max-height: 78vh;
  overflow: hidden;
}
.post__cover img { width: 100%; max-height: 78vh; object-fit: cover; filter: grayscale(1) contrast(1.06); transition: filter 1.4s var(--ease); }
.post__cover:hover img { filter: none; }
/* 白天：图像像是直接印在这张纸上（白处透出纸色）；夜里深底上不做正片叠底 */
:root:not([data-theme="dark"]) .post__cover img, :root:not([data-theme="dark"]) .prose img { mix-blend-mode: multiply; }

.post__layout { margin-top: clamp(48px, 8vh, 88px); }
.post__aside { grid-column: 1 / span 3; position: relative; }
.post__body { grid-column: 4 / span 7; min-width: 0; }

/* 目录：竖线随读到的位置着墨 */
.toc { position: sticky; top: calc(var(--mast-h) + 36px); max-height: calc(100vh - var(--mast-h) - 72px); overflow: auto; padding-right: 12px; scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
.toc__title { margin-bottom: 16px; }
.toc__list { position: relative; display: grid; gap: 2px; padding-left: 16px; border-left: 1px solid var(--hair-2); counter-reset: toc; }
.toc__list::before { content: ''; position: absolute; left: -1px; top: 0; width: 1px; height: calc(var(--read, 0) * 100%); background: var(--ink); transition: height .25s linear; }
.toc__item a { display: block; padding: 5px 0; font-size: 13.5px; line-height: 1.55; letter-spacing: .04em; color: var(--ink-3); transition: color .3s; }
.toc__item.is-h3 a { padding-left: 1.2em; font-size: 12.5px; }
.toc__item a:hover { color: var(--ink); }
.toc__item.is-on a { color: var(--ink); }
.toc__item.is-on a::before { content: ''; position: absolute; left: -3px; width: 5px; height: 5px; margin-top: .62em; border-radius: 50%; background: var(--seal); }

/* ------------------------------------------------------------------ 正文 */

.prose { font-size: 18px; line-height: 1.95; letter-spacing: .02em; overflow-wrap: break-word; }
@media (max-width: 1100px) { .prose { font-size: 17px; } }
.prose > * + * { margin-top: 1.15em; }
.prose p { text-wrap: pretty; }
.prose a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat, linear-gradient(var(--hair-2), var(--hair-2)) 0 100% / 100% 1px no-repeat; transition: background-size .5s var(--ease); }
.prose a:hover { background-size: 100% 1px, 100% 1px; }
.prose strong, .prose b { font-weight: 600; }
.prose em { font-style: normal; text-emphasis: dot; -webkit-text-emphasis: dot; text-emphasis-position: under right; -webkit-text-emphasis-position: under right; }
.prose :is(h2, h3, h4) { position: relative; font-weight: 600; letter-spacing: .03em; scroll-margin-top: calc(var(--mast-h) + 24px); }
.prose h2 { margin-top: 2.6em; font-size: clamp(25px, 2.2vw, 32px); line-height: 1.4; padding-top: .6em; border-top: 1px solid var(--hair); }
.prose h3 { margin-top: 2em; font-size: clamp(20px, 1.6vw, 23px); line-height: 1.5; }
.prose h4 { margin-top: 1.8em; font-size: 18px; }
.prose h2 .h-no { position: absolute; right: calc(100% + 18px); top: 1.15em; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .1em; color: var(--ink-3); white-space: nowrap; }
.prose .h-anchor { margin-left: .4em; padding: 0 .2em; border: 0; background: none; font-family: var(--mono); font-size: .6em; font-weight: 400; color: var(--ink-4); opacity: 0; transition: opacity .3s, color .3s; vertical-align: .25em; }
.prose :is(h2, h3):hover .h-anchor, .prose .h-anchor:focus-visible { opacity: 1; }
.prose .h-anchor:hover { color: var(--seal); }
.prose > :first-child { margin-top: 0; }
.prose > h2:first-child { border-top: 0; padding-top: 0; }

.prose ul, .prose ol { padding-left: 1.6em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: ''; position: absolute; left: -1.05em; top: .9em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.prose ol { list-style: none; counter-reset: li; }
.prose ol > li { position: relative; counter-increment: li; }
.prose ol > li::before { content: counter(li, decimal-leading-zero); position: absolute; left: -2.1em; top: .38em; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-3); }
.prose li + li { margin-top: .45em; }
.prose li > ul, .prose li > ol { margin-top: .45em; }

.prose blockquote {
  position: relative;
  padding: .2em 0 .2em 1.6em;
  border-left: 1px solid var(--ink);
  color: var(--ink-2);
  font-size: .96em;
}
.prose blockquote > * + * { margin-top: .9em; }


.prose hr { height: 6px; margin: 3em auto; border: 0; background: radial-gradient(circle, var(--ink) 2.2px, transparent 2.6px) 0 0 / 24px 6px repeat-x; width: 72px; }

.prose :not(pre) > code {
  font-family: var(--mono);
  font-size: .84em;
  padding: .12em .42em;
  border-radius: 4px;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--hair);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

/* 代码：一块墨 */
.prose .codeblock { position: relative; margin-top: 1.6em; margin-bottom: 1.6em; }
.prose pre {
  margin: 0;
  padding: 22px 24px;
  overflow-x: auto;
  border-radius: 10px;
  background: #15171a;
  color: #e7e3da;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
  letter-spacing: 0;
  tab-size: 4;
  scrollbar-width: thin;
  scrollbar-color: rgba(231, 227, 218, .2) transparent;
}
:root[data-theme="dark"] .prose pre { background: #171a1e; box-shadow: inset 0 0 0 1px var(--hair); }
.prose pre code { font: inherit; background: none; padding: 0; }
.codeblock__bar { position: absolute; right: 10px; top: 8px; display: flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(231, 227, 218, .45); }
.codeblock__copy { padding: 3px 9px; border: 1px solid rgba(231, 227, 218, .2); border-radius: 999px; background: none; color: rgba(231, 227, 218, .7); font: inherit; letter-spacing: .12em; opacity: 0; transition: opacity .3s, color .3s, border-color .3s; }
.codeblock:hover .codeblock__copy, .codeblock__copy:focus-visible { opacity: 1; }
.codeblock__copy:hover { color: #fff; border-color: rgba(231, 227, 218, .6); }
.codeblock__copy.is-done { color: #f08a6e; border-color: #f08a6e; opacity: 1; }
/* 语法：墨、金、朱、黛 */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #858179; font-style: italic; }
.token.punctuation, .token.operator { color: #a9a49a; }
.token.keyword, .token.important, .token.atrule, .token.rule, .token.selector .token.class { color: #f0866b; }
.token.string, .token.char, .token.attr-value, .token.regex, .token.inserted { color: #d8c48f; }
.token.number, .token.boolean, .token.constant, .token.symbol { color: #9fc0d6; }
.token.function, .token.class-name, .token.builtin { color: #f2efe8; font-weight: 500; }
.token.property, .token.tag, .token.attr-name, .token.variable, .token.parameter { color: #b8c7a8; }
.token.deleted { color: #f0866b; }
.token.namespace { opacity: .7; }

.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.7; }
.prose .table { overflow-x: auto; }
.prose th { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--ink); text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.prose td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }

.prose figure, .prose .figure { margin-top: 2em; margin-bottom: 2em; }
.prose img { max-width: 100%; height: auto; margin: 0 auto; border-radius: 4px; cursor: zoom-in; }
.prose figcaption { margin-top: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--ink-3); text-align: center; }
.prose figcaption::before { content: '—　'; }
@media (min-width: 1200px) {
  .prose .figure.is-wide { margin-left: calc(-1 * (100% / 7 * 1.5)); margin-right: calc(-1 * (100% / 7 * 1.5)); }
}

.prose sup a, .prose .footnote-ref a { padding: 0 .15em; font-family: var(--mono); font-size: .72em; color: var(--seal); background: none; }
.prose .footnotes { margin-top: 3.4em; font-size: 14px; color: var(--ink-2); }
.prose .footnotes hr { margin: 0 0 1.6em; width: 72px; height: 1px; background: var(--ink); }
.prose .footnotes ol > li::before { top: .3em; }

/* ------------------------------------------------------------------ 文末 */

.post__foot { margin-top: clamp(56px, 9vh, 96px); }
.post__foot > * + * { margin-top: 18px; }
.post__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.post__tags a { padding: 4px 12px; border: 1px solid var(--hair-2); border-radius: 999px; font-size: 13px; letter-spacing: .08em; color: var(--ink-2); transition: color .3s, border-color .3s; }
.post__tags a::before { content: '#'; margin-right: 2px; font-family: var(--mono); color: var(--ink-4); }
.post__tags a:hover { color: var(--ink); border-color: var(--ink); }
.post__license { font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.post__sign { display: flex; align-items: center; gap: 14px; padding-top: 22px; border-top: 1px solid var(--hair); font-size: 14px; color: var(--ink-2); letter-spacing: .06em; }
.post__sign .seal { width: 14px; }

.near { margin-top: clamp(56px, 9vh, 96px); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--hair-2); }
.near__item { grid-column: span 6; display: grid; gap: 12px; align-content: start; padding: clamp(24px, 4vh, 40px) 0; }
.near__item.is-next { text-align: right; justify-items: end; border-left: 1px solid var(--hair-2); padding-left: var(--gutter); }
.near__item.is-prev { padding-right: var(--gutter); }
.near__item a { font-size: clamp(20px, 1.8vw, 28px); font-weight: 600; line-height: 1.45; letter-spacing: .02em; text-wrap: balance; transition: color .3s; }
.near__item a:hover { color: var(--seal); }
.near__none { font-size: 15px; color: var(--ink-4); }

/* ------------------------------------------------------------------ 评论 */

.comments { margin-top: clamp(64px, 10vh, 120px); padding-bottom: clamp(80px, 12vh, 140px); }
.comments__title { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--ink); font-weight: 400; }
.comments__title b { font-size: 28px; font-weight: 400; letter-spacing: 0; }
.comment-list { display: grid; }
.comment { position: relative; padding: 24px 0 18px; border-bottom: 1px solid var(--hair); }
.comment .comment-list, .comment > ol { margin-left: 20px; padding-left: 26px; border-left: 1px solid var(--hair-2); }
.comment.is-child { border-bottom: 0; padding-bottom: 6px; }
.comment__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sigil {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}
.sigil.is-author { background: var(--seal); color: var(--seal-ink); }
.comment__author { font-size: 15px; font-weight: 600; letter-spacing: .04em; }
.comment__author a { border-bottom: 1px solid var(--hair-2); }
.comment__badge { padding: 2px 8px; border: 1px solid var(--seal); border-radius: 999px; color: var(--seal); font-size: 10px; }
.comment__time { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.comment__body { margin: 12px 0 0 42px; font-size: 15.5px; line-height: 1.9; }
.comment__body p + p { margin-top: .7em; }
.comment__body a { border-bottom: 1px solid var(--hair-2); }
.comment__actions { margin: 6px 0 0 42px; font-size: 13px; letter-spacing: .1em; }
.comment__actions a { color: var(--ink-3); }
.comment__actions a:hover { color: var(--seal); }
.comment__waiting { margin: 8px 0 0 42px; font-size: 13px; color: var(--seal); }

.respond { margin-top: 48px; }
.respond__title { font-size: var(--t-h3); font-weight: 600; letter-spacing: .06em; }
.respond__cancel { float: right; font-size: 13px; }
.respond__cancel a { color: var(--seal); }
.respond__form { margin-top: 18px; }
.respond__note { font-size: 14px; color: var(--ink-2); }
.respond__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--gutter); }
.field { position: relative; margin-top: 20px; }
.field input, .field textarea {
  display: block;
  width: 100%;
  padding: 22px 0 8px;
  border: 0;
  border-bottom: 1px solid var(--hair-2);
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.6;
  transition: border-color .3s;
  resize: vertical;
}
.field textarea { min-height: 140px; }
.field label {
  position: absolute;
  left: 0; top: 22px;
  font-size: 15px;
  letter-spacing: .1em;
  color: var(--ink-3);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .45s var(--ease), color .3s;
}
.field label small { margin-left: 8px; font-size: 11px; letter-spacing: .04em; color: var(--ink-4); }
.field .req { color: var(--seal); margin-left: 2px; }
.field :focus + label, .field :not(:placeholder-shown) + label { transform: translateY(-20px) scale(.78); color: var(--ink-2); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--seal); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.field:focus-within::after { transform: scaleX(1); }
.respond__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; }
.comments__closed { margin-top: 24px; color: var(--ink-3); }

/* ------------------------------------------------------------------ 搜索 */

.search {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-content: center;
  padding: var(--margin);
  background: var(--veil);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  backdrop-filter: blur(20px) saturate(1.1);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.search.is-open { opacity: 1; }
.search__form { width: min(100%, 980px); margin: 0 auto; transform: translateY(16px); transition: transform .7s var(--ease); }
.search.is-open .search__form { transform: none; }
.search__input {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 10px 0 16px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  font-size: clamp(36px, 6vw, 84px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .02em;
}
.search__input::placeholder { color: var(--ink-4); }
.search__input:focus { outline: none; border-bottom-color: var(--seal); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__hint { margin-top: 18px; }
.search__close { position: absolute; right: var(--margin); top: 22px; display: flex; align-items: center; gap: 8px; padding: 8px 0; border: 0; background: none; font-size: 14px; letter-spacing: .2em; color: var(--ink-2); }
.search__close span { font-size: 22px; line-height: 1; }
.search__close:hover { color: var(--seal); }

/* ------------------------------------------------------------------ 墨瓶：读了多少，瓶里就有多少墨 */

.vessel {
  position: fixed;
  right: calc(var(--margin) - 6px);
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 35;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.vessel.is-on { opacity: 1; transform: none; pointer-events: auto; }
.vessel svg { width: 40px; height: 40px; }
.vessel__rim { fill: none; stroke: var(--ink); stroke-width: 1; }
.vessel__ink { fill: var(--ink); }
.vessel__arrow { fill: none; stroke: var(--paper); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; mix-blend-mode: difference; }
.vessel__tip { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); opacity: 0; transition: opacity .3s; white-space: nowrap; }
.vessel:hover .vessel__tip, .vessel:focus-visible .vessel__tip { opacity: 1; }

/* ------------------------------------------------------------------ 灯箱 */

.lightbox { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 4vmin; background: var(--veil); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); cursor: zoom-out; opacity: 0; transition: opacity .4s var(--ease); }
.lightbox.is-open { opacity: 1; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 4px; box-shadow: var(--shadow); }

.toast { position: fixed; left: 50%; bottom: 32px; z-index: 80; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 13px; letter-spacing: .1em; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .4s, transform .5s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ 归档：墨点日历与全目录 */

.calendar { margin: clamp(48px, 8vh, 80px) var(--margin) 0; }
.calendar__grid { display: grid; grid-template-columns: 4.5em repeat(12, minmax(0, 1fr)); align-items: center; gap: 10px 0; padding: 20px 0; border-bottom: 1px solid var(--hair); }
.calendar__m { text-align: center; }
.calendar__y { font-size: 13px; color: var(--ink-2); }
.calendar__cell { display: grid; place-items: center; height: 34px; border-left: 1px solid var(--hair); }
.calendar__cell i { display: block; width: calc(6px + var(--n) * 4px); height: calc(6px + var(--n) * 4px); border-radius: 50%; background: var(--ink); opacity: calc(.35 + var(--n) * .11); filter: blur(.3px); }
.calendar__cap { margin-top: 14px; text-transform: none; }
.ledger { padding: 0 var(--margin) clamp(96px, 14vh, 160px); }
.ledger__row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) auto 6em; column-gap: var(--gutter); align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--hair); transition: padding .5s var(--ease); }
.ledger__row time { font-size: 12.5px; color: var(--ink-3); }
.ledger__title { font-size: 18px; letter-spacing: .03em; transition: color .3s; }
.ledger__term { font-size: 12px; letter-spacing: .24em; color: var(--ink-3); }
.ledger__cat { justify-self: end; font-size: 13px; color: var(--ink-3); letter-spacing: .1em; }
.ledger__row:hover { padding-left: 10px; }
.ledger__row:hover .ledger__title { color: var(--seal); }

/* 友邻 */
.links .links__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gutter); margin-top: 0; }
.links__card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 18px; border: 1px solid var(--hair-2); border-radius: 12px; background: none !important; transition: border-color .3s, transform .6s var(--ease), box-shadow .6s var(--ease); }
.links__card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.links__card img { grid-row: span 2; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; margin: 0; cursor: pointer; }
.links__name { font-size: 16px; font-weight: 600; letter-spacing: .04em; }
.links__desc { font-size: 13px; line-height: 1.6; color: var(--ink-2); }

/* 博客内的 404 */
.lost404 { display: grid; justify-items: center; gap: 22px; padding: calc(var(--mast-h) + 12vh) var(--margin) 14vh; text-align: center; }
.lost404__mark { font-size: clamp(120px, 20vw, 300px); font-weight: 900; line-height: 1; }
.lost404__text { max-width: 30em; color: var(--ink-2); font-size: var(--t-lead); line-height: 1.8; }
.lost404__ways { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ------------------------------------------------------------------ 响应 */

@media (max-width: 1199px) {
  .post__head > *, .post__foot > *, .comments > * { grid-column: 1 / -1; }
  .post__layout { display: block; max-width: 40em; }
  .post__head, .post__foot, .comments, .near { max-width: 40em; }
  .post { padding-left: max(var(--margin), calc((100vw - 40em) / 2)); padding-right: max(var(--margin), calc((100vw - 40em) / 2)); }
  .post__cover { margin-left: calc(-1 * max(var(--margin), calc((100vw - 40em) / 2))); margin-right: calc(-1 * max(var(--margin), calc((100vw - 40em) / 2))); }
  .post__aside { margin-bottom: 40px; }
  .toc { position: static; max-height: none; padding: 18px 20px; border: 1px solid var(--hair-2); border-radius: 12px; }
  .toc__list { border-left: 0; padding-left: 0; }
  .toc__list::before { display: none; }
  .toc__item.is-on a::before { display: none; }
  .prose h2 .h-no { position: static; display: block; margin-bottom: 6px; }
}
@media (max-width: 900px) {
  .bhead__title, .bhead__side { grid-column: 1 / -1; }
  .bhead__side { margin-top: 28px; }
  .ahead__name, .ahead__count { grid-column: 1 / -1; justify-self: start; }
  .ahead__count { margin-top: 14px; }
  .year { grid-template-columns: minmax(0, 1fr); }
  .year__head { position: static; grid-column: 1; display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px; }
  .year__num { font-size: 48px; }
  .entries, .ledger__list { grid-column: 1; }
  .entry__link { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; }
  .entry__when { grid-column: 1 / -1; display: flex; gap: 14px; }
  .entry__main { grid-column: 1 / -1; }
  .entry__meta { grid-column: 1; flex-direction: row; gap: 14px; }
  .entry__go { display: none; }
  .respond__grid { grid-template-columns: minmax(0, 1fr); }
  .ledger__row { grid-template-columns: 4em minmax(0, 1fr); }
  .ledger__term, .ledger__cat { display: none; }
  .calendar { overflow-x: auto; }
  .calendar__grid { min-width: 560px; }
  .near__item { grid-column: 1 / -1; }
  .near__item.is-next { border-left: 0; border-top: 1px solid var(--hair-2); padding-left: 0; text-align: left; justify-items: start; }
}
@media (max-width: 560px) {
  .comment__body, .comment__actions, .comment__waiting { margin-left: 0; }
  .comment .comment-list, .comment > ol { margin-left: 0; padding-left: 14px; }
  .respond__foot .label { display: none; }
  .prose pre { margin-left: calc(var(--margin) * -1); margin-right: calc(var(--margin) * -1); border-radius: 0; padding: 18px var(--margin); }
}
