/* Frisk 个人基站
   一条规矩:线就是地面。所有横线上都可能站着 Clawd。
   颜色、字号、间距都收在 :root,改这里就是改全站。 */

:root {
  --bg: #f6f1e7;
  --bg-2: #efe8da;
  --card: #fbf8f1;
  --ink: #211d19;
  --ink-2: #5a534a;
  --ink-3: #6f685d;
  --line: #ddd3c1;
  --line-strong: #c4b8a2;
  --accent: #c15f3c;
  --accent-ink: #a34a29;
  --ok: #2a7260;
  --warn: #875c1a;
  --shadow: 28 20 12;

  --serif: "Fz Latin", "Fz Serif", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", serif;
  --read: "Fz Serif", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  --pixel: "Fz Pixel", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  --wrap: 1180px;
  --gut: clamp(20px, 5vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --top-h: 64px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #15131a;
  --bg-2: #1b1921;
  --card: #201d27;
  --ink: #ece6da;
  --ink-2: #b6aea1;
  --ink-3: #958d81;
  --line: #353040;
  --line-strong: #5a5367;
  --accent: #e58a66;
  --accent-ink: #f0a586;
  --ok: #6cc3a6;
  --warn: #dcae5c;
  --shadow: 0 0 0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
/* 一点纸的颗粒感,压得很低,只是不让底色显得"塑料"。 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .22 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .9;
}
[data-theme="dark"] body::before { opacity: .35; }

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin-inline: auto; padding-inline: var(--gut); }
.px { font-family: var(--pixel); font-size: 12px; line-height: 1.5; letter-spacing: .03em; font-weight: 400; }
.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: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 4px; }
.skip:focus { top: 12px; }
.arr { display: inline-block; font-family: var(--sans); transition: translate .3s var(--ease); }
.arr--out { font-size: .92em; }
a:hover > .arr, a:hover .go .arr, .work:hover .arr, .door:hover .arr, .strip:hover .arr { translate: 4px 0; }
a:hover > .arr--out, .work:hover .arr--out { translate: 2px -2px; }

/* ---------------------------------------------------------------- 顶栏 */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 28px; min-height: var(--top-h); }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand svg { width: 36px; height: 24px; transition: translate .3s var(--ease); }
.brand:hover svg { translate: 0 -3px; }
.brand span { font: italic 600 25px/1 var(--serif); letter-spacing: -.01em; }
.nav { display: flex; gap: 4px; }
.nav a { position: relative; padding: 8px 13px; font-size: 15px; color: var(--ink-2); border-radius: 4px; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.nav a[aria-current] { color: var(--ink); font-weight: 600; }
.nav a[aria-current]::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px; background: var(--accent); }
.theme { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-2); transition: color .2s, border-color .2s, background-color .2s; }
.theme:hover { color: var(--ink); border-color: var(--line-strong); background: var(--card); }
.theme svg { width: 20px; height: 20px; }
.theme .i-sun, [data-theme="dark"] .theme .i-moon { display: none; }
[data-theme="dark"] .theme .i-sun { display: block; }

