/* ==========================================================================
   VISION 资源站 · 全站样式
   品牌色 #2B32F0 ｜ 浅色为默认，深色由 html[data-theme="dark"] 覆盖
   兼容说明：不使用 color-mix()；clamp() 前均有固定字号兜底；
             渐变文字用 @supports 包裹，老浏览器回退为纯色。
   ========================================================================== */

/* ------------------------------ 1. 变量 ------------------------------ */
:root {
  --brand: #2b5cf0;
  --brand-dark: #1e46c8;
  --brand-2: #0ea5e9;
  --brand-soft: rgba(43, 92, 240, .09);
  --brand-line: rgba(43, 92, 240, .30);

  /* 首页下载按钮（第 20 节）就绪后的绿色 */
  --dl-ok: #0f9d70;

  --bg: #f4f5fb;
  --panel: #ffffff;
  --panel-2: #fafbff;
  --field: #fbfbfe;
  --line: #e5e7f2;
  --hover: #f1f2fa;

  --text: #131631;
  /* 浅色主题的次要文字原来只有 4.08:1（深色是 7:1），整体发灰看不清，压深一档到 ~6:1 */
  --muted: #555b7e;
  --ok: #0f9d70;
  --danger: #e0453e;

  --header-bg: linear-gradient(180deg, rgba(246, 247, 252, .95), rgba(246, 247, 252, .74) 52%, rgba(246, 247, 252, .30) 78%, rgba(246, 247, 252, 0));
  --footer-bg: #ffffff;

  --shadow: 0 1px 2px rgba(19, 22, 49, .04), 0 8px 24px -14px rgba(19, 22, 49, .20);
  --shadow-lg: 0 2px 6px rgba(19, 22, 49, .05), 0 22px 48px -22px rgba(19, 22, 49, .32);

  --radius: 16px;
  --radius-sm: 11px;
  --wrap: 1180px;
  /* 首屏比普通内容宽一些，卡片才撑得开 */
  --wrap-wide: 1360px;

  /* 首页下载按钮：进度条走完 → 变绿显示「打开」的时间，想更慢/更快改这里 */
  --dl-t: 1.9s;
}

html[data-theme="dark"] {
  --brand: #7c9cff;
  --brand-dark: #5b7cf0;
  --brand-2: #38bdf8;
  --brand-soft: rgba(124, 156, 255, .16);
  --brand-line: rgba(124, 156, 255, .42);

  /* 首页下载按钮（第 20 节） */
  --dl-ok: #23c07a;

  --bg: #0b0d18;
  --panel: #151827;
  --panel-2: #1a1e30;
  --field: #1b1f31;
  --line: #272c42;
  --hover: #1e2234;

  --text: #eef0fa;
  --muted: #939ac0;
  --ok: #34d399;
  --danger: #f87171;

  --header-bg: linear-gradient(180deg, rgba(9, 10, 20, .94), rgba(9, 10, 20, .70) 52%, rgba(9, 10, 20, .28) 78%, rgba(9, 10, 20, 0));
  --footer-bg: #0f1220;

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .45), 0 22px 48px -22px rgba(0, 0, 0, .85);
}

/* ------------------------------ 2. 基础 ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
               "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { line-height: 1.32; font-weight: 700; color: var(--text); }
p { margin: 0 0 10px; }
a { color: var(--brand); }
img { max-width: 100%; }
::selection { background: var(--brand); color: #fff; }

.muted { color: var(--muted); }
.small { font-size: 12.8px; }
.center { text-align: center; }
.ok { color: var(--ok); font-weight: 600; }
b, strong { font-weight: 700; }

/* 内联 SVG 图标：以 em 为单位，跟着文字大小走 */
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -.18em;
  display: inline-block;
}

/* 深浅色各一张图：默认显示浅色版，切到深色时换成亮色版 */
.only-dark { display: none; }
html[data-theme="dark"] .only-light { display: none; }
html[data-theme="dark"] .only-dark { display: block; }
/* --------------------------- 3. 布局容器 --------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.site-main { min-height: 58vh; }
.wrap.main { padding-top: 28px; padding-bottom: 28px; }

.section { padding-top: 46px; }
.section:last-of-type { padding-bottom: 8px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.01em; }
.section-head p { margin: 0; font-size: 14px; }

.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}
.more .icon { transition: transform .18s ease; }
.more:hover .icon { transform: translateX(3px); }

/* ------------------------------ 4. 顶栏 ------------------------------ */
/* 顶栏不是一条色带，而是一层往下逐渐消失的薄纱，和背景无缝衔接 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  transition: background .25s ease, box-shadow .25s ease;
}

/* 停在顶部：一条往下消失的薄纱，看不到"框"。
   滚动以后内容会从底下穿过去，这时候才变成玻璃条，保证导航文字压得住。
   首页一屏不滚动，所以永远是薄纱状态 */
.site-header.is-stuck {
  background: var(--panel-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
}

.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 72px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
/* logo 原图是 132×132、四周一圈透明留白，实际图形只占 71%。
   现在换成本地裁好的 assets/logo-trim*.png，按高度给尺寸，图形才真变大 */
.brand-logo {
  height: 40px;
  width: auto;
  border-radius: 10px;
  flex: none;
  object-fit: contain;
}
.brand-text {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 导航：平时只有图标，鼠标移上去整块横向展开、底色从右边推进来，露出文字。
   展开只改自身宽度，左右两列是等宽的 1fr，所以品牌和开关不会跟着动 */
.nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  /* 一颗玻璃胶囊：半透明底 + 背景模糊（blur 在 17 节统一给），
     细描边 + 顶部高光 + 一点点自上而下的光泽，边缘才有玻璃的厚度感 */
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04) 58%, rgba(255, 255, 255, .07)), var(--panel);
  box-shadow: var(--shadow), var(--glass-top);
}
.nav a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 46px;
  border-radius: 999px;
  overflow: hidden;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: width .22s ease-in, color .22s ease-in;
}
.nav a::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 999px;
  background: var(--hover);
  transform: translateX(100%);
  transform-origin: center right;
  transition: transform .22s ease-in;
}
.nav-ico {
  position: absolute;
  left: 15px;
  display: inline-flex;
  flex: none;
}
.nav-ico .icon { width: 22px; height: 22px; }
.nav-title {
  display: block;
  width: 100%;
  text-align: center;
  text-indent: 27px;
  font-size: 17px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(100%);
  transform-origin: center right;
  transition: transform .22s ease-in, opacity .22s ease-in;
}
.nav a:hover,
.nav a:focus-visible,
.nav a.is-active { width: 128px; color: var(--text); }
.nav a:hover::before,
.nav a:focus-visible::before,
.nav a.is-active::before { transform: translateX(0); }
.nav a:hover .nav-title,
.nav a:focus-visible .nav-title,
.nav a.is-active .nav-title { transform: translateX(0); opacity: 1; }
.nav a.is-active { color: var(--brand); }
.nav a.is-active::before { background: var(--brand-soft); }
.nav a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.header-tools { justify-self: end; display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0 9px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------- 5. 按钮 / 标签 --------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s ease, color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn:hover { border-color: var(--brand-line); color: var(--brand); }
.btn .icon { width: 1.1em; height: 1.1em; }

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(43, 92, 240, .85);
}
.btn.primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn.tiny { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: none; }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; filter: brightness(1.08); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--hover);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.chip:hover { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-line); }
.chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chip.is-on:hover { color: #fff; }
.chip em { font-style: normal; opacity: .72; font-size: 11.5px; }
.chip.is-on em { opacity: .88; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
}

/* ------------------------------- 6. Hero ------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0 94px;
  text-align: center;
}
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 430px at 20% 2%, rgba(43, 92, 240, .22), transparent 70%),
    radial-gradient(560px 400px at 80% -6%, rgba(14, 165, 233, .18), transparent 70%);
}
html[data-theme="dark"] .hero-glow {
  background:
    radial-gradient(620px 430px at 20% 2%, rgba(92, 132, 255, .28), transparent 70%),
    radial-gradient(560px 400px at 80% -6%, rgba(56, 189, 248, .22), transparent 70%);
}
.hero-inner { position: relative; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}
.hero-badge .icon { width: 15px; height: 15px; }

.hero h1 {
  margin: 22px 0 0;
  font-size: 40px;
  font-size: clamp(30px, 5.2vw, 52px);
  line-height: 1.16;
  letter-spacing: -.025em;
}
.grad { color: var(--brand); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad {
    background: linear-gradient(100deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.hero-sub {
  max-width: 580px;
  margin: 16px auto 0;
  font-size: 15.5px;
  font-size: clamp(14px, 1.6vw, 16.5px);
  color: var(--muted);
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 620px;
  margin: 28px auto 0;
  padding: 7px 7px 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  transition: border-color .18s ease;
}
.hero-search:focus-within { border-color: var(--brand-line); }
.hero-search-icon { display: inline-flex; color: var(--muted); }
.hero-search-icon .icon { width: 19px; height: 19px; }
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: 0;
  padding: 8px 0;
  font: inherit;
  font-size: 15px;
  color: var(--text);
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search .btn { border-radius: 999px; padding: 11px 22px; }

.hero-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 13.5px;
}

/* ------------------------------ 7. 统计卡 ------------------------------ */
.stats-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -54px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.stat-card strong { font-size: 25px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.stat-card .muted { font-size: 13.2px; }
.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}
.stat-icon .icon { width: 20px; height: 20px; }

/* 分类配色（深浅色各一套，通过 --tone-rgb 切换） */
.tone-blue   { --tone-rgb: 43, 50, 240; }
.tone-violet { --tone-rgb: 99, 102, 241; }
.tone-teal   { --tone-rgb: 13, 148, 136; }
.tone-amber  { --tone-rgb: 217, 119, 6; }
.tone-pink   { --tone-rgb: 219, 39, 119; }
.tone-slate  { --tone-rgb: 100, 116, 139; }
html[data-theme="dark"] .tone-blue   { --tone-rgb: 124, 138, 255; }
html[data-theme="dark"] .tone-violet { --tone-rgb: 167, 139, 250; }
html[data-theme="dark"] .tone-teal   { --tone-rgb: 45, 212, 191; }
html[data-theme="dark"] .tone-amber  { --tone-rgb: 251, 191, 36; }
html[data-theme="dark"] .tone-pink   { --tone-rgb: 244, 114, 182; }
html[data-theme="dark"] .tone-slate  { --tone-rgb: 148, 163, 184; }

.stat-icon[class*="tone-"] { color: rgb(var(--tone-rgb)); background: rgba(var(--tone-rgb), .12); }

/* ---------------------------- 8. 资源卡片 ---------------------------- */
.res-list { display: flex; flex-direction: column; gap: 12px; }

.res-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.res-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-lg);
}

.res-tile {
  width: 62px;
  height: 62px;
  flex: none;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: rgb(var(--tone-rgb));
  background: rgba(var(--tone-rgb), .12);
}
.res-tile-ext { font-size: 14px; font-weight: 800; letter-spacing: .01em; line-height: 1.1; }
.res-tile-kind { font-size: 10px; line-height: 1.1; opacity: .85; }

.res-body { flex: 1 1 auto; min-width: 0; }
.res-title { margin: 0 0 5px; font-size: 16.5px; letter-spacing: -.01em; }
.res-title a { color: inherit; text-decoration: none; transition: color .15s ease; }
.res-title a:hover { color: var(--brand); }
.res-desc {
  margin: 0 0 9px;
  font-size: 13.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.res-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; }
.res-meta .chip { padding: 4px 10px; font-size: 12px; }
.meta-item { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.meta-item .icon { width: 14px; height: 14px; }
.res-action { flex: none; }

/* ---------------------- 9. 页头 / 筛选 / 分页 ---------------------- */
.page-hero {
  position: relative;
  padding: 38px 0 28px;
  /* 只留两团品牌色光晕，不铺底色面板：否则页头会出现一条生硬的横带边 */
  background:
    radial-gradient(720px 320px at 10% 0%, rgba(43, 92, 240, .12), transparent 70%),
    radial-gradient(620px 300px at 88% 12%, rgba(14, 165, 233, .10), transparent 70%);
}
.page-hero h1 { margin: 0 0 7px; font-size: 28px; font-size: clamp(23px, 3.2vw, 32px); letter-spacing: -.02em; }
.page-hero p { margin: 0; font-size: 14.5px; }
.page-hero .hero-search { margin: 20px 0 0; max-width: 580px; box-shadow: var(--shadow); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  padding: 15px 17px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.filter-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 2px; }

.result-line { margin: 0 0 16px; font-size: 13.5px; color: var(--muted); }
.result-line strong { color: var(--text); }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 26px 0 6px; }
.pager-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.pager-btn:hover { color: var(--brand); border-color: var(--brand-line); }
.pager-btn.is-on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager-btn.is-on:hover { color: #fff; }

/* ------------------------------ 10. 分类 ------------------------------ */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.cat-grid-lg { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px; }

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--brand-line); box-shadow: var(--shadow-lg); }
.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 7px;
  background: var(--brand-soft);
  color: var(--brand);
}
.cat-icon .icon { width: 20px; height: 20px; }
.cat-icon-lg { width: 46px; height: 46px; border-radius: 14px; }
.cat-icon-lg .icon { width: 23px; height: 23px; }
.cat-card strong { font-size: 15.5px; }
.cat-card-lg .cat-name { font-size: 17px; }
.cat-card .muted { font-size: 13px; }
.cat-count { font-size: 13px; font-weight: 600; color: var(--brand); }
.cat-latest {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}
.cat-go .icon { width: 15px; height: 15px; transition: transform .18s ease; }
.cat-card:hover .cat-go .icon { transform: translateX(3px); }

