/* ==========================================================================
   首屏 + 顶栏 + 弹窗（内容页样式在 light-form.css，作用域 .lpv1）
   ========================================================================== */

/* Noto Serif SC Black 自托管子集：仅覆盖首屏大标题用字 */
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("assets/fonts/nss900_0.woff2") format("woff2");
  unicode-range: U+d7;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("assets/fonts/nss900_1.woff2") format("woff2");
  unicode-range: U+5a01;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("assets/fonts/nss900_2.woff2") format("woff2");
  unicode-range: U+5212,U+5a92;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("assets/fonts/nss900_3.woff2") format("woff2");
  unicode-range: U+4f01,U+738b,U+8425,U+9879;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("assets/fonts/nss900_4.woff2") format("woff2");
  unicode-range: U+76ee,U+8fd0,U+98ce;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("assets/fonts/nss900_5.woff2") format("woff2");
  unicode-range: U+4f53;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("assets/fonts/nss900_6.woff2") format("woff2");
  unicode-range: U+65b0;
}

/* ============ 基础 ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: #08060c; color: #eceef3;
  font-family: var(--sans, "Outfit", "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:root {
  color-scheme: dark;
  --acc: linear-gradient(135deg, #3b82f6, #60a5fa);
  --a1: #5b9dff;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "Outfit", "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", Georgia, serif;
  --bar-h: 60px;
}
[hidden] { display: none !important; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  padding: 10px 16px; background: #0f172a; color: #fff; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ============ 一 / 二级页面 ============ */
/* 一级页面（封面）：锁定滚动，只允许点击 */
html.cover-mode { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.cover-mode body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.cover-mode .inner-page { display: none; }
html:not(.cover-mode) #home { display: none; }
html.cover-mode .topbar,
html.cover-mode .skip {
  visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(-6px);
}
html.cover-mode .hero-panel { height: 100svh; }

/* ---------- 全站噪点：压掉大面积渐变的塑料感 ---------- */
.grain {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  opacity: .05;
  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='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* 切换遮罩：与首图/内页同一深蓝，避免黑白闪一下 */
.page-veil {
  position: fixed; inset: 0; z-index: 75; background: #0a1022;
  opacity: 0; pointer-events: none;
  transition: opacity .2s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity;
}
.page-veil.is-on { opacity: 1; pointer-events: auto; transition-duration: .18s; }

.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 24px; }

/* ============ 顶栏：自上而下的渐变玻璃，无边框 ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--bar-h);
  display: flex; align-items: center;
  border: 0;
  background: transparent;
  color: #e8eefb;
  transition: opacity .3s var(--ease), visibility .3s, transform .3s var(--ease);
}
/* 玻璃层：顶部实、往下渐隐，模糊也跟着淡出，不留硬边 */
.topbar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(9, 7, 14, .93) 0%,
    rgba(9, 7, 14, .84) 46%,
    rgba(9, 7, 14, .58) 74%,
    rgba(9, 7, 14, .22) 90%,
    rgba(9, 7, 14, 0) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, .52) 84%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, .52) 84%, rgba(0, 0, 0, 0) 100%);
}
.bar-inner {
  position: relative; z-index: 1;
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 0 clamp(18px, 3.2vw, 54px);
}
.brand {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14.5px; font-weight: 500; letter-spacing: .06em; white-space: nowrap;
  color: #e8eefb;
}
.brand-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .12), 0 0 12px rgba(59, 130, 246, .75);
}
.brand:hover .brand-dot { box-shadow: 0 0 0 5px rgba(59, 130, 246, .18), 0 0 16px rgba(59, 130, 246, .95); }
.mainnav { justify-self: center; display: flex; align-items: center; gap: 2px; }
.mainnav a {
  position: relative;
  padding: 8px 14px; font-size: 13px; letter-spacing: .02em;
  color: rgba(230, 238, 255, .58);
  transition: color .22s var(--ease);
}
.mainnav a:hover { color: rgba(238, 244, 255, .9); }
/* 选中态：只换字体颜色，不加底、不加边框、不加下划线 */
.mainnav a.is-on { color: var(--a1); font-weight: 600; }
.bar-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
/* 阅读进度：细线 + 百分比 */
.bar-prog { display: flex; align-items: center; gap: 9px; }
.bar-prog-track {
  display: block; width: 62px; height: 2px; border-radius: 2px;
  background: rgba(255, 255, 255, .13); overflow: hidden;
}
.bar-prog-fill {
  display: block; width: 0; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 8px rgba(59, 130, 246, .8);
  transition: width .08s linear;
}
.bar-prog-num {
  font-size: 10.5px; letter-spacing: .08em; color: #7f8798;
  font-variant-numeric: tabular-nums; min-width: 30px; text-align: right;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--acc); color: #fff; box-shadow: 0 8px 22px rgba(37, 99, 235, .3); }
.btn.sm { padding: 8px 16px; font-size: 13px; }

/* ============ 首屏 · 黑蓝背景（3D 翻转封面） ============ */
.panel { position: relative; display: block; scroll-margin-top: 66px; }