/* ---------------------------------------------------------------- Clawd */
.clawd {
  position: relative; display: inline-block; flex: none; vertical-align: bottom;
  width: calc(var(--w) * var(--px)); height: calc(var(--h) * var(--px));
  cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  /* 每段动作的脚底行不同(--foot 由脚本按像素量出来),往下挪到正好踩在线上。 */
  translate: 0 calc((27 - var(--foot, 27)) * var(--px));
}
.clawd-flip, .clawd-body { display: block; width: 100%; height: 100%; transform-origin: calc(17 * var(--px)) 100%; }
.clawd svg { width: 100%; height: 100%; overflow: visible; }
.clawd.is-left .clawd-flip { transform: scaleX(-1); }
.clawd .zz { fill: #7d86c9; }
[data-theme="dark"] .clawd .zz { fill: #cfd8ff; }
.clawd-body.hop { animation: hop .62s var(--ease); }
.clawd-body.spin { transform-origin: calc(17 * var(--px)) 62%; animation: spin 2.4s both; }
@keyframes hop {
  18% { transform: scale(1.08, .88); }
  50% { transform: scale(.95, 1.06); }
  78% { transform: scale(1.01, .99); }
}
@keyframes spin {
  0% { transform: scale(1) rotate(0); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
  42% { transform: scale(.78) rotate(720deg); }
  54% { transform: scale(.82) rotate(706deg); }
  66% { transform: scale(.88) rotate(731deg); }
  78% { transform: scale(.94) rotate(713deg); }
  90% { transform: scale(.98) rotate(724deg); }
  100% { transform: scale(1) rotate(720deg); }
}
.bubble {
  position: absolute; z-index: 6; left: calc(17 * var(--px)); bottom: calc(100% - 3 * var(--px));
  translate: -50% 0; white-space: nowrap; pointer-events: none;
  font: 12px/1 var(--pixel); letter-spacing: .04em;
  background: var(--ink); color: var(--bg); padding: 7px 9px 6px;
  animation: bubble 2.4s var(--ease) both;
}
.bubble::after { content: ""; position: absolute; left: 50%; top: 100%; width: 4px; height: 4px; margin-left: -2px; background: inherit; }
@keyframes bubble {
  0% { opacity: 0; translate: -50% 6px; }
  10%, 84% { opacity: 1; translate: -50% 0; }
  100% { opacity: 0; translate: -50% -4px; }
}
.spark { position: absolute; z-index: 5; left: calc(17 * var(--px)); top: calc(8 * var(--px)); width: var(--px); height: var(--px); pointer-events: none; color: #ffd166; background: currentColor;
  box-shadow: var(--px) 0 currentColor, calc(-1 * var(--px)) 0 currentColor, 0 var(--px) currentColor, 0 calc(-1 * var(--px)) currentColor;
  animation: spark .9s var(--ease) both; }
@keyframes spark {
  0% { opacity: 0; transform: translate(var(--sx), 4px) scale(.4); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--sx) * 1.6), calc(-9 * var(--px))) scale(1); }
}

/* 舞台:一条线,居民在上面走来走去。 */
.stage { position: relative; height: calc(29 * var(--px)); border-bottom: 1px solid var(--line-strong); }
.stage .clawd { position: absolute; left: 0; bottom: calc(-1 * var(--px)); will-change: transform; }
.stage--hero { grid-column: 1 / -1; margin-top: clamp(28px, 5vw, 56px); }
.stage--head { margin-top: clamp(20px, 4vw, 40px); }
.ground { border: 0; border-top: 1px solid var(--line-strong); margin: clamp(32px, 5vw, 56px) 0 0; }
.stage-cap { grid-column: 1 / -1; margin-top: 12px; color: var(--ink-3); text-align: right; }

/* ---------------------------------------------------------------- 首页 */
.eyebrow { color: var(--accent-ink); letter-spacing: .12em; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--accent); flex: none; }
.eyebrow:empty { display: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: clamp(24px, 6vw, 96px); padding-top: clamp(48px, 9vw, 116px); }
.hero-title { font: 800 clamp(52px, 10.2vw, 132px)/1.02 var(--serif); letter-spacing: -.015em; }
.hero-title em { font-style: italic; font-weight: 600; color: var(--accent); letter-spacing: -.03em; padding-right: .04em; }
.hero-lede { margin-top: clamp(24px, 3vw, 36px); max-width: 31em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.8; color: var(--ink-2); text-wrap: pretty; }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 15px; font-weight: 600; background: var(--card); transition: translate .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.btn:hover { translate: -2px -2px; box-shadow: 4px 4px 0 rgb(var(--shadow) / .14); border-color: var(--ink); }
.btn:active { translate: 0 0; box-shadow: none; }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid:hover { box-shadow: 4px 4px 0 var(--accent); }

