/* Seashelf · 拾贝 — personal archive
   海雾白 / 海蓝 / 天蓝 / 木色。轻快、通透；书架（木色横条）是贯穿全站的母题。编辑式的目录排版：编号、日期戳、细线分隔。 */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/vendor/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/vendor/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/vendor/fonts/geist-latin-wght-normal.woff2") format("woff2"); }

:root {
  --paper: #f5f9fa;
  --surface: #ffffff;
  --sunk: #eaf2f5;
  --ink: #0e2a38;
  --ink-2: #365364;
  --muted: #688293;
  --faint: #9fb3be;
  --line: #dde8ed;
  --line-2: #c4d5dd;
  --accent: #1877b5;
  --accent-ink: #0f5f93;
  --accent-wash: rgba(24, 119, 181, .08);
  --sky: #8fd0ef;
  --sky-soft: #cfe9f6;
  --wood: #c49a6c;
  --wood-ink: #8d6640;
  --wood-wash: rgba(196, 154, 108, .14);
  --mark: rgba(240, 196, 120, .5);
  --on-accent: #ffffff;
  --ok: #2a9d7c;
  --scrim: rgba(14, 42, 56, .32);
  --shadow-pop: 0 1px 0 rgba(14,42,56,.03), 0 16px 40px -12px rgba(14,42,56,.18);
  --glow-a: rgba(143, 208, 239, .38);
  --glow-b: rgba(232, 206, 170, .32);

  /* 字型只用两种：Instrument Serif（数字与英文标题）+ Geist（其余；中文回落到苹方 / 雅黑）
     字重只用 400 / 600；字号只用 12 / 14 / 16 / 32 四级（图标与 Logo 字标除外） */
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Instrument Serif", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Georgia, serif;
  --fs-xs: 12px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 32px;
  /* 图标尺寸：12px 文字配 --ic-sm，14px 文字配 --ic-md，纯图标按钮 / 搜索框用 --ic-lg；--ic-xs 只给折叠箭头 */
  --ic-xs: 12px; --ic-sm: 14px; --ic-md: 16px; --ic-lg: 18px;
  /* 圆角：徽标 4 / 侧栏行 6 / 侧栏按钮 8 / 顶栏控件 10 / 卡片与弹层 12 / 大面板 16 / 胶囊 999 */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-xl: 12px; --r-2xl: 16px; --r-pill: 999px;
  /* 大写小标签统一字距 */
  --track-caps: .14em;
  --shadow-xs: 0 1px 2px rgba(14,42,56,.05);
  /* 强调 hover：浅蓝底 + 淡蓝边 + 深蓝字（胶囊、标签、加载更多共用） */
  --accent-line: color-mix(in srgb, var(--accent) 30%, var(--line-2));

  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --top-h: 68px;
  --side-w: 268px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #080d10; --surface: #0e1519; --sunk: #131c21; --ink: #e3ecf0; --ink-2: #b0c0c8;
    --muted: #74868f; --faint: #4a5a62; --line: #1a242a; --line-2: #26343b;
    --accent: #5cbcf0; --accent-ink: #8ad0f5; --accent-wash: rgba(92, 188, 240, .09);
    --sky: #24506a; --sky-soft: #142630; --wood: #d2ad83; --wood-ink: #e2c39d; --wood-wash: rgba(210, 173, 131, .12);
    --mark: rgba(210, 173, 131, .3); --on-accent: #03121b; --ok: #5fd0a8; --scrim: rgba(0, 0, 0, .66);
    --shadow-pop: 0 1px 0 rgba(0,0,0,.25), 0 16px 40px -8px rgba(0,0,0,.7);
    --glow-a: rgba(40, 96, 130, .22); --glow-b: rgba(210, 173, 131, .05);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #080d10; --surface: #0e1519; --sunk: #131c21; --ink: #e3ecf0; --ink-2: #b0c0c8;
  --muted: #74868f; --faint: #4a5a62; --line: #1a242a; --line-2: #26343b;
  --accent: #5cbcf0; --accent-ink: #8ad0f5; --accent-wash: rgba(92, 188, 240, .09);
  --sky: #24506a; --sky-soft: #142630; --wood: #d2ad83; --wood-ink: #e2c39d; --wood-wash: rgba(210, 173, 131, .12);
  --mark: rgba(210, 173, 131, .3); --on-accent: #03121b; --ok: #5fd0a8; --scrim: rgba(0, 0, 0, .66);
  --shadow-pop: 0 1px 0 rgba(0,0,0,.25), 0 16px 40px -8px rgba(0,0,0,.7);
  --glow-a: rgba(40, 96, 130, .22); --glow-b: rgba(210, 173, 131, .05);
  color-scheme: dark;
}