/* ---------------------- 11. 步骤 / FAQ / CTA ---------------------- */
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 16px; }
.step-card {
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.step-num { display: block; font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--brand); opacity: .3; }
.step-card h3 { margin: 12px 0 6px; font-size: 16.5px; }
.step-card p { margin: 0; font-size: 13.5px; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  transition: border-color .18s ease;
}
.faq-item[open] { border-color: var(--brand-line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { display: inline-flex; flex: none; color: var(--muted); }
.faq-mark .icon { width: 17px; height: 17px; transition: transform .2s ease; }
.faq-item[open] .faq-mark { color: var(--brand); }
.faq-item[open] .faq-mark .icon { transform: rotate(90deg); }
.faq-body { padding: 0 18px 16px; font-size: 14px; line-height: 1.8; color: var(--muted); }

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 26px 28px;
  border-radius: 20px;
  border: 1px solid var(--brand-line);
  background: linear-gradient(120deg, rgba(43, 92, 240, .14), rgba(14, 165, 233, .12));
}
.cta-card h2 { margin: 0 0 5px; font-size: 20px; }
.cta-card p { margin: 0; font-size: 14px; }

.prose-card {
  padding: 30px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.prose-card h2 { margin: 0 0 14px; font-size: 20px; }
.prose-card p { margin: 0 0 13px; font-size: 14.5px; line-height: 1.85; color: var(--muted); }
.prose-card p:last-child { margin-bottom: 0; }

/* ---------------------- 12. 特色 / 联系 ---------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 16px; }
.feature-card {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--brand-line); }
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  background: var(--brand-soft);
  color: var(--brand);
}
.feature-icon .icon { width: 21px; height: 21px; }
.feature-card h3 { margin: 0 0 6px; font-size: 16px; }
.feature-card p { margin: 0; font-size: 13.5px; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.contact-card:hover { transform: translateY(-3px); border-color: var(--brand-line); box-shadow: var(--shadow-lg); }
.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
  background: var(--brand-soft);
  color: var(--brand);
}
.contact-icon .icon { width: 21px; height: 21px; }
.contact-card strong { font-size: 15.5px; }
.contact-card .muted { font-size: 13.2px; word-break: break-all; }

/* ---------------------- 13. 空状态 / 提示条 ---------------------- */
.empty-state {
  padding: 52px 24px;
  text-align: center;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: var(--panel);
}
.empty-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.empty-icon .icon { width: 26px; height: 26px; }
.empty-state h3 { margin: 0 0 6px; font-size: 17px; }
.empty-state p { margin: 0 0 16px; font-size: 14px; }
.empty-state > :last-child { margin-bottom: 0; }

.flash-wrap { padding-top: 18px; }
.alert {
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
}
.alert.ok { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .30); color: #0b7a58; }
.alert.error { background: rgba(224, 69, 62, .11); border-color: rgba(224, 69, 62, .30); color: #b3261e; }
html[data-theme="dark"] .alert.ok { color: #6ee7b7; }
html[data-theme="dark"] .alert.error { color: #fca5a5; }

/* ------------------------------ 14. 页脚 ------------------------------ */
.site-footer { margin-top: 62px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 26px;
  padding-top: 42px;
  padding-bottom: 34px;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-logo { width: 40px; height: 40px; border-radius: 11px; object-fit: contain; }
.footer-brand strong { font-size: 16px; }
.footer-brand p { margin: 0; font-size: 13.5px; max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h4 { margin: 0 0 2px; font-size: 14px; font-weight: 700; }
.footer-col a { font-size: 13.5px; color: var(--muted); text-decoration: none; transition: color .15s ease; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--brand); }

/* --------------------------- 15. 表单 / 后台 --------------------------- */
.panel {
  padding: 22px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.panel h1 { margin: 0 0 16px; font-size: 20px; }
.panel h2 { margin: 0 0 12px; font-size: 17px; }
.panel.empty { padding: 44px 22px; text-align: center; }
.panel.form-panel { max-width: 780px; }
.panel.table-wrap { padding: 0; overflow-x: auto; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.stat-num { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.toolbar .search { display: flex; gap: 8px; flex: 1 1 260px; max-width: 440px; }
.toolbar .search input { flex: 1; min-width: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table th { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--hover); }
.table .actions { white-space: nowrap; }
.table .actions form { display: inline; margin: 0; }

label { display: block; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); }

.form-panel input:not([type="checkbox"]):not([type="file"]):not([type="radio"]),
.form-panel select,
.form-panel textarea,
.login-box input:not([type="checkbox"]),
.inline-form input:not([type="checkbox"]),
.toolbar .search input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.toolbar .search input { margin-top: 0; }
.inline-form input { margin-top: 0; }
.form-panel input:focus, .form-panel select:focus, .form-panel textarea:focus,
.login-box input:focus, .inline-form input:focus, .toolbar .search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-panel textarea { resize: vertical; min-height: 96px; }
.form-panel input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  background: var(--field);
  color: var(--muted);
  font-size: 13.5px;
}
.form-panel .btn, .login-box .btn { margin-top: 4px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); }
.check input { margin: 0; width: 16px; height: 16px; accent-color: var(--brand); }
.req { color: var(--danger); font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inline-form input { flex: 1 1 180px; }
.inline-form .narrow { flex: 0 0 100px; }
.panel .narrow { max-width: 120px; }

.login-box {
  max-width: 400px;
  margin: 52px auto;
  padding: 32px 30px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}
.login-box h1 { margin: 0 0 18px; font-size: 21px; text-align: center; }
.login-box form { display: flex; flex-direction: column; }
.login-box .btn { padding: 12px; }
.login-box p { margin: 16px 0 0; }

/* --------------------------- 16. 响应式 --------------------------- */
@media (max-width: 940px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); margin-top: -40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  /* 导航改成绝对定位后就不占格子了，顶栏得收回两列，否则开关会掉到正中间 */
  .header-inner { grid-template-columns: 1fr auto; height: 64px; }

  /* 窄屏收起成汉堡菜单，展开动画关掉、文字直接显示 */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    min-width: 0;
    padding: 10px 14px 16px;
    background: var(--panel);
    box-shadow: var(--shadow-lg);
    border: 0;
    border-radius: 0 0 22px 22px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a {
    width: auto;
    height: auto;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    overflow: visible;
  }
  .nav a::before { display: none; }
  .nav-ico { position: static; }
  .nav-title {
    width: auto;
    text-indent: 0;
    opacity: 1;
    transform: none;
    font-size: 16.5px;
  }
  .nav a,
  .nav a.is-active { color: var(--text); }
  .nav a.is-active { color: var(--brand); }
}

@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .header-inner { height: 60px; }
  .brand-text { font-size: 18px; }

  .hero { padding: 44px 0 76px; }
  .hero h1 { margin-top: 18px; }
  .hero-search { flex-wrap: wrap; padding: 12px; border-radius: 18px; }
  .hero-search input { flex: 1 1 100%; padding: 4px 6px; }
  .hero-search .btn { flex: 1 1 100%; }
  .hero-search-icon { display: none; }

  .section { padding-top: 34px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .page-hero { padding: 26px 0 20px; }

  .res-card { flex-wrap: wrap; gap: 13px; padding: 14px; }
  .res-tile { width: 52px; height: 52px; border-radius: 13px; }
  .res-tile-ext { font-size: 12.5px; }
  .res-tile-kind { font-size: 9px; }
  .res-body { flex: 1 1 160px; }
  .res-action { width: 100%; }
  .res-action .btn { width: 100%; }

  .row { grid-template-columns: 1fr; }
  .stats-row { gap: 12px; }
  .stat-card { padding: 15px; }
  .stat-card strong { font-size: 21px; }
  .cta-card { padding: 22px; }
  .prose-card { padding: 22px; }
  .panel { padding: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-brand p { max-width: none; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; margin-top: -32px; }
  .stats { grid-template-columns: 1fr; }
  .res-tile { width: 46px; height: 46px; }
  .res-tile-kind { display: none; }
}

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

/* --------------------------- 16. 极简首页 / 一行页脚 --------------------------- */
.hero-lite { padding: 54px 0 40px; }
.hero-lite-inner { text-align: center; }
.hero-lite h1 {
  margin: 0;
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.hero-lite .hero-sub { margin-top: 12px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}
.btn.lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.btn.lg .icon { width: 1.15em; height: 1.15em; }
.home-note {
  margin: 0;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
  font-size: 14px;
}
.site-footer.slim { margin-top: 46px; }
.footer-slim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0 22px;
  font-size: 13px;
  color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
.footer-links a:hover { color: var(--brand); }


/* ==========================================================================
   17. 毛玻璃主题：全站背景图 + 半透明玻璃面板
   ========================================================================== */

:root {
  /* GTA6 官网那套暗靛蓝，浅色模式是它的亮色对照 */
  --bg-base: #e8ebf8;
  --panel: rgba(255, 255, 255, .60);
  --panel-2: rgba(255, 255, 255, .46);
  --panel-strong: rgba(255, 255, 255, .82);
  --field: rgba(255, 255, 255, .58);
  --hover: rgba(255, 255, 255, .82);
  --line: rgba(20, 24, 64, .10);
  --header-bg: linear-gradient(180deg, rgba(244, 246, 254, .92), rgba(244, 246, 254, .60) 52%, rgba(244, 246, 254, .22) 78%, rgba(244, 246, 254, 0));
  --footer-bg: rgba(255, 255, 255, .44);
  --glass-blur: blur(22px) saturate(180%);
  --holo-rgb: 43, 92, 240;
  --holo-rgb-2: 14, 165, 233;
  --glass-top: inset 0 1px 0 rgba(255, 255, 255, .7);
  --shadow: 0 1px 2px rgba(23, 28, 64, .05), 0 10px 30px -18px rgba(23, 28, 64, .45);
  --shadow-lg: 0 2px 6px rgba(23, 28, 64, .06), 0 26px 60px -26px rgba(23, 28, 64, .6);
  /* 全站背景就是这一条自上而下的渐变（和 GTA6 官网同一种结构）：
     想换成自己的背景图，把图片存成 assets/bg.jpg，
     然后在最后补一行  url("../assets/bg.jpg") 就行 */
  --bg-image: linear-gradient(180deg, #f4f6fe 0%, #e6eaf9 46%, #d8dcf1 100%);
}

html[data-theme="dark"] {
  /* 取自 https://www.rockstargames.com/VI 的实测采样：
     顶部 #1a1a30 → 底部 #0d0e1d，纯暗靛蓝，没有彩色光晕 */
  --bg-base: #0d0e1d;
  --panel: rgba(30, 30, 56, .50);
  --panel-2: rgba(34, 34, 62, .42);
  --panel-strong: rgba(20, 20, 40, .80);
  --field: rgba(34, 34, 62, .48);
  --hover: rgba(54, 54, 96, .55);
  --line: rgba(255, 255, 255, .09);
  --header-bg: linear-gradient(180deg, rgba(28, 28, 51, .90), rgba(28, 28, 51, .58) 52%, rgba(28, 28, 51, .20) 78%, rgba(28, 28, 51, 0));
  --footer-bg: rgba(11, 12, 24, .42);
  --glass-top: inset 0 1px 0 rgba(255, 255, 255, .07);
  --glass-blur: blur(22px) saturate(180%);
  --holo-rgb: 124, 156, 255;
  --holo-rgb-2: 56, 189, 248;
  --text: #ffffff;
  --muted: #a5a9c6;
  --bg-image: linear-gradient(180deg, #1c1c33 0%, #17172c 30%, #121328 58%, #0f1021 78%, #0d0e1d 100%);
}

/* 横向不出现滚动条：首页封面 3D 摆动 + 外圈辉光会探出视口，
   在根元素上挡掉，比在 .home-hero 上用 overflow:hidden 好 ——
   后者会把辉光切出一道直边 */
html { background: var(--bg-base); overflow-x: hidden; }
body { background: transparent; }

/* 全站背景：纯渐变，固定不随滚动 */
.bg-photo {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 所有面板都走同一套玻璃。
   顶栏和页脚不在这里：它们要的是"没有边界的渐变"，加了 blur 反而会浮出一道模糊色带 */
.nav-toggle,
.btn,
.res-card,
.page-hero,
.filter-bar,
.pager-btn,
.cat-card,
.step-card,
.faq-item,
.cta-card,
.prose-card,
.feature-card,
.contact-card,
.empty-state,
.alert,
.panel,
.stat,
.toolbar,
.login-box,
.home-note,
.nf-box,
.nav {
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

/* 顶部高光边，玻璃的关键细节 */
.res-card,
.cat-card,
.step-card,
.feature-card,
.contact-card,
.prose-card,
.faq-item,
.panel,
.stat,
.empty-state,
.home-note,
.nf-box,
.filter-bar,
.cta-card {
  box-shadow: var(--shadow), var(--glass-top);
}

.site-header { background: var(--header-bg); }
.nav-toggle { background: var(--panel-strong); }

/* 页头与 CTA 保留品牌色，但要透出背景 */
.page-hero {
  background: radial-gradient(760px 340px at 12% 0%, rgba(var(--holo-rgb), .16), transparent 72%);
}
.cta-card {
  background: linear-gradient(120deg, rgba(var(--holo-rgb), .16), rgba(var(--holo-rgb-2), .10)), var(--panel);
  box-shadow: var(--shadow-lg), var(--glass-top);
}

/* 折叠菜单也要是玻璃 */
.nav.open, .nav {
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

/* ---------------------------- 首页首屏 ---------------------------- */
/* 标题和封面收在同一张玻璃卡里，看着是一个整体 */
/* 首页不加玻璃卡：封面和按钮直接浮在背景光束上，视觉噪音最小 */
.home-hero {
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0;
  margin: 36px auto 0;
  padding: 0;
  text-align: center;
  /* 封面 3D 摆动时包围盒会稍微探出去，裁掉免得窄屏出现横向滚动条 */
  overflow: hidden;
}

/* 封面放中间（见第 19 节）；width:100% 是为了让里面的 860px 能撑开 */
.home-hero .holo-poster { width: 100%; margin: 38px 0 0; }
/* .home-hero 是 justify-items:center 的 grid，按钮行得自己撑满整卡宽，
   否则窄屏上会被压成内容宽度 */
.home-hero .hero-actions {
  width: 100%;
  margin-top: 30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

@media (max-width: 900px) {
  .home-hero {
    margin-top: 22px;
    padding: 0;
  }
  .home-hero .holo-poster { margin-top: 20px; }
  .home-hero .hero-actions { margin-top: 24px; }
}

/* 不让模糊面板在低端设备上卡顿 */
@media (prefers-reduced-motion: reduce) {
  .bg-photo { background-attachment: scroll; }
}

/* ==========================================================================
   18. 教程页：蓝青配色 + 子页面分页
   ========================================================================== */

.navkey-tutorial {
  --tut-a: #2b5cf0;
  --tut-b: #0ea5e9;
  --tut-grad: linear-gradient(135deg, #3b7bf5, #1fa8e8);
  --tut-soft: rgba(43, 92, 240, .10);
}
html[data-theme="dark"] .navkey-tutorial {
  --tut-a: #7c9cff;
  --tut-b: #38bdf8;
  --tut-grad: linear-gradient(135deg, #7c9cff, #38bdf8);
  --tut-soft: rgba(124, 156, 255, .14);
}

/* 子页面切换：胶囊分页条 */
.tut-nav {
  position: sticky;
  top: 74px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 20px 0 4px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow), var(--glass-top);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.tut-nav::-webkit-scrollbar { display: none; }
.tut-nav a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 17px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.tut-nav a:hover { background: var(--hover); color: var(--brand); }
.tut-nav a.is-on {
  color: #fff;
  background: var(--tut-grad);
  border-color: rgba(255, 255, 255, .5);
  box-shadow: 0 6px 18px -6px rgba(43, 92, 240, .7);
}

/* 章节卡片 */
.tut-card {
  padding: 24px 26px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow), var(--glass-top);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.tut-card + .tut-card { margin-top: 16px; }

.tut-sec { display: flex; align-items: baseline; gap: 13px; margin-bottom: 2px; }
.tut-sec .no {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--tut-a);
}
.tut-sec h2 { margin: 0; font-size: 22px; letter-spacing: .5px; }
.tut-cap {
  margin: 6px 0 16px;
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

/* 重要建议条 */
.tut-tip {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 20px 24px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(43, 92, 240, .16), rgba(14, 165, 233, .14)), var(--panel);
  box-shadow: var(--shadow-lg), var(--glass-top);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.tut-tip::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--tut-grad);
}
.tut-tip .rico {
  flex: none;
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: Consolas, monospace;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: var(--tut-grad);
  box-shadow: 0 10px 24px -10px rgba(43, 92, 240, .8);
}
.tut-tip .rbadge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #0a1442;
  background: linear-gradient(135deg, #a9c8ff, #4f9bff);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 9px;
}
html[data-theme="dark"] .tut-tip .rbadge { color: #0b0620; }
.tut-tip .rtitle { font-size: 18px; font-weight: 800; letter-spacing: .3px; }
.tut-tip p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.85; color: var(--muted); }
.tut-tip .hl { color: var(--tut-a); font-weight: 800; }

/* 教程目录：一块玻璃面板里竖排两行，行间用细线分开，比两张小卡片好扫 */
.tut-index {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .30), rgba(255, 255, 255, .06) 52%, rgba(255, 255, 255, 0));
  box-shadow: var(--shadow), var(--glass-top);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  overflow: hidden;
}
html[data-theme="dark"] .tut-index {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02) 52%, rgba(255, 255, 255, 0));
}
.tut-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  color: inherit;
  text-decoration: none;
  transition: background .2s ease;
}
.tut-row + .tut-row { border-top: 1px solid var(--line); }
.tut-row:hover { background: var(--hover); }
.tut-row .ico {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--tut-grad);
  box-shadow: 0 10px 22px -10px rgba(43, 92, 240, .8);
}
.tut-row .ico .icon { width: 22px; height: 22px; }
.tut-row .tx { min-width: 0; }
.tut-row .tx b { display: block; font-size: 16px; font-weight: 700; }
.tut-row .tx small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.tut-row .arr {
  margin-left: auto;
  flex: none;
  color: var(--tut-b);
  font-size: 20px;
  font-family: Consolas, monospace;
  transition: transform .2s ease;
}
.tut-row:hover .arr { transform: translateX(3px); }
@media (max-width: 680px) {
  .tut-row { padding: 16px; gap: 13px; }
  .tut-row .ico { width: 40px; height: 40px; border-radius: 12px; }
  .tut-row .tx b { font-size: 15px; }
}

/* 视频入口 */
.tut-video {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.tut-video:hover { border-color: var(--brand-line); }
.tut-video .play {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #fff;
  padding-left: 3px;
  background: linear-gradient(135deg, #5b8dff, #0ea5e9);
}
.tut-video b { display: block; font-size: 14px; }
.tut-video i { font-style: normal; display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.tut-video .go { margin-left: auto; color: var(--tut-b); font-size: 18px; }

/* 三小步 */
.tut-steps {
  display: grid;
  grid-template-columns: 1fr 46px 1fr 46px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 18px;
}
.tut-steps .conn { margin-top: 26px; border-top: 2px dashed var(--tut-a); opacity: .45; }
.tut-steps .st {
  text-align: center;
  padding: 16px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.tut-steps .st .num {
  width: 30px; height: 30px;
  margin: 0 auto 9px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: var(--tut-grad);
}
.tut-steps .st b { display: block; font-size: 14px; }
.tut-steps .st p { margin: 6px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
@media (max-width: 820px) {
  .tut-steps { grid-template-columns: 1fr; gap: 8px; }
  .tut-steps .conn { display: none; }
}

/* 编号步骤 */
.tut-vs {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 17px 2px;
  border-bottom: 1px solid var(--line);
}
.tut-vs:last-child { border-bottom: 0; padding-bottom: 2px; }
.tut-vs .n {
  flex: none;
  min-width: 62px;
  padding-top: 2px;
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--tut-a);
}
.tut-vs b { display: block; font-size: 15px; }
.tut-vs p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.8; color: var(--muted); }
.tut-vs p b { display: inline; font-size: inherit; color: var(--text); }

.tut-cmd {
  display: inline-block;
  margin-top: 9px;
  padding: 9px 16px;
  border-radius: 10px;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #04241a;
  background: linear-gradient(135deg, #8ef7b0, #4ddb8c);
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 8px 18px -10px rgba(60, 220, 150, .8);
}

/* 截图 */
.tut-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 4px; }
.tut-shots figure {
  margin: 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.tut-shots img { display: block; width: 100%; height: auto; }
.tut-shots figcaption {
  position: absolute;
  left: 10px; bottom: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: Consolas, monospace;
  font-size: 11px;
  letter-spacing: 1.4px;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
@media (max-width: 820px) { .tut-shots { grid-template-columns: 1fr; } }

/* 按键速查 */
.tut-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.tut-tools .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tut-tools button {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.tut-tools button:hover { border-color: var(--brand-line); color: var(--brand); }
.tut-tools button.on { color: #fff; background: var(--tut-grad); border-color: transparent; }
.tut-tools .search {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
}
.tut-tools .search input {
  width: 160px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--text);
}
@media (max-width: 680px) {
  .tut-tools .search { margin-left: 0; width: 100%; }
  .tut-tools .search input { width: 100%; }
}

.tut-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.tut-kh {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 2px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tut-a);
}
.tut-kh:first-child { margin-top: 0; }
.tut-kh::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--tut-a), transparent); opacity: .5; }
.kitem {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}
.kitem.hide { display: none; }
.kitem .key {
  flex: none;
  min-width: 116px;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--tut-a);
}
.kitem .kn { font-size: 13.5px; }
@media (max-width: 760px) {
  .tut-keys { grid-template-columns: 1fr; }
  .kitem .key { min-width: 96px; font-size: 12px; }
}

/* 教程内上一页 / 下一页 */
.tut-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.tut-pager a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow), var(--glass-top);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: transform .18s ease, border-color .18s ease;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.tut-pager a:hover { transform: translateY(-2px); border-color: var(--brand-line); color: var(--brand); }
.tut-pager a .k { font-size: 12px; color: var(--muted); }

/* 内容不满一屏时，页脚贴在底部而不是浮在中间 */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1 0 auto; }

/* ==========================================================================
   19. 3D 全息海报（封面图）
   思路来自 Uiverse.io by Thomas-Cabrit 的 card-6：
   多层 Z 轴错位 + 3D 摆动 + 全息光泽，这里是拿封面图当主体
   ========================================================================== */

.holo-poster {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1100px;
  padding: 10px 12px;
  /* 只是展示用的封面：不能点，鼠标放上去也没有任何反应 */
  cursor: default;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.holo-poster__stage {
  display: block;
  position: relative;
  width: 860px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  transform-style: preserve-3d;
  animation: holo-poster-wobble 7.4s ease-in-out infinite;
}

@keyframes holo-poster-wobble {
  0%   { transform: rotateX(7.5deg) rotateY(-11deg); }
  50%  { transform: rotateX(10deg) rotateY(10deg); }
  100% { transform: rotateX(7.5deg) rotateY(-11deg); }
}

/* 后两层是同一张图的错位残影，负责全息的「厚度」 */
.holo-poster__layer {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transform-style: preserve-3d;
}

/* 残影只负责「厚度」：四周渐隐，别在卡片边上露出直角框 */
.holo-poster__layer--back,
.holo-poster__layer--mid {
  -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000 34%, rgba(0, 0, 0, .7) 66%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(50% 50% at 50% 50%, #000 34%, rgba(0, 0, 0, .7) 66%, rgba(0, 0, 0, 0) 100%);
}

.holo-poster__layer--back {
  opacity: .52;
  filter: blur(11px) saturate(1.75) brightness(1.14);
  transform: translate3d(-26px, 20px, -122px);
}

.holo-poster__layer--mid {
  opacity: .72;
  filter: blur(4.5px) saturate(1.4) brightness(1.06);
  transform: translate3d(-12px, 9px, -56px);
}

/* 正面：边缘高光 + 投影，像一块真的玻璃全息卡 */
.holo-poster__layer--front {
  border: 1px solid rgba(255, 255, 255, .38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -1px 0 rgba(255, 255, 255, .12),
    0 30px 64px -24px rgba(8, 12, 36, .8),
    0 0 0 1px rgba(var(--holo-rgb), .18);
}

/* 背后一团辉光 */
.holo-poster__stage::before {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 32px;
  background: radial-gradient(circle at 42% 38%, rgba(var(--holo-rgb), .46), rgba(0, 0, 0, 0) 68%);
  filter: blur(30px);
  transform: translateZ(-140px);
}

/* 全息扫光 + 品牌色镀膜 */
.holo-poster__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  background:
    linear-gradient(112deg,
      rgba(255, 255, 255, 0) 36%,
      rgba(255, 255, 255, .5) 50%,
      rgba(255, 255, 255, 0) 64%) 130% 0 / 250% 100% no-repeat,
    linear-gradient(115deg,
      rgba(255, 255, 255, .28) 0%,
      rgba(255, 255, 255, 0) 32%,
      rgba(255, 255, 255, 0) 60%,
      rgba(255, 255, 255, .14) 100%),
    linear-gradient(90deg,
      rgba(var(--holo-rgb), .26),
      rgba(var(--holo-rgb-2), .2));
  mix-blend-mode: screen;
  transform: translateZ(2px);
  opacity: .85;
  animation: holo-sheen 5.8s ease-in-out infinite;
}

/* 全息卡那种来回扫的高光 */
@keyframes holo-sheen {
  0%, 100% { background-position: 130% 0, 0 0, 0 0; }
  50%      { background-position: -30% 0, 0 0, 0 0; }
}

@media (max-width: 900px) {
  .holo-poster__stage { width: 640px; }
}

@media (max-width: 600px) {
  .holo-poster__layer--back { filter: blur(6px) saturate(1.5); transform: translate3d(-14px, 11px, -84px); }
  .holo-poster__layer--mid  { transform: translate3d(-6px, 5px, -38px); }
}

@media (prefers-reduced-motion: reduce) {
  .holo-poster__stage {
    animation: none !important;
    transform: rotateX(6deg) rotateY(-7deg);
  }
  .holo-poster__stage::after { animation: none !important; }
}

/* ==========================================================================
   20. 首页主按钮（霓虹管）
   —— 单个按钮：点了先进整合包介绍页（pack.php），网盘地址放在那一页。
   —— 做法参考 Uiverse 那个霓虹按钮：深底 + 亮色描边，内外三层发光，
      按钮下方还有一团模糊的光晕；悬停时底色和光色互换。
      颜色换成站内的蓝系（不用原稿的紫），见 21 节里的 --cta-* 变量。
   ========================================================================== */

/* 没开 JS 时藏掉带动画的主按钮，露出普通链接兜底 */
.js-off { display: none; }

/* 只给读屏和搜索引擎看 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.pack-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 320px;
  padding: 18px 38px;
  border: 2px solid var(--cta-glow);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  color: var(--cta-glow);
  background-color: var(--cta-fill);
  isolation: isolate;
  text-shadow: 0 0 .5em var(--cta-glow);
  box-shadow:
    0 0 .9em .15em var(--cta-glow),
    0 0 2.8em .6em var(--cta-glow-spread),
    inset 0 0 .7em .18em var(--cta-glow);
  transition: color .3s ease, background-color .3s ease, border-color .3s ease,
              box-shadow .3s ease, text-shadow .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.pack-btn:focus-visible { outline: 2px solid var(--cta-glow); outline-offset: 4px; }

/* 按钮下方那团模糊的光晕（原稿用 ::after + 透视做的）。
   原稿的 perspective(1.5em) rotateX(35deg) 在这个尺寸下会把光晕横向放大两倍多；
   窄屏上按钮是满宽，光晕就顶出视口，整页能左右拖。
   改成不用透视的扁平椭圆，光晕收在按钮宽度以内，桌面观感基本不变。 */
.pack-btn::after {
  content: "";
  pointer-events: none;
  position: absolute;
  top: 108%;
  left: 14%;
  width: 72%;
  height: 64%;
  border-radius: 50%;
  background-color: var(--cta-glow-spread);
  filter: blur(1.2em);
  opacity: .6;
  transform: scaleY(.62);
  transform-origin: 50% 0;
  transition: background-color .3s ease;
}

/* 悬停：底色和光色互换，光晕再撑大一圈 */
.pack-btn:hover {
  color: var(--cta-fill);
  background-color: var(--cta-glow);
  text-shadow: none;
  box-shadow:
    0 0 .9em .2em var(--cta-glow),
    0 0 3.2em 1.3em var(--cta-glow-spread),
    inset 0 0 .7em .18em var(--cta-glow);
}
.pack-btn:active {
  box-shadow:
    0 0 .5em .2em var(--cta-glow),
    0 0 1.9em 1.1em var(--cta-glow-spread),
    inset 0 0 .5em .2em var(--cta-glow);
}

/* 进度填充：在管子里压一层暗色。
   按钮不能再用 overflow:hidden（会把下面那团光晕一起裁掉），
   所以圆角靠它自己的 border-radius 跟着按钮走 */
.pack-btn__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--cta-veil);
}
.pack-btn.is-busy .pack-btn__fill {
  width: 100%;
  transition: width var(--dl-t) cubic-bezier(.4, 0, .2, 1);
}

/* 图标不坐白色圆贴片，跟文字平起平坐 */
.pack-btn__ico {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
}
.pack-btn__ico .icon { width: 22px; height: 22px; stroke-width: 2.1; }
.pack-btn__tx { position: relative; }
.pack-btn__done { position: relative; display: none; align-items: center; gap: 8px; }
.pack-btn__done .icon { width: 20px; height: 20px; stroke-width: 2.5; }

/* 进度走完 → 变绿，只留「打开」：改两个变量就把整个光色换成绿 */
.pack-btn.is-ready {
  --cta-glow: var(--cta-ok);
  --cta-glow-spread: var(--cta-ok-spread);
}
.pack-btn.is-ready .pack-btn__ico,
.pack-btn.is-ready .pack-btn__tx { display: none; }
.pack-btn.is-ready .pack-btn__done { display: inline-flex; }
.pack-btn.is-ready .pack-btn__fill { display: none; }


@media (max-width: 620px) {
  .pack-btn { width: 100%; min-width: 0; padding: 16px 22px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
  .nav a,
  .nav a::before,
  .nav-title { transition: none; }
  .pack-btn,
  .pack-btn__fill { transition: none; }
  .pack-btn:hover { transform: none; }
  .pack-btn.is-busy .pack-btn__fill { width: 100%; }
}



/* ==========================================================================
   21. 主题层
   —— 配色：蓝白主色（字标同款渐变）
        蓝 #2B5CF0 ｜ 天蓝 #0EA5E9 ｜ 靛蓝 #4F6BFF
      背景：rockstargames.com/VI 实测
        顶部 #1A1A30 → 底部 #0D0E1D
   —— 字体：Noto Sans SC 可变字体（本地子集，100–900 全字重）
   —— 几何：大圆角收成硬朗的小圆角 + 细描边，贴近 GTA6 的块面感
   ========================================================================== */

/* ------------------- 字体 ------------------- */
@font-face {
  font-family: "Noto Sans SC";
  src: url("fonts/noto-sans-sc.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 大标题专用：山海自由黑（方形黑体，游戏感，仅拉丁子集 10KB） */
@font-face {
  font-family: "ShanHai Display";
  src: url("fonts/display.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  /* 大标题走山海自由黑，中文自动落回 Noto */
  --font-display: "ShanHai Display", "Noto Sans SC", "Segoe UI", sans-serif;

  /* 三个主色 + 字标那条渐变 */
  --acc-blue: #2b5cf0;
  --acc-sky: #0ea5e9;
  --acc-indigo: #4f6bff;
  --acc-grad: linear-gradient(100deg, #2b5cf0, #0ea5e9);
  --acc-grad-2: linear-gradient(100deg, #4f6bff, #2b5cf0);

  --grain: .030;
  --vignette: rgba(40, 42, 86, .16);

  /* 首页霓虹主按钮：--cta-glow 是管子的光色（描边 + 文字），
     --cta-fill 是管子里的底色，--cta-veil 是点下去那道进度遮罩。
     浅色页面里管子用「浅底 + 蓝光」：深色底在浅色页面上像挖了个黑洞，
     跟周围的浅色卡片不是一套东西。 */
  --cta-glow: #2f6bff;
  --cta-glow-spread: rgba(47, 107, 255, .38);
  --cta-fill: #eef4ff;
  --cta-veil: rgba(47, 107, 255, .20);
  --cta-ok: #0e9a6e;
  --cta-ok-spread: rgba(14, 154, 110, .38);
}

html[data-theme="dark"] {
  --grain: .045;
  --vignette: rgba(2, 3, 10, .58);

  /* 深色页面上光可以更亮，这也是这个按钮最好看的一档 */
  --cta-glow: #a9c6ff;
  --cta-glow-spread: rgba(88, 138, 255, .55);
  --cta-fill: #14205c;
  --cta-veil: rgba(8, 18, 60, .40);
  --cta-ok: #34d399;
  --cta-ok-spread: rgba(52, 211, 153, .45);
}

/* 浅色页面里的主按钮不能沿用深色那套霓虹：
   白管子外面套一圈饱和蓝光晕，贴在浅灰紫背景上像贴了张发光贴纸，
   跟周围柔和的底色不是一套东西。浅色改成玻璃片 —— 半透明白底 + 一条
   品牌蓝细描边 + 一枚很淡的投影，靠边线和阴影立住；悬停时灌满品牌渐变。
   深色模式一个字节都不动。 */
html:not([data-theme="dark"]) .pack-btn {
  --cta-glow: #3a63e8;
  --cta-fill: rgba(255, 255, 255, .78);
  --cta-veil: rgba(58, 99, 232, .16);
  /* 描边比字色淡一档：2px 实心饱和蓝在浅底上太吵，细一点才像页面上长出来的 */
  border-color: rgba(58, 99, 232, .62);
  background-color: var(--cta-fill);
  isolation: isolate;
  text-shadow: none;
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
  backdrop-filter: blur(12px) saturate(1.25);
  box-shadow:
    0 10px 26px rgba(26, 43, 108, .14),
    0 1px 0 rgba(255, 255, 255, .9) inset;
}
/* 按钮底下那团模糊光晕只在深色里好看，浅色里就是一块蓝印子 */
html:not([data-theme="dark"]) .pack-btn::after { display: none; }
html:not([data-theme="dark"]) .pack-btn:hover {
  color: #fff;
  background-image: var(--acc-grad);
  background-color: transparent;
  border-color: transparent;
  box-shadow: 0 14px 32px rgba(43, 92, 240, .26);
}
html:not([data-theme="dark"]) .pack-btn:active {
  box-shadow: 0 6px 16px rgba(43, 92, 240, .20);
}
/* 「打开」那一档要跟着变绿，得比上面那条规则更具体才盖得住（描边是自己写死的，得一起换） */
html:not([data-theme="dark"]) .pack-btn.is-ready {
  --cta-glow: var(--cta-ok);
  border-color: rgba(14, 154, 110, .62);
}

html, body, button, input, select, textarea, .btn, .chip, .tag { font-family: var(--font-sans); }

/* 大标题用展示字体，紧字距 = GTA6 那种压得很实的排版 */
.brand-text,
.page-hero h1,
.hero h1,
.cta-card h2 { font-family: var(--font-display); letter-spacing: -.01em; }

/* ------------------- 页面四周的氛围：背景光束 + 暗角 + 胶片颗粒 ------------------- */
/* 背景光束：整屏一层 WebGL canvas，画面由 assets/light-pillar.js 驱动
   （移植自 React Bits 的 LightPillar）。参数都在那个文件的 CFG 里 */
.bg-pillar {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* 光束的 alpha 由 shader 按亮度给（见 light-pillar.js），
     所以这里就是一层普通的叠加图层，不需要 mix-blend-mode。
     opacity 是总亮度总开关：铺满整屏的背景不用像原组件那样亮 */
  opacity: .6;
}
/* 浅色主题下 shader 会切成「白底 + 彩色染色」，再淡一点免得压过文字 */
html[data-theme="light"] .bg-pillar { opacity: .45; }

/* 暗角：四周压暗，视线聚到中间（要压在光束上面） */
.bg-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 18vw 4vw var(--vignette);
}

/* 胶片颗粒，GTA6 官网那种质感 */
.bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* ------------------- 几何：圆角收窄 ------------------- */
:root { --radius: 8px; --radius-sm: 5px; }

.res-tile { border-radius: 6px; }
.cat-icon, .cat-icon-lg, .feature-icon, .contact-icon { border-radius: 8px; }
.brand-logo, .footer-logo { border-radius: 6px; }
.nav-toggle { border-radius: 6px; }
.chip { border-radius: 4px; }
.tag { border-radius: 3px; }
.btn.small { border-radius: 5px; }
.btn.tiny { border-radius: 4px; }
.page-hero { padding: 28px 0 22px; }

/* ------------------- GTA6 的签名细节 ------------------- */

/* 分区标题下面一小截渐变短线 */
.section-head h2 { position: relative; padding-bottom: 10px; }
.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--acc-grad);
}

/* 主按钮 / 选中的筛选项 = 字标同款渐变 */
.btn.primary,
.chip.is-on {
  background: var(--acc-grad);
  border-color: transparent;
  color: #fff;
}
.btn.primary { box-shadow: 0 10px 24px -14px rgba(43, 92, 240, .95); }
.btn.primary:hover,
.chip.is-on:hover {
  background: var(--acc-grad);
  border-color: transparent;
  color: #fff;
  filter: brightness(1.09);
}

/* 资源卡 hover 左侧蹿出一条渐变条 */
.res-card { position: relative; overflow: hidden; }
.res-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--acc-grad);
  opacity: 0;
  transition: opacity .18s ease;
}
.res-card:hover::before { opacity: 1; }

/* 数字类用渐变文字，一眼就是 GTA6 */
.stat-num, .cat-count, .step-num, .res-tile-ext { }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .stat-num {
    background: var(--acc-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* ------------------- 首页：一屏放得下，不用滚动 ------------------- */
/* 顶栏和页脚之外的剩余空间全部留给首页，卡片在里头竖直居中 */
body.navkey-home .site-main { display: flex; flex-direction: column; justify-content: center; }
.home-hero {
  max-width: 1240px;
  margin: 10px auto 0;
  padding: 0 24px;
  /* 封面外圈那团辉光会探出这块区域。这里不能裁：
     一裁就会在卡片上方留下一条直边，看着像卡片上多出来一个框。
     横向溢出交给 html 上的 overflow-x 去挡（见 13 节上面的 html 规则） */
  overflow: visible;
}
.home-hero .holo-poster { margin: 16px 0 0; }
/* 高度按视口算：把标题 / 按钮 / 顶栏 / 页脚占掉的固定高度扣掉，剩下的全给封面，
   这样从 720 到 1080 高的屏幕都不用滚动。svh 是移动端才有的单位，放后面覆盖 */
.home-hero .holo-poster__stage {
  width: auto;
  height: min(620px, calc(100vh - 480px));
  height: clamp(220px, calc(100svh - 480px), 620px);
  aspect-ratio: 16 / 9;
}
.home-hero .hero-actions { margin-top: 30px; }
.site-footer.slim { margin-top: 10px; }
.footer-slim { padding: 8px 0 10px; }
.site-footer { margin-top: 30px; }

@media (max-width: 900px) {
  .home-hero { margin-top: 12px; padding: 0 16px; }
  .home-hero .holo-poster { margin-top: 16px; }
  .home-hero .holo-poster__stage {
    height: auto;
    width: min(680px, 100%);
  }
  .home-hero .hero-actions { margin-top: 22px; }
}


/* ==========================================================================
   22. 深浅色开关（cosmic toggle）
   思路来自 Uiverse.io by 3HugaDa3：轨道里是一片星空，圆球是日月；
   切到深色时星星亮起来、能量线流动、粒子往外爆。
   配色换成站内的蓝白，轨道两端标了日月，尺寸缩到能塞进顶栏。
   ========================================================================== */

.cosmic-toggle {
  position: relative;
  flex: none;
  display: block;
  width: 68px;
  height: 34px;
  margin-left: 2px;
  /* 全局 label 规则带了 margin-bottom:14px，会让它在弹性行里被顶高 7px */
  margin-bottom: 0;
  transform-style: preserve-3d;
  perspective: 500px;
}

.cosmic-toggle .toggle {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.cosmic-toggle .slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  overflow: hidden;
  border-radius: 17px;
  border: 1px solid rgba(96, 140, 255, .34);
  background: linear-gradient(45deg, #eaedfa, #d9def2);
  /* 常亮光晕：不管浅色深色，这个开关都要跳出来 */
  box-shadow:
    0 0 0 1px rgba(96, 140, 255, .18),
    0 0 18px -5px rgba(96, 140, 255, .52),
    0 0 34px -14px rgba(14, 165, 233, .42),
    0 4px 14px -8px rgba(10, 12, 30, .5);
  transition: background .5s ease, border-color .5s ease, box-shadow .5s ease, transform .4s ease;
  transform-style: preserve-3d;
}
.cosmic-toggle .toggle:focus-visible + .slider { outline: 2px solid var(--brand); outline-offset: 3px; }

/* 星空：浅色下几乎看不见，深色下亮起来 */
.cosmic-toggle .cosmos {
  position: absolute;
  inset: 0;
  opacity: .08;
  transition: opacity .5s ease;
  background-image:
    radial-gradient(1px 1px at 10% 15%, #fff 100%, transparent),
    radial-gradient(1px 1px at 24% 62%, #fff 100%, transparent),
    radial-gradient(2px 2px at 33% 28%, #fff 100%, transparent),
    radial-gradient(1px 1px at 44% 78%, #fff 100%, transparent),
    radial-gradient(2px 2px at 55% 40%, #fff 100%, transparent),
    radial-gradient(1px 1px at 66% 12%, #fff 100%, transparent),
    radial-gradient(2px 2px at 72% 68%, #fff 100%, transparent),
    radial-gradient(1px 1px at 84% 34%, #fff 100%, transparent),
    radial-gradient(1px 1px at 92% 82%, #fff 100%, transparent);
  background-size: 200% 200%;
}

/* 能量线 */
.cosmic-toggle .energy-lines { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.cosmic-toggle .energy-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  transform-origin: left;
  background: linear-gradient(90deg, transparent, rgba(140, 190, 255, .80), transparent);
}
.cosmic-toggle .energy-line:nth-child(1) { top: 22%; rotate: 15deg; }
.cosmic-toggle .energy-line:nth-child(2) { top: 50%; }
.cosmic-toggle .energy-line:nth-child(3) { top: 78%; rotate: -15deg; }

/* 粒子 */
.cosmic-toggle .particles { position: absolute; inset: 0; }
.cosmic-toggle .particle {
  position: absolute;
  bottom: 42%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7cb0ff;
  opacity: 0;
}
.cosmic-toggle .particle:nth-child(1) { left: 14%; --dx: -16px; --dy: -22px; animation-delay: 0s; }
.cosmic-toggle .particle:nth-child(2) { left: 30%; --dx: -8px;  --dy: -30px; animation-delay: .18s; }
.cosmic-toggle .particle:nth-child(3) { left: 50%; --dx: 2px;   --dy: -34px; animation-delay: .36s; }
.cosmic-toggle .particle:nth-child(4) { left: 68%; --dx: 12px;  --dy: -28px; animation-delay: .54s; }
.cosmic-toggle .particle:nth-child(5) { left: 84%; --dx: 20px;  --dy: -18px; animation-delay: .72s; }
.cosmic-toggle .particle:nth-child(6) { left: 42%; --dx: -1px;  --dy: -24px; animation-delay: .9s; }

/* 圆球（太阳 / 星球） */
.cosmic-toggle .toggle-orb {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 26px;
  height: 26px;
  z-index: 2;
  border-radius: 50%;
  background: linear-gradient(145deg, #a8c4ff, #3f6ef0);
  transition: transform .6s cubic-bezier(.68, -.55, .265, 1.55), background .5s ease;
  transform-style: preserve-3d;
}
.cosmic-toggle .inner-orb {
  position: absolute;
  inset: 3px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #e8e8ec);
  transition: background .5s ease, transform .5s ease;
}
.cosmic-toggle .inner-orb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(from 0deg, transparent 0deg, rgba(0, 0, 0, .09) 10deg, transparent 20deg);
  animation: cosmic-pattern-rotate 10s linear infinite;
}
.cosmic-toggle .ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid rgba(120, 122, 165, .18);
  transition: border-color .5s ease;
}

/* 轨道两端的静态日夜标识：一眼看出这个开关是干什么的。
   圆球滑到哪边就盖住哪边，露出来的那个就是「另一边」。 */
.cosmic-toggle .track-icon {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: -6.5px;
  color: rgba(45, 55, 110, .50);
  pointer-events: none;
  transition: color .5s ease;
}
.cosmic-toggle .track-icon--sun { left: 8px; }
.cosmic-toggle .track-icon--moon { right: 8px; }
/* svg 要是 inline-block，就会被 .icon 的 vertical-align:-.18em 按行框基线压下去，
   底下露出 7px，看着像掉到轨道底部；改成块级就正好填满居中的 span */
.cosmic-toggle .track-icon svg { display: block; width: 13px; height: 13px; stroke-width: 2.2; }

/* 圆球里画当前模式：浅色是太阳，深色是月亮 */
.cosmic-toggle .orb-icon {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #23408f;
  pointer-events: none;
  transition: opacity .35s ease, color .5s ease;
}
.cosmic-toggle .orb-icon svg { width: 15px; height: 15px; stroke-width: 2.2; }
.cosmic-toggle .orb-icon--moon { opacity: 0; }
.cosmic-toggle .toggle:checked + .slider .track-icon { color: rgba(178, 202, 255, .62); }
.cosmic-toggle .toggle:checked + .slider .orb-icon { color: #ffffff; }
.cosmic-toggle .toggle:checked + .slider .orb-icon--sun { opacity: 0; }
.cosmic-toggle .toggle:checked + .slider .orb-icon--moon { opacity: 1; }

/* ---------------------- 勾上 = 深色 ---------------------- */
.cosmic-toggle .toggle:checked + .slider {
  background: linear-gradient(45deg, #1c1c33, #0d0e1d);
  border-color: rgba(124, 156, 255, .45);
  box-shadow:
    0 0 0 1px rgba(124, 156, 255, .32),
    0 0 20px -5px rgba(124, 156, 255, .62),
    0 0 40px -14px rgba(56, 189, 248, .52),
    inset 0 0 16px rgba(255, 255, 255, .06);
}
.cosmic-toggle .toggle:checked + .slider .cosmos {
  opacity: .7;
  animation: cosmic-pan 24s linear infinite;
}
.cosmic-toggle .toggle:checked + .slider .toggle-orb {
  transform: translateX(34px) rotate(360deg);
  background: linear-gradient(145deg, #7c9cff, #38bdf8);
}
.cosmic-toggle .toggle:checked + .slider .inner-orb {
  background: linear-gradient(145deg, rgba(255, 255, 255, .30), rgba(255, 255, 255, .06));
  transform: scale(.88);
}
.cosmic-toggle .toggle:checked + .slider .ring {
  border-color: rgba(124, 156, 255, .45);
  animation: cosmic-ring 2s ease-in-out infinite;
}
.cosmic-toggle .toggle:checked + .slider .energy-lines { opacity: 1; }
.cosmic-toggle .toggle:checked + .slider .energy-line { animation: cosmic-energy 2.4s linear infinite; }
.cosmic-toggle .toggle:checked + .slider .particle { animation: cosmic-burst 1.1s ease-out infinite; }

@keyframes cosmic-pattern-rotate { to { transform: rotate(360deg); } }
@keyframes cosmic-pan { to { background-position: 200% 200%; } }
@keyframes cosmic-ring {
  0%, 100% { transform: scale(1); opacity: .35; }
  50%      { transform: scale(1.08); opacity: .7; }
}
@keyframes cosmic-energy {
  0%   { transform: scaleX(0); opacity: 0; }
  50%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0) translateX(100%); opacity: 0; }
}
@keyframes cosmic-burst {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx, 0), var(--dy, -24px)) scale(0); opacity: 0; }
}

/* ---------------------- 悬停 ---------------------- */
.cosmic-toggle .slider:hover .toggle-orb {
  filter: brightness(1.15);
  box-shadow: 0 0 12px rgba(56, 189, 248, .55), 0 0 22px rgba(124, 156, 255, .38);
}
.cosmic-toggle:hover .slider { transform: rotateX(8deg) rotateY(-8deg); }

@media (max-width: 680px) {
  .cosmic-toggle { width: 60px; height: 32px; margin-left: 0; }
  .cosmic-toggle .slider { border-radius: 16px; }
  .cosmic-toggle .toggle-orb { left: 4px; bottom: 4px; width: 24px; height: 24px; }
  .cosmic-toggle .toggle:checked + .slider .toggle-orb { transform: translateX(28px) rotate(360deg); }
  .cosmic-toggle .track-icon { width: 12px; height: 12px; margin-top: -6px; }
  .cosmic-toggle .track-icon svg { width: 12px; height: 12px; }
  .cosmic-toggle .track-icon--sun { left: 6px; }
  .cosmic-toggle .track-icon--moon { right: 6px; }
  .cosmic-toggle .orb-icon svg { width: 14px; height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cosmic-toggle .cosmos,
  .cosmic-toggle .energy-line,
  .cosmic-toggle .particle,
  .cosmic-toggle .ring,
  .cosmic-toggle .inner-orb::before { animation: none !important; }
}


/* ==========================================================================
   23. 加载遮罩（圆点脉冲 spinner）
   圆点脉冲的思路来自 Uiverse.io by abrahamcalsin，
   配色换成站内的品牌蓝，尺寸放大了一点，尺寸/速度仍然是那两个变量。
   默认隐藏，只有 <html> 上有 is-loading 时才盖上来（由 layout.php 控制）
   ========================================================================== */

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
  background: var(--loader-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
html.is-loading .page-loader { opacity: 1; visibility: visible; }

.page-loader__label {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .44em;
  text-indent: .44em;
  color: var(--loader-label);
}

.dot-spinner {
  --uib-size: 3.4rem;
  --uib-speed: .9s;
  --uib-color: #5b8dff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--uib-size);
  width: var(--uib-size);
}

.dot-spinner__dot {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  width: 100%;
}

.dot-spinner__dot::before {
  content: "";
  height: 22%;
  width: 22%;
  border-radius: 50%;
  background-color: var(--uib-color);
  transform: scale(0);
  opacity: .5;
  animation: loader-pulse calc(var(--uib-speed) * 1.111) ease-in-out infinite;
  box-shadow: 0 0 14px rgba(91, 141, 255, .75);
}

.dot-spinner__dot:nth-child(2) { transform: rotate(45deg); }
.dot-spinner__dot:nth-child(2)::before { animation-delay: calc(var(--uib-speed) * -0.875); }
.dot-spinner__dot:nth-child(3) { transform: rotate(90deg); }
.dot-spinner__dot:nth-child(3)::before { animation-delay: calc(var(--uib-speed) * -0.75); }
.dot-spinner__dot:nth-child(4) { transform: rotate(135deg); }
.dot-spinner__dot:nth-child(4)::before { animation-delay: calc(var(--uib-speed) * -0.625); }
.dot-spinner__dot:nth-child(5) { transform: rotate(180deg); }
.dot-spinner__dot:nth-child(5)::before { animation-delay: calc(var(--uib-speed) * -0.5); }
.dot-spinner__dot:nth-child(6) { transform: rotate(225deg); }
.dot-spinner__dot:nth-child(6)::before { animation-delay: calc(var(--uib-speed) * -0.375); }
.dot-spinner__dot:nth-child(7) { transform: rotate(270deg); }
.dot-spinner__dot:nth-child(7)::before { animation-delay: calc(var(--uib-speed) * -0.25); }
.dot-spinner__dot:nth-child(8) { transform: rotate(315deg); }
.dot-spinner__dot:nth-child(8)::before { animation-delay: calc(var(--uib-speed) * -0.125); }

@keyframes loader-pulse {
  0%, 100% { transform: scale(0); opacity: .5; }
  50%      { transform: scale(1); opacity: 1; }
}

/* 遮罩的底色跟着深浅色走 */
:root {
  --loader-bg: rgba(236, 238, 249, .90);
  --loader-label: rgba(30, 32, 70, .55);
}
html[data-theme="dark"] {
  --loader-bg: rgba(8, 9, 20, .90);
  --loader-label: rgba(255, 255, 255, .60);
}

/* 没开 JS 时（is-loading 永远不会被加上）遮罩自然不出现，不需要额外兜底 */

/* ==========================================================================
   24. 整合包介绍页（首页「下载整合包」跳转的目的页）
   ========================================================================== */

.pack-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.pack-cover {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}
.pack-cover img { display: block; width: 100%; height: auto; }

/* 桌面端：封面撑满左栏高度，和右栏齐平，不再上下留白（高出来的部分按比例裁掉两侧） */
@media (min-width: 1101px) {
  .pack-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: stretch;
  }
  .pack-cover { position: relative; min-height: 280px; }
  .pack-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}
.pack-name { margin: 0 0 10px; font-size: clamp(23px, 3.2vw, 32px); letter-spacing: -.02em; }
.pack-tagline { margin: 0 0 16px; font-size: 15px; line-height: 1.85; color: var(--muted); }
.pack-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pack-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
}
.pack-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; margin-bottom: 20px; }
.pack-fact { padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.pack-fact span { display: block; font-size: 12px; color: var(--muted); }
.pack-fact b { display: block; margin-top: 3px; font-size: 15px; }
.pack-actions { justify-content: flex-start; margin-top: 0; }
.pack-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 10px 20px; margin: 0; padding: 0; list-style: none; }
.pack-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 1.7; }
.pack-list .icon { width: 17px; height: 17px; margin-top: 3px; flex: none; color: var(--brand); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; max-width: 100%; min-width: 0; }

/* 窄屏并排太挤：封面和文字改成上下排列，图片保持原比例不被裁 */
@media (max-width: 1100px) {
  .pack-hero { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 860px) {
  .pack-actions { justify-content: center; }
}

/* 版本不兼容这类硬性提醒：把 tut-tip 换成琥珀红 */
.tut-tip.is-warn { background: linear-gradient(120deg, rgba(245, 158, 11, .18), rgba(239, 68, 68, .13)), var(--panel); }
.tut-tip.is-warn::before { background: linear-gradient(180deg, #f59e0b, #ef4444); }
.tut-tip.is-warn .rico { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 10px 24px -10px rgba(239, 68, 68, .75); }
.tut-tip.is-warn .rbadge { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #4a2503; }
html[data-theme="dark"] .tut-tip.is-warn .rbadge { color: #3a1d02; }
.tut-tip.is-warn .hl { color: #dc2626; }
html[data-theme="dark"] .tut-tip.is-warn .hl { color: #fca5a5; }

/* ==========================================================================
   25. 移动端排版修正（只写 @media，桌面端一行都不动）
   修的都是一眼能看出来的毛病：
     · 顶栏汉堡按钮是 6px 圆角的深色方块，跟胶囊导航不是一套
     · 搜索框在手机上被拆成上下两块大色块
     · 筛选栏的「分类 / 排序」挤成三列，标签卡在行首
     · 关于页四个数字卡一张一张占满整屏
     · 教程提示条的图标挂在长文中间，重心歪
     · 教程分页条最后一个标签被切掉
     · 页脚左对齐折成两行
   ========================================================================== */

@media (max-width: 720px) {

  /* 顶栏：汉堡按钮跟导航胶囊用同一套圆角 / 描边 / 玻璃质感 */
  .nav-toggle {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--panel-strong);
    box-shadow: var(--shadow), var(--glass-top);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
  }

  /* 首页：封面尽量铺满宽度，按钮行放开一点，别再挤在中间一小块 */
  .home-hero { padding: 0 12px; }
  .home-hero .holo-poster { margin-top: 10px; }
  .home-hero .hero-actions { margin-top: 32px; gap: 14px; }
  .pack-btn { min-width: 0; width: 100%; padding: 17px 20px; font-size: 16px; }

  /* 搜索框：手机上保持一行，输入框占满剩余宽度 */
  .hero-search {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 6px 6px 6px 14px;
    border-radius: 999px;
    max-width: none;
  }
  .hero-search input { flex: 1 1 auto; min-width: 0; padding: 4px 0; font-size: 14.5px; }
  .hero-search .btn { flex: 0 0 auto; padding: 11px 20px; font-size: 14px; border-radius: 999px; }

  /* 筛选栏：分类 / 排序 各自占一行，标签单独一行，chip 别挤成三列 */
  .filter-bar { flex-direction: column; gap: 12px; padding: 14px 15px; }
  .filter-group { width: 100%; row-gap: 8px; }
  .filter-label { flex: 0 0 100%; margin: 0; }
  .chip { padding: 5px 11px; font-size: 12.5px; }

  /* 关于页的数字卡：2×2 排开 */
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -32px; }

  /* 教程提示条：图标顶对齐、缩小，长文不再被一个方块挡住重心 */
  .tut-tip { align-items: flex-start; gap: 14px; padding: 18px; }
  .tut-tip .rico { width: 44px; height: 44px; border-radius: 13px; font-size: 12px; }
  .tut-tip .rtitle { font-size: 16.5px; }
  .tut-tip p { font-size: 13px; }

  /* 教程分页条：缩小到四个标签刚好排得下，不被右边缘切掉 */
  .tut-nav { top: 70px; gap: 4px; padding: 5px; }
  .tut-nav a { padding: 0 11px; font-size: 13px; height: 34px; }

  /* 页脚：手机上居中显示 */
  .footer-slim {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 18px 0 20px;
  }
  .footer-links { justify-content: center; gap: 14px; }

  /* 段落节奏收紧一点 */
  .section { padding-top: 30px; }
  .prose-card { padding: 20px; }
  .page-hero { padding: 24px 0 18px; }
}

/* ==========================================================================
   26. 整合包页的表情互动条
   —— 参考 Uiverse 那个 emoji 反应条，但换成站内的玻璃语言：
      玻璃药丸里一排小圆按钮，悬停浮起并弹出标签，点一下飘一个 +1。
   ========================================================================== */

.react-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  box-shadow: var(--shadow), var(--glass-top);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

.react-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, color .22s ease;
  -webkit-tap-highlight-color: transparent;
}
.react-btn:hover {
  transform: translateY(-5px);
  border-color: var(--brand-line);
  color: var(--brand);
  box-shadow: var(--shadow-lg);
}
.react-btn:active { transform: translateY(-2px); }
.react-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.react-emoji { font-size: 19px; line-height: 1; }
.react-num { font-variant-numeric: tabular-nums; }

/* 悬停 / 聚焦时浮出来的小标签 */
.react-btn::before {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translate(-50%, 4px);
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.react-btn:hover::before,
.react-btn:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }
/* +1 在飘的时候先把标签让开，不然两个东西叠在一起 */
.react-btn.is-flying::before { opacity: 0; }

/* 点一下飘起来的 +1 */
.react-fly {
  position: absolute;
  left: 50%;
  top: -2px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--brand);
  text-shadow: 0 1px 6px rgba(10, 18, 50, .35);
  pointer-events: none;
  animation: react-fly .9s ease-out forwards;
}
@keyframes react-fly {
  0%   { opacity: 0; transform: translate(-50%, 8px) scale(.8); }
  24%  { opacity: 1; transform: translate(-50%, -4px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(1); }
}

.react-hint { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* 这一块的手机收紧：放在 26 节后面，好让它压过前面的基础规则 */
@media (max-width: 720px) {
  .react-bar { gap: 5px; padding: 6px; border-radius: 24px; }
  .react-btn { gap: 5px; padding: 8px 11px; font-size: 13.5px; }
  .react-emoji { font-size: 17px; }
  .react-num { font-size: 13px; }
  .react-hint { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .react-btn { transition: none; }
  .react-btn:hover { transform: none; }
  .react-fly { animation-duration: .01s; }
}

/* ==========================================================================
   27. 互动条搬进整合包页 hero（下载按钮正下方）
   —— 玻璃样式还是 26 节那套，这里只管它在右栏里的间距和对齐。
   ========================================================================== */
.pack-react { margin-top: 26px; }
.pack-react .react-bar { justify-content: flex-start; }
.pack-react .react-hint { margin: 12px 0 0; }

@media (max-width: 860px) {
  /* 手机上 hero 变单列，按钮已经居中，互动条跟着居中 */
  .pack-react { text-align: center; }
  .pack-react .react-bar { justify-content: center; }
}

/* ==========================================================================
   28. 整合包页的 3D 旋转图环（参考 Uiverse ilkhoeri 那套写法）
   —— 六张截图围成一圈慢慢转，卡片都朝外，前后六张都看得见。
   —— 半径按正多边形算：六张卡刚好首尾相接时 r = 卡宽/2 / tan(180/6) = 卡宽 × 0.866。
      换张数的话这个系数会不准，但环还是能转，只是卡与卡之间会有缝或者叠住。
   ========================================================================== */
.pack-ring {
  /* 环比正文栏宽一点：整块按 --ring-band 走，左右各用负外边距撑出去，
     这样卡片能做大些，多出来的部分往屏幕边上淌，而不是卡在正文两边。 */
  --ring-band: min(1400px, calc(100vw - 32px));
  /* 卡宽是唯一的基准：高度、半径、透视、容器高度全部按它算，
     所以整个投影是等比的，窗口一窄整圈一起缩，不会某一块被切掉。
     0.27 是量出来的：整圈横向刚好占满 --ring-band 时卡宽的比例（留了点余量）。 */
  --ring-w: min(375px, calc(var(--ring-band) * .27));
  --ring-h: calc(var(--ring-w) * 0.561);
  /* 1.5 = 半径系数。0.866 是六张卡首尾刚好相切，那样后面三张会被前面挡死；
     放大到 1.5 前后六张拉开都能看到。 */
  --ring-radius: calc(var(--ring-w) * 1.5);
  --ring-tilt: -11deg;
  /* 转一圈的时长：环和每张卡的明暗都按它走，换速度只改这一处 */
  --ring-spin: 30s;
  --ring-perspective: calc(var(--ring-w) * 3.48);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ring-band);
  margin-left: calc((100% - var(--ring-band)) / 2);
  margin-right: calc((100% - var(--ring-band)) / 2);
  /* 1.30 倍卡宽就是环转一圈里最高那一档的高度（量出来的），
     多出来的当上下留白，环怎么转都不会被裁掉。 */
  height: calc(var(--ring-w) * 1.30);
  margin-top: 18px;
  overflow: hidden;
  perspective: var(--ring-perspective);
  perspective-origin: 50% 45%;
  /* 环本身也能左右拖，手机上可以拨着看 */
  touch-action: pan-y;
}

.pack-ring__stage {
  /* 整个环往前下方歪 r×sin(倾角) 之后，最前面那张会掉到容器外面被裁掉，
     抬回去的量差不多是 sin(倾角) 乘半径（11° 时约 0.19），这里取 0.175，
     正好让上下留白一样多；改 --ring-tilt 的话这个数要跟着改。 */
  --ring-lift: calc(var(--ring-radius) * -0.175);
  position: relative;
  width: var(--ring-w);
  height: var(--ring-h);
  transform-style: preserve-3d;
  transform: translateY(var(--ring-lift)) rotateX(var(--ring-tilt));
  animation: pack-ring-spin var(--ring-spin) linear infinite;
}

@keyframes pack-ring-spin {
  from { transform: translateY(var(--ring-lift)) rotateX(var(--ring-tilt)) rotateY(0deg); }
  to   { transform: translateY(var(--ring-lift)) rotateX(var(--ring-tilt)) rotateY(360deg); }
}

.pack-ring__card {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  /* 不写 backface-visibility：环转到后面的那三张也要看得见，否则只剩三张像假的 */
  transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) translateZ(var(--ring-radius));
}
.pack-ring__card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 转到背面的那几张露出的是卡背（贴图里的字是反的），按朝向压暗一档，
     看起来像远处的纵深而不是穿帮。周期跟环一致，每张按 --index 错开一格的时长。 */
  animation: pack-ring-depth var(--ring-spin) linear infinite;
  animation-delay: calc(var(--ring-spin) / 6 * var(--index) * -1);
}

@keyframes pack-ring-depth {
  0%   { filter: brightness(1)   saturate(1); }
  25%  { filter: brightness(.74) saturate(.92); }
  50%  { filter: brightness(.50) saturate(.84); }
  75%  { filter: brightness(.74) saturate(.92); }
  100% { filter: brightness(1)   saturate(1); }
}

/* 环前面压一层柔光，卡片边缘不会硬生生切在容器上 */
.pack-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 45%, transparent 52%, var(--bg) 100%);
  opacity: .55;
}

@media (max-width: 860px) {
  /* 手机上一屏放不下那么宽，环就贴着屏幕边，卡片按屏宽等比缩 */
  .pack-ring { --ring-band: calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .pack-ring { --ring-spin: 90s; }
}

/* ==========================================================================
   29. 手机底部导航（毛玻璃胶囊）
   —— 宽屏照旧用顶栏；≤860px 顶栏只留品牌、主题开关，导航整块挪到屏幕底部，
      汉堡菜单不再需要（导航就在手边）。
   —— 玻璃做法参考 Uiverse by mymiamo：模糊 + 提饱和的底色，内侧一圈高光边。
   ========================================================================== */
.mobile-dock { display: none; }

@media (max-width: 860px) {
  /* 导航已经到底部了，汉堡和抽屉都不用出场 */
  .nav-toggle { display: none; }
  .nav { display: none; }

  /* 给固定底栏留出高度，内容和页脚不会被压住（含 iPhone 底部安全区） */
  body { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }

  .mobile-dock {
    --dock-blur: blur(16px) saturate(180%) contrast(130%);
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: calc(100% - 20px);
    max-width: 520px;
    z-index: 55;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 7px;
    border-radius: 99rem;
    border: 1px solid var(--line);
    background: var(--panel-strong);
    -webkit-backdrop-filter: var(--dock-blur);
    backdrop-filter: var(--dock-blur);
    box-shadow: var(--shadow-lg);
  }

  /* 玻璃的关键：内侧一圈高光，浅色下明显、深色下收着来 */
  .mobile-dock::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow:
      inset 2px 2px 5px -2px rgba(255, 255, 255, .55),
      inset -2px -2px 5px 2px rgba(255, 255, 255, .45),
      inset 0 -2px 0 rgba(255, 255, 255, .30);
  }
  html[data-theme="dark"] .mobile-dock::after {
    box-shadow:
      inset 2px 2px 6px -2px rgba(255, 255, 255, .14),
      inset -2px -2px 6px 2px rgba(255, 255, 255, .09),
      inset 0 -1px 0 rgba(255, 255, 255, .07);
  }

  .mobile-dock a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 4px 7px;
    border-radius: 999rem;
    color: var(--muted);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .18s ease, color .18s ease, transform .18s ease;
  }
  .mobile-dock a:active { transform: scale(.96); }
  .mobile-dock a.is-active { background: var(--brand-soft); color: var(--brand); }

  .mobile-dock .dock-ico { display: inline-flex; }
  .mobile-dock .dock-ico .icon { width: 22px; height: 22px; }
  .mobile-dock .dock-title {
    margin-top: 3px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
  }
}

/* ==========================================================================
   30. 卡片毛玻璃统一
   —— 站内所有「卡片类」表面统一成一块玻璃：模糊 + 半透明底 + 上缘高光。
      按钮、照片、导航栏/底栏不在此列（要求里明确排除了）。
   ========================================================================== */
.stat-card,
.step-card,
.faq-item,
.res-card,
.cat-card,
.feature-card,
.contact-card,
.prose-card,
.empty-state,
.tut-link,
.tut-card,
.tut-pager a,
.tut-steps .st,
.tut-shots figure,
.tut-tools button,
.pack-cover,
.pack-fact,
.react-btn,
.hero-badge,
.hero-search,
.filter-bar,
.pager-btn,
.panel,
.stat,
.login-box,
.toolbar,
.home-note {
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-top);
}

/* 玻璃的那层「上亮下暗」薄雾；浅色下轻、深色下更轻，避免糊成一片 */
.stat-card,
.step-card,
.faq-item,
.cat-card,
.feature-card,
.contact-card,
.prose-card,
.empty-state,
.tut-link,
.tut-card,
.tut-shots figure,
.pack-cover,
.pack-fact,
.res-card,
.hero-search,
.pager-btn {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .30), rgba(255, 255, 255, .06) 52%, rgba(255, 255, 255, 0));
}
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .step-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .cat-card,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .prose-card,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .tut-link,
html[data-theme="dark"] .tut-card,
html[data-theme="dark"] .tut-shots figure,
html[data-theme="dark"] .pack-cover,
html[data-theme="dark"] .pack-fact,
html[data-theme="dark"] .res-card,
html[data-theme="dark"] .hero-search,
html[data-theme="dark"] .pager-btn {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02) 52%, rgba(255, 255, 255, 0));
}

/* 悬停只做一点点位移和描边，不加光晕 */
.stat-card,
.step-card,
.cat-card,
.feature-card,
.contact-card,
.tut-shots figure,
.pack-fact {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.stat-card:hover,
.step-card:hover,
.cat-card:hover,
.feature-card:hover,
.contact-card:hover,
.pack-fact:hover {
  transform: translateY(-2px);
  border-color: var(--brand-line);
}

/* ==========================================================================
   31. 搜索栏（毛玻璃胶囊）
   ========================================================================== */
.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 620px;
  margin: 24px auto 0;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--line);
  border-radius: 99rem;
  background-color: var(--panel-strong);
  box-shadow: var(--shadow-lg), var(--glass-top);
  transition: border-color .22s ease, box-shadow .22s ease;
}
.hero-search:focus-within {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-lg), var(--glass-top), 0 0 0 4px var(--brand-soft);
}
.hero-search .hero-search-icon {
  display: inline-flex;
  flex: none;
  color: var(--muted);
}
.hero-search .hero-search-icon .icon { width: 19px; height: 19px; }
.hero-search input[type="search"],
.hero-search input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  padding: 10px 0;
  font-size: 15px;
  color: var(--text);
  outline: none;
  box-shadow: none;
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.hero-search .btn {
  flex: none;
  border-radius: 99rem;
  padding: 10px 22px;
}

/* ==========================================================================
   32. 资源中心：新的排版
   —— 头图 → 搜索 → 一行筛选 → 卡片网格。筛选条吸顶，滚动时也能随时换分类。
   ========================================================================== */
.dl-hero {
  padding-top: 46px;
  padding-bottom: 4px;
  text-align: center;
}
.dl-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 40px);
  letter-spacing: -.5px;
}
.dl-hero .muted { margin: 10px 0 0; font-size: 14.5px; }

.dl-bar {
  position: sticky;
  top: 76px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 26px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-top);
}
.dl-bar .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dl-bar .filter-label {
  font-size: 12.5px;
  color: var(--muted);
  padding-left: 4px;
}
.dl-bar .filter-group + .filter-group {
  margin-left: auto;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.dl-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 12px;
  font-size: 13.5px;
  color: var(--muted);
}
.dl-count strong { color: var(--text); }
.dl-count .dl-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.res-grid .res-card {
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}
.res-grid .res-title { font-size: 16px; }
.res-grid .res-action .btn { white-space: nowrap; }

@media (max-width: 700px) {
  .dl-bar { top: 66px; border-radius: 16px; }
  .dl-bar .filter-group + .filter-group { margin-left: 0; border-left: 0; padding-left: 0; }
  .res-grid { grid-template-columns: 1fr; }
  .res-grid .res-card { padding: 13px 14px; gap: 12px; }
}

/* ==========================================================================
   33. 关于我们：新的排版
   ========================================================================== */
.about-hero {
  padding-top: 46px;
  padding-bottom: 0;
  text-align: center;
}
.about-hero h1 { margin: 0; font-size: clamp(28px, 4.4vw, 40px); }

/* 关于我们：顶部个人介绍 —— 头像 + 名字 + 头衔，简洁大方 */

.about-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.about-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.about-profile h1 {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: clamp(30px, 4.8vw, 44px);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.about-role {
  margin: -2px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
}
.about-tagline {
  max-width: 560px;
  margin: 2px 0 0;
  font-size: 14.5px;
}
@media (max-width: 680px) {
  .about-avatar { width: 96px; height: 96px; }
}


.about-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 30px 0 0;
}
.about-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .30), rgba(255, 255, 255, 0));
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-top);
  text-align: center;
}
html[data-theme="dark"] .about-stat {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0));
}
.about-stat .stat-icon { margin-bottom: 4px; }
.about-stat strong {
  font-family: var(--font-display, inherit);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.5px;
}
.about-stat .muted { font-size: 13px; }

