/* 随轩 · the house pages that are not rooms
   精选 a library of slipcased sets · 归档 the rings of a tree · 全部文章 a printed index · 书房 a study (yh-books.css)
   关于 the night sky (yh-about.css) · 留言 a whitewashed wall with letters pinned to it · 检索 a card catalogue
   and the plainer house pages: tags, dates, tag combinations, 404, ordinary pages. */

/* =================================================================== 精选 · 函套 */
.w-shelf {
  --bg: #F2EDE2; --paper: #F8F4EA; --ink: #2A2620; --muted: #6B6358; --line: rgba(42, 38, 32, .16);
  --acc: #B8372D; --acc-ink: #FFFFFF; --wood: #5A3E2D;
  background: #F2EDE2 url("../img/tex-paper.png");
}
.w-shelf .bar { background: rgba(242, 237, 226, .93); }
.w-shelf .bar__nav .nav__a[aria-current="page"] { border-bottom-color: var(--acc); }

.sh__head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: end; padding-top: 70px; }
.sh__title h1 { font-family: var(--f-brush); font-weight: 400; font-size: 120px; line-height: .9; letter-spacing: .02em; }
.sh__lede { margin-top: 22px; max-width: 24em; font-family: var(--f-serif); font-size: 17.5px; line-height: 1.9; }
.sh__n { margin-top: 14px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* the shelf of slipcases */
.cases { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 14px; padding: 0 18px; min-height: 380px; perspective: 1400px; }
.cases::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: -16px; height: 16px; border-radius: 2px; background: linear-gradient(#7A563E, #4A3223); box-shadow: 0 14px 22px -10px rgba(40, 24, 12, .55); }
.case { --cloth: #2C3A5C; --cloth2: #22304E; --h: 330px; animation: case-in .9s cubic-bezier(.2, 1.2, .4, 1) var(--d, 0ms) both; }
.case:nth-child(2) { --h: 300px; } .case:nth-child(3) { --h: 344px; } .case:nth-child(4) { --h: 316px; }
.case:nth-child(5) { --h: 296px; } .case:nth-child(6) { --h: 336px; } .case:nth-child(7) { --h: 286px; }
@keyframes case-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.case > a { display: grid; justify-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.case__box {
  position: relative; display: block; width: 92px; height: var(--h); border-radius: 3px 3px 1px 1px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .045) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 4px),
    linear-gradient(90deg, var(--cloth2), var(--cloth) 18%, var(--cloth) 82%, var(--cloth2));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), inset 6px 0 0 rgba(255, 255, 255, .06), 8px 0 0 -2px rgba(0, 0, 0, .18), 0 18px 26px -18px rgba(0, 0, 0, .6);
  transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s;
}
.case > a:hover .case__box, .case > a:focus-visible .case__box { transform: translateY(-14px) rotateY(-14deg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 14px 4px 0 -2px rgba(0, 0, 0, .25), 0 30px 34px -20px rgba(0, 0, 0, .7); }
.case__slip {
  position: absolute; top: 18px; left: 50%; width: 38px; max-height: calc(100% - 56px); padding: 12px 0; transform: translateX(-50%);
  background: #F4EEDD; box-shadow: inset 0 0 0 1px rgba(90, 62, 45, .35), inset 0 0 0 3px #F4EEDD, inset 0 0 0 4px rgba(90, 62, 45, .25);
}
.case__slip .tcy { text-orientation: upright; letter-spacing: 0; }
.case__slip b { display: block; writing-mode: vertical-rl; margin: 0 auto; font-family: var(--f-serif); font-weight: 900; font-size: 17px; line-height: 1; letter-spacing: .14em; color: #2A2620; white-space: nowrap; overflow: hidden; max-height: calc(var(--h) - 80px); }
:lang(en) .case__slip { width: 44px; }
:lang(en) .case__slip b { font-size: 12.5px; letter-spacing: .02em; white-space: normal; line-height: 1.15; }
.case__clasp { position: absolute; right: -3px; top: 30%; display: grid; gap: 42px; }
.case__clasp i { display: block; width: 10px; height: 16px; border-radius: 2px; background: linear-gradient(#F3EAD6, #D5C8AE); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.case__n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.case--indigo { --cloth: #2C3F6B; --cloth2: #1F2D4F; }
.case--navy { --cloth: #1D2B53; --cloth2: #121C3B; }
.case--ink { --cloth: #3E3B36; --cloth2: #2A2824; }
.case--oxblood { --cloth: #6A2328; --cloth2: #4E171B; }
.case--cinnabar { --cloth: #A8382B; --cloth2: #84291F; }
.case--ochre { --cloth: #B07C2E; --cloth2: #8D6222; }
.case--linen { --cloth: #9C8A70; --cloth2: #7E6E57; }

/* each set opens as a two-page spread */
.sh__sets { display: grid; gap: 70px; margin-top: 120px; }
.set {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 420px;
  background: var(--paper); box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 30px 50px -36px rgba(40, 24, 12, .6), 0 0 0 1px rgba(90, 62, 45, .15);
  scroll-margin-top: 90px;
}
.set::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 46px; margin-left: -23px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(60, 40, 20, .1) 45%, rgba(60, 40, 20, .18) 50%, rgba(60, 40, 20, .1) 55%, transparent); }
.set--flip .set__front { order: 2; }
.set__front { position: relative; display: grid; align-content: center; justify-items: center; padding: 44px 40px; overflow: hidden; }
.set__front img { width: 100%; max-width: 520px; height: auto; mix-blend-mode: multiply; filter: saturate(.85); }
.set__t { position: absolute; top: 34px; right: 42px; writing-mode: vertical-rl; font-family: var(--f-serif); font-weight: 900; font-size: 34px; line-height: 1.1; letter-spacing: .12em; }
.set--flip .set__t { right: auto; left: 42px; }
:lang(en) .set__t { position: static; writing-mode: horizontal-tb; margin-top: 18px; font-size: 26px; letter-spacing: 0; text-align: center; }
.set__t a { text-decoration: none; }
.set__t .tcy { text-orientation: upright; letter-spacing: 0; }
.set__t a:hover { color: var(--acc); }
.set__seal { position: absolute; left: 40px; bottom: 34px; display: block; width: 56px; height: 56px; padding: 6px 5px; background: var(--acc); color: #F7EDE4; font: 400 20px/22px var(--f-brush); letter-spacing: 0; text-align: center; border-radius: 4px; transform: rotate(-4deg); writing-mode: vertical-rl; box-shadow: inset 0 0 0 2px rgba(247, 237, 228, .3); opacity: .9; }
.set--flip .set__seal { left: auto; right: 40px; }
.set__page { padding: 48px 56px 44px; }
.set__room { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--muted); }
.set__d { margin-top: 18px; font-family: var(--f-serif); font-size: 18px; line-height: 1.9; }
.set__page h3 { margin-top: 28px; padding-bottom: 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line); }
.set__order li a { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; text-decoration: none; border-bottom: 1px dotted rgba(42, 38, 32, .25); }
.set__no { font-family: var(--f-serif); font-weight: 900; color: var(--acc); }
.set__ot { font-family: var(--f-serif); font-size: 16.5px; line-height: 1.6; }
.set__order a:hover .set__ot { text-decoration: underline; text-decoration-color: var(--acc); text-underline-offset: 4px; }
.set__order time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.set__all { display: inline-flex; align-items: center; min-height: 42px; margin-top: 24px; padding: 0 18px; color: var(--paper); background: var(--ink); text-decoration: none; font-size: 15px; }
.set__all:hover { background: var(--acc); }
/* thread binding on the outer edge */
.set__page { position: relative; }
.set::after { content: ""; position: absolute; top: 24px; bottom: 24px; right: 14px; width: 2px; background: repeating-linear-gradient(transparent 0 46px, rgba(90, 62, 45, .55) 46px 52px); }
.set--flip::after { right: auto; left: 14px; }

/* the catalogue of key pieces */
.sh__best { margin-top: 120px; }
.sh__best header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.sh__best h2 { font-family: var(--f-serif); font-weight: 900; font-size: 32px; letter-spacing: .06em; }
.sh__best header p { color: var(--muted); }
.cat { columns: 2; column-gap: 56px; margin-top: 26px; }
.cat__room { break-inside: avoid; padding: 18px 0 22px; border-bottom: 1px solid var(--line); }
.cat__room h3 { margin-bottom: 8px; }
.cat__room ol { counter-reset: c; }
.cat__room li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 6px 0; text-decoration: none; }
.cat__room li a span { font-family: var(--f-serif); font-size: 15.5px; line-height: 1.6; }
.cat__room li a span::before { counter-increment: c; content: counter(c, cjk-decimal) "　"; color: var(--acc); }
:lang(en) .cat__room li a span::before { content: counter(c) ". "; }
.cat__room li a:hover span { text-decoration: underline; text-underline-offset: 4px; }
.cat__room time { font-size: 13px; color: var(--muted); }

@container yh (max-width: 980px) {
  .sh__head { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cases { justify-content: flex-start; overflow-x: auto; padding-bottom: 22px; scrollbar-width: none; }
  .cases::after { bottom: 6px; }
  .set, .set--flip { grid-template-columns: minmax(0, 1fr); }
  .set::before { display: none; }
  .set--flip .set__front { order: 0; }
  .set__page { padding: 30px 26px 34px; }
}
@container yh (max-width: 760px) {
  .sh__head { padding-top: 36px; }
  .sh__title h1 { font-size: 84px; }
  .cases { gap: 10px; min-height: 300px; margin-inline: -16px; padding-inline: 16px; }
  .case__box { width: 70px; height: calc(var(--h) * .78); }
  .case__slip { width: 32px; }
  .case__slip b { font-size: 14.5px; max-height: calc(var(--h) * .78 - 70px); }
  .sh__sets { margin-top: 70px; gap: 40px; }
  .set__front { padding: 30px 20px 60px; }
  .set__t { top: 20px; right: 20px; font-size: 26px; }
  .set--flip .set__t { left: auto; right: 20px; }
  .set__seal, .set--flip .set__seal { left: 20px; right: auto; bottom: 16px; }
  .set__d { font-size: 16.5px; }
  .cat { columns: 1; }
  .sh__best header { flex-direction: column; }
}

/* =================================================================== 归档 · 年轮 */
.w-rings {
  --bg: #EEE3CE; --paper: #F6EEDD; --ink: #33210F; --muted: #7A6248; --line: rgba(51, 33, 15, .16);
  --acc: #2F6B4F; --acc-ink: #FFFFFF; --early: #E8CFA0; --late: #A0703F; --bark: #4A3020;
  background: #EEE3CE url("../img/tex-grain.png");
}
.w-rings .bar { background: rgba(238, 227, 206, .93); }
.w-rings .bar__nav .nav__a[aria-current="page"] { border-bottom-color: var(--late); }
.ar__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; padding-top: 56px; }
.ar__intro h1 { font-family: var(--f-serif); font-weight: 900; font-size: 92px; line-height: 1; letter-spacing: .14em; }
.ar__lede { margin-top: 22px; max-width: 25em; font-family: var(--f-serif); font-size: 18px; line-height: 1.9; }
.ar__stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 26px; }
.ar__stats div { display: grid; }
.ar__stats dt { font-size: 13px; color: var(--muted); }
.ar__stats dd { font-family: var(--f-serif); font-weight: 900; font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ar__go { margin-top: 28px; }
.ar__read { min-height: 2.4em; margin-top: 22px; font-family: var(--f-serif); font-size: 20px; }
.ar__ry { font-weight: 900; margin-right: 12px; color: var(--late); }

.slice { position: relative; }
.slice svg { display: block; width: 100%; max-width: 620px; height: auto; margin-inline: auto; overflow: visible; filter: drop-shadow(0 24px 30px rgba(51, 33, 15, .35)); }
.slice__bark { fill: #4A3020; stroke: #2E1D12; stroke-width: 3; }
.slice__cambium { fill: #C49A62; }
.ring__early { fill: url(#ar-wood); }
.ring:nth-child(odd) .ring__early { fill: #E6CB9A; }
.ring__late { fill: none; stroke: var(--late); stroke-opacity: .85; }
.ring { cursor: pointer; outline: none; }
.ring:hover .ring__early, .ring:focus-visible .ring__early { fill: #F7E7C2; }
.ring:hover .ring__late, .ring:focus-visible .ring__late { stroke: #2F6B4F; stroke-opacity: 1; }
.slice__pith { fill: #7A4E2A; }
.slice__check { fill: #3A2414; opacity: .55; }
.slice__yr { font: 600 9px/1 var(--f-ui); fill: rgba(51, 33, 15, .7); pointer-events: none; }
.slice figcaption { margin-top: 10px; text-align: center; font-size: 13.5px; color: var(--muted); }
.slice svg { animation: ar-grow 1.4s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 50%; }
@keyframes ar-grow { from { opacity: 0; transform: scale(.6) rotate(-12deg); } to { opacity: 1; transform: none; } }

.ar__core, .ar__months, .ar__tags { margin-top: 110px; }
.ar h2 { font-family: var(--f-serif); font-weight: 900; font-size: 32px; letter-spacing: .08em; }
.ar__sub { margin-top: 8px; color: var(--muted); }
.core { position: relative; display: flex; height: 46px; margin-top: 26px; border-radius: 23px; overflow: visible; background: linear-gradient(#ECD4A6, #DDBB86); box-shadow: inset 0 0 0 1px rgba(51, 33, 15, .25), 0 10px 18px -10px rgba(51, 33, 15, .45); }
.core i { position: relative; flex-basis: 0; border-right: 2px solid rgba(160, 112, 63, .85); }
.core i:first-child { border-radius: 23px 0 0 23px; background: radial-gradient(circle at 30% 50%, #7A4E2A 0 6px, transparent 7px); }
.core i:last-child { border-right: 0; border-radius: 0 23px 23px 0; background: linear-gradient(90deg, transparent, #4A3020 60%); }
.core b { position: absolute; top: 54px; left: 100%; transform: translateX(-50%); font: 600 12px/1 var(--f-ui); color: var(--muted); }
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 58px; counter-reset: st; }
.stage { position: relative; padding: 24px 24px 22px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 18px 30px -24px rgba(51, 33, 15, .5); }
.stage::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: repeating-linear-gradient(90deg, #E2C493 0 14px, #A0703F 14px 16px); }
.stage__span { font-family: var(--f-serif); font-weight: 900; font-size: 22px; color: var(--late); font-variant-numeric: tabular-nums; }
.stage h3 { margin-top: 4px; font-family: var(--f-serif); font-weight: 900; font-size: 21px; }
.stage__d { margin-top: 10px; font-size: 14.5px; line-height: 1.8; color: #4E3B26; }
.stage ul { display: grid; gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.stage li { font-size: 14px; line-height: 1.6; }
.stage li a { text-decoration: none; }
.stage li a::before { content: "◦ "; color: var(--late); }
.stage li a:hover { color: var(--acc); text-decoration: underline; }

.mgrid { display: grid; gap: 4px; margin-top: 26px; font-variant-numeric: tabular-nums; }
.mgrid__row { display: grid; grid-template-columns: 64px repeat(12, minmax(0, 1fr)) 56px; gap: 4px; align-items: center; }
.mgrid__head span { font-size: 12px; color: var(--muted); text-align: center; }
.mgrid__y { font-family: var(--f-serif); font-weight: 700; font-size: 15px; text-decoration: none; }
.mgrid__y:hover { color: var(--acc); }
.mgrid__c { display: grid; place-items: center; height: 30px; border-radius: 4px; font-size: 11.5px; text-decoration: none; color: transparent; transition: transform .15s, color .15s; }
.mgrid__c:hover, .mgrid__c:focus-visible { transform: scale(1.18); color: #FFFFFF; position: relative; z-index: 1; }
.mgrid__c.l0 { background: rgba(51, 33, 15, .05); }
.mgrid__c.l1 { background: #E6CB9A; } .mgrid__c.l2 { background: #D2A56A; } .mgrid__c.l3 { background: #B07D45; }
.mgrid__c.l4 { background: #84552B; } .mgrid__c.l5 { background: #5A3518; }
.mgrid__c.l1:hover, .mgrid__c.l2:hover { color: var(--ink); }
.mgrid__t { font-size: 13px; color: var(--muted); text-align: right; }
.leaves { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; margin-top: 24px; line-height: 1.3; }
.leaves a { font-family: var(--f-serif); font-weight: 700; text-decoration: none; color: var(--ink); }
.leaves a:nth-child(3n + 1) { color: #4C3A1E; } .leaves a:nth-child(3n + 2) { color: #2F6B4F; } .leaves a:nth-child(3n) { color: #8A5A2B; }
.leaves a:hover { text-decoration: underline; text-underline-offset: 5px; }
.leaves small { margin-left: 3px; font: 400 11px var(--f-ui); color: var(--muted); }
.ar__more { margin-top: 22px; }
.ar__more a { color: var(--acc); }

@container yh (max-width: 980px) {
  .ar__head { grid-template-columns: minmax(0, 1fr); }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container yh (max-width: 760px) {
  .ar__head { padding-top: 32px; gap: 20px; }
  .ar__intro h1 { font-size: 64px; }
  .ar__stats dd { font-size: 26px; }
  .stages { grid-template-columns: minmax(0, 1fr); }
  .core b { font-size: 10px; }
  .core i:nth-child(n) b { display: none; }
  .core i:first-child b, .core i:last-child b { display: block; }
  .mgrid { overflow-x: auto; }
  .mgrid__row { grid-template-columns: 46px repeat(12, 22px) 34px; gap: 3px; }
  .mgrid__c { height: 22px; }
  .ar__core, .ar__months, .ar__tags { margin-top: 70px; }
}

/* =================================================================== 全部文章 · 总目 */
.w-index {
  --bg: #FAF8F2; --paper: #FFFFFF; --ink: #1F1D1A; --muted: #75706A; --line: rgba(31, 29, 26, .13);
  --acc: #A8322A; --acc-ink: #FFFFFF;
  background: #FAF8F2;
}
.w-index .bar { background: rgba(250, 248, 242, .94); }
.w-index .bar__nav .nav__a[aria-current="page"] { border-bottom-color: var(--acc); }
.lg__head { padding: 60px 0 30px; border-bottom: 3px double var(--ink); }
.lg__k a { font-size: 14px; color: var(--muted); }
.lg__head h1 { margin-top: 8px; font-family: var(--f-serif); font-weight: 900; font-size: 64px; line-height: 1.1; letter-spacing: .3em; }
.lg__n { margin-top: 10px; font-family: var(--f-serif); font-size: 17px; color: var(--muted); }
.lg__tools { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 14px 22px; align-items: center; margin-top: 28px; }
.lg__find { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border: 1px solid var(--ink); background: #FFFFFF; }
.lg__find svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.lg__find input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }
.lg__find input:focus { outline: none; }
.lg__find:focus-within { outline: 2px solid var(--acc); outline-offset: 2px; }
.lg__rooms { display: flex; flex-wrap: wrap; gap: 6px; }
.lg__rooms .bdg { cursor: pointer; opacity: .55; transition: opacity .2s, transform .2s; }
.lg__rooms .bdg:hover { opacity: .85; }
.lg__rooms .bdg[aria-pressed="true"] { opacity: 1; transform: translateY(-2px); box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .5); }
.lg__count { grid-column: 1 / -1; min-height: 1.4em; font-size: 14px; color: var(--acc); }
.lg__body { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 40px; margin-top: 34px; }
.lg__years { position: sticky; top: 90px; align-self: start; display: grid; gap: 2px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: none; font-variant-numeric: tabular-nums; }
.lg__years a { padding: 3px 8px; font-family: var(--f-serif); font-size: 14px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.lg__years a:hover { color: var(--ink); }
.lg__years a.is-cur { color: var(--acc); border-left-color: var(--acc); font-weight: 700; }
.lg__years a.is-empty { opacity: .3; pointer-events: none; }
.lg__y { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 30px; padding: 26px 0 30px; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.lg__y[hidden] { display: none; }
.lg__y h2 { position: sticky; top: 84px; align-self: start; display: grid; font-family: var(--f-serif); font-weight: 900; line-height: 1; }
.lg__y h2 span { font-size: 52px; color: var(--acc); letter-spacing: -.01em; }
.lg__y h2 small { margin-top: 8px; font: 400 13px var(--f-ui); color: var(--muted); }
.lg__y ol { display: grid; }
.lg__y li a { display: grid; grid-template-columns: 10px minmax(0, max-content) minmax(16px, 1fr) auto; align-items: baseline; gap: 10px; padding: 6px 0; text-decoration: none; }
.lg__y li a::after { content: ""; grid-column: 3; grid-row: 1; align-self: end; margin-bottom: 7px; border-bottom: 1.5px dotted rgba(31, 29, 26, .3); }
.lg__dot { width: 8px; height: 8px; border-radius: 2px; background: var(--sk-acc); transform: translateY(-1px); }
.lg__dot.sk-phil { background: #A72D27; } .lg__dot.sk-hps { background: #6A2328; } .lg__dot.sk-cult { background: #FFD23F; box-shadow: inset 0 0 0 1px #141414; }
.lg__dot.sk-ai { background: #1F5FE0; } .lg__dot.sk-web3 { background: #1D2B53; } .lg__dot.sk-teach { background: #24453A; } .lg__dot.sk-life { background: #F2B29E; } .lg__dot.sk-site { background: #808080; }
.lg__t { font-family: var(--f-serif); font-size: 16.5px; line-height: 1.6; }
.lg__y li a:hover .lg__t { color: var(--acc); text-decoration: underline; text-underline-offset: 4px; }
.lg__y time { grid-column: 4; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lg__y li[hidden] { display: none; }
.lg__t mark { background: #F7E3A4; color: inherit; }
@container yh (max-width: 900px) {
  .lg__body { grid-template-columns: minmax(0, 1fr); }
  .lg__years { position: static; display: flex; flex-wrap: wrap; max-height: none; gap: 2px 4px; }
  .lg__years a { border-left: 0; padding: 2px 6px; }
  .lg__y { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .lg__y h2 { position: static; display: flex; align-items: baseline; gap: 10px; }
  .lg__y h2 span { font-size: 40px; }
}
@container yh (max-width: 760px) {
  .lg__head { padding-top: 32px; }
  .lg__head h1 { font-size: 44px; letter-spacing: .16em; }
  .lg__tools { grid-template-columns: minmax(0, 1fr); }
  .lg__y li a { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .lg__y li a::after { display: none; }
  .lg__y time { grid-column: 3; }
  .lg__t { font-size: 15.5px; }
}

/* =================================================================== 留言 · 题壁 */
.w-tea {
  --bg: #EFEDE6; --paper: #FBF6EA; --ink: #262321; --muted: #6E6860; --line: rgba(38, 35, 33, .15);
  --acc: #C8553D; --acc-ink: #FFFFFF; --rule: rgba(200, 85, 61, .32);
  background: #EFEDE6 url("../img/tex-plaster.png");
}
.w-tea .bar { background: rgba(239, 237, 230, .93); }
.w-tea .bar__nav .nav__a[aria-current="page"] { border-bottom-color: var(--acc); }
.gb__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 40px; align-items: end; padding-top: 60px; }
.gb__head h1 { grid-row: span 2; font-family: var(--f-brush); font-weight: 400; font-size: 132px; line-height: .85; }
.gb__lede { max-width: 34em; font-family: var(--f-serif); font-size: 18px; line-height: 1.9; }
.gb__count { font-size: 14px; color: var(--muted); }

/* the letter paper */
.gb__write { margin-top: 46px; }
.gb__write .comment-respond {
  position: relative; max-width: 860px; padding: 34px 40px 30px; background: var(--paper);
  box-shadow: 0 30px 50px -36px rgba(60, 40, 20, .6), 0 0 0 1px rgba(38, 35, 33, .08), inset 0 0 0 10px var(--paper), inset 0 0 0 11px var(--rule), inset 0 0 0 13px var(--paper), inset 0 0 0 14px var(--rule);
  transform: rotate(-.4deg);
}
.gb__title { font-family: var(--f-serif); font-weight: 900; font-size: 20px; letter-spacing: .2em; color: var(--acc); }
.gb__title small { margin-left: 12px; font-size: 13px; font-weight: 400; letter-spacing: 0; }
.gb__title small a { color: var(--muted); }
.gb__form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin-top: 14px; }
.gb__form > p { display: grid; gap: 2px; }
.gb__form .comment-form-comment, .gb__form .comment-form-cookies-consent, .gb__form .form-submit, .gb__form .logged-in-as, .gb__form .gb__to { grid-column: 1 / -1; }
.gb__form textarea {
  width: 100%; min-height: 192px; padding: 2px 4px; border: 0; resize: vertical; color: var(--ink); font: 400 18px/32px var(--f-serif);
  background: repeating-linear-gradient(transparent 0 31px, var(--rule) 31px 32px); background-attachment: local;
}
.gb__form textarea:focus { outline: none; }
.gb__form label { font-size: 12.5px; color: var(--muted); }
.gb__form .req { font-size: 12px; }
.gb__form input[type="text"], .gb__form input[type="email"], .gb__form input[type="url"] { width: 100%; height: 38px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.gb__form input:focus { outline: none; border-bottom-color: var(--acc); }
.gb__form .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.gb__form .form-submit { display: flex; justify-content: flex-end; margin-top: 6px; }
.gb__send { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; height: 46px; padding: 0 22px; border: 0; border-radius: 3px; background: var(--acc); color: #FFF4EC; font: 400 20px/1 var(--f-brush); letter-spacing: .1em; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 244, 236, .35); transform: rotate(-2deg); transition: transform .2s; }
.gb__send:hover { transform: rotate(0) scale(1.04); }
.gb__form > .gb__to { display: flex; align-items: center; gap: 12px; font-family: var(--f-serif); font-size: 15px; color: var(--acc); }
.gb__to button { font-size: 13px; color: var(--muted); text-decoration: underline; }

/* the wall */
.gb__wall { columns: 3 300px; column-gap: 30px; margin-top: 70px; scroll-margin-top: 80px; }
.gb__n { --tilt: 0deg; position: relative; display: inline-block; width: 100%; margin: 0 0 34px; padding: 26px 24px 18px; break-inside: avoid; background: #FBF8F1; box-shadow: 0 16px 24px -18px rgba(40, 30, 20, .55), 0 0 0 1px rgba(38, 35, 33, .06); transform: rotate(var(--tilt)); }
.gb__n:nth-child(4n + 2) { background: #F6E4DC; }
.gb__n:nth-child(4n + 3) { background: #EEF1EE; }
.gb__n:nth-child(5n + 4) { background: #F4EAD0; }
.gb__n::before { content: ""; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F08A72, #A83A26); box-shadow: 0 3px 4px rgba(0, 0, 0, .35); }
.gb__n:nth-child(3n)::before { background: radial-gradient(circle at 35% 35%, #F2DDA4, #8C6B32); }
.gb__n header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.gb__n header b { font-family: var(--f-serif); font-weight: 900; font-size: 16px; }
.gb__n time { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gb__au { padding: 0 6px; font-size: 12px; color: #FFF4EC; background: var(--acc); }
.gb__t { margin-top: 8px; font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.gb__t p + p { margin-top: .5em; }
.gb__n.is-short .gb__t { font-family: var(--f-serif); font-size: 19px; line-height: 1.7; }
.gb__re { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--muted); }
.gb__re:hover { color: var(--acc); }
.gb__res { display: grid; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(200, 85, 61, .35); }
.gb__n--re { display: block; margin: 0; padding: 0 0 0 12px; background: none !important; box-shadow: none; transform: none; border-left: 2px solid rgba(38, 35, 33, .15); }
.gb__n--re::before { display: none; }
.gb__n--re.is-au { border-left-color: var(--acc); }
.gb__n--re.is-au .gb__t { color: #9E3B27; font-family: var(--f-serif); }
.gb__n--re header b { font-size: 14px; }
.gb__empty { color: var(--muted); }
@container yh (max-width: 760px) {
  .gb__head { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .gb__head h1 { font-size: 92px; }
  .gb__write .comment-respond { padding: 26px 20px 22px; transform: none; }
  .gb__form { grid-template-columns: minmax(0, 1fr); }
  .gb__wall { columns: 1; margin-top: 44px; }
}

/* =================================================================== 检索 · 卡片目录 */
.w-search {
  --bg: #E8E2D4; --paper: #FCF9F0; --ink: #24211C; --muted: #6D665B; --line: rgba(36, 33, 28, .15);
  --acc: #B5402F; --acc-ink: #FFFFFF; --oak: #A9763F; --rule-red: #D9665A; --rule-blue: rgba(110, 150, 205, .28);
  background: #E8E2D4 url("../img/tex-grain.png");
}
.w-search .bar { background: rgba(232, 226, 212, .94); }
.sr__h { padding: 56px 0 10px; }
.sr__k { font-family: var(--f-mono); font-size: 13px; letter-spacing: .18em; color: var(--muted); }
/* the drawer front with its brass label holder */
.sr__form {
  position: relative; display: flex; align-items: center; gap: 12px; max-width: 760px; margin-top: 14px; padding: 18px 20px;
  background: linear-gradient(#B9844B, #9C6A35); border-radius: 6px;
  box-shadow: inset 0 2px 0 rgba(255, 236, 200, .35), inset 0 -3px 0 rgba(60, 35, 10, .35), 0 20px 30px -20px rgba(60, 35, 10, .6);
}
.sr__form::after { content: ""; position: absolute; left: 50%; bottom: -14px; width: 70px; height: 20px; margin-left: -35px; border-radius: 0 0 35px 35px; background: linear-gradient(#E3C98E, #B08D57); box-shadow: 0 4px 6px rgba(0, 0, 0, .3); }
.sr__form input { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border: 0; font: 400 20px/1 var(--f-serif); color: var(--ink); background: #FCF9F0; box-shadow: inset 0 0 0 3px #D9C08A, inset 0 0 0 4px rgba(90, 60, 20, .4), inset 0 3px 6px rgba(0, 0, 0, .15); }
.sr__form input:focus { outline: none; box-shadow: inset 0 0 0 3px #F2DDA4, inset 0 0 0 4px var(--acc), inset 0 3px 6px rgba(0, 0, 0, .15); }
.sr__form button { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px; border-radius: 4px; background: #2E2216; color: #F2E6CC; font-size: 16px; }
.sr__form button svg { width: 18px; height: 18px; }
.sr__n { margin-top: 30px; font-family: var(--f-serif); font-size: 18px; }
.sr__n b { color: var(--acc); font-variant-numeric: tabular-nums; }
.sr__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 30px 26px; margin-top: 34px; counter-reset: card; }
.sr__card { position: relative; animation: sr-in .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.sr__card:nth-child(2) { animation-delay: .04s; } .sr__card:nth-child(3) { animation-delay: .08s; } .sr__card:nth-child(4) { animation-delay: .12s; }
.sr__card:nth-child(5) { animation-delay: .16s; } .sr__card:nth-child(6) { animation-delay: .2s; } .sr__card:nth-child(n+7) { animation-delay: .24s; }
@keyframes sr-in { from { opacity: 0; transform: translateY(18px) rotate(-1deg); } to { opacity: 1; transform: none; } }
.sr__card > a {
  position: relative; display: grid; align-content: start; gap: 8px; min-height: 230px; padding: 16px 20px 34px; text-decoration: none; color: var(--ink);
  background: var(--paper) repeating-linear-gradient(transparent 0 25px, var(--rule-blue) 25px 26px);
  background-position: 0 48px; box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 16px 24px -18px rgba(60, 40, 20, .55);
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.3), box-shadow .25s;
}
.sr__card > a:hover, .sr__card > a:focus-visible { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 26px 34px -20px rgba(60, 40, 20, .65); }
/* the punched hole for the drawer rod */
.sr__card > a::after { content: ""; position: absolute; left: 50%; bottom: 10px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #E8E2D4; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .35); }
.sr__call { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--rule-red); font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.sr__call b { font-family: var(--f-ui); font-weight: 600; font-size: 12.5px; color: var(--sk-acc); }
.sr__t { font-family: var(--f-serif); font-weight: 900; font-size: 19px; line-height: 1.5; }
.sr__x { font-family: var(--f-serif); font-size: 14.5px; line-height: 26px; color: #4A443A; }
.sr__d { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sr__card mark { padding: 0 2px; background: #F6DE8A; color: inherit; }
.sr__none { margin-top: 30px; padding: 30px; background: var(--paper); box-shadow: 0 16px 24px -18px rgba(60, 40, 20, .55); }
.sr__none p + p, .sr__go { margin-top: 14px; }
.sr__go { display: flex; flex-wrap: wrap; gap: 6px; }
@container yh (max-width: 760px) {
  .sr__h { padding-top: 30px; }
  .sr__form { padding: 12px; }
  .sr__form input { height: 46px; font-size: 17px; }
  .sr__form button { height: 46px; padding: 0 14px; }
  .sr__form button span { display: none; }
  .sr__cards { grid-template-columns: minmax(0, 1fr); }
}

/* =================================================================== house pages: tag, date, combinations, 404, plain pages */
/* a tag: the concept, its neighbours, where to start */
.tx__h { padding: 64px 0 10px; }
.tx__k a { font-size: 14px; color: var(--muted); }
.tx__t { margin-top: 6px; font-family: var(--f-disp); font-weight: 400; font-size: clamp(56px, 8vw, 104px); line-height: 1; letter-spacing: .06em; }
.tx__t::before { content: "#"; margin-right: .12em; color: var(--seal); font-family: var(--f-serif); font-size: .6em; vertical-align: .35em; }
.tx__n { margin-top: 14px; font-size: 15px; color: var(--muted); }
.tx__def { max-width: 36em; margin-top: 22px; padding-left: 18px; border-left: 3px solid var(--seal); font-family: var(--f-serif); font-size: 21px; line-height: 1.85; }
.tx__near { margin-top: 30px; }
.tx__near h2, .tx__col h2 { margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.tx__near .tags a small { margin-left: 6px; font-size: 12px; color: var(--muted); }
.tx__go { margin-top: 28px; }
.tx__read { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-top: 56px; padding: 30px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.tx__col ul { display: grid; gap: 2px; }
.tx__col li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; padding: 8px 0; text-decoration: none; border-bottom: 1px dashed var(--line); }
.tx__col li a span { font-family: var(--f-serif); font-size: 16px; line-height: 1.55; }
.tx__col li a:hover span { color: var(--seal); }
.tx__col li .bdg { grid-row: 2; justify-self: start; transform: scale(.9); transform-origin: left center; }
.tx__col li time { grid-row: 2; font-size: 12.5px; color: var(--muted); }
.tx__col--near p { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.tx__col--near a { font-family: var(--f-disp); font-size: 26px; text-decoration: none; }
.tx__col--near a:hover { color: var(--seal); }
.tx__all { margin-top: 70px; }

/* a year or a month */
.dx__h { padding: 64px 0 10px; }
.dx__k a { font-size: 14px; color: var(--muted); }
.dx__t { margin-top: 6px; font-family: var(--f-disp); font-weight: 400; font-size: clamp(56px, 8vw, 104px); line-height: 1; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.dx__n { margin-top: 12px; color: var(--muted); }
.dx__months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 170px; margin-top: 34px; }
.dx__months li { height: 100%; }
.dx__months a, .dx__months span { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-decoration: none; text-align: center; }
.dx__months i { align-self: end; height: calc(var(--h) * 100%); min-height: 3px; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--acc) 55%, transparent); transition: background-color .2s; }
.dx__months a:hover i, .dx__months .is-cur i { background: var(--seal); }
.dx__months b { margin-top: 6px; font-size: 13px; font-weight: 500; }
.dx__months small { font-size: 12px; color: var(--muted); }
.dx__months span { opacity: .45; }
.dx__yn { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.dx__yn a { padding: 6px 16px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; font-variant-numeric: tabular-nums; }
.dx__yn a:hover { border-color: var(--ink); }
.dx__yn a[rel="prev"]::before { content: "← "; } .dx__yn a[rel="next"]::after { content: " →"; }
.dx__all { margin-top: 56px; }

/* tag combinations */
.ph--combo .ph__t { font-size: clamp(40px, 6vw, 72px); }
.ph--combo + .grid, .cx .grid { margin-top: 40px; }

/* 404: an empty cup */
.nf__in { display: grid; justify-items: center; gap: 16px; padding: 70px 0 20px; text-align: center; }
.nf__cup svg { width: 220px; height: 150px; }
.nf__steam { stroke-dasharray: 40; animation: nf-steam 3s ease-in-out infinite; }
@keyframes nf-steam { 0% { stroke-dashoffset: 40; opacity: 0; } 40% { opacity: 1; } 100% { stroke-dashoffset: -40; opacity: 0; } }
.nf__k { font-family: var(--f-mono); font-size: 14px; letter-spacing: .3em; color: var(--muted); }
.nf__t { font-family: var(--f-disp); font-weight: 400; font-size: clamp(34px, 5vw, 54px); letter-spacing: .06em; }
.nf__lede { max-width: 30em; color: var(--muted); font-size: 16.5px; line-height: 1.8; }
.nf__form { display: flex; gap: 8px; width: min(520px, 100%); margin-top: 8px; }
.nf__form input { flex: 1; min-width: 0; height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: 23px; background: var(--paper); font: inherit; color: var(--ink); }
.nf__in .draw { justify-content: center; margin-top: 18px; text-align: left; }
.nf__rooms { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }

/* ordinary pages */
.pgx { padding-bottom: 20px; }
.ph--page { max-width: 860px; margin-inline: auto; }
.pgx__body { display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; gap: 48px; margin-top: 30px; }
.pgx__body:has(.toc) { grid-template-columns: 200px minmax(0, 760px); }
.pgx__body .toc { position: sticky; top: 100px; align-self: start; }
.pgx .prose { padding: 44px 52px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 24px 40px -30px rgba(0, 0, 0, .35); font-family: var(--f-serif); }
.pgx__cmt { max-width: 860px; margin: 60px auto 0; }

@container yh (max-width: 760px) {
  .tx__h, .dx__h { padding-top: 32px; }
  .tx__def { font-size: 18px; }
  .tx__read { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .dx__months { gap: 3px; height: 120px; }
  .dx__months b { font-size: 11px; }
  .pgx__body, .pgx__body:has(.toc) { grid-template-columns: minmax(0, 1fr); }
  .pgx__body .toc { display: none; }
  .pgx .prose { padding: 24px 18px; }
}