/* ---------- 首页海岸（shore.js） ---------- */
.shore { position: absolute; z-index: -1; top: 0; left: 0; right: 0; height: 100svh; overflow: hidden; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s .7s; }
.shore-on .shore { opacity: 1; visibility: visible; transition: opacity .7s var(--ease); }
.shore-stage { position: absolute; inset: 0; will-change: transform; }
.shore-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* 海面延伸到顶栏后面：顶栏的毛玻璃底更透明一些 */
.shore-on .top::before { background: color-mix(in srgb, var(--paper) 32%, transparent); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); }
/* 顶栏还透明时，搜索框和按钮各自做成毛玻璃，悬浮在海面和正文上 */
.shore-on .search, .shore-on .top .icon-btn { background: color-mix(in srgb, var(--surface) 62%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
/* 叠在海面上的刊头：小字加深一档，按钮做成毛玻璃 */
.shore-on .mast .eyebrow, .shore-on .mast .fact span { color: var(--ink-2); }
.shore-on .mast .pill:not(:hover) { background: color-mix(in srgb, var(--surface) 55%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@media (min-width: 981px) {
  /* 侧栏：顶栏下方 12px 的一张毛玻璃卡片，与顶栏一起吸顶；高度 = 屏幕高度 − 侧栏到页面顶部的距离 − 底部留白 12px（.shell 前缀用于压过后面的基础 .side 规则） */
  .shell .side {
    top: calc(var(--top-h) + 12px); margin: 12px 0 0 -14px; height: calc(100vh - var(--top-h) - 24px); padding: 20px 14px 24px;
    background: color-mix(in srgb, var(--paper) 62%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
    border-radius: 16px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body {
  font: 400 var(--fs-md)/1.6 var(--sans); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  min-height: 100vh; overflow-x: clip;   /* 用 clip 而不是 hidden：hidden 会让 body 成为滚动容器，顶栏和侧栏的 sticky 失效 */
}
/* 顶部的海面天光：左上天蓝、右上沙色，随页面滚走 */
body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 720px; pointer-events: none; z-index: -1;
  background:
    radial-gradient(900px 420px at 12% -8%, var(--glow-a), transparent 70%),
    radial-gradient(760px 380px at 92% -12%, var(--glow-b), transparent 70%);
}
body { position: relative; isolation: isolate; }

::selection { background: var(--mark); color: inherit; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
kbd {
  font: 400 var(--fs-xs)/1 var(--sans); display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--surface);
}
[hidden] { display: none !important; }
i[class^="ph-"], i[class*=" ph-"] { line-height: 1; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 200; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 6px; }

/* ---------- top bar ---------- */
.top {
  /* 首页：页面顶部时顶栏透明，搜索框和按钮直接悬浮在海面上；往下滚时毛玻璃底逐渐出现，滚到正文时完全不透明。
     其他页面一直是完全的毛玻璃（--top-p 由 app.js 写入，0 → 1） */
  position: sticky; top: 0; z-index: 40; height: var(--top-h);
}
.top::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--top-p, 0);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1360px; height: 100%; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; width: calc(var(--side-w) - 20px); }
/* 标志：贝壳 = --accent，书架 = --wood，刻线 = 背景色 */
.logo { width: 38px; height: 38px; flex: none; display: block; overflow: visible; --knock: var(--paper); }
.logo .lg-shell { transform-origin: 32px 46px; transition: transform .7s var(--ease-out); }
.brand:hover .logo .lg-shell { transform: rotate(-7deg) translateY(-1.5px); }
.logo .lg-shelf { transform-origin: 32px 54px; transition: transform .7s var(--ease-out); }
.brand:hover .logo .lg-shelf { transform: scaleX(1.06); }
.wordmark { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.wm-name { font: italic 400 var(--fs-lg)/.9 var(--serif); letter-spacing: -.01em; padding-right: 2px; }
.wm-cn { font: 600 var(--fs-xs)/1 var(--sans); letter-spacing: .5em; }

.search-wrap { position: relative; flex: 1 1 auto; min-width: 0; max-width: 620px; display: flex; }
.search {
  box-shadow: var(--shadow-xs);
  flex: 1 1 auto; min-width: 0; position: relative; display: flex; align-items: center; height: 42px;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 0 10px 0 14px; gap: 10px;
  transition: border-color .2s, box-shadow .3s var(--ease), background .2s; cursor: text;
}
.search:hover { border-color: var(--line-2); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.search > i { font-size: var(--ic-lg); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 100%; font-size: var(--fs-sm); }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-kbd { transition: opacity .2s; }
.search:focus-within .search-kbd { opacity: 0; }
.search.has-q .search-kbd { display: none; }
/* 圆形图标按钮（幽灵样式）：清空 / 搜索 / 阅读器关闭共用——无边框、灰色图标；hover 浅灰底、深色图标 */
.search-x, .search-go {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  color: var(--muted); font-size: var(--ic-md); transition: background .2s, color .2s;
}
.reader-x i { transition: transform .4s var(--ease-out); }
.search-x:hover, .search-go:hover, .reader-x:hover { background: var(--line); color: var(--ink); }
.reader-x:hover i { transform: rotate(90deg); }
/* 搜索按钮：输入了内容才出现；输入内容与当前结果不同时图标变蓝，提示「按回车或点这里才会搜索」 */
.search-go { display: none; margin-right: -4px; }
.search.has-q .search-go { display: grid; }
.search.dirty .search-go { color: var(--accent); }
.search.dirty .search-go:hover { color: var(--accent-ink); }
/* 打字机式的占位提示 */
.search-ph { position: absolute; left: 42px; right: 44px; top: 0; bottom: 0; display: flex; align-items: center; pointer-events: none; color: var(--faint); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; }
.search-ph .ph-t { overflow: hidden; text-overflow: ellipsis; }
.search-ph .ph-caret { flex: none; width: 1.5px; height: 16px; margin-left: 2px; border-radius: 1px; background: var(--accent); opacity: .8; animation: caret 1.05s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.search:focus-within .ph-caret, .search-ph.done .ph-caret { display: none; }
.search.has-q .search-ph { display: none; }
.search > i { transition: color .2s; }
.search:focus-within > i { color: var(--accent); }
/* 搜索设置面板 */
.search-pop {
  position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; right: 0; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.985); transform-origin: top center;
  transition: opacity .18s, transform .3s var(--ease-out), visibility 0s .3s;
}
.search-wrap.open .search-pop, .search-wrap:focus-within .search-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .3s var(--ease-out); }
.sp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sp-k { font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.sp-desc { font-size: var(--fs-xs); color: var(--ink-2); text-align: right; }
.search-pop .seg { display: flex; width: 100%; }
.search-pop .seg button { flex: 1; justify-content: center; padding: 0 10px; }
.search-pop .seg button span, .search-pop .seg button i { display: inline; }
.sp-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: var(--fs-xs); color: var(--muted); }
.sp-foot span { display: inline-flex; align-items: center; gap: 5px; }

.top-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.seg {
  position: relative; display: inline-flex; padding: 3px; border-radius: 10px; background: var(--sunk); isolation: isolate;
}
.seg button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 7px; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; transition: color .25s; white-space: nowrap;
}
.seg button i { font-size: var(--ic-md); }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { color: var(--ink); }
.seg-ink {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 7px;
  background: var(--surface); box-shadow: 0 1px 3px rgba(14,42,56,.1), 0 0 0 1px var(--line);
  transition: transform .45s var(--ease-out), width .45s var(--ease-out);
}
.icon-btn:hover { border-color: var(--line-2); background: var(--surface); }
.icon-btn {
  position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); color: var(--ink-2); font-size: var(--ic-lg); transition: border-color .2s, background .2s;
}
/* 账号：顶栏最右的头像按钮，点开是账号面板 */
.me { position: relative; flex: none; }
.me-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; padding: 0; transition: box-shadow .2s; }
.me-btn .avatar { width: 32px; height: 32px; }
.me-btn:hover, .me-btn[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--accent-line); }
.me-pop {
  position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; width: 280px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.985); transform-origin: top right;
  transition: opacity .18s, transform .3s var(--ease-out), visibility 0s .3s;
}
.me.open .me-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .3s var(--ease-out); }
.me-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.me-av { position: relative; flex: none; }
.me-head .avatar { width: 40px; height: 40px; font-size: var(--fs-sm); }
/* 登录方式：头像右下角的平台小标 */
.me-provider { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.me-provider svg { width: 12px; height: 12px; display: block; }
.me-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.me-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-who .nm { font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.me-who .em { font-size: var(--fs-xs); color: var(--muted); }
.me-rows { margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; font-size: var(--fs-sm); }
.me-rows dt { color: var(--muted); }
.me-rows dd { margin: 0; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.me-theme { display: flex; gap: 4px; margin-top: 14px; padding: 3px; border-radius: var(--r-lg); background: var(--sunk); }
.me-theme button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 30px; border-radius: 7px; color: var(--muted); font-size: var(--fs-xs); transition: color .2s, background .2s; }
.me-theme button i { font-size: var(--ic-sm); }
.me-theme button:hover { color: var(--ink); }
.me-theme button[aria-checked="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px rgba(14,42,56,.1), 0 0 0 1px var(--line); }
.me-out { width: 100%; justify-content: center; margin-top: 14px; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--paper); }
.filter-btn { display: none; }


/* ---------- shell ---------- */
.shell {
  max-width: 1360px; margin: 0 auto; padding: 0 28px;
  display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); gap: 0 56px;
}
.main { min-width: 0; max-width: 800px; padding-bottom: 120px; }

/* ---------- sidebar ---------- */
.side {
  position: sticky; top: var(--top-h); align-self: start; height: calc(100vh - var(--top-h)); overflow-y: auto;
  padding: 28px 8px 24px 0; display: flex; flex-direction: column; gap: 30px; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.side-head { display: none; }
.facet-h {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font: 600 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-2);
}
.facet-h .idx { color: var(--wood-ink); font-weight: 400; }

.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kinds button {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm); transition: all .2s var(--ease);
}
.kinds button i { font-size: var(--ic-md); color: var(--muted); transition: color .2s; }
.kinds button .ct { margin-left: auto; color: var(--muted); font-size: var(--fs-xs); }
.kinds button:hover { border-color: var(--line-2); background: var(--surface); }
/* 侧栏选中态统一：浅蓝底 + 深蓝字（内容类型 / 分类 / 作者） */
.kinds button[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent-line); color: var(--accent-ink); }
.kinds button[aria-pressed="true"] i { color: var(--accent); }
.kinds button[aria-checked="true"] { background: var(--accent-wash); border-color: var(--accent-line); color: var(--accent-ink); }
.kinds button[aria-checked="true"] i { color: var(--accent); }
.kinds button:disabled { opacity: .4; cursor: not-allowed; background: none; border-color: var(--line); }