.about-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
.about-main .prose-card { margin: 0; height: 100%; }
.about-aside {
  display: grid;
  gap: 12px;
}
.about-note {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-top);
}
.about-note h3 { margin: 0 0 8px; font-size: 15px; }
.about-note p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.75; }

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-main { grid-template-columns: 1fr; }
}

/* ==========================================================================
   34. 后台：内容管理 / 卡片管理
   ========================================================================== */
.cms-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 16px;
}
.cms-tabs a {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 99rem;
  background: var(--panel);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
}
.cms-tabs a.is-on { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }

.cms-group { margin-bottom: 18px; }
.cms-group > h2 { margin: 0 0 12px; font-size: 17px; }
.cms-grid { display: grid; gap: 14px; }
.cms-field {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-top);
}
.cms-field > label { font-size: 13px; font-weight: 600; }
.cms-field .cms-key { color: var(--muted); font-weight: 400; font-size: 11.5px; margin-left: 6px; }
.cms-field input[type="text"],
.cms-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.cms-field textarea { min-height: 92px; resize: vertical; line-height: 1.7; }
.cms-field input[type="file"] { font-size: 12.5px; color: var(--muted); }
.cms-field .cms-hint { color: var(--muted); font-size: 12px; }
.cms-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.cms-card-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-top);
  margin-bottom: 10px;
}
.cms-card-row .cms-thumb {
  width: 92px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--field);
  border: 1px solid var(--line);
}
.cms-card-row .cms-thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
}
.cms-card-row h4 { margin: 0 0 4px; font-size: 14.5px; }
.cms-card-row p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.cms-card-row .cms-actions { display: flex; gap: 8px; align-items: center; }