.hero-pet { display: grid; justify-items: center; padding-bottom: 6px; }
.pet { position: relative; display: block; padding: 0 28px; border-bottom: 1px solid var(--line-strong); }
.pet .clawd { display: block; margin-bottom: calc(-1 * var(--px)); }
.pet-cap { margin-top: 12px; display: flex; gap: 12px; align-items: center; }
.pet-name { color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); padding: 3px 8px 2px; }
.pet-hint { color: var(--ink-3); }

.sec { margin-top: clamp(80px, 11vw, 144px); }
.sec--tight { margin-top: clamp(40px, 6vw, 72px); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.sec-title { font: 800 clamp(28px, 3.6vw, 44px)/1.2 var(--serif); letter-spacing: -.005em; }
.sec-head--sm .sec-title { font-size: clamp(24px, 2.6vw, 32px); }
.sec-sub { color: var(--ink-2); font-size: 15px; }
.sec-sub.px { font-size: 12px; color: var(--ink-3); }
.more { font-size: 15px; font-weight: 600; color: var(--accent-ink); }
.more:hover { text-decoration: underline; text-underline-offset: 5px; }

.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 76px 28px; margin-top: 92px; }
.door {
  --c: hsl(var(--hue) 52% 46%);
  --c-ink: hsl(var(--hue) 52% 32%);
  position: relative; display: flex; flex-direction: column; min-height: 248px; padding: 26px 28px 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .25s;
}
[data-theme="dark"] .door { --c: hsl(var(--hue) 62% 70%); --c-ink: var(--c); }
.door--wide { grid-column: span 2; }
.door:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 color-mix(in srgb, var(--c) 30%, transparent); border-color: var(--c); }
.door > .clawd { position: absolute; right: 26px; bottom: calc(100% - var(--px)); }
.door-no { display: flex; align-items: center; gap: 8px; color: var(--c-ink); }
.door-no::before { content: ""; width: 8px; height: 8px; background: var(--c); }
.door-title { margin-top: 18px; font: 800 clamp(30px, 3.2vw, 42px)/1.15 var(--serif); }
.door--wide .door-title { font-size: clamp(36px, 4.6vw, 60px); }
.door-desc { margin-top: 10px; max-width: 26em; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.door-foot { margin-top: auto; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); }
.door-foot .arr { font-size: 22px; color: var(--c-ink); }
.door-count { color: var(--ink-3); }

.strip { position: relative; display: flex; align-items: center; gap: 24px; margin-top: 76px; padding: 20px 28px; border: 1px dashed var(--line-strong); border-radius: 4px; transition: background-color .25s, border-color .25s; }
.strip:hover { background: var(--card); border-color: var(--accent); border-style: solid; }
.strip-crew { position: absolute; left: 22px; bottom: calc(100% - 2px); display: flex; gap: 2px; }
.strip-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-right: auto; }
.strip-text b { font: 800 22px/1.3 var(--serif); }
.strip-text span { color: var(--ink-2); font-size: 15px; }
.strip > .arr { font-size: 22px; color: var(--accent); }