.tree { display: flex; flex-direction: column; }
.grp { border-bottom: 1px dashed var(--line); }
.grp:last-child { border-bottom: 0; }
.row {
  position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center;
  min-height: 34px; border-radius: 6px;
}
.row .tw { width: 22px; height: 30px; display: grid; place-items: center; color: var(--faint); font-size: var(--ic-xs); border-radius: 6px; }
.row .tw i { transition: transform .35s var(--ease-out); }
.grp.open > .row .tw i { transform: rotate(90deg); }
.row .tw:hover { color: var(--ink); }
.row .pick {
  grid-column: 2 / 4; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 30px; padding: 0 8px; border-radius: 6px; text-align: left; font-size: var(--fs-sm); color: var(--ink-2);
  position: relative; overflow: hidden;
}
.row .pick .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; }
.row .pick .ct { font: 400 var(--fs-xs)/1 var(--sans); color: var(--faint); position: relative; font-variant-numeric: tabular-nums; }
.row .pick:hover { background: var(--surface); color: var(--ink); }
.row .pick.on { color: var(--accent-ink); background: var(--accent-wash); }
.row .pick.on .ct { color: var(--accent); }
.row.parent .pick { color: var(--ink); }
.kids {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease-out);
}
.grp.open > .kids { grid-template-rows: 1fr; }
.kids > div { overflow: hidden; padding-left: 22px; }
.grp.open > .kids > div { padding-bottom: 6px; }
.kids .row { grid-template-columns: minmax(0, 1fr) auto; min-height: 30px; }
.kids .row .pick { grid-column: 1 / 3; height: 28px; font-size: var(--fs-sm); }
.kids .row .pick::before { content: ""; position: absolute; left: -12px; top: 50%; width: 7px; height: 1px; background: var(--line-2); }
.kids .row .pick { overflow: visible; }
.tree .row.solo { grid-template-columns: minmax(0, 1fr); }
.tree .row.solo .pick { grid-column: 1; margin-left: 22px; }
.empty-note { color: var(--muted); font-size: var(--fs-sm); }

