/* ============================================================
   popo · 设计系统
   视觉语言参考 Lunaris (MIT) —— 冷灰青 + 奶油黄点色 + 玻璃胶囊
   零依赖：原生 CSS，无构建
   ============================================================ */

/* ---------------------------------------------------------- 令牌 */
:root {
  /* Lunaris 原始色板 */
  --paper: #edf2f4;
  --surface: #f7f9f9;
  --ink: #1b2a34;
  --muted: #687b86;
  --border: #c9d5da;
  --accent: #7399a4;
  --accent-strong: #3f626f;
  --accent-soft: #dce7eb;
  --cyan: #78aeb8;
  --coral: #978594;
  --mint: #dfe9e6;
  --warm: #8b6f73;

  /* 深色点缀（Hero / 品牌块 / 月亮便签） */
  --night: #313654;
  --night-2: #30354f;
  --cream: #fff5cb;
  --cream-2: #fff0a9;

  /* 派生 */
  --ink-2: #3f626f;
  --ink-3: var(--muted);
  --ink-4: #8a9ba4;
  --line: rgba(80, 117, 130, 0.16);
  --line-2: rgba(52, 70, 82, 0.24);
  --white: #ffffff;
  --paper-2: #e2eaee;

  /* 玻璃 */
  --glass: rgba(239, 246, 248, 0.88);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --glass-border: rgba(203, 220, 227, 0.82);
  --blur: 20px;

  /* 阴影 */
  --shadow-sm: 0 8px 26px rgba(38, 70, 84, 0.08);
  --shadow: 0 12px 34px rgba(35, 54, 65, 0.06);
  --shadow-md: 0 16px 44px rgba(47, 42, 72, 0.12);
  --shadow-hover: 0 18px 42px rgba(35, 54, 65, 0.1);
  --shadow-lg: 0 28px 80px rgba(31, 52, 64, 0.13);
  --inset-hi: inset 0 1px 0 rgba(255, 255, 255, 0.58);

  /* 字体：标题 Georgia 衬线，正文 Inter/Noto Sans */
  --font-serif: Georgia, 'Times New Roman', 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --font-sans: Inter, 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* 尺寸 */
  --card-radius: 8px;
  --radius-sm: 10px;
  --radius-lg: 17px;
  --radius-xl: 22px;
  /* 内容区：常规屏几乎铺满（左右各留 3.5%），只在超宽屏（>2000px）才封顶，
     避免一行文字拉到 200 字以上；导航与之对齐 */
  --wrap: min(1440px, 100vw - 7vw);
  --wrap-nav: min(1440px, 100vw - 5vw);
  --content-width: 1240px;
  --nav-h: 100px;

  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);

  color-scheme: light;
}

/* 暗色：夜蓝底 + 原站深紫点缀 */
[data-theme='dark'] {
  /* 夜：深靛蓝而非纯黑，留一点空气感和蓝紫调 */
  --paper: #1d2739;
  --surface: #26334a;
  --ink: #e8eef7;
  --muted: #a3b4cc;
  --border: #3a4a63;
  --accent: #96bccb;
  --accent-strong: #c3dde6;
  --accent-soft: #2e3f56;
  --coral: #c4a8bd;
  --mint: #2a3d4d;

  --ink-2: #c3dde6;
  --ink-3: #a3b4cc;
  --ink-4: #7b8fa8;
  --line: rgba(168, 196, 222, 0.16);
  --line-2: rgba(168, 196, 222, 0.24);
  --white: #26334a;
  --paper-2: #2a3852;

  --glass: rgba(38, 51, 74, 0.82);
  --glass-strong: rgba(38, 51, 74, 0.92);
  --glass-border: rgba(168, 196, 222, 0.2);
  --shadow-sm: 0 8px 26px rgba(8, 14, 26, 0.4);
  --shadow: 0 12px 34px rgba(8, 14, 26, 0.34);
  --shadow-md: 0 16px 44px rgba(8, 14, 26, 0.44);
  --shadow-hover: 0 18px 42px rgba(8, 14, 26, 0.48);
  --shadow-lg: 0 28px 80px rgba(8, 14, 26, 0.52);
  --inset-hi: inset 0 1px 0 rgba(255, 255, 255, 0.08);

  color-scheme: dark;
}

/* ---------------------------------------------------------- 基础 */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 兜底：任何情况下都不许出现横向滚动条。
   注意：不能在 html 上加 overflow-x: hidden —— 那会让滚动容器变成 html，
   导致 .site-nav 的 position: sticky 直接失效。只在 body 上兜底。 */
body {
  max-width: 100vw;
  overflow-x: hidden;
}
/* 可能撑出画面的装饰元素统一收口 */
.hero-img,
.article-hero .hero-img,
.obs-sky,
.gallery-wall {
  max-width: 100%;
}

img, svg { max-width: 100%; display: block; }
svg:not([width]):not([height]) { max-width: 1.15em; max-height: 1.15em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: rgba(115, 153, 164, 0.28); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 背景层（原本的插画背景，压到很淡做氛围） */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--paper) url('/img/bg-2.jpg') center/cover no-repeat fixed;
  opacity: 0.5;
}
.bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(237, 242, 244, 0.82), rgba(237, 242, 244, 0.94));
}
[data-theme='dark'] .bg-layer { opacity: 0.3; }
[data-theme='dark'] .bg-layer::after {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(58, 78, 110, 0.5), transparent 70%),
    linear-gradient(180deg, rgba(29, 39, 57, 0.88), rgba(23, 31, 46, 0.96));
}

.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
[data-theme='dark'] .bg-grain { mix-blend-mode: screen; opacity: 0.1; }

/* ---------------------------------------------------------- 容器 */
.wrap { width: var(--wrap); max-width: calc(100% - 40px); margin-inline: auto; padding-block: 76px 104px; min-height: calc(100svh - 170px); }
.wrap-wide { width: min(var(--wrap-nav), calc(100% - 48px)); margin-inline: auto; }

