/* ==========================================================================
   林间 · 林间光
   纸、墨、一束日光。
   - 日光黄只照在「被看见的帮助」上：感谢、帮到了、这周的亮点。
   - 竖排的日期 / 小标题和贯穿的细竖线，是抽象的「林」。
   - 作品封面带来颜色；界面本身只用纸和墨。
   ========================================================================== */

:root {
  color-scheme: light;
  --paper: #f5f2eb;
  --paper-raised: #fbf9f5;
  --paper-sunk: #e9e5dc;
  --ink: #191815;
  --ink-hover: #3a3731;
  --ink-2: #545049;
  --ink-3: #736e65;
  --rule: rgba(25, 24, 21, 0.13);
  --rule-2: rgba(25, 24, 21, 0.28);
  --sun: #ffd23f;
  --sun-ink: #191815;
  --sun-line: #f0b400;
  --sun-soft: #fff1bf;
  --hl: var(--sun);
  --danger: #a3341a;
  --focus-ring: rgba(25, 24, 21, 0.16);

  --t-sand: #e9dcc4;
  --t-rose: #ecd4cc;
  --t-lilac: #e0d8ea;
  --t-fog: #d6dee7;
  --t-mist: #d2e2df;
  --t-sage: #dce2cd;
  --t-clay: #e8ccb6;

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, "SimSun", serif;

  --fs-display: clamp(2.4rem, 1.5rem + 3.6vw, 4.4rem);
  --fs-h1: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  --fs-h2: clamp(1.25rem, 1.12rem + 0.5vw, 1.55rem);

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --topbar-h: 64px;
  --tabbar-h: 60px;
  --pc-indent: 54px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #131210;
    --paper-raised: #1b1a17;
    --paper-sunk: #24221e;
    --ink: #ece7dc;
    --ink-hover: #cfc9bc;
    --ink-2: #b2ab9d;
    --ink-3: #8f897c;
    --rule: rgba(236, 231, 220, 0.12);
    --rule-2: rgba(236, 231, 220, 0.26);
    --sun-line: #ffd23f;
    --sun-soft: rgba(255, 210, 63, 0.13);
    --hl: rgba(255, 210, 63, 0.4);
    --danger: #f2896a;
    --focus-ring: rgba(236, 231, 220, 0.2);

    --t-sand: #3b3326;
    --t-rose: #3f2c28;
    --t-lilac: #332e3d;
    --t-fog: #28303a;
    --t-mist: #233331;
    --t-sage: #2e3427;
    --t-clay: #42301f;
  }
}

/* ---------- 基础 ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; outline: none; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: var(--sun); color: var(--sun-ink); }

:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: fixed; top: 12px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--paper); font-weight: 700; }
.skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boot { padding-top: 64px; color: var(--ink-2); opacity: 0; animation: boot-in 0.3s 3s forwards; }
@keyframes boot-in { to { opacity: 1; } }
.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.page { padding-bottom: 24px; }
.block { margin-top: clamp(48px, 6vw, 80px); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.clamp-3, .clamp-6 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { -webkit-line-clamp: 3; }
.clamp-6 { -webkit-line-clamp: 6; }

.view { animation: view-in 0.32s var(--ease) both; }
.view--still { animation: none; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- 字 ---------- */

.display { font-size: var(--fs-display); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.h1 { font-size: var(--fs-h1); font-weight: 800; line-height: 1.3; letter-spacing: -0.012em; text-wrap: balance; }
.h2 { font-size: var(--fs-h2); font-weight: 800; line-height: 1.3; }
.h3 { font-size: 1.05rem; font-weight: 800; line-height: 1.4; }
.h3-n { margin-left: 8px; font-family: var(--serif); font-weight: 500; color: var(--ink-3); }
.lede { max-width: 36em; margin-top: 16px; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); line-height: 1.8; color: var(--ink-2); text-wrap: pretty; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.kicker a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-2); }
.dateline { margin-bottom: 8px; font-family: var(--serif); font-size: 16px; color: var(--ink-2); }
.fine { margin-top: 12px; font-size: 13px; line-height: 1.65; color: var(--ink-3); }
.k { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-3); white-space: nowrap; }
.dot::before { content: "·"; margin: 0 0.45em; color: var(--ink-3); }
.note { padding: 12px 14px; border: 1px dashed var(--ink-3); font-size: 14px; color: var(--ink-2); }
.plink { font-weight: 700; color: var(--ink); }
.plink:hover { text-decoration: underline; text-underline-offset: 4px; }