.people { margin-top: 8px; display: flex; flex-direction: column; }
.person {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  height: 36px; padding: 0 8px 0 4px; border-radius: 8px; text-align: left; transition: background .15s;
}
.person:hover { background: var(--surface); }
.person.on { background: var(--accent-wash); }
.person .avatar { width: 24px; height: 24px; font-size: var(--fs-xs); }
.person .nm { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.person.on .nm { color: var(--accent-ink); }
.person .ct { font: 400 var(--fs-xs)/1 var(--sans); color: var(--faint); }
.people .none { font-size: var(--fs-xs); color: var(--faint); padding: 8px 4px; }

.side-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.sys { display: flex; align-items: center; gap: 8px; font: 400 var(--fs-xs)/1.4 var(--sans); color: var(--muted); letter-spacing: .02em; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; position: relative; }
.pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--ok); animation: pulse 2.4s var(--ease) infinite; }
.pulse.warn { background: var(--accent); }
.pulse.warn::after { border-color: var(--accent); }
@keyframes pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.keys { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: var(--fs-xs); color: var(--muted); }
.keys span { display: inline-flex; align-items: center; gap: 4px; }
.keys kbd { margin-right: 2px; }
.scrim { display: none; }

/* ---------- masthead ---------- */
.mast { padding: 44px 0 0; position: relative; }
.eyebrow {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted);
}
.eyebrow .rule { flex: 1; height: 1px; background: var(--line); min-width: 40px; }
.eyebrow b { color: inherit; font-weight: 400; }
.headline {
  margin: 18px 0 0; font: 400 var(--fs-lg)/.9 var(--serif); letter-spacing: -.035em;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .18em;
}
.headline .num { font-variant-numeric: lining-nums tabular-nums; }
.headline .unit { font: 400 var(--fs-sm)/1 var(--sans); letter-spacing: .04em; color: var(--ink-2); }
.headline .unit em { font-style: normal; color: var(--accent); }
.headline.query { font-size: var(--fs-lg); line-height: 1; letter-spacing: -.02em; }
.headline.query .q { font-family: var(--serif); word-break: break-word; }
.headline.query .q .cn { font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.headline .lq, .headline .rq { color: var(--accent); font-style: italic; }
.headline.query { gap: 0; }
.headline.query .lq { margin-right: .06em; }
.headline.query .rq { margin-left: .04em; }
.deck {
  margin: 18px 0 0; max-width: 560px; font-size: var(--fs-md); line-height: 1.7; color: var(--ink-2);
}
.deck .m { font: 400 var(--fs-sm)/1 var(--sans); color: var(--ink); }
.facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 26px; }
.fact { display: flex; flex-direction: column; gap: 6px; }
.fact b { font: 400 var(--fs-lg)/1 var(--serif); letter-spacing: -.01em; font-variant-numeric: lining-nums; }
/* 胶囊按钮 .pill：全站唯一一套——随手翻一条 / 看全部作者 / 筛选 chip / 阅读全文 / 返回 / 空状态操作 / 移动端主题。
   32px 高、14px 字、16px 图标、白底细边；hover 浅蓝底、淡蓝边、深蓝字 */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; flex: none;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-xs);
  font-size: var(--fs-sm); font-weight: 400; white-space: nowrap; transition: background .25s, color .25s, border-color .25s;
}
.pill i { font-size: var(--ic-md); color: var(--muted); transition: color .25s, transform .4s var(--ease-out); }
.pill:hover { background: var(--accent-wash); border-color: var(--accent-line); color: var(--accent-ink); }
.pill:hover i { color: currentColor; }
/* 图标的 hover 动作按含义区分：随机 → 转半圈，关闭 → 转 90°，返回 → 左移 */
.pill:hover .ph-shuffle { transform: rotate(180deg); }
.pill:hover .ph-x { transform: rotate(90deg); }
.pill:hover .ph-arrow-left { transform: translateX(-3px); }
.shuffle { align-self: flex-end; margin-left: auto; }
.hl-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 18px; }
.hl-row .headline { margin: 0; }
.hl-row .shuffle { align-self: center; margin-left: auto; }
.fact b .sl { font-style: italic; color: var(--faint); margin: 0 .08em; }
.fact span { font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 22px; }
.chips .lbl { font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.chip { padding-right: 10px; }   /* 尾部是关闭图标，右侧略收 */
.chip-clear { font-size: var(--fs-xs); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); margin-left: 4px; }
.chip-clear:hover { color: var(--accent); }

