/* ==========================================================================
   凇语工坊 · 极简暖调门户 & GitBook 三栏 Wiki 视觉系统（零依赖）
   设计原则：大留白、少按钮、去套娃边框、暖奶白 + 蛋黄点缀 + 暖咖暗色
   ========================================================================== */

@font-face {
  font-family: 'Minecraft';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/mc-minecraft.woff2') format('woff2'),
       url('/assets/fonts/mc-minecraft.woff') format('woff');
}
@font-face {
  font-family: 'Zpix';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/zpix.woff2') format('woff2');
}

:root {
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-pixel: 'Zpix', 'Minecraft', monospace;
  --font-mono: 'Minecraft', ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg: #fafcff;
  --bg-soft: #f2f7fc;
  --card: #ffffff;
  --nav-bg: rgba(250, 252, 255, .9);

  --primary: #6aaad6;
  --primary-deep: #5193c2;
  --primary-dark: #3f7eab;
  --primary-soft: #e6f3fc;
  --primary-softer: #f3f9fe;
  --on-primary: #ffffff;
  --accent-warm: #f6c95c;
  --accent-warm-soft: #fff5d6;

  /* 兼容 veil.css / loader.js */
  --blue: var(--primary);
  --blue-2: var(--primary-deep);
  --blue-dark: var(--primary-dark);
  --blue-soft: var(--primary-soft);
  --text: var(--ink);
  --text-2: var(--ink-2);
  --text-3: var(--ink-3);

  --ink: #2a3442;
  --ink-2: #5b6777;
  --ink-3: #8c99aa;

  --line: #e4edf5;
  --line-2: #cfe0ee;

  --ok: #25855a;     --ok-soft: #e6f6ee;
  --warn: #b7791f;   --warn-soft: #fef6df;
  --bad: #c94545;    --bad-soft: #fdecec;

  --shadow-xs: 0 1px 2px rgba(42, 52, 66, .05);
  --shadow-sm: 0 10px 30px -22px rgba(58, 108, 152, .26);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

html[data-mode="dark"] {
  --bg: #131820;
  --bg-soft: #1a212c;
  --card: #1d2531;
  --nav-bg: rgba(19, 24, 32, .9);

  --primary: #7ec0eb;
  --primary-deep: #9ad1f5;
  --primary-dark: #63acdd;
  --primary-soft: rgba(126, 192, 235, .15);
  --primary-softer: rgba(126, 192, 235, .08);
  --on-primary: #102130;
  --accent-warm: #ffd66b;
  --accent-warm-soft: rgba(255, 214, 107, .16);

  --ink: #eef3f9;
  --ink-2: #b5c2d2;
  --ink-3: #7f8fa3;

  --line: #293343;
  --line-2: #39485e;

  --ok: #4ade80;     --ok-soft: rgba(74, 222, 128, .12);
  --warn: #ffd66b;   --warn-soft: rgba(255, 214, 107, .14);
  --bad: #f87171;    --bad-soft: rgba(248, 113, 113, .14);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 14px 34px -22px rgba(0, 0, 0, .65);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: var(--ink); }
.hidden { display: none !important; }
::selection { background: var(--primary); color: var(--on-primary); }

/* ---------- 极简顶栏（参考 GitBook，干净一条线） ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--nav-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1320px; margin: 0 auto; padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand .brand-logo {
  height: 40px; width: auto; display: block; object-fit: contain;
  transition: transform .26s cubic-bezier(.22, 1.4, .45, 1);
}
.brand:hover .brand-logo { transform: scale(1.04); }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links > a, .nav-drop-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 11px; border-radius: 7px; font-size: 13.5px; font-weight: 500;
  color: var(--ink-2); transition: color .15s, background .15s; white-space: nowrap;
}
.nav-links > a:hover, .nav-drop-btn:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links > a.on, .nav-drop-btn.on { color: var(--primary-dark); font-weight: 650; }
html[data-mode="dark"] .nav-links > a.on,
html[data-mode="dark"] .nav-drop-btn.on { color: var(--primary); }

/* 顶栏下拉子菜单（卧龙小城专区） */
.nav-drop { position: relative; }
.nav-drop-btn svg { width: 12px; height: 12px; opacity: .65; transition: transform .18s ease; }
.nav-drop:hover .nav-drop-btn svg,
.nav-drop.open .nav-drop-btn svg { transform: rotate(180deg); }
.nav-menu {
  position: absolute; left: 0; top: calc(100% + 6px); min-width: 176px;
  padding: 6px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .16s ease, transform .18s var(--ease-out);
  z-index: 60;
}
/* 透明桥接防止鼠标从按钮移到菜单时瞬间断开 */
.nav-drop::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px;
}
.nav-drop:hover .nav-menu,
.nav-drop:focus-within .nav-menu,
.nav-drop.open .nav-menu { opacity: 1; transform: none; pointer-events: auto; }
.nav-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 11px; border-radius: 7px; font-size: 13.5px; color: var(--ink-2);
  transition: background .14s, color .14s; white-space: nowrap;
}
.nav-menu a:hover { background: var(--bg-soft); color: var(--ink); }
.nav-menu a.on { background: var(--primary-softer); color: var(--primary-dark); font-weight: 650; }
html[data-mode="dark"] .nav-menu a.on { color: var(--primary); }

.spacer { flex: 1; min-width: 8px; }
.top-right { display: flex; align-items: center; gap: 8px; flex: none; }

/* 顶栏内联搜索框 + 实时下拉联想（不弹模态遮屏） */
.top-search-wrap { position: relative; }
.top-search {
  display: flex; align-items: center; gap: 8px; height: 34px; width: 196px;
  padding: 0 8px 0 11px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
  color: var(--ink-3); font-size: 13px; cursor: text;
  transition: width .24s cubic-bezier(.22, 1, .36, 1), border-color .16s, background .16s, box-shadow .18s;
}
.top-search-wrap.open .top-search,
.top-search:focus-within {
  width: 260px; border-color: var(--primary-deep); background: var(--card); color: var(--ink);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.top-search svg { width: 14px; height: 14px; flex: none; }
.top-search input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font-size: 13px; color: var(--ink);
}
.top-search input::placeholder { color: var(--ink-3); }
.top-search kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px;
  padding: 1px 5px; border-radius: 4px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink-3); flex: none;
}
.top-search-wrap.open .top-search kbd { display: none; }
.top-search-drop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-height: 360px; overflow-y: auto;
  padding: 6px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); z-index: 80;
  opacity: 0; transform: translateY(-4px) scale(.98); pointer-events: none;
  transition: opacity .16s ease, transform .18s var(--ease-out);
}
.top-search-wrap.open .top-search-drop { opacity: 1; transform: none; pointer-events: auto; }

