/* =========================================================
   主题变量：深色为默认，浅色通过 [data-theme="light"] 覆盖
   ========================================================= */
:root {
  --bg: #05070f;
  --bg-2: #080c18;
  --panel: rgba(16, 20, 38, 0.72);
  --panel-2: rgba(24, 29, 52, 0.62);
  --panel-solid: #0b1020;
  --text: #eef1fa;
  --text-dim: #9aa3c0;
  --text-mute: #6f7796;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --chip: rgba(255, 255, 255, 0.05);
  --chip-hover: rgba(255, 255, 255, 0.1);
  --brand: #6d8bff;
  --brand-2: #8b5cf6;
  --accent: #6d8bff;
  --violet: #a78bfa;
  --cyan: #38e0d0;
  --pink: #f472b6;
  --grad: linear-gradient(135deg, #6d8bff, #8b5cf6);
  --shadow: 0 18px 50px rgba(3, 6, 18, 0.55);
  --radius: 18px;
  --radius-lg: 24px;
  --maxw: 1480px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Noto Sans SC", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --bg: #f4f6fc;
  --bg-2: #eef2fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-2: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --text: #111528;
  --text-dim: #545c78;
  --text-mute: #858ea8;
  --border: rgba(18, 24, 48, 0.09);
  --border-strong: rgba(18, 24, 48, 0.18);
  --chip: rgba(18, 24, 48, 0.045);
  --chip-hover: rgba(18, 24, 48, 0.08);
  --accent: #4f46e5;
  --shadow: 0 18px 40px rgba(70, 90, 170, 0.12);
}

/* =========================================================
   基础
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  line-height: 1.7;
  font-size: 15px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}
a { color: inherit; }
img { max-width: 100%; }
::selection { background: var(--brand); color: #fff; }

/* 星空 */
.starfield {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    radial-gradient(1.3px 1.3px at 20px 30px, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1px 1px at 120px 90px, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.1px 1.1px at 210px 40px, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 60px 180px, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.4px 1.4px at 260px 210px, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 170px 250px, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1px 1px at 300px 140px, rgba(255,255,255,.5), transparent 60%);
  background-size: 340px 340px;
  opacity: 0.55;
}
[data-theme="light"] .starfield { opacity: 0.1; }

/* 星云光晕 */
.nebula {
  position: fixed; inset: -20% -10%; z-index: -3; pointer-events: none;
  filter: blur(90px); opacity: 0.55;
}
[data-theme="light"] .nebula { opacity: 0.5; }
.blob { position: absolute; border-radius: 50%; }
.b1 { width: 40vw; height: 40vw; left: -8vw; top: -6vw; background: radial-gradient(circle, #2a3f8f, transparent 68%); }
.b2 { width: 38vw; height: 38vw; right: -6vw; top: 18vh; background: radial-gradient(circle, #5b2a8f, transparent 68%); }
.b3 { width: 34vw; height: 34vw; left: 32vw; bottom: -16vw; background: radial-gradient(circle, #0d5a6b, transparent 68%); }
[data-theme="light"] .b1 { background: radial-gradient(circle, #ccd8fe, transparent 68%); }
[data-theme="light"] .b2 { background: radial-gradient(circle, #e8d6fb, transparent 68%); }
[data-theme="light"] .b3 { background: radial-gradient(circle, #c9ecf0, transparent 68%); }

/* =========================================================
   头部
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: linear-gradient(180deg, rgba(4, 6, 14, 0.94) 0%, rgba(4, 6, 14, 0.72) 62%, rgba(4, 6, 14, 0) 100%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: background 0.35s ease;
}
[data-theme="light"] .site-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.74) 62%, rgba(255, 255, 255, 0) 100%);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 66px; display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand-logo {
  width: auto; height: 40px; flex: none; display: block;
  object-fit: contain;
}
/* 文字模式 Logo：品牌色方块 + 字样（后台 brandMode = text 时启用） */
.brand-mark {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  font-size: 14px; font-weight: 800; letter-spacing: 0.06em; line-height: 1;
  color: #fff; text-transform: uppercase;
  background: linear-gradient(135deg, #f59e0b 0%, #fb923c 48%, #6366f1 100%);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.32);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy b { font-size: 15px; letter-spacing: 0.5px; }
.brand-copy small { font-size: 11px; color: var(--text-mute); letter-spacing: 0.3px; }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.nav-links a {
  padding: 8px 15px; border-radius: 10px; font-size: 14.5px;
  color: var(--text-dim); text-decoration: none; white-space: nowrap;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--chip); }
.nav-links a.active {
  color: #fff; background: rgba(109, 139, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(109, 139, 255, 0.4);
}
[data-theme="light"] .nav-links a.active { color: #1a2a6b; background: rgba(109, 139, 255, 0.16); }

.nav-actions { position: relative; margin-left: auto; display: flex; align-items: center; gap: 9px; }
.nav-tools { display: flex; align-items: center; gap: 9px; }
.nav-actions .nav-more { display: none; }
.search-trigger {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 11px;
  min-width: 232px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--chip); color: var(--text-mute);
  font-family: inherit; font-size: 12.5px; transition: 0.2s;
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-dim); }
.search-trigger .st-text { flex: 1; text-align: left; }
.search-trigger kbd {
  font: inherit; font-size: 10.5px; padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--chip); color: var(--text-mute);
}
.icon-btn {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--border); background: var(--chip);
  color: var(--text-dim); cursor: pointer; transition: 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.lang-btn { width: auto; min-width: 36px; padding: 0 9px; font: 700 11px/1 Manrope, system-ui, sans-serif; letter-spacing: .06em; white-space: nowrap; }
.social-btn {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--chip); color: var(--text-dim);
  text-decoration: none; transition: 0.2s;
}
.social-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.social-btn .mono { font-size: 0.72rem; font-weight: 700; }
/* 微信/含二维码图标：悬停弹出二维码 */
.social-btn.has-qr { position: relative; }
.qr-pop {
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 150px; padding: 11px; border-radius: 13px;
  background: var(--panel-2); border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
  /* 隐藏态用 display:none 彻底移出布局，避免绝对定位的二维码弹层把页面横向撑宽导致左侧被切 */
  display: none; flex-direction: column; align-items: center; gap: 7px;
  opacity: 0; visibility: hidden; pointer-events: none; z-index: 60;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  transition-behavior: allow-discrete;
}
.social-btn.has-qr:hover .qr-pop,
.social-btn.has-qr:focus-within .qr-pop {
  display: flex; opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
/* 指向下方图标的小三角 */
.qr-pop::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--panel-2);
  filter: drop-shadow(0 1px 0 var(--border));
}
.qr-pop img {
  width: 126px; height: 126px; object-fit: contain; display: block;
  background: #fff; border-radius: 9px; padding: 4px;
}
.qr-pop .qr-cap { font-size: 11px; color: var(--text-mute); line-height: 1.3; text-align: center; }

/* 页脚社交按钮贴着页面右缘：弹层改为右对齐并向右翻转，避免显示时向右溢出视口产生横向滚动 */
.foot-social .social-btn.has-qr .qr-pop { left: auto; right: 0; transform: translateY(6px); }
.foot-social .social-btn.has-qr:hover .qr-pop,
.foot-social .social-btn.has-qr:focus-within .qr-pop { transform: translateY(0); }
.foot-social .qr-pop::after { left: auto; right: 14px; transform: none; }
.i-moon { display: none; }
[data-theme="light"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: block; }

/* =========================================================
   首页：Hero
   ========================================================= */
.home-main { display: block; }
.hero-band {
  position: relative; width: 100%; min-height: 506px;
  overflow: hidden; isolation: isolate;
  --px: 0; --py: 0;
}
/* 底图：静态位移由 JS 驱动，缓慢推拉由 scale 独立属性完成（互不冲突） */
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image: url('/img/hero/hero-bg.jpg');
  background-image: image-set(
    url('/img/hero/hero-bg.jpg') 1x,
    url('/img/hero/hero-bg@2x.jpg') 2x
  );
  background-position: center 62%;
  background-size: cover;
  background-repeat: no-repeat;
  scale: 1.08;
  animation: kenburns 44s ease-in-out infinite alternate;
  will-change: transform, scale;
}
@keyframes kenburns {
  from { scale: 1.08; }
  to   { scale: 1.17; }
}
/* 极光星云：三团大型模糊光斑，screen 混合叠加发光 */
.hero-aurora {
  position: absolute; inset: 0; z-index: 1;
  overflow: hidden; pointer-events: none;
  transform: translate3d(calc(var(--px) * -7px), calc(var(--py) * -5px), 0);
  will-change: transform;
}
.hero-aurora .au {
  position: absolute; display: block; border-radius: 50%;
  mix-blend-mode: screen; filter: blur(72px);
  will-change: transform, opacity;
}
.au-1 {
  width: 46%; height: 80%; left: -7%; top: -20%;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.5), transparent 72%);
  animation: auDrift1 30s ease-in-out infinite alternate;
}
.au-2 {
  width: 42%; height: 68%; right: -9%; top: 4%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.44), transparent 72%);
  animation: auDrift2 38s ease-in-out infinite alternate;
}
.au-3 {
  width: 54%; height: 58%; left: 24%; bottom: -24%;
  background: radial-gradient(closest-side, rgba(45, 212, 191, 0.3), transparent 72%);
  animation: auDrift3 47s ease-in-out infinite alternate;
}
@keyframes auDrift1 {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: .72; }
  to   { transform: translate3d(10%, 8%, 0) scale(1.2); opacity: 1; }
}
@keyframes auDrift2 {
  from { transform: translate3d(0, 0, 0) scale(1.12); opacity: .55; }
  to   { transform: translate3d(-12%, 10%, 0) scale(1); opacity: .9; }
}
@keyframes auDrift3 {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: .5; }
  to   { transform: translate3d(8%, -9%, 0) scale(1.22); opacity: .85; }
}
/* 星空画布：JS 绘制（多层视差 + 闪烁 + 流星） */
.hero-sky {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; pointer-events: none;
}
/* 暗角 + 文字可读性遮罩 */
.hero-veil {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(120% 92% at 50% 40%, transparent 42%, rgba(3, 5, 14, 0.52) 100%),
    linear-gradient(90deg, rgba(4, 7, 18, 0.95) 0%, rgba(4, 7, 18, 0.78) 30%, rgba(4, 7, 18, 0.18) 58%, rgba(4, 7, 18, 0.62) 100%),
    linear-gradient(180deg, rgba(4, 7, 18, 0.9) 0%, rgba(4, 7, 18, 0.1) 24%, rgba(4, 7, 18, 0.05) 55%, rgba(5, 7, 15, 0.99) 100%);
}
/* 胶片颗粒：SVG 噪声瓦片，steps 跳变模拟胶片颗粒跳动 */
.hero-grain {
  position: absolute; inset: 0; z-index: 4;
  overflow: hidden; pointer-events: none; opacity: 0.055;
}
.hero-grain::after {
  content: ""; position: absolute; inset: -100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(8) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  12.5% { transform: translate(-4%, -6%); }
  25% { transform: translate(-8%, 4%); }
  37.5% { transform: translate(4%, -8%); }
  50% { transform: translate(-4%, 10%); }
  62.5% { transform: translate(8%, 2%); }
  75% { transform: translate(-2%, -6%); }
  87.5% { transform: translate(6%, 6%); }
}
.hero-inner {
  position: relative; z-index: 5;
  max-width: var(--maxw); margin: 0 auto; padding: 108px 24px 28px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
}
.hero-copy { min-width: 0; }
.hero-eyebrow {
  margin: 0 0 10px; font-size: 11.5px; letter-spacing: 2.4px;
  text-transform: uppercase; color: #9db2ff; font-weight: 600;
}
.hero-title {
  margin: 0 0 4px; font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.16; font-weight: 800; color: #fff; letter-spacing: 0.5px;
}
.hero-title .grad {
  margin-left: 10px;
  background: linear-gradient(100deg, #9ab8ff, #c9a6ff 52%, #7ef2e0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 8px 0 8px; font-size: 14.5px; color: #c6d0ec; }
.hero-desc { margin: 0 0 20px; font-size: 13.5px; color: #95a0c2; max-width: 540px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px;
  border-radius: 12px; font-size: 14px; font-weight: 600; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn-primary { color: #fff; background: linear-gradient(135deg, #6d8bff, #8b5cf6); box-shadow: 0 10px 28px rgba(109, 139, 255, 0.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(109, 139, 255, 0.55); }
.btn-ghost { color: #e2e8ff; border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.06); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }

.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 21px; font-weight: 800; color: #fff; letter-spacing: 0.4px; line-height: 1.2; }
.stat b i { font-size: 12px; font-style: normal; font-weight: 600; margin-left: 1px; }
.stat span { font-size: 11.5px; color: #8b95b5; }

.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; max-width: 340px; }
.hero-quote {
  position: relative; margin: 0; padding: 16px 20px 14px 34px;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 14, 30, 0.5); backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}
.hero-quote p { margin: 0; font-size: 13px; line-height: 1.75; color: #ccd6f0; }
.hero-quote figcaption { margin-top: 8px; font-size: 11.5px; color: #8b95b5; text-align: right; }
.qmark {
  position: absolute; left: 10px; top: 4px; font-family: Georgia, serif;
  font-size: 34px; line-height: 1; color: rgba(167, 139, 250, 0.55);
}
.hero-words {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px; align-items: flex-end;
  font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase;
  color: rgba(190, 205, 240, 0.38);
}
.hero-motto {
  margin: 0; font-size: 9.5px; letter-spacing: 3px; line-height: 1.9;
  text-transform: uppercase; text-align: right; color: rgba(190, 205, 240, 0.3);
}
.hero-script {
  position: absolute; z-index: 6; left: 44%; top: 17%;
  margin: 0; pointer-events: none; text-align: left;
  font-family: "Segoe Script", "Bradley Hand", "Xingkai SC", "STXingkai", cursive;
  font-size: clamp(14px, 1.5vw, 21px); line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 20px rgba(90, 120, 255, 0.7), 0 0 6px rgba(140, 170, 255, 0.5);
  transform: rotate(-7deg);
}
.hero-script span { display: block; margin-top: 4px; font-size: 0.7em; color: rgba(205, 218, 255, 0.6); }

/* ---- Hero 浅色主题：晨曦山景 + 浅色遮罩 + 深色文字 ---- */
[data-theme="light"] .hero-bg {
  background-image: url('/img/hero/hero-bg-light.jpg');
  background-image: image-set(
    url('/img/hero/hero-bg-light.jpg') 1x,
    url('/img/hero/hero-bg-light@2x.jpg') 2x
  );
}
[data-theme="light"] .hero-veil {
  background:
    radial-gradient(120% 92% at 50% 38%, transparent 48%, rgba(148, 130, 180, 0.14) 100%),
    linear-gradient(90deg, rgba(250, 248, 253, 0.93) 0%, rgba(248, 246, 252, 0.74) 30%, rgba(248, 246, 252, 0.05) 58%, rgba(246, 244, 250, 0.46) 100%),
    linear-gradient(180deg, rgba(251, 249, 253, 0.92) 0%, rgba(249, 247, 252, 0.06) 22%, rgba(249, 247, 252, 0.04) 52%, rgba(244, 246, 252, 0.98) 100%);
}
[data-theme="light"] .hero-eyebrow { color: #5a68b8; }
[data-theme="light"] .hero-title { color: #1b2138; }
[data-theme="light"] .hero-title .grad {
  background: linear-gradient(100deg, #4f46e5, #9333ea 52%, #0f766e);
  -webkit-background-clip: text; background-clip: text;
}
[data-theme="light"] .hero-sub { color: #3c4560; }
[data-theme="light"] .hero-desc { color: #5a6480; }
[data-theme="light"] .btn-ghost {
  color: #2a3352; border-color: rgba(18, 24, 48, 0.16);
  background: rgba(255, 255, 255, 0.55);
}
[data-theme="light"] .btn-ghost:hover { background: rgba(255, 255, 255, 0.88); border-color: rgba(18, 24, 48, 0.3); }
[data-theme="light"] .stat b { color: #1b2138; }
[data-theme="light"] .stat span { color: #6b7490; }
[data-theme="light"] .hero-quote {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(18, 24, 48, 0.1);
  box-shadow: 0 16px 40px rgba(70, 90, 170, 0.14);
}
[data-theme="light"] .hero-quote p { color: #333c58; }
[data-theme="light"] .hero-quote figcaption { color: #6b7490; }
[data-theme="light"] .hero-words { color: rgba(40, 52, 96, 0.5); }
[data-theme="light"] .hero-motto { color: rgba(40, 52, 96, 0.42); }
[data-theme="light"] .hero-script {
  color: rgba(43, 53, 96, 0.92);
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.85), 0 0 12px rgba(255, 214, 170, 0.55);
}
[data-theme="light"] .hero-script span { color: rgba(60, 72, 116, 0.66); }
/* 极光 → 暖色晨曦 haze */
[data-theme="light"] .hero-aurora { opacity: 0.6; }
[data-theme="light"] .hero-aurora .au { mix-blend-mode: normal; }
[data-theme="light"] .au-1 { background: radial-gradient(closest-side, rgba(255, 198, 138, 0.6), transparent 72%); }
[data-theme="light"] .au-2 { background: radial-gradient(closest-side, rgba(255, 172, 192, 0.5), transparent 72%); }
[data-theme="light"] .au-3 { background: radial-gradient(closest-side, rgba(255, 228, 172, 0.55), transparent 72%); }
[data-theme="light"] .hero-grain { opacity: 0.04; }

/* =========================================================
   首页：仪表盘网格
   ========================================================= */
.dash-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 6px 24px 54px;
  display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 22px;
  align-items: start;
}
.dash-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.dash-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }

.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ico-violet { background: linear-gradient(135deg, rgba(139, 92, 246, 0.34), rgba(192, 132, 252, 0.16)); color: #c4b5fd; border: 1px solid rgba(167, 139, 250, 0.34); }
.ico-blue { background: linear-gradient(135deg, rgba(59, 130, 246, 0.34), rgba(56, 189, 248, 0.16)); color: #93c5fd; border: 1px solid rgba(96, 165, 250, 0.34); }
.ico-cyan { background: linear-gradient(135deg, rgba(34, 211, 238, 0.3), rgba(56, 224, 208, 0.14)); color: #7de8dd; border: 1px solid rgba(56, 224, 208, 0.3); }
.panel-titles { min-width: 0; }
.panel-titles h2 { margin: 0; font-size: 16.5px; letter-spacing: 0.3px; }
.panel-titles p { margin: 2px 0 0; font-size: 11.5px; color: var(--text-mute); }
.panel-more {
  margin-left: auto; font-size: 12px; color: var(--text-dim);
  text-decoration: none; white-space: nowrap; transition: color 0.2s;
}
.panel-more:hover { color: var(--brand); }

/* 文章卡 */
.acards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.acard { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.acard-media {
  position: relative; display: block; aspect-ratio: 16 / 10;
  border-radius: 14px; overflow: hidden; background: #0b1020; border: 1px solid var(--border);
}
.acard-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1); }
.acard:hover .acard-media img { transform: scale(1.07); }
.acard-badge {
  position: absolute; left: 10px; top: 10px; font-size: 10.5px; padding: 3px 9px;
  border-radius: 999px; color: #d6ddfa; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 10, 24, 0.66); backdrop-filter: blur(8px);
}
.acard-title { margin: 0; font-size: 14.5px; line-height: 1.5; font-weight: 600; }
.acard-title a { color: var(--text); text-decoration: none; }
.acard-title a:hover { color: var(--brand); }
.acard-desc {
  margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--text-mute);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.acard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: auto; font-size: 11px; color: var(--text-mute); }
.acard-meta .pc-views { margin-left: auto; }
.mi { display: inline-flex; align-items: center; gap: 4px; }

/* 项目卡 */
.pcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pcards-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pcards-wide .pcard { padding: 20px; }
.pcard {
  position: relative; overflow: hidden; padding: 15px;
  border-radius: 16px; border: 1px solid var(--border); background: var(--panel-2);
  display: flex; flex-direction: column; gap: 7px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.pcard::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, var(--a), transparent 62%);
  opacity: 0; transition: opacity 0.3s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--a); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35); }
.pcard:hover::after { opacity: 0.13; }
.pcard-top { display: flex; align-items: center; gap: 9px; }
.pcard-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  font-size: 16px; line-height: 1;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", var(--font);
  background: linear-gradient(135deg, var(--a), var(--b));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}
.pcard-title { margin: 0; font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-title a { color: var(--text); text-decoration: none; }
.pcard-title a:hover { color: var(--a); }
.pcard-open { color: var(--text-mute); flex: none; transition: color 0.2s, transform 0.2s; }
.pcard-open:hover { color: var(--a); transform: translate(1px, -1px); }
.pcard-desc {
  margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--text-mute);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.pcard-tags { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; }
.pcard-tags span {
  font-size: 10px; padding: 2px 7px; border-radius: 6px;
  background: var(--chip); border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap;
}
.pcard-status { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--a); white-space: nowrap; }
.pcard-status::before { content: "✦"; font-size: 9px; }
.pcard-link {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 11px; font-weight: 600; color: var(--text-dim); text-decoration: none;
  padding: 5px 10px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--chip); transition: color 0.2s, border-color 0.2s, background 0.2s; margin: 2px 0 1px;
}
.pcard-link:hover { color: var(--a); border-color: var(--a); }
.pcard-link.is-gh:hover { color: #fff; background: var(--a); border-color: var(--a); }
.pcard-link.is-play { color: #ddb56f; border-color: rgba(221, 181, 111, 0.45); }
.pcard-link.is-play:hover { color: #1a1206; background: #ddb56f; border-color: #ddb56f; }

/* =========================================================
   知识地图：参考图做底（文字已抹除）+ 代码叠加可编辑文字 + 动效
   ========================================================= */
.km-panel { overflow: hidden; }
.km {
  position: relative;
  width: 100%;
  aspect-ratio: 1672 / 940;
  overflow: hidden;
  isolation: isolate;
  border-radius: 15px;
  -webkit-user-select: none; user-select: none;
  container-type: size;
  background-image: url("/img/knowledge-map-dark-clean.jpg");
  background-size: 100% 100%;
  background-position: center center;
  background-repeat: no-repeat;
}
[data-theme="light"] .km { background-image: url("/img/knowledge-map-light-clean.jpg"); }

/* 知识地图：独立 3D 星系页面（iframe 内嵌，保留完整交互） */
.km-stage {
  position: relative; width: 100%; aspect-ratio: 1672 / 940;
  overflow: hidden; isolation: isolate; border-radius: 15px; background: #0e1120;
}
.km-frame { display: block; width: 100%; height: 100%; border: 0; background: transparent; }

/* 动效：中央星球呼吸辉光 */
.km-fx-glow {
  position: absolute; left: 51%; top: 50.5%; width: 42%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; z-index: 2; pointer-events: none;
  background: radial-gradient(circle, rgba(125,160,255,.30) 0%, rgba(125,150,255,.10) 45%, transparent 64%);
  filter: blur(8px); mix-blend-mode: screen;
  animation: kmGlow 6.5s ease-in-out infinite;
}
[data-theme="light"] .km-fx-glow {
  background: radial-gradient(circle, rgba(255,196,110,.42) 0%, rgba(255,190,120,.14) 45%, transparent 64%);
  mix-blend-mode: normal;
}
@keyframes kmGlow {
  0%, 100% { opacity: .5; transform: translate(-50%,-50%) scale(1); }
  50%      { opacity: .85; transform: translate(-50%,-50%) scale(1.05); }
}
/* 动效：叠加星光闪烁 */
.km-fx-stars {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: screen; opacity: .5;
  background-image:
    radial-gradient(1.4px 1.4px at 22% 18%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.2px 1.2px at 66% 12%, rgba(205,225,255,.6), transparent),
    radial-gradient(1.6px 1.6px at 82% 40%, rgba(200,220,255,.5), transparent),
    radial-gradient(1px 1px at 12% 62%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.3px 1.3px at 44% 86%, rgba(210,225,255,.45), transparent),
    radial-gradient(1px 1px at 92% 74%, rgba(255,255,255,.4), transparent);
  animation: kmTwinkle 7s ease-in-out infinite;
}
[data-theme="light"] .km-fx-stars { mix-blend-mode: normal; opacity: .12; }
@keyframes kmTwinkle { 0%,100% { opacity: .4; } 50% { opacity: .75; } }

/* 中央大标题（可编辑，叠在星球上） */
.km-core-txt {
  position: absolute; left: 51%; top: 50.5%; transform: translate(-50%,-50%);
  z-index: 3; text-align: center; pointer-events: none;
}
.km-core-txt b { display: block; font-size: 2.6cqw; font-weight: 800; color: #fff; letter-spacing: .1cqw; line-height: 1.1; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.km-core-txt small { display: block; margin-top: .9cqh; font-size: 1.15cqw; font-weight: 600; letter-spacing: .42cqw; color: rgba(206,220,255,.9); text-shadow: 0 1px 8px rgba(0,0,0,.4); }
[data-theme="light"] .km-core-txt b { color: #fff; text-shadow: 0 2px 10px rgba(120,70,10,.35); }
[data-theme="light"] .km-core-txt small { color: rgba(255,245,225,.95); text-shadow: 0 1px 8px rgba(120,70,10,.3); }

/* 节点文字（可编辑，叠在原卡片面板上；深 / 浅两套坐标） */
.km-node {
  position: absolute; z-index: 3; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start; gap: .2cqh;
}
.km-node b { font-size: 2.0cqw; font-weight: 700; color: #fff; line-height: 1.12; white-space: nowrap; text-shadow: 0 1px 8px rgba(0,0,0,.35); transition: text-shadow .25s ease; }
.km-node small { font-size: 1.42cqw; color: rgba(200,213,246,.82); line-height: 1.2; white-space: nowrap; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.km-node:hover b { text-shadow: 0 0 14px var(--c), 0 1px 8px rgba(0,0,0,.4); }
[data-theme="light"] .km-node b { color: #22304d; text-shadow: none; }
[data-theme="light"] .km-node small { color: rgba(52,66,100,.78); text-shadow: none; }
[data-theme="light"] .km-node:hover b { text-shadow: 0 0 12px var(--c); }
.km-node[data-k="0"] { left: 46.80%; top: 20.64%; width: 16.42%; height: 6.60%; }
.km-node[data-k="1"] { left: 85.06%; top: 41.91%; width: 13.07%; height: 6.60%; }
.km-node[data-k="2"] { left: 74.24%; top: 77.55%; width: 13.61%; height: 6.70%; }
.km-node[data-k="3"] { left: 15.39%; top: 75.85%; width: 14.80%; height: 6.81%; }
.km-node[data-k="4"] { left: 7.91%;  top: 38.09%; width: 13.85%; height: 6.60%; }
[data-theme="light"] .km-node[data-k="0"] { left: 50.20%; top: 11.06%; width: 16.54%; height: 6.60%; }
[data-theme="light"] .km-node[data-k="1"] { left: 83.33%; top: 31.81%; width: 13.73%; height: 6.70%; }
[data-theme="light"] .km-node[data-k="2"] { left: 76.63%; top: 72.13%; width: 13.79%; height: 7.13%; }
[data-theme="light"] .km-node[data-k="3"] { left: 18.44%; top: 71.28%; width: 14.09%; height: 6.81%; }
[data-theme="light"] .km-node[data-k="4"] { left: 6.06%;  top: 31.17%; width: 13.79%; height: 6.60%; }

/* ============ 高级特效层（叠加在底图之上，不破坏场景） ============ */
/* 极光漂移 */
.km-aurora { position: absolute; inset: -12%; z-index: 1; pointer-events: none; mix-blend-mode: screen; opacity: .55; }
.km-aurora i { position: absolute; border-radius: 50%; }
.km-aurora .a1 { width: 40%; height: 58%; left: 6%; top: 8%; background: radial-gradient(circle, rgba(124,92,255,.34), transparent 70%); animation: kmDrift 26s ease-in-out infinite; }
.km-aurora .a2 { width: 46%; height: 54%; right: 4%; bottom: 4%; background: radial-gradient(circle, rgba(40,140,255,.26), transparent 70%); animation: kmDrift 34s ease-in-out infinite reverse; }
.km-aurora .a3 { width: 34%; height: 40%; left: 38%; top: 52%; background: radial-gradient(circle, rgba(56,214,196,.20), transparent 70%); animation: kmDrift 42s ease-in-out infinite; }
@keyframes kmDrift { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4%,-5%) scale(1.14); } }
[data-theme="light"] .km-aurora { mix-blend-mode: normal; opacity: .20; }

/* 卫星沿轨道环绕 */
.km-orbit { position: absolute; left: 51%; top: 50.5%; z-index: 2; pointer-events: none; mix-blend-mode: screen; animation: kmOrbitSpin var(--dur,22s) linear infinite; }
.km-orbit i { position: absolute; top: 0; left: 50%; width: 7px; height: 7px; border-radius: 50%; transform: translate(-50%,-50%); background: #fff; box-shadow: 0 0 10px #cfe3ff, 0 0 22px rgba(140,180,255,.75); }
.km-orbit.orb-a { width: 46%; height: 20%; --tilt: -18deg; --dur: 22s; }
.km-orbit.orb-b { width: 33%; height: 13%; --tilt: 14deg; --dur: 15s; animation-direction: reverse; }
.km-orbit.orb-b i { box-shadow: 0 0 10px #e6d2ff, 0 0 22px rgba(160,120,255,.72); }
.km-orbit.orb-c { width: 60%; height: 27%; --tilt: -32deg; --dur: 30s; }
.km-orbit.orb-c i { box-shadow: 0 0 10px #ccf5ec, 0 0 22px rgba(60,214,196,.66); }
@keyframes kmOrbitSpin { from { transform: translate(-50%,-50%) rotate(var(--tilt,-18deg)); } to { transform: translate(-50%,-50%) rotate(calc(var(--tilt,-18deg) + 360deg)); } }
[data-theme="light"] .km-orbit { mix-blend-mode: normal; opacity: .85; }
[data-theme="light"] .km-orbit i { box-shadow: 0 0 8px rgba(90,120,200,.5); }

/* 星球能量脉冲环 */
.km-pulse { position: absolute; left: 51%; top: 50.5%; width: 26%; aspect-ratio: 1; border-radius: 50%; z-index: 2; pointer-events: none; mix-blend-mode: screen; border: 2px solid rgba(150,190,255,.5); opacity: 0; animation: kmPulse 4.5s ease-out infinite; }
.km-pulse.p2 { animation-delay: 1.5s; }
.km-pulse.p3 { animation-delay: 3s; }
@keyframes kmPulse { 0% { transform: translate(-50%,-50%) scale(.72); opacity: 0; } 15% { opacity: .55; } 100% { transform: translate(-50%,-50%) scale(2); opacity: 0; } }
[data-theme="light"] .km-pulse { mix-blend-mode: normal; border-color: rgba(230,170,90,.5); }

/* 鼠标跟随光斑 */
.km-spot { position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; border-radius: 50%; z-index: 2; pointer-events: none; mix-blend-mode: screen; filter: blur(6px); transform: translate(-50%,-50%) translate(calc(var(--px,0) * 34%), calc(var(--py,0) * 34%)); background: radial-gradient(circle, rgba(140,175,255,.16), transparent 62%); }
[data-theme="light"] .km-spot { mix-blend-mode: normal; opacity: .5; background: radial-gradient(circle, rgba(255,205,120,.22), transparent 62%); }

/* 玻璃流光扫过 */
.km-sheen-sweep { position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: screen; opacity: 0; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.08) 48%, rgba(205,228,255,.16) 50%, rgba(255,255,255,.08) 52%, transparent 58%); animation: kmSheenSweep 9s ease-in-out infinite; }
@keyframes kmSheenSweep { 0% { transform: translateX(-130%); opacity: 0; } 12% { opacity: .8; } 70% { opacity: .5; } 100% { transform: translateX(130%); opacity: 0; } }
[data-theme="light"] .km-sheen-sweep { mix-blend-mode: normal; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.4) 50%, transparent 58%); }

/* 流星 */
.km-meteor { position: absolute; top: 10%; left: 0; width: 14cqw; height: 2px; z-index: 2; pointer-events: none; mix-blend-mode: screen; border-radius: 2px; opacity: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95)); filter: drop-shadow(0 0 6px rgba(185,215,255,.9)); animation: kmMeteor 9s linear infinite; }
.km-meteor.m2 { animation-delay: 4.5s; animation-duration: 12s; top: 34%; }
@keyframes kmMeteor { 0% { transform: translate(0,0) rotate(22deg); opacity: 0; } 4% { opacity: 1; } 16% { opacity: 0; } 100% { transform: translate(118cqw, 42cqh) rotate(22deg); opacity: 0; } }
[data-theme="light"] .km-meteor { mix-blend-mode: normal; }

/* 侧栏卡片 */
.scard {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 17px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.scard-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.scard-head h3 { margin: 0; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.scard-head a { font-size: 11px; color: var(--text-mute); text-decoration: none; }
.scard-head a:hover { color: var(--brand); }
.dot-ico { width: 7px; height: 7px; border-radius: 50%; background: #8b5cf6; box-shadow: 0 0 10px #8b5cf6; }
.ico-violet-dot { background: #a78bfa; box-shadow: 0 0 10px #a78bfa; }
.ico-cyan-dot { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.ico-pink-dot { background: var(--pink); box-shadow: 0 0 10px var(--pink); }

.about-top { display: flex; align-items: center; gap: 12px; }
.about-ava {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none;
  border: 1px solid rgba(255, 255, 255, 0.22); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.about-name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; }
.verified {
  width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center;
  font-size: 8px; color: #fff; background: linear-gradient(135deg, #4f8cff, #8b5cf6);
}
.about-role { margin-top: 2px; font-size: 11px; color: var(--text-mute); }
.about-bio { margin: 12px 0 10px; font-size: 12.5px; line-height: 1.7; color: var(--text-dim); }
.about-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.about-meta span {
  font-size: 10.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--chip); border: 1px solid var(--border); color: var(--text-dim);
}
.about-quote {
  margin: 0 0 13px; padding: 11px 13px; border-radius: 12px;
  background: var(--chip); border: 1px solid var(--border);
  font-size: 11.5px; line-height: 1.7; color: var(--text-dim);
}
.about-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.about-actions a {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px;
  padding: 6px 10px; border-radius: 9px; text-decoration: none;
  border: 1px solid var(--border); background: var(--chip); color: var(--text-dim);
  transition: 0.2s;
}
.about-actions a:hover { color: var(--text); border-color: var(--border-strong); }
.about-actions svg { width: 14px; height: 14px; }
.about-actions .mono { font-size: 11px; }
.about-social { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.activity li { display: flex; gap: 10px; }
.act-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--brand); box-shadow: 0 0 8px var(--brand); }
.act-body a { display: block; font-size: 12px; line-height: 1.55; color: var(--text-dim); text-decoration: none; }
.act-body a:hover { color: var(--brand); }
.act-body time { font-size: 10.5px; color: var(--text-mute); }

.sub-desc { margin: 0 0 10px; font-size: 11.5px; color: var(--text-mute); }
.subscribe { display: flex; gap: 8px; }
.subscribe input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--chip); color: var(--text);
  font-family: inherit; font-size: 12px; outline: none; transition: 0.2s;
}
.subscribe input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109, 139, 255, 0.18); }
.subscribe button {
  width: 40px; height: 38px; flex: none; border: 0; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6d8bff, #8b5cf6);
  transition: transform 0.2s, box-shadow 0.2s;
}
.subscribe button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(109, 139, 255, 0.4); }
.sub-hint { margin: 8px 0 0; font-size: 10.5px; color: var(--text-mute); }

.tagwrap { display: flex; flex-wrap: wrap; gap: 7px; }
.tagwrap a {
  font-size: 11px; padding: 4px 9px; border-radius: 7px; text-decoration: none;
  background: var(--chip); border: 1px solid var(--border); color: var(--text-dim);
  transition: 0.2s;
}
.tagwrap a:hover { color: #fff; background: rgba(109, 139, 255, 0.24); border-color: rgba(109, 139, 255, 0.45); }

/* =========================================================
   页脚
   ========================================================= */
.site-footer { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 36px; }
.foot-inner {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding-top: 22px; border-top: 1px solid var(--border);
}
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-id b { display: block; font-size: 14px; }
.foot-id small { font-size: 11px; color: var(--text-mute); }
.foot-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.foot-nav a { font-size: 12.5px; color: var(--text-dim); text-decoration: none; padding: 6px 10px; border-radius: 8px; transition: 0.2s; }
.foot-nav a:hover { color: var(--text); background: var(--chip); }
.foot-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.foot-social { display: flex; gap: 6px; }
.foot-copy { display: flex; flex-direction: column; align-items: flex-end; font-size: 10.5px; color: var(--text-mute); line-height: 1.55; }
.footer-note { margin: 18px 0 0; text-align: center; font-size: 11px; color: var(--text-mute); }
.footer-note strong { color: var(--text-dim); font-weight: 600; }

/* =========================================================
   内页通用
   ========================================================= */
.container { max-width: 1180px; margin: 0 auto; padding: 104px 24px 60px; }
.section { margin-bottom: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-title { margin: 0; font-size: 1.5rem; position: relative; padding-left: 14px; }
.section-title::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 4px;
  background: var(--grad);
}
.more-link { color: var(--text-dim); text-decoration: none; white-space: nowrap; font-size: 13px; }
.more-link:hover { color: var(--brand); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
@media (max-width: 1080px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .card-grid { grid-template-columns: 1fr; } }
.post-card {
  display: flex; flex-direction: column; gap: 9px; padding: 0; min-width: 0;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.post-card:hover { transform: none; border-color: transparent; box-shadow: none; }
/* 列表卡片封面（对齐首页精选卡片） */
.post-card-media {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: 14px; background: #0b1020; border: 1px solid var(--border);
}
.post-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.post-card:hover .post-card-media img { transform: scale(1.07); }
.post-card-media::after {
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(4, 8, 20, 0.42));
  transition: opacity 0.35s;
}
.post-card:hover .post-card-media::after { opacity: 1; }
.post-card-fb {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 13px; letter-spacing: 0.08em; color: rgba(214, 221, 250, 0.55);
  background: radial-gradient(circle at 30% 25%, rgba(109, 139, 255, 0.22), transparent 60%), #0b1020;
}
.post-card .acard-badge { position: absolute; left: 12px; top: 12px; z-index: 1; }
.post-card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-mute); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-chip {
  font-size: 11px; padding: 2px 9px; border-radius: 999px; text-decoration: none;
  background: var(--chip); border: 1px solid var(--border); color: var(--brand);
  transition: 0.2s;
}
.tag-chip:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.post-title { margin: 0; font-size: 15px; line-height: 1.45; }
.post-title a { color: var(--text); text-decoration: none; }
.post-title a:hover { color: var(--brand); }
.post-summary {
  margin: 0; flex: 1; font-size: 12.5px; line-height: 1.65; color: var(--text-mute);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-foot { font-size: 11.5px; color: var(--text-mute); }

/* 归档 */
.archive-year-title { margin: 22px 0 12px; font-size: 1.2rem; border-left: 4px solid var(--brand); padding-left: 12px; }
.archive-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.archive-item {
  display: flex; gap: 14px; padding: 11px 14px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--border); transition: 0.2s;
}
.archive-item:hover { border-color: rgba(109, 139, 255, 0.45); }
.archive-item time { min-width: 48px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.archive-item a { color: var(--text); text-decoration: none; }
.archive-item a:hover { color: var(--brand); }

/* 标签云 */
.tags-cloud { display: flex; gap: 12px; flex-wrap: wrap; }
.tag-cloud-item {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-radius: 12px; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--border); transition: 0.2s;
}
.tag-cloud-item:hover { transform: translateY(-2px); border-color: rgba(109, 139, 255, 0.5); }
.tag-count { background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 11px; }

/* =========================================================
   文章页
   ========================================================= */
.single {
  max-width: 860px; margin: 0 auto; padding: 34px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  backdrop-filter: blur(18px); box-shadow: var(--shadow);
}
.single-head { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.single-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; color: var(--text-mute); }
.single-title { margin: 0; font-size: clamp(1.6rem, 3vw, 2.05rem); line-height: 1.32; }
.single-desc { margin: 10px 0 0; font-size: 13.5px; color: var(--text-dim); }
.single-content { font-size: 15px; line-height: 1.85; }
.single-content img { border-radius: 14px; margin: 18px 0; box-shadow: var(--shadow); }
.single-content figure { margin: 24px 0; }
.single-content figure img { display: block; width: 100%; margin: 0 0 10px; }
.single-content figcaption { font-size: 13px; line-height: 1.6; color: #8b95b5; text-align: center; padding: 0 10px; }
[data-theme="light"] .single-content figcaption { color: #6b7490; }
.single-content h2 { margin-top: 34px; position: relative; padding-left: 14px; }
.single-content h2::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 4px;
  background: var(--grad);
}
.single-content a { color: var(--brand); }
.single-content pre {
  padding: 16px; border-radius: 12px; overflow: auto; font-size: 13px; line-height: 1.7;
  background: rgba(0, 0, 0, 0.42); border: 1px solid var(--border); color: #e6ecff;
}
[data-theme="light"] .single-content pre { background: #eef2fb; color: #1c2340; }
.single-content code { padding: 2px 6px; border-radius: 6px; font-size: 0.9em; background: var(--chip); color: #cfd8f2; }
[data-theme="light"] .single-content code { color: #2a3352; }
.single-content pre code { padding: 0; background: transparent; color: inherit; }
.single-content blockquote {
  margin: 16px 0; padding: 10px 18px; border-radius: 0 12px 12px 0;
  border-left: 4px solid var(--brand); background: var(--chip); color: var(--text-dim);
}
.single-foot { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pill.gh-link { font-weight: 600; }
.pill.gh-link.is-gh { border-color: var(--brand); color: var(--brand); background: transparent; }
.pill.gh-link.is-gh:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  border-radius: 999px; text-decoration: none; border: 1px solid var(--border);
  background: var(--chip); color: var(--text); transition: 0.2s;
}
.pill:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--brand); }
.pill.ghost { background: transparent; }
.about-avatar { width: 96px; height: 96px; border-radius: 24px; object-fit: cover; flex: none; box-shadow: var(--shadow); }
.about-banner {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  border-radius: var(--radius-lg); margin: 6px 0 24px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.about-hero { display: flex; align-items: center; gap: 20px; margin: 4px 0 24px; }
.about-hero p { margin: 0; font-size: 15px; line-height: 1.85; color: var(--text-dim); }
@media (max-width: 620px) {
  .about-hero { flex-direction: column; text-align: center; gap: 14px; }
}

/* 评论 */
.comments {
  margin-top: 32px; padding: 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border);
}
.comments-title { margin: 0 0 8px; font-size: 1.2rem; }
.comments-hint { margin: 0 0 16px; font-size: 12.5px; color: var(--text-mute); }

/* 浏览量徽标 */
.post-views, .pc-views {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-mute); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.post-views .ic-eye, .pc-views .ic-eye { opacity: .7; flex: none; }
.post-views .view-n, .pc-views .view-n { font-weight: 600; color: var(--text); }
.post-card-foot { display: flex; align-items: center; gap: 10px; }
.pc-views { margin-left: auto; }
.pc-likes {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-mute); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pc-likes svg { opacity: .7; flex: none; }
.pc-likes .like-n { font-weight: 600; color: var(--text); }

/* 评论数徽标 */
.c-count { color: var(--accent); font-weight: 700; font-size: .85em; margin-left: 4px; }

/* 评论表单 */
.comment-form {
  margin: 14px 0 18px; padding: 14px; border-radius: var(--radius);
  background: var(--panel-solid); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.cf-row { display: flex; gap: 10px; align-items: center; }
.comment-form .cf-row .cf-msg { flex: 1; }
.cf-input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--border-strong);
  color: var(--text); font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.cf-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.cf-textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.cf-row .cf-input { flex: 1; }
.cf-submit {
  flex: none; padding: 10px 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; background: var(--accent); color: #fff;
  font: inherit; font-weight: 600; transition: filter .15s, opacity .15s;
}
.cf-submit:hover { filter: brightness(1.08); }
.cf-submit:disabled { opacity: .55; cursor: not-allowed; }
.cf-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 20px; }
.cf-msg { font-size: 12.5px; color: var(--text-mute); }
.cf-msg.err { color: #ff5c8a; }
.cf-reply { font-size: 12.5px; color: var(--text-mute); }
.cf-reply b { color: var(--accent); }
.cf-cancel { margin-left: 6px; background: none; border: 0; color: var(--text-mute); cursor: pointer; text-decoration: underline; font: inherit; font-size: 12.5px; }

/* 评论图片：上传按钮、预览缩略图、已发布评论的图片网格 */
.cf-icon-btn {
  flex: none; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-mute);
  font: inherit; font-size: 13px; transition: .15s;
}
.cf-icon-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cf-icon-btn:disabled { opacity: .5; cursor: not-allowed; }
.cf-img-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cf-img-preview[hidden] { display: none; }
.img-cell { position: relative; width: 74px; height: 74px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.img-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-rm {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding: 0; transition: background .15s;
}
.img-rm:hover { background: rgba(0, 0, 0, .8); }
.c-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.c-imgs a {
  width: 92px; height: 92px; border-radius: 10px; overflow: hidden; display: block;
  border: 1px solid var(--border); transition: border-color .15s, transform .15s;
}
.c-imgs a:hover { border-color: var(--accent); transform: translateY(-1px); }
.c-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 620px) {
  .img-cell { width: 60px; height: 60px; }
  .c-imgs a { width: 76px; height: 76px; }
}
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* 评论列表：根评论为卡片；回复嵌在父评论内部、无卡片，仅缩进+左侧细线 */
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.comment-item {
  padding: 11px 14px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 5px;
}
.c-kids {
  list-style: none; margin: 6px 0 0; padding: 0 0 0 14px;
  border-left: 1px solid var(--border-strong);
  display: flex; flex-direction: column; gap: 3px;
}
/* 单条评论内回复较多时的「更多回复」就地展开 */
.c-kids-more {
  align-self: flex-start; margin: 4px 0 0 14px; padding: 3px 12px; border-radius: 999px; cursor: pointer;
  border: 1px dashed var(--border-strong); background: var(--panel); color: var(--accent);
  font: inherit; font-size: 12px; font-weight: 600; transition: .15s;
}
.c-kids-more:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.comment-item.is-reply { padding: 3px 0; background: none; border: 0; border-radius: 0; gap: 2px; }
.c-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.c-avatar {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; line-height: 1;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8b5cf6));
}
.comment-item.is-reply .c-avatar { width: 22px; height: 22px; font-size: 12px; }
.c-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.c-name { font-weight: 600; color: var(--text); font-size: 13.5px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-time { font-size: 11.5px; color: var(--text-mute); white-space: nowrap; }
.c-reply-ref {
  font-size: 11px; color: var(--text-mute); white-space: nowrap;
  padding: 1px 8px; border-radius: 999px;
  background: var(--panel-solid); border: 1px solid var(--border);
}
.comment-item.is-reply .c-reply-ref { background: none; border: 0; padding: 1px 0; }
.c-body { color: var(--text); font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.comment-item.is-reply .c-body { font-size: 13.5px; }
.c-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: none; }
.c-reply-btn {
  background: none; border: 0; cursor: pointer; padding: 2px 6px; border-radius: 6px;
  color: var(--text-mute); font: inherit; font-size: 12px; transition: color .15s, background .15s;
}
.c-reply-btn:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.c-del-btn {
  background: none; border: 0; cursor: pointer; padding: 2px 6px; border-radius: 6px;
  color: var(--text-mute); font: inherit; font-size: 12px; transition: color .15s, background .15s;
}
.c-del-btn:hover { color: #ff5c8a; background: rgba(255, 92, 138, .10); }
.c-del-btn:disabled { opacity: .5; cursor: not-allowed; }
.c-empty { text-align: center; color: var(--text-mute); font-size: 13px; padding: 8px 0; }

@media (max-width: 620px) {
  .comments { padding: 18px 14px; }
  .comment-item { padding: 10px 12px; }
  .c-head { gap: 7px; }
  .c-kids { padding-left: 10px; }
  .c-name { max-width: 120px; }
  .c-actions { gap: 8px; }
}

/* 评论列表折叠 */
.c-list-more { display: flex; justify-content: center; margin-top: 12px; }
.c-more-btn {
  padding: 7px 18px; border-radius: 999px; cursor: pointer;
  border: 1px dashed var(--border-strong); background: var(--panel);
  color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600;
  transition: .15s;
}
.c-more-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.c-more-btn[hidden] { display: none; }

/* 头部右上角登录控件 */
.auth-control { display: flex; align-items: center; }
.ac-login {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--panel);
  color: var(--text); font: inherit; font-size: 13px; font-weight: 600;
  transition: .15s; white-space: nowrap;
}
.ac-login:hover { border-color: var(--accent); color: var(--accent); }
.ac-user {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 4px 8px; border-radius: 999px;
  border: 1px solid transparent; transition: .15s;
}
.ac-user:hover { border-color: var(--border-strong); background: var(--panel); }
.ac-avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8b5cf6));
}
.ac-name { font-size: 13px; font-weight: 600; color: var(--text); max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 150px; padding: 6px;
  border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35); display: none; z-index: 60;
}
.ac-menu.open { display: block; }
.ac-item {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none;
  color: var(--text); font: inherit; font-size: 13px; border-radius: 8px; cursor: pointer;
}
.ac-item:hover { background: var(--panel); color: var(--accent); }
.ac-item.warn { color: #f59e0b; }

/* 登录态提示条 */
.c-authbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.c-auth-out, .c-auth-in { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: space-between; }
.c-auth-tip { font-size: 13px; color: var(--text-mute); }
.c-auth-open { flex: none; padding: 9px 18px; }
.c-auth-who { display: inline-flex; align-items: center; gap: 8px; }
.c-auth-name { font-size: 13.5px; color: var(--text-mute); }
.c-auth-name b { color: var(--accent); font-weight: 600; }
.c-auth-link { background: none; border: 0; cursor: pointer; color: var(--text-mute); font: inherit; font-size: 13px; text-decoration: underline; padding: 0; }
.c-auth-link:hover { color: var(--accent); }
.cf-textarea:disabled { opacity: .55; cursor: not-allowed; }
/* 未登录：只读但保持明亮，点击即唤起登录 */
.cf-textarea.is-locked { opacity: 1; cursor: pointer; border-style: dashed; }
.cf-textarea.is-locked::placeholder { color: var(--accent); opacity: .85; }

/* 未验证邮箱提示条 */
.c-verify-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px;
  color: #f59e0b; background: rgba(245, 158, 11, .10); border: 1px solid rgba(245, 158, 11, .35);
}
.c-verify-bar[hidden] { display: none; }

/* 评论头像（emoji）与编辑区：具体尺寸见 .c-avatar / .c-avatar-sm / .c-form-avatar */
.c-avatar-sm { width: 28px; height: 28px; font-size: 15px; }
.cf-editor { display: flex; gap: 10px; align-items: flex-start; }
.c-form-avatar { width: 36px; height: 36px; font-size: 19px; }

/* 登录 / 注册弹窗 */
.auth-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 12, 28, 0.55); backdrop-filter: blur(6px);
  padding: 20px;
}
.auth-modal[hidden] { display: none; }
.auth-card {
  position: relative; width: 100%; max-width: 400px;
  padding: 28px 26px 24px; border-radius: var(--radius-lg);
  background: var(--panel-solid); border: 1px solid var(--border-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  max-height: 92vh; overflow-y: auto;
}
.auth-close {
  position: absolute; top: 12px; right: 14px; width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--panel);
  color: var(--text-mute); font-size: 20px; line-height: 1; cursor: pointer; transition: .15s;
}
.auth-close:hover { color: var(--text); border-color: var(--accent); }
.auth-title { margin: 0 0 14px; font-size: 18px; font-weight: 700; color: var(--text); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-tabs[hidden] { display: none; }
.auth-tab {
  flex: 1; padding: 9px 0; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600;
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-mute); transition: .15s;
}
.auth-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-field[hidden] { display: none; }
.af-label { display: block; font-size: 12.5px; color: var(--text-mute); margin-bottom: 8px; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-opt {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--panel);
  font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s;
}
.avatar-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.avatar-opt.active {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.auth-reset-field { display: flex; flex-direction: column; gap: 10px; }
.auth-reset-field[hidden] { display: none; }
.auth-msg { min-height: 18px; font-size: 12.5px; }
.auth-sub-hint {
  margin: -2px 0 0; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.6;
  color: var(--text-mute); background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.auth-sub-hint[hidden] { display: none; }
.auth-devlinks {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px;
  background: rgba(245, 158, 11, .10); border: 1px solid rgba(245, 158, 11, .35);
}
.auth-devlinks[hidden] { display: none; }
.auth-devlinks a { font-size: 12.5px; color: var(--accent); text-decoration: underline; word-break: break-all; }
.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.auth-forgot { font-size: 12.5px; color: var(--text-mute); text-decoration: underline; }
.auth-forgot:hover { color: var(--accent); }
.auth-submit { margin-top: 0; padding: 11px 22px; }
.auth-back { align-self: center; font-size: 12.5px; color: var(--text-mute); text-decoration: none; }
.auth-back[hidden] { display: none; }
.auth-back:hover { color: var(--accent); }

/* =========================================================
   搜索弹窗
   ========================================================= */
.search-modal {
  position: fixed; inset: 0; z-index: 100; display: flex;
  align-items: flex-start; justify-content: center; padding-top: 12vh;
}
.search-modal[hidden] { display: none; }
.search-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 16, 0.66); backdrop-filter: blur(6px); }
.search-box {
  position: relative; width: min(640px, 92vw); padding: 16px;
  background: var(--panel-solid); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.search-input-wrap {
  display: flex; align-items: center; gap: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border); color: var(--text-mute);
}
#search-input {
  flex: 1; padding: 6px; border: 0; outline: none; background: transparent;
  color: var(--text); font-family: inherit; font-size: 1rem;
}
.search-results { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; margin-top: 12px; }
.search-result {
  padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--text);
  background: var(--chip); border: 1px solid var(--border); transition: 0.2s;
}
.search-result:hover { border-color: rgba(109, 139, 255, 0.5); }
.sr-title { font-weight: 600; }
.sr-summary { margin-top: 2px; font-size: 12px; color: var(--text-mute); }
.sr-tags { margin-top: 4px; font-size: 11px; color: var(--brand); }
.search-empty { display: none; padding: 14px; color: var(--text-mute); }
.search-empty.show { display: block; }

/* =========================================================
   文章互动：点赞 / 收藏 / 转发
   ========================================================= */
.interactions {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 26px 0 6px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--chip); border: 1px solid var(--border);
}
.act {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-radius: 999px; cursor: pointer; font-size: 13.5px;
  background: var(--chip); border: 1px solid var(--border); color: var(--text);
  transition: transform 0.15s, border-color 0.2s, background 0.2s, color 0.2s;
}
.act:hover { transform: translateY(-2px); border-color: var(--brand); }
.act .act-count {
  min-width: 20px; text-align: center; font-variant-numeric: tabular-nums;
  padding: 1px 8px; border-radius: 999px; font-size: 11px;
  background: var(--chip-hover); color: var(--text-dim);
}
.act-like.on { color: #ff5c8a; border-color: #ff5c8a; }
.act-like.on .ic-heart { fill: #ff5c8a; stroke: #ff5c8a; }
.act-fav.on { color: #ffce4d; border-color: #ffce4d; }
.act-fav.on .ic-star { fill: #ffce4d; stroke: #ffce4d; }
.act:active { transform: scale(0.96); }

.share-wrap { position: relative; }
.share-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50;
  display: flex; flex-direction: column; min-width: 160px; padding: 6px;
  border-radius: 14px; background: var(--panel-solid);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.share-menu[hidden] { display: none; }
.share-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--text); font-family: inherit; font-size: 12.5px; cursor: pointer;
}
.share-menu button:hover { background: var(--chip-hover); }

.badge {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: 9px;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.badge[hidden] { display: none; }

.favorites-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.favorites-modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; width: min(460px, 100%); max-height: 80vh; overflow: auto;
  padding: 20px 22px; border-radius: var(--radius); background: var(--panel-solid);
  border: 1px solid var(--border-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 1.1rem; }
.fav-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; text-decoration: none;
  background: var(--chip); border: 1px solid var(--border); color: var(--text); transition: 0.2s;
}
.fav-item:hover { border-color: rgba(109, 139, 255, 0.5); }
.fav-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-del { border: 0; background: transparent; color: var(--text-mute); cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 8px; }
.fav-del:hover { color: #ff5c8a; background: var(--chip-hover); }
.fav-empty { color: var(--text-mute); font-size: 12.5px; line-height: 1.7; }

/* 回到顶部 */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  background: var(--panel-solid); border: 1px solid var(--border-strong); color: var(--text);
  backdrop-filter: blur(12px); opacity: 0; pointer-events: none; transition: 0.3s;
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* 分页 */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 34px; flex-wrap: wrap; }
.pager-nav, .pager-num {
  min-width: 40px; height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--chip); color: var(--text-dim); text-decoration: none;
  font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1;
  transition: transform 0.2s, border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
}
.pager-nav span { font-size: 17px; line-height: 1; }
.pager-nav:hover, .pager-num:hover { color: var(--text); border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }
.pager-num.is-current {
  color: #fff; background: var(--brand); border-color: var(--brand);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 45%, transparent); cursor: default; transform: none;
}
.pager-nav.is-disabled { opacity: 0.32; pointer-events: none; }
.pager-gap { color: var(--text-mute); padding: 0 2px; user-select: none; }
@media (max-width: 520px) {
  .pager { gap: 6px; margin-top: 26px; }
  .pager-nav, .pager-num { min-width: 36px; height: 36px; padding: 0 9px; font-size: 13px; border-radius: 10px; }
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1280px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .acards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side {
    position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-side { align-items: flex-start; max-width: 100%; }
  .hero-words { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .hero-script { display: none; }
  .search-trigger { min-width: 0; }
  .search-trigger .st-text, .search-trigger kbd { display: none; }
  .search-trigger { width: 36px; padding: 0; justify-content: center; }
}

@media (max-width: 860px) {
  .nav-inner { height: 60px; padding: 0 16px; gap: 12px; }
  .brand-copy small { display: none; }
  .nav-links {
    display: flex; gap: 0; overflow-x: auto; margin-left: 0;
    min-width: 0; flex: 0 1 auto;          /* 允许收缩并内部横向滚动，避免把右侧按钮挤出屏幕 */
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { padding: 7px 11px; font-size: 13.5px; }
  .nav-actions { flex: 0 0 auto; min-width: 0; }   /* 右侧操作区不参与收缩，保证主题按钮可见 */
  .ac-login { padding: 7px 11px; }                 /* 登录按钮收紧，给图标按钮腾位 */
  .hero-band { min-height: 0; }
  .hero-inner { padding: 92px 18px 24px; }
  .dash-grid { padding: 4px 16px 44px; }
  .panel { padding: 18px; }
  .km-panel { padding: 16px; }
  .km-stage { aspect-ratio: 16 / 10; min-height: 360px; max-height: 520px; }
  /* 移动端知识地图改写为卡片网格。
     注意：本段所有规则统一加 [data-theme] 前缀，用于压过桌面端
     [data-theme="light"] .km / .km-node[data-k] / .km-core-txt b 等主题规则
     （它们特异性更高，否则浅色主题下底图、绝对定位与白字会全部"复活"）。 */
  [data-theme] .km {
    aspect-ratio: auto; background-image: none; display: grid;
    grid-template-columns: 1fr 1fr; gap: 12px; container-type: normal;
  }
  .km-fx-glow, .km-fx-stars, .km-aurora, .km-orbit, .km-pulse, .km-spot, .km-sheen-sweep, .km-meteor { display: none; }
  [data-theme] .km-core-txt { position: static; transform: none; grid-column: 1 / -1; text-align: left; padding: 6px 4px 2px; }
  [data-theme] .km-core-txt b {
    color: var(--text); text-shadow: none;
    font-size: 20px; font-weight: 800; letter-spacing: .02em; line-height: 1.15;
  }
  [data-theme] .km-core-txt small {
    color: var(--text-dim); text-shadow: none;
    font-size: 11px; font-weight: 600; letter-spacing: .32em; margin-top: 5px;
  }
  [data-theme] .km-node {
    position: static; width: auto; height: auto;
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    padding: 11px 13px; border-radius: 12px;
    background: var(--chip); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--border));
  }
  /* 中和桌面端 [data-k] 坐标规则（深浅两套都带 [data-theme="light"] 变体，此处一并压过） */
  [data-theme] .km-node[data-k] { left: auto; top: auto; width: auto; height: auto; }
  [data-theme] .km-node b {
    color: var(--text); white-space: normal; text-shadow: none;
    font-size: 14.5px; line-height: 1.25;
  }
  [data-theme] .km-node small {
    color: var(--text-dim); white-space: normal; text-shadow: none;
    font-size: 12px; line-height: 1.35;
  }
  /* 移动端卡片：加一颗与节点同色的发光小圆点，保留桌面端的色彩识别度 */
  .km-node::before {
    content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%;
    background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 75%, transparent);
    margin-bottom: 3px;
  }
  .hero-script { display: none; }
  .container { padding: 88px 16px 48px; }
  .site-footer { padding: 0 16px 30px; }
  .foot-right { align-items: flex-start; }
  .foot-copy { align-items: flex-start; }
  .foot-nav { order: 3; width: 100%; margin-left: 0; }
}

@media (max-width: 560px) {
  .km-stage { aspect-ratio: 4 / 5; min-height: 480px; max-height: none; }
  /* 窄屏把账号/搜索/收藏/语言/主题收进最右侧的弹出菜单 */
  .nav-actions .nav-more { display: grid; }
  .nav-tools {
    display: none; position: absolute; right: 0; top: calc(100% + 10px);
    flex-direction: column; align-items: stretch; gap: 6px; min-width: 168px;
    padding: 8px; border-radius: 14px; z-index: 80;
    background: var(--panel-solid); border: 1px solid var(--border-strong);
    box-shadow: 0 18px 44px rgba(0,0,0,.38);
  }
  .nav-tools-open .nav-tools { display: flex; }
  .nav-tools > * { width: 100%; }
  .nav-tools .icon-btn, .nav-tools .search-trigger, .nav-tools .auth-control > * {
    color: var(--text); border-color: var(--border-strong); background: var(--chip);
  }
  .nav-tools .auth-control { display: flex; justify-content: flex-start; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .km-stage { aspect-ratio: auto; height: min(72vh, 420px); min-height: 0; max-height: none; }
}

@media (max-width: 620px) {
  .nav-inner { gap: 10px; }
  .brand-copy { display: none; }              /* 超窄屏只留 Logo，给右侧操作区腾位 */
  .ac-login { padding: 7px; }
  .ac-login span { display: none; }           /* 登录/注册收成图标按钮（aria-label 保留） */
  .ac-user .ac-name { display: none; }        /* 已登录状态也只留头像 */
  .hero-title { font-size: 1.75rem; }
  .hero-title .grad { margin-left: 6px; }
  .hero-stats { gap: 22px; }
  .stat b { font-size: 18px; }
  .acards { grid-template-columns: 1fr; }
  .pcards { grid-template-columns: 1fr; }
  [data-theme] .km { grid-template-columns: 1fr; }
  .dash-side { grid-template-columns: 1fr; }
  .panel-head { flex-wrap: wrap; }
  .panel-more { margin-left: auto; }
  .single { padding: 22px 16px; border-radius: var(--radius); }
  .interactions { padding: 14px; }
  .act { padding: 9px 13px; font-size: 12.5px; }
  .panels-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   动效层
   ========================================================= */

/* --- 滚动渐入 --- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* --- Hero 入场 --- */
.hero-copy > * { animation: ascend 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.19s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.26s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.33s; }
.hero-copy > *:nth-child(6) { animation-delay: 0.42s; }
.hero-quote { animation: fadeIn 1s ease 0.45s both; }
.hero-words, .hero-motto { animation: fadeIn 1.2s ease 0.6s both; }
.hero-script { animation: fadeIn 1.4s ease 0.75s both; }
@keyframes ascend {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Hero 可拖拽 --- */
.hero-band { cursor: grab; -webkit-user-select: none; user-select: none; }
.hero-band.is-grabbing { cursor: grabbing; }
.hero-band a, .hero-band button { cursor: pointer; }

/* --- 卡片：3D 倾斜 + 光标高光 --- */
.acard, .pcard, .post-card {
  transition: transform 0.18s ease-out, border-color 0.25s, box-shadow 0.25s;
  transform-style: preserve-3d;
}
.acard { position: relative; }
.acard-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, 0.16), transparent 62%);
  opacity: 0; transition: opacity 0.3s;
}
.acard:hover .acard-media::after { opacity: 1; }
.pcard::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, 0.09), transparent 66%);
  opacity: 0; transition: opacity 0.3s; z-index: 1;
}
.pcard:hover::before { opacity: 1; }
.pcard > * { position: relative; z-index: 2; }

/* --- 页头滚动态 --- */
.site-header.scrolled {
  background: linear-gradient(180deg, rgba(4, 6, 14, 0.97) 0%, rgba(4, 6, 14, 0.88) 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
[data-theme="light"] .site-header.scrolled {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 100%);
  box-shadow: 0 12px 30px rgba(70, 90, 170, 0.14);
}

/* --- 无障碍 / 低性能降级 --- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-copy > *, .hero-quote, .hero-words, .hero-motto, .hero-script,
  .km-node, .km-fx-glow, .km-fx-stars, .km-aurora i, .km-orbit, .km-pulse, .km-sheen-sweep, .km-meteor {
    animation: none !important;
  }
  .km-core::after { animation: none !important; }
  .hero-bg, .hero-aurora, .hero-aurora .au, .hero-grain::after { animation: none !important; }
  .hero-aurora { transform: none !important; }
  .km-node { transition: none; }
  .acard, .pcard, .post-card { transition: none; }
}

/* hidden 属性优先于任何 display 声明（修复 登录/未登录 状态条同时显示的问题） */
[hidden] { display: none !important; }