.hero-panel {
  position: relative; height: 100vh; height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(44px, 7vh, 92px) clamp(14px, 3vw, 32px) clamp(18px, 3.2vh, 50px);
  overflow: hidden;
  background: #070a13;
}
/* 第一屏背景：与二级页首图同一套蓝紫光带（左下浅紫 → 中部电蓝 → 右侧深藏蓝） */
.hero-panel .cover-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(96% 94% at -10% 106%, #f2f5ff 0%, #cdd6f8 12%, #93a6ec 27%, #5069d6 45%, rgba(38, 53, 140, .72) 63%, rgba(12, 17, 38, 0) 84%),
    radial-gradient(76% 100% at 6% 42%, rgba(92, 126, 248, 1) 0%, rgba(54, 78, 200, .62) 44%, rgba(22, 30, 70, .16) 74%, rgba(10, 14, 30, 0) 90%),
    radial-gradient(64% 66% at 96% 4%, rgba(60, 92, 214, .22), transparent 78%),
    linear-gradient(118deg, #070c19 0%, #0c1530 26%, #0a1022 54%, #070a13 100%);
}
.hero-panel .cover-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(80% 86% at 50% 44%, rgba(6, 9, 16, .04) 0%, rgba(6, 9, 16, .22) 62%, rgba(6, 9, 16, .62) 100%),
    linear-gradient(180deg, rgba(5, 8, 14, .34) 0%, rgba(5, 8, 14, .02) 30%, rgba(5, 8, 14, .08) 72%, rgba(6, 9, 16, .60) 100%);
}
/* 极细斜纹：与二级页首图同一层质感 */
.hero-panel .cover-bg::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(107deg, rgba(255, 255, 255, .026) 0 1px, transparent 1px 40px);
  mask-image: radial-gradient(60% 66% at 16% 74%, rgba(0, 0, 0, .75), transparent 78%);
}
.cover-glow {
  position: absolute; left: 0; top: 0; width: 460px; height: 460px; border-radius: 50%; z-index: 1;
  pointer-events: none; background: radial-gradient(circle, rgba(59, 130, 246, .16), transparent 64%);
  opacity: 0; transition: opacity .35s; will-change: transform;
}
.hero-panel:hover .cover-glow { opacity: 1; }

.cover-stage { position: relative; z-index: 2; width: 100%; }
.cover-scene {
  width: min(880px, 94vw); margin: 0 auto; perspective: 1200px;
  display: flex; flex-direction: column; justify-content: center;
}

.flip { position: relative; perspective: 1000px; transform-style: preserve-3d; cursor: pointer; outline: none; }
.flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.25, .75, .3, 1.02); }
.flip:hover .flip-inner, .flip:focus-visible .flip-inner { transform: rotateY(180deg); }
.flip:focus-visible { box-shadow: 0 0 0 3px var(--a1); border-radius: 20px; }
.face {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 22px; text-align: center; border-radius: 20px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: rgba(14, 19, 30, .58); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 26px 54px -22px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.face::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, -30%), rgba(96, 165, 250, .16), transparent 62%);
}
.face.back { transform: rotateY(180deg); border-color: rgba(56, 189, 248, .38); background: rgba(11, 22, 38, .72); }