/* ---------------------------------------------------------------- 作品 */
.works { display: grid; gap: 52px 32px; margin-top: 40px; }
.works--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.works--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 68px 40px; }
.work { position: relative; display: flex; flex-direction: column; }
.work[hidden] { display: none; }
.work-cover { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .25s; }
.work-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.work:hover .work-cover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 rgb(var(--shadow) / .16); border-color: var(--ink-3); }
[data-theme="dark"] .work:hover .work-cover { box-shadow: 8px 8px 0 color-mix(in srgb, var(--accent) 45%, transparent); }
.work-body { padding-top: 18px; display: flex; flex-direction: column; flex: 1; }
.meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; color: var(--ink-3); }
.meta i { width: 3px; height: 3px; background: var(--line-strong); }
.work-title { margin-top: 8px; font: 800 24px/1.3 var(--serif); }
.works--2 .work-title { font-size: clamp(26px, 2.6vw, 34px); }
.work-title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.work-sum { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; line-height: 1.75; text-wrap: pretty; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags li { font: 12px/1 var(--pixel); letter-spacing: .03em; color: var(--ink-2); border: 1px solid var(--line); padding: 5px 7px 4px; }
.go { margin-top: auto; padding-top: 16px; font-size: 14.5px; font-weight: 600; color: var(--accent-ink); }

.gen { position: relative; width: 100%; height: 100%; overflow: hidden;
  background: radial-gradient(90% 120% at 12% 0%, hsl(var(--h) 74% 88%) 0, transparent 62%), linear-gradient(150deg, hsl(var(--h) 52% 80%), hsl(calc(var(--h) + 38) 48% 72%)); }
[data-theme="dark"] .gen { background: radial-gradient(90% 120% at 12% 0%, hsl(var(--h) 44% 34%) 0, transparent 62%), linear-gradient(150deg, hsl(var(--h) 36% 26%), hsl(calc(var(--h) + 38) 34% 20%)); }
.gen-letter { position: absolute; left: 6%; top: -6%; font: 800 clamp(120px, 20vw, 260px)/1 var(--serif); color: rgb(255 255 255 / .42); }
[data-theme="dark"] .gen-letter { color: rgb(255 255 255 / .1); }
.gen-ground { position: absolute; left: 0; right: 0; bottom: 16%; border-top: 1px solid rgb(0 0 0 / .28); }
[data-theme="dark"] .gen-ground { border-color: rgb(255 255 255 / .28); }
.gen .clawd { position: absolute; z-index: 3; right: 12%; bottom: calc(16% - var(--px)); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 14.5px; color: var(--ink-2); transition: background-color .2s, color .2s, border-color .2s; }
.chip b { font: 12px/1 var(--pixel); margin-left: 4px; opacity: .7; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------------------------------------------------------------- 子页页头 */
.phead { padding-top: clamp(36px, 6vw, 72px); }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--ink-3); margin-bottom: clamp(28px, 4vw, 48px); }
.crumb a:hover { color: var(--accent-ink); }
.crumb i { font-style: normal; opacity: .6; }
.ptitle { font: 800 clamp(44px, 7.4vw, 92px)/1.08 var(--serif); letter-spacing: -.01em; }
.plede { margin-top: 20px; max-width: 34em; font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.8; color: var(--ink-2); text-wrap: pretty; }
.aside { margin-top: 32px; color: var(--ink-2); font-size: 15px; }
.aside a, .prose a, .notice a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.aside a:hover, .prose a:hover { text-decoration-thickness: 2px; }
.notice { display: block; margin-bottom: clamp(40px, 6vw, 64px); padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--bg-2); color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.notice .px { display: block; color: var(--accent-ink); margin-bottom: 2px; letter-spacing: .1em; }
.notice--pet { display: flex; align-items: flex-end; gap: 14px; margin: 28px 0 0; }