.hl {
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-position: 0 90%;
  background-size: 0 0.36em;
  transition: background-size 0.38s var(--ease);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
a:hover .hl, a:focus-visible .hl { background-size: 100% 0.36em; }

/* ---------- 演示横幅与顶栏 ---------- */

.demo-bar { background: var(--ink); color: var(--paper); font-size: 12.5px; }
.demo-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.demo-bar b { letter-spacing: 0.1em; }
.demo-bar .link { color: var(--paper); text-decoration-color: rgba(255, 255, 255, 0.4); }

.topbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1.5px solid var(--ink); }
.topbar-in { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); height: var(--topbar-h); }
.brand { display: flex; flex: none; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; }
.mark-ink { stroke: var(--ink); }
.mark-sun { fill: var(--sun); }
.mark-cut { stroke: var(--paper); }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: 0.1em; }
.topnav { display: flex; height: 100%; }
.topnav a { position: relative; display: flex; align-items: center; padding: 0 14px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--ink); }
.topnav a[aria-current="page"]::after { content: ""; position: absolute; right: 14px; bottom: -1.5px; left: 14px; height: 4px; background: var(--ink); }
.topbar-end { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.week-pill { display: none; }
.me-link { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.me-link[aria-current="page"] .me-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ---------- 按钮、标签、头像 ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--ink); border-radius: 2px;
  background: transparent; color: var(--ink);
  font-size: 15px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn .ico { width: 18px; height: 18px; flex: none; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn--sun { border-color: var(--sun); background: var(--sun); color: var(--sun-ink); }
.btn--sun:hover { background: var(--sun); color: var(--sun-ink); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn--quiet { padding-inline: 8px; border-color: transparent; color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-2); }
.btn--quiet:hover { background: transparent; color: var(--ink); text-decoration-color: var(--ink); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 17px; }
.btn--danger { border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: var(--paper); }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.72; transform: none; box-shadow: none; }
.link { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-2); }
.link:hover { text-decoration-color: var(--ink); }
.icon-btn { display: grid; flex: none; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 2px; background: none; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--paper-sunk); }
.icon-btn .ico { width: 22px; height: 22px; }
.ico.is-filled { fill: currentColor; }

.tag { display: inline-flex; align-items: center; height: 21px; margin-left: 8px; padding: 0 8px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; color: var(--ink-2); white-space: nowrap; vertical-align: 0.1em; }
.tag--role { border-color: var(--ink); color: var(--ink); }
.tag--ink { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.tag--sim { border-style: dashed; border-color: var(--ink-3); font-weight: 500; }
.chip-s { display: inline-flex; padding: 1px 9px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }

.av {
  --tint: var(--t-sand);
  display: inline-grid; flex: none; place-items: center;
  border-radius: 50%; background: var(--tint); color: var(--ink);
  font-weight: 800; line-height: 1;
}
.av--xs { width: 22px; height: 22px; font-size: 11px; }
.av--s { width: 28px; height: 28px; font-size: 13px; }
.av--m { width: 40px; height: 40px; font-size: 17px; }
.av--l { width: 52px; height: 52px; font-size: 21px; }
.av--xl { width: 104px; height: 104px; font-size: 44px; }
.av.is-me { background: var(--ink); color: var(--paper); }
.t-sand { --tint: var(--t-sand); }
.t-rose { --tint: var(--t-rose); }
.t-lilac { --tint: var(--t-lilac); }
.t-fog { --tint: var(--t-fog); }
.t-mist { --tint: var(--t-mist); }
.t-sage { --tint: var(--t-sage); }
.t-clay { --tint: var(--t-clay); }
.t-me { --tint: var(--ink); }
.stack { display: inline-flex; }
.stack .av { box-shadow: 0 0 0 2px var(--paper); }
.stack .av + .av { margin-left: -7px; }

.chip-btn, .chip span {
  display: inline-flex; flex: none; align-items: center; min-height: 38px; padding: 0 15px;
  border: 1.5px solid var(--rule-2); border-radius: 999px;
  background: transparent; color: var(--ink-2);
  font-size: 14.5px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.chip-btn { cursor: pointer; }
.chip-btn:hover, .chip:hover span { border-color: var(--ink); color: var(--ink); }
.chip-btn.is-on, .chip input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* ---------- 通用区块与状态 ---------- */

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); }
.sec-note { margin-left: 12px; font-family: var(--serif); font-size: 0.8em; font-weight: 500; color: var(--ink-3); }
.sec-lede { max-width: 44em; margin-top: 14px; font-size: 15px; color: var(--ink-2); }
.more { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.more .ico { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.more:hover .ico { transform: translateX(3px); }
.backlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 8px 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.backlink:hover { color: var(--ink); }
.backlink .ico { width: 16px; height: 16px; }
.page-head { padding-top: clamp(28px, 5vw, 56px); }

.empty { padding: 28px 0; }
.empty-t { font-size: 18px; font-weight: 800; }
.empty-b { margin-top: 6px; color: var(--ink-2); }
.empty .btn { margin-top: 18px; }
.state-error { max-width: 36em; padding: 56px 0; }
.state-error > p { margin: 12px 0 24px; color: var(--ink-2); }

.skeleton { padding-top: 48px; }
.sk { display: block; width: 80%; height: 18px; margin-top: 14px; background: var(--paper-sunk); animation: pulse 1.1s ease-in-out infinite alternate; }
.sk--s { width: 28%; }
.sk--m { width: 58%; }
.sk--xl { width: 52%; height: 56px; margin-top: 16px; }
.sk--block { width: 100%; height: 120px; margin: 32px 0 20px; }
@keyframes pulse { to { opacity: 0.45; } }

/* ---------- 林子（首页） ---------- */

.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: clamp(40px, 5vw, 72px); }
.feed-main { min-width: 0; max-width: 740px; }
.feed-side { display: flex; flex-direction: column; gap: 40px; padding-top: 40px; }
.feed-head { padding-top: 32px; }

.intro { margin-top: 28px; padding: 24px 26px; border: 1.5px solid var(--ink); background: var(--paper-raised); }
.intro-k { display: inline-block; margin-bottom: 10px; padding: 1px 9px; border: 1px dashed var(--ink-3); border-radius: 999px; font-size: 12px; color: var(--ink-2); }
.intro-t { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem); font-weight: 800; line-height: 1.4; }
.intro-b { max-width: 36em; margin: 8px 0 18px; color: var(--ink-2); }