.namecard {
  width: 100%; position: relative; cursor: pointer; outline: none;
  perspective: 1100px;
  transition: transform .16s ease-out;
}
.namecard:focus-visible { box-shadow: 0 0 0 3px var(--a1); border-radius: 20px; }
.nc-flip {
  position: relative; display: grid; grid-template-areas: "face";
  transform-style: preserve-3d;
  transition: transform .62s cubic-bezier(.3, .7, .25, 1);
  will-change: transform;
}
.namecard.is-flipped .nc-flip { transform: rotateY(180deg); }
/* 正反两面叠在同一格里：卡片高度由内容决定，任何屏幕都不会把头像裁掉 */
.namecard .face {
  position: relative; inset: auto; grid-area: face;
  padding: clamp(20px, 3.2vh, 34px) 22px;
}
.namecard .face.back { border-color: rgba(96, 165, 250, .45); background: rgba(11, 22, 38, .78); }
.nc-motto { font-size: 21px; letter-spacing: 2px; color: #fff; font-weight: 600; line-height: 1.55; }
.nc-motto em {
  font-style: normal; font-weight: 700;
  background: var(--acc); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nc-go {
  margin-top: 14px; padding: 9px 20px; border-radius: 999px;
  font-size: 12px; letter-spacing: 2.4px; color: #dbe8ff; font-weight: 600;
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, rgba(91, 157, 255, .22), rgba(91, 157, 255, .08));
  border: 1px solid rgba(129, 176, 255, .5);
}
/* 半身像：正圆，头部完整、露到肩颈 */
.avatar {
  position: relative;
  height: clamp(146px, 17.4vh, 212px); width: auto; aspect-ratio: 1 / 1;
  border-radius: 50%; overflow: hidden; display: block;
  margin-bottom: 6px;
  background: linear-gradient(160deg, #cfd8f7, #7f93e4);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .22),
    0 24px 46px -20px rgba(3, 8, 26, .95),
    0 0 56px -18px rgba(96, 165, 250, .55);
}
.avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  object-position: 50% 16%;
  transform: scale(1.02);
  transition: transform .5s var(--ease);
}
.namecard:hover .avatar img { transform: scale(1.06); }
/* 底部一层极轻的柔光，让人像与卡片接住 */
.avatar::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 20%;
  background: linear-gradient(180deg, rgba(10, 16, 40, 0), rgba(10, 16, 40, .22));
  pointer-events: none;
}
.nc-name { font-size: 32px; letter-spacing: 6px; color: #fff; font-weight: 600; }
.nc-role { color: #8dbaff; font-size: 14px; letter-spacing: 2px; font-weight: 500; }
/* 进入入口：边框发光呼吸，一眼看出可以点 */
.nc-enter {
  margin-top: 12px; padding: 9px 20px; border-radius: 999px;
  font-size: 12px; letter-spacing: 2.4px; color: #dbe8ff; font-weight: 600;
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, rgba(91, 157, 255, .16), rgba(91, 157, 255, .05));
  border: 1px solid rgba(129, 176, 255, .5);
  animation: nc-glow 2.6s ease-in-out infinite;
  transition: border-color .3s, color .3s;
}
.namecard:hover .nc-enter { color: #fff; border-color: rgba(190, 216, 255, 1); }
@keyframes nc-glow {
  0%, 100% {
    border-color: rgba(129, 176, 255, .42);
    box-shadow: 0 0 0 rgba(91, 157, 255, 0), 0 12px 28px -18px rgba(91, 157, 255, .8);
  }
  50% {
    border-color: rgba(186, 213, 255, .95);
    box-shadow: 0 0 18px rgba(91, 157, 255, .55), inset 0 0 12px rgba(120, 170, 255, .16);
  }
}

.cover-sec {
  text-align: center; margin: clamp(12px, 2vh, 26px) 0 clamp(8px, 1.2vh, 14px);
  font-size: 11px; letter-spacing: 5px;
  color: rgba(226, 232, 240, .5); text-transform: uppercase;
}
.cover-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.4vh, 15px); }
.ccard { height: clamp(104px, 17vh, 196px); }
.cc-sym {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px;
  color: #8dbaff; background: rgba(96, 165, 250, .13); border: 1px solid rgba(96, 165, 250, .3);
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .6);
}
.cc-sym svg { width: 26px; height: 26px; }
.ccard h3 { font-size: 16.5px; letter-spacing: 1.5px; color: #fff; font-weight: 600; }
.cc-text { font-size: 12.5px; line-height: 1.65; color: #d9def0; }
.cc-tags { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.cc-tag { font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: #cdd6f0; }
/* 顶边荧光线：亮色渐变 + 外发光 */
.ccard .face::after {
  content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 2px;
  border-radius: 2px; pointer-events: none;
}
/* 顶边荧光线：主 VI 蓝色系三档（主蓝 / 冰蓝 / 深蓝），统一色相不跳 */
.c1 .face::after {
  background: linear-gradient(90deg, transparent, #5b9dff 28%, #c2dcff 50%, #5b9dff 72%, transparent);
  box-shadow: 0 0 10px rgba(91, 157, 255, .8), 0 0 22px rgba(91, 157, 255, .45);
}
.c2 .face::after {
  background: linear-gradient(90deg, transparent, #86c5ff 28%, #dcf0ff 50%, #86c5ff 72%, transparent);
  box-shadow: 0 0 10px rgba(134, 197, 255, .8), 0 0 22px rgba(134, 197, 255, .45);
}
.c3 .face::after {
  background: linear-gradient(90deg, transparent, #4a7ce6 28%, #a8c4f5 50%, #4a7ce6 72%, transparent);
  box-shadow: 0 0 10px rgba(74, 124, 230, .8), 0 0 22px rgba(74, 124, 230, .45);
}

.cover-foot { margin-top: clamp(10px, 1.9vh, 26px); }
.cover-kws { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cover-kws .kw {
  font-size: 12.5px; font-weight: 500; letter-spacing: .06em; padding: 6px 14px; border-radius: 999px;
  color: #d7e3fb; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
}
.cover-actions {
  display: flex; justify-content: center; gap: 12px; margin-top: clamp(10px, 1.7vh, 24px); flex-wrap: wrap;
}
.cv-btn {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 14px; font-size: 13.5px;
  color: #cfd6ee; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03);
  cursor: pointer; font-family: inherit; text-decoration: none;
  transition: transform .28s, box-shadow .28s, border-color .28s, color .28s;
}
.cv-btn:hover { color: #fff; border-color: rgba(96, 165, 250, .6); transform: translateY(-4px); box-shadow: 0 14px 30px -12px rgba(96, 165, 250, .5); }
.cv-btn b { font-size: 15px; color: #8dbaff; font-weight: 400; }
.cv-btn.primary { background: var(--acc); color: #fff; border-color: transparent; }
.cover-note { margin-top: 16px; text-align: center; font-size: 11px; color: rgba(226, 232, 240, .45); letter-spacing: .5px; }

/* ============ 弹窗 ============ */
.modal {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
}
.modal-mask { position: absolute; inset: 0; background: rgba(8, 11, 18, .72); }
.modal-box {
  position: relative; z-index: 1; width: min(560px, 100%); max-height: 86vh; overflow: auto;
  background: #fff; border-radius: 18px; padding: 26px;
  box-shadow: 0 40px 80px -30px rgba(15, 23, 42, .4);
  color: #0f172a;
}
.modal-box h3 { font-size: 20px; padding-right: 40px; margin-bottom: 14px; }
.modal-box video { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: #000; margin-bottom: 14px; display: block; }
.modal-box:has(.mv-wrap) { width: min(720px, 100%); }
.modal-box:has(.mv-wrap.is-portrait) { width: min(404px, 100%); }
.modal-box img { border-radius: 12px; }

/* 素材大图：只给图，不带任何说明 */
.modal-box:has(.shot-full) { width: min(1080px, 100%); padding: 14px; background: #0b1120; }
.modal-box:has(.shot-full) h3 { display: none; }
.modal-box .shot-full img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  background: #0b1120;
}

/* 视频播放器：竖屏按 9:16 定框，未加载出画面时显示封面而不是黑块 */
.mv-wrap { position: relative; margin-bottom: 14px; }
.mv-wrap video { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: #000; display: block; }
.mv-wrap.is-portrait { width: min(320px, 100%, calc(62vh * 9 / 16)); margin: 0 auto 14px; }
.mv-wrap.is-portrait video { aspect-ratio: 9 / 16; max-height: none; height: auto; }
.mv-fallback { text-align: center; padding: 4px 0 2px; }
.mv-fallback img { width: 100%; border-radius: 12px; display: block; margin: 0 auto 12px; }
.mv-fallback p { font-size: 13px; color: #64748b; line-height: 1.7; }
.mv-open {
  display: inline-block; margin-top: 10px; padding: 7px 16px; border-radius: 9px;
  font-size: 13px; color: #2563eb; text-decoration: none;
  background: rgba(59, 130, 246, .1); box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .3);
}
.mv-open:hover { background: rgba(59, 130, 246, .18); }
.modal-x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, .12); background: #fff; cursor: pointer; font-size: 14px;
}
.modal-x:hover { border-color: var(--a1); color: var(--a1); }
.fine { font-size: 13px; line-height: 1.7; color: #64748b; margin-top: 10px; }
.modal-body-kv { margin-top: 12px; }
.modal-body-kv p { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.75; padding: 6px 0; border-bottom: 1px dashed rgba(15, 23, 42, .1); }
.modal-body-kv p .k { flex: none; width: 96px; color: #64748b; }
.modal-body-kv p .v { color: #0f172a; }

/* ============ 响应式 ============ */
@media (max-width: 1020px) {
  .mainnav { gap: 0; }
  .mainnav a { padding: 7px 9px; font-size: 12.5px; }
  .bar-prog-track { width: 48px; }
}
@media (max-width: 720px) {
  :root { --bar-h: 56px; }
  .wrap { padding: 0 16px; }
  .bar-inner {
    display: flex; gap: 10px;
    padding: 0 14px;
  }
  .brand { font-size: 13px; gap: 7px; }
  .brand-dot { width: 6px; height: 6px; box-shadow: 0 0 0 3px rgba(59, 130, 246, .14), 0 0 9px rgba(59, 130, 246, .7); }
  .brand-en { display: none; }
  .bar-actions { gap: 0; flex: none; }
  .bar-prog-track { width: 34px; }
  .bar-prog-num { display: none; }
  .mainnav {
    flex: 1 1 auto; justify-content: center; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { flex: none; padding: 6px 7px; font-size: 11.5px; }

  /* 封面：一屏内排完，不裁切、不压缩 */
  .hero-panel { padding: 34px 14px 16px; }
  .cover-scene { width: 100%; }
  .namecard .face { padding: 18px 14px; gap: 7px; border-radius: 18px; }
  .avatar { height: 118px; margin-bottom: 3px; }
  .nc-name { font-size: 26px; letter-spacing: 4px; }
  .nc-role { font-size: 12.5px; letter-spacing: 1.4px; }
  .nc-enter { font-size: 11px; letter-spacing: 2px; padding: 8px 16px; margin-top: 9px; }
  .nc-motto { font-size: 17px; letter-spacing: 1px; }
  .cover-sec { margin: 14px 0 8px; letter-spacing: 3px; font-size: 9.5px; }

  /* 三张项目卡改成一行三个小方块（触屏不翻面，点一下即进入） */
  .cover-projects { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ccard { height: clamp(88px, 13vh, 116px); }
  .ccard .flip-inner { transform: none !important; }
  .ccard .face { padding: 9px 6px; gap: 6px; border-radius: 14px; }
  .cc-sym { display: none; }
  .ccard h3 { font-size: 12px; letter-spacing: .02em; line-height: 1.3; }
  .cc-tags { gap: 4px; }
  .cc-tag { font-size: 10px; padding: 3px 6px; white-space: nowrap; }

  .cover-foot { margin-top: 14px; }
  .cover-kws {
    display: grid; grid-template-columns: repeat(3, auto); justify-content: center;
    gap: 6px 7px; align-items: center;
  }
  .cover-kws .kw { font-size: 10.5px; padding: 4px 9px; letter-spacing: .02em; }
  .cover-actions { gap: 8px; margin-top: 14px; }
  .cv-btn { padding: 8px 12px; font-size: 12px; border-radius: 11px; }
  .cover-note { display: none; }
}

/* 小屏手机：只留蓝点 + 导航，避免导航被截断 */
@media (max-width: 379px) {
  .brand { font-size: 0; gap: 0; }
  .mainnav a { padding: 6px 7px; font-size: 11px; }
}

/* 屏幕偏矮的笔记本 / 横屏手机：逐级压缩，始终留在一屏内 */
@media (max-height: 780px) and (min-width: 721px) {
  .cover-note { display: none; }
  .namecard .face { padding: 16px 22px; }
  .ccard { height: clamp(96px, 15vh, 150px); }
  .cover-sec { margin: 10px 0 8px; }
  .cover-foot { margin-top: 10px; }
  .cover-actions { margin-top: 10px; }
}
@media (max-height: 620px) {
  .cover-foot .cover-sec, .cover-kws, .cover-note { display: none; }
  .hero-panel { padding: 40px 14px 12px; }
  .namecard .face { padding: 10px; gap: 4px; }
  .avatar { height: 82px; }
  .nc-name { font-size: 22px; letter-spacing: 3px; }
  .nc-enter { display: none; }
  .ccard { height: 84px; }
  .ccard .cc-sym { width: 26px; height: 26px; }
  .ccard h3 { font-size: 12.5px; }
  .cover-sec { margin: 8px 0 6px; }
  .cover-actions { margin-top: 8px; }
}
/* 极矮视口（横屏小手机）：只保留名字卡与入口，绝不裁切头像 */
@media (max-height: 380px) {
  .cover-scene > .cover-sec, .cover-projects { display: none; }
  .hero-panel { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .flip-inner, .nc-flip { transition: none; }
}

/* ==========================================================================
   第一页 Banner（深色定位大标题） + 第二页 关于我（深色）
   ========================================================================== */

/* ---------- Banner（右侧大字标题 + 底部关键词跑马线） ---------- */
.banner-sec {
  position: relative;
  min-height: clamp(470px, 63svh, 700px);
  display: flex; align-items: flex-end;
  padding: clamp(84px, 9.2vh, 108px) 6vw clamp(30px, 3.6vh, 42px);
  overflow: hidden; background: #070a13; color: #eef4ff;
  scroll-margin-top: 66px;
}
/* 首图：深蓝 → 电蓝 → 浅紫的斜向光带（参考 Hubfolio 首屏） */
.bn-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    url("assets/video/ocean-poster.webp") center / cover no-repeat,
    radial-gradient(88% 112% at -12% 116%, #eaedfe 0%, #c3ccf4 11%, #8b9ee8 26%, #4b61d2 44%, rgba(38, 53, 140, .70) 62%, rgba(12, 17, 38, 0) 82%),
    radial-gradient(64% 106% at 4% 46%, rgba(88, 122, 244, .95) 0%, rgba(52, 76, 196, .60) 42%, rgba(22, 30, 70, .16) 72%, rgba(10, 14, 30, 0) 88%),
    linear-gradient(118deg, #070c19 0%, #0c1530 26%, #0a1022 54%, #070a13 100%);
}
.bn-bg::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(107deg, rgba(255, 255, 255, .032) 0 1px, transparent 1px 40px);
  mask-image: radial-gradient(64% 84% at 18% 72%, rgba(0, 0, 0, .8), transparent 76%);
}
.bn-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
  opacity: 0; transition: opacity 1.1s ease;
}
.bn-video.is-on { opacity: 1; }
/* 减弱动态效果时视频不自动播放，但保留静态海浪封面图（JS 控制） */
/* 右侧压暗，保证文字对比；底部收进「关于我」的起始色，两块自然接上 */
.bn-veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(58% 92% at 88% 40%, rgba(6, 9, 18, .66) 0%, rgba(6, 9, 18, .22) 58%, rgba(6, 9, 18, 0) 80%),
    linear-gradient(180deg, rgba(6, 9, 18, .74) 0%, rgba(6, 9, 18, .12) 18%, rgba(6, 9, 18, 0) 46%, rgba(11, 17, 50, .06) 62%, rgba(18, 27, 78, .34) 80%, rgba(22, 32, 92, .88) 90%, #16205c 93%, #16205c 100%);
}

/* 单列、贴右：大标题与文案整体靠右，左侧留出光带 */
.bn-inner {
  position: relative; z-index: 2; width: 100%;
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  align-items: end;
  text-align: right;
}
.bn-inner > .bn-title   { grid-row: 1; align-self: end; }
.bn-inner > .bn-sub     { grid-row: 2; }
.bn-inner > .bn-name    { grid-row: 3; }
.bn-inner > .bn-marquee { grid-row: 4; }

.bn-title {
  position: relative; margin: 0 0 clamp(56px, 6vh, 78px);
  font-family: var(--serif, "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif);
  font-size: clamp(46px, 6.5vw, 126px);
  font-weight: 900; line-height: 1.14; letter-spacing: -.005em;
  color: #fff;
  /* 内嵌式：上缘暗影下陷 + 下缘微光，少许即可 */
  text-shadow:
    0 -1px 1px rgba(8, 14, 40, .42),
    0 1px 1px rgba(255, 255, 255, .20);
}
.bn-title .bt-line { position: relative; display: block; }
.bn-title .bt-l1, .bn-title .bt-l2 { display: block; }
/* 第一行：冷白渐变 */
.bn-title .bt-a, .bn-title .bt-b { display: inline-block; }
.bn-title .bt-a {
  letter-spacing: .015em;
  background: linear-gradient(102deg, #ffffff 8%, #e2ebff 56%, #b7ccf4 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: none;
}
.bn-title i {
  display: inline-block; font-style: normal; font-weight: 300;
  font-size: .58em; color: #d6e4ff;
  vertical-align: .3em; margin: 0 .12em 0 0;
}
/* 第二行：电蓝渐变，和第一行冷白明确区分 */
.bn-title .bt-b {
  letter-spacing: .015em;
  background: linear-gradient(98deg, #dcebff 6%, #9dc6ff 42%, #5b8fe0 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: none;
}
/* 英文花字：斜压在标题右下角，与标题叠一部分 */
.bn-title em {
  position: absolute; right: -.02em; bottom: -.30em; z-index: 3;
  display: block;
  font-family: "Great Vibes", "Segoe Script", "Snell Roundhand", cursive;
  font-style: normal; font-weight: 400;
  font-size: .46em; line-height: 1; letter-spacing: .005em;
  color: #a7c6ff;
  text-shadow: 0 10px 32px rgba(5, 10, 34, .92), 0 0 34px rgba(120, 166, 255, .3);
  transform: rotate(-2.8deg); transform-origin: 100% 100%;
  white-space: nowrap; pointer-events: none;
}
.bn-sub {
  margin: 0 0 0 auto; max-width: 30em;
  font-size: clamp(15px, 1.16vw, 18px); font-weight: 400;
  line-height: 1.85; letter-spacing: .05em; color: #c9d8ef;
}
.bn-name {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  margin: 14px 0 0; font-size: 11px; letter-spacing: .26em; color: #93a6c4;
}
.bn-name::after {
  content: ""; width: 18px; height: 1px; background: rgba(147, 166, 196, .55);
}

/* 关键词：一条细线 + 慢速循环滚动 */
.bn-marquee {
  position: relative;
  margin-top: clamp(22px, 2.8vh, 34px);
  padding: clamp(11px, 1.4vh, 16px) 0 clamp(9px, 1.2vh, 13px);
  border-top: 1px solid rgba(198, 216, 255, .17);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3.5%, #000 96.5%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 3.5%, #000 96.5%, transparent 100%);
}
.bn-track {
  display: flex; width: max-content;
  animation: bn-scroll 72s linear infinite;
  will-change: transform;
}
.bn-marquee:hover .bn-track { animation-play-state: paused; }
.bn-group { display: flex; flex: 0 0 auto; align-items: center; }
.bn-group > span {
  display: inline-flex; align-items: center;
  font-size: 12.5px; letter-spacing: .18em; color: #cfdcf0;
  white-space: nowrap;
}
.bn-group > span::after {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  margin: 0 clamp(20px, 2.6vw, 42px);
  background: rgba(152, 182, 236, .6);
}
@keyframes bn-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ---------- 入场动效（进入二级页面时触发，回封面再进会重放） ---------- */
@keyframes bn-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes bn-write {
  0%   { opacity: 0; clip-path: inset(-40% 100% -40% -10%); }
  12%  { opacity: 1; }
  100% { opacity: 1; clip-path: inset(-40% -16% -40% -10%); }
}
@keyframes bn-float {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50%      { transform: rotate(-2.8deg) translateY(-5px); }
}

html.is-entered .bn-title   { animation: bn-rise .92s cubic-bezier(.2, .72, .3, 1) .04s both; }
html.is-entered .bn-sub     { animation: bn-rise .8s cubic-bezier(.2, .72, .3, 1) .24s both; }
html.is-entered .bn-name    { animation: bn-rise .8s cubic-bezier(.2, .72, .3, 1) .32s both; }
html.is-entered .bn-marquee { animation: bn-rise .9s cubic-bezier(.2, .72, .3, 1) .42s both; }
/* 手写花字：先描出再轻轻浮动 */
html.is-entered .bn-title em {
  animation: bn-write 1.2s cubic-bezier(.22, .7, .3, 1) .6s both,
             bn-float 7.5s ease-in-out 2.1s infinite;
}

@media (prefers-reduced-motion: reduce) {
  html.is-entered .bn-title,
  html.is-entered .bn-sub,
  html.is-entered .bn-name,
  html.is-entered .bn-marquee,
  html.is-entered .bn-title em { animation: none !important; }
  .bn-title em { clip-path: none; }
  .bn-track { animation: none !important; }
}

/* ---------- 首屏左侧蓝色海浪动画：填充左侧留白，与右侧标题呼应 ---------- */
.bn-waves {
  position: absolute; left: 0; bottom: 0; z-index: 1;
  width: min(60%, 860px); height: 100%;
  overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(100deg, #000 44%, transparent 94%);
  mask-image: linear-gradient(100deg, #000 44%, transparent 94%);
}
.bn-waves .wv {
  position: absolute; left: 0; bottom: 0;
  width: 200%; display: block;
  will-change: transform;
}
.bn-waves .wv-1 { height: 84%; fill: rgba(126, 172, 255, .13); animation: bn-wave 30s linear infinite; }
.bn-waves .wv-2 { height: 66%; fill: rgba(96, 150, 246, .18); animation: bn-wave 21s linear infinite reverse; }
.bn-waves .wv-3 { height: 47%; fill: rgba(66, 118, 218, .22); animation: bn-wave 14s linear infinite; }
@keyframes bn-wave {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .bn-waves .wv { animation: none; }
}

/* ---------- Banner 响应式 ---------- */
@media (max-width: 1100px) {
  .banner-sec { min-height: clamp(462px, 62svh, 640px); padding: 82px 5vw 32px; }
  .bn-title { font-size: clamp(40px, 7.2vw, 78px); margin-bottom: 34px; }
  .bn-title em { font-size: .42em; }
}
@media (max-width: 900px), (max-height: 800px) {
  .bn-waves { width: 100%; opacity: .85; }
}
@media (max-width: 620px) {
  .banner-sec { min-height: clamp(432px, 64svh, 566px); padding: 74px 20px 26px; }
  .bn-title {
    font-size: clamp(33px, 9.9vw, 54px); line-height: 1.2;
    margin: 0 0 30px;
  }
  .bn-title i { display: none; }
  .bn-title .bt-b { display: block; }
  .bn-title em {
    position: static; display: block;
    margin: 12px 0 0; font-size: .54em;
    transform: rotate(-3deg); transform-origin: 100% 100%;
  }
  .bn-sub { font-size: 14px; line-height: 1.8; letter-spacing: .04em; }
  .bn-name { margin-top: 12px; letter-spacing: .2em; }
  .bn-group > span { font-size: 11.5px; letter-spacing: .14em; }
  .bn-group > span::after { margin: 0 17px; width: 3px; height: 3px; }
  .bn-marquee { margin-top: 20px; }
}

/* ============ 沉淀资产 · 知识地图 ============ */
.rf .km-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 24px; }
/* 通栏知识卡：跨项目 SOP，四个板块横排 */
.rf .km-card.is-wide { grid-column: 1 / -1; }
.rf .km-card.is-wide .kmini-root { display: none; }
.rf .km-card.is-wide .kmini-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 26px; margin-left: 0; }
.rf .km-card.is-wide .kmini-list::before { content: none; }
@media (max-width: 720px) {
  .rf .km-card.is-wide .kmini-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rf .km-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  padding: 30px 30px 28px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.008));
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.rf .km-card::after {
  content: ""; position: absolute; right: -90px; top: -110px; width: 260px; height: 260px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(111, 155, 255, 0.12), transparent 68%);
}
.rf .km-card:hover { transform: translateY(-5px); border-color: rgba(111, 155, 255, 0.34); box-shadow: 0 30px 60px -46px rgba(80, 120, 255, 0.9); }
.rf .km-card-top { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.rf .km-badge {
  font-size: 0.8rem; letter-spacing: 0.08em; color: var(--gold);
  border: 1px solid rgba(143, 186, 255, 0.34); border-radius: 999px; padding: 3px 10px;
}
.rf .km-badge.is-alt { color: var(--blue); border-color: rgba(111, 155, 255, 0.36); }
.rf .km-meta { margin-left: auto; font-size: 0.82rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.rf .km-title { position: relative; font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif; font-size: 1.34rem; font-weight: 700; line-height: 1.45; margin-bottom: 20px; }

/* 卡片内的树状缩览：根点 → 竖干 → 各模块横枝 */
.rf .kmini { position: relative; display: flex; align-items: center; margin-bottom: 20px; }
.rf .kmini-root {
  position: relative; flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: rgba(111, 155, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(111, 155, 255, 0.11);
  transition: box-shadow 0.3s var(--ease);
}
.rf .kmini-root::after {
  content: ""; position: absolute; left: 9px; top: 50%; width: 31px; height: 1px;
  background: linear-gradient(90deg, rgba(111, 155, 255, 0.55), rgba(255, 255, 255, 0.14));
}
.rf .kmini-list { position: relative; flex: 1; min-width: 0; list-style: none; margin: 0 0 0 31px; padding: 0; }
.rf .kmini-list::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.19) 14%, rgba(255, 255, 255, 0.19) 86%, rgba(255, 255, 255, 0.05));
}
.rf .kmini-list li {
  position: relative; display: flex; align-items: center; height: 26px; padding-left: 15px;
  font-size: 0.82rem; color: #b6bcc9; white-space: nowrap;
}
.rf .kmini-list li::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 15px; height: 1px;
  background:
    radial-gradient(circle at 2px 50%, rgba(123, 165, 255, 0.85) 1.6px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.2));
}
.rf .kmini-list li span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rf .kmini-list li .lead {
  flex: 1 1 12px; min-width: 12px; height: 1px; margin: 0 10px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.11) 1px, transparent 1px);
  background-size: 5px 1px; background-repeat: repeat-x;
}
.rf .kmini-list li em {
  flex: none; font-style: normal; font-size: 0.78rem; color: #5f6675;
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}
.rf .kmini-list li.is-ellip { color: #5f6675; font-size: 0.86rem; letter-spacing: 0.06em; }
.rf .kmini-list li.is-ellip::before { background: rgba(255, 255, 255, 0.08); }
.rf .kmini-list li.is-ellip .lead { display: none; }
.rf .km-card:hover .kmini-root { box-shadow: 0 0 0 5px rgba(111, 155, 255, 0.2); }
.rf .km-card:hover .kmini-list li::before {
  background-image:
    radial-gradient(circle at 2px 50%, rgba(123, 165, 255, 0.95) 1.6px, transparent 2px),
    linear-gradient(90deg, rgba(111, 155, 255, 0.08), rgba(111, 155, 255, 0.38));
}
.rf .km-open {
  position: relative; margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; border-bottom: 1px solid rgba(111, 155, 255, 0.45);
  color: #cfe0ff; font: inherit; font-size: 0.88rem; padding: 6px 0; cursor: pointer;
  transition: gap 0.25s var(--ease), color 0.25s var(--ease);
}
.rf .km-open:hover { color: #fff; gap: 13px; }
.rf .km-open svg { width: 16px; height: 16px; }

@media (max-width: 860px) {
  .rf .km-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* 抽屉 */
html.km-lock, html.km-lock body { overflow: hidden; }
.km-overlay { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 26px; }
.km-overlay[hidden] { display: none; }
.km-mask { position: absolute; inset: 0; background: rgba(5, 4, 9, 0.76); opacity: 0; transition: opacity 0.22s ease; }
.km-overlay.is-on .km-mask { opacity: 1; }
.km-panel {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  width: min(1180px, 100%); height: min(88vh, 880px); overflow: hidden;
  background: #0b0910; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px;
  box-shadow: 0 60px 130px -50px rgba(0, 0, 0, 0.95);
  opacity: 0; transform: translateY(16px) scale(0.99);
  transition: opacity 0.22s ease, transform 0.3s var(--ease);
  color: #eceef3;
}
.km-overlay.is-on .km-panel { opacity: 1; transform: none; }
.km-head { display: flex; align-items: flex-start; gap: 18px; padding: 22px 26px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.km-kicker { font-size: 0.78rem; letter-spacing: 0.16em; color: #8fbaff; margin-bottom: 6px; }
.km-h { font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif; font-size: 1.32rem; font-weight: 700; line-height: 1.4; }
.km-stat { margin-left: auto; align-self: center; font-size: 0.84rem; color: #8b93a4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.km-close { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.14); background: none; color: #cfcdd9; font-size: 20px; line-height: 1; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.km-close:hover { border-color: rgba(111, 155, 255, 0.55); color: #fff; }
.km-tools { display: flex; align-items: center; gap: 10px; padding: 12px 26px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.km-search { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 460px; }
.km-search span { font-size: 0.82rem; color: #6b7386; letter-spacing: 0.1em; }
.km-search input {
  flex: 1; min-width: 0; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px; padding: 8px 12px; color: #eceef3; font: inherit; font-size: 0.84rem; outline: none;
  transition: border-color 0.2s;
}
.km-search input::placeholder { color: #5d6474; }
.km-search input:focus { border-color: rgba(111, 155, 255, 0.55); }
.km-btn { flex: none; background: none; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; color: #a7afc0; font: inherit; font-size: 0.86rem; padding: 7px 12px; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.km-btn:hover { color: #fff; border-color: rgba(111, 155, 255, 0.45); }
.km-main { display: flex; flex: 1; min-height: 0; }
.km-rail { width: 248px; flex: none; overflow: auto; border-right: 1px solid rgba(255, 255, 255, 0.07); padding: 10px 0; }
.km-rail::-webkit-scrollbar { width: 8px; }
.km-rail::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }
.km-mod { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; color: #a7afc0; font: inherit; font-size: 0.86rem; padding: 9px 18px; cursor: pointer; transition: background 0.2s, color 0.2s; }
.km-mod:hover { background: rgba(255, 255, 255, 0.04); color: #eceef3; }
.km-mod.is-on { background: linear-gradient(90deg, rgba(111, 155, 255, 0.18), transparent 88%); color: #fff; }
.km-mod-i { flex: none; font-size: 0.76rem; color: #5d6474; font-variant-numeric: tabular-nums; }
.km-mod.is-on .km-mod-i { color: #6f9bff; }
.km-mod-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.km-mod-n { flex: none; font-size: 0.76rem; color: #5d6474; font-variant-numeric: tabular-nums; }
.km-body { flex: 1; min-width: 0; overflow: auto; }
.km-body::-webkit-scrollbar { width: 10px; }
.km-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 5px; }
.km-tree { padding: 18px 30px 46px; }
.km-modhead { padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px dashed rgba(255, 255, 255, 0.08); }
.km-modhead-i { font-size: 0.76rem; letter-spacing: 0.14em; color: #6f9bff; margin-bottom: 6px; }
.km-modhead-t { font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif; font-size: 1.16rem; font-weight: 700; margin-bottom: 4px; }
.km-modhead-n { font-size: 0.82rem; color: #6b7386; }
.km-empty { font-size: 0.86rem; color: #8b93a4; padding: 22px 0; line-height: 1.8; }
.kn-row { display: flex; align-items: flex-start; gap: 9px; padding: 6px 8px 6px 0; border-radius: 7px; font-size: 0.92rem; line-height: 1.68; color: #cfcdd9; }
.kn-row.has-kids { cursor: pointer; }
.kn-row.has-kids:hover { background: rgba(255, 255, 255, 0.035); }
.kn-row:focus-visible { outline: 1px solid rgba(111, 155, 255, 0.6); outline-offset: -1px; }
.kn-caret { position: relative; flex: none; width: 14px; height: 14px; margin-top: 5px; }
.kn-caret::before { content: ""; position: absolute; left: 3px; top: 2px; width: 5px; height: 5px; border-right: 1.4px solid rgba(255, 255, 255, 0.42); border-bottom: 1.4px solid rgba(255, 255, 255, 0.42); transform: rotate(-45deg); transition: transform 0.18s ease; }
.kn.is-open > .kn-row .kn-caret::before { transform: rotate(45deg); }
.kn-row.is-leaf .kn-caret::before { display: none; }
.kn-row.is-leaf .kn-caret::after { content: ""; position: absolute; left: 5px; top: 6px; width: 4px; height: 1px; background: rgba(255, 255, 255, 0.22); }
.kn-t { flex: 1; min-width: 0; }
.kn-t mark { background: rgba(96, 156, 255, 0.26); color: #cfe2ff; border-radius: 3px; padding: 0 2px; }
.kn-n { flex: none; margin-left: 10px; margin-top: 3px; font-size: 0.76rem; color: #6b7386; background: rgba(255, 255, 255, 0.05); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.kn-kids { display: none; margin-left: 7px; padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, 0.085); }
.kn.is-open > .kn-kids { display: block; }
.kn[data-d="1"] > .kn-row { font-size: 0.98rem; font-weight: 600; color: #eceef3; }
.kn[data-d="2"] > .kn-row { font-size: 0.9rem; color: #cfcdd9; }
.kn[data-d="3"] > .kn-row { font-size: 0.86rem; color: #a7afc0; }
.kn[data-d="4"] > .kn-row, .kn[data-d="5"] > .kn-row { font-size: 0.83rem; color: #8d95a6; }

@media (max-width: 860px) {
  .km-overlay { padding: 0; }
  .km-panel { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
  .km-head { padding: 16px 18px 14px; gap: 12px; align-items: center; }
  .km-kicker { display: none; }
  .km-h { font-size: 1.1rem; }
  .km-stat { display: none; }
  .km-tools { padding: 10px 16px; flex-wrap: wrap; }
  .km-search { max-width: none; flex: 1 1 100%; }
  .km-main { flex-direction: column; }
  .km-rail { width: auto; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); padding: 10px 14px; scrollbar-width: none; }
  .km-rail::-webkit-scrollbar { display: none; }
  .km-mod { flex: none; width: auto; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; padding: 7px 12px; }
  .km-mod.is-on { background: rgba(111, 155, 255, 0.16); border-color: rgba(111, 155, 255, 0.45); }
  .km-mod-n { display: none; }
  .km-tree { padding: 14px 16px 40px; }
  .kn-row { font-size: 0.86rem; }
}

/* 全库检索结果 */
.km-rg { margin-top: 24px; }
.km-rg-head {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 0 10px; margin-bottom: 10px; color: #cfcdd9; font: inherit; cursor: pointer;
}
.km-rg-head:hover .km-rg-t { color: #fff; }
.km-rg-t { font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif; font-size: 0.98rem; font-weight: 600; }
.km-rg-n { font-size: 0.8rem; color: #6b7386; }
.km-rg-go { margin-left: auto; font-size: 0.82rem; color: #6f9bff; opacity: 0; transition: opacity 0.2s; }
.km-rg-head:hover .km-rg-go { opacity: 1; }
.km-hits { display: grid; gap: 2px; }
.km-hit { padding: 7px 10px; border-radius: 8px; }
.km-hit:hover { background: rgba(255, 255, 255, 0.035); }
.km-hit-path { font-size: 0.8rem; color: #6b7386; margin-bottom: 3px; }
.km-hit-t { font-size: 0.88rem; line-height: 1.7; color: #cfcdd9; }
.km-hit-t mark { background: rgba(96, 156, 255, 0.26); color: #cfe2ff; border-radius: 3px; padding: 0 2px; }
@media (max-width: 860px) {
  .km-rg-go { display: none; }
  .km-hit-t { font-size: 0.84rem; }
}
.km-panel.is-searching .km-btn { display: none; }
.km-panel.is-searching .km-mod.is-on { background: none; color: #a7afc0; }