/* ---------------------------------------------------------------- 开源 */
.repos { border-top: 1px solid var(--line-strong); }
.repo { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding: 34px 0; border-bottom: 1px solid var(--line-strong); }
.repo-title { margin-top: 10px; font: 800 clamp(28px, 3.2vw, 40px)/1.2 var(--serif); }
.repo-title a { background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 2px; transition: background-size .35s var(--ease); }
.repo-title a:hover { background-size: 100% 2px; }
.repo-path { margin-top: 6px; }
.repo-path code { font: 13px/1.4 var(--mono); color: var(--ink-3); }
.repo-sum { margin-top: 12px; max-width: 36em; color: var(--ink-2); text-wrap: pretty; }
.repo--soon .repo-title { color: var(--ink-2); }
.repo-side { display: flex; align-items: flex-end; }
.repo-side .go { margin: 0; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--card); transition: translate .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.repo:hover .repo-side .go { translate: -2px -2px; box-shadow: 4px 4px 0 rgb(var(--shadow) / .14); border-color: var(--ink); }
.repo-side .clawd { margin-bottom: calc(-34px - var(--px)); }
.status { display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.status--public { color: var(--ok); }
.status--soon { color: var(--warn); }

/* ---------------------------------------------------------------- 时间线 */
.jobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 76px 28px; margin-top: 88px; }
.job { position: relative; padding: 24px 26px 26px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.job > .clawd { position: absolute; right: 22px; bottom: calc(100% - var(--px)); }
.job-no { display: flex; align-items: center; gap: 10px; color: var(--accent-ink); }
.job-no b { font-weight: 400; color: var(--ink-3); border: 1px solid var(--line-strong); padding: 2px 6px 1px; }
.job-title { margin-top: 14px; font: 800 26px/1.3 var(--serif); }
.job-where { margin-top: 6px; color: var(--ink-3); }
.job-text { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; }
.job-learn { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); font-size: 15px; }
.job-learn b { font: 12px/1 var(--pixel); color: var(--accent-ink); margin-right: 10px; }
.is-todo.job, .is-todo .tl-card {
  border-style: dashed; border-color: var(--line-strong);
  background: repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in srgb, var(--ink) 4%, transparent) 9px 10px);
}
.is-todo .job-title, .is-todo .tl-card h4 { color: var(--ink-3); }
/* 还没填的格子压矮一点,不让整页看起来全是空格子。 */
.is-todo.job { padding-block: 18px 20px; }
.is-todo .job-text, .is-todo .tl-card p { display: none; }
.is-todo .tl-card { padding-block: 14px 16px; }
.is-todo .tl-card h4 { font-size: 19px; }
.tl-item.is-todo { padding-bottom: 18px; }

