/* 聆迹 LingJi 站点样式
 * 设计令牌沿用 lingji-index.html 的 slate-teal 风格（OKLCH 换算为 sRGB 色值，兼容旧浏览器），
 * 在此基础上提供：浅色 / 深色 两种模式 × 7 套配色主题（青岚 / 暮光 / 樱语 / 林间 / 琥珀 / 赛博 / 极光）。
 * 移动端使用底部 Tab 导航，不再使用侧边栏。 */

/* ===== 色板（由 OKLCH 设计令牌换算为 sRGB，兼容旧浏览器）===== */
:root { --bg: #f2f6f8; --bg-elev: #fafcfe; --bg-soft: #e3e9ed; --line: #cfd5da; --line-soft: #e3e9ed; --text: #05080a; --text-2: #474e54; --text-3: #6b7379; --text-4: #9ea6ab; --accent: #0095b5; --accent-hover: #046f87; --accent-soft: #def7ff; --accent-ink: #034a5b; --accent-2: #4d84df; --accent-2-soft: #ebf2fe; --code-bg: #ebeff2; --mark: #f0de99; --ok-bg: #daf7e3; --ok-ink: #00502b; color-scheme: light; }
:root[data-theme="dark"] { --bg: #05080a; --bg-elev: #0c1013; --bg-soft: #12171a; --line: #1f2529; --line-soft: #171b1f; --text: #e8ecef; --text-2: #80878d; --text-3: #636a6f; --text-4: #4e5358; --accent: #00a9cd; --accent-hover: #25c0e6; --accent-soft: #001f27; --accent-ink: #4ac9ec; --accent-2: #699ef5; --accent-2-soft: #0f1b2d; --code-bg: #101418; --mark: #4e420d; --ok-bg: #032110; --ok-ink: #59b47d; color-scheme: dark; }
html[data-skin="teal"] { --bg: #f2f6f8; --bg-elev: #fafcfe; --bg-soft: #e3e9ed; --line: #cfd5da; --line-soft: #e3e9ed; --text: #05080a; --text-2: #474e54; --text-3: #6b7379; --text-4: #9ea6ab; --accent: #0095b5; --accent-hover: #046f87; --accent-soft: #def7ff; --accent-ink: #034a5b; --accent-2: #4d84df; --accent-2-soft: #ebf2fe; --code-bg: #ebeff2; --mark: #f0de99; --ok-bg: #daf7e3; --ok-ink: #00502b; }
html[data-skin="teal"][data-theme="dark"] { --bg: #05080a; --bg-elev: #0c1013; --bg-soft: #12171a; --line: #1f2529; --line-soft: #171b1f; --text: #e8ecef; --text-2: #80878d; --text-3: #636a6f; --text-4: #4e5358; --accent: #00a9cd; --accent-hover: #25c0e6; --accent-soft: #001f27; --accent-ink: #4ac9ec; --accent-2: #699ef5; --accent-2-soft: #0f1b2d; --code-bg: #101418; --mark: #4e420d; --ok-bg: #032110; --ok-ink: #59b47d; }
html[data-skin="dusk"] { --bg: #f4f4fa; --bg-elev: #fbfbff; --bg-soft: #e7e7f0; --line: #d3d3df; --line-soft: #e7e7f0; --text: #07070c; --text-2: #4c4c58; --text-3: #70707e; --text-4: #a3a3b1; --accent: #7e75de; --accent-hover: #5d52b4; --accent-soft: #f0f0fe; --accent-ink: #3e3383; --accent-2: #bb5faa; --accent-2-soft: #ffebf9; --code-bg: #edeef5; --mark: #f0de99; --ok-bg: #daf7e3; --ok-ink: #00502b; }
html[data-skin="dusk"][data-theme="dark"] { --bg: #07070c; --bg-elev: #0f0e16; --bg-soft: #15151d; --line: #23232d; --line-soft: #1a1a22; --text: #eaeaf2; --text-2: #858592; --text-3: #686873; --text-4: #51515b; --accent: #908aea; --accent-hover: #a6a1fd; --accent-soft: #19182c; --accent-ink: #b0adff; --accent-2: #d37bc1; --accent-2-soft: #261322; --code-bg: #13131b; --mark: #4e420d; --ok-bg: #032110; --ok-ink: #59b47d; }
html[data-skin="sakura"] { --bg: #faf3f6; --bg-elev: #fffafc; --bg-soft: #f0e4e9; --line: #ded0d6; --line-soft: #f0e4e9; --text: #0b0608; --text-2: #57484f; --text-3: #7c6d73; --text-4: #afa0a6; --accent: #c85b8b; --accent-hover: #9e3967; --accent-soft: #feecf2; --accent-ink: #711d46; --accent-2: #ce5f59; --accent-2-soft: #feedec; --code-bg: #f4ecef; --mark: #f0de9d; --ok-bg: #daf7e3; --ok-ink: #00502b; }
html[data-skin="sakura"][data-theme="dark"] { --bg: #0b0608; --bg-elev: #150c10; --bg-soft: #1c1317; --line: #2c2025; --line-soft: #21171c; --text: #f1e8ec; --text-2: #908188; --text-3: #72656a; --text-4: #5a4f54; --accent: #d7739c; --accent-hover: #eb8cb2; --accent-soft: #28131b; --accent-ink: #f198bb; --accent-2: #e57b74; --accent-2-soft: #2a1311; --code-bg: #1a1115; --mark: #4d4212; --ok-bg: #032110; --ok-ink: #59b47d; }
html[data-skin="forest"] { --bg: #f1f7f3; --bg-elev: #f9fdfa; --bg-soft: #e2eae4; --line: #cdd7d0; --line-soft: #e2eae4; --text: #040906; --text-2: #455048; --text-3: #69756d; --text-4: #9ca8a0; --accent: #319e54; --accent-hover: #037835; --accent-soft: #e5f8e8; --accent-ink: #005121; --accent-2: #06999f; --accent-2-soft: #ddf8f9; --code-bg: #eaf0ec; --mark: #f0de9d; --ok-bg: #daf7e3; --ok-ink: #00502b; }
html[data-skin="forest"][data-theme="dark"] { --bg: #040906; --bg-elev: #0a110d; --bg-soft: #111813; --line: #1d2720; --line-soft: #151d18; --text: #e7ede8; --text-2: #7e8a81; --text-3: #626c65; --text-4: #4c554f; --accent: #53af6b; --accent-hover: #70c484; --accent-soft: #0c1f11; --accent-ink: #80cc90; --accent-2: #00b4bb; --accent-2-soft: #002021; --code-bg: #0f1611; --mark: #4d4212; --ok-bg: #032110; --ok-ink: #59b47d; }
html[data-skin="amber"] { --bg: #f9f4ef; --bg-elev: #fefbf8; --bg-soft: #ede7de; --line: #dbd3c8; --line-soft: #ede7de; --text: #0a0703; --text-2: #544c40; --text-3: #797064; --text-4: #aca397; --accent: #c16f00; --accent-hover: #915100; --accent-soft: #ffeee1; --accent-ink: #633500; --accent-2: #d45b45; --accent-2-soft: #ffedea; --code-bg: #f3eee7; --mark: #f1de95; --ok-bg: #daf7e3; --ok-ink: #00502b; }
html[data-skin="amber"][data-theme="dark"] { --bg: #0a0703; --bg-elev: #140e07; --bg-soft: #1b150d; --line: #2a2319; --line-soft: #1f1a12; --text: #efeae4; --text-2: #8e8579; --text-3: #6f685d; --text-4: #585148; --accent: #d7801f; --accent-hover: #eb9849; --accent-soft: #281604; --accent-ink: #f1a45d; --accent-2: #eb7862; --accent-2-soft: #2b130e; --code-bg: #18130b; --mark: #4f4108; --ok-bg: #032110; --ok-ink: #59b47d; }
html[data-skin="cyber"] { --bg: #f4f4fd; --bg-elev: #fbfbfe; --bg-soft: #e6e6f5; --line: #d2d2e4; --line-soft: #e6e6f5; --text: #07060f; --text-2: #4b4b5e; --text-3: #6f6f84; --text-4: #a2a2b6; --accent: #cb41c5; --accent-hover: #a1139c; --accent-soft: #ffebfc; --accent-ink: #70006d; --accent-2: #069c89; --accent-2-soft: #d3fcf3; --code-bg: #ededf8; --mark: #f9dd72; --ok-bg: #daf7e3; --ok-ink: #00502b; }
html[data-skin="cyber"][data-theme="dark"] { --bg: #07060f; --bg-elev: #0e0e19; --bg-soft: #151521; --line: #222232; --line-soft: #191925; --text: #eaeaf5; --text-2: #848497; --text-3: #676778; --text-4: #515160; --accent: #da60d2; --accent-hover: #ee7ce6; --accent-soft: #290f27; --accent-ink: #f48bec; --accent-2: #00b8a1; --accent-2-soft: #00201b; --code-bg: #13121e; --mark: #4f4101; --ok-bg: #032110; --ok-ink: #59b47d; }
html[data-skin="aurora"] { --bg: #f1f6fa; --bg-elev: #f9fcff; --bg-soft: #e2e9f0; --line: #cdd5df; --line-soft: #e2e9f0; --text: #04080c; --text-2: #454e58; --text-3: #69737e; --text-4: #9ca6b0; --accent: #099c86; --accent-hover: #027463; --accent-soft: #ddf9f2; --accent-ink: #004e42; --accent-2: #5e7fe4; --accent-2-soft: #edf2fe; --code-bg: #eaeff5; --mark: #f1de95; --ok-bg: #daf7e3; --ok-ink: #00502b; }
html[data-skin="aurora"][data-theme="dark"] { --bg: #04080c; --bg-elev: #0a1016; --bg-soft: #11171d; --line: #1d252d; --line-soft: #151b22; --text: #e6ecf1; --text-2: #7e8792; --text-3: #626a73; --text-4: #4c535b; --accent: #01b198; --accent-hover: #0ec9ae; --accent-soft: #00211b; --accent-ink: #42d1b7; --accent-2: #7799fa; --accent-2-soft: #12192e; --code-bg: #0e141b; --mark: #4f4108; --ok-bg: #032110; --ok-ink: #59b47d; }


/* ===== 非颜色令牌 ===== */
:root {
  --radius: 16px; --radius-md: 12px; --radius-sm: 8px; --card-radius: var(--radius);
  --maxw: 1120px; --read: 720px; --header-h: 60px; --tab-h: 58px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --display: var(--sans);
  --warm: #c98a1b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 0 0 1px var(--line-soft);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .08), 0 0 0 1px var(--line-soft);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .12), 0 0 0 1px var(--line-soft);
  --shadow: var(--shadow-md);
}
:root[data-theme="dark"] {
  --warm: #e0b050;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35), 0 0 0 1px var(--line-soft);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .4), 0 0 0 1px var(--line-soft);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5), 0 0 0 1px var(--line-soft);
}
/* 各主题的「性格」：圆角、标题字体、阴影 */
html[data-skin="sakura"] { --radius: 22px; --radius-md: 16px; --radius-sm: 10px; --display: var(--serif); }
html[data-skin="forest"] { --card-radius: 24px 8px 24px 8px; }
html[data-skin="amber"] { --radius: 18px; --display: var(--serif); }
html[data-skin="cyber"] { --radius: 6px; --radius-md: 5px; --radius-sm: 3px; --display: var(--mono); }
html[data-skin="aurora"] { --radius: 20px; --radius-md: 14px; }

/* ===== 基础 ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); font-size: clamp(14px, 13.2px + .22vw, 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 1rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-wrap: anywhere; overflow-x: hidden;
  animation: page-in .5s ease both; -webkit-tap-highlight-color: transparent;
}
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { from { transform: translate(0, 0) scale(1); } to { transform: translate(4%, 6%) scale(1.12); } }
@keyframes shine { to { background-position: 200% center; } }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 var(--accent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
@keyframes halo { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.35); opacity: 0; } }
@view-transition { navigation: auto; }
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after { transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease !important; }
img, video, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; font-weight: 650; letter-spacing: .01em; }
p { margin: 0; }
small { font-size: .8em; color: var(--text-3); }
mark { background: var(--mark); color: inherit; padding: 0 .15em; border-radius: 3px; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 12px; color: #fff; }
.page { position: relative; z-index: 1; min-height: calc(100vh - 260px); padding-bottom: 72px; animation: rise .55s var(--ease) both; }
.empty { color: var(--text-3); padding: 24px 0; }
.grad-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent)); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: var(--accent); -webkit-text-fill-color: transparent; animation: shine 6s linear infinite;
}

/* ===== 阅读进度 / 返回顶部 ===== */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: 0 50%; z-index: 70; transition: transform .1s linear; }
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-elev); color: var(--text-2); cursor: pointer; box-shadow: var(--shadow-md); display: grid; place-items: center; z-index: 40; opacity: 0; transform: translateY(10px) scale(.9); transition: opacity .3s, transform .3s var(--ease), color .2s; }
.to-top.show { opacity: 1; transform: none; }
.to-top[hidden] { display: none; }
.to-top:hover { color: var(--accent); transform: translateY(-2px); }

/* ===== 氛围层（各主题的粒子 / 光效，由 site.js 生成）===== */
.fx-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.fx-layer .p { position: absolute; display: block; will-change: transform, opacity; }
.p-bubble { left: var(--x); bottom: -40px; width: var(--s); height: var(--s); border-radius: 50%; border: 1.5px solid var(--accent); background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .4), transparent 62%); opacity: 0; animation: bubble-up var(--t) linear var(--d) infinite; }
@keyframes bubble-up { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 10% { opacity: var(--o); } 50% { transform: translate(var(--dx), -55vh) scale(1); } 100% { transform: translate(0, -118vh) scale(1.15); opacity: 0; } }
.p-star { left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--accent); box-shadow: 0 0 7px 1px var(--accent); opacity: .1; animation: twinkle var(--t) ease-in-out var(--d) infinite; }
@keyframes twinkle { 0%, 100% { opacity: .08; transform: scale(.7); } 50% { opacity: var(--o); transform: scale(1.25); } }
.p-shoot { left: var(--x); top: var(--y); width: 110px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent-2), transparent); opacity: 0; transform: rotate(28deg); animation: shoot 9s ease-in var(--d) infinite; }
@keyframes shoot { 0% { transform: translate(0, 0) rotate(28deg); opacity: 0; } 2% { opacity: .9; } 10% { transform: translate(300px, 160px) rotate(28deg); opacity: 0; } 100% { transform: translate(300px, 160px) rotate(28deg); opacity: 0; } }
.p-petal { left: var(--x); top: -30px; width: var(--s); height: calc(var(--s) * .72); border-radius: 150% 0 150% 0; background: linear-gradient(135deg, var(--accent), var(--accent-2)); opacity: 0; animation: petal-fall var(--t) linear var(--d) infinite; }
@keyframes petal-fall { 0% { transform: translate(0, -5vh) rotate(0deg); opacity: 0; } 8% { opacity: var(--o); } 50% { transform: translate(var(--dx), 50vh) rotate(300deg); } 100% { transform: translate(calc(var(--dx) * -.6), 112vh) rotate(680deg); opacity: 0; } }
.p-firefly { left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px 3px var(--accent); opacity: 0; animation: fly var(--t) ease-in-out var(--d) infinite alternate, blink 4s ease-in-out var(--d) infinite; }
@keyframes fly { from { transform: translate(0, 0); } to { transform: translate(var(--dx), var(--dy)); } }
@keyframes blink { 0%, 100% { opacity: 0; } 50% { opacity: var(--o); } }
.p-ember { left: var(--x); bottom: -20px; width: var(--s); height: var(--s); border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px 1px var(--accent-2); opacity: 0; animation: ember-up var(--t) ease-in var(--d) infinite; }
@keyframes ember-up { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 12% { opacity: var(--o); } 100% { transform: translate(var(--dx), -105vh) scale(.2); opacity: 0; } }
.p-aur { width: 62vmax; height: 62vmax; border-radius: 50%; left: var(--x); top: var(--y); background: radial-gradient(circle, var(--c) 0%, transparent 64%); opacity: .2; animation: aur var(--t) ease-in-out var(--d) infinite alternate; }
:root[data-theme="dark"] .p-aur { opacity: .3; }
@keyframes aur { from { transform: translate(-8%, -6%) scale(.9) rotate(0deg); } to { transform: translate(12%, 10%) scale(1.15) rotate(40deg); } }
.p-scan { left: 0; top: 0; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .3; animation: scan 8s linear infinite; }
@keyframes scan { from { transform: translateY(-10px); } to { transform: translateY(100vh); } }
html[data-skin="cyber"] .fx-layer::before {
  content: ""; position: absolute; left: -50%; right: -50%; bottom: -8%; height: 62%;
  background-image: linear-gradient(var(--accent) 1px, transparent 1px), linear-gradient(90deg, var(--accent) 1px, transparent 1px); background-size: 46px 46px;
  transform: perspective(420px) rotateX(62deg); transform-origin: 50% 100%; opacity: .15; animation: grid-move 3s linear infinite;
  -webkit-mask-image: linear-gradient(to top, #000, transparent); mask-image: linear-gradient(to top, #000, transparent);
}
@keyframes grid-move { to { background-position: 0 46px; } }

/* ===== 头部 ===== */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--bg); background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s; padding-top: env(safe-area-inset-top); box-sizing: content-box; view-transition-name: site-header; }
.site-header.scrolled { border-bottom-color: var(--line-soft); box-shadow: 0 6px 20px rgba(0, 0, 0, .04); }
.header-inner { position: relative; height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: .06em; flex: none; }
.brand:hover { color: var(--text); }
.brand .logo-mark { color: var(--text); flex: none; transition: transform .35s var(--ease); }
.brand:hover .logo-mark { transform: scale(1.1) rotate(-6deg); }
.brand-img { border-radius: 7px; object-fit: cover; }
.site-nav { display: flex; gap: 2px; margin-left: 6px; }
.site-nav a { position: relative; color: var(--text-2); padding: 7px 12px; border-radius: 999px; font-size: .92rem; transition: color .2s, background .2s; }
.site-nav a:hover { color: var(--text); background: var(--bg-soft); }
.site-nav a.active { color: var(--accent-ink); background: var(--accent-soft); font-weight: 600; }
.header-search { margin-left: auto; position: relative; display: flex; align-items: center; width: 230px; height: 36px; padding: 0 10px 0 12px; gap: 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; color: var(--text-3); transition: width .35s var(--ease), border-color .2s, background .2s, box-shadow .2s; }
.header-search:focus-within { width: 290px; border-color: var(--accent); background: var(--bg-elev); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent); }
.header-search svg { flex: none; }
.header-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .9rem; outline: none; padding: 0; height: 100%; }
.header-search input::placeholder { color: var(--text-3); }
.header-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-kbd { font-family: var(--mono); font-size: .68rem; line-height: 1; border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; color: var(--text-3); background: var(--bg-elev); }
.header-search:focus-within .search-kbd { display: none; }
.header-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s, transform .3s var(--ease); }
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-ink); }
#theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] #theme-toggle .i-moon { display: block; }
:root[data-theme="dark"] #theme-toggle .i-sun { display: none; }
#theme-toggle.spin svg { animation: spin .55s var(--ease); }

/* 配色主题选择器（绝对定位在 .header-inner 内，避免被 backdrop-filter 影响定位） */
.skin-pop { position: absolute; right: 12px; top: calc(100% + 8px); width: min(300px, calc(100vw - 24px)); padding: 14px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 60; transform-origin: top right; animation: pop .22s var(--ease); }
.skin-pop[hidden] { display: none; }
.skin-pop-title { font-size: .78rem; color: var(--text-3); letter-spacing: .1em; margin-bottom: 10px; }
.skin-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.skin-opt { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-md); border: 1px solid var(--line-soft); background: var(--bg); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s var(--ease), background .2s; }
.skin-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.skin-opt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.skin-dot { width: 26px; height: 26px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px var(--bg-elev), 0 0 0 1px var(--line); }
.skin-opt b { display: block; font-size: .88rem; line-height: 1.2; }
.skin-opt small { display: block; font-size: .7rem; color: var(--text-3); line-height: 1.3; }

/* ===== 移动端底部 Tab ===== */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); background: var(--bg-elev); background: color-mix(in srgb, var(--bg-elev) 90%, transparent); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); border-top: 1px solid var(--line-soft); box-shadow: 0 -6px 24px rgba(0, 0, 0, .05); view-transition-name: tabbar; }
.tab { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--text-3); font-size: 10.5px; line-height: 1.2; letter-spacing: .02em; overflow: hidden; border-radius: 12px; transition: color .25s; }
.tab:hover { color: var(--text-2); }
.tab-ico { display: grid; place-items: center; width: 44px; height: 26px; border-radius: 13px; transition: background .3s var(--ease), transform .3s var(--ease); }
.tab svg { width: 20px; height: 20px; transition: transform .3s var(--ease); }
.tab.active { color: var(--accent-ink); font-weight: 600; }
.tab.active .tab-ico { background: var(--accent-soft); transform: translateY(-1px); }
.tab.active svg { transform: scale(1.08); color: var(--accent); }
.tab:active .tab-ico { transform: scale(.9); }
.ripple-dot { position: absolute; border-radius: 50%; background: var(--accent); opacity: .28; width: 40px; height: 40px; margin: -20px 0 0 -20px; pointer-events: none; animation: ripple .55s ease-out forwards; }