.cms-save {
  position: sticky;
  bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg), var(--glass-top);
}

/* ==========================================================================
   35. 教程步骤里的配图（后台「安装步骤」卡片上传的图）
   ========================================================================== */
.tut-inline-img {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 12px 0 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
/* ==========================================================================
   36. 整合包页「下载整合包」按钮
   渐变直接沿用站内主按钮那一套（brand → sky），
   不然跟页面底色、旁边的搜索/下载按钮都不搭
   ========================================================================== */
.btn-wrapper {
  --rad: 14px;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--rad);

  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;

  box-shadow: 0 10px 24px -14px rgba(43, 92, 240, .95);
  transition: box-shadow .25s ease, border-color .25s ease, transform .16s ease;
}
.btn-wrapper:hover {
  border-color: rgba(255, 255, 255, .48);
  box-shadow: 0 14px 30px -12px rgba(43, 92, 240, 1);
}
.btn-wrapper:active { transform: translateY(1px) scale(.99); }

.gradient-btn {
  display: block;
  padding: 14px 36px;
  border-radius: calc(var(--rad) - 1px);

  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: .08em;
  white-space: nowrap;

  color: #fff;
  background-image: linear-gradient(100deg, #2b5cf0, #0ea5e9);
  text-shadow: 0 1px 2px rgba(6, 10, 40, .28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .30),
    inset 0 -12px 20px -16px rgba(4, 8, 30, .55);
}
/* ==========================================================================
   37. 资源：卡片封面图 / 详情页 / 点开大图
   ========================================================================== */

/* 卡片左边：有封面图就把色块换成图片 */
.res-tile.has-img {
  width: 112px;
  height: 76px;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--field);
}
.res-tile.has-img .res-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.res-card:hover .res-tile.has-img .res-thumb { transform: scale(1.06); }