.tl { position: relative; --date: 148px; --rail: 96px; margin-top: 24px; }
.tl-rail { position: absolute; top: 0; bottom: 0; left: var(--date); width: var(--rail); pointer-events: none; z-index: 3; }
.tl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line-strong); z-index: -1; }
.tl-guide { position: sticky; top: 42vh; padding: 24px 0; margin-left: calc(var(--rail) / 2 - 34px); }
.tl-guide .clawd { pointer-events: auto; }
.era { display: grid; grid-template-columns: var(--date) var(--rail) minmax(0, 1fr); padding-top: 56px; }
.era-name { grid-column: 1; align-self: start; position: sticky; top: calc(var(--top-h) + 28px); text-align: right; font: 800 clamp(26px, 2.8vw, 36px)/1.2 var(--serif); }
.era-name span { position: relative; }
.tl-list { grid-column: 3; }
.tl-item { position: relative; padding-bottom: 28px; }
.tl-item.is-todo { padding-top: 34px; }
.tl-date { display: block; margin-bottom: 8px; font: italic 500 19px/1.2 var(--serif); color: var(--accent-ink); letter-spacing: .01em; }
.tl-date--todo { font: 12px/1.6 var(--pixel); font-style: normal; color: var(--ink-3); }
.tl-dot { position: absolute; left: calc(var(--rail) / -2 - 5px); top: 7px; width: 11px; height: 11px; background: var(--accent); box-shadow: 0 0 0 5px var(--bg); }
.is-todo .tl-dot { top: 40px; background: var(--bg); border: 1px solid var(--line-strong); }
.tl-card { position: relative; padding: 20px 24px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.tl-card h4 { font: 800 clamp(21px, 2.1vw, 26px)/1.35 var(--serif); }
.tl-card h4 a { background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 2px; transition: background-size .35s var(--ease); }
.tl-card h4 a:hover { background-size: 100% 2px; }
.tl-card p { margin-top: 8px; color: var(--ink-2); font-size: 16px; line-height: 1.8; max-width: 36em; }
.tl-card > .clawd { position: absolute; right: 20px; bottom: calc(100% - var(--px)); }

/* ---------------------------------------------------------------- 文字 */
.shelf + .shelf { margin-top: clamp(56px, 8vw, 88px); }
.posts { border-top: 0; }
.post-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: baseline; gap: 8px 28px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.post-row time { color: var(--ink-3); }
.post-row h3 { font: 800 clamp(22px, 2.4vw, 28px)/1.35 var(--serif); }
.post-row h3 a { background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 2px; transition: background-size .35s var(--ease); }
.post-row h3 a:hover { background-size: 100% 2px; }
.post-row p { margin-top: 6px; color: var(--ink-2); font-size: 15.5px; max-width: 40em; text-wrap: pretty; }
.post-len { color: var(--ink-3); }
.shelf-empty { display: flex; align-items: flex-end; gap: 18px; padding: 34px 0 0; border-bottom: 1px dashed var(--line-strong); color: var(--ink-3); }
.shelf-empty .clawd { margin-bottom: calc(-1 * var(--px)); }
.shelf-empty p { padding-bottom: 14px; }
.empty { padding: 26px 0; color: var(--ink-3); }

/* 长文页:一切为了读得进去。 */
.post { --fs: 18.5px; padding-top: clamp(36px, 6vw, 72px); }
[data-fs="s"] .post { --fs: 16.5px; }
[data-fs="l"] .post { --fs: 21.5px; }
.post-head, .post-foot { max-width: calc(34 * 18.5px); margin-inline: auto; }
.prose { max-width: calc(34 * var(--fs)); margin-inline: auto; }
.post-title { font: 800 clamp(32px, 5vw, 54px)/1.22 var(--serif); letter-spacing: -.005em; text-wrap: balance; }
.post-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); color: var(--ink-3); }
.post-meta p { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.post-meta i { width: 3px; height: 3px; background: var(--line-strong); }
.fs { display: flex; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; }
.fs button { width: 34px; height: 30px; font: 12px/1 var(--pixel); color: var(--ink-2); }
.fs button + button { border-left: 1px solid var(--line-strong); }
.fs button:hover { background: var(--card); color: var(--ink); }
.fs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.prose { margin-top: clamp(32px, 5vw, 52px); font: 500 var(--fs)/1.92 var(--read); color: var(--ink); text-align: justify; text-justify: inter-character; line-break: strict; overflow-wrap: break-word; transition: font-size .25s var(--ease); }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { margin-top: 2.4em; font: 800 1.5em/1.35 var(--serif); text-align: left; }
.prose h3 { margin-top: 2em; font: 800 1.2em/1.4 var(--serif); text-align: left; }
.prose h2 + *, .prose h3 + * { margin-top: .8em; }
.prose strong { font-weight: 800; }
.prose em { font-style: normal; text-emphasis: dot; -webkit-text-emphasis: dot; text-emphasis-position: under right; -webkit-text-emphasis-position: under right; }
.prose ul, .prose ol { padding-left: 1.4em; text-align: left; }
.prose ul { list-style: none; }
.prose ul li { position: relative; }
.prose ul li::before { content: ""; position: absolute; left: -1.1em; top: .82em; width: 5px; height: 5px; background: var(--accent); }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose blockquote { padding: .1em 0 .1em 1.2em; border-left: 3px solid var(--accent); color: var(--ink-2); }
.prose code { font: .86em/1 var(--mono); background: var(--bg-2); border: 1px solid var(--line); padding: .15em .4em; border-radius: 3px; }
.prose pre { overflow-x: auto; padding: 16px 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; text-align: left; }
.prose pre code { background: none; border: 0; padding: 0; font-size: .82em; line-height: 1.7; }
.prose img { margin-inline: auto; border: 1px solid var(--line); border-radius: 4px; }
.prose hr.scene { border: 0; height: 1.9em; margin-block: 2.2em; background: radial-gradient(circle, var(--ink-3) 0 2px, transparent 2.5px) center / 28px 100% repeat-x; width: 84px; margin-inline: auto; }
.post--fiction .prose > p { text-indent: 2em; }
.post--fiction .prose > p + p { margin-top: .5em; }
.prose--ui { margin-top: 0; max-width: 34em; font: 17.5px/1.9 var(--sans); text-align: left; }

.post-foot { margin-top: clamp(56px, 8vw, 88px); }
.end { display: grid; justify-items: center; gap: 12px; color: var(--ink-3); }
.end .clawd { margin-bottom: calc(-1 * var(--px)); }
.end::after { content: ""; order: 1; width: 132px; border-top: 1px solid var(--line-strong); margin-top: -12px; }
.end .px { order: 2; letter-spacing: .3em; }
.pnav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.pn { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); transition: translate .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.pn:hover { translate: -2px -2px; box-shadow: 4px 4px 0 rgb(var(--shadow) / .14); border-color: var(--ink); }
.pn .px { color: var(--ink-3); }
.pn b { font: 800 18px/1.4 var(--serif); }
.pn--next { text-align: right; }
.back { margin-top: 40px; text-align: center; font-size: 15px; font-weight: 600; color: var(--accent-ink); }
.back a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* 底部一条阅读带:小蟹站在进度线上,带子有底色,正文从带子下面滚过去,不会被它挡住半行字。 */
.progress { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 50px; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); }
.progress-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--accent); }
.progress-pet { position: absolute; left: 0; bottom: 3px; pointer-events: auto; will-change: transform; }
.progress-pet .clawd { --px: 1.5px !important; }
.p-post .foot { padding-bottom: 120px; }
.progress-pet .clawd { display: block; }