/* ===== 通用组件 ===== */
.eyebrow, .eyebrow-lg { color: var(--accent); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.eyebrow-lg { font-size: .8rem; margin-bottom: 8px; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--text); font: inherit; font-size: .92rem; line-height: 1.4; cursor: pointer; overflow: hidden; transition: transform .25s var(--ease), border-color .2s, background .2s, color .2s, box-shadow .25s; }
.btn:hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 8px 20px -10px var(--accent); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.btn-primary:hover { color: #fff; border-color: transparent; filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 14px; font-size: .82rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--text-2); font-size: .82rem; border: 1px solid transparent; font-family: inherit; cursor: pointer; transition: all .2s var(--ease); }
.chip:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.chip.active, .chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.chips-lg .chip { padding: 5px 15px; font-size: .88rem; }
.tag-row { margin-top: 12px; }
.meta-line { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--text-3); font-size: .82rem; }
.section { padding-top: 64px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.section-head h2 { font-family: var(--display); font-size: 1.45rem; position: relative; padding-left: 14px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: .22em; bottom: .22em; width: 4px; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent-2)); }
.more { font-size: .88rem; color: var(--text-2); white-space: nowrap; transition: color .2s, letter-spacing .25s var(--ease); }
.more:hover { color: var(--accent); letter-spacing: .04em; }
.page-head { padding-top: 52px; padding-bottom: 26px; }
.page-head h1 { font-family: var(--display); font-size: clamp(1.6rem, 4.4vw, 2.5rem); margin-bottom: 10px; }
.lead { color: var(--text-2); font-size: 1.04rem; margin-bottom: 18px; }
.back { margin-top: 32px; }
.js .reveal:not(.in) { opacity: 0; transform: translateY(18px); }
.reveal.in { animation: rise .7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
.card { position: relative; background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--card-radius); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .25s; }
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 70%); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.card:hover::after { opacity: .9; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ===== 头像 ===== */
.avatar { position: relative; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-family: var(--display); font-size: 1.25rem; font-weight: 700; line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xs { width: 30px; height: 30px; font-size: .85rem; }
.avatar.big { width: 76px; height: 76px; font-size: 1.9rem; }
.avatar.xl { width: 96px; height: 96px; font-size: 2.4rem; border: 4px solid var(--bg-elev); }

/* ===== 首页 Hero + 博主简介 ===== */
.hero { position: relative; padding: 64px 0 28px; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto; height: 120%; pointer-events: none; z-index: -1; background: radial-gradient(ellipse 60% 50% at 30% 20%, var(--accent-soft), transparent 70%), radial-gradient(ellipse 45% 40% at 80% 10%, var(--accent-2-soft), transparent 70%); animation: float 14s ease-in-out infinite alternate; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 52px; align-items: center; }
.hero-text > * { animation: rise .8s var(--ease) backwards; }
.hero-text > :nth-child(2) { animation-delay: .08s; } .hero-text > :nth-child(3) { animation-delay: .16s; } .hero-text > :nth-child(4) { animation-delay: .24s; } .hero-text > :nth-child(5) { animation-delay: .32s; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--line); font-size: .74rem; font-weight: 600; letter-spacing: .08em; margin-bottom: 18px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse-dot 2s ease-out infinite; }
.hero-title { font-family: var(--display); font-size: clamp(1.75rem, 6vw, 3.2rem); line-height: 1.18; letter-spacing: .04em; margin-bottom: 14px; font-weight: 800; }
.hero-sub { font-size: clamp(.95rem, 2.4vw, 1.1rem); color: var(--text-2); max-width: 34em; margin-bottom: 24px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-tagline { margin-top: 22px; color: var(--text-3); font-family: var(--serif); letter-spacing: .14em; font-size: .88rem; }
html[data-skin="cyber"] .hero-tagline::after { content: "_"; margin-left: 4px; animation: blink-cursor 1s steps(1) infinite; color: var(--accent); }
@keyframes blink-cursor { 50% { opacity: 0; } }
html[data-skin="cyber"] .hero-title { text-shadow: 0 0 22px var(--accent-soft); }

.profile-card { position: relative; background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--card-radius); box-shadow: var(--shadow-md); overflow: hidden; animation: rise .9s var(--ease) .15s backwards; transition: transform .4s var(--ease), box-shadow .4s; }
.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.profile-banner { position: relative; height: 82px; color: var(--accent-ink); background: linear-gradient(120deg, var(--accent-soft), var(--accent-2-soft)); overflow: hidden; }
.profile-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); background-size: 250% 100%; animation: sheen 5s ease-in-out infinite; }
@keyframes sheen { 0% { background-position: 150% 0; } 60%, 100% { background-position: -100% 0; } }
.wave { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--accent); }
.wave-bar { fill: currentColor; opacity: .5; transform-box: fill-box; transform-origin: center; animation: wave 2.8s ease-in-out infinite; animation-delay: var(--d); }
@keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
.profile-body { padding: 0 24px 22px; text-align: center; }
.profile-avatar { position: relative; display: inline-block; margin-top: -48px; }
.profile-avatar .ring { position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: spin 7s linear infinite; }
.profile-avatar::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); animation: halo 2.6s ease-out infinite; pointer-events: none; }
.profile-name { font-family: var(--display); font-size: 1.3rem; margin-top: 12px; }
.profile-title { color: var(--accent-ink); font-size: .84rem; font-weight: 600; letter-spacing: .06em; margin-top: 2px; }
.profile-bio { color: var(--text-2); font-size: .92rem; margin-top: 10px; }
.profile-loc { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: .82rem; margin-top: 8px; }
.profile-tags { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 0; padding: 0; }
.profile-tags li { padding: 2px 11px; border-radius: 999px; font-size: .78rem; color: var(--accent-ink); background: var(--accent-soft); transition: transform .25s var(--ease); }
.profile-tags li:hover { transform: translateY(-2px) rotate(-2deg); }
.profile-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pill { padding: 2px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); font-size: .8rem; transition: all .2s; }
.pill:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }

.footprints { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 28px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.stat { padding: 20px 10px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line-soft); }
.stat strong { display: block; font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.2; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--text); }
.stat span { color: var(--text-3); font-size: .8rem; letter-spacing: .1em; }
.footprints-inline { margin: 36px 0 24px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 52px; }
.side-block { margin-bottom: 30px; }
.side-title { font-family: var(--display); font-size: 1.1rem; margin-bottom: 14px; }
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-list li { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--line); transition: transform .25s var(--ease); }
.rank-list li:hover { transform: translateX(4px); }
.rank-list .rank-n { color: var(--warm); font-family: var(--display); font-weight: 700; }
.rank-list li:nth-child(-n + 3) .rank-n { color: var(--accent); }
.rank-list a { color: var(--text); }
.rank-list a:hover { color: var(--accent); }
.rank-list small { grid-column: 2; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.cat-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line-soft); border-radius: var(--card-radius); background: var(--bg-elev); color: var(--text); overflow: hidden; transition: transform .35s var(--ease), border-color .25s, box-shadow .35s; }
.cat-card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .45s var(--ease); }
.cat-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-md); color: var(--text); }
.cat-card:hover::before { width: 100%; }
.cat-card strong { font-family: var(--display); font-size: 1.05rem; }
.cat-card span { color: var(--text-3); font-size: .82rem; min-height: 2.6em; }
.cat-card em { font-style: normal; color: var(--accent); font-size: .82rem; }
.mini-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.mini-timeline li { position: relative; padding: 8px 0 8px 16px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.mini-timeline li::before { content: ""; position: absolute; left: -24px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); transition: transform .3s var(--ease), background .3s; }
.mini-timeline li:hover::before { transform: scale(1.5); background: var(--accent); }
.mini-timeline time { color: var(--text-3); font-size: .82rem; font-variant-numeric: tabular-nums; }
.kind { font-size: .7rem; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.kind-更新 { background: var(--bg-soft); color: var(--text-2); }
.kind-收藏 { background: var(--accent-2-soft); color: var(--accent-2); }
.note-mini { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.note-mini li { padding: 10px 14px; background: var(--bg-soft); border-radius: var(--radius-md); border-left: 3px solid var(--accent); }
.note-mini b { font-size: .86rem; }
.note-mini p { color: var(--text-2); font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }

/* ===== 文章卡片 / 列表 ===== */
.card-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card-cover img { transform: scale(1.06); }
.cover-ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-soft), var(--accent-2-soft)); }
.cover-ph span { font-family: var(--display); font-size: 3rem; font-weight: 800; color: var(--accent); opacity: .55; transition: transform .6s var(--ease), opacity .3s; }
.card:hover .cover-ph span { transform: scale(1.18) rotate(-4deg); opacity: .85; }
.card-body { padding: 16px 18px 18px; }
.card-title { font-family: var(--display); font-size: 1.08rem; margin: 8px 0; }
.card-title a, .row-title a { color: var(--text); }
.card-title a:hover, .row-title a:hover { color: var(--accent); }
.card-excerpt, .row-excerpt { color: var(--text-2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-list { display: flex; flex-direction: column; }
.post-row { display: flex; gap: 22px; justify-content: space-between; padding: 24px 0; border-bottom: 1px solid var(--line-soft); transition: transform .3s var(--ease); }
.post-row:first-child { padding-top: 0; }
.post-row:hover { transform: translateX(4px); }
.post-row-main { min-width: 0; flex: 1; }
.row-title { font-family: var(--display); font-size: 1.25rem; margin: 8px 0; }
.post-row .chips { margin-top: 12px; }
.row-cover { flex: none; width: 164px; aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-soft); align-self: center; }
.row-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post-row:hover .row-cover img { transform: scale(1.07); }
.narrow-list { max-width: 860px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.page-link { color: var(--text-2); padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: .88rem; transition: all .2s; }
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-link.disabled { opacity: .4; }
.page-nums { display: flex; gap: 6px; align-items: center; }
.page-num { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); font-size: .88rem; transition: background .2s; }
.page-num:hover { background: var(--bg-soft); }
.page-num.current { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.page-gap { color: var(--text-3); }

/* ===== 按钮：涟漪 ===== */
.btn .ripple-dot, .tab .ripple-dot { background: var(--accent); }

/* ===== 留言板 ===== */
.gb-form { padding: 20px; display: grid; gap: 14px; margin-bottom: 8px; }
.gb-form:hover { transform: none; box-shadow: var(--shadow-sm); }
.gb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gb-field > span { font-size: .84rem; color: var(--text-2); font-weight: 600; }
.gb-field em { color: var(--accent-2); font-style: normal; }
.gb-field input, .gb-field textarea { width: 100%; padding: 10px 14px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s; }
.gb-field textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.gb-field input:focus, .gb-field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gb-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gb-count { color: var(--text-3); font-size: .82rem; font-variant-numeric: tabular-nums; }
.gb-tip { color: var(--text-3); font-size: .82rem; flex: 1; }
.gb-msg { min-height: 1.4em; font-size: .88rem; color: var(--ok-ink); margin: 0; }
.gb-msg.err { color: #c0392b; }
html[data-theme="dark"] .gb-msg.err { color: #ff8a7a; }
.gb-head { margin-top: 36px; }
.gb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.gb-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 16px 18px; background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--card-radius); transition: border-color .25s, transform .3s var(--ease), box-shadow .3s; }
.gb-item:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.gb-item.fresh { animation: rise .5s var(--ease), flash 2s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.gb-ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #fff; background: hsl(var(--h, 200), 58%, 50%); }
html[data-theme="dark"] .gb-ava { background: hsl(var(--h, 200), 48%, 44%); }
.gb-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.gb-meta b { font-size: .95rem; }
.gb-meta time { color: var(--text-3); font-size: .78rem; }
.gb-text { margin-top: 6px; white-space: pre-wrap; word-break: break-word; color: var(--text); font-size: .95rem; }
.gb-reply { display: flex; gap: 10px; margin-top: 12px; padding: 10px 14px; background: var(--bg-soft); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.gb-reply b { font-size: .86rem; }
.gb-reply p { margin-top: 2px; white-space: pre-wrap; word-break: break-word; color: var(--text-2); font-size: .9rem; }

/* ===== 页脚 ===== */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line-soft); background: var(--bg-soft); background: color-mix(in srgb, var(--bg-soft) 80%, transparent); padding: 38px 0 calc(24px + env(safe-area-inset-bottom)); color: var(--text-2); font-size: .9rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin-top: 10px; color: var(--text-3); }
.footer-links, .footer-social { display: flex; flex-direction: column; gap: 6px; }
.footer-links a, .footer-social a { color: var(--text-2); transition: color .2s, transform .25s var(--ease); }
.footer-links a:hover, .footer-social a:hover { color: var(--accent); transform: translateX(3px); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line-soft); color: var(--text-3); font-size: .82rem; }
.footer-bottom a { color: var(--text-3); }

/* ===== 各主题的专属细节 ===== */
html[data-skin="dusk"] body { background: radial-gradient(1200px 520px at 80% -10%, var(--accent-soft), transparent 70%), var(--bg); background-attachment: fixed; }
html[data-skin="sakura"] .card, html[data-skin="sakura"] .gb-item { box-shadow: 0 10px 30px -18px var(--accent); }
html[data-skin="forest"] .section-head h2::before { border-radius: 3px 0 3px 0; }
html[data-skin="amber"] body { background: radial-gradient(900px 400px at 10% -5%, var(--accent-soft), transparent 70%), var(--bg); background-attachment: fixed; }
html[data-skin="cyber"] .card:hover, html[data-skin="cyber"] .cat-card:hover, html[data-skin="cyber"] .gb-item:hover { box-shadow: 0 0 0 1px var(--accent), 0 0 26px -6px var(--accent); }
html[data-skin="cyber"] .btn-primary { box-shadow: 0 0 18px -4px var(--accent); }
html[data-skin="cyber"] .section-head h2 { text-transform: uppercase; letter-spacing: .06em; }
html[data-skin="aurora"] body { background: linear-gradient(180deg, var(--bg), var(--bg-soft)); background-attachment: fixed; }

/* ---- 文章页 ---- */
.post-wrap { padding-top: 40px; }
.post-head { max-width: var(--read); margin: 0 auto 28px; }
.crumbs { display: flex; gap: 8px; color: var(--text-3); font-size: .85rem; margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a { color: var(--text-3); } .crumbs a:hover { color: var(--accent); }
.post-title { font-family: var(--serif); font-size: clamp(1.8rem, 4.4vw, 2.7rem); line-height: 1.3; margin-bottom: 14px; }
.post-excerpt { color: var(--text-2); font-size: 1.1rem; margin-bottom: 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-3); font-size: .88rem; }
.post-cover { max-width: 920px; margin: 0 auto 36px; border-radius: var(--radius); overflow: hidden; }
.post-cover img { width: 100%; height: auto; display: block; }
.post-layout { display: grid; grid-template-columns: minmax(0, var(--read)) 240px; justify-content: center; gap: 56px; }
.post-main { min-width: 0; }
.toc-side { display: none; }
.toc-sticky { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 64px); overflow: auto; font-size: .88rem; padding-left: 16px; border-left: 1px solid var(--line); }
.toc-title { font-weight: 600; margin-bottom: 8px; color: var(--text-2); }
.toc-sticky ol, .toc-mobile ol { list-style: none; margin: 0; padding: 0; }
.toc-sticky a, .toc-mobile a { display: block; padding: 4px 0; color: var(--text-3); line-height: 1.5; }
.toc-sticky a:hover, .toc-mobile a:hover { color: var(--accent); }
.toc-sticky a.active { color: var(--accent); font-weight: 600; }
.toc-d3 { padding-left: 12px; } .toc-d4 { padding-left: 24px; }
.toc-mobile { margin-bottom: 24px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; background: var(--bg-elev); }
.toc-mobile summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.toc-mobile ol { margin-top: 8px; }
@media (min-width: 1100px) { .toc-side { display: block; } .toc-mobile { display: none; } .post-layout { grid-template-columns: minmax(0, var(--read)) 220px; } }
@media (max-width: 1099px) { .post-layout { grid-template-columns: minmax(0, var(--read)); } }
.post-tags { margin: 36px 0 8px; }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0 0; }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--bg-elev); transition: border-color .2s, transform .2s; }
.pn:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.pn.next { text-align: right; }
.pn span { font-family: var(--serif); }
.related { max-width: 920px; margin: 72px auto 0; }