/* 「下载 / 详情」两个按钮竖排 */
.res-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.res-action .btn { justify-content: center; }

/* 网盘外链的色调与角标 */
.tone-link { --tone-rgb: 14, 165, 233; }
.tag-link {
  color: #0284c7;
  border-color: rgba(14, 165, 233, .35);
  background: rgba(14, 165, 233, .10);
}
html[data-theme="dark"] .tag-link { color: #38bdf8; }

/* ---------------------------- 详情页 ---------------------------- */
.res-detail { padding: 26px 0 6px; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs-now { color: var(--text); }

.rd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-top);
}

.rd-cover {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--field);
}
.rd-cover .js-zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.rd-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.rd-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 99rem;
  background: rgba(8, 12, 32, .6);
  color: #fff;
  font-size: 12px;
  opacity: .85;
  transition: opacity .2s ease;
}
.rd-zoom-hint .icon { width: 13px; height: 13px; }
.rd-cover .js-zoom:hover .rd-zoom-hint { opacity: 1; }

.rd-cover-ext {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: 16 / 10;
  color: rgb(var(--tone-rgb));
  background: rgba(var(--tone-rgb), .10);
}
.rd-cover-ext b { font-size: 30px; font-weight: 800; letter-spacing: .02em; }
.rd-cover-ext i { font-size: 13px; font-style: normal; opacity: .85; }