.composer-bar { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding: 10px 12px; border: 1.5px solid var(--ink); background: var(--paper-raised); }
.composer-open { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; min-height: 40px; padding: 0; border: 0; background: none; font-size: 15.5px; color: var(--ink-3); text-align: left; cursor: text; }
.composer-open span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-types { display: flex; gap: 6px; }
.composer-types .chip-btn { min-height: 34px; padding: 0 12px; font-size: 13.5px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filters--scroll { flex-wrap: nowrap; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; }
.filters--scroll::-webkit-scrollbar { display: none; }
.filters-sep { flex: none; align-self: center; width: 1.5px; height: 22px; margin: 0 4px; background: var(--rule-2); }

.feed { margin-top: 28px; }
.day { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 20px; }
.day + .day { margin-top: 12px; }
.day-label { align-self: stretch; padding: 22px 10px 0 0; border-right: 1.5px solid var(--ink); writing-mode: vertical-rl; font-size: 15px; font-weight: 800; letter-spacing: 0.35em; line-height: 1; }
.day-items { min-width: 0; }
.day-items > li + li { border-top: 1px solid var(--rule); }

/* 动态卡片 */
.pc { padding: 22px 0; }
.pc-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.pc-name { display: flex; flex-wrap: wrap; align-items: center; font-size: 15.5px; line-height: 1.4; }
.pc-meta { margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.pc-meta a:hover { color: var(--ink); text-decoration: underline; }
.pc-type { align-self: start; padding: 2px 9px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.pc-type--ask { border-color: var(--ink); color: var(--ink); }
.pc-type--work { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.pc-body { display: block; margin: 12px 0 0 var(--pc-indent); }
.pc-cover { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1.5px solid var(--ink); transition: transform 0.28s var(--ease); }
.pc-cover .art { width: 100%; height: 100%; }
.pc-body:hover .pc-cover { transform: translateY(-3px); }
.pc-title { display: block; margin-top: 14px; font-size: 19px; font-weight: 800; line-height: 1.4; }
.pc-text { margin-top: 6px; font-size: 15.5px; line-height: 1.75; color: var(--ink-2); }
.pc-q { display: block; font-size: clamp(1.12rem, 1.04rem + 0.4vw, 1.3rem); font-weight: 750; line-height: 1.55; text-wrap: pretty; }
.pc-body:hover .pc-q, .pc-body:hover .pc-title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-color: var(--rule-2); }
.pc-tried { display: block; margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }
.pc-tried .k { margin-right: 10px; }
.pc-share { font-size: 16.5px; line-height: 1.85; }
.pc-event { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; }
.pc-event .ico { width: 16px; height: 16px; }
.status { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.status .ico { width: 15px; height: 15px; }
.status--done { padding: 2px 10px 2px 7px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.status--open { padding: 1px 10px; border: 1.5px dashed var(--ink); border-radius: 999px; color: var(--ink); }

.pc-replies { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0 var(--pc-indent); }
.pc-replies li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--paper-raised); }
.pc-replies .av { margin-top: 1px; }
.pc-replies p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.pc-replies b { margin-right: 8px; color: var(--ink); }
.pc-replies li.is-thanked { box-shadow: inset 4px 0 0 var(--sun-line); background: var(--sun-soft); }
.helped { display: inline-block; margin-right: 8px; padding: 0 6px; background: var(--sun); color: var(--sun-ink); font-size: 12px; font-weight: 800; line-height: 1.6; }

.pc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 12px 0 0 calc(var(--pc-indent) - 10px); }
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: none; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.act:hover { background: var(--paper-sunk); color: var(--ink); }
.act .ico { width: 18px; height: 18px; }
.act-n { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.act.is-on { background: var(--sun-soft); color: var(--ink); }
.act.is-on .ico { color: var(--sun-line); }
.act--static { cursor: default; }
.act--static:hover { background: none; color: var(--ink-2); }
.pc-foot .stack { margin-left: auto; }

/* 动态流里的其他条目 */
.fi--thanks, .fi--note { padding: 18px 0; }
.thx { padding: 2px 0 2px 16px; border-left: 4px solid var(--sun-line); }
.thx-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 15px; }
.thx-verb { color: var(--ink-2); }
.thx-note { margin-top: 8px; font-family: var(--serif); font-size: 17px; line-height: 1.7; }
.thx-note::before { content: "「"; }
.thx-note::after { content: "」"; }
.thx-src { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.thx-src:hover { color: var(--ink); text-decoration: underline; }
.fi--note { display: flex; align-items: center; gap: 12px; }
.fi--note p { flex: 1; min-width: 0; font-size: 14.5px; color: var(--ink-2); }
.fi--note .plink { margin-right: 4px; }
.fi-sub { display: block; font-size: 13px; color: var(--ink-3); }
.fi-ico { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 50%; }
.fi-ico .ico { width: 15px; height: 15px; }
.fi-case { margin-left: 4px; font-weight: 700; color: var(--ink); }
.fi-case:hover { text-decoration: underline; }
.fi-act { flex: none; padding: 4px 12px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 700; }
.fi-act:hover { background: var(--ink); color: var(--paper); }

/* 侧栏 */
.side-sec .h3 { padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.weekcard { display: flex; flex-direction: column; gap: 2px; padding: 24px 24px 20px; background: var(--ink); color: var(--paper); }
.weekcard-k { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; color: var(--sun); }
.weekcard-big { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.weekcard-big b { font-family: var(--serif); font-size: 64px; font-weight: 600; line-height: 1; color: var(--sun); }
.weekcard-big span { font-family: var(--serif); font-size: 24px; opacity: 0.75; }
.weekcard-sub { font-size: 15px; font-weight: 600; }
.weekcard-row { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 13px; opacity: 0.9; }
.weekcard-row b { margin-right: 4px; font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--sun); }
.weekcard-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; font-weight: 700; }
.weekcard-go .ico { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.weekcard:hover .weekcard-go .ico { transform: translateX(4px); }
@media (prefers-color-scheme: dark) {
  .weekcard { background: var(--paper-raised); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule-2); }
  .weekcard-row { border-top-color: var(--rule-2); }
}

.askminis > li { border-bottom: 1px solid var(--rule); }
.askmini { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; }
.askmini-q { font-size: 15.5px; font-weight: 700; line-height: 1.55; }
.askmini-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.askmini-go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; }
.askmini-go .ico { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.askmini:hover .askmini-go .ico { transform: translateX(3px); }
.newcomers { margin-top: 6px; }
.newcomer { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.newcomer b { display: block; font-size: 15px; }
.newcomer-sub { display: block; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.newcomer:hover b { text-decoration: underline; }

.strip { display: none; }

/* ---------- 活动 ---------- */

.event { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 2px 14px; padding: 16px 0; border-top: 1px solid var(--rule); }
.events--compact .event:first-child { border-top: 0; }
.event-date { display: flex; flex-direction: column; align-items: center; }
.event-day { font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 0.95; font-variant-numeric: lining-nums; }
.event-mon { margin-top: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.event-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.event-when { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }
.event-when .dot::before, .event-when { color: var(--ink); }
.event-title { margin-top: 2px; font-size: 16px; font-weight: 750; line-height: 1.45; }
.event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.event-meta .av { margin-right: 6px; }
.event-about { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.going { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; margin-top: 10px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.going .ico { width: 15px; height: 15px; }
.going-n { margin-left: 2px; font-weight: 500; color: var(--ink-3); }
.going:hover { background: var(--paper-sunk); }
.going.is-on { background: var(--ink); color: var(--paper); }
.going.is-on .going-n { color: inherit; opacity: 0.7; }
.events--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin-top: 8px; }

/* ---------- 这周的林子 ---------- */

.week-hero { padding-top: clamp(32px, 5vw, 64px); }
.week-title { max-width: 17em; font-size: clamp(2rem, 1.15rem + 3.4vw, 4rem); font-weight: 800; line-height: 1.28; letter-spacing: -0.02em; text-wrap: balance; }
.sun { padding: 0 0.14em; background: var(--sun); color: var(--sun-ink); font-family: var(--serif); font-weight: 600; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.view:not(.view--still) .week-title .sun { animation: sun-in 0.8s 0.15s var(--ease) both; }
@keyframes sun-in { from { background-size: 0 100%; } to { background-size: 100% 100%; } }
.week-title .sun { background: linear-gradient(var(--sun), var(--sun)) no-repeat 0 0 / 100% 100%; }
.week-hero .lede b { color: var(--ink); }
.week-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 40px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 20px 16px 20px 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.stat-n { font-family: var(--serif); font-size: clamp(2rem, 1.6rem + 1.4vw, 3rem); font-weight: 600; line-height: 1; font-variant-numeric: lining-nums; }
.stat-l { font-size: 13.5px; color: var(--ink-2); }

.legend-sun { display: inline-block; width: 22px; height: 5px; margin: 0 6px 0 10px; background: var(--sun-line); vertical-align: middle; }
.graph { margin-top: 20px; }
.g { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto; }
.g-edge { fill: none; stroke: var(--ink); stroke-opacity: 0.16; }
.g-edge--lit { stroke: var(--sun-line); stroke-opacity: 1; stroke-width: 3.2; }
.g-node circle { fill: var(--tint); stroke: var(--paper); stroke-width: 3; transition: stroke 0.15s; }
.g-node.is-me circle { fill: var(--ink); }
.g-node:hover circle, .g-node:focus-visible circle { stroke: var(--ink); }
.g-node:focus { outline: none; }
.g-initial { fill: var(--ink); font: 800 15px var(--sans); }
.g-node.is-me .g-initial { fill: var(--paper); }
.g-name { fill: var(--ink-2); font: 600 13px var(--sans); }
.g-group { fill: var(--ink-3); font: 800 13px var(--sans); letter-spacing: 0.2em; paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round; }
.graph figcaption { max-width: 32em; margin: 12px auto 0; font-family: var(--serif); font-size: 16px; text-align: center; color: var(--ink-2); }

.thx-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 48px; margin-top: 24px; }
.week-pair, .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 64px); }
.firsts > li, .welcomes > li { border-bottom: 1px solid var(--rule); }
.first { display: flex; align-items: flex-start; gap: 16px; padding: 20px 0; }
.first-name { font-size: 17px; }
.first-sub { display: block; font-size: 13px; color: var(--ink-3); }
.first-note { margin-top: 10px; padding: 8px 12px; background: var(--sun-soft); font-family: var(--serif); font-size: 15.5px; line-height: 1.65; }
.first-note b { font-family: var(--sans); font-size: 13px; }
.welcome { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 0; }
.welcome-sub { margin-left: 8px; font-size: 13px; color: var(--ink-3); }
.welcome-by { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
a.welcome-by:hover { color: var(--ink); text-decoration: underline; }
.welcome-by.is-none { color: var(--ink-3); }
.hosts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 8px; }
.host { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.host-who { display: flex; align-items: center; gap: 12px; }
.host-who b { font-size: 17px; }
.host-group { display: block; font-size: 13px; color: var(--ink-3); }
.host-who:hover b { text-decoration: underline; }
.host-did { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0 52px; font-size: 14.5px; color: var(--ink-2); }
.host-did a { font-weight: 700; color: var(--ink); }
.host-n { margin-left: 8px; font-size: 12.5px; color: var(--ink-3); }
.week-foot { margin-top: 56px; font-size: 13px; color: var(--ink-3); }

/* ---------- 一条动态 ---------- */

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: clamp(40px, 6vw, 80px); }
.post-col { min-width: 0; max-width: 740px; }
.post-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 18px; }
.post-name { display: flex; flex-wrap: wrap; align-items: center; font-size: 17px; }
.post-cover { margin-top: 24px; aspect-ratio: 16 / 10; overflow: hidden; border: 1.5px solid var(--ink); }
.post-cover .art { width: 100%; height: 100%; }
.post-title { margin-top: 22px; }
.post-text { margin-top: 12px; font-size: 17.5px; line-height: 1.85; }
.post-q { margin-top: 26px; font-size: clamp(1.55rem, 1.25rem + 1.2vw, 2.25rem); font-weight: 800; line-height: 1.42; letter-spacing: -0.01em; text-wrap: pretty; overflow-wrap: anywhere; }
.post-tried { margin-top: 16px; font-size: 16px; color: var(--ink-2); }
.post-tried .k { margin-right: 12px; }
.post-share { margin-top: 24px; font-family: var(--serif); font-size: clamp(1.15rem, 1.08rem + 0.3vw, 1.3rem); line-height: 1.9; }
.post-col .pc-event { margin-top: 24px; }
.extlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-2); overflow-wrap: anywhere; }
.extlink .ico { flex: none; width: 16px; height: 16px; }
.post-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 24px; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.post-acts .status { margin-top: 0; }

.replies { margin-top: 36px; }
.replies-h { display: flex; align-items: baseline; gap: 10px; font-size: 1.3rem; font-weight: 800; }
.replies-n { font-family: var(--serif); font-weight: 500; color: var(--ink-3); }
.hint { margin-top: 12px; padding: 10px 14px; background: var(--sun-soft); font-size: 14px; }
.replies-none { margin-top: 12px; color: var(--ink-3); }
.reply { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 16px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.reply-main { min-width: 0; }
.reply-by { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; min-height: 40px; font-size: 15px; color: var(--ink-3); }
.reply-by .tag { margin-left: 8px; }
.reply-text { margin-top: 4px; font-size: 16.5px; line-height: 1.8; }
.reply .btn { margin-top: 12px; }
.reply [data-act="thank"]:hover { border-color: var(--sun); background: var(--sun); color: var(--sun-ink); }
.reply-undo { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.helped-box { margin-top: 14px; padding: 10px 14px; border-left: 4px solid var(--sun-line); background: var(--sun-soft); }
.helped-k { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 800; }
.helped-k .ico { width: 16px; height: 16px; }
.helped-note { margin-top: 4px; font-family: var(--serif); font-size: 16.5px; line-height: 1.65; }
.helped-note::before { content: "「"; }
.helped-note::after { content: "」"; }
.is-flash .helped-box { animation: glow 0.9s var(--ease) both; }
@keyframes glow { from { opacity: 0; transform: translateX(-8px); border-left-color: transparent; } }
.typing { display: flex; align-items: center; gap: 12px; padding: 18px 0; font-size: 14px; color: var(--ink-2); }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: bob 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bob { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.reply-form { margin-top: 28px; gap: 18px; }
.feed-more { display: flex; justify-content: center; margin-top: 28px; }

.post-side { display: flex; flex-direction: column; gap: 40px; padding-top: 72px; }
.whocard { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.whocard b { font-size: 16px; }
.whocard-sub { display: block; font-size: 13px; color: var(--ink-3); }
.whocard:hover b { text-decoration: underline; }
.whocard-line { display: flex; gap: 10px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.whocard-line .k { padding-top: 2px; }

/* ---------- 小组 ---------- */

.grows { margin-top: 40px; border-top: 1.5px solid var(--ink); }
.grows > li { border-bottom: 1px solid var(--rule); }
.grow { display: grid; grid-template-columns: 72px minmax(0, 1.2fr) minmax(0, 1fr) 36px; align-items: center; gap: 16px clamp(16px, 3vw, 40px); padding: clamp(24px, 3.5vw, 36px) 0; }
.grow-no { align-self: start; padding-top: 0.35em; font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--ink-3); }
.grow-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.grow-name { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; }
.grow-name .hl { background-size: 0 0.28em; }
.grow:hover .grow-name .hl, .grow:focus-visible .grow-name .hl { background-size: 100% 0.28em; }
.grow-tag { font-size: 16px; color: var(--ink-2); }
.grow-side { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.grow-people { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.grow-line .k { margin-right: 10px; }
.grow-go .ico { width: 30px; height: 30px; transition: transform 0.25s var(--ease); }
.grow:hover .grow-go .ico { transform: translateX(6px); }

.group-head { padding-top: 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 24px; font-size: 14px; color: var(--ink-2); }
.facts li { display: flex; align-items: center; gap: 8px; }
.group-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.group-cta .fine { max-width: 26em; margin: 0; }
.joined-note { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14.5px; color: var(--ink-2); }
.joined-note .ico { width: 16px; height: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(40px, 5vw, 72px); }
.split-main { min-width: 0; max-width: 760px; }
.split-main .h2 { padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); }
.feed--group { margin-top: 8px; }
.split-side { display: flex; flex-direction: column; gap: 40px; padding-top: clamp(48px, 6vw, 80px); }
.round { padding: 22px; border: 1.5px solid var(--ink); }
.round-title { margin: 6px 0 10px; font-size: 1.3rem; font-weight: 800; line-height: 1.35; }
.round p:last-child { font-size: 15px; color: var(--ink-2); }
.roster { margin-top: 6px; }
.roster-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.roster-row > span { min-width: 0; }
.roster-row b { font-size: 15px; }
.roster-sub { display: block; overflow: hidden; font-size: 12.5px; color: var(--ink-3); text-overflow: ellipsis; white-space: nowrap; }
.roster-row:hover b { text-decoration: underline; }

/* ---------- 人 ---------- */

.search { position: relative; max-width: 760px; margin-top: 32px; }
.search .ico { position: absolute; top: 50%; left: 0; width: 26px; height: 26px; color: var(--ink-2); transform: translateY(-50%); pointer-events: none; }
.search input[type="search"] { padding: 14px 0 14px 40px; border-width: 0 0 2px; border-color: var(--ink); border-radius: 0; background: transparent; font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem); font-weight: 700; }
.search input[type="search"]:focus { box-shadow: 0 2px 0 var(--ink); }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; font-size: 14.5px; }
.result-count { margin-top: 28px; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); font-size: 13px; font-weight: 700; color: var(--ink-3); }
#people-results, #lib-results { transition: opacity 0.2s; }
#people-results[aria-busy="true"], #lib-results[aria-busy="true"] { opacity: 0.45; }
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.people-grid > li { border-bottom: 1px solid var(--rule); }
.person { display: flex; align-items: flex-start; gap: 16px; padding: 22px 0; }
.person-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.person-name { display: flex; flex-wrap: wrap; align-items: center; }
.person-name strong { font-size: 18px; }
.person-groups { font-size: 13px; color: var(--ink-3); }
.person-doing { font-size: 15px; line-height: 1.55; }
.person-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.person-stats { margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
.person:hover strong { text-decoration: underline; text-underline-offset: 4px; }

.person-hero { display: flex; align-items: flex-start; gap: clamp(20px, 3vw, 36px); padding-top: clamp(20px, 3vw, 36px); }
.person-hero-main { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.person-hero-main .kicker { margin-bottom: 0; }
.person-hero-main .kicker .tag { margin-left: -4px; }
.person-hero-line { display: flex; align-items: baseline; gap: 12px; font-size: 16.5px; }
.person-hero-line .k { min-width: 2.5em; }
.person-hero-stats { font-size: 15px; color: var(--ink-2); }
.person-hero-stats b { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ink); }
.person-hero .row { margin-top: 8px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; margin-top: 22px; }
.tile { display: block; }
.tile:hover .pc-cover { transform: translateY(-3px); }
.tile-title { display: block; margin-top: 10px; font-size: 15px; font-weight: 700; line-height: 1.45; }
.tile-meta { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.minis { margin-top: 4px; }
.minis > li { border-bottom: 1px solid var(--rule); }
.mini { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 4px 14px; padding: 16px 0; }
.mini .pc-type { margin-top: 2px; }
.mini-text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 16px; font-weight: 600; line-height: 1.55; }
.mini-meta { grid-column: 2; font-size: 13px; color: var(--ink-3); }
.mini:hover .mini-text { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 经验库 ---------- */

.cases > li { border-bottom: 1px solid var(--rule); }
.case-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; align-items: start; gap: 0 16px; padding: 24px 0; }
.case-no { padding-top: 2px; font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--ink-3); font-variant-numeric: lining-nums; }
.case-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.case-title { font-size: clamp(1.15rem, 1.04rem + 0.5vw, 1.45rem); font-weight: 800; line-height: 1.4; }
.case-sit { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.case-meta .av { margin-right: 6px; }
.case-saved { display: inline-flex; align-items: center; gap: 4px; margin-left: 14px; font-weight: 700; color: var(--ink); }
.case-saved .ico { width: 14px; height: 14px; }
.case-go { padding-top: 6px; }
.case-go .ico { width: 22px; height: 22px; transition: transform 0.2s var(--ease); }
.case-row:hover .case-go .ico { transform: translateX(4px); }
.cases--compact .case-row { grid-template-columns: 30px minmax(0, 1fr); padding: 16px 0; }
.cases--compact .case-no { font-size: 18px; }
.cases--compact .case-title { font-size: 16px; }
.cases--compact .case-sit { font-size: 14px; }
.cases--compact .case-go { display: none; }

.case-article > * { max-width: 50rem; }
.case-article .h1 { overflow-wrap: anywhere; }
.case-head { padding: 16px 0 30px; border-bottom: 1.5px solid var(--ink); }
.case-sec { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 16px; padding: 30px 0; border-bottom: 1px solid var(--rule); }
.case-k { padding-top: 7px; font-size: 14px; font-weight: 800; letter-spacing: 0.12em; }
.case-situation { font-family: var(--serif); font-size: clamp(1.2rem, 1.08rem + 0.5vw, 1.45rem); line-height: 1.7; }
.prose { font-family: var(--serif); font-size: clamp(1.06rem, 1rem + 0.25vw, 1.18rem); line-height: 1.95; }
.prose > * + * { margin-top: 1em; }
.steps { counter-reset: step; }
.steps li { position: relative; padding-left: 2.2em; counter-increment: step; }
.steps li + li { margin-top: 0.7em; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; font-weight: 700; color: var(--ink); }
.prose-s { font-size: 16px; color: var(--ink-2); }
.case-foot { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 30px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.byline .av { margin-right: 8px; }

/* ---------- 我 ---------- */

.goals { margin-top: 4px; }
.goal-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; grid-template-areas: "group text btn" "group meta btn"; align-items: start; gap: 6px 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.goal-group { grid-area: group; font-size: 18px; font-weight: 800; }
.goal-group:hover { text-decoration: underline; text-underline-offset: 4px; }
.goal-text { grid-area: text; font-family: var(--serif); font-size: 1.15rem; line-height: 1.65; }
.goal-meta { grid-area: meta; font-size: 13px; color: var(--ink-3); }
.goal-row .btn { grid-area: btn; }
.pair .sec-head + .fine { margin-top: 16px; }
.local-data { padding: 24px; border: 1px dashed var(--ink-3); }
.local-data p { margin: 8px 0 16px; font-size: 15px; color: var(--ink-2); }

/* ---------- 表单 ---------- */

.form { display: flex; flex-direction: column; gap: 24px; }
.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field-label { display: block; margin-bottom: 8px; padding: 0; font-size: 15.5px; font-weight: 800; }
.field-opt { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.field-hint { margin: -2px 0 10px; font-size: 13.5px; color: var(--ink-3); }
input[type="text"], input[type="url"], input[type="search"], textarea {
  display: block; width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--rule-2); border-radius: 2px;
  background: var(--paper-raised); color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.65;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 88px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 0.8; }
input:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--focus-ring); }
[aria-invalid="true"], [aria-invalid="true"]:hover { border-color: var(--danger); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; }
.field-err { margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--danger); }
.field-err:empty { display: none; }
.field-count { margin: 6px 0 0 auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.field-count.is-over { font-weight: 800; color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip input:focus-visible + span { outline: 2.5px solid var(--ink); outline-offset: 3px; }
.has-error .chip span { border-color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.form-status { font-size: 14px; color: var(--ink-2); }
.form-status[data-tone="error"] { font-weight: 700; color: var(--danger); }
.form-status:empty { display: none; }

.composer .only-work, .composer .only-ask { display: none; }
.composer[data-type="work"] .only-work, .composer[data-type="ask"] .only-ask { display: block; }
.join-note[hidden] { display: none; }
.quote-reply { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-left: 3px solid var(--rule-2); background: var(--paper-raised); font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }

/* ---------- 对话框与提示 ---------- */

#dialog {
  width: min(580px, calc(100vw - 32px));
  max-width: none;
  max-height: min(88vh, 900px);
  padding: 0;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}
#dialog[open] { display: flex; animation: dlg-in 0.24s var(--ease); }
#dialog::backdrop { background: rgba(19, 18, 16, 0.5); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(12px); } }
.dlg { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 20px 0 24px; }
.dlg-title { font-size: 1.45rem; font-weight: 800; line-height: 1.3; }
.dlg-sub { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.dlg-body { min-height: 0; padding: 20px 24px 26px; overflow: auto; }
.dlg-body .form { gap: 20px; }
.about > p + p { margin-top: 12px; }
.about > p { color: var(--ink-2); }
.about strong { color: var(--ink); }
.switch { display: flex; align-items: flex-start; gap: 12px; margin: 22px 0 20px; padding: 14px; border: 1px dashed var(--ink-3); cursor: pointer; }
.switch input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ink); }
.switch span { font-weight: 700; }
.switch small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-3); }

.toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 60;
  max-width: calc(100vw - 32px); padding: 12px 18px;
  border-radius: 2px; background: var(--ink); color: var(--paper);
  font-size: 15px; font-weight: 700; line-height: 1.5;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.28s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast[data-tone="error"] { background: var(--danger); color: #fff; }

/* ---------- 页脚与手机底栏 ---------- */

.site-foot { margin-top: clamp(72px, 9vw, 120px); padding: 22px 0 36px; border-top: 1.5px solid var(--ink); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; font-size: 13px; color: var(--ink-2); }
.tabbar { display: none; }

/* ---------- 平板 ---------- */

@media (max-width: 1079px) {
  .topnav a { padding: 0 10px; }
  .feed-layout, .split { grid-template-columns: minmax(0, 1fr) 280px; }
  .post-layout { grid-template-columns: minmax(0, 1fr) 240px; }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grow { grid-template-columns: 56px minmax(0, 1fr) 30px; }
  .grow-side { grid-column: 2; grid-row: 2; }
  .grow-go { grid-column: 3; grid-row: 1; }
}

@media (max-width: 899px) {
  .feed-layout, .split, .post-layout { grid-template-columns: minmax(0, 1fr); }
  .feed-side { display: none; }
  .strip {
    display: grid; grid-auto-columns: minmax(230px, 62%); grid-auto-flow: column; gap: 12px;
    margin: 20px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .strip::-webkit-scrollbar { display: none; }
  .strip > * { scroll-snap-align: start; }
  .weekcard--compact { padding: 16px 18px; }
  .weekcard--compact .weekcard-big { margin-top: 6px; }
  .weekcard--compact .weekcard-big b { font-size: 44px; }
  .weekcard--compact .weekcard-big span { font-size: 18px; }
  .weekcard--compact .weekcard-sub { font-size: 13.5px; }
  .weekcard--compact .weekcard-go { margin-top: 8px; font-size: 13px; }
  .stripcard { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1.5px solid var(--ink); background: var(--paper-raised); }
  .stripcard-k { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: var(--ink-3); }
  .stripcard-t { flex: 1; font-size: 15.5px; font-weight: 700; line-height: 1.5; }
  .stripcard-m { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
  .split-side { padding-top: 48px; }
  .post-side { padding-top: 48px; }
  .thx-list, .hosts { grid-template-columns: 1fr; }
}

/* ---------- 手机 ---------- */

@media (max-width: 759px) {
  :root { --topbar-h: 54px; --pc-indent: 0px; }
  .topnav, .new-btn, .me-name { display: none; }
  .topbar-end { gap: 12px; }
  .brand-name { font-size: 20px; }
  .week-pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 13.5px; font-weight: 700; }
  .week-pill[aria-current="page"] { background: var(--ink); color: var(--paper); }
  .me-link .av { width: 32px; height: 32px; font-size: 14px; }
  .demo-bar { font-size: 12px; }

  .tabbar {
    position: fixed; right: 0; bottom: 0; left: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1.5px solid var(--ink);
    background: var(--paper);
  }
  .tabbar a, .tab-new { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; background: none; font-size: 11px; font-weight: 700; color: var(--ink-3); cursor: pointer; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: -1.5px; width: 28px; height: 4px; background: var(--ink); }
  .tabbar .ico { width: 24px; height: 24px; }
  .tab-new { color: var(--ink); }
  .tab-new-btn { display: grid; place-items: center; width: 46px; height: 30px; border-radius: 2px; background: var(--ink); color: var(--paper); }
  .tab-new-btn .ico { width: 20px; height: 20px; }
  .site-foot { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px); }
  .toast { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); }

  .intro { margin: 0 calc(var(--gutter) * -1); border-width: 0 0 1.5px; }
  .feed-head { padding-top: 24px; }
  .composer-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .composer-types { justify-content: flex-start; }
  .filters--scroll { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }

  .day { display: block; }
  .day + .day { margin-top: 0; }
  .day-label { position: sticky; top: var(--topbar-h); z-index: 3; padding: 10px 0; border-right: 0; border-bottom: 1.5px solid var(--ink); background: var(--paper); writing-mode: horizontal-tb; font-size: 14px; letter-spacing: 0.24em; }
  .pc-body { margin-top: 14px; }
  .pc-foot { margin-left: -10px; }
  .pc-foot .stack { display: none; }

  .week-title { font-size: clamp(1.9rem, 1.2rem + 3.4vw, 2.6rem); }
  .week-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; }
  .stat { padding: 16px 8px 16px 0; }
  .stat-n { font-size: 2rem; }
  .stat-l { font-size: 12.5px; }
  .week-pair, .pair, .events--grid, .tiles { grid-template-columns: 1fr; }
  .g { margin-inline: -8px; width: calc(100% + 16px); }
  .g-name { font-size: 15px; }
  .host-did { margin-left: 0; }
  .welcome { grid-template-columns: auto minmax(0, 1fr); }
  .welcome-by { grid-column: 2; }

  .post-head .pc-type { display: none; }
  .reply { grid-template-columns: 32px minmax(0, 1fr); gap: 0 12px; }
  .reply .av--m { width: 32px; height: 32px; font-size: 14px; }
  .reply-by { min-height: 32px; }

  .grow { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  .grow-no { font-size: 22px; }
  .grow-go { display: none; }
  .grow-side { grid-column: 1 / -1; grid-row: auto; padding-left: 52px; }

  .people-grid { grid-template-columns: 1fr; }
  .person-hero { flex-direction: column; }
  .av--xl { width: 76px; height: 76px; font-size: 32px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }

  .case-row { grid-template-columns: 38px minmax(0, 1fr); padding: 20px 0; }
  .case-no { font-size: 22px; }
  .case-go { display: none; }
  .case-sec { display: block; padding: 24px 0; }
  .case-k { margin-bottom: 8px; padding-top: 0; }
  .goal-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "group btn" "text text" "meta meta"; }

  #dialog { width: 100%; max-height: 92vh; margin: auto 0 0; border-width: 1.5px 0 0; border-radius: 0; box-shadow: none; }
  #dialog[open] { animation: sheet-in 0.3s var(--ease); }
  .dlg-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(40px); } }
}

@media (max-width: 380px) {
  .composer-types .chip-btn { padding: 0 10px; }
  .btn--lg { padding: 0 18px; }
}

/* ---------- 动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