/* ---------------------------------------------------------------- 关于 */
.about { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 7vw, 104px); align-items: start; }
.about-pet { position: sticky; top: calc(var(--top-h) + 32px); display: grid; justify-items: center; }
.about-frame { padding: 0 20px; border-bottom: 1px solid var(--line-strong); }
.about-frame .clawd { display: block; margin-bottom: calc(-1 * var(--px)); }
.about-h { margin-top: 52px; padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); font: 800 24px/1.3 var(--serif); }
.now li, .find li { position: relative; padding: 14px 0 14px 22px; border-bottom: 1px solid var(--line); }
.now li::before { content: ""; position: absolute; left: 2px; top: 1.62em; width: 6px; height: 6px; background: var(--accent); }
.find li { padding-left: 0; font-weight: 600; }
.find a:hover { color: var(--accent-ink); }

/* ---------------------------------------------------------------- 图鉴 */
.skins { display: flex; flex-wrap: wrap; gap: 8px; }
.skin { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 7px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 14px; color: var(--ink-2); transition: border-color .2s, color .2s, background-color .2s; }
.skin i { width: 16px; height: 16px; background: var(--c); border: 1px solid rgb(0 0 0 / .12); }
.skin:hover { border-color: var(--ink); color: var(--ink); }
.skin[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 24px; margin-top: 36px; }
.cast-cell { display: grid; justify-items: center; min-width: 0; overflow: hidden; padding: 26px 12px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; transition: border-color .2s; }
.cast-cell:hover { border-color: var(--line-strong); }
.cast-floor { max-width: 100%; padding: 0 6px; border-bottom: 1px solid var(--line-strong); }
.cast-floor .clawd { display: block; margin-bottom: calc(-1 * var(--px)); }
.cast-name { margin-top: 14px; font: 800 19px/1.3 var(--serif); }
.cast-clip { color: var(--ink-3); }
.moves { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px; margin-top: 36px; }
.move { display: grid; justify-items: center; align-content: end; gap: 10px; min-height: 148px; padding: 16px 8px 12px; border: 1px solid var(--line); border-radius: 4px; }
.move .px { color: var(--ink-2); }
.move-art { display: block; }
.move-art svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------------- 404 */
.nf { display: grid; justify-items: center; text-align: center; padding-top: clamp(48px, 10vw, 120px); }
.nf-pet { padding: 0 24px; border-bottom: 1px solid var(--line-strong); margin-bottom: 44px; }
.nf-pet .clawd { display: block; margin-bottom: calc(-1 * var(--px)); }
.nf .plede { margin-inline: auto; }
.nf .hero-cta { justify-content: center; }
.nf .eyebrow { justify-content: center; }