.rd-info h1 { margin: 0 0 10px; font-size: clamp(21px, 2.6vw, 28px); letter-spacing: -.02em; }
.rd-desc { margin: 0 0 16px; font-size: 14.5px; line-height: 1.75; color: var(--muted); }

.rd-meta {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
}
.rd-meta li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
}
.rd-meta span { display: block; margin-bottom: 3px; font-size: 12px; color: var(--muted); }
.rd-meta b,
.rd-meta a { font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none; word-break: break-all; }
.rd-meta a:hover { color: var(--brand); }

.rd-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rd-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

/* 提取码：做成一枚「取件码」小票 —— 钥匙徽标 + 大号等宽码 + 虚线撕口 + 复制按钮 */
.rd-code {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0 0;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  /* 品牌色往右下淡出，凑一点玻璃的通透感，不是一块死板的实色 */
  background:
    linear-gradient(135deg, rgba(var(--holo-rgb), .13), rgba(var(--holo-rgb), .04) 46%, transparent 74%),
    var(--field);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.rd-code:hover { border-color: var(--brand-line); }
.rd-code:active { box-shadow: none; }

.rd-code-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}

.rd-code-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rd-code-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--muted);
}
.rd-code-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.05;
  color: var(--text);
  word-break: break-all;
}

/* 小票撕口：复制按钮前面来一条虚线 */
.rd-code-cut {
  flex: none;
  width: 0;
  height: 42px;
  margin: 0 2px;
  border-left: 1px dashed var(--line);
}

.rd-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 10px 16px;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.rd-code-copy .icon { width: 17px; height: 17px; }
.rd-code-copy:hover { transform: translateY(-1px); background: var(--hover); }
.rd-code-copy:active { transform: translateY(0) scale(.985); }
.rd-code-copy:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rd-code-copy.is-done {
  color: var(--dl-ok);
  border-color: var(--dl-ok);
  background: var(--panel-strong);
  transform: none;
}

@media (max-width: 860px) {
  .rd-grid { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
}

/* 点开放大 */
.rd-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  background: rgba(6, 9, 22, .88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.rd-lightbox.is-on { display: flex; }
.rd-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
}
.rd-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* --------------------- 后台：下载方式 / 封面图 --------------------- */
.src-picker {
  margin: 0 0 18px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.src-picker legend { padding: 0 6px; font-size: 13px; font-weight: 600; }

.src-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  cursor: pointer;
}
.src-opt input { margin-top: 3px; flex: none; width: auto; height: auto; padding: 0; display: inline-block; }
.src-opt b { display: block; font-size: 14px; }
.src-opt em { display: block; margin-top: 2px; font-size: 12.5px; font-style: normal; color: var(--muted); }
.src-opt:has(input:checked) { border-color: var(--brand-line); background: var(--brand-soft); }

.src-pane { display: none; margin-top: 12px; }
.src-pane.is-open { display: block; }

/* ==========================================================================
   38. 后台顶栏导航（文字胶囊）
   —— 前台那套 .nav a 是「52px 图标胶囊、hover 横向展开」，条目里塞的是
      .nav-ico + .nav-title；后台条目是纯文字，套上去会被 overflow:hidden
      裁掉，所以这里按文字重排。
   —— 顺手修一处旧毛病：≤860px 时全局把 .nav / .nav-toggle 一起藏了
      （前台靠屏幕底部的胶囊接管），但后台没有底部胶囊，导致手机上后台
      整块导航消失。这里只把后台的导航开关放回来。
   ========================================================================== */
@media (min-width: 861px) {
  .admin-nav a,
  .admin-nav a:hover,
  .admin-nav a:focus-visible,
  .admin-nav a.is-active {
    width: auto;
    height: auto;
    padding: 8px 15px;
    border-radius: 999px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
  }
}

@media (max-width: 860px) {
  /* 后台没有底部胶囊，别给页面留那块空白 */
  body.admin-body { padding-bottom: 0; }
  /* 把汉堡按钮放回来，导航仍用下拉抽屉 */
  body.admin-body .nav-toggle { display: flex; }
  /* 基类的 justify-self:center 会让绝对定位的网格子项收缩成窄条，这里让它撑满 */
  body.admin-body .admin-nav { justify-self: stretch; }
  body.admin-body .admin-nav a {
    width: auto;
    height: auto;
    padding: 12px 14px;
    overflow: visible;
    font-size: 15px;
    font-weight: 600;
  }
}

/* ==========================================================================
   39. 资源卡片（玻璃悬浮卡 · 横向）
   —— 结构参考 Uiverse by monkey_8812 的竖版卡片，这里改成横向：
      ① 底层：品牌色描边面板（内嵌一块深/浅色底，右上角大圆角）
      ② 中层：毛玻璃 + 缓慢旋转的光球（没有封面图时才出现）
      ③ 顶层：左侧玻璃信息面板（标题 / 简介 / 底部信息），右侧分类版本
         + 圆形箭头按钮（点它进详情页）
   ========================================================================== */
.res-card {
  --rc-line: rgba(255, 255, 255, .9);
  --rc-tint-a: #2b5cf0;
  --rc-tint-b: #0ea5e9;
  --rc-inner: #f3f5fa;
  --rc-text: #131631;
  --rc-dim: rgba(19, 22, 49, .58);
  --rc-glass: rgba(255, 255, 255, .55);
  --rc-glass-line: rgba(255, 255, 255, .8);
  --rc-glass-hover: rgba(255, 255, 255, .9);
  --rc-shadow: 0 16px 38px -18px rgba(19, 22, 49, .45);

  position: relative;
  display: block;
  height: 196px;
  gap: 0;
  padding: 0;
  border: 1px solid var(--rc-line);
  border-radius: 20px;
  background: transparent;
  background-image: none;
  box-shadow: var(--rc-shadow);
  overflow: hidden;
  isolation: isolate;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

html[data-theme="dark"] .res-card {
  --rc-line: rgba(255, 255, 255, .34);
  --rc-inner: #0f131b;
  --rc-text: #f2f6ff;
  --rc-dim: rgba(242, 246, 255, .60);
  --rc-glass: rgba(10, 14, 22, .46);
  --rc-glass-line: rgba(255, 255, 255, .18);
  --rc-glass-hover: rgba(10, 14, 22, .64);
  --rc-shadow: 0 18px 42px -20px rgba(0, 0, 0, .85);
  background-image: none;
}

.res-grid .res-card { align-items: stretch; gap: 0; padding: 0; }

/* 旧版卡片遗留的左侧强调条 + 悬浮位移，这里都不要了 */
.res-card::before { display: none; }
.res-card:hover,
html[data-theme="dark"] .res-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .95);
  box-shadow: var(--rc-shadow), 0 0 0 3px var(--brand-soft);
}
html[data-theme="dark"] .res-card:hover { border-color: rgba(255, 255, 255, .5); }

/* ① 底层品牌色面板 */
.rc-tint {
  position: absolute;
  inset: 0;
  padding: 4px;
  background: linear-gradient(135deg, var(--rc-tint-a), var(--rc-tint-b));
}
.rc-inner {
  width: 100%;
  height: 100%;
  border-radius: 15px 62px 15px 26px;
  background-color: var(--rc-inner);
  background-size: cover;
  background-position: center;
}
/* 有封面图：图片直接铺满整张卡片，不再套那层品牌色框 */
.res-card.has-cover .rc-tint { padding: 0; background: none; }
.res-card.has-cover .rc-inner { border-radius: 0; }

/* ② 没有封面图时中间摆文件类型大字，别让卡片空着 */
.rc-art {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgb(var(--tone-rgb));
}
.rc-art-ext { font-size: 30px; font-weight: 800; letter-spacing: .01em; line-height: 1; }
.rc-art-kind { font-size: 12px; line-height: 1; opacity: .8; }

/* ③ 顶层内容 */
.rc-top {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
}
/* 桌面端：亚克力面板默认收着，鼠标移上去 / 键盘聚焦才弹出来 */
@media (hover: hover) and (pointer: fine) {
  .rc-top > * {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .26s ease, transform .3s cubic-bezier(.22, .61, .36, 1);
  }
  .res-card:hover .rc-top > *,
  .res-card:focus-within .rc-top > * { opacity: 1; transform: none; }
}

.rc-panel {
  flex: 0 1 63%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 10px;
  border: 1px solid var(--rc-glass-line);
  border-radius: 14px;
  background: var(--rc-glass);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  color: var(--rc-text);
}
.rc-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -.01em;
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: text-decoration-color .15s ease;
}
.rc-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.rc-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--rc-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rc-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11px;
  color: var(--rc-dim);
  white-space: nowrap;
}
.rc-sep {
  width: 3px;
  height: 3px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}

.rc-side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding-top: 3px;
  color: var(--rc-dim);
  font-size: 10px;
  line-height: 1.3;
  text-align: right;
}
.rc-tag {
  white-space: nowrap;
  color: var(--rc-text);
  opacity: .82;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .5);
}
html[data-theme="light"] .rc-tag { text-shadow: 0 1px 5px rgba(255, 255, 255, .9); }
.rc-tag-pin {
  opacity: 1;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--rc-glass-line);
  background: var(--rc-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.rc-go {
  margin-top: auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rc-glass-line);
  border-radius: 50%;
  background: var(--rc-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--rc-text);
  text-decoration: none;
  transition: background .25s ease, transform .25s ease;
}
.rc-go:hover { background: var(--rc-glass-hover); transform: scale(1.08); }
.rc-go svg { width: 15px; height: 15px; display: block; }

@media (max-width: 680px) {
  .res-card,
  .res-grid .res-card { height: 172px; }
  .rc-top { padding: 8px; gap: 8px; }
  .rc-panel { padding: 10px 12px 8px; border-radius: 12px; }
  .rc-title { font-size: 14.5px; }
  .rc-sub { font-size: 11.5px; -webkit-line-clamp: 2; }
  .rc-foot { font-size: 10.5px; gap: 6px; }
  .rc-inner { border-radius: 13px 48px 13px 20px; }
  .rc-art-ext { font-size: 24px; }
  .rc-go { width: 32px; height: 32px; }
}

/* ==========================================================================
   40. 资源中心：重排版 + 流光搜索框
   ========================================================================== */
.dl-hero { padding-top: 34px; padding-bottom: 0; }
.dl-hero h1 { font-size: clamp(26px, 3.6vw, 34px); letter-spacing: -.4px; }
.dl-hero .muted { margin: 8px 0 0; font-size: 13.8px; }

/* ---- 搜索框：四层锥形渐变叠出流光边，悬停 / 聚焦时缓慢转动 ---- */
.sb-form { max-width: 520px; margin: 22px auto 0; }
.sb {
  --sb-bg: #fff;
  --sb-text: var(--text);
  --sb-dim: var(--muted);
  --sb-a: #4f6bff;
  --sb-b: #c96ad4;
  --sb-c: #9aa6ff;
  --sb-d: #e3a3dd;
  --sb-base: #e9edff;
  position: relative;
  height: 58px;
  border-radius: 15px;
  isolation: isolate;
}
html[data-theme="dark"] .sb {
  --sb-bg: #08090f;
  --sb-a: #402fb5;
  --sb-b: #cf30aa;
  --sb-c: #a099d8;
  --sb-d: #dfa2da;
  --sb-base: #1b1a20;
}
.sb-rim {
  position: absolute;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.sb-rim::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, -50%) rotate(var(--rot));
  transition: transform 2s ease;
}
.sb-rim--far  { inset: 0;     border-radius: 15px;   filter: blur(3px);  --rot: 82deg; }
.sb-rim--mid  { inset: 1.5px; border-radius: 13.5px; filter: blur(2px);  --rot: 83deg; }
.sb-rim--near { inset: 3px;   border-radius: 12px;   filter: blur(.5px); --rot: 70deg; }
.sb-rim--glow { inset: -6px;  border-radius: 20px;   filter: blur(22px); opacity: .4; --rot: 60deg; }
.sb-rim--far::before {
  background-image: conic-gradient(transparent, var(--sb-a), transparent 10%, transparent 50%, var(--sb-b), transparent 60%);
}
.sb-rim--mid::before {
  background-image: conic-gradient(transparent, var(--sb-c), transparent 8%, transparent 50%, var(--sb-d), transparent 58%);
  filter: brightness(1.35);
}
.sb-rim--near::before {
  background-image: conic-gradient(var(--sb-base), var(--sb-a) 5%, var(--sb-base) 14%, var(--sb-base) 50%, var(--sb-b) 60%, var(--sb-base) 64%);
  filter: brightness(1.25);
}
.sb-rim--glow::before {
  background-image: conic-gradient(var(--sb-base), var(--sb-a) 5%, var(--sb-base) 38%, var(--sb-base) 50%, var(--sb-b) 60%, var(--sb-base) 87%);
}
.sb:hover .sb-rim--far::before  { transform: translate(-50%, -50%) rotate(-98deg); }
.sb:hover .sb-rim--mid::before  { transform: translate(-50%, -50%) rotate(-97deg); }
.sb:hover .sb-rim--near::before { transform: translate(-50%, -50%) rotate(-110deg); }
.sb:focus-within .sb-rim::before { transition: transform 4s ease; }
.sb:focus-within .sb-rim--far::before  { transform: translate(-50%, -50%) rotate(442deg); }
.sb:focus-within .sb-rim--mid::before  { transform: translate(-50%, -50%) rotate(443deg); }
.sb:focus-within .sb-rim--near::before { transform: translate(-50%, -50%) rotate(430deg); }

.sb-inner {
  position: absolute;
  inset: 4px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 0 15px;
  border-radius: 11px;
  background: var(--sb-bg);
}
.sb-icon { display: inline-flex; flex: none; color: var(--sb-dim); }
.sb-icon .icon { width: 18px; height: 18px; }
.sb-input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--sb-text);
}
.sb-input::placeholder { color: var(--sb-dim); }
.sb-input::-webkit-search-cancel-button,
.sb-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