/* 极简图标按钮（社交 + 日夜） */
.soc-wrap { position: relative; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  color: var(--ink-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.soc-pop {
  position: absolute; right: 0; top: calc(100% + 8px);
  display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px;
  border-radius: 10px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); white-space: nowrap;
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .18s, transform .2s;
}
.soc-wrap:hover .soc-pop { opacity: 1; transform: none; }
.soc-pop img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.soc-pop b { display: block; font-size: 12px; color: var(--ink); line-height: 1.2; }
.soc-pop span { display: block; font-size: 11px; color: var(--ink-3); }

.top-user {
  display: inline-flex; align-items: center; gap: 10px; padding-left: 6px;
  border-left: 1px solid var(--line); font-size: 13px; color: var(--ink-2);
}
.top-user a:hover, .top-user button:hover { color: var(--primary-dark); }
html[data-mode="dark"] .top-user a:hover, html[data-mode="dark"] .top-user button:hover { color: var(--primary); }

/* ---------- 页面容器（普通页面 980px，Wiki 页面 1320px 三栏） ---------- */
.page {
  flex: 1 0 auto; width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 28px 80px;
}
.page.wide { max-width: 1320px; padding: 0 28px 64px; }

.a-fade { animation: fadeIn .28s var(--ease-out) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 极简按钮体系（每屏克制只留 1 个主按钮） */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, transform .1s;
}
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn.full { width: 100%; }
.btn-main { background: var(--primary); color: var(--on-primary); }
.btn-main:hover { background: var(--primary-deep); }
.btn-main:active { transform: translateY(1px); }
.btn-line { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); }
.btn-line:hover { border-color: var(--primary-deep); color: var(--primary-dark); }
html[data-mode="dark"] .btn-line:hover { color: var(--primary); }

.link-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13.5px; font-weight: 550; color: var(--primary-dark);
  transition: opacity .15s;
}
html[data-mode="dark"] .link-more { color: var(--primary); }
.link-more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ==========================================================================
   1. 首页（大幅做减法：大留白、少按钮、清晰节奏）
   ========================================================================== */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 56px; align-items: center; padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em;
  color: var(--ink-3); text-transform: uppercase;
}
.hero-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.hero h1 {
  margin-top: 18px; font-size: clamp(34px, 4.2vw, 46px); font-weight: 800;
  line-height: 1.22; letter-spacing: -.02em; color: var(--ink);
}
.hero h1 .hl {
  background: linear-gradient(transparent 60%, var(--accent-warm-soft) 60%);
  padding: 0 4px; border-radius: 3px;
}
.hero p {
  margin-top: 18px; font-size: 15px; color: var(--ink-2); line-height: 1.85; max-width: 42ch;
}
.hero-acts { margin-top: 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.hero-art { display: flex; justify-content: flex-end; }
.mascot-frame {
  width: 100%; max-width: 320px; padding: 26px 24px 22px; border-radius: 22px;
  background: var(--bg-soft); border: 1px solid var(--line); text-align: center;
}
.mascot-frame img {
  width: 190px; height: 190px; object-fit: contain; display: block; margin: 0 auto;
  filter: drop-shadow(0 12px 20px rgba(90, 68, 22, .12));
}
.mascot-frame b {
  display: block; margin-top: 14px; font-family: var(--font-pixel); font-size: 17px;
  font-weight: 400; letter-spacing: .06em; -webkit-font-smoothing: none;
}
.mascot-frame span { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); }

/* 首页分节（无多余边框，靠留白和细线呼吸） */
.h-sec { padding: 52px 0; border-bottom: 1px solid var(--line); }
.h-sec:last-child { border-bottom: 0; padding-bottom: 24px; }
.h-sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 26px;
}
.h-sec-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.h-sec-head small { font-size: 13px; color: var(--ink-3); margin-left: 10px; font-weight: 400; }

/* 卧龙小城首页模块（清爽双栏，只有 1 个主按钮 + 2 个轻链接） */
.wl-spot {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr);
  gap: 44px; align-items: center;
}
.wl-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--ok);
}
.wl-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.wl-spot h3 { margin-top: 10px; font-size: 26px; font-weight: 800; letter-spacing: -.015em; }
.wl-spot p { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); line-height: 1.85; }
.wl-spot-acts { margin-top: 22px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.wl-kv { border-top: 1px solid var(--line); }
.wl-kv div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.wl-kv span { color: var(--ink-3); }
.wl-kv b { font-weight: 650; color: var(--ink); }

/* 首页作品列表（3 列极简卡，无花哨标签海） */
.work-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.work-item {
  display: flex; flex-direction: column; padding: 20px 22px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .18s, transform .18s var(--ease-out);
}
.work-item:hover { border-color: var(--primary-deep); transform: translateY(-2px); }
.work-item .wi-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--ink-3);
}
.work-item .wi-ver { font-family: var(--font-mono); color: var(--primary-dark); }
html[data-mode="dark"] .work-item .wi-ver { color: var(--primary); }
.work-item h3 { margin-top: 12px; font-size: 16px; font-weight: 750; color: var(--ink); }
.work-item p {
  margin-top: 6px; font-size: 13px; color: var(--ink-2); line-height: 1.65; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.work-item .wi-go { margin-top: 14px; font-size: 12.5px; font-weight: 600; color: var(--primary-dark); }
html[data-mode="dark"] .work-item .wi-go { color: var(--primary); }

/* 首页动态（极致清爽单行列表） */
.news-list { border-top: 1px solid var(--line); }
.news-row {
  display: grid; grid-template-columns: 88px 54px minmax(0, 1fr);
  align-items: center; gap: 16px; padding: 13px 6px;
  border-bottom: 1px solid var(--line); transition: background .14s;
}
.news-row:hover { background: var(--bg-soft); }
.news-row:hover .nr-t { color: var(--primary-dark); }
html[data-mode="dark"] .news-row:hover .nr-t { color: var(--primary); }
.nr-d { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.nr-k { font-size: 12px; color: var(--ink-3); }
.nr-t { font-size: 14px; font-weight: 550; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   2. GitBook 风格三栏 Wiki（全站 Wiki / 卧龙小城 Wiki / 插件软件专属 Wiki）
   左：轻目录树（无框） | 中：宽幅头图 + 大标题 + 正文（无框） | 右：ON THIS PAGE
   ========================================================================== */
.gb-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 196px;
  gap: 44px;
  align-items: start;
  padding-top: 24px;
}

/* 左栏目录树（仿 GitBook：无厚重外框，极简分组 + 当前项暖色文字） */
.gb-sidebar {
  position: sticky; top: 84px;
  max-height: calc(100vh - 108px); overflow-y: auto;
  padding-right: 12px;
}
.gb-book-head {
  padding: 0 8px 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}
.gb-book-head .back-link {
  display: inline-block; font-size: 12px; color: var(--ink-3); margin-bottom: 8px;
}
.gb-book-head .back-link:hover { color: var(--primary-dark); }
.gb-book-select {
  width: 100%; height: 34px; padding: 0 10px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 13px; font-weight: 650; color: var(--ink); outline: none; cursor: pointer;
}
.gb-book-select:focus { border-color: var(--primary-deep); }
.gb-group + .gb-group { margin-top: 20px; }

/* 独立插件/软件 Wiki 选择中心 */
.wiki-hub-group + .wiki-hub-group { margin-top: 38px; }
.wiki-hub-title {
  font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3);
  margin-bottom: 14px;
}
.gb-group-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); padding: 4px 8px 6px;
}
.gb-group-title svg { width: 13px; height: 13px; color: var(--primary-deep); flex: none; }
.gb-link {
  display: block; padding: 6px 10px; border-radius: 6px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.45;
  transition: color .14s, background .14s;
}
.gb-link:hover { color: var(--ink); background: var(--bg-soft); }
.gb-link.on { color: var(--primary-dark); font-weight: 650; background: var(--primary-softer); }
html[data-mode="dark"] .gb-link.on { color: var(--primary); }