/* ---------------------------------------------------------- 导航 */
.site-nav {
  position: sticky;
  z-index: 60;
  top: 0;
  width: 100%;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(231, 240, 243, 0.72);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(115%);
  transition: background-color 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

/* 首页：导航变成叠在 Hero 上的半透明条 */
body.is-home .site-nav {
  position: absolute;
  inset: 0 0 auto;
  border-bottom-color: rgba(235, 246, 250, 0.14);
  background: rgba(18, 35, 47, 0.18);
  box-shadow: none;
  backdrop-filter: blur(12px) saturate(110%);
}
body.is-home.is-scrolled .site-nav {
  position: fixed;
  border-bottom-color: rgba(235, 246, 250, 0.2);
  background: rgba(24, 40, 52, 0.72);
  box-shadow: 0 10px 30px rgba(12, 31, 44, 0.28);
  backdrop-filter: blur(22px) saturate(120%);
}

.nav-inner {
  position: relative;
  display: flex;
  width: min(var(--wrap-nav), calc(100% - 48px));
  min-height: 76px;
  align-items: center;
  gap: 24px;
  margin-inline: auto;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: var(--glass);
  box-shadow: 0 18px 46px rgba(38, 70, 84, 0.13);
  padding: 9px 26px;
  backdrop-filter: blur(20px) saturate(125%);
  transition: background-color 240ms ease, border-color 240ms ease;
}
body.is-home .nav-inner {
  border-color: rgba(235, 246, 250, 0.34);
  background: rgba(27, 52, 68, 0.28);
  box-shadow: 0 16px 46px rgba(12, 31, 44, 0.2);
}
/* 暗色下首页导航：Hero 本身就是深色，玻璃层再叠灰会脏，改成更透明的夜蓝 */
[data-theme='dark'] .nav-inner {
  border-color: rgba(186, 212, 234, 0.24);
  background: rgba(24, 33, 49, 0.94);
  box-shadow: 0 18px 46px rgba(6, 12, 24, 0.5);
}
[data-theme='dark'] body.is-home .nav-inner,
body.is-home[data-theme='dark'] .nav-inner {
  border-color: rgba(210, 234, 244, 0.26);
  background: rgba(18, 26, 41, 0.82);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
/* 导航文字在暗色玻璃底上要足够亮，否则整条导航会糊成一片 */
[data-theme='dark'] .nav-link { color: #c9d8ea; }
[data-theme='dark'] .nav-link:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
[data-theme='dark'] .nav-link.is-active { color: #ffffff; background: rgba(150, 188, 203, 0.26); }
[data-theme='dark'] body.is-home .nav-link,
body.is-home[data-theme='dark'] .nav-link { color: #d3e0ef; }
[data-theme='dark'] body.is-home .nav-link.is-active,
body.is-home[data-theme='dark'] .nav-link.is-active { color: #ffffff; background: rgba(150, 188, 203, 0.3); }
[data-theme='dark'] .brand-name { color: #f2f6fb; }
[data-theme='dark'] .brand-sub { color: #9fb2c8; }
[data-theme='dark'] .icon-btn { border-color: rgba(186, 212, 234, 0.24); background: rgba(255, 255, 255, 0.08); color: #c9d8ea; }
[data-theme='dark'] .icon-btn:hover { background: rgba(255, 255, 255, 0.16); color: #ffffff; }

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--night);
  color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.brand-mark svg { width: 30px; height: 30px; display: block; }
.brand-text { display: grid; gap: 4px; line-height: 1.06; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 23.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand-sub {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.155em;
  text-transform: uppercase;
}
body.is-home .brand-mark {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(255, 245, 203, 0.22);
  backdrop-filter: blur(6px);
}
body.is-home .brand-name { color: #fff; }
body.is-home .brand-sub { color: rgba(255, 255, 255, 0.72); }

/* 导航链接：胶囊组 + 珊瑚色圆点 */
.nav-links {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
  transform: translateX(-50%);
}
body.is-home .nav-links {
  border-color: rgba(235, 246, 250, 0.24);
  background: rgba(255, 255, 255, 0.1);
}
/* 暗色：白 42% 的底槽会变成一块灰板，把白字淹掉，改成深色薄片 */
[data-theme='dark'] .nav-links {
  border-color: rgba(186, 212, 234, 0.22);
  background: rgba(255, 255, 255, 0.055);
}
[data-theme='dark'] body.is-home .nav-links,
body.is-home[data-theme='dark'] .nav-links {
  border-color: rgba(210, 234, 244, 0.2);
  background: rgba(255, 255, 255, 0.075);
}

.nav-link {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  border-radius: 11px;
  padding-inline: 15px;
  color: var(--accent-strong);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}
.nav-link svg { width: 17px; height: 17px; opacity: 0.8; }
.nav-link::after {
  content: '';
  position: absolute;
  right: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
  opacity: 0;
  transform: translateX(50%) scale(0);
  transition: opacity 180ms ease, transform 180ms ease;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.nav-link.is-active { background: var(--white); color: var(--accent-strong); }
.nav-link.is-active::after { opacity: 1; transform: translateX(50%) scale(1); }
.nav-link.is-active svg { opacity: 1; }

body.is-home .nav-link { color: rgba(255, 255, 255, 0.86); }
body.is-home .nav-link svg { opacity: 0.9; }
body.is-home .nav-link:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
body.is-home .nav-link.is-active { background: rgba(255, 255, 255, 0.18); color: #fff; }
body.is-home .nav-link.is-active::after { background: var(--cream); }

.nav-inner > .brand { flex: none; }
.nav-inner > .nav-actions { flex: none; margin-left: auto; }
.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.icon-btn {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--accent-strong);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.68);
  transform: translateY(-1px);
}
.icon-btn.danger { color: #b4635c; }
.icon-btn.danger:hover { background: rgba(180, 99, 92, 0.12); border-color: rgba(180, 99, 92, 0.28); }

body.is-home .icon-btn { color: rgba(255, 255, 255, 0.86); }
body.is-home .icon-btn:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.16); color: #fff; }

.nav-toggle { display: none; }

/* 抽屉 */
.nav-drawer {
  position: fixed;
  z-index: 90;
  inset: 0;
  overflow: hidden;
  display: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}
.nav-drawer.is-open { display: block; visibility: visible; pointer-events: auto; opacity: 1; }
.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 40, 0.42);
  backdrop-filter: blur(3px);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(290px, 84vw);
  flex-direction: column;
  gap: 4px;
  background: var(--paper);
  box-shadow: -18px 0 50px rgba(24, 41, 50, 0.22);
  padding: 26px 20px;
  transform: translateX(100%);
  transition: transform 260ms var(--ease);
}
.nav-drawer.is-open .drawer-panel { transform: none; }
.drawer-panel a {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  border-radius: 11px;
  padding-inline: 12px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}
.drawer-panel a svg { width: 17px; height: 17px; opacity: 0.72; }
.drawer-panel a:hover, .drawer-panel a.is-active { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------------------------------------------------------- Hero */
.hero {
  position: relative;
  display: grid;
  min-height: 700px;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
  color: #fff;
}
.hero-img {
  position: absolute;
  z-index: -3;
  inset: 0;
  background: url('/img/hero.jpg') 62% 46% / cover no-repeat;
  animation: hero-image-in 1.4s var(--ease) both;
}
.hero-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 22, 48, 0.92) 0%, rgba(18, 25, 52, 0.84) 26%, rgba(20, 27, 55, 0.44) 46%, rgba(24, 28, 58, 0.06) 68%, rgba(24, 28, 58, 0) 100%),
    linear-gradient(180deg, rgba(18, 23, 48, 0.42) 0%, rgba(18, 23, 48, 0) 30%, rgba(18, 23, 48, 0.36) 100%);
}
.hero-stars { position: absolute; z-index: -1; inset: 0; pointer-events: none; }
.hero-stars i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff7cb;
  box-shadow: 0 0 14px rgba(255, 247, 203, 0.9);
  animation: star-pulse 2.8s ease-in-out infinite;
}
.hero-stars i:nth-child(1) { top: 27%; left: 18%; }
.hero-stars i:nth-child(2) { top: 35%; right: 22%; width: 3px; height: 3px; animation-delay: 900ms; }
.hero-stars i:nth-child(3) { top: 18%; right: 36%; width: 4px; height: 4px; animation-delay: 1.7s; }

.hero-content {
  position: absolute;
  z-index: 2;
  top: 52%;
  left: 50%;
  width: var(--wrap); max-width: calc(100% - 40px);
  padding-left: 42px;
  text-align: left;
  transform: translate(-50%, -50%);
  animation: hero-copy-in 900ms 180ms var(--ease) both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(32, 35, 66, 0.35);
  padding: 7px 13px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}
.hero-eyebrow .dot { display: grid; place-items: center; color: var(--cream); }
.hero-eyebrow svg { width: 13px; height: 13px; }

.hero-title {
  margin: 20px 0 10px;
  color: #fff;
  font-family: var(--font-serif);
  font-size: clamp(64px, 7.2vw, 98px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-shadow: 0 5px 26px rgba(15, 17, 42, 0.38);
}

.hero-tagline {
  margin: 0 0 10px;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.6;
  text-shadow: 0 2px 14px rgba(15, 17, 42, 0.58);
}

.hero-desc {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.8;
  text-shadow: 0 2px 14px rgba(15, 17, 42, 0.58);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding-inline: 18px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { transform: translateY(-3px); }

.btn-light { background: #fff; color: #2d3150; box-shadow: 0 12px 28px rgba(17, 19, 44, 0.22); }
.btn-light:hover { box-shadow: 0 17px 34px rgba(17, 19, 44, 0.3); }
.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(33, 36, 68, 0.32);
  color: #fff;
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(33, 36, 68, 0.5); }

/* 页面内按钮（非 Hero） */
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(63, 98, 111, 0.22); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-soft { border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent-strong); }
.btn-soft:hover { background: var(--accent); color: #fff; }
.btn-line { border: 1px solid var(--border); background: var(--surface); color: var(--accent-strong); }
.btn-line:hover { background: var(--accent); color: #fff; }
.btn-sm { min-height: 34px; padding-inline: 13px; font-size: 12px; }

.hero-meta {
  position: absolute;
  z-index: 2;
  right: 50%;
  bottom: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  transform: translateX(50%);
  white-space: nowrap;
}
.hero-meta strong { color: var(--cream); font-weight: 800; }
.hero-meta .sep { width: 24px; height: 1px; background: rgba(255, 255, 255, 0.34); }

/* Hero 底部弧形过渡 */
.hero-curve {
  position: absolute;
  z-index: 1;
  right: -8%;
  bottom: -56px;
  left: -8%;
  height: 116px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--paper);
}

/* 首页主体 */
.home-content {
  position: relative;
  z-index: 3;
  padding-bottom: 108px;
  background: var(--paper);
}

/* 主题条：上浮压在 Hero 弧线上 */
.topic-strip {
  position: relative;
  z-index: 4;
  display: flex;
  width: var(--wrap); max-width: calc(100% - 40px);
  min-height: 64px;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  margin: -32px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  padding: 8px;
  scrollbar-width: none;
  backdrop-filter: blur(18px);
}
.topic-strip::-webkit-scrollbar { display: none; }
.topic-strip a {
  display: inline-flex;
  min-height: 40px;
  flex: none;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  padding-inline: 11px;
  color: #5b5f75;
  font-size: 13px;
  font-weight: 700;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.topic-strip a:hover { background: var(--accent-soft); color: var(--accent-strong); transform: translateY(-1px); }
.topic-strip .topic-home {
  width: 40px;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  padding: 0;
}
.topic-strip .topic-home svg { width: 16px; height: 16px; }
.topic-strip small { color: var(--coral); font-size: 11px; }
.topic-strip .topic-more { margin-left: auto; color: var(--accent); white-space: nowrap; }
.topic-strip .topic-more svg { width: 13px; height: 13px; max-width: 13px; max-height: 13px; flex: none; display: inline-block; vertical-align: middle; }

[data-theme='dark'] .topic-strip {
  border-color: rgba(160, 195, 210, 0.18);
  background: rgba(24, 34, 42, 0.94);
}
[data-theme='dark'] .topic-strip a { color: var(--muted); }
[data-theme='dark'] .topic-strip a:hover { background: var(--accent-soft); color: var(--ink); }

/* ---------------------------------------------------------- 三栏 */
.home-grid {
  display: grid;
  width: var(--wrap); max-width: calc(100% - 40px);
  /* 侧栏随屏幕略放大，正文栏设上限，避免大屏把卡片拉成又长又扁的横条 */
  grid-template-columns: 220px minmax(0, 1fr) 236px;
  gap: 24px;
  align-items: start;
  margin: 28px auto 0;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}
[data-theme='dark'] .panel {
  border-color: rgba(160, 195, 210, 0.12);
  background: rgba(24, 34, 42, 0.92);
}

.sidebar { display: grid; gap: 16px; align-content: start; align-self: start; }
.sidebar .panel { padding: 20px; }

/* 作者卡 */
.profile-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
}
[data-theme='dark'] .profile-card {
  border-color: rgba(160, 195, 210, 0.12);
  background: rgba(24, 34, 42, 0.92);
}

.profile {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}
[data-theme='dark'] .profile { border-color: rgba(160, 195, 210, 0.12); background: rgba(24, 34, 42, 0.9); }
.profile-cover { height: 76px; background: url('/img/bg-6.jpg') center 40% / cover no-repeat; }
.profile-body { padding: 0 18px 18px; text-align: center; }
.profile-body .avatar {
  display: grid;
  width: 62px;
  height: 62px;
  margin: -31px auto 10px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(35, 54, 65, 0.16);
}
.profile-body .avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { margin: 0; font-family: var(--font-serif); font-size: 20px; font-weight: 500; color: var(--ink); }
.profile-bio { margin: 6px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.profile-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 14px; }
.profile-tags .chip { padding: 3px 9px; font-size: 10px; font-weight: 800; background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* 简介卡里的抖音二维码（不跳转，只展示让人扫） */
.profile-douyin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(52, 70, 82, 0.1);
}
/* 首页卡片版本：不加分隔线，紧跟技能标签 */
.profile-card .profile-douyin,
.profile-qr--home { margin-top: 12px; padding-top: 0; border-top: 0; }
.profile-links .profile-qr--home { justify-self: stretch; max-width: none; }
.profile-qr--home small { display: block; padding: 6px 0 8px; color: var(--muted); font-size: 10.5px; letter-spacing: 0.14em; }
.profile-douyin-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.profile-douyin-label svg { width: 13px; height: 13px; opacity: 0.75; }
.profile-douyin-label b { color: var(--ink-2); font-weight: 700; letter-spacing: 0.02em; }
.profile-qr {
  display: block;
  width: 100%;
  max-width: 188px;
  padding: 0;
  border: 1px solid rgba(52, 70, 82, 0.14);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 6px 18px rgba(35, 54, 65, 0.1);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.profile-qr img { display: block; width: 100%; height: auto; }
.profile-qr:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(35, 54, 65, 0.18); }
.profile-douyin-hint { color: var(--muted); font-size: 10.5px; letter-spacing: 0.14em; }
[data-theme='dark'] .profile-douyin { border-top-color: rgba(168, 196, 222, 0.14); }
[data-theme='dark'] .profile-qr { border-color: rgba(168, 196, 222, 0.2); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }

/* 「关于」页右侧：抖音独立成一块卡片（简介卡已移除） */
.douyin-block {
  margin: 0;
  padding: 4px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.panel-hint {
  color: var(--ink-4);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.douyin-qr {
  position: relative;
  display: block;
  width: 168px;
  height: 168px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  transition: transform 220ms ease, filter 220ms ease;
  filter: drop-shadow(0 6px 14px rgba(35, 54, 65, 0.14));
}
.douyin-qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.douyin-qr:hover { transform: translateY(-2px) scale(1.03); filter: drop-shadow(0 10px 22px rgba(35, 54, 65, 0.22)); }
.douyin-qr:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 50%; }

/* 暗色下二维码：反相后线条发灰、边缘吃光，改成白底浅色圆盘 + 保留原墨色，
   对比最强也最清晰；圆盘外加一圈柔和光圈，避免和深背景糊在一起 */
[data-theme='dark'] .douyin-qr {
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
}
[data-theme='dark'] .douyin-qr::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(247, 251, 253, 0.98) 58%, rgba(247, 251, 253, 0.62) 74%, rgba(247, 251, 253, 0) 100%);
  z-index: -1;
}
[data-theme='dark'] .douyin-qr img { filter: none; }

.douyin-qr-hint {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translate(-50%, 60%) scale(0.86);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(35, 54, 65, 0.82);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.douyin-qr-hint svg { width: 10px; height: 10px; }
.douyin-qr:hover .douyin-qr-hint,
.douyin-qr:focus-visible .douyin-qr-hint { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* 手写体抖音号图片：窄卡片里按容器宽度缩，不做裁切 */
.douyin-handle {
  display: block;
  width: 100%;
  max-width: 196px;
  height: auto;
  margin: 0;
}
/* 暗色下手写字抖音号：在深底上要亮，否则第二行灰字几乎看不见 */
[data-theme='dark'] .douyin-handle { filter: invert(1) brightness(1.9) contrast(1.05); }

/* 抖音号小字（旧版遗留，保留以防其他位置引用） */
.profile-douyin-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}
.profile-douyin-line svg { width: 12px; height: 12px; opacity: 0.65; }

/* 二维码放大弹层 */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 30, 38, 0.62);
  backdrop-filter: blur(6px);
  animation: qr-fade 180ms ease;
}
.qr-modal-card {
  position: relative;
  width: min(400px, 88vw);
  border-radius: 18px;
  background: #fff;
  padding: 10px 10px 0;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(10, 20, 28, 0.4);
  animation: qr-pop 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.qr-modal-card img { display: block; width: 100%; height: auto; border-radius: 12px; }
.qr-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 8px 14px;
}
.qr-modal-foot span { color: var(--ink); font-size: 13px; font-weight: 700; }
.qr-modal-foot small { color: var(--muted); font-size: 11px; letter-spacing: 0.1em; }
.qr-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 30, 38, 0.55);
  color: #fff;
  cursor: pointer;
  place-items: center;
}
.qr-modal-close svg { width: 15px; height: 15px; }
body.qr-modal-open { overflow: hidden; }
@keyframes qr-fade { from { opacity: 0; } }
@keyframes qr-pop { from { opacity: 0; transform: scale(0.94) translateY(8px); } }
.profile-actions .btn { justify-content: center; padding-inline: 8px; font-size: 12px; }
.profile-portrait {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 15px;
  aspect-ratio: 1 / 1;
  background: #dce8ee;
}
.profile-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  transform: scale(1.06);
  transition: transform 500ms ease;
}
.profile-card:hover .profile-portrait img { transform: scale(1.2); }
.profile-portrait .badge-avatar {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--night);
  color: #fff4bd;
  font-size: 13px;
  font-weight: 800;
}
.profile-portrait .badge-avatar svg { width: 15px; height: 15px; }

.panel-eyebrow {
  margin: 18px 0 4px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.profile-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 500;
  color: var(--ink);
}
.profile-bio { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.profile-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.profile-skills li {
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 4px 8px;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 800;
}

.profile-links {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.profile-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #60647a;
  font-size: 12px;
  font-weight: 700;
}
.profile-links a svg { width: 14px; height: 14px; }
.profile-links a:hover { color: var(--accent); }
[data-theme='dark'] .profile-links a { color: var(--muted); }

/* 统计卡 */
.statistics-card dl { display: grid; gap: 2px; margin: 0; }
.statistics-card dl > div {
  display: flex;
  min-height: 41px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.statistics-card dl > div:last-child { border-bottom: 0; }
.statistics-card dt { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.statistics-card dt svg { width: 14px; height: 14px; color: var(--accent); }
.statistics-card dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 800;
}

/* 分类列表 */
.sidebar-category-list { display: grid; gap: 5px; }
.sidebar-category-list a {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  border-radius: 9px;
  padding-inline: 9px;
  color: #66697c;
  font-size: 12px;
  transition: background-color 160ms ease, color 160ms ease;
}
.sidebar-category-list a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.sidebar-category-list strong { color: var(--coral); font-size: 11px; font-weight: 800; }
[data-theme='dark'] .sidebar-category-list a { color: var(--muted); }
[data-theme='dark'] .sidebar-category-list a:hover { background: var(--accent-soft); color: var(--ink); }

/* 标签云：三色轮换 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}
.tag-cloud a {
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 5px 8px;
  color: #5961a8;
  font-size: 10px;
  font-weight: 700;
  transition: transform 160ms ease;
}
.tag-cloud a:hover { transform: translateY(-1px); }
.tag-cloud a:nth-child(3n + 2) { background: #fff0ec; color: #aa645d; }
.tag-cloud a:nth-child(3n) { background: var(--mint); color: #3f776d; }
[data-theme='dark'] .tag-cloud a { color: var(--accent-strong); background: var(--accent-soft); }
[data-theme='dark'] .tag-cloud a:nth-child(3n + 2) { background: #32252a; color: #d3a89f; }
[data-theme='dark'] .tag-cloud a:nth-child(3n) { background: #22332f; color: #96bfb3; }

/* 面板标题 */
.panel-title { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; }
.panel-title > span { width: 4px; height: 17px; border-radius: 99px; background: var(--coral); flex: none; }
.panel-title h2, .panel-title h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head .panel-title { margin: 0; }
.panel-more { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-size: 11px; font-weight: 800; }
.panel-more svg { width: 12px; height: 12px; transition: transform 160ms ease; }
.panel-more:hover svg { transform: translateX(2px); }

/* 迷你文章行 */
.mini-post { display: block; padding: 9px 0; border-top: 1px solid var(--line); }
.mini-post:first-of-type { border-top: 0; }
.mini-post h4 {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
  transition: color 160ms ease;
}
.mini-post:hover h4 { color: var(--accent); }
.mini-post time { display: block; margin-top: 4px; color: var(--ink-4); font-size: 10px; }

/* 月亮便签 */
.moon-note {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--night-2);
  box-shadow: var(--shadow);
  padding: 22px;
  color: #fff;
}
.moon-note::after {
  content: '';
  position: absolute;
  right: -25px;
  bottom: -28px;
  width: 88px;
  height: 88px;
  border: 14px solid rgba(255, 242, 182, 0.14);
  border-radius: 50%;
}
.moon-note > svg { width: 20px; height: 20px; color: var(--cream-2); }
.moon-note p {
  position: relative;
  z-index: 1;
  margin: 12px 0 5px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}
.moon-note small { position: relative; z-index: 1; color: rgba(255, 255, 255, 0.54); font-size: 9px; letter-spacing: 0.08em; }

/* ---------------------------------------------------------- 中间栏 */
.feed { min-width: 0; }

/* 聚光灯大卡 */
.spotlight {
  position: relative;
  display: block;
  min-height: 360px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--night);
  box-shadow: var(--shadow);
  color: #fff;
}
.spotlight img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 40%;
  transition: transform 700ms var(--ease);
}
.spotlight:hover img { transform: scale(1.045); }
.spotlight-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(26, 29, 58, 0.02) 20%, rgba(23, 25, 50, 0.88) 100%);
  padding: 28px;
}
.spotlight-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px 9px;
  color: #464c93;
  font-size: 11px;
  font-weight: 900;
}
.spotlight-label svg { width: 12px; height: 12px; }
.spotlight h2 {
  max-width: 680px;
  margin: 13px 0 7px;
  font-family: var(--font-serif);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.3;
}
.spotlight:hover h2 { color: #fff3bd; }
.spotlight-overlay > p {
  max-width: 650px;
  overflow: hidden;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 元信息 */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 11px; }
.post-meta span { display: inline-flex; align-items: center; gap: 5px; }
.post-meta svg { width: 12px; height: 12px; opacity: 0.7; }
.spotlight .post-meta { color: rgba(255, 255, 255, 0.7); }

/* 区块标题 */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 36px 2px 16px; min-height: 40px; }
/* 窄屏下 chips 会占满整行，右侧按钮被挤出视口 → 允许换行 */
@media (max-width: 720px) {
  .section-head {
    flex-wrap: wrap;
    gap: 10px;
    margin-inline: 0;
  }
  .section-head > .chips,
  .section-head > .section-titles { flex: 1 1 100%; min-width: 0; }
  .section-head > .btn { flex: none; margin-left: auto; }
}
.shell__main > .section-head { margin: 0 0 18px; }
.section-kicker { margin: 0; color: var(--coral); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.section-title { margin: 2px 0 0; font-family: var(--font-serif); font-size: 27px; font-weight: 500; color: var(--ink); }
.section-head > a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 12px; font-weight: 800; }
.section-head > a svg { width: 13px; height: 13px; transition: transform 160ms ease; }
.section-head > a:hover svg { transform: translateX(3px); }