/* 右侧提交键：外圈一条缓慢流动的锥形渐变 */
.sb-go {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.sb-go-ring { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; }
.sb-go-ring::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  background-image: conic-gradient(#1b1c33, #5a63c8 12%, #1b1c33 26%, #1b1c33 50%, #b5479f 64%, #1b1c33 78%);
  animation: sb-spin 6s linear infinite;
}
.sb-go-face {
  position: absolute;
  inset: 1.5px;
  display: grid;
  place-items: center;
  border-radius: 10.5px;
  background: linear-gradient(180deg, #272b52, #0e0f1c 55%, #3d1544);
  color: #fff;
  transition: background .2s ease;
}
.sb-go:hover .sb-go-face { background: linear-gradient(180deg, #33386a, #14162a 55%, #521c5b); }
.sb-go-face .icon { width: 17px; height: 17px; }
@keyframes sb-spin { to { transform: translate(-50%, -50%) rotate(1turn); } }

/* ---- 筛选条：统计并进同一条，少一行就干净一截 ---- */
.dl-bar { margin: 24px 0 0; padding: 9px 12px; border-radius: 16px; }
.dl-bar .dl-count {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 0 12px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.dl-bar + .res-grid,
.dl-bar + .empty-state { margin-top: 16px; }

@media (max-width: 700px) {
  .dl-hero { padding-top: 24px; }
  .sb-form { margin-top: 18px; }
  .sb { height: 54px; }
  .sb-inner { inset: 4px; padding: 0 5px 0 13px; border-radius: 10px; }
  .sb-input { font-size: 16px; }   /* 16px 以下 iOS 聚焦时会自动放大整页 */
  .sb-go { width: 40px; height: 40px; }
  .dl-bar { padding: 8px 10px; }
  .dl-bar .dl-count {
    width: 100%;
    margin: 2px 0 0;
    padding: 7px 2px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
  }
}

/* ==========================================================================
   41. 立体字（React Bits DepthText 的原生移植）——用在顶栏站名上
   ========================================================================== */
.depth-text {
  display: inline-block;
  /* 用 em 而不是 px：手机字号小了，厚度和透视跟着一起缩，比例不会变形 */
  perspective: 11em;
  perspective-origin: 50% 48%;
  isolation: isolate;
}
.depth-text__stage {
  position: relative;
  display: inline-grid;
  place-items: center;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  /* 角度写死在这里：不正对镜头，后面那叠层才露得出来。
     以前是脚本跟着鼠标转（DepthText 的指针视差），已按站长要求去掉动效 */
  transform: rotateX(-3.84deg) rotateY(5.04deg);
}
/* 每一层都当网格项居中，跟正面那层天然对齐，不依赖定位 */
.depth-text__layer,
.depth-text__face {
  grid-area: 1 / 1;
  display: inline-block;
  white-space: nowrap;
  user-select: none;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.depth-text__layer {
  z-index: 0;
  pointer-events: none;
  color: var(--dt-depth, var(--brand));
  /* --dt-z-scale 是厚度总开关：浅色主题会把层叠收紧，见下面的覆盖 */
  transform: translateZ(calc(var(--dt-z, 0px) * var(--dt-z-scale, 1)));
}
/* 越往后的层越暗，厚度才像是有光打过来；老浏览器退回上面那层纯色 */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .depth-text__layer {
    color: color-mix(in srgb, var(--dt-face) var(--dt-mix, 40%), var(--dt-depth, var(--brand)));
  }
}
.depth-text__face {
  position: relative;
  z-index: 1;
  color: var(--dt-face, currentColor);
  transform: translateZ(.6px);
  text-shadow: 0 3px 9px var(--dt-glow, transparent);
}

/* 顶栏站名：把原来的截断去掉，不然会把拉出来的厚度切掉 */
.brand-text.depth-text {
  --dt-face: var(--text);
  /* 深色字配深蓝挤出会糊成重影，浅色这版用偏亮的蓝，挤出面才像一道干净的三维边 */
  --dt-depth: #7d90ea;
  --dt-glow: rgba(19, 22, 49, .08);
  font-size: 26px;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.15;
}
html[data-theme="dark"] .brand-text.depth-text {
  --dt-depth: #2a3f9e;
  --dt-glow: rgba(80, 116, 255, .42);
}
/* 浅色底是亮的，蓝色挤出层按原厚度叠起来会糊成一团蓝雾，字就"看不清"了。
   这里只把这叠厚度收紧，字形本身和颜色都不动，挤出面就变成一条干净的三维边 */
html[data-theme="light"] .brand-text.depth-text { --dt-z-scale: .45; }

/* 还没收起汉堡菜单的那一段（≤960），导航仍是居中那颗胶囊，
   26px 的站名会顶到胶囊左边缘，这里把站名和 logo 一起收一档 */
@media (max-width: 960px) {
  .brand-text.depth-text { font-size: 21px; }
  .brand-logo { height: 34px; }
}

/* ==========================================================================
   42. 资源详情页：滑动下载（React Bits 的 SlideCommit，原生版见 assets/slide-commit.js）
   —— 没跑 JS 时画面靠下面这几个静态初值撑着：clip-path 和 content 的位移都按
      「把手停在最左边」算好了，所以脚本没加载/报错也不会看到一整条铺满的胶囊。
   —— 几何关系：轨道高 --sc-h，内边距 --sc-pad，把手宽 = --sc-h - 2 * --sc-pad。
   ========================================================================== */
.slide-commit {
  --sc-h: 56px;
  --sc-pad: 4px;
  --sc-radius: 28px;
  --sc-grip: calc(var(--sc-h) - var(--sc-pad) * 2);
  --sc-grip-r: 24px;
  --sc-font: 15px;
  --sc-ico: 21px;

  /* 浅色：灰玻璃轨道 + 品牌蓝把手；深色在下面覆盖 */
  --sc-track: rgba(19, 22, 49, .07);
  --sc-track-line: rgba(19, 22, 49, .09);
  --sc-ink: var(--brand);
  --sc-on-ink: #fff;
  --sc-ok: var(--dl-ok);
  --sc-on-ok: #fff;
  --sc-wait-fill: rgba(255, 255, 255, .22);

  position: relative;
  flex: 0 0 auto;
  width: 360px;
  max-width: 100%;
  height: var(--sc-h);
  font-family: inherit;
  font-size: var(--sc-font);
  vertical-align: middle;
}

html[data-theme="dark"] .slide-commit {
  --sc-track: rgba(255, 255, 255, .07);
  --sc-track-line: rgba(255, 255, 255, .11);
  --sc-on-ink: #0b0d18;
  --sc-on-ok: #06231a;
  --sc-wait-fill: rgba(11, 13, 24, .16);
}

/* 详情页那排按钮：让旁边的普通按钮跟轨道垂直居中对齐 */
.rd-actions { align-items: center; }

.slide-commit__track {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--sc-radius);
  background: var(--sc-track);
  /* 用 inset 阴影画描边：加真边框的话百分比宽度会把胶囊算窄 2px */
  box-shadow: inset 0 0 0 1px var(--sc-track-line);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.slide-commit__track:active { cursor: grabbing; }
.slide-commit[data-phase="pending"] .slide-commit__track,
.slide-commit[data-phase="done"] .slide-commit__track { cursor: default; }

.slide-commit__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--muted);
}

.slide-commit__capsule {
  position: absolute;
  top: var(--sc-pad);
  left: var(--sc-pad);
  width: calc(100% - var(--sc-pad) * 2);
  height: calc(100% - var(--sc-pad) * 2);
  border-radius: var(--sc-grip-r);
  background-color: var(--sc-ink);
  /* 顶部一道高光，免得整块死蓝看着像塑料 */
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, 0) 62%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26);
  color: var(--sc-on-ink);
  outline: none;
  /* 静态初值 = 把手停在最左边 */
  clip-path: inset(0 calc(100% - var(--sc-grip)) 0 0 round var(--sc-grip-r));
  transition: background-color .25s ease, color .25s ease;
}
.slide-commit[data-phase="done"] .slide-commit__capsule {
  background-color: var(--sc-ok);
  color: var(--sc-on-ok);
}
.slide-commit__capsule:focus-visible { outline: 2px solid var(--sc-ink); outline-offset: 3px; }

.slide-commit__content {
  position: absolute;
  inset: 0;
  /* 静态初值 = 图标居中在把手里 */
  transform: translateX(calc(var(--sc-grip) / 2 - 50%));
}

/* 滑到底之后的「停留 N 秒」：胶囊里一条走 5 秒的进度条 + 倒数数字 */
.slide-commit__bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: inherit;
  background: var(--sc-wait-fill);
  pointer-events: none;
}
.slide-commit[data-phase="wait"] .slide-commit__bar {
  animation: slide-commit-fill var(--sc-wait, 5s) linear forwards;
}
@keyframes slide-commit-fill { from { width: 0; } to { width: 100%; } }

.slide-commit__wait {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.slide-commit[data-phase="wait"] .slide-commit__wait { opacity: 1; }

.slide-commit__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 9px;
  background: var(--sc-wait-fill);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.slide-commit__waittx {
  font-size: 13.5px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .02em;
  opacity: .92;
}

.slide-commit__arrow,
.slide-commit__spin,
.slide-commit__done {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
}

.slide-commit__arrow .icon { width: var(--sc-ico); height: var(--sc-ico); stroke-width: 2.2; }
.slide-commit__done .icon { width: 19px; height: 19px; stroke-width: 2.6; }
.slide-commit__spinner { display: block; width: var(--sc-ico); height: var(--sc-ico); }

.slide-commit__spin { opacity: 0; }
.slide-commit__done { opacity: 0; transform: scale(.96); transition: opacity .2s ease, transform .2s ease; }
.slide-commit[data-phase="done"] .slide-commit__done { opacity: 1; transform: scale(1); }

.slide-commit__spinner {
  animation: slide-commit-spin 1s linear infinite;
  animation-play-state: paused;
}
.slide-commit[data-phase="pending"] .slide-commit__spinner { animation-play-state: running; }

@keyframes slide-commit-spin {
  to { transform: rotate(360deg); }
}

/* 只给读屏用的播报 */
.slide-commit__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .slide-commit__capsule,
  .slide-commit__done,
  .slide-commit__wait { transition: none; }
  .slide-commit__bar { animation: none; width: 100%; }
}
/* ==========================================================================
   43. 详情页正文：富文本排版
   —— 后台编辑器（第 44 节）写出来的 HTML 由 inc/richtext.php 过滤后输出。
      这里把 h2/h3/列表/引用/图片/链接的样式补齐，段落沿用 .prose-card 那套。
   ========================================================================== */
.prose-card.prose-rich > *:last-child { margin-bottom: 0; }
.prose-card.prose-rich h2 { margin: 26px 0 12px; font-size: 19px; color: var(--text); letter-spacing: -.01em; }
.prose-card.prose-rich h3 { margin: 22px 0 10px; font-size: 16.5px; color: var(--text); }
.prose-card.prose-rich h2:first-child,
.prose-card.prose-rich h3:first-child { margin-top: 0; }
.prose-card.prose-rich strong { color: var(--text); font-weight: 700; }
.prose-card.prose-rich em { font-style: italic; }
.prose-card.prose-rich ul,
.prose-card.prose-rich ol { margin: 0 0 13px; padding-left: 24px; font-size: 14.5px; line-height: 1.85; color: var(--muted); }
.prose-card.prose-rich li { margin: 5px 0; }
.prose-card.prose-rich li::marker { color: var(--brand); }
.prose-card.prose-rich blockquote {
  margin: 0 0 13px;
  padding: 11px 16px;
  border-left: 3px solid var(--brand-line);
  border-radius: 0 12px 12px 0;
  background: var(--brand-soft);
}
.prose-card.prose-rich blockquote > *:last-child { margin-bottom: 0; }
.prose-card.prose-rich img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.prose-card.prose-rich figure { margin: 18px 0; }
.prose-card.prose-rich figure img { margin: 0; }
.prose-card.prose-rich figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); text-align: center; }
.prose-card.prose-rich a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose-card.prose-rich a:hover { color: var(--brand-dark); }
.prose-card.prose-rich hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.prose-card.prose-rich code {
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--field);
  font-size: .92em;
}
.prose-card.prose-rich pre {
  margin: 0 0 13px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--field);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}
.prose-card.prose-rich pre code { padding: 0; border: 0; background: none; }

/* ==========================================================================
   44. 后台富文本编辑器 + 工具栏气泡
   —— 编辑器本体在 assets/richtext.js，气泡（React Bits 的 WarmTooltip）
      在 assets/warm-tooltip.js，两个都只在后台加载。
   ========================================================================== */

.field { margin-bottom: 14px; }
.field > .field-name {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

.rte { position: relative; }

/* 默认给一个朴素的 textarea —— 它一定能跟着表单提交，
   所以就算 richtext.js 没加载成功（被拦、被扩展挡了、临时 404），
   用户打的正文也不会丢。richtext.js 起来后给 .rte 加上 .is-on，
   才把 textarea 换成所见即所得的那套控件。 */
.rte input[type="file"].rte-file { display: none; }
.rte .rte-bar,
.rte .rte-area { display: none; }
.rte.is-on .rte-raw { display: none; }
.rte.is-on .rte-bar { display: flex; }
.rte.is-on .rte-area { display: block; }

.rte-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--panel-2);
}

.rte-bar .rte-style {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.rte .rte-bar select {
  width: auto;
  height: 32px;
  margin: 0;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.rte-bar .rte-size { display: inline-flex; align-items: center; margin: 0; }

/* 颜色按钮：圆点显示当前字色，点开是固定色板 */
.rte-color-btn { position: relative; }
.rte-color-dot {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--dot, transparent);
  box-shadow: inset 0 0 0 1.5px rgba(127, 137, 175, .55);
}
/* 当前没有设定颜色时，圆点画成「空」的样子 */
.rte-color-dot.is-none {
  background:
    linear-gradient(135deg, transparent calc(50% - 1px), var(--muted) calc(50% - 1px),
      var(--muted) calc(50% + 1px), transparent calc(50% + 1px));
}

.rte-palette {
  position: absolute;
  z-index: 30;
  left: 0;
  top: 46px;
  display: grid;
  grid-template-columns: repeat(5, 30px);
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.rte-palette[hidden] { display: none; }

.rte-sw {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--sw, transparent);
  color: var(--muted);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.rte-sw:hover { transform: scale(1.12); }
.rte-sw:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rte-sw.is-on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--sw, var(--brand)); }
.rte-sw svg { width: 15px; height: 15px; }
/* 「原色」：单独占一行，圆点预览的就是主题默认的文字颜色 */
.rte-sw.is-default {
  grid-column: 1 / -1;
  width: auto;
  height: 30px;
  gap: 7px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
}
.rte-sw.is-default:hover { transform: none; background: var(--hover); color: var(--text); }
.rte-sw.is-default .rte-sw-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--text);
}

.rte-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.rte-btn:hover { background: var(--hover); color: var(--text); }
.rte-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rte-btn.is-on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.rte-btn .icon { width: 18px; height: 18px; }
.rte-sep { width: 1px; height: 18px; margin: 0 4px; background: var(--line); }

.rte-area {
  min-height: 220px;
  max-height: 560px;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--field);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.8;
  outline: 0;
}
.rte-area:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.rte.is-empty .rte-area::before {
  content: attr(data-placeholder);
  color: var(--muted);
  opacity: .8;
  pointer-events: none;
}

/* 编辑区里的排版跟前台（第 43 节）保持一致，所见即所得 */
.rte-area > *:last-child { margin-bottom: 0; }
.rte-area p { margin: 0 0 10px; }
.rte-area h2 { margin: 14px 0 8px; font-size: 19px; }
.rte-area h3 { margin: 12px 0 6px; font-size: 16.5px; }
.rte-area ul, .rte-area ol { margin: 0 0 10px; padding-left: 22px; }
.rte-area li { margin: 4px 0; }
.rte-area blockquote {
  margin: 0 0 10px;
  padding: 9px 14px;
  border-left: 3px solid var(--brand-line);
  border-radius: 0 10px 10px 0;
  background: var(--brand-soft);
}
.rte-area img { display: block; max-width: 100%; height: auto; margin: 10px 0; border-radius: 10px; border: 1px solid var(--line); }
.rte-area a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.rte-area hr { margin: 16px 0; border: 0; border-top: 1px solid var(--line); }
.rte-area code { padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); font-size: .92em; }

.rte-tip { margin: 8px 0 0; }

.rte.is-busy { opacity: .6; pointer-events: none; }

.rte-pop {
  position: absolute;
  z-index: 30;
  left: 0;
  top: 46px;
  width: min(330px, 100%);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.rte-pop label { margin-bottom: 10px; }
.rte-pop input { margin-top: 6px; }
.rte-pop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }

/* ---------------------- 工具栏气泡（WarmTooltip） ----------------------
   浅色主题用深色药丸，深色主题用浅色药丸，两种都是高对比。
   位置：外壳是个 0×0 的定点，translate 到按钮正上方（气滑过去就是过渡这个值），
   药丸以那个点为中心往上长。 */
.warm-tip {
  --wt-surface: #262a40;
  --wt-ink: #f2f4ff;
  --wt-kbd: rgba(255, 255, 255, .16);

  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 9999;
  pointer-events: none;
  translate: var(--wt-x, 0px) var(--wt-y, 0px);
  transition: translate var(--wt-travel, 320ms) cubic-bezier(.23, 1, .32, 1);
}
html[data-theme="dark"] .warm-tip {
  --wt-surface: #eef0fa;
  --wt-ink: #14172b;
  --wt-kbd: rgba(20, 23, 43, .10);
}