/* 中栏纯粹阅读区（大留白、无描边盒子） */
.gb-main { min-width: 0; max-width: 740px; width: 100%; margin: 0 auto; }

/* 顶部宽幅圆角头图（模仿参考图四季拼贴的干净横幅感） */
.gb-banner {
  width: 100%; height: 178px; border-radius: 12px; overflow: hidden; margin-bottom: 28px;
  position: relative; border: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.gb-banner.single { display: flex; align-items: flex-end; padding: 22px 26px; background: linear-gradient(125deg, var(--primary-softer), var(--primary-soft)); }
.gb-banner .season-col {
  position: relative; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  color: rgba(58, 44, 0, .68);
}
.gb-banner .season-col + .season-col { border-left: 3px solid var(--bg); }
.gb-banner .s-spring { background: linear-gradient(160deg, #fce8ea 0%, #f9d6c2 100%); }
.gb-banner .s-summer { background: linear-gradient(160deg, #e5f3d8 0%, #cce5b6 100%); }
.gb-banner .s-autumn { background: linear-gradient(160deg, #fff1c9 0%, #f5c969 100%); }
.gb-banner .s-winter { background: linear-gradient(160deg, #f3f1ea 0%, #dfd9c8 100%); }
html[data-mode="dark"] .gb-banner .s-spring { background: linear-gradient(160deg, #3c2729 0%, #4d3328 100%); color: #f3d5c8; }
html[data-mode="dark"] .gb-banner .s-summer { background: linear-gradient(160deg, #243423 0%, #31442a 100%); color: #d5e8c6; }
html[data-mode="dark"] .gb-banner .s-autumn { background: linear-gradient(160deg, #3f3117 0%, #574018 100%); color: #ffe099; }
html[data-mode="dark"] .gb-banner .s-winter { background: linear-gradient(160deg, #2b2924 0%, #3a352c 100%); color: #e2dac9; }

.gb-title-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.gb-title-row h1 { font-size: 32px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }
.gb-copy {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px;
  border-radius: 7px; border: 1px solid var(--line-2); background: var(--card);
  font-size: 12.5px; color: var(--ink-2); flex: none; margin-top: 4px;
  transition: border-color .15s, color .15s;
}
.gb-copy:hover { border-color: var(--primary-deep); color: var(--ink); }
.gb-copy svg { width: 13px; height: 13px; }
.gb-lead { margin-top: 8px; font-size: 15.5px; color: var(--ink-3); }

/* 正文 Markdown（极度干净、高可读、暖橙行内链接） */
.md { margin-top: 26px; font-size: 15px; line-height: 1.85; color: var(--ink); }
.md h2 {
  font-size: 21px; font-weight: 750; margin: 36px 0 14px; letter-spacing: -.01em;
  scroll-margin-top: 84px;
}
.md h3 { font-size: 16.5px; font-weight: 700; margin: 24px 0 10px; scroll-margin-top: 84px; }
.md h2:first-child { margin-top: 0; }
.md p { margin: 12px 0; color: var(--ink-2); }
.md strong { color: var(--ink); font-weight: 650; }
.md a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
html[data-mode="dark"] .md a { color: var(--primary); }
.md ul, .md ol { margin: 12px 0 14px 22px; color: var(--ink-2); }
.md li { margin: 6px 0; }
.md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; padding: 2px 6px; border-radius: 5px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--primary-dark);
  cursor: pointer;
}
html[data-mode="dark"] .md code { color: var(--primary); }
.md pre {
  margin: 16px 0; padding: 15px 18px; border-radius: 10px;
  background: var(--bg-soft); border: 1px solid var(--line); overflow-x: auto;
}
.md pre code { background: none; border: 0; padding: 0; color: var(--ink); font-size: 13px; line-height: 1.65; cursor: text; }
.md blockquote {
  margin: 18px 0; padding: 12px 16px; border-radius: 8px;
  border-left: 3px solid var(--primary); background: var(--primary-softer);
  color: var(--ink-2); font-size: 14px;
}
.md table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.md th, .md td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.md th { font-size: 12.5px; font-weight: 650; color: var(--ink-3); }

/* 底部上一篇 / 下一篇 */
.gb-pager {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.gb-pager a {
  padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line);
  transition: border-color .16s;
}
.gb-pager a:hover { border-color: var(--primary-deep); }
.gb-pager a.next { text-align: right; }
.gb-pager small { display: block; font-size: 11.5px; color: var(--ink-3); }
.gb-pager b { display: block; margin-top: 3px; font-size: 14px; font-weight: 650; color: var(--ink); }

/* 右栏 ON THIS PAGE 目录 */
.gb-toc { position: sticky; top: 84px; padding-left: 14px; border-left: 1px solid var(--line); }
.gb-toc-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--ink-3);
  text-transform: uppercase; margin-bottom: 10px;
}
.gb-toc a {
  display: block; padding: 4px 0; font-size: 12.5px; color: var(--ink-3);
  line-height: 1.5; transition: color .14s;
}
.gb-toc a:hover { color: var(--ink); }
.gb-toc a.sub { padding-left: 12px; font-size: 12px; }

/* ==========================================================================
   3. 二级频道页头（极简平铺 + 细下划线 Tab，拒绝厚重卡片与按钮海）
   ========================================================================== */
.page-head { padding: 42px 0 0; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.015em; }
.page-head p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); max-width: 56ch; }
.line-tabs { display: flex; gap: 24px; margin-top: 24px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.line-tabs::-webkit-scrollbar { display: none; }
.line-tabs a {
  position: relative; padding: 0 2px 12px; font-size: 14px; font-weight: 550;
  color: var(--ink-2); white-space: nowrap; transition: color .15s;
}
.line-tabs a:hover { color: var(--ink); }
.line-tabs a.on { color: var(--ink); font-weight: 700; }
.line-tabs a.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--primary); border-radius: 2px;
}

.page-body { padding-top: 34px; }

/* ---------- 卧龙小城：进服申请（干净平铺表单，减少冗余框） ---------- */
.apply-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(240px, .55fr); gap: 52px; align-items: start; }
.form-block + .form-block { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.form-block h3 { font-size: 15.5px; font-weight: 750; margin-bottom: 16px; }
.form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field label em { font-style: normal; color: var(--bad); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--ink-3); }

.input, .textarea {
  width: 100%; padding: 9px 12px; border-radius: 8px; font-size: 14px;
  background: var(--card); border: 1px solid var(--line-2); color: var(--ink); outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.input:focus, .textarea:focus { border-color: var(--primary-deep); box-shadow: 0 0 0 3px rgba(245, 179, 1, .16); }
.textarea { min-height: 82px; resize: vertical; line-height: 1.65; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-2);
  background: var(--bg-soft); border: 1px solid var(--line); transition: all .14s;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.on { background: var(--primary-soft); border-color: var(--primary-deep); color: var(--on-primary); font-weight: 600; }
html[data-mode="dark"] .chip.on { color: var(--primary); }

.agree-line {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 10px;
  background: var(--bg-soft); font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.agree-line input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--primary-deep); flex: none; }
.agree-line a { color: var(--primary-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
html[data-mode="dark"] .agree-line a { color: var(--primary); }

.form-err { color: var(--bad); font-size: 13px; margin-top: 10px; min-height: 18px; }

.side-notes { border-left: 1px solid var(--line); padding-left: 26px; }
.side-notes h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 14px; color: var(--ink); }
.sn-item + .sn-item { margin-top: 16px; }
.sn-item b { display: block; font-size: 13.5px; font-weight: 650; }
.sn-item p { margin-top: 3px; font-size: 12.5px; color: var(--ink-3); line-height: 1.65; }

.state-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650;
}
.state-badge.pending  { background: var(--warn-soft); color: var(--warn); }
.state-badge.approved { background: var(--ok-soft);   color: var(--ok); }
.state-badge.rejected { background: var(--bad-soft);  color: var(--bad); }

.group-box {
  margin-top: 20px; padding: 24px; border-radius: 12px; text-align: center;
  background: var(--primary-softer); border: 1px dashed var(--primary-deep);
}
.group-num { font-family: var(--font-mono); font-size: 28px; letter-spacing: .08em; margin: 8px 0 14px; }
.group-box img { width: 170px; height: 170px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 6px; margin-top: 12px; }

/* ---------- 一键整合包 / 评审团 / 插件软件库（清爽无压迫感） ---------- */
.pack-top {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr);
  gap: 44px; padding-bottom: 36px; border-bottom: 1px solid var(--line); align-items: start;
}
.pack-specs { border-top: 1px solid var(--line); margin-top: 18px; }
.pack-specs div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pack-specs span { color: var(--ink-3); }
.simple-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 32px; }
.simple-3 h4 { font-size: 14.5px; font-weight: 700; margin-top: 6px; }
.simple-3 p { margin-top: 6px; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.simple-3 .num { font-family: var(--font-mono); font-size: 11.5px; color: var(--primary-deep); }

.council-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.council-card {
  padding: 22px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
}
.council-head { display: flex; align-items: center; gap: 12px; }
.council-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.council-head b { display: block; font-size: 15px; font-weight: 750; }
.council-head span { display: block; font-size: 12px; color: var(--ink-3); }
.council-card p { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }

.lib-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 24px;
}
.lib-search {
  display: flex; align-items: center; gap: 8px; height: 36px; width: 240px; max-width: 100%;
  padding: 0 12px; border-radius: 8px; background: var(--card); border: 1px solid var(--line-2);
}
.lib-search svg { width: 14px; height: 14px; color: var(--ink-3); }
.lib-search input { flex: 1; border: 0; background: none; outline: none; font-size: 13.5px; }

.lib-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.lib-item {
  display: flex; flex-direction: column; padding: 22px 24px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); transition: border-color .16s;
}
.lib-item:hover { border-color: var(--primary-deep); }
.lib-item .li-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lib-item h3 { font-size: 17px; font-weight: 750; }
.lib-item .li-ver { font-family: var(--font-mono); font-size: 11.5px; color: var(--primary-dark); }
html[data-mode="dark"] .lib-item .li-ver { color: var(--primary); }
.lib-item p { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; flex: 1; }
.lib-item .li-foot {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; font-size: 13px;
}
.lib-item .li-meta { font-size: 12px; color: var(--ink-3); }
.lib-item .li-links { display: flex; gap: 14px; }

/* 搜索弹窗（Ctrl+K） & 协议弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(23, 20, 15, .48); backdrop-filter: blur(4px);
  display: grid; place-items: start center; padding: 10vh 20px 20px;
}
.modal-card {
  width: 100%; max-width: 560px; max-height: 76vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.search-res-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--ink);
}
.search-res-item:hover { background: var(--bg-soft); color: var(--primary-dark); }
.search-res-item small { font-size: 12px; color: var(--ink-3); }

/* 页脚（极简一行） */
.site-foot {
  flex: none; border-top: 1px solid var(--line); padding: 24px 28px;
  text-align: center; font-size: 12px; color: var(--ink-3); line-height: 1.9;
}
.site-foot .sf-brand {
  font-family: var(--font-pixel); font-size: 13.5px; color: var(--ink-2); -webkit-font-smoothing: none;
}
.site-foot a:hover { color: var(--primary-dark); }

/* Toast */
.toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%) translateY(-6px);
  background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 999px;
  font-size: 13px; opacity: 0; pointer-events: none; z-index: 100; transition: opacity .2s, transform .22s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* ---------- 顶栏通知铃铛小红/黄点 ---------- */
.notif-btn { position: relative; }
.notif-dot {
  position: absolute; right: 5px; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--primary); border: 1.5px solid var(--bg);
}

/* ---------- 进群认证入口页（大入口卡 + Q/A） ---------- */
.gate-hero {
  margin-top: 36px; padding: 48px 44px; border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-softer) 0%, var(--card) 68%);
  border: 1px solid var(--line); text-align: center;
}
.gate-hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.gate-hero p { margin: 12px auto 0; max-width: 48ch; font-size: 15px; color: var(--ink-2); }
.gate-big-btn {
  margin-top: 28px; height: 50px; padding: 0 32px; border-radius: 12px;
  font-size: 15.5px; font-weight: 700;
}
.gate-status-box {
  margin: 26px auto 0; max-width: 520px; padding: 20px 22px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); text-align: left;
}
.qa-section { margin-top: 52px; }
.qa-section h2 { font-size: 18px; font-weight: 800; margin-bottom: 18px; }
.qa-list { border-top: 1px solid var(--line); }
.qa-row { padding: 18px 4px; border-bottom: 1px solid var(--line); }
.qa-q { font-size: 15px; font-weight: 700; color: var(--ink); }
.qa-a { margin-top: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.8; }

/* ---------- 心理测评式分步问卷独立页（单题一屏 + 进度条） ---------- */
.quiz-wrap { max-width: 640px; margin: 36px auto 0; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.quiz-bar { width: 100%; height: 6px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin-bottom: 32px; }
.quiz-bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .32s var(--ease-out); }
.quiz-card {
  padding: 36px 38px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  min-height: 300px; display: flex; flex-direction: column; justify-content: space-between;
}
.quiz-step-tag { font-family: var(--font-mono); font-size: 11.5px; color: var(--primary-dark); letter-spacing: .08em; }
html[data-mode="dark"] .quiz-step-tag { color: var(--primary); }
.quiz-q { margin-top: 10px; font-size: 21px; font-weight: 800; line-height: 1.4; color: var(--ink); }
.quiz-hint { margin-top: 6px; font-size: 13.5px; color: var(--ink-3); }
.quiz-body { margin-top: 24px; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opts.bool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.quiz-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: 11px; font-size: 14.5px; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line);
  transition: border-color .16s, background .16s;
}
.quiz-opt:hover { border-color: var(--line-2); background: var(--bg-soft); }
.quiz-opt.on { border-color: var(--primary-deep); background: var(--primary-softer); font-weight: 650; }
.quiz-opt .mark {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2);
  display: grid; place-items: center; flex: none; font-size: 11px;
}
.quiz-opt.multi .mark { border-radius: 5px; }
.quiz-opt.on .mark { background: var(--primary); border-color: var(--primary-deep); color: var(--on-primary); }
.quiz-opts.bool-grid .quiz-opt { justify-content: center; padding: 24px 16px; font-size: 16px; font-weight: 700; }
.quiz-foot {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* 提交成功码大弹窗 */
.code-pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 14px 0;
  padding: 10px 20px; border-radius: 10px; background: var(--primary-softer);
  border: 1px dashed var(--primary-deep); font-family: var(--font-mono);
  font-size: 22px; letter-spacing: .1em; color: var(--ink);
}