/* 正文排版 */
.prose { font-size: 1.06rem; line-height: 1.9; color: var(--text); }
.prose > * + * { margin-top: 1.25em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--serif); margin-top: 2.2em; position: relative; }
.prose h2 { font-size: 1.55rem; padding-bottom: .35em; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 1.28rem; } .prose h4 { font-size: 1.1rem; }
.prose .anchor { position: absolute; left: -1.1em; color: var(--text-3); opacity: 0; font-weight: 400; transition: opacity .2s; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: 1; }
.prose a { border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose .anchor { border: 0; }
.prose a.attachment::before { content: "📎 "; }
.prose img, .prose video { display: block; max-width: 100%; height: auto; border-radius: 10px; margin-inline: auto; }
.prose blockquote { margin-left: 0; padding: .2em 1.2em; border-left: 3px solid var(--accent); color: var(--text-2); background: var(--bg-soft); border-radius: 0 10px 10px 0; }
.prose blockquote > * + * { margin-top: .8em; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li + li { margin-top: .3em; }
.prose li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.3em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: .15em .4em; border-radius: 6px; }
.prose pre { position: relative; background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; line-height: 1.65; font-size: .9rem; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 52px; font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.copy-btn { position: absolute; top: 6px; right: 8px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--text-2); font-size: .72rem; padding: 2px 10px; border-radius: 999px; cursor: pointer; opacity: 0; transition: opacity .2s; }
.prose pre:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
@media (hover: none) { .copy-btn { opacity: 1; } }
.prose pre.mermaid { background: transparent; border: 0; text-align: center; padding: 0; }
.prose pre.mermaid[data-processed] { overflow: visible; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 600; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.math-block { overflow-x: auto; text-align: center; padding: .4em 0; }
.hljs { color: var(--text); background: none; }
.hljs-comment, .hljs-quote { color: var(--text-3); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-doctag { color: #a2447d; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-meta .hljs-string { color: #3d7a4a; }
.hljs-number, .hljs-built_in, .hljs-type, .hljs-symbol, .hljs-bullet { color: #b8642b; }
.hljs-title, .hljs-section, .hljs-title.function_, .hljs-class .hljs-title { color: #2f6f9b; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-name, .hljs-selector-class, .hljs-selector-id { color: #8a6a1f; }
.hljs-deletion { color: #b4443a; }
[data-theme="dark"] .hljs-keyword, [data-theme="dark"] .hljs-selector-tag, [data-theme="dark"] .hljs-literal { color: #d68fc0; }
[data-theme="dark"] .hljs-string, [data-theme="dark"] .hljs-regexp { color: #8fcf9d; }
[data-theme="dark"] .hljs-number, [data-theme="dark"] .hljs-built_in, [data-theme="dark"] .hljs-type { color: #e0a070; }
[data-theme="dark"] .hljs-title, [data-theme="dark"] .hljs-section { color: #7fb7e6; }
[data-theme="dark"] .hljs-attr, [data-theme="dark"] .hljs-attribute, [data-theme="dark"] .hljs-variable, [data-theme="dark"] .hljs-name { color: #d9b86a; }

/* ---- 标签 / 资源 / 时间轴 / 搜索 / 关于 ---- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: baseline; padding: 12px 0 24px; }
.tag-item { color: var(--text-2); }
.tag-item sup { color: var(--text-3); margin-left: 3px; font-size: .65em; }
.tag-item.lv1 { font-size: .95rem; } .tag-item.lv2 { font-size: 1.15rem; } .tag-item.lv3 { font-size: 1.45rem; color: var(--text); } .tag-item.lv4 { font-size: 1.8rem; color: var(--accent); font-family: var(--serif); }
.tag-item:hover { color: var(--accent); }
.res-filter { display: flex; gap: 10px; margin: 20px 0 16px; flex-wrap: wrap; }
.res-filter input[type="search"], .res-filter select, .form-input { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--text); font: inherit; font-size: .95rem; }
.res-filter input[type="search"] { flex: 1; min-width: 200px; }
.res-filter input:focus, .res-filter select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.res-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.res-card[hidden] { display: none; }
.res-head { display: flex; gap: 12px; align-items: center; }
.res-icon { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bg-soft); }
.res-icon.big { width: 64px; height: 64px; border-radius: 16px; }
.res-letter { display: grid; place-items: center; font-family: var(--serif); font-weight: 700; color: var(--accent); background: var(--accent-soft); font-size: 1.2rem; }
.res-icon.big.res-letter { font-size: 1.8rem; }
.res-title { min-width: 0; flex: 1; }
.res-title h3 { font-size: 1.05rem; font-family: var(--serif); } .res-title h3 a { color: var(--text); }
.res-title h3 a:hover { color: var(--accent); }
.fav-btn { border: 0; background: transparent; color: var(--text-3); cursor: pointer; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: color .2s, background .2s, transform .2s; flex: none; }
.fav-btn:hover { background: var(--bg-soft); color: var(--warm); }
.fav-btn[aria-pressed="true"] { color: var(--warm); } .fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.res-desc { color: var(--text-2); font-size: .93rem; }
.res-reason { font-size: .86rem; color: var(--text-2); padding: 8px 12px; background: var(--bg-soft); border-radius: 8px; }
.res-reason span { color: var(--accent); font-weight: 600; margin-right: 8px; }
.res-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.res-foot .chips { gap: 6px; } .res-foot .chip { font-size: .78rem; padding: 1px 10px; }
.res-detail { padding-top: 40px; }
.res-detail-head { display: flex; gap: 18px; align-items: center; margin: 20px 0 20px; }
.res-detail-head h1 { font-family: var(--serif); font-size: 2rem; }
.reason { margin: 0 0 24px; padding: 14px 20px; border-left: 3px solid var(--accent); background: var(--bg-soft); border-radius: 0 10px 10px 0; color: var(--text-2); }
.reason strong { display: block; color: var(--accent); font-size: .85rem; margin-bottom: 4px; }
.res-links { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.timeline { padding-bottom: 24px; }
.about-timeline { margin-top: 56px; padding-top: 8px; scroll-margin-top: calc(var(--header-h) + 16px); }
.about-tl-title { font-family: var(--display); font-size: 1.6rem; margin-bottom: 8px; }
.tl-year h2, .tl-year h3 { font-family: var(--serif); font-size: 2rem; margin: 32px 0 8px; color: var(--accent); }
.tl-month { border-left: 1px solid var(--line); margin-left: 6px; padding: 4px 0 4px 24px; position: relative; }
.tl-month h3, .tl-month h4 { font-size: 1rem; color: var(--text-2); margin: 12px 0 6px; }
.tl-month::before { content: ""; position: absolute; left: -5px; top: 18px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.tl-month ul { list-style: none; padding: 0; margin: 0; }
.tl-month li { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 6px 0; }
.tl-month time { color: var(--text-3); font-size: .85rem; font-variant-numeric: tabular-nums; min-width: 3.2em; }
.tl-month li a { color: var(--text); } .tl-month li a:hover { color: var(--accent); }
.result-list { list-style: none; padding: 0; margin: 0; }
.result-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.result-list li > a { font-family: var(--serif); font-size: 1.2rem; color: var(--text); }
.result-list li > a:hover { color: var(--accent); }
.result-list p { color: var(--text-2); font-size: .93rem; margin: 6px 0 4px; }
.type { display: inline-block; margin-right: 10px; font-size: .72rem; padding: 1px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); vertical-align: 2px; }
.about-card { display: flex; gap: 18px; align-items: center; padding: 22px; background: var(--bg-soft); border-radius: var(--radius); margin-bottom: 32px; }
.about-card p { color: var(--text-2); }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.facts dt { color: var(--text-3); } .facts dd { margin: 0; }
.error-page { padding-top: 96px; text-align: center; }
.error-code { font-family: var(--serif); font-size: 5.5rem; color: var(--accent); line-height: 1; margin-bottom: 12px; }
.error-page .lead { margin: 12px 0 28px; }


/* ===== 文章页 / 资源 / 时间轴 等页面的细节增强（上方为沿用的正文排版规则）===== */
.post-title { font-family: var(--display); font-size: clamp(1.45rem, 4.8vw, 2.6rem); }
.post-cover { box-shadow: var(--shadow-md); }
.prose h2 { border-bottom-color: var(--line-soft); }
.prose h2::before { content: ""; display: inline-block; width: 5px; height: .9em; margin-right: 10px; vertical-align: -.08em; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent-2)); }
.prose blockquote { border-left-color: var(--accent); }
.prose a { border-bottom-color: var(--accent); }
.pn { transition: border-color .2s, transform .3s var(--ease), box-shadow .3s; }
.pn:hover { box-shadow: var(--shadow-sm); }
.tag-item { display: inline-block; transition: transform .3s var(--ease), color .2s; }
.tag-item:hover { transform: translateY(-3px) scale(1.06); }
.res-card:hover { border-color: var(--accent); }
.fav-btn[aria-pressed="true"] { animation: pop-star .4s var(--ease); }
@keyframes pop-star { 0% { transform: scale(.7); } 60% { transform: scale(1.3) rotate(12deg); } 100% { transform: scale(1); } }
.tl-year h2, .tl-year h3 { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--accent); display: inline-block; }
.tl-month { border-left: 2px solid var(--line); }
.tl-month::before { left: -6px; width: 10px; height: 10px; box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse-dot 3s ease-out infinite; }
.tl-month li { transition: transform .25s var(--ease); }
.tl-month li:hover { transform: translateX(4px); }
.result-list li { transition: transform .25s var(--ease); }
.result-list li:hover { transform: translateX(4px); }
.about-card { background: var(--bg-soft); border: 1px solid var(--line-soft); }
.about-card strong { font-family: var(--display); font-size: 1.15rem; }
.about-loc { font-size: .84rem; color: var(--text-3) !important; }
.error-code { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shine 6s linear infinite; background-size: 200% auto; }
.res-filter { display: flex; gap: 10px; margin: 18px 0 14px; flex-wrap: wrap; }
.res-filter input[type="search"], .res-filter select { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--text); font: inherit; font-size: .92rem; }
.res-filter input[type="search"] { flex: 1; min-width: 160px; }
.res-filter input:focus, .res-filter select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ===== 明暗切换的圆形扩散动画（View Transitions，不支持时自动降级为渐变）===== */
html.vt-theme::view-transition-old(root), html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.vt-theme::view-transition-new(root) { z-index: 9999; }
html.vt-theme .site-header, html.vt-theme .tabbar { view-transition-name: none; }

/* ===== 响应式：桌面 → 平板 → 手机（手机使用底部 Tab，不再有侧边栏）===== */
@media (max-width: 1100px) {
  .header-search { width: 170px; }
  .header-search:focus-within { width: 220px; }
  .site-nav a { padding: 7px 10px; font-size: .88rem; }
  .split { grid-template-columns: minmax(0, 1fr) 260px; gap: 36px; }
}
@media (max-width: 960px) {
  .hero { padding-top: 40px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --header-h: 54px; }
  .site-nav, .search-kbd { display: none; }
  .header-inner { gap: 8px; }
  .brand-name { font-size: 1.05rem; }
  .header-search { flex: 1; width: auto; min-width: 0; margin-left: 6px; height: 34px; }
  .header-search:focus-within { width: auto; }
  .icon-btn { width: 36px; height: 36px; }
  .tabbar { display: flex; }
  body { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
  .to-top { bottom: calc(var(--tab-h) + 14px + env(safe-area-inset-bottom)); width: 38px; height: 38px; }
  .site-footer { padding-bottom: 20px; }
  .skin-pop { right: 8px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .section { padding-top: 40px; }
  .section-head { margin-bottom: 16px; }
  .section-head h2 { font-size: 1.2rem; }
  .page-head { padding-top: 28px; padding-bottom: 18px; }
  .lead { font-size: .96rem; }
  .hero { padding: 26px 0 14px; }
  .hero-badge { font-size: .7rem; margin-bottom: 12px; }
  .hero-sub { margin-bottom: 18px; }
  .hero-cta .btn { padding: 8px 16px; font-size: .88rem; }
  .hero-tagline { margin-top: 16px; font-size: .8rem; }
  .profile-banner { height: 64px; }
  .profile-body { padding: 0 18px 18px; }
  .profile-avatar { margin-top: -40px; }
  .avatar.xl { width: 80px; height: 80px; font-size: 2rem; }
  .profile-name { font-size: 1.15rem; }
  .profile-bio { font-size: .88rem; }
  .footprints { grid-template-columns: repeat(2, 1fr); margin-top: 18px; }
  .stat { padding: 14px 8px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .post-row { flex-direction: column-reverse; gap: 12px; padding: 18px 0; }
  .post-row:hover { transform: none; }
  .row-cover { width: 100%; aspect-ratio: 16 / 9; }
  .row-title { font-size: 1.08rem; }
  .card-body { padding: 14px 16px 16px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cat-card { padding: 14px; }
  .gb-row { grid-template-columns: minmax(0, 1fr); }
  .gb-form { padding: 16px; }
  .gb-item { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 14px; }
  .gb-ava { width: 34px; height: 34px; font-size: .9rem; }
  .gb-foot .btn { margin-left: auto; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .footer-links, .footer-social { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .prose { font-size: 1.02rem; line-height: 1.85; }
  .prose .anchor { display: none; }
  .prose h2 { font-size: 1.3rem; } .prose h3 { font-size: 1.14rem; }
  .prev-next { grid-template-columns: minmax(0, 1fr); }
  .pn.next { text-align: left; }
  .pagination { justify-content: center; }
  .page-nums { order: -1; width: 100%; justify-content: center; }
  .res-detail-head h1 { font-size: 1.5rem; }
  .facts { grid-template-columns: 84px 1fr; }
  .about-card { flex-direction: column; text-align: center; }
  .post-wrap { padding-top: 24px; }
  .error-code { font-size: 4rem; }
}
@media (max-width: 360px) {
  .brand-name { display: none; }
  .tab { font-size: 10px; }
}
@media (hover: none) { .card::after { display: none; } .card:hover, .cat-card:hover, .gb-item:hover { transform: none; } }
/* ===== 手机端：禁止左右滑动，页面宽度锁定为屏幕宽度 =====
 * 只靠 body 的 overflow-x 在 iOS / 部分安卓浏览器里仍可横向拖动，所以同时处理 html；
 * 使用 overflow-x: clip（不产生滚动容器，不影响 position: sticky 的导航栏），旧浏览器保持原有 body 行为。 */
html, body { width: 100%; max-width: 100%; }
@supports (overflow: clip) {
  html { overflow-x: hidden; }
  body { overflow-x: clip; }
  .hero { overflow-x: clip; }
}
@media (max-width: 900px) {
  html { overscroll-behavior-x: none; }
  body { position: relative; overscroll-behavior-x: none; }
  img, video, canvas, iframe { max-width: 100%; }
  .prose pre, .math-block, .table-wrap { max-width: 100%; }
}
/* 触屏设备没有真正的 hover，避免点击后停留的位移（translateX）把页面向右撑出 */
@media (hover: none) {
  .post-row:hover, .rank-list li:hover, .tl-month li:hover, .result-list li:hover, .mini-timeline li:hover,
  .footer-links a:hover, .footer-social a:hover { transform: none; }
}

@media print { .site-header, .site-footer, .to-top, .progress, .tabbar, .fx-layer, .toc-side, .toc-mobile, .skin-pop { display: none !important; } body { background: #fff; color: #000; padding: 0; } }