/* 文章卡：190 / 1fr / 42 */
.post-list { display: grid; gap: 12px; }
.post-card {
  position: relative;
  display: grid;
  min-height: 164px;
  grid-template-columns: 190px minmax(0, 1fr) 42px;
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(51, 45, 76, 0.07);
  padding: 12px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.post-card:hover {
  border-color: rgba(91, 101, 200, 0.18);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
[data-theme='dark'] .post-card {
  border-color: rgba(160, 195, 210, 0.12);
  background: rgba(24, 34, 42, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.post-thumb {
  position: relative;
  display: block;
  min-height: 140px;
  overflow: hidden;
  border-radius: 12px;
  background: #dce7ed;
}
.post-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 61% 38%;
  transition: transform 500ms ease;
}
.post-card:nth-child(3n + 2) .post-thumb img { object-position: 45% 42%; }
.post-card:nth-child(3n) .post-thumb img { object-position: 76% 38%; }
.post-card:hover .post-thumb img { transform: scale(1.07); }
.post-thumb .post-index {
  position: absolute;
  top: 9px;
  left: 9px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--coral);
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(32, 34, 60, 0.15);
}

.post-main { min-width: 0; align-self: center; }
.post-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.post-cat {
  border-radius: 999px;
  background: var(--mint);
  padding: 4px 8px;
  color: #39756c;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.post-topline .post-meta { justify-content: flex-end; color: var(--ink-4); }
.post-title {
  margin: 10px 0 6px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.38;
  color: var(--ink);
}
.post-card:hover .post-title { color: var(--accent); }
.post-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0 0; padding: 0; list-style: none; color: var(--ink-4); font-size: 10px; }

.post-open {
  display: grid;
  width: 38px;
  height: 38px;
  min-height: 38px;
  place-items: center;
  align-self: start;
  border: 1px solid rgba(77, 110, 125, 0.2);
  border-radius: 50%;
  background: rgba(241, 239, 247, 0.82);
  color: var(--accent);
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}
.post-open svg { width: 16px; height: 16px; }
.post-card:hover .post-open { background: var(--accent); color: #fff; }
[data-theme='dark'] .post-open { background: rgba(255, 255, 255, 0.06); border-color: rgba(160, 195, 210, 0.18); }

/* 更多按钮 */
.feed-more { display: flex; justify-content: flex-end; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.feed-more a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding-inline: 17px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}
.feed-more a svg { width: 14px; height: 14px; }
.feed-more a:hover { background: var(--accent); color: #fff; transform: translateX(3px); }

/* ---------------------------------------------------------- 底部发现区 */
.discovery-band {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(99, 132, 145, 0.16);
  background: #dce7eb;
  color: var(--ink);
  padding-block: 66px 62px;
}
.discovery-band::before {
  content: '';
  position: absolute;
  top: -56px;
  right: -6%;
  left: -6%;
  height: 96px;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: var(--paper);
}
[data-theme='dark'] .discovery-band { background: #182630; border-top-color: rgba(160, 195, 210, 0.14); }
[data-theme='dark'] .discovery-band::before { background: var(--paper); }

.discovery-inner { position: relative; z-index: 1; width: var(--wrap); max-width: calc(100% - 40px); margin-inline: auto; }
.discovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }

.discovery-section {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(245, 249, 250, 0.72);
  box-shadow: 0 18px 42px rgba(45, 79, 93, 0.1);
  padding: 22px;
  backdrop-filter: blur(12px);
}
[data-theme='dark'] .discovery-section {
  border-color: rgba(160, 195, 210, 0.14);
  background: rgba(24, 34, 42, 0.72);
}

.discovery-head {
  display: flex;
  min-height: 56px;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--border);
  padding: 0 2px 14px;
}
.discovery-head .section-kicker { color: var(--accent); }
.discovery-head .section-title { font-size: 24px; }
.discovery-head > a { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-strong); font-size: 12px; font-weight: 800; white-space: nowrap; }
.discovery-head > a svg { width: 13px; height: 13px; }

.discovery-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

.discovery-entry {
  position: relative;
  display: grid;
  min-height: 132px;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(77, 115, 128, 0.16);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  padding: 16px;
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.discovery-entry:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
[data-theme='dark'] .discovery-entry {
  border-color: rgba(160, 195, 210, 0.14);
  background: rgba(24, 34, 42, 0.86);
}

.discovery-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
}
.discovery-mark img { width: 100%; height: 100%; object-fit: cover; }

.discovery-copy { display: flex; min-width: 0; align-self: stretch; flex-direction: column; }
.discovery-kicker { color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.discovery-copy > strong { margin-top: 5px; font-family: var(--font-serif); font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.discovery-copy > span:not(.discovery-kicker):not(.discovery-meta) {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.discovery-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; font-size: 11px; color: var(--ink-4); }
.discovery-arrow { display: grid; width: 24px; height: 24px; place-items: center; color: var(--accent); }
.discovery-arrow svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------- 页脚 */
.site-footer {
  border-top: 1px solid var(--line);
  background: #cfdee3;
  color: #526f7b;
  padding-block: 10px 12px;
}
[data-theme='dark'] .site-footer { background: #101820; color: var(--muted); }

.footer-inner {
  display: flex;
  min-height: 72px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 16px;
  background: rgba(239, 246, 248, 0.72);
  box-shadow: 0 16px 40px rgba(48, 79, 92, 0.08);
  padding: 14px 22px;
  backdrop-filter: blur(14px);
}
[data-theme='dark'] .footer-inner { background: rgba(24, 34, 42, 0.72); }

.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-mark { background: #7899a5; color: #f5f9fa; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.footer-name { color: #2e4753; font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
.footer-slogan { margin: 2px 0 0; color: rgba(52, 79, 91, 0.58); font-size: 11px; }
[data-theme='dark'] .footer-name { color: var(--ink); }
[data-theme='dark'] .footer-slogan { color: var(--muted); }

.footer-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 13.5px; }
.footer-links a:hover { color: #2f6678; }
[data-theme='dark'] .footer-links a:hover { color: var(--accent); }
.footer-tools { display: flex; align-items: center; gap: 6px; }

.footer-meta { flex-basis: 100%; padding-top: 12px; border-top: 1px solid rgba(80, 117, 130, 0.16); color: rgba(52, 79, 91, 0.6); font-size: 11px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.footer-meta a { text-decoration: underline; text-decoration-color: rgba(80, 117, 130, 0.4); text-underline-offset: 2px; }
[data-theme='dark'] .footer-meta { color: var(--ink-4); border-top-color: rgba(160, 195, 210, 0.14); }

.to-top {
  position: fixed;
  z-index: 50;
  right: 26px;
  bottom: 26px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass-strong);
  color: var(--accent-strong);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease, background-color 180ms ease;
  backdrop-filter: blur(14px);
}
.to-top svg { width: 16px; height: 16px; }
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------- 通用页面 */
/* 分类/标签筛选胶囊 */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 6px 12px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.chip b { color: var(--coral); font-size: 10px; font-weight: 900; }
.chip:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); }
.chip.is-active { border-color: transparent; background: var(--accent); color: #fff; }
.chip.is-active b { color: rgba(255, 255, 255, 0.82); }
[data-theme='dark'] .chip { border-color: rgba(160, 195, 210, 0.18); background: rgba(24, 34, 42, 0.8); color: #cfdde3; }

/* 侧栏分类列表 / 标签云 */
.sidebar-category-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sidebar-category-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; border-radius: 9px; padding-inline: 9px; color: #66697c; font-size: 12px; }
.sidebar-category-list a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.sidebar-category-list strong { color: var(--coral); font-size: 11px; font-weight: 800; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tag-cloud a { border-radius: 999px; background: var(--accent-soft); padding: 5px 9px; color: #5961a8; font-size: 10px; font-weight: 700; }
.tag-cloud li:nth-child(3n + 2) a { background: #fff0ec; color: #aa645d; }
.tag-cloud li:nth-child(3n) a { background: var(--mint); color: #3f776d; }
.tag-cloud a:hover { filter: brightness(0.95); }

/* 统计小格子 */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
/* 窄侧栏（220px）里改成 2×2，避免单字竖排 */
.shell .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.shell .stat-cell { padding: 10px 12px; }
.shell .stat-cell span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
}
.stat-cell span { color: var(--muted); font-size: 11px; font-weight: 700; }
.stat-cell b { color: var(--ink); font-family: var(--font-serif); font-size: 22px; font-weight: 800; line-height: 1.1; }
[data-theme='dark'] .stat-cell { border-color: rgba(160, 195, 210, 0.14); background: rgba(24, 34, 42, 0.8); }
[data-theme='dark'] .stat-cell b { color: #e6eef2; }

/* 排行/简单列表行 */
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 38px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: 13px;
}
.list-row:last-child { border-bottom: 0; }
.list-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row em { flex: none; margin-left: 8px; color: var(--coral); font-family: var(--font-serif); font-size: 13px; font-style: normal; font-weight: 800; }
.list-row:hover { color: var(--accent-strong); }

.page { position: relative; width: var(--wrap); max-width: calc(100% - 32px); min-height: calc(100svh - 170px); margin-inline: auto; padding-block: 76px 104px; }
.page--narrow { width: min(980px, calc(100% - 48px)); }

/* 内页双列：左导航栏 + 主内容 */
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 34px;
}
.shell--wide { grid-template-columns: 236px minmax(0, 1fr); }
.shell__main { min-width: 0; }
.shell .sidebar { display: grid; gap: 16px; align-content: start; align-self: start; }
.shell .sidebar .panel { padding: 20px; }

/* 侧栏跟着滚：滑到导航栏下面停住；内容比屏幕高就自己内部滚动 */
.shell > .sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 10px);
  align-self: start;
  align-content: start;
  max-height: calc(100vh - var(--nav-h) - 26px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 152, 172, 0.32) transparent;
  padding-right: 4px;
  margin-right: -4px;
}
.shell > .sidebar::-webkit-scrollbar { width: 6px; }
.shell > .sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(120, 152, 172, 0.3);
}
.shell > .sidebar::-webkit-scrollbar-thumb:hover { background: rgba(120, 152, 172, 0.5); }
.shell > .sidebar::-webkit-scrollbar-track { background: transparent; }
[data-theme='dark'] .shell > .sidebar { scrollbar-color: rgba(150, 190, 210, 0.3) transparent; }
[data-theme='dark'] .shell > .sidebar::-webkit-scrollbar-thumb { background: rgba(150, 190, 210, 0.26); }

/* 首页左右两栏同样吸顶跟随 */
.home-grid > .sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 10px);
  align-self: start;
  align-content: start;
  max-height: calc(100vh - var(--nav-h) - 26px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 152, 172, 0.32) transparent;
  padding-right: 4px;
  margin-right: -4px;
}
.home-grid > .sidebar::-webkit-scrollbar { width: 6px; }
.home-grid > .sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(120, 152, 172, 0.3);
}
.home-grid > .sidebar::-webkit-scrollbar-thumb:hover { background: rgba(120, 152, 172, 0.5); }
.home-grid > .sidebar::-webkit-scrollbar-track { background: transparent; }
[data-theme='dark'] .home-grid > .sidebar { scrollbar-color: rgba(150, 190, 210, 0.3) transparent; }
[data-theme='dark'] .home-grid > .sidebar::-webkit-scrollbar-thumb { background: rgba(150, 190, 210, 0.26); }

/* 三栏壳在窄屏必须落成单列，否则侧栏吃掉宽度，主栏被压到几十像素 */
@media (max-width: 940px) {
  .shell,
  .shell--wide { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .shell > .sidebar,
  .shell > .shell__main { grid-column: 1 / -1; width: 100%; }
  .shell > .sidebar { position: static; max-height: none; overflow: visible; padding-right: 0; margin-right: 0; }
  .shell--wide > .sidebar--left { order: 2; }
  .shell--wide > .shell__main { order: 1; }
  .shell .sidebar { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (max-width: 600px) {
  .shell .sidebar { grid-template-columns: minmax(0, 1fr); }
}

.page-header {
  display: grid;
  width: min(980px, 100%);
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: end;
  gap: 32px;
  margin: 0 auto 58px;
  border-bottom: 1px solid var(--line-2);
  padding: 0 4px 24px;
}
.page-header-heading { display: flex; align-items: center; gap: 13px; min-width: 0; }
.page-header-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(52, 91, 106, 0.38);
  border-radius: 50%;
  color: var(--accent-strong);
}
.page-header-icon svg { width: 17px; height: 17px; }
.page-header-heading small { display: block; overflow: hidden; color: rgba(52, 70, 82, 0.5); font-size: 8px; font-weight: 600; letter-spacing: 0.14em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.page-header-heading h1 { margin: 2px 0 0; color: var(--ink); font-family: var(--font-serif); font-size: 32px; font-weight: 500; line-height: 1; overflow-wrap: anywhere; }
.page-desc { margin: 0 0 3px; color: #5b707b; font-family: var(--font-serif); font-size: 14px; line-height: 1.65; }
.page-rule { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; color: rgba(52, 70, 82, 0.5); font-family: var(--font-serif); font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap; }
.page-rule::before { content: ''; width: 30px; height: 1px; background: rgba(52, 70, 82, 0.28); }
[data-theme='dark'] .page-header-heading small, [data-theme='dark'] .page-rule { color: var(--ink-4); }
[data-theme='dark'] .page-desc { color: var(--muted); }
[data-theme='dark'] .page-header-icon { border-color: rgba(160, 195, 210, 0.34); }

.page-body { width: min(980px, 100%); margin-inline: auto; }

/* 筛选条 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 32px;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  padding-block: 14px;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar a, .filter-bar button {
  display: inline-flex;
  min-height: 32px;
  flex: none;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding-inline: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease;
}
.filter-bar a:hover, .filter-bar button:hover { background: var(--accent-soft); color: var(--accent-strong); }
.filter-bar .is-active { background: var(--accent); color: #fff; }

/* 搜索框 */
.search-box {
  display: grid;
  width: min(640px, 100%);
  min-height: 52px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 auto 42px;
  border: 1px solid rgba(65, 89, 101, 0.25);
  border-radius: 999px;
  background: rgba(235, 241, 243, 0.5);
  padding-inline: 18px;
  color: var(--muted);
  backdrop-filter: blur(20px);
}
.search-box svg { width: 17px; height: 17px; }
.search-box input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.search-box button { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: var(--muted); }
.search-box button:hover { background: var(--accent-soft); color: var(--accent-strong); }
[data-theme='dark'] .search-box { background: rgba(24, 34, 42, 0.6); border-color: var(--border); }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 42px; }
.pager button {
  display: grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.pager button svg { width: 14px; height: 14px; }
.pager button:hover:not(:disabled) { background: var(--accent); color: #fff; transform: translateY(-1px); }
.pager button.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager button:disabled { opacity: 0.35; cursor: default; }

/* 空状态 */
.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  border: 1px dashed #cbc6d4;
  border-radius: 17px;
  padding: 34px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.empty svg { width: 26px; height: 26px; opacity: 0.5; }
[data-theme='dark'] .empty { border-color: var(--border); }

/* 网格视图 */
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-card {
  position: relative;
  display: flex;
  min-height: 240px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(51, 45, 76, 0.07);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.grid-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
[data-theme='dark'] .grid-card { border-color: rgba(160, 195, 210, 0.12); background: rgba(24, 34, 42, 0.92); }
.grid-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 500ms ease; }
.grid-card:hover > img { transform: scale(1.04); }
.grid-index { position: absolute; top: 10px; left: 10px; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--coral); font-family: var(--font-serif); font-size: 11px; font-weight: 700; }
.grid-body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.grid-title { margin: 0; font-family: var(--font-serif); font-size: 19px; font-weight: 500; line-height: 1.36; color: var(--ink); }
.grid-card:hover .grid-title { color: var(--accent); }
.grid-excerpt { display: -webkit-box; overflow: hidden; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.grid-meta { display: flex; gap: 12px; margin-top: auto; padding-top: 14px; color: var(--ink-4); font-size: 11px; }

/* 归档 */
.archive-year { margin-bottom: 40px; }
.archive-year-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.archive-year-num { font-family: var(--font-serif); font-size: 34px; font-weight: 500; color: var(--ink); line-height: 1; }
.archive-year-line { flex: 1; height: 1px; background: var(--line-2); }
.archive-year-count { color: var(--muted); font-size: 11px; }
.archive-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 4px;
  transition: background-color 160ms ease, padding-left 160ms ease;
}
.archive-row:hover { background: rgba(255, 255, 255, 0.6); padding-left: 10px; }
[data-theme='dark'] .archive-row:hover { background: rgba(255, 255, 255, 0.04); }
.archive-date { color: var(--ink-4); font-family: var(--font-serif); font-size: 13px; }
.archive-title { color: var(--ink); font-family: var(--font-serif); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-row:hover .archive-title { color: var(--accent); }
.archive-cat { border-radius: 999px; background: var(--mint); padding: 3px 9px; color: #39756c; font-size: 10px; font-weight: 800; white-space: nowrap; }

/* 说说 */
.moment-stream { display: grid; gap: 4px; }
.moment {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.moment-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.moment:last-child { border-bottom: 0; }
.moment-date { text-align: center; }
.moment-day { font-family: var(--font-serif); font-size: 26px; font-weight: 500; line-height: 1; color: var(--ink); }
.moment-ym { margin-top: 4px; color: var(--coral); font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.moment-mood {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  width: 22px;
  height: 22px;
  vertical-align: -4px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  line-height: 1;
}
.moment-content { color: var(--ink-2); font-size: 14px; line-height: 1.85; white-space: pre-wrap; }
[data-theme='dark'] .moment-content { color: var(--ink); }
.moment-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.moment-images img { width: 110px; height: 110px; border-radius: 10px; object-fit: cover; }

/* 项目 */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
[data-theme='dark'] .project-card { border-color: rgba(160, 195, 210, 0.12); background: rgba(24, 34, 42, 0.92); }
.project-num { color: var(--coral); font-family: var(--font-serif); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; }
.project-title { margin: 8px 0 8px; font-family: var(--font-serif); font-size: 21px; font-weight: 500; color: var(--ink); }
.project-desc { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.75; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.project-tags span { border-radius: 999px; background: var(--accent-soft); padding: 3px 8px; color: var(--accent-strong); font-size: 10px; font-weight: 700; }
.project-card .chips { gap: 6px; margin-bottom: 16px; }
.project-card .chips .chip { padding: 3px 9px; font-size: 10px; font-weight: 700; background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.project-card .chips .chip b { display: none; }
.project-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.project-links { display: flex; gap: 14px; font-size: 12px; font-weight: 700; color: var(--accent); }
.project-links a { display: inline-flex; align-items: center; gap: 4px; }
.project-links svg { width: 13px; height: 13px; }

.badge {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.badge.online { background: var(--mint); color: #39756c; }
.badge.building { background: #fff0ec; color: #aa645d; }
.badge.idea { background: var(--accent-soft); color: var(--accent-strong); }

/* 相册 */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery-item img { aspect-ratio: 1 / 1; object-fit: cover; }
.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #dce7ed;
  cursor: zoom-in;
}
.gallery-item img { width: 100%; display: block; transition: transform 500ms ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-cap {
  position: absolute;
  inset: auto 0 0;
  padding: 26px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(20, 34, 42, 0.78));
  color: #fff;
  font-size: 12px;
  opacity: 1;
  transition: opacity 220ms ease;
  box-sizing: border-box;
  line-height: 1.4;
}
.gallery-item:hover .gallery-cap { opacity: 1; }
.gallery-cap { font-weight: 700; letter-spacing: 0.01em; }
.gallery-cap small { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.72); font-size: 10px; font-weight: 500; }

.lightbox {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(14, 24, 32, 0.92);
  padding: 40px;
  backdrop-filter: blur(6px);
}
.lightbox img { max-width: 100%; max-height: 84vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.lightbox-cap { margin-top: 14px; color: rgba(255, 255, 255, 0.7); font-size: 12px; text-align: center; }
.lightbox-close { position: absolute; top: 24px; right: 24px; width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; color: #fff; display: grid; place-items: center; }

/* 友链 */
.friend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.friend-card {
  display: flex;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.friend-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
[data-theme='dark'] .friend-card { border-color: rgba(160, 195, 210, 0.12); background: rgba(24, 34, 42, 0.92); }
.friend-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  flex: none;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  object-fit: cover;
  overflow: hidden;
}
.friend-name { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--ink); }
.friend-desc { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.friend-info { min-width: 0; }
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-grid + * { margin-top: 26px; }
/* 友链交换信息代码块（覆盖 .prose pre 的深色底） */
.prose pre.friend-code,
.prose pre.friend-code code {
  background: #eef4f6;
  color: #34505c;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  box-shadow: none;
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.prose pre.friend-code { padding: 14px 18px; margin: 0; overflow-x: auto; }
[data-theme='dark'] .prose pre.friend-code,
[data-theme='dark'] .prose pre.friend-code code {
  background: rgba(255, 255, 255, 0.045);
  color: #c8dde4;
  border-color: rgba(160, 195, 210, 0.2);
}

/* 关于 */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 32px; align-items: start; }
.about-card { border: 1px solid rgba(255, 255, 255, 0.5); border-radius: var(--card-radius); background: rgba(222, 232, 236, 0.88); box-shadow: var(--shadow-lg); padding: 42px 46px; backdrop-filter: blur(28px) saturate(92%); }
[data-theme='dark'] .about-card { background: rgba(24, 34, 42, 0.88); border-color: rgba(160, 195, 210, 0.14); }

/* 表单 */
.field { display: grid; gap: 6px; }
.field > label, .field > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.field input, .field textarea, .field select,
input.field, textarea.field, select.field {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 13px;
  color: var(--ink);
  font-size: 14px;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input:focus, .field textarea:focus, .field select:focus,
input.field:focus, textarea.field:focus, select.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(115, 153, 164, 0.18);
}
.field textarea, textarea.field { min-height: 110px; resize: vertical; line-height: 1.7; }
[data-theme='dark'] .field input, [data-theme='dark'] .field textarea, [data-theme='dark'] .field select,
[data-theme='dark'] input.field, [data-theme='dark'] textarea.field, [data-theme='dark'] select.field { background: rgba(255, 255, 255, 0.04); color: var(--ink); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { color: var(--ink-4); font-size: 11px; }

/* 评论区 */
.comments { margin-top: 48px; padding-top: 34px; border-top: 1px solid var(--line-2); }
.comments-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 22px; font-family: var(--font-serif); font-size: 22px; font-weight: 500; color: var(--ink); }
.comments-title small { color: var(--muted); font-family: var(--font-sans); font-size: 12px; font-weight: 600; }
.comment-form { display: grid; gap: 12px; margin-bottom: 34px; }
.comment-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.comment-list { display: grid; gap: 4px; }
.comment-item { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; border-bottom: 1px solid var(--line); padding: 18px 0; }
.comment-item:last-child { border-bottom: 0; }
.comment-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
}
.comment-avatar.alt { background: #fff0ec; color: #aa645d; }
.comment-body { min-width: 0; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.comment-name { color: var(--ink); font-size: 13px; font-weight: 700; }
.comment-time { color: var(--ink-4); font-size: 11px; }
.comment-text { color: var(--ink-2); font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; }
[data-theme='dark'] .comment-text { color: var(--ink); }
.comment-replies { display: grid; gap: 2px; margin-top: 10px; padding-left: 8px; border-left: 2px solid var(--line); }
.comment-replies .comment-item { border-bottom: 0; padding: 12px 0 12px 14px; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; }
.comment-replies .comment-avatar { width: 34px; height: 34px; font-size: 13px; }

/* ---------------------------------------------------------- 文章详情 */
.article-page { position: relative; width: var(--wrap); max-width: calc(100% - 32px); margin-inline: auto; padding-block: 40px 104px; }

.article-hero {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--ink);
  color: #fff;
}
.article-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 38%; }
.article-hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21, 36, 46, 0.04) 22%, rgba(18, 31, 40, 0.88) 100%); }
.article-back {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 24px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  background: rgba(24, 42, 52, 0.28);
  color: #fff;
  box-shadow: 0 10px 30px rgba(14, 28, 37, 0.14);
  backdrop-filter: blur(14px);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease, color 180ms ease;
}
.article-back svg { width: 17px; height: 17px; }
.article-back:hover { border-color: rgba(255, 255, 255, 0.82); background: rgba(238, 244, 246, 0.9); color: var(--ink); transform: translateX(-2px); }

.article-hero-copy { position: absolute; right: 0; bottom: 0; left: 0; max-width: 860px; padding: 54px; }
.article-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #c7dce1; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.article-hero-copy h1 { max-width: 820px; margin: 8px 0 12px; color: #fff; font-family: var(--font-serif); font-size: clamp(38px, 5vw, 62px); font-weight: 500; line-height: 1.14; }
.article-hero-copy .post-meta { margin-top: 20px; color: rgba(255, 255, 255, 0.68); }

.article-paper {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100% - 40px));
  margin: -30px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--card-radius);
  background: rgba(222, 232, 236, 0.88);
  box-shadow: var(--shadow-lg), var(--inset-hi);
  padding: 58px 72px 80px;
  backdrop-filter: blur(28px) saturate(92%);
}
[data-theme='dark'] .article-paper { background: rgba(24, 34, 42, 0.9); border-color: rgba(160, 195, 210, 0.14); }
.article-paper::before { content: ''; position: absolute; top: 0; left: 72px; width: 54px; height: 2px; background: var(--accent-strong); opacity: 0.72; }

.post-lede { margin: 0 0 26px; padding-bottom: 18px; border-bottom: 1px solid var(--border); color: var(--ink-2); font-family: var(--font-serif); font-size: 16px; line-height: 1.85; }

.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 26px; padding-bottom: 18px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--ink-3); }
.post-tags > svg { width: 14px; height: 14px; flex-shrink: 0; }
.post-tags a { border-radius: 999px; background: var(--accent-soft); padding: 4px 10px; color: var(--accent-strong); font-size: 11px; font-weight: 700; }
.post-tags a:hover { background: var(--accent); color: #fff; }

/* 目录 */
.toc { position: sticky; top: 100px; border: 1px solid rgba(255, 255, 255, 0.92); border-radius: var(--card-radius); background: rgba(255, 255, 255, 0.9); box-shadow: var(--shadow); padding: 18px 20px; }
[data-theme='dark'] .toc { border-color: rgba(160, 195, 210, 0.12); background: rgba(24, 34, 42, 0.92); }
.toc-title { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--ink); }
.toc-title::before { content: ''; width: 4px; height: 15px; border-radius: 99px; background: var(--coral); }
.toc a { display: block; border-left: 2px solid transparent; padding: 5px 0 5px 10px; color: var(--muted); font-size: 12px; line-height: 1.5; transition: color 160ms ease, border-color 160ms ease; }
.toc a.lv3 { padding-left: 22px; font-size: 11.5px; }
.toc a:hover, .toc a.is-active { color: var(--accent-strong); border-left-color: var(--accent); }

/* 正文纸居中（900px），目录占右侧留白，不挤压正文 */
.article-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 0; margin-top: 46px; }
.article-layout > div { min-width: 0; }
.article-layout > aside { position: sticky; top: 96px; align-self: start; grid-column: 2; padding-left: 24px; }
@media (max-width: 1180px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-layout > aside { display: none; }
}

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 42px; }
.post-nav a { border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, 0.6); padding: 16px 18px; transition: border-color 160ms ease, transform 160ms ease; }
.post-nav a:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-nav span { display: block; color: var(--ink-4); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.post-nav strong { display: block; margin-top: 6px; font-family: var(--font-serif); font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.5; }
.post-nav .is-next { text-align: right; }

/* ---------------------------------------------------------- 正文排版 */
.prose { color: #263e4a; font-family: var(--font-serif); font-size: 16px; line-height: 1.92; }
/* 长文正文限宽，保证一行 40–45 字左右的舒适阅读宽度 */
.prose > p, .prose > ul, .prose > ol, .prose > blockquote, .prose > h2, .prose > h3, .prose > h4 { max-width: 78ch; }
[data-theme='dark'] .prose { color: #cfdde3; }
.prose > *:first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.4; color: var(--ink); scroll-margin-top: 100px; }
.prose h2 { margin: 46px 0 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(55, 84, 97, 0.2); font-size: 26px; }
.prose h3 { margin: 34px 0 12px; font-size: 21px; }
.prose h4 { margin: 26px 0 10px; font-size: 17px; }
.prose p { margin: 0 0 20px; }
.prose a { color: var(--accent-strong); text-decoration: underline; text-decoration-color: rgba(63, 98, 111, 0.36); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose em { font-style: italic; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 24px 0; border-left: 3px solid #6f9ba8; border-radius: 0 10px 10px 0; background: rgba(205, 220, 226, 0.62); padding: 16px 22px; color: #405864; font-style: italic; }
[data-theme='dark'] .prose blockquote { background: rgba(160, 195, 210, 0.08); color: #b6cbd3; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose :not(pre) > code { border-radius: 5px; background: rgba(204, 218, 224, 0.78); padding: 2px 6px; color: #2f6478; font-family: var(--font-mono); font-size: 0.86em; }
[data-theme='dark'] .prose :not(pre) > code { background: rgba(160, 195, 210, 0.16); color: #9fd0e0; }
.prose pre { position: relative; overflow-x: auto; margin: 24px 0; border-radius: 10px; background: #223640; box-shadow: 0 16px 36px rgba(26, 46, 57, 0.14); padding: 20px 22px; }
.prose pre code { color: #d6e6ee; font-family: var(--font-mono); font-size: 13px; line-height: 1.75; }
.prose img, .prose svg { display: block; max-width: 100%; height: auto; margin: 26px auto; border: 1px solid rgba(255, 255, 255, 0.56); border-radius: 8px; box-shadow: 0 18px 46px rgba(28, 48, 60, 0.14); }
.prose table { width: 100%; margin: 24px 0; border-collapse: collapse; font-family: var(--font-sans); font-size: 14px; }
.prose th, .prose td { border-bottom: 1px solid var(--line-2); padding: 10px 12px; text-align: left; }
.prose th { color: var(--ink); font-weight: 700; }
.prose hr { margin: 38px 0; border: 0; border-top: 1px solid var(--line-2); }

.copy-code { position: absolute; top: 10px; right: 10px; opacity: 0; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 7px; background: rgba(255, 255, 255, 0.08); padding: 3px 9px; color: rgba(255, 255, 255, 0.72); font-size: 11px; transition: opacity 180ms ease, background-color 160ms ease; }
.prose pre:hover .copy-code { opacity: 1; }
.copy-code:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

.tok-key { color: #8fc7e8; }
.tok-str { color: #a8d8a0; }
.tok-num { color: #e8b98b; }
.tok-com { color: #6b8494; font-style: italic; }
.tok-fn { color: #e6d68f; }
.tok-tag { color: #e79c9c; }
.tok-attr { color: #c6b3e8; }
.tok-punc { color: #9fb4bf; }

.post-signoff { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-2); color: var(--ink-4); font-size: 12px; }
.post-signoff strong { color: var(--accent-strong); font-family: var(--font-serif); font-size: 14px; }

/* ---------------------------------------------------------- 反馈 */
.toast-wrap { position: fixed; z-index: 200; top: 84px; right: 50%; display: grid; gap: 8px; transform: translateX(50%); pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-md);
  padding: 10px 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  animation: toast-in 260ms var(--ease);
  backdrop-filter: blur(18px);
}
.toast svg { width: 15px; height: 15px; }
.toast.ok { color: #39756c; }
.toast.err { color: #b4635c; }

@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.page-loading { display: grid; min-height: 60vh; place-items: center; }
.spinner { width: 30px; height: 30px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 620ms var(--ease), transform 620ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@keyframes hero-image-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
@keyframes hero-copy-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 18px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes star-pulse { 50% { opacity: 0.35; transform: scale(0.65); } }

/* ---------------------------------------------------------- 后台管理 */
.admin { display: grid; width: var(--wrap); max-width: calc(100% - 32px); grid-template-columns: 210px minmax(0, 1fr); gap: 24px; margin-inline: auto; padding: 26px 0 60px; align-items: start; }

.admin-nav {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 3px;
  min-height: 420px;
  align-content: start;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 16px 12px;
}
[data-theme='dark'] .admin-nav { border-color: rgba(160, 195, 210, 0.12); background: rgba(24, 34, 42, 0.92); }

.admin-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 0 8px 12px; border-bottom: 1px solid var(--line); }
.admin-user strong { font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--ink); }
.admin-user small { color: var(--muted); font-size: 10px; }

.admin-link {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  border-radius: 9px;
  padding-inline: 10px;
  color: #66697c;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: background-color 160ms ease, color 160ms ease;
}
.admin-link span { overflow: hidden; text-overflow: ellipsis; }
.admin-link svg { width: 15px; height: 15px; flex: none; opacity: 0.72; }
.admin-link:hover { background: var(--accent-soft); color: var(--accent-strong); }
.admin-link.is-active { background: var(--accent); color: #fff; }
.admin-link.is-active svg { opacity: 1; }
[data-theme='dark'] .admin-link { color: var(--muted); }
[data-theme='dark'] .admin-link:hover { background: var(--accent-soft); color: var(--ink); }

.admin-main { min-width: 0; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.admin-head h2 { margin: 0; font-family: var(--font-serif); font-size: 24px; font-weight: 500; color: var(--ink); }
.admin-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.admin-table { display: grid; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.92); border-radius: var(--card-radius); background: rgba(255, 255, 255, 0.94); box-shadow: var(--shadow); }
[data-theme='dark'] .admin-table { border-color: rgba(160, 195, 210, 0.12); background: rgba(24, 34, 42, 0.92); }

.admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; border-top: 1px solid var(--line); padding: 14px 18px; }
.admin-row:first-child { border-top: 0; }
.admin-row-main { min-width: 0; flex: 1; }
.admin-row-title { color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.5; }
.admin-row-title a:hover { color: var(--accent); }
.admin-row-meta { margin-top: 4px; color: var(--ink-4); font-size: 11px; display: flex; flex-wrap: wrap; gap: 10px; }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.admin-inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 18px; }
.admin-inline-form input { border: 1px solid var(--border); border-radius: 9px; background: rgba(255, 255, 255, 0.72); padding: 8px 12px; font-size: 13px; outline: 0; }
.admin-inline-form input:focus { border-color: var(--accent); }
[data-theme='dark'] .admin-inline-form input { background: rgba(255, 255, 255, 0.04); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-grid .field--wide { grid-column: 1 / -1; }

.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.editor-form { position: relative; display: grid; gap: 10px; min-width: 0; }
.editor-form > * { min-width: 0; }
.editor-title { border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.8); padding: 14px 16px; font-family: var(--font-serif); font-size: 19px; font-weight: 500; outline: 0; }
.editor-title:focus { border-color: var(--accent); }
[data-theme='dark'] .editor-title { background: rgba(255, 255, 255, 0.04); }
.editor-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.editor-body {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.8);
  padding: 14px 16px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  outline: 0;
  resize: vertical;
  tab-size: 2;
}
.editor-body:focus { border-color: var(--accent); }
[data-theme='dark'] .editor-body { background: rgba(255, 255, 255, 0.04); }

.editor-preview {
  position: sticky;
  top: 92px;
  max-height: 78vh;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 26px 30px;
}
[data-theme='dark'] .editor-preview { border-color: rgba(160, 195, 210, 0.12); background: rgba(24, 34, 42, 0.92); }

.editor-form.is-dragging::after {
  content: attr(data-drop);
  position: absolute;
  inset: -6px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--accent);
  border-radius: 14px;
  background: rgba(220, 231, 235, 0.72);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
  z-index: 5;
}

.editor-toolbar { display: grid; grid-template-columns: repeat(8, 54px); grid-auto-rows: 54px; justify-content: start; gap: 8px; }
.editor-thumb { width: 54px; height: 54px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; }
.editor-thumb img { width: 100%; height: 100%; object-fit: cover; }
.editor-thumb-hint { grid-column: 1 / -1; color: var(--ink-4); font-size: 11px; }

.admin-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.admin-photo { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); }
.admin-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.admin-photo-cap { padding: 6px 8px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-photo .icon-btn { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, 0.9); }

/* ---------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
  .nav-link { padding-inline: 9px; font-size: 12px; }
  .nav-link svg { display: none; }
  .home-grid { grid-template-columns: 200px minmax(0, 1fr) 220px; gap: 16px; }
  .post-card { grid-template-columns: 165px minmax(0, 1fr) 38px; gap: 14px; }
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; max-height: none; }
}

@media (max-width: 1040px) {
  .home-grid { grid-template-columns: 215px minmax(0, 1fr); }
  .home-grid > .sidebar:last-child { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-card { top: 96px; }
  .about-grid { grid-template-columns: 1fr; }
  .friend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin { grid-template-columns: 1fr; }
  .admin-nav { position: static; display: flex; min-height: 0; overflow-x: auto; padding: 10px; }
  .admin-user { display: none; }
  .admin-link { min-height: 36px; white-space: nowrap; padding-inline: 12px; width: auto; }
  .settings-grid { grid-template-columns: 1fr; }
  .admin-inline-form { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}

@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .nav-inner { gap: 12px; padding-inline: 16px; }
  .post-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .gallery { columns: 2; }
}

@media (max-width: 800px) {
  .site-nav { padding-block: 10px; }
  .nav-inner { width: min(100% - 28px, var(--wrap-nav)); min-height: 58px; border-radius: 14px; padding: 7px 14px; }
  .wrap-wide { width: min(100% - 28px, var(--wrap-nav)); }
  .hero { min-height: 600px; }
  .hero-title { font-size: 62px; }
  .hero-content { top: 47%; padding-left: 30px; }
  .topic-strip { margin-top: -48px; }
  .home-grid { grid-template-columns: 1fr; }
  .home-grid > .sidebar { position: static; max-height: none; overflow: visible; padding-right: 0; margin-right: 0; }
  .profile-card { position: relative; top: auto; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0 18px; align-items: center; text-align: left; }
  .profile-portrait { grid-row: 1 / span 3; }
  .panel-eyebrow { margin-top: 0; }
  .profile-skills, .profile-links { justify-content: flex-start; }
  .profile-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; padding-top: 12px; }
  .home-grid > .sidebar:last-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .moon-note { grid-column: 1 / -1; }
  .discovery-grid { grid-template-columns: 1fr; gap: 18px; }
  .discovery-section { padding: 18px; }
  .page-header { grid-template-columns: 1fr; gap: 14px; align-items: start; }
  .page-rule { display: none; }
  .article-hero { min-height: 420px; border-radius: 0; }
  .article-hero-copy { padding: 28px 24px 34px; }
  .article-paper { width: calc(100% - 24px); margin-top: -22px; padding: 34px 24px 44px; }
  .article-paper::before { left: 24px; }
  .article-page { width: 100%; padding-block: 0 64px; }
  .article-shell { padding-inline: 12px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .moment { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; }
}

@media (max-width: 600px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 18px; }
  .brand-mark { width: 35px; height: 35px; }
  .nav-inner { gap: 8px; }
  .icon-btn { width: 34px; height: 34px; }
  .nav-actions { gap: 2px; }
  .hero { min-height: 560px; }
  .hero-img { background-position: 40% center; }
  .hero-img::after { background: rgba(19, 33, 43, 0.34); }
  .hero-content { top: 46%; width: min(100% - 28px, 520px); padding-left: 0; text-align: center; }
  .hero-eyebrow { font-size: 11px; }
  .hero-title { margin-top: 14px; font-size: 48px; }
  .hero-tagline { font-size: 15px; }
  .hero-desc { font-size: 13.5px; }
  .hero-actions { justify-content: center; gap: 8px; margin-top: 21px; }
  .btn { min-height: 41px; padding-inline: 13px; font-size: 12px; }
  .hero-meta { bottom: 74px; font-size: 10px; }
  .hero-curve { bottom: -60px; }
  .topic-strip { width: calc(100% - 28px); min-height: 54px; margin-top: -44px; border-radius: 15px; }
  .topic-strip a { min-height: 36px; font-size: 11px; }
  .topic-strip .topic-more { margin-left: 0; }
  .home-grid { margin-top: 16px; }
  .profile-card { grid-template-columns: 82px minmax(0, 1fr); gap: 0 14px; padding: 13px; }
  .profile-name { font-size: 21px; }
  .home-grid > .sidebar:last-child { grid-template-columns: 1fr; }
  .post-card { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px; min-height: 0; }
  /* 窄屏：主栏与分页都收进视口，避免 112px 缩略图把卡片撑出屏幕 */
  .shell, .shell--wide, .shell__main { min-width: 0; }
  .shell__main > * { max-width: 100%; }
  .post-list { min-width: 0; }
  .post-card > * { min-width: 0; }
  .pager { flex-wrap: wrap; }
  .post-open { display: none; }
  .post-excerpt { display: none; }
  .post-title { font-size: 16px; margin: 7px 0 0; }
  .post-thumb { min-height: 100px; }
  .post-topline .post-meta { display: none; }
  .section-title { font-size: 22px; }
  .spotlight { min-height: 300px; border-radius: 16px; }
  .spotlight-overlay { padding: 20px; }
  .spotlight-overlay > p { display: none; }
  .discovery-band { padding-block: 48px 44px; }
  .friend-grid { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
  .archive-row { grid-template-columns: 48px minmax(0, 1fr); }
  .archive-cat { display: none; }
  .pager button { min-width: 34px; height: 34px; }
  .footer-links { gap: 12px; font-size: 11px; }
  .to-top { right: 16px; bottom: 16px; width: 38px; height: 38px; }
  .article-hero-copy h1 { font-size: 30px; }
  .article-hero-copy { padding: 22px 18px 26px; }
  .prose { font-size: 15.5px; }
  .prose h2 { font-size: 22px; }
  .editor-toolbar { grid-template-columns: repeat(6, 48px); grid-auto-rows: 48px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .is-next { text-align: left; }
}.moment-images img { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; }

/* 头像圆片（后台侧栏等） */
.avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font-serif);
  font-weight: 700;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 编辑器工具行 */
.editor-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.editor-bar .hint { margin-left: auto; }
.editor { align-items: start; }
.editor-body { min-height: 460px; font-family: var(--font-mono); font-size: 13px; line-height: 1.85; }
@media (max-width: 940px) {
  .editor-bar .hint { margin-left: 0; width: 100%; }
}

/* 编辑器：正文与预览等高，铺满可用高度 */
.editor-preview { min-height: 460px; }
textarea.editor-body.editor-body,
.editor-body { height: 540px; min-height: 540px; resize: vertical; }
@media (max-width: 1180px) {
  .editor-preview { min-height: 320px; max-height: none; }
  .editor-body { height: 420px; min-height: 420px; }
}

/* 内容区背景：长页面底部不露灰 */
main { position: relative; z-index: 1; background: var(--paper); }
body.is-home main { background: transparent; }
/* 内容区顶部：纸色渐隐到背景图，避免背景图直接硬切进内容 */
main::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 160px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(237, 242, 244, 0.0), var(--paper) 72%);
}
body.is-home main::before { display: none; }
[data-theme='dark'] main::before { background: linear-gradient(180deg, rgba(19, 26, 32, 0.0), var(--paper) 72%); }

/* ========== 归档：横向时间轴 ========== */
.archive-timeline { position: relative; }

.archive-controls {
  display: flex; width: min(1080px, 100%); align-items: center;
  justify-content: space-between; margin: 0 auto 10px;
  color: rgba(52, 70, 82, 0.48); font-family: var(--font-serif); font-size: 10px;
}
.archive-controls em { font-style: normal; font-size: 9px; letter-spacing: 0.06em; opacity: 0.7; }

.archive-viewport {
  position: relative; overflow-x: auto; overflow-y: hidden;
  border-radius: 8px; cursor: grab; outline: none;
  overscroll-behavior-inline: contain; scroll-snap-type: x proximity;
  scrollbar-width: none; -ms-overflow-style: none;
  touch-action: pan-x pan-y pinch-zoom; user-select: none;
}
.archive-viewport::-webkit-scrollbar { display: none; }
.archive-viewport.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.archive-viewport:focus-visible { box-shadow: inset 0 0 0 1px rgba(62, 111, 130, 0.5); }

.archive-track {
  --wave-top: 250px; --wave-scale: 1;
  position: relative; display: flex; width: max(1180px, var(--archive-width));
  height: 740px; align-items: stretch; gap: 90px; box-sizing: border-box; padding-inline: 70px;
}

/* 波浪：完全照原站 —— 一条固定的曲线 + 虚线沿着曲线流动 */
.archive-wave {
  position: absolute; z-index: 0; top: var(--wave-top); left: 0;
  width: 100%; height: 180px;
  overflow: visible;
  fill: none; stroke: rgba(93, 159, 194, 0.9); stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.archive-wave-glow {
  stroke: rgba(86, 171, 211, 0.3); stroke-width: 10;
  filter: blur(6px);
}
.archive-wave path:last-child {
  stroke-dasharray: 12 18;
  animation: archive-wave-flow 15s linear infinite;
}
@keyframes archive-wave-flow {
  to { stroke-dashoffset: -300; }
}

.archive-story {
  /* 节点高度 = 波浪在这一点上的 y（JS 用 --node-v 写回），所以圆点必然压在线上 */
  --node-y: calc(var(--wave-top) + var(--node-v, 102) * var(--wave-scale) * 1px);
  position: relative; z-index: 1; width: 260px; height: 100%;
  flex: 0 0 260px; scroll-snap-align: center;
  animation: archive-story-enter 700ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
  animation-delay: calc(var(--story-index, 0) * 70ms);
}

.archive-story::after {
  position: absolute; top: calc(var(--node-y) - 34px); left: 50%; width: 1px; height: 34px;
  background: linear-gradient(rgba(89, 146, 171, 0.1), rgba(89, 146, 171, 0.62)); content: "";
}
.archive-story:nth-of-type(even)::after {
  top: calc(var(--node-y) + 8px); height: 36px;
  background: linear-gradient(rgba(89, 146, 171, 0.62), rgba(89, 146, 171, 0.1));
}

.archive-node {
  position: absolute; z-index: 7; top: var(--node-y); left: 50%; width: 12px; height: 12px;
  border: 3px solid rgba(245, 249, 250, 0.96); border-radius: 50%; background: #70a9c2;
  box-shadow: 0 0 0 2px rgba(79, 151, 184, 0.28), 0 0 20px rgba(76, 165, 207, 0.58);
  transform: translate(-50%, -50%);
}
.archive-node-date {
  position: absolute; z-index: 7; top: calc(var(--node-y) + 14px); left: 50%;
  color: rgba(42, 67, 80, 0.7); font-family: var(--font-serif); font-size: 9px; font-weight: 600;
  white-space: nowrap; transform: translateX(-50%);
}
.archive-story:nth-of-type(even) .archive-node-date { top: calc(var(--node-y) - 27px); }

.archive-story-card {
  position: absolute; top: calc(var(--node-y) - 264px); left: 0; display: grid;
  width: 260px; height: 230px; grid-template-rows: 104px minmax(0, 1fr); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62); border-radius: 8px;
  background: rgba(238, 244, 247, 0.58); box-shadow: 0 18px 48px rgba(25, 48, 64, 0.14);
  color: #2a414d; cursor: pointer; backdrop-filter: blur(18px) saturate(88%);
  transition: box-shadow 240ms ease, transform 240ms ease;
}
.archive-story:nth-of-type(even) .archive-story-card { top: calc(var(--node-y) + 44px); }
.archive-story-card:hover { box-shadow: 0 24px 62px rgba(22, 46, 61, 0.24); transform: translateY(-5px); }

.archive-story-media { position: relative; display: block; overflow: hidden; background: #dce7ed; }
.archive-story-media::after {
  position: absolute; inset: 0; content: "";
  background: linear-gradient(180deg, transparent 34%, rgba(19, 34, 43, 0.7));
}
.archive-story-media > img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 58% 40%;
  transition: transform 600ms cubic-bezier(0.2, 0.72, 0.2, 1);
}
.archive-story-1 .archive-story-media > img { object-position: 42% 42%; }
.archive-story-2 .archive-story-media > img { object-position: 74% 40%; }
.archive-story-card:hover .archive-story-media > img { transform: scale(1.05); }
.archive-story-media > time {
  position: absolute; z-index: 1; right: 12px; bottom: 9px; left: 12px;
  display: flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, 0.8); font-size: 8px;
}
.archive-cal, .archive-eye { display: inline-block; width: 11px; height: 11px; background: currentColor;
  -webkit-mask: radial-gradient(circle, currentColor 40%, transparent 41%) center/100% 100% no-repeat; opacity: 0.85; }

.archive-story-copy { display: flex; min-height: 0; flex-direction: column; padding: 12px 14px 11px; }
.archive-story-copy small { color: #4b899d; font-size: 8px; }
.archive-story-copy strong {
  display: -webkit-box; overflow: hidden; margin-top: 4px;
  font-family: var(--font-serif); font-size: 13px; font-weight: 600; line-height: 1.38;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.archive-story-copy > span:not(.archive-story-footer) {
  display: -webkit-box; overflow: hidden; margin-top: 5px; color: rgba(50, 72, 84, 0.62);
  font-size: 9px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 1;
}
.archive-story-footer {
  display: flex; align-items: center; justify-content: space-between; margin-top: auto;
  color: rgba(52, 77, 89, 0.52); font-size: 8px;
}
.archive-story-footer > span { display: flex; align-items: center; gap: 4px; }
.archive-arrow { display: inline-block; width: 12px; height: 12px; border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor; transform: rotate(45deg); }

@keyframes archive-story-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 归档时间轴：暗色适配（卡片、日期、控制条） */
[data-theme='dark'] .archive-story-card {
  border-color: rgba(160, 195, 210, 0.16);
  background: rgba(26, 37, 47, 0.86);
  color: #e6eef3;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}
[data-theme='dark'] .archive-story-card:hover { box-shadow: 0 24px 62px rgba(0, 0, 0, 0.55); }
[data-theme='dark'] .archive-story-copy small { color: #7fb6cb; }
[data-theme='dark'] .archive-story-copy > span:not(.archive-story-footer) { color: rgba(214, 231, 240, 0.58); }
[data-theme='dark'] .archive-story-footer { color: rgba(214, 231, 240, 0.5); }
[data-theme='dark'] .archive-node-date { color: rgba(198, 224, 236, 0.72); }
[data-theme='dark'] .archive-story::after {
  background: linear-gradient(rgba(140, 190, 214, 0.08), rgba(140, 190, 214, 0.55));
}
[data-theme='dark'] .archive-story:nth-of-type(even)::after {
  background: linear-gradient(rgba(140, 190, 214, 0.55), rgba(140, 190, 214, 0.08));
}
[data-theme='dark'] .archive-controls { color: rgba(198, 224, 236, 0.55); }
[data-theme='dark'] .archive-node {
  border-color: rgba(26, 37, 47, 0.96);
  box-shadow: 0 0 0 2px rgba(140, 190, 214, 0.3), 0 0 20px rgba(120, 190, 220, 0.65);
}

@media (max-width: 800px) {
  .archive-viewport { scroll-snap-type: x mandatory; }
  .archive-track { height: 700px; gap: 54px; padding-inline: 24px; --wave-top: 250px; --wave-scale: 0.8333; }
  .archive-story, .archive-story-card { width: 232px; flex-basis: 232px; }
  .archive-story-card { height: 214px; grid-template-rows: 92px minmax(0, 1fr); top: calc(var(--node-y) - 254px); }
  .archive-story:nth-of-type(even) .archive-story-card { top: calc(var(--node-y) + 40px); }
  .archive-story::after { top: calc(var(--node-y) - 40px); height: 40px; }
  .archive-story:nth-of-type(even)::after { top: calc(var(--node-y) + 8px); height: 32px; }
  .archive-wave { height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .archive-wave, .archive-story { animation: none; }
}

/* ==================== 说说：便签墙 ==================== */
.moment-board { display: grid; width: min(980px, 100%); gap: 94px; margin: 34px auto 0; }
.moment-date-cluster { position: relative; }
.moment-date-cluster > header {
  display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: 13px;
  width: min(860px, 92%); margin: 0 auto 30px; color: #405762;
}
.moment-date-cluster > header > span { color: var(--accent-strong); font-family: var(--font-serif); font-size: 9px; }
.moment-date-cluster > header h2 { margin: 0; font-family: var(--font-serif); font-size: 19px; font-weight: 500; }
.moment-date-cluster > header small { color: rgba(52, 70, 82, 0.5); font-size: 9px; }
.moment-date-cluster > header i { height: 1px; background: linear-gradient(90deg, rgba(52, 70, 82, 0.24), transparent); }

.moment-card-list { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); margin: 0; padding: 16px 0 20px; list-style: none; }
.moment-card-cell { position: relative; grid-column: 1 / span 8; }
.moment-day-head { position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 12px; margin: 44px 2px 26px; }
.moment-day-head:first-child { margin-top: 8px; }
.moment-day-head span { color: var(--coral); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.moment-day-head h2 { margin: 0; font-family: var(--font-serif); font-size: 25px; font-weight: 500; line-height: 1.2; color: var(--ink); }
.moment-day-head small { color: var(--muted); font-size: 11px; }
.moment-day-head i { display: block; height: 1px; background: rgba(52, 70, 82, 0.18); }
.moment-card-cell:nth-child(6n + 2) { z-index: 3; grid-column: 6 / span 7; margin-top: -34px; }
.moment-card-cell:nth-child(6n + 3) { z-index: 2; grid-column: 2 / span 7; margin-top: -18px; }
.moment-card-cell:nth-child(6n + 4) { z-index: 4; grid-column: 5 / span 8; margin-top: -42px; }
.moment-card-cell:nth-child(6n + 5) { z-index: 1; grid-column: 1 / span 7; margin-top: -12px; }
.moment-card-cell:nth-child(6n) { z-index: 5; grid-column: 7 / span 6; margin-top: -38px; }

/* 错落规则按卡片自己的序号（--mc）走，避免日期表头打乱 nth-child */
.moment-card-cell[style*="--mc:0"] { grid-column: 1 / span 8; margin-top: 0; z-index: 2; }
.moment-card-cell[style*="--mc:1"] { grid-column: 6 / span 7; margin-top: -34px; z-index: 3; }
.moment-card-cell[style*="--mc:2"] { grid-column: 2 / span 7; margin-top: -18px; z-index: 2; }
.moment-card-cell[style*="--mc:3"] { grid-column: 5 / span 8; margin-top: -42px; z-index: 4; }
.moment-card-cell[style*="--mc:4"] { grid-column: 1 / span 7; margin-top: -12px; z-index: 1; }
.moment-card-cell[style*="--mc:5"] { grid-column: 7 / span 6; margin-top: -38px; z-index: 5; }

.moment-timeline-card {
  position: relative; display: flex; width: 100%; min-height: 168px; cursor: pointer; flex-direction: column;
  overflow: visible; border: 1px solid rgba(245, 248, 249, 0.78); border-radius: 6px;
  background: var(--moment-surface); padding: 28px 30px 22px; box-shadow: 0 15px 36px var(--moment-glow);
  color: #2d414c; font: inherit; text-align: left; backdrop-filter: blur(22px) saturate(88%);
  transition: border-color 200ms ease, box-shadow 240ms ease, transform 240ms ease;
}
.moment-card-cell:nth-child(6n + 1) .moment-timeline-card { min-height: 176px; transform: rotate(-0.85deg); }
.moment-card-cell:nth-child(6n + 2) .moment-timeline-card { min-height: 158px; transform: rotate(0.7deg); }
.moment-card-cell:nth-child(6n + 3) .moment-timeline-card { min-height: 184px; transform: rotate(-0.45deg); }
.moment-card-cell:nth-child(6n + 4) .moment-timeline-card { min-height: 166px; transform: rotate(0.95deg); }
.moment-card-cell:nth-child(6n + 5) .moment-timeline-card { min-height: 172px; transform: rotate(-0.6deg); }
.moment-card-cell:nth-child(6n) .moment-timeline-card { min-height: 154px; transform: rotate(0.4deg); }

.moment-card-tone-1 { --moment-accent: #789eaa; --moment-glow: rgba(58, 94, 108, 0.12); --moment-surface: rgba(231, 240, 242, 0.88); }
.moment-card-tone-2 { --moment-accent: #b08d9e; --moment-glow: rgba(130, 82, 105, 0.11); --moment-surface: rgba(240, 231, 236, 0.88); }
.moment-card-tone-3 { --moment-accent: #7d93ad; --moment-glow: rgba(66, 88, 118, 0.12); --moment-surface: rgba(229, 235, 241, 0.9); }
.moment-card-tone-4 { --moment-accent: #9f997d; --moment-glow: rgba(111, 104, 72, 0.1); --moment-surface: rgba(238, 237, 230, 0.9); }

.moment-timeline-card:hover, .moment-timeline-card:focus-visible {
  z-index: 8; border-color: var(--moment-accent); outline: none;
  box-shadow: 0 24px 58px rgba(29, 48, 59, 0.18); transform: translateY(-8px) rotate(0);
}
.moment-timeline-card::after {
  position: absolute; top: 0; right: 0; border-width: 0 25px 25px 0; border-style: solid;
  border-color: transparent rgba(255, 255, 255, 0.46) transparent transparent; content: "";
}
.moment-timeline-card::before {
  position: absolute; z-index: 2; top: -8px; left: 18%; width: 58px; height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5); background: var(--moment-accent);
  box-shadow: 0 3px 8px rgba(38, 59, 69, 0.08); content: ""; opacity: 0.42;
  pointer-events: none; transform: rotate(-3deg);
}
.moment-card-cell:nth-child(even) .moment-timeline-card::before { right: 20%; left: auto; transform: rotate(4deg); }

.moment-card-meta, .moment-card-meta time, .moment-card-footer, .moment-card-footer > span, .moment-card-action { display: flex; align-items: center; }
.moment-card-meta { justify-content: flex-end; color: rgba(52, 70, 82, 0.52); font-size: 9px; }
.moment-card-index {
  position: absolute; top: -14px; left: 25px; min-width: 72px; border-radius: 3px 3px 0 0;
  background: var(--moment-accent); padding: 7px 11px 8px; color: #fff;
  font-family: var(--font-serif); font-size: 8px; font-weight: 600; text-align: center;
}
.moment-card-cell:nth-child(even) .moment-card-index { right: 30px; left: auto; }
.moment-card-meta time, .moment-card-footer > span, .moment-card-action { gap: 5px; }
.moment-card-meta time svg, .moment-card-footer svg, .moment-card-action svg { width: 13px; height: 13px; max-width: 13px; max-height: 13px; flex: none; }

.moment-card-copy {
  display: -webkit-box; overflow: hidden; margin: 20px 0 26px; color: #2d414c;
  font-family: var(--font-serif); font-size: 16px; line-height: 1.9; white-space: pre-wrap;
  -webkit-box-orient: vertical; -webkit-line-clamp: 4;
}
.moment-card-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: -12px 0 20px; }
.moment-card-images img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 4px; }

.moment-card-footer {
  justify-content: space-between; margin-top: auto; border-top: 1px solid rgba(52, 70, 82, 0.12);
  padding-top: 13px; color: rgba(52, 70, 82, 0.42); font-size: 8px;
}
.moment-card-action { color: #506975; font-size: 10px; font-weight: 600; transition: color 180ms ease; }
.moment-timeline-card:hover .moment-card-action, .moment-timeline-card:focus-visible .moment-card-action { color: var(--moment-accent); }

body.moment-dialog-open { overflow: hidden; }
.moment-dialog-backdrop {
  position: fixed; z-index: 90; inset: 0; display: grid; place-items: center;
  background: rgba(18, 33, 43, 0.22); padding: 24px;
  backdrop-filter: blur(14px) saturate(105%); animation: moment-backdrop-in 180ms ease both;
}
.moment-dialog-backdrop[hidden] { display: none; }
.moment-dialog-card {
  width: min(640px, 100%); max-height: min(720px, calc(100svh - 48px)); overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.86); border-radius: 8px; background: rgba(245, 248, 249, 0.98);
  padding: 30px 32px 24px; box-shadow: 0 30px 90px rgba(13, 29, 39, 0.3), inset 0 3px 0 var(--moment-accent);
  color: #2d414c; outline: none; backdrop-filter: blur(28px) saturate(90%);
  animation: moment-dialog-in 260ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}
.moment-dialog-card > header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.moment-dialog-mark {
  display: grid; width: 38px; height: 38px; place-items: center;
  border: 1px solid rgba(52, 91, 106, 0.3); border-radius: 50%; color: var(--accent-strong);
}
.moment-dialog-mark svg { width: 19px; height: 19px; max-width: 19px; max-height: 19px; }
.moment-dialog-card h2 { margin: 0; font-family: var(--font-serif); font-size: 16px; font-weight: 600; }
.moment-dialog-card header time { display: block; margin-top: 2px; color: rgba(52, 70, 82, 0.48); font-size: 9px; }
.moment-dialog-card header button {
  display: grid; width: 34px; height: 34px; cursor: pointer; place-items: center;
  border: 1px solid rgba(52, 70, 82, 0.22); border-radius: 50%; background: transparent; color: #405762;
}
.moment-dialog-card header button svg { width: 19px; height: 19px; max-width: 19px; max-height: 19px; }
.moment-dialog-card header button:hover, .moment-dialog-card header button:focus-visible { background: var(--ink); color: #fff; }
.moment-dialog-card > p { margin: 30px 0 26px; color: #20343f; font-family: var(--font-serif); font-size: 17px; line-height: 1.95; white-space: pre-wrap; }
.moment-dialog-images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 26px; }
.moment-dialog-images img { width: 100%; border-radius: 6px; object-fit: cover; }
.moment-dialog-card > footer { display: flex; align-items: center; gap: 12px; color: rgba(52, 70, 82, 0.44); font-family: var(--font-serif); font-size: 8px; }
.moment-dialog-card > footer i { height: 1px; flex: 1; background: rgba(52, 70, 82, 0.18); }

@keyframes moment-backdrop-in { from { opacity: 0; } }
@keyframes moment-dialog-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }

@media (max-width: 900px) {
  .moment-board { gap: 62px; }
  .moment-date-cluster > header { grid-template-columns: auto 1fr auto; width: 100%; }
  .moment-date-cluster > header i { display: none; }
  /* 移动端退化为单列，但保留日期表头做分组，卡片之间正常拉开间距 */
  .moment-card-list {
    display: flex; flex-direction: column; gap: 22px;
    margin: 0; padding: 0 0 8px; list-style: none;
  }
  .moment-day-head {
    display: grid; grid-template-columns: auto auto 1fr;
    grid-column: auto; align-items: center; gap: 10px;
    margin: 30px 0 14px;
  }
  .moment-day-head:first-child { margin-top: 0; }
  .moment-day-head h2 { font-size: 19px; }
  .moment-day-head i { display: block; height: 1px; background: rgba(52, 70, 82, 0.16); }
  .moment-card-cell { margin-top: 0 !important; grid-column: auto; }
  .moment-timeline-card { min-height: 0 !important; transform: none !important; padding: 22px 20px 18px; }
  .moment-card-copy { font-size: 15px; }
  .moment-card-index { position: static; display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) {
  .moment-timeline-card, .moment-dialog-backdrop, .moment-dialog-card { animation: none !important; transition: none !important; }
}