.warm-tip::after {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--wt-surface);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 160ms linear;
}
.warm-tip[data-open]::after { opacity: 1; }

.warm-tip__box {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--wt-surface);
  color: var(--wt-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 8px 24px -8px rgba(0, 0, 0, .45);
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(var(--wt-s, .94));
  transform-origin: 50% 100%;
  filter: blur(var(--wt-b, 4px));
  transition: opacity 160ms cubic-bezier(.23, 1, .32, 1),
              transform 160ms cubic-bezier(.23, 1, .32, 1),
              filter 160ms cubic-bezier(.23, 1, .32, 1),
              width 320ms cubic-bezier(.23, 1, .32, 1);
}
.warm-tip[data-open] .warm-tip__box {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  filter: blur(0);
}

.warm-tip__text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.warm-tip__kbd {
  display: inline-flex;
  align-items: center;
  height: 1.55em;
  padding: 0 .45em;
  border-radius: .4em;
  background: var(--wt-kbd);
  font-family: inherit;
  font-size: .86em;
  font-weight: 500;
  letter-spacing: .02em;
}

@media (prefers-reduced-motion: reduce) {
  .warm-tip,
  .warm-tip::after,
  .warm-tip__box { transition-duration: 1ms !important; }
}

/* ============================================================
   45. 404：找不到的页面
   —— 一张会眨眼的脸（改自 Uiverse.io 的 preet_7613）
      关键帧沿用原作者那套，数值按我们的尺寸调过
   ============================================================ */
.nf {
  display: flex;
  align-items: center;
  justify-content: center;
  /* 只有一张卡片，顶在上面会显得很空：撑高一点放到视觉中间 */
  min-height: max(460px, calc(100vh - 320px));
  padding-top: 26px;
  padding-bottom: 26px;
}
.nf-box {
  width: 100%;
  max-width: 540px;
  padding: 4px 26px 32px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}
.nf-code {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .32em;
  text-indent: .32em;
  color: var(--brand);
}
.nf-title { margin: 0 0 8px; font-size: 22px; letter-spacing: -.02em; }
.nf-text {
  margin: 0 auto;
  max-width: 380px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}
.nf-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ---------------- 会眨眼的脸 ---------------- */
.my-custom-face-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 196px;
  color: var(--brand);
}
.my-custom-face-container .face {
  width: 172px;
  height: 172px;
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.my-custom-face-container .face__pupil { fill: currentColor; stroke: none; }

/* 先画一圈脸 */
.my-custom-face-container .face__head {
  stroke-dasharray: 478;
  stroke-dashoffset: 478;
  animation: face-draw 1.1s .1s ease forwards;
}
/* 嘴是两半，靠 dashoffset 从两边合上，长度得和关键帧里的 102 对上 */
.my-custom-face-container .face__mouth-left,
.my-custom-face-container .face__mouth-right { stroke-dasharray: 102; }

.my-custom-face-container .face__eyes,
.my-custom-face-container .face__eye-lid,
.my-custom-face-container .face__mouth-left,
.my-custom-face-container .face__mouth-right,
.my-custom-face-container .face__nose,
.my-custom-face-container .face__pupil {
  animation: eyes 1s .3s forwards;
}
.my-custom-face-container .face__eye-lid,
.my-custom-face-container .face__pupil {
  animation-duration: 4s;
  animation-delay: 1.3s;
  animation-iteration-count: infinite;
}
.my-custom-face-container .face__eye-lid { animation-name: eye-lid; }
.my-custom-face-container .face__mouth-left { animation-name: mouth-left; }
.my-custom-face-container .face__mouth-right { animation-name: mouth-right; }
.my-custom-face-container .face__nose { animation-name: nose; }
.my-custom-face-container .face__pupil { animation-name: pupil; }

@keyframes face-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes eye-lid {
  0%, 40%, 45%, 100% { transform: translateY(0); }
  42.5% { transform: translateY(17.5px); }
}
@keyframes eyes {
  from { transform: translateY(112.5px); }
  to { transform: translateY(15px); }
}
/* 原版眼珠横移 35px、眨眼下沉 17.5px，我们的眼睛没这么大，
   缩到 7px 才不出框（眼珠 r5 停在 r13 的眼眶里） */
@keyframes pupil {
  0%, 37.5%, 40%, 45%, 87.5%, 100% { transform: translate(0, 0); }
  12.5%, 25%, 62.5%, 75% { transform: translate(-7px, 0); }
  42.5% { transform: translate(0, 7px); }
}
@keyframes mouth-left {
  from, 50% { stroke-dashoffset: -102; }
  to { stroke-dashoffset: 0; }
}
@keyframes mouth-right {
  from, 50% { stroke-dashoffset: 102; }
  to { stroke-dashoffset: 0; }
}
@keyframes nose {
  from { transform: translate(0, 0); }
  to { transform: translate(0, 22.5px); }
}

@media (prefers-reduced-motion: reduce) {
  .my-custom-face-container .face__head,
  .my-custom-face-container .face__eyes,
  .my-custom-face-container .face__eye-lid,
  .my-custom-face-container .face__mouth-left,
  .my-custom-face-container .face__mouth-right,
  .my-custom-face-container .face__nose,
  .my-custom-face-container .face__pupil { animation: none; }
  /* 不动的话要直接摆成动画结束时的样子，否则脸是空的 */
  .my-custom-face-container .face__head { stroke-dashoffset: 0; }
  .my-custom-face-container .face__eyes { transform: translateY(15px); }
  .my-custom-face-container .face__nose { transform: translateY(22.5px); }
}

@media (max-width: 560px) {
  .nf-box { padding: 2px 18px 26px; border-radius: 20px; }
  .my-custom-face-container { height: 168px; }
  .my-custom-face-container .face { width: 146px; height: 146px; }
  .nf-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ==========================================================================
   46. 关于我们：社交链接（B站 / QQ 群等）
   原来四个数据卡片的位置，现在是一排玻璃链接条；条数由后台决定，几个都铺满一行。
   ========================================================================== */
.about-social {
  display: flex;
  gap: 14px;
}

.sc-link {
  --sc: var(--brand);
  --sc-soft: var(--brand-soft);
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background-color: var(--panel);
  background-image: none;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-top);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, border-color .18s ease, background-image .18s ease,
              box-shadow .18s ease;
}
.sc-link .sc-ico {
  display: flex;
  flex: none;
  color: var(--sc);
}
.sc-link .sc-ico .icon { width: 22px; height: 22px; }
.sc-link .sc-go {
  display: flex;
  margin-left: auto;
  color: var(--muted);
  opacity: .5;
  transition: transform .18s ease, opacity .18s ease;
}
.sc-link .sc-go .icon { width: 15px; height: 15px; }

.sc-link:hover,
.sc-link:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: var(--sc);
  background-image: linear-gradient(var(--sc-soft), var(--sc-soft));
  box-shadow: 0 12px 26px -16px var(--sc);
}
.sc-link:hover .sc-go,
.sc-link:focus-visible .sc-go { opacity: 1; transform: translateX(2px); }

.sc-link--douyin   { --sc: #fe2c55; --sc-soft: rgba(254, 44, 85, .13); }
.sc-link--bilibili { --sc: #fb7299; --sc-soft: rgba(251, 114, 153, .16); }
.sc-link--qq       { --sc: #12b7f5; --sc-soft: rgba(18, 183, 245, .14); }
.sc-link--wechat   { --sc: #07c160; --sc-soft: rgba(7, 193, 96, .14); }

@media (max-width: 760px) {
  .about-social { flex-wrap: wrap; gap: 11px; }
  .sc-link { flex: 1 1 calc(50% - 6px); padding: 13px; border-radius: 16px; gap: 9px; font-size: 13.5px; }
  .sc-link .sc-ico .icon { width: 20px; height: 20px; }
  /* 手机上 B 站排到最后 */
  .about-social .sc-link--bilibili { order: 9; }
}

/* ==========================================================================
   47. 首页标题 + 简介
   这两块以前是 sr-only（藏起来给读屏工具的），搜索引擎抓首页时等于没有正文，
   所以放出来当落地页标题。别再改回 sr-only。
   ========================================================================== */
.home-intro {
  max-width: 780px;
  margin: 2px auto 0;
  text-align: center;
}
.home-intro__title {
  margin: 0;
  font-size: clamp(20px, 3vw, 31px);
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--text);
}
.home-intro__lead {
  margin: 11px 0 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--muted);
}
@media (max-width: 620px) {
  .home-intro { max-width: 100%; }
  .home-intro__lead { margin-top: 9px; font-size: 13.5px; line-height: 1.8; }
}

/* ==========================================================================
   48. 教程中心（文档布局）
   总览页 = 标签 + 数据行 → 章节卡 → 快速开始 → 常见问题 → 求助条；
   章节页 = 左侧吸顶目录 + 右侧正文。只新增规则，上面原有的 .tut-* 不动。
   配色全部走主题变量（--panel / --line / --brand / --glass-*），深浅色自动跟随。
   ========================================================================== */

/* ---- 总览页：小标签 ---- */
.tut-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  padding: 6px 14px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .08em;
}
.tut-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
}

/* ---- 总览页：数据行 ---- */
.tut-stats {
  display: flex;
  flex-wrap: wrap;
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tut-stat {
  flex: 1 1 0;
  min-width: 168px;
  padding: 16px 24px 17px;
  border-left: 1px solid var(--line);
}
.tut-stat:first-child { border-left: 0; padding-left: 2px; }
.tut-stat__k { display: block; font-size: 12.5px; letter-spacing: .05em; color: var(--muted); }
.tut-stat__v { display: block; margin-top: 8px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }

/* ---- 总览页：章节卡 ---- */
.tut-chapters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px;
}
.tut-chap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 24px 24px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow), var(--glass-top);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.tut-chap::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent 78%);
}
.tut-chap__no {
  position: absolute;
  top: 4px;
  right: 18px;
  font-size: 76px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--text);
  opacity: .055;
  pointer-events: none;
}
.tut-chap__badge {
  align-self: flex-start;
  padding: 5px 13px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}
.tut-chap h3 { position: relative; margin: 0; font-size: 21px; letter-spacing: -.01em; }
.tut-chap > p { position: relative; margin: 0; font-size: 14px; line-height: 1.78; color: var(--muted); }
.tut-chap__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.tut-chap__chips span {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  font-size: 12px;
  color: var(--muted);
}
.tut-chap__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.tut-chap__foot b { display: block; font-size: 14px; }
.tut-chap__foot small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.tut-chap__go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--brand);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.tut-chap__go .icon { width: 17px; height: 17px; }
a.tut-chap:hover { transform: translateY(-3px); border-color: var(--brand-line); box-shadow: var(--shadow-lg), var(--glass-top); }
a.tut-chap:hover .tut-chap__go { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---- 总览页：快速开始 ---- */
.tut-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 14px;
}
.tut-quick__card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow), var(--glass-top);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--text);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}
.tut-quick__no {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--brand);
}
.tut-quick__card b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.tut-quick__card b .icon { width: 17px; height: 17px; color: var(--brand); }
.tut-quick__card p { margin: 0; font-size: 13px; line-height: 1.72; color: var(--muted); }
.tut-quick__go { margin-top: auto; padding-top: 12px; color: var(--brand); opacity: .75; transition: transform .2s ease, opacity .2s ease; }
.tut-quick__go .icon { width: 16px; height: 16px; }
a.tut-quick__card:hover { transform: translateY(-2px); border-color: var(--brand-line); }
a.tut-quick__card:hover .tut-quick__go { opacity: 1; transform: translateX(3px); }

/* ---- 总览页：求助条 ---- */
.tut-help {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow), var(--glass-top);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.tut-help__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
}
.tut-help__ico .icon { width: 21px; height: 21px; }
.tut-help__tx { flex: 1 1 260px; min-width: 0; }
.tut-help__tx h2 { margin: 0; font-size: 17px; }
.tut-help__tx p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.tut-help__act { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ---- 章节页：左侧目录 + 右侧正文 ---- */
.tut-doc {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.tut-side {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow), var(--glass-top);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.tut-side__top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 13px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.tut-side__top .icon { flex: none; width: 18px; height: 18px; color: var(--brand); }
.tut-side__top:hover { background: var(--hover); }
.tut-side__top.is-on { background: var(--brand-soft); color: var(--brand); }
.tut-side__group { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.tut-side__label {
  display: block;
  padding: 0 13px 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.tut-side__link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.tut-side__link + .tut-side__link { margin-top: 2px; }
.tut-side__link:hover { background: var(--hover); color: var(--text); }
.tut-side__link.is-on { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand-line); }
.tut-side__ico { display: inline-flex; flex: none; }
.tut-side__ico .icon { width: 17px; height: 17px; }

.tut-main { min-width: 0; }
.tut-main > .tut-card > .tut-tip:first-child { margin-top: 0; }
.tut-main .tut-pager { margin-top: 22px; }

@media (max-width: 980px) {
  .tut-doc { grid-template-columns: 1fr; gap: 16px; }
  .tut-side {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tut-side::-webkit-scrollbar { display: none; }
  .tut-side__top { flex: none; padding: 9px 14px; white-space: nowrap; }
  .tut-side__group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 0 4px;
    padding: 0 0 0 12px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .tut-side__label { display: none; }
  .tut-side__link { flex: none; padding: 9px 14px; white-space: nowrap; }
  .tut-side__link + .tut-side__link { margin-top: 0; }
}

@media (max-width: 620px) {
  .tut-stat { flex: 1 1 100%; border-left: 0; padding: 12px 0 13px; }
  .tut-stat + .tut-stat { border-top: 1px solid var(--line); }
  .tut-stat__v { margin-top: 5px; font-size: 19px; }
  .tut-chapters { grid-template-columns: 1fr; }
  .tut-chap { padding: 20px 20px 18px; }
  .tut-chap__no { font-size: 58px; right: 14px; }
  .tut-chap h3 { font-size: 19px; }
  .tut-help { padding: 18px; gap: 14px; }
  .tut-help__act { width: 100%; }
  .tut-help__act .btn { flex: 1 1 0; justify-content: center; }
}


/* ==========================================================================
   49. 页脚（四栏：品牌 / 内容 / 交流 / 帮助 + 版权条）
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-top);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px 26px;
  padding: 48px 0 34px;
}

.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.foot-logo { display: inline-flex; line-height: 0; }
.foot-logo img { height: 44px; width: auto; border-radius: 10px; }
.foot-name { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.foot-tagline { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 300px; }

.foot-col { display: flex; flex-direction: column; gap: 11px; }
.foot-col h4 {
  margin: 0 0 3px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
}
.foot-col a,
.foot-col span {
  width: fit-content;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: color .16s ease;
}
.foot-col a:hover { color: var(--brand); }

.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* 回到顶部：毛玻璃圆钮，滚过一屏才浮出来 */
.to-top {
  position: fixed;
  right: 24px;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 60;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-top);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.94);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease,
              color .16s ease, border-color .16s ease;
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--brand); border-color: var(--brand-line); }
.to-top:active { transform: scale(.94); }
.to-top .icon { width: 20px; height: 20px; }

@media (max-width: 1000px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 22px; padding: 38px 0 30px; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .site-footer { margin-top: 52px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 32px 0 26px; }
  .foot-brand { align-items: center; text-align: center; }
  .foot-tagline { max-width: none; }
  .foot-col { align-items: center; text-align: center; }
  .foot-col a, .foot-col span { width: auto; }
  .foot-bottom { flex-direction: column; text-align: center; padding: 16px 0 20px; }
}

@media (max-width: 860px) {
  /* 手机底部导航占着屏幕底下，圆钮往上让一截 */
  .to-top { right: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); width: 40px; height: 40px; }
}

/* ==========================================================================
   50. 整合包页：更新日志（折叠手风琴）
   ========================================================================== */
.logbox {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow), var(--glass-top);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  overflow: hidden;
}

.log { border-top: 1px solid var(--line); }
.log:first-child { border-top: 0; }

.log__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s ease;
}
.log__head::-webkit-details-marker { display: none; }
.log__head::marker { content: ""; }
.log__head:hover { background: var(--hover); }
.log[open] > .log__head { background: var(--brand-soft); }

.log__mark {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition: background .2s ease, box-shadow .2s ease;
}
.log.is-latest .log__mark { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

.log__ver {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.log.is-latest .log__ver { color: var(--brand); }

.log__tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999rem;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-line);
}

.log__meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.log__count { flex: none; }

.log__chev {
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  border-radius: 1px;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .25s ease, border-color .2s ease;
}
.log[open] > .log__head .log__chev { transform: rotate(-135deg) translate(-1px, -1px); border-color: var(--brand); }

.log__list {
  margin: 0;
  padding: 0 18px 16px 40px;
  list-style: none;
  animation: logIn .26s ease;
}
.log__list li {
  position: relative;
  font-size: 13.6px;
  line-height: 1.85;
  color: var(--muted);
}
.log__list li::before {
  content: "";
  position: absolute;
  left: -13px;
  top: .8em;
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: var(--brand-line);
}
@keyframes logIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.log-toggle {
  flex: none;
  align-self: flex-start;
  margin-top: 4px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999rem;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel);
  box-shadow: var(--glass-top);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.log-toggle:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }

@media (max-width: 620px) {
  .log__head { padding: 13px 14px; gap: 8px; }
  .log__ver { font-size: 14.5px; }
  .log__tag { height: 20px; padding: 0 8px; font-size: 11px; }
  .log__count { display: none; }
  .log__list { padding: 0 14px 14px 30px; }
  .log__list li { font-size: 13.2px; }
  .log__list li::before { left: -12px; }
  .log-toggle { height: 30px; padding: 0 12px; font-size: 12px; }
}