/* ---------------------------------------------------------------- 页脚 */
.foot { margin-top: clamp(96px, 13vw, 176px); padding-bottom: clamp(40px, 6vw, 72px); }
.foot-in { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 16px 48px; padding-top: 28px; }
.foot-brand { display: grid; gap: 4px; }
.foot-brand a { font: italic 600 30px/1 var(--serif); }
.foot-brand span { color: var(--ink-3); }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; font-size: 15px; color: var(--ink-2); }
.foot-nav a:hover { color: var(--accent-ink); }
.foot-note { grid-column: 1 / -1; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); }
.foot-note a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- 进场 */
.js .reveal { opacity: 0; translate: 0 16px; transition: opacity .7s var(--ease), translate .7s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease), border-color .25s; }
.js .reveal.in { opacity: 1; translate: 0 0; }
@view-transition { navigation: auto; }

/* ---------------------------------------------------------------- 窄屏 */
@media (max-width: 1000px) {
  .works--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .works--3 .work:nth-child(3) { display: none; }
  .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .door--wide { grid-column: span 2; }
  .jobs { grid-template-columns: 1fr; margin-top: 80px; }
}
@media (max-width: 760px) {
  :root { --top-h: 104px; }
  body { font-size: 16.5px; }
  .top-in { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .nav { order: 3; width: 100%; margin-inline: -8px; padding-bottom: 6px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px 10px; white-space: nowrap; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-pet { justify-items: start; margin-top: 44px; }
  .hero-pet .clawd { --px: 5px !important; }
  .stage-cap { text-align: left; }
  .doors { grid-template-columns: minmax(0, 1fr); margin-top: 80px; }
  .door--wide { grid-column: auto; }
  .door { min-height: 0; }
  .works--2, .works--3 { grid-template-columns: minmax(0, 1fr); }
  .works--3 .work:nth-child(3) { display: flex; }
  .strip { flex-wrap: wrap; }
  .repo { grid-template-columns: minmax(0, 1fr); }
  .repo-side .clawd { display: none; }
  .tl { --date: 0px; --rail: 34px; }
  .tl-guide { display: none; }
  .era { padding-top: 40px; }
  .era-name { grid-column: 3; position: static; text-align: left; margin-bottom: 20px; }
  .post-row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 22px 0; }
  .post-len { margin-top: 6px; }
  .prose { text-align: left; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about-pet { position: static; justify-items: start; }
  .about-pet .clawd { --px: 5px !important; }
  .nf-pet .clawd { --px: 5px !important; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .foot-nav { justify-content: flex-start; }
  .pnav { grid-template-columns: minmax(0, 1fr); }
  .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cast-cell .clawd { --px: 2.5px !important; }
  .cast-cell { padding-inline: 8px; }
  .progress { height: 3px; border: 0; background: color-mix(in srgb, var(--line) 70%, transparent); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .progress-pet { display: none; }
  .p-post .foot { padding-bottom: 48px; }
  .move-art { scale: .8; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; translate: 0 0; }
  .bubble { animation: none; opacity: 1; translate: -50% 0; }
  @view-transition { navigation: none; }
}
@media print {
  .top, .foot, .progress, .stage, .fs { display: none; }
  .js .reveal { opacity: 1 !important; translate: none !important; }
  body { background: #fff; }
}