/* ---------- 评审团案件系统 ---------- */
.case-list { display: flex; flex-direction: column; gap: 16px; }
.case-card {
  display: block; padding: 22px 26px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .16s;
}
.case-card:hover { border-color: var(--primary-deep); }
.case-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.case-top h3 { font-size: 17px; font-weight: 750; color: var(--ink); }
.case-parties {
  margin-top: 14px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-2);
}
.user-chip { display: inline-flex; align-items: center; gap: 8px; }
.user-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--bg-soft); }
.user-chip .av-ph {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); font-size: 12px; color: var(--ink-3);
}
.case-meta-line { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }

/* 投票比例条 */
.vote-bar { width: 100%; height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; display: flex; margin: 10px 0; }
.vote-bar .vp { background: var(--primary); transition: width .3s ease; }
.vote-bar .vd { background: var(--ink-2); transition: width .3s ease; }

/* 评审详情双栏（原告 vs 被告） */
.case-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 24px; }
.side-box { padding: 24px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.side-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.side-box h4 { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-top: 16px; }
.side-box .txt { margin-top: 6px; font-size: 14px; color: var(--ink); line-height: 1.8; white-space: pre-wrap; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.ev-item { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--bg-soft); }
.ev-item img { width: 100%; height: 86px; object-fit: cover; display: block; cursor: zoom-in; }
.ev-item .ev-cap { padding: 6px 8px; font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.ev-item .ev-cap b { display: block; color: var(--ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vote-panel { margin-top: 24px; padding: 24px 26px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.vote-list { margin-top: 18px; border-top: 1px solid var(--line); }
.vote-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }

/* 站内通知页 */
.notif-item { padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); margin-bottom: 12px; }
.notif-item.unread { border-color: var(--primary-deep); background: var(--primary-softer); }

@media (max-width: 820px) {
  .case-sides { grid-template-columns: minmax(0, 1fr); }
  .gate-hero { padding: 32px 20px; }
  .quiz-card { padding: 24px 20px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1060px) {
  .gb-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .gb-toc { display: none; }
}
@media (max-width: 820px) {
  .topbar-in { padding: 0 16px; gap: 10px; height: 56px; }
  .brand-logo { height: 36px; }
  .top-search-wrap, .top-search { display: none; }
  .soc-wrap { display: none; }
  .page, .page.wide { padding: 0 18px 40px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 28px 0 28px; }
  .hero h1 { font-size: clamp(26px, 6.8vw, 34px); line-height: 1.28; }
  .hero h1 .hl { white-space: nowrap; }
  .hero-art { justify-content: center; }
  .mascot-frame { width: 100%; max-width: 320px; padding: 20px 18px 18px; }
  .mascot-frame img { width: 150px; height: 150px; }
  .h-sec { padding: 26px 0 18px; }
  .wl-spot, .apply-grid, .pack-top, .gb-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .wl-seasons { gap: 10px; }
  .wl-s-card { padding: 14px 14px; }
  .gb-sidebar { position: static; max-height: none; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
  .side-notes { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .work-list, .lib-list, .council-list, .simple-3, .form-2, .gb-pager { grid-template-columns: minmax(0, 1fr); }
  .gb-banner { height: 126px; }
}
@media (max-width: 600px) {
  .topbar-in { height: 54px; flex-wrap: nowrap; padding: 0 14px; gap: 8px; }
  .brand-logo { height: 34px; }
  .nav-links { margin-left: 4px; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links > a, .nav-drop-btn { padding: 6px 8px; font-size: 13.5px; white-space: nowrap; }
  .hero { padding: 22px 0 24px; gap: 20px; }
  .hero-tag { font-size: 11px; }
  .hero h1 { font-size: clamp(24px, 6.6vw, 30px); }
  .hero p { font-size: 14px; margin-top: 12px; }
  .hero-acts { margin-top: 18px; gap: 10px; flex-wrap: wrap; }
  .hero-acts .btn-main { width: 100%; justify-content: center; }
  .mascot-frame { max-width: 100%; padding: 18px 16px 16px; }
  .mascot-frame img { width: 142px; height: 142px; }
  .mascot-bubble { max-width: calc(100vw - 56px); font-size: 12px; }
  .wl-spot h3 { font-size: 20px; }
  .wl-spot p { font-size: 13.5px; }
  .wl-s-card b { font-size: 14px; }
  .wl-s-card small { font-size: 11.5px; }
  .site-foot { padding: 20px 16px calc(22px + env(safe-area-inset-bottom)); }
  .sf-beian { flex-direction: column; gap: 4px; }
  .sf-sep { display: none; }
  .news-row { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
  .nr-k { display: none; }
}

/* ==========================================================================
   yui540.com 灵感全站微动效系统（极简暖调 · 纯 CSS 硬件加速）
   ========================================================================== */

/* 1. 顶栏：中心外扩短下划线 + 图标微浮 + 品牌头像俏皮微旋 */
.brand img { transition: transform .28s cubic-bezier(.22, 1.45, .45, 1); }
.brand:hover img { transform: scale(1.1) rotate(-6deg); }

.nav-links > a, .nav-drop-btn { position: relative; }
.nav-links > a::after, .nav-drop-btn::after {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 14px; height: 2px; border-radius: 99px; background: var(--primary-deep);
  transform: translateX(-50%) scaleX(0);
  transition: transform .22s cubic-bezier(.22, 1.3, .36, 1);
  pointer-events: none;
}
html[data-mode="dark"] .nav-links > a::after,
html[data-mode="dark"] .nav-drop-btn::after { background: var(--primary); }
.nav-links > a:hover::after, .nav-links > a.on::after,
.nav-drop:hover .nav-drop-btn::after, .nav-drop-btn.on::after {
  transform: translateX(-50%) scaleX(1);
}

.icon-btn { transition: background .16s, color .16s, transform .22s cubic-bezier(.22, 1.4, .45, 1); }
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn:active { transform: translateY(0) scale(.92); }
.top-search { transition: border-color .18s, background .18s, transform .2s var(--ease-out), box-shadow .2s; }
.top-search:hover { transform: translateY(-1px); box-shadow: 0 4px 12px -8px rgba(120, 88, 20, .35); }

/* 2. 胶囊/主按钮：微倾上浮 + 柔和暖金投影 + 按压回弹 */
.btn {
  transition: background .18s, border-color .18s, color .18s,
              transform .22s cubic-bezier(.22, 1.38, .42, 1), box-shadow .22s ease;
}
.btn-main:hover {
  transform: translateY(-2.5px);
  box-shadow: 0 10px 22px -10px rgba(74, 142, 196, .62);
}
.btn-main:active { transform: translateY(0) scale(.97); box-shadow: none; }
.btn-line:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -12px rgba(90, 68, 20, .3);
}
.btn-line:active { transform: translateY(0) scale(.97); box-shadow: none; }

.link-more { transition: color .16s, transform .2s var(--ease-out); }
.link-more:hover { transform: translateX(3px); }

/* 3. 卡片：错峰过冲缩放入场（scale 0.94 -> 1.008 -> 1）+ 左下轴心轻倾斜浮起 */
@keyframes yuiPopCard {
  0%   { opacity: 0; transform: translateY(10px) scale(.94); }
  58%  { opacity: 1; transform: translateY(-1px) scale(1.008); }
  100% { opacity: 1; transform: none; }
}
.work-item, .lib-item, .pack-item, .council-item, .qa-row {
  transform-origin: left bottom;
  animation: yuiPopCard .46s cubic-bezier(.22, 1.15, .36, 1) both;
  transition: border-color .2s, transform .26s cubic-bezier(.22, 1.3, .36, 1), box-shadow .26s ease, background .2s;
}
.work-item:nth-child(2), .lib-item:nth-child(2), .qa-row:nth-child(2), .pack-item:nth-child(2), .council-item:nth-child(2) { animation-delay: .05s; }
.work-item:nth-child(3), .lib-item:nth-child(3), .qa-row:nth-child(3), .pack-item:nth-child(3), .council-item:nth-child(3) { animation-delay: .10s; }
.work-item:nth-child(4), .lib-item:nth-child(4), .qa-row:nth-child(4), .pack-item:nth-child(4), .council-item:nth-child(4) { animation-delay: .15s; }
.work-item:nth-child(n+5), .lib-item:nth-child(n+5), .qa-row:nth-child(n+5) { animation-delay: .18s; }

.work-item:hover, .lib-item:hover, .pack-item:hover, .council-item:hover {
  border-color: var(--primary-deep);
  transform: translateY(-4px) rotate(-.7deg);
  box-shadow: 0 14px 28px -18px rgba(120, 88, 20, .34);
}
.qa-row:hover {
  transform: translateX(4px);
}

/* 4. 首页 Hero 标题扫出揭示 + 在线绿点脉冲 + 动态行左滑暖金竖条 */
@keyframes yuiClipReveal {
  from { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateX(-6px); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
}
.hero h1, .page-head h1 {
  animation: yuiClipReveal .55s cubic-bezier(.22, 1, .36, 1) .04s both;
}
@keyframes yuiLivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(31, 127, 62, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(31, 127, 62, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 127, 62, 0); }
}
.wl-live::before { animation: yuiLivePulse 2.4s ease-out infinite; }
.hero-tag i { animation: yuiLivePulse 2.8s ease-out infinite; }

.news-row { position: relative; transition: background .16s, padding-left .2s var(--ease-out); }
.news-row::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0;
  border-radius: 99px; background: var(--primary);
  transform: translateY(-50%); transition: height .2s cubic-bezier(.22, 1.3, .36, 1);
}
.news-row:hover { padding-left: 14px; }
.news-row:hover::before { height: 22px; }

/* 5. 首页雪颂看板娘交互（yui540 猫咪吉祥物同款：呼吸浮游 + 点击挤压拉伸 + 气泡对话） */
.mascot-frame {
  position: relative; cursor: pointer; user-select: none;
  transition: transform .26s cubic-bezier(.22, 1.35, .36, 1), border-color .22s, box-shadow .26s;
}
.mascot-frame:hover {
  border-color: var(--primary-deep);
  transform: translateY(-4px);
  box-shadow: 0 18px 34px -22px rgba(120, 88, 20, .36);
}
@keyframes xuesongFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
@keyframes xuesongSquash {
  0%   { transform: scale(1, 1) translateY(0); }
  24%  { transform: scale(1.16, .86) translateY(6px); }
  56%  { transform: scale(.90, 1.12) translateY(-12px) rotate(-3deg); }
  80%  { transform: scale(1.04, .96) translateY(2px) rotate(1.5deg); }
  100% { transform: scale(1, 1) translateY(0) rotate(0); }
}
.mascot-frame img {
  transform-origin: center bottom;
  animation: xuesongFloat 3.8s ease-in-out infinite;
}
.mascot-frame.boing img {
  animation: xuesongSquash .58s cubic-bezier(.22, 1.25, .36, 1) both;
}
.mascot-bubble {
  position: absolute; right: calc(100% + 14px); top: 26px;
  transform: translateX(10px) scale(.9);
  width: 248px; padding: 11px 14px;
  border-radius: 14px; background: var(--card); border: 1.5px solid var(--primary);
  box-shadow: 0 12px 28px -12px rgba(120, 88, 20, .32);
  font-size: 12.5px; line-height: 1.6; color: var(--ink); text-align: left;
  opacity: 0; pointer-events: none; z-index: 20;
  transition: opacity .22s ease, transform .32s cubic-bezier(.22, 1.45, .42, 1);
}
.mascot-bubble::after {
  content: ""; position: absolute; right: -7px; top: 26px; width: 11px; height: 11px;
  background: var(--card); border-right: 1.5px solid var(--primary); border-top: 1.5px solid var(--primary);
  transform: rotate(45deg);
}
.mascot-bubble.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}
@media (max-width: 820px) {
  .mascot-bubble { right: auto; left: 50%; top: auto; bottom: calc(100% + 10px); transform: translate(-50%, 6px) scale(.9); }
  .mascot-bubble::after { right: auto; left: 50%; top: auto; bottom: -7px; border-top: 0; border-bottom: 1.5px solid var(--primary); transform: translateX(-50%) rotate(45deg); }
  .mascot-bubble.show { transform: translate(-50%, 0) scale(1); }
}
.mascot-hint {
  display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 99px;
  background: var(--primary-softer); border: 1px solid var(--line-2);
  font-size: 11px; color: var(--ink-3);
  transition: color .18s, border-color .18s;
}
.mascot-frame:hover .mascot-hint { color: var(--primary-dark); border-color: var(--primary-deep); }
html[data-mode="dark"] .mascot-frame:hover .mascot-hint { color: var(--primary); }

/* 6. Wiki 侧栏 & 翻页卡微交互 */
.gb-link { transition: color .14s, background .14s; }
.gb-link:hover { padding-left: 10px; }
.gb-pager a { transition: border-color .18s, transform .22s cubic-bezier(.22, 1.3, .36, 1), box-shadow .22s; }
.gb-pager a:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -14px rgba(120, 88, 20, .35); }

/* 7. 卧龙小城：四季轮转 2×2 马卡龙微景观卡片 */
.wl-seasons {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px;
}
.wl-s-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 13px 15px; border-radius: 13px;
  border: 1px solid var(--line);
  transform-origin: left bottom;
  transition: transform .24s cubic-bezier(.22, 1.35, .36, 1), box-shadow .24s ease, border-color .2s;
}
.wl-s-card:hover {
  transform: translateY(-3px) rotate(-.6deg);
  border-color: var(--primary-deep);
  box-shadow: 0 12px 24px -16px rgba(58, 108, 152, .35);
}
.wl-s-card .ws-en {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; opacity: .65;
}
.wl-s-card b { font-size: 14px; font-weight: 750; color: var(--ink); margin-top: 1px; }
.wl-s-card small { font-size: 11.5px; color: var(--ink-2); }
.wl-s-card.s-spring { background: linear-gradient(145deg, #fff6f7 0%, #fdecef 100%); }
.wl-s-card.s-summer { background: linear-gradient(145deg, #f1faf4 0%, #e4f5ea 100%); }
.wl-s-card.s-autumn { background: linear-gradient(145deg, #fffaf0 0%, #fef1d3 100%); }
.wl-s-card.s-winter { background: linear-gradient(145deg, #f3f9fe 0%, #e4f1fb 100%); }
html[data-mode="dark"] .wl-s-card.s-spring { background: linear-gradient(145deg, #2b1f23 0%, #342429 100%); }
html[data-mode="dark"] .wl-s-card.s-summer { background: linear-gradient(145deg, #1a2922 0%, #20332a 100%); }
html[data-mode="dark"] .wl-s-card.s-autumn { background: linear-gradient(145deg, #2b2418 0%, #362c1c 100%); }
html[data-mode="dark"] .wl-s-card.s-winter { background: linear-gradient(145deg, #1b2633 0%, #213041 100%); }

/* 8. 页脚规范备案与公安联网备案图标 */
.sf-beian {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.sf-sep { opacity: .45; }
.sf-mps {
  display: inline-flex; align-items: center; gap: 5px;
  vertical-align: middle;
}
.sf-mps .mps-ico {
  width: 15px; height: 15px; flex: none; display: inline-block;
}
.sf-beian a:hover { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
html[data-mode="dark"] .sf-beian a:hover { color: var(--primary); }

/* 9. 首页桌面端一屏锁定（无法上下滑动，页脚固定在页面最底部） */
@media (min-width: 861px) and (min-height: 700px) {
  body.home-locked {
    height: 100vh;
    overflow: hidden;
  }
  body.home-locked .page {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 28px;
    overflow: hidden;
  }
  body.home-locked .hero {
    padding: clamp(18px, 3vh, 42px) 0 clamp(18px, 2.8vh, 36px);
    gap: 44px;
  }
  body.home-locked .hero h1 {
    margin-top: 12px;
    font-size: clamp(30px, 3.6vw, 42px);
  }
  body.home-locked .hero p { margin-top: 12px; }
  body.home-locked .hero-acts { margin-top: 20px; }
  body.home-locked .mascot-frame { padding: 18px 20px 16px; max-width: 296px; }
  body.home-locked .mascot-frame img { width: clamp(138px, 17vh, 174px); height: clamp(138px, 17vh, 174px); }
  body.home-locked .h-sec {
    padding: clamp(18px, 2.8vh, 34px) 0 8px;
    border-bottom: 0;
  }
  body.home-locked .h-sec-head { margin-bottom: 16px; }
  body.home-locked .wl-spot { gap: 36px; }
  body.home-locked .wl-spot h3 { font-size: clamp(21px, 2.3vw, 25px); margin-top: 6px; }
  body.home-locked .wl-spot p { margin-top: 8px; font-size: 14px; }
  body.home-locked .wl-spot-acts { margin-top: 16px; }
  body.home-locked .site-foot {
    flex: none;
    padding: 12px 24px 16px;
  }
}

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


/* Wiki 辅助图解 */
.md .md-fig {
  margin: 18px 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface, #fffdf6);
  border: 1px solid var(--border, #f0e3c4);
  text-align: center;
}
.md .md-fig img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.md .md-fig figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-3, #998e7c);
}


/* Wiki 原地所见即所得可视化编辑器 */
.ve-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid #d99a00;
  background: #f5b301;
  color: #3a2c00;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.ve-enter-btn:hover { background: #e5a500; }
.ve-mini-btn {
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--border, #e2d1a5);
  background: var(--surface, #fffdf6);
  color: var(--ink, #3a3226);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ve-mini-btn:hover { border-color: #d99a00; color: #b87e00; }
.ve-toolbar {
  position: sticky;
  top: 66px;
  z-index: 30;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface, #fffdf6);
  border: 1.5px solid #f5b301;
  box-shadow: 0 10px 28px -16px rgba(58, 50, 38, .35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ve-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ve-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff4d6;
  color: #8a5a00;
  font-size: 12px;
  font-weight: 700;
}
.ve-meta-in {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-2, #6e6455);
}
.ve-meta-in input {
  width: 118px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--border, #e2d1a5);
  background: var(--bg, #fff);
  color: var(--ink, #3a3226);
  font-size: 12.5px;
}
.ve-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid var(--border, #e2d1a5);
  background: var(--bg, #fff);
  color: var(--ink, #3a3226);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.ve-btn:hover { border-color: #d99a00; }
.ve-btn.ve-save {
  background: #f5b301;
  border-color: #d99a00;
  color: #3a2c00;
}
.ve-btn.ve-save:hover { background: #e5a500; }
.ve-fmt-row {
  padding-top: 6px;
  border-top: 1px dashed var(--border, #f0e3c4);
}
.ve-tool {
  height: 27px;
  padding: 0 9px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink, #3a3226);
  font-size: 12px;
  cursor: pointer;
}
.ve-tool:hover {
  background: #fff4d6;
  color: #3a2c00;
  border-color: #f0d99c;
}
.ve-editing [contenteditable="true"] {
  outline: none;
  border: 1.5px dashed rgba(217, 154, 0, .48);
  border-radius: 10px;
  padding: 8px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.ve-editing [contenteditable="true"]:focus {
  border-color: #f5b301;
  box-shadow: 0 0 0 3px rgba(245, 179, 1, .16);
}
.ve-editing #wiki-ed-lead:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-3, #a2967f);
}
.ve-md-area {
  width: 100%;
  min-height: 460px;
  padding: 14px;
  border-radius: 10px;
  border: 1.5px solid #f5b301;
  background: var(--bg, #fff);
  color: var(--ink, #3a3226);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  resize: vertical;
}


/* ==========================================================================
   移动端深度适配补强（Wiki 折叠目录 / 表格横向滚动 / 导航防裁切 / 可视化编辑）
   ========================================================================== */
.md-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border-radius: 10px;
}
.md-table-wrap table {
  margin: 0;
  min-width: 440px;
}
.gb-mob-toggle {
  display: none;
}

@media (max-width: 820px) {
  /* Wiki 目录默认折叠，点开即选，一进页面直达正文 */
  .gb-sidebar {
    padding: 0 !important;
    border-bottom: 0 !important;
    margin-bottom: 4px;
  }
  .gb-mob-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--line-2, #e2d1a5);
    background: var(--card, #fff);
    color: var(--ink, #3a3226);
    font-size: 13.5px;
    font-weight: 650;
    text-align: left;
  }
  .gb-mob-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .gb-mob-toggle svg {
    flex-shrink: 0;
    transition: transform .2s ease;
  }
  .gb-sidebar.open .gb-mob-toggle svg {
    transform: rotate(180deg);
  }
  .gb-side-body {
    display: none;
    margin-top: 8px;
    padding: 12px;
    border-radius: 12px;
    background: var(--card, #fff);
    border: 1px solid var(--line, #f0e3c4);
    max-height: 60vh;
    overflow-y: auto;
  }
  .gb-sidebar.open .gb-side-body {
    display: block;
  }

  /* Wiki 标题行与正文适配 */
  .gb-title-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .gb-title-row h1 {
    font-size: 24px;
    line-height: 1.3;
    word-break: break-word;
  }
  .md {
    font-size: 14.5px;
    overflow-wrap: anywhere;
  }
  .md pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .md th, .md td {
    padding: 8px 10px;
    font-size: 13px;
  }

  /* 原地可视化编辑器移动端适配 */
  .ve-toolbar {
    top: 56px;
    padding: 8px 10px;
  }
  .ve-meta-in input {
    width: 96px;
    font-size: 14px;
  }
  .ve-fmt-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .ve-tool {
    flex-shrink: 0;
  }

  /* 弹窗移动端留白 */
  .modal-mask {
    padding: 12px;
  }
  .modal-card {
    max-height: 88dvh;
    padding: 18px 16px;
  }

  /* 页脚底部避让悬浮音乐球 */
  .site-foot {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  /* 关键修复：防止 overflow-x:auto 把「卧龙小城」下拉菜单裁切掉 */
  .nav-links {
    overflow: visible !important;
  }
  .nav-menu {
    left: auto;
    right: -12px;
    min-width: 158px;
  }
  .topbar-in {
    padding: 0 10px;
    gap: 6px;
  }
  .brand-logo {
    height: 30px;
  }
  .top-right {
    gap: 4px;
  }
  /* 防止 iOS Safari 聚焦输入框自动放大页面 */
  input, select, textarea {
    font-size: 16px;
  }
}