/* 刊头与卡片列表之间的空白分隔（不再显示「目录 · N / 排序」） */
.list-head { height: 0; margin-top: 40px; }
.similar-head::before {
  content: ""; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--accent);
}

/* ---------- entries ---------- */
.results.busy > :not(.detail-top) { opacity: .45; transition: opacity .25s; }
.entry {
  position: relative; display: block; isolation: isolate;
  padding: 26px 0 24px; border-bottom: 1px solid var(--line); cursor: pointer;
  animation: rise .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.entry::before {
  content: ""; position: absolute; left: -20px; right: -20px; top: 0; bottom: 0; z-index: -1; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 55%, transparent); opacity: 0; transition: opacity .25s; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 5%, transparent), 0 12px 32px -24px rgba(14,42,56,.18);
}
.entry:hover::before, .entry.kb::before { opacity: 1; }
.meta-r { margin-left: auto; flex: none; display: flex; align-items: center; gap: 12px; padding-left: 12px; }
.no { font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: .08em; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.no b { font-weight: 400; color: var(--muted); transition: color .2s; }
.entry:hover .no b, .entry.kb .no b { color: var(--accent); }
.score { font: 400 var(--fs-xs)/1 var(--sans); color: var(--muted); display: inline-flex; gap: 6px; align-items: center; letter-spacing: .02em; }
.score .meter { width: 34px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; position: relative; }
.score .meter::after { content: ""; position: absolute; inset: 0; width: calc(var(--v) * 100%); background: var(--accent); }
.score.same { color: var(--accent-ink); background: var(--accent-wash); padding: 4px 7px; border-radius: var(--r-xs); }

.entry-body { min-width: 0; }
.byline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.byline .who { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.byline .sep { color: var(--faint); }
.byline .dt { font: 400 var(--fs-xs)/1 var(--sans); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; transition: color .2s; }
a.dt:hover { color: var(--accent); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none; object-fit: cover; background: var(--sunk);
  display: grid; place-items: center; color: var(--muted); font: 600 var(--fs-xs)/1 var(--sans);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.byline .nm { font-weight: 600; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.byline .h { font: 400 var(--fs-xs)/1 var(--sans); color: var(--muted); white-space: nowrap; transition: color .2s; }
.byline .h:hover { color: var(--accent); }

.text { margin-top: 12px; font-size: var(--fs-md); line-height: 1.75; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; color: var(--ink); }
.text.clamp { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.text a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .2s; }
.text a:hover { text-decoration-color: var(--accent); }
.more {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: .04em;
  color: var(--ink-2); padding: 6px 0;
}
.more:hover { color: var(--accent); }
.more i { font-size: var(--ic-sm); transition: transform .3s var(--ease-out); }
.more.up i { transform: rotate(180deg); }
mark { background: linear-gradient(transparent 58%, var(--mark) 58%); color: inherit; padding: 0 1px; }

.media { margin-top: 16px; display: grid; gap: 3px; border-radius: 12px; overflow: hidden; }
.media.n2, .media.n4 { grid-template-columns: 1fr 1fr; }
.media.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.media.n3 > :first-child { grid-row: span 2; }
.media .cell { position: relative; overflow: hidden; background: var(--sunk); min-height: 0; }
.media img, .media video { width: 100%; height: 100%; display: block; object-fit: cover; }
.media.n1 .cell { max-height: 540px; }
.media.n1 img, .media.n1 video { max-height: 540px; object-fit: contain; height: auto; }
.media.n1 .cell.wide img { width: 100%; }
.media:not(.n1) .cell { aspect-ratio: 4 / 3; }
.media.n3 > :first-child { aspect-ratio: auto; }
.media img { cursor: zoom-in; }
.play {
  position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(transparent 50%, rgba(0,0,0,.35));
  color: #fff; transition: background .3s;
}
.play span {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  background: rgba(8,28,40,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); transition: transform .4s var(--ease-out), background .2s;
}
.play:hover span { transform: scale(1.08); background: var(--accent); }
.play .kind { position: absolute; left: 10px; bottom: 10px; width: auto; height: auto; padding: 4px 7px; border-radius: var(--r-xs); font: 600 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); background: rgba(8,28,40,.6); box-shadow: none; transform: none; }
.play:hover .kind { background: rgba(8,28,40,.6); transform: none; }

.doc {
  margin-top: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); position: relative; overflow: hidden;
}
.doc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.doc-ic { grid-row: span 3; font-size: 26px; color: var(--accent); padding-top: 2px; }
.doc-k { font: 400 var(--fs-xs)/1.4 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.doc-t { font: 600 var(--fs-md)/1.4 var(--sans); color: var(--ink); }
.doc-p { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.doc-go { grid-column: 2; justify-self: start; margin-top: 10px; }

.lnk {
  margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, background .2s;
}
.lnk:hover { border-color: var(--line-2); background: var(--surface); }
.lnk-d { font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.lnk-t { margin-top: 7px; font-weight: 600; font-size: var(--fs-sm); line-height: 1.45; }
.lnk-s { margin-top: 3px; font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lnk-d i { font-size: var(--ic-sm); }
.lnk > i { font-size: var(--ic-lg); color: var(--muted); transition: transform .35s var(--ease-out), color .2s; }
.lnk:hover > i { transform: translate(2px, -2px); color: var(--accent); }

.qt { margin-top: 16px; padding: 16px 18px; border-radius: 12px; background: var(--sunk); position: relative; }
.qt-mark { position: absolute; right: 14px; top: 10px; font-size: 26px; color: var(--line-2); }
.qt .byline .avatar { width: 22px; height: 22px; font-size: var(--fs-xs); }
.qt .byline .nm { font-size: var(--fs-sm); }
.qt .byline .h { font-size: var(--fs-xs); }
.qt .text { font-size: var(--fs-sm); margin-top: 8px; color: var(--ink-2); }
.qt .text.clamp { -webkit-line-clamp: 6; }
.qt .doc, .qt .lnk { background: var(--surface); }

.entry-foot { margin-top: 18px; display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: var(--fs-xs);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); transition: background .25s, color .25s, border-color .25s;
}
.tag .p { color: var(--faint); }
.tag .p::after { content: "/"; margin: 0 4px; color: var(--line-2); }
.tag.manual { border-color: var(--ink-2); }
.tag:hover { border-color: var(--accent-line); color: var(--accent-ink); background: var(--accent-wash); }
.orig {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: .04em;
  color: var(--muted); padding: 6px 0; transition: color .2s;
}
.orig i { font-size: var(--ic-sm); transition: transform .3s var(--ease-out); }
.orig:hover { color: var(--accent); }
.orig:hover i { transform: translate(2px, -2px); }

/* 详情 */
.detail-top { padding: 32px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.back { padding-left: 10px; }
.detail-top .shuffle { align-self: center; }
.feature { cursor: default; border-bottom: 0; padding: 32px 0 40px; animation: rise .5s var(--ease-out) both; }
.similar-head { animation: rise .5s var(--ease-out) .08s both; }
.feature::before { display: none; }
.feature .text { font-size: var(--fs-md); line-height: 1.8; }
.feature .byline .avatar { width: 40px; height: 40px; }
.feature .byline .nm { font-size: var(--fs-md); }
.feature .media.n1 .cell, .feature .media.n1 img, .feature .media.n1 video { max-height: 720px; }
.similar-head {
  position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 26px 0 14px;
}
.similar-head::before { top: 0; }
.similar-head h2 { margin: 0; font: 400 var(--fs-lg)/1 var(--serif); letter-spacing: -.02em; }
.similar-head h2 span { font: 400 var(--fs-sm)/1 var(--sans); letter-spacing: .04em; margin-left: .5em; color: var(--ink-2); }
.similar-head .r { font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }

/* 作者页 */
.author-hero { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.author-hero .avatar { width: 64px; height: 64px; font-size: var(--fs-lg); }
.au-meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.au-name { margin: 0; font: 400 var(--fs-lg)/1.1 var(--serif); letter-spacing: -.01em; overflow-wrap: anywhere; }
.au-x { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--muted); transition: color .2s; align-self: flex-start; }
.au-x i { font-size: var(--ic-sm); transition: transform .3s var(--ease-out); }
.au-x:hover { color: var(--accent); }
.au-x:hover i { transform: translate(2px, -2px); }
.shuffle.ghost { margin-left: 0; }
.more-authors {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; margin-top: 6px; border-radius: var(--r-md);
  border: 1px dashed var(--line-2); color: var(--ink-2); font-size: var(--fs-sm); transition: border-color .2s, color .2s, background .2s;
}
.more-authors span { color: var(--faint); font-size: var(--fs-xs); }
.more-authors:hover { border-color: var(--accent-line); color: var(--accent-ink); background: var(--accent-wash); }
.more-authors:hover span { color: var(--accent); }
.byline .au { flex: none; display: block; border-radius: 50%; transition: box-shadow .2s; }
.byline .au:hover { box-shadow: 0 0 0 2px var(--accent-wash), 0 0 0 3px var(--accent); }
.byline a.nm { transition: color .2s; }
.byline a.nm:hover { color: var(--accent); }

/* 状态 */
.status { padding: 48px 0; text-align: center; }
.end { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); }
.end .logo { width: 34px; height: 34px; --knock: var(--paper); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.end span { font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; }
.loading { display: inline-flex; gap: 6px; }
.loading i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite both; }
.loading i:nth-child(2) { animation-delay: .15s; }
.loading i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
.empty { padding: 56px 0 24px; text-align: left; }
.empty h3 { margin: 0; font: 600 var(--fs-lg)/1 var(--sans); letter-spacing: .04em; }
.empty p { color: var(--ink-2); margin: 16px 0 0; max-width: 460px; }
.empty .acts { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.error { color: var(--accent-ink); font: 400 var(--fs-xs)/1.5 var(--sans); }

.skel { display: block; padding: 28px 0; border-bottom: 1px solid var(--line); }
.skel div { display: flex; flex-direction: column; gap: 10px; }
.skel span { display: block; height: 12px; border-radius: 3px; background: linear-gradient(90deg, var(--sunk) 0%, var(--line) 50%, var(--sunk) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; visibility: hidden; opacity: 0; transition: opacity .35s var(--ease), visibility 0s .35s; }
.overlay.open { visibility: visible; opacity: 1; transition: opacity .35s var(--ease); }

.reader-ov { background: var(--scrim); overflow-y: auto; overscroll-behavior: contain; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.reader-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); z-index: 2; }
.reader {
  position: relative; max-width: 780px; margin: 48px auto 80px; background: var(--surface); border-radius: 16px;
  padding: 64px 72px 80px; box-shadow: var(--shadow-pop);
  transform: translateY(40px); transition: transform .6s var(--ease-out);
  font-size: var(--fs-md); line-height: 1.9; color: var(--ink);
}
.reader-ov.open .reader { transform: none; }
.reader-x {
  position: sticky; top: 16px; float: right; margin: -40px -48px 0 0; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: var(--ic-lg); background: var(--sunk); color: var(--muted); z-index: 2; transition: background .2s, color .2s;
}
.reader-k { font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--accent); }
.reader h1 { font: 600 var(--fs-lg)/1.3 var(--sans); letter-spacing: .01em; margin: 18px 0 28px; }
.reader h2, .reader h3 { font-family: var(--sans); line-height: 1.4; margin: 2em 0 .7em; }
.reader h2 { font-size: var(--fs-lg); } .reader h3 { font-size: var(--fs-lg); }
.reader p { margin: 0 0 1.2em; }
.reader img { border-radius: 6px; display: block; margin: 1.6em auto; }
.reader a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.reader blockquote { margin: 1.6em 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--accent); color: var(--ink-2); font-family: var(--sans); }
.reader pre, .reader code { font-family: var(--sans); font-size: var(--fs-sm); }
.reader pre { background: var(--sunk); padding: 16px; border-radius: 6px; overflow-x: auto; line-height: 1.6; }
.reader :not(pre) > code { background: var(--sunk); padding: 1px 5px; border-radius: 4px; }
.reader hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.reader ul, .reader ol { padding-left: 1.4em; }
.reader .stat { color: var(--muted); }
.reader-end { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; color: var(--muted); font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: var(--track-caps); text-transform: uppercase; }
.reader-end .logo { width: 30px; height: 30px; --knock: var(--surface); }

.lightbox { background: rgba(5, 16, 24, .95); display: grid; place-items: center; }
.lb-stage { margin: 0; max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); display: grid; place-items: center; }
.lb-stage img { max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); object-fit: contain; border-radius: 4px; transform: scale(.96); opacity: 0; transition: transform .5s var(--ease-out), opacity .3s; }
.lightbox.open .lb-stage img.ready { transform: none; opacity: 1; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 20px;
  color: #eef6f9; background: rgba(255,255,255,.08); transition: background .2s, transform .3s var(--ease-out);
}
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-close { top: 20px; right: 20px; }
.lb-close:hover { transform: rotate(90deg); }
.lb-prev { left: 24px; top: 50%; margin-top: -24px; }
.lb-next { right: 24px; top: 50%; margin-top: -24px; }
.lb-count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font: 400 var(--fs-xs)/1 var(--sans); letter-spacing: .2em; color: rgba(238,246,249,.6); }



/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .brand { width: auto; }
  .wordmark .wm-cn { display: none; }
  .seg button span { display: none; }
  .seg button { padding: 0 10px; }
}
@media (max-width: 980px) {
  :root { --side-w: 300px; }
  .shell { grid-template-columns: minmax(0, 1fr); padding: 0 20px; }
  .top-inner { padding: 0 20px; gap: 12px; }
  .filter-btn { display: inline-grid; }
  .side {
    /* align-self 必须是 stretch：宽屏下的 start 会让固定定位的抽屉撑成内容高度，导致无法滚动 */
    position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; height: auto; align-self: stretch; overscroll-behavior: contain; width: min(var(--side-w), 86vw);
    background: var(--paper); padding: 0 20px 24px; border-right: 1px solid var(--line);
    transform: translateX(-102%); transition: transform .5s var(--ease-out); visibility: hidden;
  }
  .side.open { transform: none; visibility: visible; box-shadow: var(--shadow-pop); }
  .side-head {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1;
    padding: 16px 0 12px; background: var(--paper); font: 600 var(--fs-lg)/1 var(--sans);
  }
  .scrim { display: block; position: fixed; inset: 0; z-index: 60; background: var(--scrim); opacity: 0; transition: opacity .35s; }
  .scrim.show { opacity: 1; }
  .main { max-width: none; }
}
@media (max-width: 720px) {
  :root { --top-h: 64px; }
  .eyebrow { flex-wrap: nowrap; gap: 8px; font-size: var(--fs-xs); letter-spacing: .08em; white-space: nowrap; }
  .eyebrow .rule { min-width: 12px; }
  .top-inner { gap: 10px; padding: 0 16px; }
  .wordmark { display: none; }
  .search { height: 40px; }
  .search-kbd { display: none; }
  .top-tools { gap: 6px; }
  .me-pop { position: fixed; top: calc(var(--top-h) - 2px); left: auto; right: 12px; width: min(280px, calc(100vw - 24px)); }
  .search-pop { position: fixed; top: calc(var(--top-h) - 2px); left: 12px; right: 12px; }
  .sp-desc { display: none; }
  .sp-foot { display: none; }
  .search-pop .seg button i { display: none; }
  .shell { padding: 0 16px; }
  .mast { padding-top: 28px; }
  .headline { font-size: var(--fs-lg); }
  .facts { gap: 20px; }
  .fact b { font-size: var(--fs-lg); }
  .entry { padding: 22px 0; }
  .entry::before { left: -16px; right: -16px; }
  .byline .who { flex-wrap: wrap; row-gap: 4px; column-gap: 6px; }
  .byline .sep { display: none; }
  .byline .h { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .byline .who .dt { flex-basis: 100%; font-size: var(--fs-xs); }
  .meta-r { flex-direction: column; align-items: flex-end; gap: 6px; }
  .score .meter { display: none; }
  .feature { padding-top: 24px; }
  .feature .text { font-size: var(--fs-md); }
  .text { font-size: var(--fs-md); }
  .media.n1 .cell, .media.n1 img, .media.n1 video { max-height: 440px; }
  .reader { margin: 0; border-radius: 0; padding: 56px 20px 64px; min-height: 100%; font-size: var(--fs-md); }
  .reader-x { margin: -40px -4px 0 0; }
  .lb-stage, .lb-stage img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; margin: 0; }
  .lb-count { bottom: 36px; }
  .similar-head h2 { font-size: var(--fs-lg); }
  .orig .t { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* ---------- 付费墙（免费版的 Pro 功能入口） ---------- */
.row .pick.locked { color: var(--muted); }
.row .pick.locked:hover { background: transparent; color: var(--ink-2); }
.pro-badge { margin-left: 8px; padding: 1px 5px; border-radius: var(--r-xs); font: 600 var(--fs-xs)/1.2 var(--sans); letter-spacing: .06em; color: var(--accent); background: var(--accent-wash); }
.pro-badge[hidden] { display: none; }
.seg button.locked { color: var(--faint); }
.seg button.locked::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .7; }
.play.locked span:first-child { background: rgba(8,28,40,.6); }
.pw-ov { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: var(--scrim); backdrop-filter: blur(4px); animation: pw-in .25s var(--ease-out); }
.pw-ov[hidden] { display: none; }
.pw { position: relative; width: min(400px, 100%); padding: 24px; border-radius: var(--r-2xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); }
.pw-x { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.pw-x:hover { background: var(--sunk); color: var(--ink); }
.pw-k { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--accent); }
.pw h3 { margin: 10px 0 6px; font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.pw p { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; }
.pw ul { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.pw li { display: flex; align-items: center; gap: 8px; }
.pw li i { color: var(--ok); }
.pw-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pw-act .off { color: var(--muted); cursor: default; }
.pw-act .off:hover { background: var(--surface); border-color: var(--line-2); color: var(--muted); }
@keyframes pw-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pw-ov { animation: none; } }
