/* ==========================================================================
   MiuCMS 官网 - 主样式表（非关键 CSS，异步加载）
   设计基调：深空底 + 玻璃态发光卡片 + 电光渐变
   ========================================================================== */

/* 会员徽章 .mtag 的中文字体：霞鹜文楷（LXGW WenKai）Bold，开源免费（OFL 协议）。
   字体已自托管，不再依赖外网 CDN：
   - lxgw-wenkai-bold.css 是官方分片表，里面的 ./files/ 路径已改成本地 ../fonts/lxgw-wenkai/
   - 97 个 woff2 分片共 4.4 MB，但浏览器按 unicode-range 只下载页面上实际出现的那几个字
   - 选 Bold 这份是因为它自带 700 字重，不会被浏览器合成加粗（合成会把楷体笔画糊成一团）
   - 字体取不到时会回落到 .mtag 上写的系统字体栈，不会留空白 */

/* --------------------------------------------------------------------------
   1. 设计令牌
   -------------------------------------------------------------------------- */
:root {
  --c-primary: #1e9fff;
  --c-bg: #0f1729;
  --c-violet: #7c3aed;
  --c-cyan: #00d4ff;
  --c-surface: #1e293b;
  --c-text: #f1f5f9;
  --c-muted: #94a3b8;
  /* 正文里的各级标题：比正文色淡一档，比弱化色亮一档 */
  --c-heading: #cbd5e1;
  /* 补充说明 / 脚注：比弱化色再淡一档，只用于看完主信息后的次要文案 */
  --c-hint: #7d8ca0;
  /* 危险 / 被驳回：深色底下要用浅红才够对比（#fb7185 这类深底亮红在浅色主题里只有 2.4:1，
     所以两个主题各给一个值，别拿 #fb7185 当文字色用） */
  --c-danger: #fda4af;

  --surface-glass: rgba(30, 41, 59, 0.62);
  --surface-solid: #172033;
  --border-soft: rgba(148, 163, 184, 0.16);
  --border-glow: rgba(30, 159, 255, 0.45);

  --grad-brand: linear-gradient(135deg, #1e9fff 0%, #7c3aed 55%, #00d4ff 100%);
  --grad-cool: linear-gradient(135deg, #00d4ff 0%, #1e9fff 100%);
  --grad-violet: linear-gradient(135deg, #7c3aed 0%, #1e9fff 100%);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-card: 0 18px 48px rgba(2, 8, 23, 0.55);
  --shadow-glow: 0 12px 38px rgba(30, 159, 255, 0.35);

  --container: 1240px;
  --nav-h: 74px;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
}

/* --------------------------------------------------------------------------
   2. 基础重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,h2{font-family: Georgia, "Times New Roman", serif!important;}
h1, h2, h3, h4, h5 {
  margin: 0 0 0.5em;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 2.9vw, 2.5rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.02rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
a:hover { color: var(--c-cyan); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(30, 159, 255, 0.4); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b1220; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1e9fff, #7c3aed);
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   3. 背景层（粒子画布 + 星云光斑）
   -------------------------------------------------------------------------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 620px at 12% -8%, rgba(30, 159, 255, 0.28), transparent 62%),
    radial-gradient(760px 520px at 88% 6%, rgba(124, 58, 237, 0.3), transparent 60%),
    radial-gradient(820px 640px at 50% 108%, rgba(0, 212, 255, 0.16), transparent 62%),
    var(--c-bg);
}
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 12%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 12%, transparent 78%);
}

/* --------------------------------------------------------------------------
   4. 布局容器与区块
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.container--narrow { max-width: 940px; }

main { display: block; min-height: 60vh; }

.section {
  padding-block: clamp(56px, 7vw, 104px);
  position: relative;
}
.section--tight { padding-block: clamp(40px, 5vw, 68px); }

.section-head {
  max-width: 760px;
  margin: 0 auto clamp(32px, 4vw, 56px);
  text-align: center;
}
.section-head h2 { margin-bottom: 0.35em; }
.section-head .grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-head p { color: var(--c-muted); margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin-bottom: 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-glow);
  background: rgba(30, 159, 255, 0.1);
  color: var(--c-cyan);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-cyan);
  box-shadow: 0 0 12px var(--c-cyan);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 999;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { left: 16px; color: #fff; }

/* --------------------------------------------------------------------------
   5. 导航栏
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(15, 23, 41, 0.82);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--border-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { width: 148px; height: 40px; }
.brand:hover { opacity: 0.92; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-menu > li > a {
  display: block;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  color: var(--c-text);
  font-size: 0.95rem;
  font-weight: 600;
  position: relative;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav-menu > li > a:hover {
  color: #fff;
  background: rgba(30, 159, 255, 0.14);
}
.nav-menu > li > a.active {
  color: #fff;
  background: rgba(30, 159, 255, 0.18);
  box-shadow: inset 0 0 0 1px var(--border-glow);
}
.nav-menu > li > a.active::after,.nav-menu > li > a.active::after  {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 22px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: var(--grad-cool);
}

/* 登录 / 注册 / 会员中心按钮靠右，与右侧的主题切换按钮挨在一起 */
.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-actions ~ .theme-toggle { margin-left: -8px; }
/* 导航栏右侧这一排（登录 / 会员中心 / 语言 / 模式）统一 36px 高、12px 圆角，
   原来登录 ~38、会员中心 46、语言与模式 42，四种尺寸摆一排不整齐 */
.nav-actions .btn {
  height: 36px;
  padding: 0 14px;
  font-size: 0.82rem;
  border-radius: 12px;
}

.nav-toggle {
  display: none;
  /* 移动端这一排也会出现汉堡按钮，跟语言/模式/登录同高才不突兀 */
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.6);
  color: var(--c-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { border-color: var(--border-glow); }
.nav-toggle .bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  position: relative;
  transition: transform 0.28s var(--ease), background 0.2s;
}
.nav-toggle .bar::before,
.nav-toggle .bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s var(--ease);
}
.nav-toggle .bar::before { top: -6px; }
.nav-toggle .bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar::after { transform: translateY(-6px) rotate(-45deg); }

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* 高度跟相邻的语言/模式按钮对齐；左内边距小一点，让头像贴近圆角 */
  height: 36px;
  padding: 0 12px 0 4px;
  border-radius: 12px;
  border: 1px solid var(--border-glow);
  background: rgba(30, 159, 255, 0.12);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
}
/* 导航登录区：游客态与已登录态都写在 HTML 里，脚本只切换 hidden */
.nav-actions__guest { display: flex; align-items: center; gap: 12px; }
/* 头像跟着整体缩小：26px 放进 36px 高的按钮里，上下各留 4px */
.nav-user .avatar { width: 26px; height: 26px; border-radius: 9px; font-size: 0.78rem; }
/* 兜底：hidden 属性要能盖住组件自身的 display（登录态 / 筛选 / 分页都靠它切换） */
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   6. 按钮
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: rgba(30, 41, 59, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--c-text);
  font-size: 0.96rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
    background 0.28s var(--ease), border-color 0.28s var(--ease);
}
.btn svg { flex: none; }
.btn:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  color: #fff;
}
.btn:active { transform: translateY(-1px) scale(0.99); }

.btn--primary {
  border: none;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 10px 30px rgba(30, 159, 255, 0.32);
}
.btn--primary:hover { box-shadow: 0 16px 46px rgba(30, 159, 255, 0.5); color: #fff; }

.btn--ghost {
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--lg { padding: 17px 40px; font-size: 1.06rem; }
.btn--md { padding: 12px 30px; font-size: 1.06rem; }
.btn--sm { padding: 9px 18px; font-size: 0.86rem; }
.btn--xs { padding: 3px 6px; font-size: 0.66rem; }
.btn--block { width: 100%; }

.btn--pulse { position: relative; }
.btn--pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid rgba(0, 212, 255, 0.55);
  animation: pulse-ring 2.4s var(--ease) infinite;
  pointer-events: none;
}
@keyframes pulse-ring {
  0% { transform: scale(0.96); opacity: 0.9; }
  70% { transform: scale(1.14); opacity: 0; }
  100% { transform: scale(1.14); opacity: 0; }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.btn-row--center { justify-content: center; }

/* --------------------------------------------------------------------------
   7. 卡片（玻璃态 + 发光边）
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-8px);
  border-color: transparent;
  box-shadow: 0 26px 60px rgba(2, 8, 23, 0.7), 0 0 0 1px rgba(30, 159, 255, 0.25);
}
.card:hover::before { opacity: 1; }

.card--flat { padding: 0; overflow: hidden; }
.card--flat:hover { transform: translateY(-8px); }

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(30, 159, 255, 0.12);
  border: 1px solid var(--border-glow);
  margin-bottom: 18px;
}
.icon-badge svg { width: 28px; height: 28px; }
.icon-badge--sm { width: 44px; height: 44px; border-radius: 14px; margin-bottom: 0; }
.icon-badge--sm svg { width: 22px; height: 22px; }

.card p { color: var(--c-muted); margin-bottom: 0; }

.muted { color: var(--c-muted); }
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 网格 */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --------------------------------------------------------------------------
   8. 标签
   -------------------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-soft);
  background: rgba(148, 163, 184, 0.1);
  color: var(--c-muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.tag--free { color: #34d399; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.1); }
.tag--pro { color: var(--c-cyan); border-color: rgba(0, 212, 255, 0.4); background: rgba(0, 212, 255, 0.1); }
.tag--hot { color: #fb7185; border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.1); }
.tag--new { color: #a78bfa; border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.1); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* 列表里的标签比单独展示的小一号，一排能多放几个 */
.tag-list .tag {
  padding: 2px 8px;
  font-size: 0.7rem;
}

/* --------------------------------------------------------------------------
   8.x 会员徽章 .mtag（会员中心以外也会用到，所以放在通用样式里）
   用法：<span class="mtag mtag--gold"><i>✦</i><i>✦</i>知遇</span>
   容器只负责排布，例如 .tag-list / .member-side__tags，徽章本身不依赖它们。
   -------------------------------------------------------------------------- */
.mtag {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  /* 霞鹜文楷（自带 700 字重）打头，取不到就依次回落到苹方 / 鸿蒙 / 思源 / 雅黑 */
  font-family:Georgia, "Times New Roman", serif!important;
  /* 楷体笔画比黑体细，放大一点才看得清 */
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  /* 深色底上的浅色字，关掉次像素平滑会干净一些 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--c-text);
  background: rgba(0, 163, 184, 0.08);
}
/* 闪动的星星：左上角一颗、右下角一颗，落在边框外侧 */
.mtag i {
  position: absolute;
  font-style: normal;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 6px currentColor, 0 0 12px currentColor;
  animation: mtag-twinkle 4.6s ease-in-out infinite;
}
/* 两颗星星落在圆角内侧（不在边框上）：左上 / 右下各一颗 */
.mtag i:nth-of-type(1) { top: 2px; left: 6px; font-size: 0.66rem; }
.mtag i:nth-of-type(2) { right: 6px; bottom: 2px; font-size: 0.5rem; animation-delay: 4s; }

/* 初见：蓝色实心边框 + 蓝色星星（无流动动画） */
.mtag--initial { border-color: #38bdf8; color: #38bdf8; background: rgba(56, 189, 248, 0.08); }
/* 知遇：金色边框 + 金色星星 */
.mtag--gold { border-color: #f6c453; color: #f6c453; background: rgba(246, 196, 83, 0.08); }
/* 无界：紫色边框 + 紫色星星 */
.mtag--violet { border-color: #a855f7; color: #a855f7; background: rgba(168, 85, 247, 0.08); }

/* 开发者：全彩流动边框（conic 彩虹环旋转 + 蓝色微光晕），不带星星 */
.mtag--dev {
  --mtag-c1: #ff5f6d;
  --mtag-c2: #34d399;
  --mtag-c3: #38bdf8;
  border-color: transparent;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.22);
  /* 文字也用同色系彩虹渐变，但渐变是静止的（不滚动、不流动） */
  background-image: linear-gradient(90deg, #ff5f6d 0%, #ffc371 24%, #34d399 48%, #38bdf8 74%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
.mtag--dev::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--mtag-angle), var(--mtag-c1), var(--mtag-c2), var(--mtag-c3), var(--mtag-c1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: mtag-spin 10s linear infinite;
  pointer-events: none;
}
/* 让 --mtag-angle 能参与动画（不注册的话角度不会插值，彩虹环不会转） */
@property --mtag-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes mtag-spin { to { --mtag-angle: 360deg; } }
@keyframes mtag-twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .mtag::before,
  .mtag i { animation: none; }
}


/* --------------------------------------------------------------------------
   9. Hero 区
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(48px, 6vw, 96px) clamp(56px, 7vw, 110px);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 { margin-bottom: 18px; position: relative; } /* relative：左上角印章以标题为基准定位 */

/* ---------------------------------------------------- Hero 标题左上角印章
   仿实物印章：朱砂红 + 外粗内细双线框 + 田字格排版（竖排右起：永久 / 免费），
   再叠两层做旧：SVG 噪声位移滤镜做毛边（#seal-ink），噪声遮罩做印泥没吃满的斑点。 */
.seal {
  position: absolute;
  /* 基准偏移：容器左右内边距只有 24px，再往外就会被 .hero 的 overflow:hidden 切掉。
     宽屏那档在下面单独顶出去 */
  left: -14px;
  top: -30px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  padding: 3px;
  border: 3px solid currentColor;
  /* 四角半径故意不一致：手工刻的章不会是标准圆角 */
  border-radius: 6px 4px 7px 5px / 5px 7px 4px 6px;
  color: #c9333b;
  opacity: 0.92;
  transform: rotate(-9deg);
  pointer-events: none;
  user-select: none;
  filter: url(#seal-ink);
  /* 遮罩：分形噪声的 alpha 通道随机掉到 0.6，形成印泥不匀的白点 */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='ink'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' seed='3'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='1 1 1 0.6 1 1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23ink)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='ink'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' seed='3'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='1 1 1 0.6 1 1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23ink)'/%3E%3C/svg%3E");
  /* 遮罩跟着印章尺寸走，斑点密度才不会变稀 */
  -webkit-mask-size: 88px 88px;
  mask-size: 88px 88px;
}
/* 内圈细线：和外框组成「外粗内细」的双线框，是印章的标准结构 */
.seal::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid currentColor;
  border-radius: 4px;
  opacity: 0.45;
}
/* 田字格：竖排 + 从右往左换行 → 右列「永久」、左列「免费」，跟传统印章读法一致 */
.seal__text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  /* 列长 = 2 ×（字号 + 字距）= 48px，正好装两个字后换行到左列，组成田字格 */
  height: 48px;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 4px;
  text-align: center;
  text-shadow: 0 0 1px rgba(201, 51, 59, 0.5); /* 印泥渗开的一点晕边 */
}

/* 容器 1240px + 两侧各留白 ≥10px 之后，才把印章顶到标题外面，更像随手盖上去的 */
@media (min-width: 1321px) {
  .seal { left: -34px; top: -28px; }
}

@media (max-width: 640px) {
  /* 窄屏：章再缩一号并贴回文字边角，避免被 .hero 的 overflow:hidden 切掉 */
  .seal {
    left: -6px;
    top: -26px;
    width: 54px;
    height: 54px;
    border-width: 2.5px;
  }
  .seal__text { height: 38px; font-size: 16px; letter-spacing: 3px; }
}
.hero__lead {
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  color: var(--c-muted);
  max-width: 56ch;
  margin-bottom: 30px;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 30px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.hero__meta li { display: flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 18px; height: 18px; color: var(--c-cyan); flex: none; }

/* 3D 倾斜产品卡 */
.tilt-stage { perspective: 1200px; }
.tilt-card {
  position: relative;
  border-radius: var(--r-lg);
  padding: 14px;
  background: linear-gradient(160deg, rgba(30, 159, 255, 0.22), rgba(124, 58, 237, 0.18));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 40px 90px rgba(2, 8, 23, 0.7);
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease);
  will-change: transform;
}
.tilt-card__screen {
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.tilt-card__screen img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transform: translateZ(40px); }
.tilt-card__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(15, 23, 41, 0.75);
}
.tilt-card__bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #475569; }
.tilt-card__bar .dot:nth-child(1) { background: #fb7185; }
.tilt-card__bar .dot:nth-child(2) { background: #fbbf24; }
.tilt-card__bar .dot:nth-child(3) { background: #34d399; }
.tilt-card__bar span {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--c-muted);
  font-family: "Cascadia Code", Consolas, monospace;
}
.tilt-card__float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 41, 0.9);
  border: 1px solid var(--border-glow);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(2, 8, 23, 0.6);
  transform: translateZ(70px);
  backdrop-filter: blur(8px);
}
.tilt-card__float--a { top: -18px; right: -14px; }
.tilt-card__float--b { bottom: -20px; left: -16px; }
.tilt-card__float svg { width: 18px; height: 18px; color: var(--c-cyan); }

/* 打字机代码条 */
.code-strip {
  margin-top: 28px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 41, 0.86);
  backdrop-filter: blur(12px);
  overflow: hidden;
  max-width: 620px;
}
.code-strip__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.78rem;
  color: var(--c-muted);
  font-family: "Cascadia Code", Consolas, monospace;
}
.code-strip__body {
  padding: 16px 18px;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.9;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-all;
}
.code-strip__body .k { color: #7dd3fc; }
.code-strip__body .s { color: #a5b4fc; }
.code-strip__body .c { color: #64748b; }
.caret {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--c-cyan);
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* --------------------------------------------------------------------------
   10. 数据滚动统计
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.stat {
  padding: 26px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  text-align: center;
}
.stat__num {
  display: block;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  background: var(--grad-cool);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--c-muted); font-size: 0.9rem; }

/* --------------------------------------------------------------------------
   11. 横向滚动入口
   -------------------------------------------------------------------------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.entry-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  min-height: 220px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.entry-card:hover {
  transform: translateY(-10px);
  border-color: var(--border-glow);
  box-shadow: 0 24px 54px rgba(2, 8, 23, 0.6);
}
.entry-card h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.entry-card p { color: var(--c-muted); margin: 0; flex: 1; }
.entry-card .link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
}
.entry-card .link-more svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.entry-card:hover .link-more svg { transform: translateX(5px); }

/* --------------------------------------------------------------------------
   12. 列表 / 文章条目
   -------------------------------------------------------------------------- */
.post-list { display: grid; gap: 18px; }
.post-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.post-item:hover { transform: translateX(6px); border-color: var(--border-glow); }
.post-item__date {
  text-align: center;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(30, 159, 255, 0.12);
  border: 1px solid var(--border-glow);
}
.post-item__date strong { display: block; font-size: 1.5rem; line-height: 1.1; }
.post-item__date span { font-size: 0.76rem; color: var(--c-muted); }
.post-item h3 { margin-bottom: 4px; }
.post-item p { margin: 0; color: var(--c-muted); font-size: 0.94rem; }
/* 资讯列表：条目之间留 18px 下边距，与首页「最新动态」的间距一致 */
.post-list--news .post-item { margin-bottom: 18px; }
.post-list--news .post-item:last-child { margin-bottom: 0; }

/* 置顶标志：红色描边小胶囊 + 向上箭头，配柔光，压在标题文字前 */
.post-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  padding: 1px 7px 2px;
  border: 1px solid rgba(248, 113, 113, 0.62);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.2), rgba(220, 38, 38, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 10px rgba(248, 113, 113, 0.22);
  color: #ff6b6b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
  /* inline-flex 的基线取底边，这里上提 6px 才能与标题文字中心齐平（实测值） */
  vertical-align: 5px;
  white-space: nowrap;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}
/* 箭头：用 currentColor 画一个向上的小三角，跟着文字颜色走 */
.post-badge::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 5px solid currentColor;
  opacity: 0.9;
}
.post-item:hover .post-badge {
  border-color: rgba(248, 113, 113, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 3px 14px rgba(248, 113, 113, 0.34);
}

/* --------------------------------------------------------------------------
   13. 筛选栏
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin-bottom: 32px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
}
.filter-bar__label {
  padding-left: 12px;
  margin-right: 4px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--c-muted);
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.28s var(--ease);
}
.chip:hover { border-color: var(--border-glow); color: #fff; }
.chip[aria-pressed="true"],
.chip.active ,.chip.active{
  border-color: transparent;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(30, 159, 255, 0.3);
}

/* --------------------------------------------------------------------------
   14. 资源卡片网格（模板 / 插件）
   -------------------------------------------------------------------------- */
.res-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.res-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.res-card:hover {
  transform: translateY(-10px);
  border-color: var(--border-glow);
  box-shadow: 0 28px 60px rgba(2, 8, 23, 0.66);
}
.res-card.is-hidden,
[data-item].is-hidden,
[data-tab-item].is-hidden { display: none; }
.res-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b1220;
}
/* 卡片内图片与标题可点击跳转详情页 */
.res-card__media > a { display: block; width: 100%; height: 100%; }
.res-card__media > a:focus-visible { outline: 2px solid var(--c-primary); outline-offset: -3px; }
.res-card__body h3 a { color: var(--c-text); }
.res-card__body h3 a:hover { color: var(--c-primary); text-decoration: underline; }
.plugin-head h3 a { color: var(--c-text); }
.plugin-head h3 a:hover { color: var(--c-primary); text-decoration: underline; }
.res-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.res-card:hover .res-card__media img { transform: scale(1.08); }
.res-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  gap: 6px;
}
.res-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
  flex: 1;
}
.res-card__body h3 { margin: 0; font-size: 1.1rem; }
.res-card__body p { margin: 0; color: var(--c-muted); font-size: 0.92rem; }
.res-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.res-card__meta { font-size: 0.82rem; color: var(--c-muted); }
.plugin-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 2px;
}
.plugin-head h3 { margin: 0; }
.plugin-head .ver {
  font-size: 0.78rem;
  font-family: "Cascadia Code", Consolas, monospace;
  color: var(--c-cyan);
}
.compat {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--c-muted);
}
.compat span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.compat svg { width: 15px; height: 15px; }
.compat .ok { color: #34d399; }
.compat .warn { color: #fbbf24; }

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--c-muted);
  border-radius: var(--r-lg);
  border: 1px dashed var(--border-soft);
}

/* --------------------------------------------------------------------------
   15. 弹层 dialog
   -------------------------------------------------------------------------- */
.modal {
  position: relative;
  width: min(920px, 94vw);
  max-height: 88vh;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: rgba(23, 32, 51, 0.96);
  backdrop-filter: blur(22px);
  color: var(--c-text);
  box-shadow: 0 40px 100px rgba(2, 8, 23, 0.8);
  overflow: auto;
}
.modal::backdrop {
  background: rgba(5, 10, 20, 0.72);
  backdrop-filter: blur(6px);
}
.modal__media { border-bottom: 1px solid var(--border-soft); }
.modal__media img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
/* 站点截图预览：更大尺寸、保留原始比例，避免裁切 */
.modal--shot { width: min(1180px, 96vw); }
.modal--shot .modal__media img { aspect-ratio: 16 / 10; object-fit: contain; background: rgba(2, 8, 23, 0.45); }
.modal__body { padding: 26px 30px 30px; }
.modal__body h2 { font-size: 1.5rem; margin-bottom: 8px; }
.modal__body h3 { margin-top: 22px; font-size: 1.05rem; }
.modal__body ul { display: grid; gap: 8px; margin: 10px 0 0; }
.modal__body ul li {
  display: flex;
  gap: 10px;
  color: var(--c-muted);
  font-size: 0.95rem;
}
.modal__body ul li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--grad-cool);
}
.modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 41, 0.8);
  color: var(--c-text);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.modal__close:hover { border-color: var(--border-glow); transform: rotate(90deg); }

/* --------------------------------------------------------------------------
   16. 表格
   -------------------------------------------------------------------------- */
.table-wrap {
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  overflow-x: auto;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
table.data caption {
  padding: 18px 22px;
  text-align: left;
  font-weight: 700;
  color: var(--c-muted);
  font-size: 0.9rem;
}
table.data th,
table.data td {
  padding: 16px 22px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.94rem;
}
table.data th {
  color: var(--c-cyan);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(15, 23, 41, 0.5);
}
table.data tbody tr { transition: background 0.25s var(--ease); }
table.data tbody tr:hover { background: rgba(30, 159, 255, 0.08); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td .ver {
  font-family: "Cascadia Code", Consolas, monospace;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   17. 手风琴 FAQ
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: 14px; }
.faq details {
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.faq details[open] {
  border-color: var(--border-glow);
  box-shadow: 0 14px 40px rgba(30, 159, 255, 0.14);
}
.faq summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
  transition: background 0.25s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: rgba(30, 159, 255, 0.08); }
.faq summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--c-primary);
  border-bottom: 2px solid var(--c-primary);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .faq__body {
  padding: 0 24px 22px;
  color: var(--c-muted);
}
.faq .faq__body p:last-child { margin-bottom: 0; }
.faq__idx {
  flex: none;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(30, 159, 255, 0.16);
  color: var(--c-cyan);
  font-size: 0.84rem;
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   18. 表单
   -------------------------------------------------------------------------- */
.form-card {
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}
.field { margin-bottom: 20px; }
.field > label:not(.checkbox),
.form-label {
  display: block;
  margin-bottom: 9px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-text);
}
.input-wrap { position: relative; display: flex; align-items: center; }
/* 只作用于输入框左侧的图标；按钮内的图标（显示密码）不受影响 */
.input-wrap > svg {
  position: absolute;
  left: 15px;
  width: 19px;
  height: 19px;
  color: var(--c-muted);
  pointer-events: none;
}
.input-wrap .toggle-pwd {
  position: absolute;
  right: 10px;
  left: auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
}
/* 显示/隐藏密码按钮内的眼睛图标：脱离绝对定位，交给按钮的 flex 居中 */
.input-wrap .toggle-pwd svg {
  position: static;
  width: 18px;
  height: 18px;
  margin: 0;
  color: inherit;
}
.input-wrap .toggle-pwd:hover { color: var(--c-cyan); background: rgba(30, 159, 255, 0.12); }

/* 浮动标签：label 默认浮在输入框内，聚焦或已有值时上移到输入框的上边框并压住边框 */
.field--float { position: relative; padding-top: 10px; margin-bottom: 16px; }
.float-label {
  position: absolute;
  left: 46px;
  top: 50%;
  z-index: 2;
  margin: 0;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--surface-solid);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-muted);
  transform: translateY(-50%);
  transform-origin: left center;
  pointer-events: none;
  transition: top 0.22s var(--ease), transform 0.22s var(--ease), color 0.22s var(--ease);
}
.input-wrap input:focus ~ .float-label,
.input-wrap input:not(:placeholder-shown) ~ .float-label {
  top: 0;
  transform: translateY(-50%) scale(0.84);
  color: var(--c-cyan);
}
/* 未聚焦时隐藏原生 placeholder，避免和浮动的 label 文字重叠 */
.field--float input:not(:focus)::placeholder { color: transparent; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 41, 0.72);
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.98rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.input-wrap svg + input { padding-left: 46px; }
textarea { min-height: 132px; resize: vertical; line-height: 1.7; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-muted) 50%),
    linear-gradient(135deg, var(--c-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* --------------------------------------------------------------------------
   18.1 日期输入框（<input type="date">）
   原生日历弹层在 Shadow DOM 里，CSS 改不到内部，唯一能控制的是 color-scheme：
   设成 dark 后 Chrome / Edge / Firefox 弹出的日历面板会整体转成深色，
   不会再在深色页面上顶一块白面板。想要完全自定义面板只能自己写 / 引第三方。
   -------------------------------------------------------------------------- */
input[type="date"] {
  color-scheme: dark;
  padding-right: 12px;
}
:root[data-theme="light"] input[type="date"] { color-scheme: light; }

/* 年月日文字跟着正文色，不要用浏览器默认的深灰 */
input[type="date"]::-webkit-datetime-edit { color: var(--c-text); }
input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
input[type="date"]::-webkit-datetime-edit-year-field,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field { padding: 0 1px; }
input[type="date"]::-webkit-datetime-edit-year-field:focus,
input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus {
  border-radius: 4px;
  background: var(--c-primary);
  color: #fff;
}

/* 右侧日历图标：纯色块 + mask 画图，颜色跟着主题变量走，hover 变品牌色 */
input[type="date"]::-webkit-calendar-picker-indicator {
  width: 30px;
  height: 30px;
  padding: 0;
  margin-right: -2px;
  border-radius: 9px;
  cursor: pointer;
  background-color: var(--c-muted);
  background-image: none;
  -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='16' rx='2'/><path d='M8 3v4M16 3v4M3 11h18'/></svg>");
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='16' rx='2'/><path d='M8 3v4M16 3v4M3 11h18'/></svg>");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 18px 18px;
  mask-size: 18px 18px;
  transition: background-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(30, 159, 255, 0.14);
}
/* --------------------------------------------------------------------------
   18.2 自定义日期选择器
   JS 会把原生 input[type="date"] 换成「输入框样式按钮 + 自绘日历面板」，
   原生输入框只是视觉隐藏、仍然提交值，所以表单和后台取值都不用改。
   -------------------------------------------------------------------------- */
.date-picker { position: relative; }

/* 跟 .location-select__native 一个套路：留在 DOM 里提交值，视觉上藏掉 */
.date-picker__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.date-picker__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-glass);
  color: var(--c-text);
  font: inherit;
  font-size: 0.98rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.date-picker__trigger:hover { border-color: var(--border-glow); }
.date-picker__trigger:focus-visible,
.date-picker__trigger[aria-expanded="true"] {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(30, 159, 255, 0.18);
}
.date-picker__value.is-empty { color: var(--c-muted); }
.date-picker__trigger svg {
  flex: none;
  width: 19px;
  height: 19px;
  color: var(--c-muted);
  transition: color 0.22s var(--ease);
}
.date-picker__trigger:hover svg { color: var(--c-primary); }

.date-picker__panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: 296px;
  max-width: calc(100vw - 36px);
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-card);
  animation: date-pop 0.18s var(--ease);
}
.date-picker__panel[hidden] { display: none !important; }
@keyframes date-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .date-picker__panel { animation: none; }
}

.date-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.date-picker__title { font-size: 0.95rem; font-weight: 700; }

/* 标题里的「年」「月」：点开可以直接跳到年 / 月列表去选，
   不用靠左右箭头一个月一个月往前翻（填生日时要翻好几百下） */
.date-picker__unit {
  padding: 2px 7px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.date-picker__unit:hover { color: var(--c-primary); background: rgba(30, 159, 255, 0.14); }

/* 年 / 月列表：4 列，格子高度与日历页保持一致 */
.date-picker__grid--cells { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.date-picker__cell {
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--c-text);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.date-picker__cell:hover { background: rgba(30, 159, 255, 0.16); }
.date-picker__cell.is-selected {
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
}
.date-picker__cell:disabled { opacity: 0.28; cursor: not-allowed; }
.date-picker__cell:disabled:hover { background: transparent; }
.date-picker__nav {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease);
}
.date-picker__nav:hover {
  color: var(--c-primary);
  border-color: var(--border-glow);
  background: rgba(30, 159, 255, 0.12);
}
.date-picker__nav svg { width: 15px; height: 15px; }

.date-picker__weekdays,
.date-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.date-picker__weekdays { margin-bottom: 4px; }
.date-picker__weekdays span {
  text-align: center;
  font-size: 0.78rem;
  color: var(--c-muted);
}
.date-picker__day {
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--c-text);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.date-picker__day:hover { background: rgba(30, 159, 255, 0.16); }
.date-picker__day.is-outside { color: var(--c-muted); opacity: 0.5; }
.date-picker__day.is-today { box-shadow: inset 0 0 0 1px var(--border-glow); }
.date-picker__day.is-selected {
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
}
.date-picker__day:disabled { opacity: 0.28; cursor: not-allowed; }
.date-picker__day:disabled:hover { background: transparent; }

.date-picker__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}
.date-picker__act {
  padding: 5px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--c-cyan);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.date-picker__act:hover { background: rgba(30, 159, 255, 0.12); }

.location-select { position: relative; }
.location-select__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.location-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(15, 23, 41, 0.72);
  color: var(--c-text);
  font: inherit;
  font-size: 0.98rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.location-select__trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 1.5px solid var(--c-muted);
  border-bottom: 1.5px solid var(--c-muted);
  transform: rotate(45deg) translateY(-2px);
}
.location-select__trigger:focus-visible {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(30, 159, 255, 0.18);
}
.location-select__trigger:disabled { opacity: 0.5; cursor: not-allowed; }
.location-select__options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(15, 23, 41, 0.98);
  box-shadow: var(--shadow-card);
  scrollbar-width: thin;
  scrollbar-color: var(--c-muted) transparent;
}
.location-select__options[hidden] { display: none !important; }
.location-select__options::-webkit-scrollbar { width: 8px; }
.location-select__options::-webkit-scrollbar-track { background: transparent; }
.location-select__options::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--c-muted); }
.location-select__options::-webkit-scrollbar-thumb:hover { background: var(--c-primary); }
.location-select__option {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--c-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.location-select__option:hover,
.location-select__option:focus-visible { outline: none; background: rgba(30, 159, 255, 0.16); }
.location-select__option[aria-selected="true"] { color: var(--c-primary); background: rgba(30, 159, 255, 0.12); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(30, 159, 255, 0.18);
  background: rgba(15, 23, 41, 0.9);
}
input::placeholder, textarea::placeholder { color: #64748b; }

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-muted);
  font-size: 0.92rem;
  cursor: default;
}
.checkbox input {
  appearance: none;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 6px;
  border: 1.5px solid var(--border-soft);
  background: rgba(15, 23, 41, 0.8);
  cursor: pointer;
  position: relative;
  transition: all 0.22s var(--ease);
}
.checkbox input:checked {
  background: var(--grad-brand);
  border-color: transparent;
}
.checkbox input:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(42deg);
}
.checkbox a { margin-left: 2px; }
/* 协议确认（发布 / 修改插件资料）：只有点复选框本身才切换，点后面文字不切换。
   用 <span> 而不是 <label> 包裹就是为了断掉「点文字也能勾选」这个浏览器默认行为；
   无障碍上由 input 的 aria-labelledby 指向这段文字来补回名字，读屏不受影响。 */
.checkbox--no-toggle { cursor: default; }
.checkbox--no-toggle .checkbox__text { cursor: default; user-select: text; }
/* 一组可多选的复选框（开发者入驻申请的擅长方向）：横向排、放不下自动换行 */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

/* 有几个直接子项就均分成几列：auto-fit 会把没有内容的轨道折叠掉，
   剩下的 1fr 由实际存在的子项平分，所以放 1/2/3/4 个都能自动铺满整行。
   min 取 0 是不给列宽下限，否则会退化成「容器够宽才并排」而按不下数量均分。 */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0 18px;
}
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
}
.form-hint { font-size: 0.85rem; color: var(--c-muted); }

/* 头像上传提示条：默认蓝色说明，成功转绿、失败转红，配色跟 .alert 那套一致。
   只作用于 [data-avatar-status] —— 登录/注册页的 .form-hint 保持原来的纯文本样式
   （那条里面含 <a>，改成 flex 会把文字和链接拆成两个 item，布局会乱）。 */
.form-hint[data-avatar-status] {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(30, 159, 255, 0.28);
  border-radius: 12px;
  background: rgba(30, 159, 255, 0.08);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--c-muted);
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease), color 0.22s var(--ease);
}
/* 图标用 mask 画，颜色取 currentColor，所以状态一切换图标跟着一起变色 */
.form-hint[data-avatar-status]::before {
  content: '';
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 11v5'/><path d='M12 8h.01'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 11v5'/><path d='M12 8h.01'/></svg>") center / contain no-repeat;
}
.form-hint[data-avatar-status].is-success {
  border-color: rgba(52, 211, 153, 0.42);
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
}
.form-hint[data-avatar-status].is-success::before {
  -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='m8.5 12.5 2.5 2.5 4.5-5'/></svg>");
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='m8.5 12.5 2.5 2.5 4.5-5'/></svg>");
}
.form-hint[data-avatar-status].is-error {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
}
.form-hint[data-avatar-status].is-error::before {
  -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 8v4.5'/><path d='M12 16h.01'/></svg>");
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 8v4.5'/><path d='M12 16h.01'/></svg>");
}
/* 浅色主题：亮绿 / 亮红的字压在浅色底上对比不足，换成深色字 */
:root[data-theme="light"] .form-hint[data-avatar-status].is-success { color: #047857; }
:root[data-theme="light"] .form-hint[data-avatar-status].is-error { color: #b91c1c; }

/* 邮箱验证码：输入框 + 获取按钮同行，按钮高度跟随输入框 */
.code-row { display: flex; align-items: stretch; gap: 10px; }
.code-row .input-wrap { flex: 1 1 auto; min-width: 0; }
.code-row .btn { flex: none; white-space: nowrap; border-radius: 14px; }
.code-row .btn[data-captcha-refresh] { padding: 0; border: 0; background: transparent; box-shadow: none; }
.code-row .btn[data-captcha-refresh]:hover,
.code-row .btn[data-captcha-refresh]:active { transform: none; border-color: transparent; box-shadow: none; }
@media (max-width: 479px) {
  .code-row { flex-wrap: wrap; }
  .code-row .btn { width: 100%; }
  .code-row .captcha-canvas { width: 100%; }
}

/* 图形验证码画布 */
.captcha-canvas {
  flex: none;
  width: 120px;
  height: 46px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.12);
  cursor: pointer;
  display: block;
}
.captcha-canvas:focus-visible {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(30, 159, 255, 0.18);
}

/* 密码强度 */
.strength { margin-top: 10px; }
.strength__track {
  height: 8px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}
.strength__bar {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--grad-brand);
  transition: width 0.35s var(--ease), background 0.35s var(--ease);
}
.strength__text {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--c-muted);
}
meter.strength-meter {
  width: 100%;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
}

/* 社交登录 */
.social-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 41, 0.6);
  color: var(--c-text);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.28s var(--ease);
}
.social-btn svg { width: 20px; height: 20px; }
.social-btn:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

/* 认证页布局 */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(36px, 5vw, 72px);
}
.auth-brand { position: relative; }
.auth-brand h1 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.auth-brand__list { display: grid; gap: 14px; margin-top: 28px; max-width: 460px; }
.auth-brand__list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--c-muted);
  font-size: 0.95rem;
}
.auth-brand__list svg { flex: none; width: 22px; height: 22px; color: var(--c-cyan); margin-top: 3px; }
.auth-aside-art {
  margin-top: 30px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 520px;
}

/* --------------------------------------------------------------------------
   19. 面包屑
   -------------------------------------------------------------------------- */
.breadcrumb {
  padding-block: 22px 4px;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--c-muted);
}
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
  opacity: 0.6;
}
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-cyan); }
.breadcrumb .active { color: var(--c-text); font-weight: 600; }

/* 头像：会员中心与详情页共用（会员中心专属样式见 css/member.css） */
.avatar {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  /*background: var(--grad-brand);*/
  box-shadow: 0 8px 22px rgba(30, 159, 255, 0.3);
}

.panel { display: none; }
.panel.is-active { display: block; animation: fade-up 0.45s var(--ease) both; }
.panel__head { margin-bottom: 24px; }
.panel__head h2 { font-size: 1.6rem; margin-bottom: 4px; }
.panel__head p { color: var(--c-muted); margin: 0; }

/* auto-fit：卡片数量会随页面变（我的插件/模板页现在是 4 张），
   写死 3 列会出现「3 + 1」的孤行；窄屏自动降到 2 列、1 列 */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.mini-stat {
  padding: 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  gap: 16px;
}
.mini-stat svg { width: 26px; height: 26px; color: var(--c-cyan); flex: none; }
.mini-stat strong { display: block; font-size: 1.5rem; line-height: 1.2; }
.mini-stat span { font-size: 0.84rem; color: var(--c-muted); }

/* --------------------------------------------------------------------------
   21. 提示条 / Toast
   -------------------------------------------------------------------------- */
.alert {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: 14px;
  border: 1px solid var(--border-glow);
  background: rgba(30, 159, 255, 0.12);
  font-size: 0.92rem;
}
.alert.is-show { display: flex; animation: fade-up 0.4s var(--ease) both; }
.alert svg { flex: none; width: 20px; height: 20px; color: var(--c-cyan); margin-top: 2px; }
.alert--success { border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.12); }
.alert--success svg { color: #34d399; }

/* 底部居中：left/right 都归零后用 margin auto 居中，
   比 left:50% + translateX(-50%) 稳 —— 后者在容器宽度是奇数像素时文字会发虚。
   env(safe-area-inset-bottom) 给全面屏手机的小黑条留位置 */
.toast-stack {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  margin: 0 auto;
  z-index: 200;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 40px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-glow);
  background: rgba(23, 32, 51, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(2, 8, 23, 0.6);
  font-size: 0.92rem;
  animation: toast-in 0.35s var(--ease) both;
}
.toast svg { flex: none; width: 20px; height: 20px; color: #34d399; }
.toast.is-out { animation: toast-out 0.3s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(0.96); } }
.toast__text { flex: 1; }
/* 错误类型：MiuToast('文案', 1) */
.toast--error { border-color: rgba(248, 113, 113, 0.5); }
.toast--error svg { color: #f87171; }

/* MiuAlert：不会自动消失的弹窗提示，点「确定」才关闭 */
.miu-alert {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 8, 23, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}
.miu-alert.is-show { opacity: 1; }
.miu-alert__panel {
  /* 右上角关闭按钮的定位基准 */
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(420px, 100%);
  padding: 28px 26px 22px;
  border-radius: 20px;
  border: 1px solid var(--border-glow);
  background: var(--surface-solid);
  box-shadow: var(--shadow-card);
  text-align: center;
  animation: fade-up 0.3s var(--ease) both;
}
/* 右上角关闭按钮：写法照 .modal__close，但这是一张 420px 的小卡片，缩了一号。
   悬停时旋转 90° 跟站内其它关闭按钮保持一致的手感。 */
.miu-alert__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 41, 0.55);
  color: var(--c-text);
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.miu-alert__close svg { width: 16px; height: 16px; }
.miu-alert__close:hover,
.miu-alert__close:focus-visible {
  border-color: var(--border-glow);
  opacity: 1;
  transform: rotate(90deg);
}
.miu-alert__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.14);
}
.miu-alert__icon svg { width: 26px; height: 26px; color: #34d399; }
.miu-alert__icon--error { border-color: rgba(248, 113, 113, 0.5); background: rgba(248, 113, 113, 0.14); }
.miu-alert__icon--error svg { color: #f87171; }
.miu-alert__msg {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--c-text);
  overflow-wrap: anywhere;
}
.miu-alert__actions { margin-top: 2px; }
.miu-alert__actions .btn { min-width: 120px; justify-content: center; }
/* 弹窗打开时锁滚动 */
html.is-dialog-open, html.is-dialog-open body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .miu-alert { transition: none; }
  .miu-alert__panel { animation: none; }
  .miu-alert__close { transition: none; }
  .miu-alert__close:hover,
  .miu-alert__close:focus-visible { transform: none; }
}

/* --------------------------------------------------------------------------
   22. CTA 区
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  padding: clamp(40px, 6vw, 76px) clamp(24px, 5vw, 64px);
  border-radius: 32px;
  border: 1px solid var(--border-glow);
  background:
    radial-gradient(700px 320px at 15% 0%, rgba(30, 159, 255, 0.28), transparent 70%),
    radial-gradient(600px 320px at 85% 100%, rgba(124, 58, 237, 0.3), transparent 70%),
    rgba(23, 32, 51, 0.75);
  backdrop-filter: blur(18px);
  text-align: center;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.22), transparent 65%);
  pointer-events: none;
}
.cta-band h2 { position: relative; }
.cta-band p { color: var(--c-muted); max-width: 62ch; margin-inline: auto; position: relative; }
.cta-band .btn-row { position: relative; }

/* --------------------------------------------------------------------------
   23. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(48px, 6vw, 88px);
  padding-block: clamp(40px, 5vw, 64px) 28px;
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(15, 23, 41, 0.2), rgba(5, 10, 20, 0.9));
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 32px;
}
.footer-brand img { width: 160px; height: 43px; margin-bottom: 16px; }
.footer-brand p { color: var(--c-muted); font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 {
  margin-bottom: 14px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-cyan);
}
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--c-muted); font-size: 0.92rem; }
.footer-col a:hover { color: var(--c-text); }

.social-links { display: flex; gap: 10px; margin-top: 18px; }
.social-links a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid var(--border-soft);
  background: rgba(30, 41, 59, 0.5);
  color: var(--c-muted);
  transition: all 0.28s var(--ease);
}
.social-links a svg { width: 20px; height: 20px; }
.social-links a:hover {
  color: #fff;
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

/* 品牌区下方的联系方式：工作时间 / 支持与合作 */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}
.footer-contact li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--c-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.footer-contact svg {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--c-cyan);
}
.footer-contact a { color: var(--c-muted); }
.footer-contact a:hover { color: var(--c-primary); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  color: var(--c-muted);
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 18px; }

/* --------------------------------------------------------------------------
   24. 动效：滚动入场
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(34px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal--d1 { transition-delay: 0.08s; }
.reveal--d2 { transition-delay: 0.16s; }
.reveal--d3 { transition-delay: 0.24s; }
.reveal--d4 { transition-delay: 0.32s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.float-y { animation: float-y 6s ease-in-out infinite; }
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* --------------------------------------------------------------------------
   25. 响应式：平板 768-1279 / 移动 <768
   -------------------------------------------------------------------------- */
@media (max-width: 1279px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__inner { grid-template-columns: 1fr; }
  .tilt-stage { max-width: 620px; margin-inline: auto; }
}

@media (max-width: 1023px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { text-align: center; }
  .auth-brand__list { margin-inline: auto; text-align: left; }
  .auth-aside-art { margin-inline: auto; }
  .auth-brand .auth-brand__list,.auth-brand .auth-aside-art {display:none;}
}

/* 768~991px：品牌 + 7 个导航项 + 登录注册 + 语言 + 主题挤在一行放不下（约需 918px），
   右侧的 .theme-toggle 会被顶出视口，所以这段提前切换成汉堡菜单；
   ≤767px 沿用同一套规则（媒体查询向下包含） */
@media (max-width: 991px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px;
    background: rgba(15, 23, 41, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-soft);
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-menu.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-menu > li > a { padding: 14px 16px; font-size: 1rem; }
  .nav-menu > li > a.active::after { display: none; }
}

@media (max-width: 767px) {
  body { font-size: 15px; }
  .container { padding-inline: 18px; }
  .nav-actions .btn--sm { display: none; }
  .grid--2, .grid--3, .grid--4,
  .res-grid, .stats, .mini-grid,
  .footer-grid, .form-row, .social-row {
    grid-template-columns: 1fr;
  }
  .rail { grid-auto-columns: 82%; }
  .post-item { grid-template-columns: 1fr; gap: 12px; }
  .post-item__date { display: flex; align-items: baseline; gap: 8px; width: fit-content; padding: 6px 14px; }
  .post-item__date strong { font-size: 1.1rem; }
  .section-head { text-align: left; }
  .btn { width: 100%; }
  .btn-row--center .btn { width: auto; }
  .entry-card .btn, .res-card .btn, .modal__foot .btn { width: auto; }
  .cta-band { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   25.5 分页组件（会员中心列表 / 表格）
   -------------------------------------------------------------------------- */
.pager-scope { display: block; }
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}
.pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 3px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.pager__btn:hover:not([disabled]):not([aria-disabled="true"]) {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.pager__btn.active {
  border-color: transparent;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(30, 159, 255, 0.3);
}
/* 分页用 a 标签，禁用态走 aria-disabled（a 没有 disabled 属性） */
.pager__btn[disabled],
.pager__btn[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}
.pager__btn:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
}
.pager__info {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.86rem;
  color: var(--c-muted);
}
/* 分页隐藏：优先级高于卡片/表格行的 display 声明 */
[data-pager-items] > [hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   26. 主题切换按钮（白天 / 黑夜）
   -------------------------------------------------------------------------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  /* 正方形，尺寸与语言按钮、登录按钮同高 */
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--c-text);
  cursor: pointer;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}
/* 默认（黑夜）显示太阳图标，浅色模式显示月亮图标 */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }

/* --------------------------------------------------------------------------
   26.1 语言切换下拉（位于主题按钮左侧）
   -------------------------------------------------------------------------- */
.lang-menu { position: relative; flex: none; }
.lang-menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 36px;
  padding: 0 10px;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.lang-menu__btn svg { width: 16px; height: 16px; flex: none; }
.lang-menu__btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}
.lang-menu__chevron { width: 12px; height: 12px; transition: transform 0.28s var(--ease); }
.lang-menu.is-open .lang-menu__chevron { transform: rotate(180deg); }

.lang-menu__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 44px rgba(15, 23, 41, 0.32), 0 0 0 1px rgba(30, 159, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  /* visibility 用 0s + 延迟，保证淡出动画播完再隐藏；展开时立即可见 */
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0.22s;
}
.lang-menu.is-open .lang-menu__list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0s;
}
.lang-menu__list li { display: block; }
/* 语言选项本身是 a 标签，可直接打开 ?lang=xx */
.lang-menu__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--c-muted);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-menu__option:hover,
.lang-menu__option:focus-visible { background: rgba(30, 159, 255, 0.12); color: var(--c-text); outline: none; }
/* 当前语言：静态写在 HTML 上的 .active，JS 不再改写选中态 */
.lang-menu__option.active { color: var(--c-primary); font-weight: 700; }
.lang-menu__option.active::after {
  content: "";
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-primary);
  box-shadow: 0 0 8px rgba(30, 159, 255, 0.8);
}
.lang-menu__option code {
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 0.74rem;
  color: var(--c-muted);
  opacity: 0.85;
}
/* 已有 .nav-actions ~ .theme-toggle 的间距，语言按钮紧随其后，保持同一排紧凑度 */
.lang-menu ~ .theme-toggle {  }
@media (prefers-reduced-motion: reduce) {
  .lang-menu__btn,
  .lang-menu__chevron,
  .lang-menu__list { transition: none; }
}
/* 窄屏收成纯图标，避免把导航行挤爆（与主题按钮同尺寸） */
@media (max-width: 575px) {
  .lang-menu__btn { width: 42px; padding: 0; justify-content: center; }
  .lang-menu__btn [data-lang-label] { display: none; }
  .nav-inner { gap: 10px; }
  .brand img { width: 124px; height: 34px; }
}

/* --------------------------------------------------------------------------
   26.2 会员中心下拉菜单 + 未读消息角标（导航右上角）
   展开靠 :hover + :focus-within，不用 JS；focus-within 让键盘 Tab 到菜单项也能展开，
   visibility 延时处理与语言菜单一致（淡出动画播完再隐藏）。
   -------------------------------------------------------------------------- */
.user-menu { position: relative; flex: none; }
/* 角标要挂在按钮右上角，所以按钮自己得是定位基准 */
.user-menu__btn { position: relative; text-decoration: none; }
.user-menu__chevron { width: 12px; height: 12px; flex: none; transition: transform 0.28s var(--ease); }
.user-menu:hover .user-menu__chevron,
.user-menu:focus-within .user-menu__chevron { transform: rotate(180deg); }

/* 未读消息角标：醒目的红底白字胶囊，压在按钮右上角外面一点；
   深色描边让它压在半透明导航条上也分得清边界 */
.user-menu__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 9px;
  background: linear-gradient(180deg, #fb5a70, #e11d48);
  color: #fff;
  font-size: 0.68rem;
  line-height: 14px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0;
  border: 2px solid rgba(15, 23, 41, 0.92);
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.55);
}

.user-menu__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 200px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  /* 面板底色和描边都用主题变量（和语言菜单一致），浅色模式下才会跟着变浅；
     之前写死成深色 rgba(15,23,41,.94)，白天模式打开就是一块黑板 */
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 44px rgba(15, 23, 41, 0.32), 0 0 0 1px rgba(30, 159, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  /* 鼠标从按钮移到菜单的那段空隙（8px）里不能掉下去 —— 用 ::before 把可视区域连起来 */
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0.22s;
}
/* 让指针穿过那 8px 空隙时仍然算「在菜单里」：透明上内边距不占视觉空间 */
.user-menu__list::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.user-menu:hover .user-menu__list,
.user-menu:focus-within .user-menu__list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0s;
}
.user-menu__item {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--c-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.user-menu__item:hover,
.user-menu__item:focus-visible { background: rgba(30, 159, 255, 0.12); color: var(--c-text); outline: none; }
.user-menu__item svg { width: 16px; height: 16px; flex: none; }
/* 菜单项右侧的未读数小胶囊，与右上角标同一套红 */
.user-menu__count {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fb5a70, #e11d48);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
}
@media (prefers-reduced-motion: reduce) {
  .user-menu__btn,
  .user-menu__chevron,
  .user-menu__item,
  .user-menu__list { transition: none; }
}

/* --------------------------------------------------------------------------
   27. 白天模式（浅色主题）
   触发：<html data-theme="light">；全部由变量覆盖 + 选择器覆盖实现，不改 HTML
   -------------------------------------------------------------------------- */
:root[data-theme="light"] {
  --c-primary: #0d6fd1;
  --c-bg: #f4f7fd;
  --c-violet: #6d28d9;
  --c-cyan: #0e7490;
  --c-surface: #ffffff;
  --c-text: #0f1729;
  --c-muted: #475569;
  --c-heading: #334155;
  --c-hint: #616d80;
  --c-danger: #b91c1c;

  --surface-glass: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --border-soft: rgba(15, 23, 41, 0.12);
  --border-glow: rgba(13, 111, 209, 0.35);

  --grad-brand: linear-gradient(135deg, #0d6fd1 0%, #6d28d9 55%, #0891b2 100%);
  --grad-cool: linear-gradient(135deg, #0891b2 0%, #0d6fd1 100%);
  --grad-violet: linear-gradient(135deg, #6d28d9 0%, #0d6fd1 100%);

  --shadow-card: 0 14px 38px rgba(15, 23, 41, 0.1);
  --shadow-glow: 0 12px 30px rgba(13, 111, 209, 0.24);
  color-scheme: light;
}

/* 基础色调过渡 + 滚动条 / 选中态 */
:root[data-theme="light"] body {
  background: var(--c-bg);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
:root[data-theme="light"] ::selection { background: rgba(13, 111, 209, 0.18); color: #0f1729; }
:root[data-theme="light"] ::-webkit-scrollbar-track { background: #e2e8f0; }

/* 背景层与网格 */
:root[data-theme="light"] .bg-layer {
  background:
    radial-gradient(900px 620px at 12% -8%, rgba(30, 159, 255, 0.18), transparent 62%),
    radial-gradient(760px 520px at 88% 6%, rgba(124, 58, 237, 0.14), transparent 60%),
    radial-gradient(820px 640px at 50% 108%, rgba(0, 212, 255, 0.16), transparent 62%),
    var(--c-bg);
}
:root[data-theme="light"] .bg-grid {
  opacity: 0.6;
  background-image:
    linear-gradient(rgba(15, 23, 41, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 41, 0.06) 1px, transparent 1px);
}

/* 头部与 Logo（深色 Logo 反色处理，避免亮底看不清） */
:root[data-theme="light"] .site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
}
:root[data-theme="light"] .brand img,
:root[data-theme="light"] .footer-brand img { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="light"] .nav-toggle,
:root[data-theme="light"] .social-btn { background: rgba(255, 255, 255, 0.85); color: var(--c-text); }

/* 导航 hover / 选中态：深色文字（原白色在亮底不可见） */
:root[data-theme="light"] .nav-menu > li > a { color: var(--c-text); }
:root[data-theme="light"] .nav-menu > li > a:hover {
  color: #0d6fd1;
  background: rgba(13, 111, 209, 0.1);
}
:root[data-theme="light"] .nav-menu > li > a.active {
  color: #0d6fd1;
  background: rgba(13, 111, 209, 0.12);
}
:root[data-theme="light"] .nav-user { color: #0d6fd1; }
/* 浅色模式下角标的深色描边换成白底，否则边缘发脏 */
:root[data-theme="light"] .user-menu__badge { border-color: rgba(255, 255, 255, 0.95); }

/* 筛选 chip 与会员侧栏 hover 态 */
:root[data-theme="light"] .chip:hover { color: #0d6fd1; }
:root[data-theme="light"] .social-links a:hover { color: #0d6fd1; }

/* 分页按钮：亮底白面 + 深色文字 / 选中态淡色渐变 */
:root[data-theme="light"] .pager__btn { background: rgba(255, 255, 255, 0.88); }
:root[data-theme="light"] .pager__btn:hover:not([disabled]):not([aria-disabled="true"]) { color: #0d6fd1; }
/* 浅色模式下当前页按钮：白底 + 浅蓝渐变，文字转深蓝（深色模式那条 color:#fff 在白底上看不见） */
:root[data-theme="light"] .pager__btn.active,
:root[data-theme="light"] .pager__btn.active {
  border-color: rgba(13, 111, 209, 0.38);
  background: linear-gradient(135deg, rgba(13, 111, 209, 0.16), rgba(109, 40, 217, 0.13) 55%, rgba(8, 145, 178, 0.16));
  color: #0d6fd1;
  box-shadow: 0 6px 18px rgba(13, 111, 209, 0.18);
}

/* 筛选栏选中态：亮底淡蓝渐变 + 深色文字（原深蓝渐变在白天模式过重） */
:root[data-theme="light"] .chip[aria-pressed="true"],
:root[data-theme="light"] .chip.active {
  border-color: rgba(13, 111, 209, 0.38);
  background: linear-gradient(135deg, rgba(13, 111, 209, 0.16), rgba(109, 40, 217, 0.13) 55%, rgba(8, 145, 178, 0.16));
  color: #0d6fd1;
  box-shadow: 0 6px 18px rgba(13, 111, 209, 0.18);
}
:root[data-theme="light"] .chip[aria-pressed="true"]:hover,
:root[data-theme="light"] .chip.active:hover {
  border-color: rgba(13, 111, 209, 0.55);
  background: linear-gradient(135deg, rgba(13, 111, 209, 0.22), rgba(109, 40, 217, 0.18) 55%, rgba(8, 145, 178, 0.22));
  color: #0b5fae;
}


/* 按钮：浅底 + 深色文字 */
:root[data-theme="light"] .btn { --btn-bg: #ffffff; }
:root[data-theme="light"] .btn:hover { color: var(--c-text); }
:root[data-theme="light"] .btn--primary,
:root[data-theme="light"] .btn--primary:hover { color: #fff; }
:root[data-theme="light"] .btn--ghost { background: rgba(255, 255, 255, 0.72); }
:root[data-theme="light"] .btn--pulse::after { border-color: rgba(13, 111, 209, 0.45); }
/* 顶部导航的登录按钮：浅底 + 品牌深蓝文字，避免深色渐变在浅色主题下过重 */
:root[data-theme="light"] .nav-actions .btn--primary,
:root[data-theme="light"] .nav-actions .btn--primary:hover {
  border: 1px solid rgba(13, 111, 209, 0.35);
  background: linear-gradient(135deg, rgba(13, 111, 209, 0.14), rgba(109, 40, 217, 0.12) 55%, rgba(8, 145, 178, 0.14));
  color: #0d6fd1;
  box-shadow: 0 6px 18px rgba(13, 111, 209, 0.14);
}
/* 登录 / 注册 / 找回密码页及资源列表详情按钮同样改浅 */
:root[data-theme="light"] .btn--detail,
:root[data-theme="light"] .btn--detail:hover,
:root[data-theme="light"] .auth-layout .btn--primary,
:root[data-theme="light"] .auth-layout .btn--primary:hover {
  border: 1px solid rgba(13, 111, 209, 0.35);
  background: linear-gradient(135deg, rgba(13, 111, 209, 0.14), rgba(109, 40, 217, 0.12) 55%, rgba(8, 145, 178, 0.14));
  color: #0d6fd1;
  box-shadow: 0 6px 18px rgba(13, 111, 209, 0.14);
}


/* 卡片阴影收敛，玻璃态转白底 */
:root[data-theme="light"] .card:hover,
:root[data-theme="light"] .res-card:hover,
:root[data-theme="light"] .entry-card:hover {
  box-shadow: 0 22px 48px rgba(15, 23, 41, 0.14), 0 0 0 1px rgba(13, 111, 209, 0.22);
}

/* 标签配色（保证亮底对比度 ≥ 4.5:1） */
:root[data-theme="light"] .tag--free { color: #047857; border-color: rgba(4, 120, 87, 0.35); background: rgba(4, 120, 87, 0.09); }
:root[data-theme="light"] .tag--pro { color: #0e7490; border-color: rgba(14, 116, 144, 0.35); background: rgba(14, 116, 144, 0.09); }
:root[data-theme="light"] .tag--hot { color: #be123c; border-color: rgba(190, 18, 60, 0.32); background: rgba(190, 18, 60, 0.08); }
:root[data-theme="light"] .tag--new { color: #6d28d9; border-color: rgba(109, 40, 217, 0.32); background: rgba(109, 40, 217, 0.08); }
:root[data-theme="light"] .compat .ok { color: #047857; }
:root[data-theme="light"] .compat .warn { color: #b45309; }

/* Hero 产品卡 */
:root[data-theme="light"] .tilt-card {
  background: linear-gradient(160deg, rgba(13, 111, 209, 0.16), rgba(109, 40, 217, 0.13));
  border-color: rgba(15, 23, 41, 0.12);
  box-shadow: 0 30px 70px rgba(15, 23, 41, 0.16);
}
:root[data-theme="light"] .tilt-card__bar { background: rgba(255, 255, 255, 0.92); }
:root[data-theme="light"] .tilt-card__float { background: #ffffff; box-shadow: 0 14px 30px rgba(15, 23, 41, 0.14); }

/* 代码块保持深色，仅修正标题文字对比度 */
:root[data-theme="light"] .code-strip { background: rgba(15, 23, 41, 0.92); border-color: rgba(15, 23, 41, 0.16); }
:root[data-theme="light"] .code-strip__head { color: #94a3b8; border-bottom-color: rgba(148, 163, 184, 0.2); }

/* 资源卡缩略图容器 */
:root[data-theme="light"] .res-card__media { background: #e9eef8; }

/* 表格 */
:root[data-theme="light"] table.data th { background: rgba(15, 23, 41, 0.04); }

/* 表单元素 */
:root[data-theme="light"] input[type="text"],
:root[data-theme="light"] input[type="email"],
:root[data-theme="light"] input[type="password"],
:root[data-theme="light"] input[type="search"],
:root[data-theme="light"] input[type="tel"],
:root[data-theme="light"] input[type="number"],
:root[data-theme="light"] input[type="url"],
:root[data-theme="light"] input[type="date"],
:root[data-theme="light"] select,
:root[data-theme="light"] textarea { background: #ffffff; }
:root[data-theme="light"] .location-select__trigger,
:root[data-theme="light"] .location-select__options { background: #ffffff; }
:root[data-theme="light"] .location-select__options { box-shadow: 0 12px 30px rgba(15, 23, 41, 0.14); }
:root[data-theme="light"] .location-select__option:hover,
:root[data-theme="light"] .location-select__option:focus-visible { background: rgba(13, 111, 209, 0.08); }
:root[data-theme="light"] input:focus,
:root[data-theme="light"] select:focus,
:root[data-theme="light"] textarea:focus { background: #ffffff; }
:root[data-theme="light"] .checkbox input { background: #ffffff; border-color: rgba(15, 23, 41, 0.22); }
/* 勾选态需要更高权重，否则会被上面的白底规则覆盖（白底 + 白色对勾 = 看不见） */
:root[data-theme="light"] .checkbox input:checked {
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(13, 111, 209, 0.28);
}
:root[data-theme="light"] .checkbox input:focus-visible {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(13, 111, 209, 0.18);
}
:root[data-theme="light"] .strength__track { background: rgba(15, 23, 41, 0.1); }

/* 弹层 / Toast */
:root[data-theme="light"] .modal { background: #ffffff; border-color: rgba(15, 23, 41, 0.12); }
:root[data-theme="light"] .modal::backdrop { background: rgba(15, 23, 41, 0.45); }
:root[data-theme="light"] .modal__close { background: rgba(255, 255, 255, 0.92); color: var(--c-text); }
:root[data-theme="light"] .toast { background: #ffffff; border-color: rgba(13, 111, 209, 0.3); box-shadow: 0 16px 36px rgba(15, 23, 41, 0.16); }
:root[data-theme="light"] .toast--error { border-color: rgba(220, 38, 38, 0.35); }
:root[data-theme="light"] .toast--error svg { color: #dc2626; }
:root[data-theme="light"] .miu-alert { background: rgba(15, 23, 41, 0.38); }
:root[data-theme="light"] .miu-alert__panel { background: #ffffff; border-color: rgba(15, 23, 41, 0.12); }
:root[data-theme="light"] .miu-alert__close { background: rgba(255, 255, 255, 0.92); opacity: 1; }

/* CTA 与页脚 */
:root[data-theme="light"] .cta-band {
  border-color: rgba(13, 111, 209, 0.3);
  background:
    radial-gradient(700px 320px at 15% 0%, rgba(30, 159, 255, 0.16), transparent 70%),
    radial-gradient(600px 320px at 85% 100%, rgba(124, 58, 237, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.86);
}
:root[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, rgba(244, 247, 253, 0.4), #eef2f9);
}
:root[data-theme="light"] .social-links a { background: rgba(255, 255, 255, 0.9); }

/* 移动端菜单（与上面的 991px 汉堡菜单断点保持一致） */
@media (max-width: 991px) {
  :root[data-theme="light"] .nav-menu {
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: rgba(15, 23, 41, 0.1);
  }
}

/* --------------------------------------------------------------------------
   28. 问答社区：论坛布局（左列表 / 右竖排小版块）
   -------------------------------------------------------------------------- */
/* 这两个页面按钮更小、圆角更小（区别于其他页的大圆角胶囊按钮） */
.forum-page .btn { padding: 8px 16px; font-size: 0.86rem; border-radius: 10px; }
.forum-page .btn--lg { padding: 11px 22px; font-size: 0.94rem; border-radius: 12px; }
.forum-page .btn--sm { padding: 5px 12px; font-size: 0.8rem; border-radius: 8px; }
.forum-page .chip { padding: 6px 14px; font-size: 0.84rem; border-radius: 10px; }

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}
.forum-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.forum-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--nav-h) + 18px);
}
@media (max-width: 991px) {
  .forum-layout { grid-template-columns: minmax(0, 1fr); }
  .forum-side { position: static; }
}

/* 侧栏小卡片 */
.side-card {
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}
.side-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.side-card__head h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.side-card p { margin: 0; font-size: 0.85rem; color: var(--c-muted); }

/* 账号 / 发帖卡片 */
.side-auth { display: flex; flex-direction: column; gap: 8px; }
.side-auth__row { display: flex; gap: 8px; }
.side-auth__row .btn { flex: 1; justify-content: center; }
.side-auth__hint { font-size: 0.8rem; color: var(--c-muted); }
.side-auth__me {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-weight: 700;
}

/* 插件详情页：开发者信息卡片 */
.dev-card__user { display: flex; align-items: center; gap: 12px; }
.dev-card__avatar {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 8px 20px rgba(30, 159, 255, 0.28);
}
/* 加 .side-card 前缀，覆盖 .side-card p 的弱化样式 */
.side-card .dev-card__name { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--c-text); }
.side-card .dev-card__meta { margin: 4px 0 0; font-size: 0.78rem; color: var(--c-muted); }
.side-card .dev-card__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--c-muted);
}
.dev-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.dev-card__stats > div {
  padding: 8px 6px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
  text-align: center;
}
.dev-card__stats strong { display: block; font-size: 1rem; line-height: 1.3; }
.dev-card__stats span { font-size: 0.74rem; color: var(--c-muted); }
.dev-card__info { margin-top: 12px; font-size: 0.84rem; }
.detail-info.dev-card__info > div { grid-template-columns: 4em minmax(0, 1fr); column-gap: 10px; }
.side-auth__me .avatar { width: 30px; height: 30px; border-radius: 10px; font-size: 0.85rem; }

/* 竖排小版块 */
.board-list { display: flex; flex-direction: column; gap: 3px; }
.board-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--c-text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.board-item svg { width: 17px; height: 17px; flex: none; color: var(--c-primary); }
.board-item__count {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-muted);
}
.board-item:hover {
  background: rgba(30, 159, 255, 0.1);
  border-color: var(--border-glow);
  color: #fff;
}
.board-item.active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px rgba(30, 159, 255, 0.28);
}
.board-item.active svg,
.board-item.active .board-item__count { color: #fff; }

/* 侧栏统计 */
.side-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 0.87rem;
  border-bottom: 1px dashed var(--border-soft);
}
.side-stat:last-child { border-bottom: none; }
.side-stat b { color: var(--c-primary); font-size: 0.95rem; }

/* 帖子列表 */
.thread-list { display: flex; flex-direction: column; gap: 12px; }
.thread-item {
  padding: 15px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-glass);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}
.thread-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}
.thread-item__title { margin: 0 0 6px; font-size: 1.02rem; font-weight: 700; }
.thread-item__title a { color: var(--c-text); }
.thread-item__title a:hover { color: var(--c-primary); }
.thread-item__excerpt {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--c-muted);
}
.thread-item__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--c-muted);
}
.thread-item__foot .tag { padding: 2px 9px; font-size: 0.74rem; }
.thread-item__stat { display: inline-flex; align-items: center; gap: 5px; }
.thread-item__stat svg { width: 14px; height: 14px; }

/* 帖子正文 */
.thread-detail {
  padding: 22px 24px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: var(--surface-glass);
}
.thread-detail__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: var(--c-muted);
}
.thread-detail__body { font-size: 0.96rem; }
.thread-detail__body p { margin: 0 0 12px; }
.thread-detail__body ul { margin: 0 0 12px; padding-left: 20px; list-style: disc; }
.thread-detail__body li { margin-bottom: 6px; }
.thread-detail__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

/* 回复列表 */
.reply-list { display: flex; flex-direction: column; gap: 12px; }
.reply-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-glass);
}
.reply-item__avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}
.reply-item__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.reply-item__name { font-size: 0.92rem; font-weight: 700; }
.reply-item__time { font-size: 0.78rem; color: var(--c-muted); }
.reply-item__body { margin: 0; font-size: 0.92rem; }
.reply-item__actions { display: flex; gap: 8px; margin-top: 10px; }
.reply-item.is-op { border-color: var(--border-glow); }

/* 白天模式适配 */
:root[data-theme="light"] .board-item:hover {
  background: rgba(13, 111, 209, 0.1);
  color: #0d6fd1;
}
:root[data-theme="light"] .board-item.active {
  background: linear-gradient(135deg, rgba(13, 111, 209, 0.16), rgba(109, 40, 217, 0.13) 55%, rgba(8, 145, 178, 0.16));
  border-color: rgba(13, 111, 209, 0.38);
  color: #0d6fd1;
  box-shadow: 0 6px 18px rgba(13, 111, 209, 0.18);
}
:root[data-theme="light"] .board-item.active svg,
:root[data-theme="light"] .board-item.active .board-item__count { color: #0d6fd1; }
:root[data-theme="light"] .forum-page .btn--primary,
:root[data-theme="light"] .forum-page .btn--primary:hover {
  border: 1px solid rgba(13, 111, 209, 0.35);
  background: linear-gradient(135deg, rgba(13, 111, 209, 0.14), rgba(109, 40, 217, 0.12) 55%, rgba(8, 145, 178, 0.14));
  color: #0d6fd1;
  box-shadow: 0 6px 18px rgba(13, 111, 209, 0.14);
}

/* --------------------------------------------------------------------------
   29. 资源详情页（模板详情 / 插件详情）
   -------------------------------------------------------------------------- */
/* 会员中心记录选项卡：右侧对齐，与筛选标签同一套视觉 */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin: 0 0 18px;
}
@media (max-width: 767px) {
  .tab-bar { justify-content: flex-start; }
}

.res-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}
.res-detail__main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.res-detail__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--nav-h) + 18px);
}
.res-detail__media {
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  overflow: hidden;
  background: #0b1220;
}
.res-detail__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* 详情页头部：左边 3:2 封面、右边信息块，两列各占一半（模板页 / 插件页共用）
   之前封面固定 480px，右侧只剩 400 出头显得窄，现在两列平分。
   关键是 align-items: stretch —— 两列等高，右边卡片会被拉到和封面一样高，
   底部按钮再贴底（见下面 .res-detail__intro），左右就不会一边高一边矮 */
.res-detail__hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
/* ≤1099px：主区只有 700 不到，一半就 350 左右，规格行（两列排的）放不下，
   改成上下排 —— 封面在上、信息整块在下，两边都放得开 */
@media (max-width: 1099px) {
  .res-detail__hero { grid-template-columns: minmax(0, 1fr); }
  .res-detail__thumb { max-width: 480px; }
}
.res-detail__thumb {
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  overflow: hidden;
  background: #0b1220;
  /* 万一右边内容比封面高、把这一列也撑高了：图片垂直居中，别贴着顶边 */
  display: flex;
  align-items: center;
  justify-content: center;
}
.res-detail__thumb img {
  display: block;
  width: 100%;
  /* 封面就是 3:2（600×400）：容器按 3:2 给足高度，用 contain 保证整张图完整显示不裁边。
     万一碰到旧的非 3:2 封面，也只是在深色底上留白，不会把画面内容切掉 */
  aspect-ratio: 3 / 2;
  object-fit: contain;
}
/* 右侧信息卡：撑满整列高度，内容纵向铺开 */
.res-detail__intro {
  height: 100%;
  display: flex;
  flex-direction: column;
}
/* 按钮行贴底（模板里原来写在 style 里的 18px 已去掉，交给这条规则）：
   封面撑出来的多余高度落在规格行和按钮之间，按钮和保障行对齐封面底边，
   两列底边齐平，不会出现「左边一大块图、右边缩在中间」的落差 */
.res-detail__intro .btn-row { margin-top: auto; }
/* 贴底之后仍留一点固定间距，内容多的时候按钮不会直接顶到规格行上 */
.res-detail__intro .res-detail__spec { margin-bottom: 18px; }

/* 插件详情选项卡：下划线式（文字 + 底部高亮条，选中项压在整行分隔线上） */
.res-tabs {
  justify-content: flex-start;
  gap: 18px;
  margin: 0 0 16px;
  padding-bottom: 0;
  border-bottom: 1px solid var(--border-soft);
}
.res-tabs .chip {
  position: relative;
  padding: 10px 18px 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--c-muted);
}
.res-tabs .chip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.25s var(--ease);
}
.res-tabs .chip:hover { color: var(--c-text); }
/* 加 :root 提升优先级，压过 :root[data-theme="light"] .chip.active 的渐变胶囊样式 */
:root .res-tabs .chip.active {
  border: none;
  background: transparent;
  background-image: none;
  box-shadow: none;
  color: var(--c-cyan);
}
:root .res-tabs .chip.active::after { background: var(--c-cyan); }
.res-detail__tabs { display: flex; flex-direction: column; }
.res-detail__card h3 { font-size: 1rem; margin: 20px 0 10px; }
.res-detail__card h3:first-of-type { margin-top: 16px; }

/* 预览截图 */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 0;
}
.shot-grid figure { margin: 0; }
.shot-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: #0b1220;
}
.shot-grid figcaption { margin-top: 8px; font-size: 0.82rem; color: var(--c-muted); }

/* 更新日志 */
.changelog__item {
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
}
.changelog__item:first-child { padding-top: 0; border-top: none; }
.changelog__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
}
.changelog__head strong { font-size: 1rem; }
.changelog__head time { font-size: 0.82rem; color: var(--c-muted); }

/* 目录结构选项卡：文件树（缩进虚线 + 文件夹/文件图标 + 右侧说明） */
.file-tree,
.file-tree ul { list-style: none; margin: 0; padding: 0; }
.file-tree > li > ul { margin-left: 13px; padding-left: 15px; border-left: 1px dashed var(--border-soft); }
.file-tree ul ul { margin-left: 13px; padding-left: 15px; border-left: 1px dashed var(--border-soft); }
.file-tree__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.85rem;
  line-height: 1.7;
  transition: background 0.2s var(--ease);
}
.file-tree__row:hover { background: rgba(148, 163, 184, 0.12); }
.file-tree__name { font-weight: 600; color: var(--c-text); }
.file-tree__note { margin-left: 2px; font-size: 0.78rem; color: var(--c-muted); }
.ft-icon { width: 16px; height: 16px; flex: none; }
.ft-icon--dir { color: #f0b429; }
.ft-icon--file { color: var(--c-muted); }
@media (max-width: 600px) {
  .file-tree__note { display: none; }
  .file-tree__row { font-size: 0.8rem; }
}
@media (max-width: 767px) {
  .res-detail__hero { grid-template-columns: minmax(0, 1fr); }
  /* 单列时封面占满整行容易过高，给个上限（跟随上面加宽后的封面列） */
  .res-detail__thumb { max-width: 480px; }
}
.res-detail__card {
  padding: 24px 26px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: var(--surface-glass);
}
.res-detail__card h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 10px; }
.res-detail__card h2 { font-size: 1.15rem; margin-bottom: 12px; }
.res-detail__lead { margin: 0; color: var(--c-muted); font-size: 1rem; }

/* 详情头部标题行：标题在左，免费/热门标签贴右上角 */
.res-detail__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.res-detail__title h1 { margin: 0; }
.res-detail__tags { display: flex; gap: 8px; margin: 0; }

/* 详情头部规格行：分类 / 当前版本 / 兼容CMS版本（label 左、值右的虚线分隔行） */
.res-detail__spec { margin: 0 0 2px; }
.res-detail__spec .spec-cat { color: #fb7185; font-weight: 700; }

/* 标签列收窄：默认 110px 对这几个短标签太宽 */
.res-detail__intro .res-detail__spec > div { grid-template-columns: 84px minmax(0, 1fr); }

/* 规格行的四个标签：分散对齐（两端撑满标签列），长短不一的中文标签右端对齐 */
.res-detail__intro .res-detail__spec dt {
  text-align: justify;
  text-align-last: justify;
  text-justify: inter-character;
}

/* 标题下方规格行：一行放两条（每行仍是「标签 + 值」的虚线行，样式不变）
   用 .res-detail__intro 前缀保证优先级高于后文的 .detail-info 规则 */
.res-detail__intro .res-detail__spec {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
}
.res-detail__intro .res-detail__spec > div:nth-child(3),
.res-detail__intro .res-detail__spec > div:last-child {  }
/* 窄屏恢复单列，避免「兼容CMS版本」这类长标签换行 */
@media (max-width: 767px) {
  .res-detail__intro .res-detail__spec { grid-template-columns: minmax(0, 1fr); }
  .res-detail__intro .res-detail__spec > div:nth-child(3) { border-bottom: 1px dashed var(--border-soft); }
}

/* 详情头部操作按钮：比默认小一号（默认 13px 26px / 0.96rem） */
.res-detail__intro .btn-row { gap: 10px; }
.res-detail__intro .btn-row .btn { padding: 7px 16px; font-size: 0.84rem; }

/* 标题下方的简介文字：比默认小一号（默认 1rem） */
.res-detail__intro .res-detail__lead { font-size: 0.9rem; }
.res-detail__info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.res-detail__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--c-muted);
}
/* 时间 / 作者 / 点击量 前面的小图标 */
.res-detail__meta svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--c-cyan);
}
/* 来源那一项填了 from_url 就是外链：虚线暗示可点，平时保持和旁边文字一样的观感 */
.res-detail__meta a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.55);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.res-detail__meta a:hover {
  color: var(--c-cyan);
  border-bottom-color: currentColor;
}
.detail-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.detail-list li,
.detail-steps li {
  position: relative;
  padding-left: 24px;
  font-size: 0.94rem;
  color: var(--c-muted);
}
.detail-list li::before,
.detail-steps li::before {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c-primary);
}
.detail-list li::before { content: "✓"; }
.detail-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.detail-steps li { counter-increment: step; }
.detail-steps li::before { content: counter(step) "."; font-weight: 700; }
.detail-steps code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(30, 159, 255, 0.12);
  font-size: 0.9em;
}
.res-detail__results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.res-detail__results > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(30, 159, 255, 0.06);
  text-align: center;
}
.res-detail__results strong {
  font-size: 1.35rem;
  color: var(--c-primary);
}
.res-detail__results span { font-size: 0.82rem; color: var(--c-muted); }
@media (max-width: 767px) {
  .res-detail__results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.detail-info { display: grid; gap: 2px; margin: 0; }
.detail-info > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--border-soft);
}
.detail-info > div:first-child {}
.detail-info dt { color: var(--c-muted); }
.detail-info dd { margin: 0; }
@media (max-width: 991px) {
  .res-detail { grid-template-columns: minmax(0, 1fr); }
  .res-detail__side { position: static; }
}

/* --------------------------------------------------------------------------
   30. 插件页：四列小卡片 / 开发者徽标 / 多维筛选
   -------------------------------------------------------------------------- */
/* 插件页：价格 / 出品 / 分类三组筛选收在同一个圆角面板内 */
.filter-panel {
  margin-bottom: 32px;
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.filter-row + .filter-row { border-top: 1px solid var(--border-soft); }
.filter-row__label {
  min-width: 46px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--c-muted);
}
.chip-set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* 面板内的筛选按钮统一收小，避免多行筛选过于臃肿 */
.filter-panel .chip {
  padding: 6px 14px;
  font-size: 0.82rem;
  line-height: 1.35;
}
.filter-row__count {
  margin-left: auto;
  font-size: 0.84rem;
  color: var(--c-muted);
}
@media (max-width: 767px) {
  .filter-panel { padding: 2px; }
  .filter-row { padding: 10px 12px; }
  .filter-row__count { margin-left: 0; }
}

.res-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.res-grid--4 .res-card__body { gap: 8px; padding: 14px 16px 16px; }
.res-grid--4 .res-card__body h3 { font-size: 1rem; }
.res-grid--4 .res-card__body > p { font-size: 0.85rem; }
.res-grid--4 .res-card__foot { margin-top: auto; }
.res-grid--4 .res-card__badge .tag { font-size: 0.68rem; padding: 3px 9px; }
@media (max-width: 1279px) {
  .res-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .res-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .res-grid--4 { grid-template-columns: 1fr; }
}

/* 开发者行：浮在图片上方，靠左下 */
.res-card__dev {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  margin: 0;
  padding: 3px 10px;
  max-width: 70%;
  border-radius: var(--r-pill);
  background: rgba(8, 12, 22, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.76rem;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(2, 8, 23, 0.6);
}
/* 卡片图片右下角浮出的 官 / 保 双标志 */
.res-card__marks {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  gap: 4px;
  margin: 0;
}
.mark-badge {
  display: block;
  /* filter: drop-shadow(0 2px 6px rgba(2, 8, 23, 0.5)); */
}
.mark-badge--official { color: #ff7a45; }
.mark-badge--check { color: #38bdf8; }
.mark-badge--deposit { color: #3ddc84; }

/* 个人实名认证：与「保」同款绿，圆角方框 + 内部对勾 */
.verify-check { color: #3ddc84; }
/* 企业实名认证：蓝色，圆角方框 + 内部盾牌对勾 */
.verify-company { color: #38bdf8; }

/* 徽标方框底色过重，透明度 0 */
.mark-badge rect { fill: transparent; }

/* 插件详情页：保障行（保障：官 检 保） */
.plugin-guarantee {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--c-muted);
}
.plugin-guarantee .mark-badge { flex: none; }

/* 浅色模式：列表与详情页按钮改用浅色样式（不带 body class 的页面保持原样） */
:root[data-theme="light"] .soft-btn .btn--primary {
  background: linear-gradient(135deg, rgba(13, 111, 209, 0.1), rgba(109, 40, 217, 0.08) 55%, rgba(8, 145, 178, 0.1));
  border: 1px solid rgba(13, 111, 209, 0.3);
  color: #0d6fd1;
  box-shadow: 0 6px 16px rgba(13, 111, 209, 0.1);
}
:root[data-theme="light"] .soft-btn .btn--primary:hover {
  background: linear-gradient(135deg, rgba(13, 111, 209, 0.16), rgba(109, 40, 217, 0.12) 55%, rgba(8, 145, 178, 0.16));
  border-color: rgba(13, 111, 209, 0.5);
  color: #0d6fd1;
  box-shadow: 0 10px 24px rgba(13, 111, 209, 0.16);
}

/* 下载页：SHA-256 / MD5 双行校验码 */
.checksum { display: grid; gap: 8px; margin: 0; }
.checksum > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.checksum dt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--c-muted);
}
.checksum dd { margin: 0; }
.checksum code {
  display: block;
  padding: 5px 9px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.1);
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: nowrap;
  overflow-x: auto;
  /* 最细滚动条：Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}
/* 最细滚动条：Chrome / Edge / Safari */
.checksum code::-webkit-scrollbar { height: 2px; }
.checksum code::-webkit-scrollbar-track { background: transparent; }
.checksum code::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: var(--r-pill);
}
.checksum code::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.8); }
.checksum__tag {
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: rgba(34, 197, 94, 0.16);
  color: #22c55e;
  font-size: 0.66rem;
  font-weight: 700;
}
.checksum__hint { font-size: 0.66rem; font-weight: 500; color: var(--c-muted); }
@media (max-width: 575px) {
  .checksum > div { grid-template-columns: 1fr; gap: 4px; }
}

/* --------------------------------------------------------------------------
   30. 发布新帖页（ask-new.html）：Markdown 编辑器 / 预览 / 侧栏速查
   -------------------------------------------------------------------------- */
.editor {
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 41, 0.72);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.editor:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(30, 159, 255, 0.18);
}
.editor__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(30, 41, 59, 0.55);
}
.editor__btn {
  min-width: 34px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--c-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.editor__btn:hover { color: var(--c-text); background: rgba(30, 159, 255, 0.16); border-color: var(--border-glow); }
.editor__btn:focus-visible { outline: none; color: var(--c-text); border-color: var(--c-primary); }
.editor__sep { width: 1px; height: 18px; margin: 0 4px; background: var(--border-soft); }
.editor textarea { min-height: 260px; border: 0; border-radius: 0; background: transparent; }
.editor textarea:focus { box-shadow: none; background: transparent; }

.field__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 0; }
.field__foot [data-len-value] { color: var(--c-primary); font-weight: 700; }
button.tag { cursor: pointer; font-family: inherit; font-size: 0.8rem; }
button.tag:hover { color: var(--c-text); border-color: var(--border-glow); }

.post-preview {
  margin-top: 22px;
  padding: 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-glow);
  background: var(--surface-glass);
}
.post-preview__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.post-preview__head h2 { margin: 0; font-size: 1.15rem; }
.post-preview__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 700; }
.post-preview__body { line-height: 1.8; overflow-wrap: anywhere; }
.post-preview__body > :first-child { margin-top: 0; }
.post-preview__body > :last-child { margin-bottom: 0; }
.post-preview__body p { margin: 0 0 12px; color: var(--c-text); }
.post-preview__body h3, .post-preview__body h4, .post-preview__body h5 { margin: 18px 0 8px; }
.post-preview__body ul, .post-preview__body ol { margin: 0 0 12px; padding-left: 22px; color: var(--c-text); }
.post-preview__body li { margin-bottom: 4px; }
.post-preview__body blockquote {
  margin: 0 0 12px;
  padding: 10px 16px;
  border-left: 3px solid var(--c-primary);
  border-radius: 0 10px 10px 0;
  background: rgba(30, 159, 255, 0.1);
  color: var(--c-muted);
}
.post-preview__body pre {
  margin: 0 0 12px;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(2, 8, 23, 0.62);
}
.post-preview__body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; }
.post-preview__body :not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(30, 159, 255, 0.14);
  color: var(--c-cyan);
}
.post-preview__body img { max-width: 100%; border-radius: 10px; }
.post-preview__body a { color: var(--c-primary); text-decoration: underline; }

.side-list { display: grid; gap: 8px; margin: 0; padding-left: 18px; font-size: 0.85rem; color: var(--c-muted); }
.side-md { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 0.8rem; }
.side-md dt { color: var(--c-muted); }
.side-md dd { margin: 0; }
.side-md code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; color: var(--c-cyan); }

:root[data-theme="light"] .editor { background: #ffffff; border-color: rgba(15, 23, 41, 0.14); }
:root[data-theme="light"] .editor__bar { background: rgba(15, 23, 41, 0.04); border-bottom-color: rgba(15, 23, 41, 0.1); }
:root[data-theme="light"] .editor__btn:hover { color: #0d6fd1; background: rgba(13, 111, 209, 0.1); border-color: rgba(13, 111, 209, 0.35); }
:root[data-theme="light"] .post-preview { background: #ffffff; border-color: rgba(13, 111, 209, 0.28); }
:root[data-theme="light"] .post-preview__body pre { background: #f1f5f9; border-color: rgba(15, 23, 41, 0.12); }
:root[data-theme="light"] .post-preview__body :not(pre) > code { background: rgba(13, 111, 209, 0.1); color: #0d6fd1; }
:root[data-theme="light"] .side-md code { color: #0d6fd1; }

/* --------------------------------------------------------------------------
   31. 资讯详情页（news-detail.html）：正文排版 / 分享 / 上下篇
   -------------------------------------------------------------------------- */
.article-body { line-height: 1.85; overflow-wrap: anywhere; }
.article-body h2 { margin: 22px 0 10px; font-size: 1.08rem; }
.article-body p { margin: 0 0 12px; color: var(--c-text); }
.article-body ul, .article-body ol { margin: 0 0 14px; padding-left: 22px; color: var(--c-text); }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--c-text); }
.article-body blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 3px solid var(--c-primary);
  border-radius: 0 10px 10px 0;
  background: rgba(30, 159, 255, 0.1);
  color: var(--c-muted);
}
.article-body pre {
  margin: 0 0 14px;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(2, 8, 23, 0.62);
}
.article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; }
.article-body :not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(30, 159, 255, 0.14);
  color: var(--c-cyan);
}
.article-body a { color: var(--c-primary); text-decoration: underline; }

.article-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
/* 收藏按钮推到最右：左边是分享动作用品，收藏是读者自己的动作，视觉上分开 */
.article-share [data-collect-toggle] { margin-left: auto; }
/* 收藏按钮：已收藏时点亮成品牌青，星星里也填一层淡色，跟没点的状态一眼能分开 */
[data-collect-toggle][data-collected='1'] {
  color: var(--c-cyan);
  border-color: rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.1);
}
[data-collect-toggle][data-collected='1'] svg {
  fill: rgba(0, 212, 255, 0.3);
}

.article-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; }
.article-nav__item {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-glass);
  text-decoration: none;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.article-nav__item:hover { transform: translateY(-2px); border-color: var(--border-glow); }
.article-nav__label { font-size: 0.78rem; color: var(--c-muted); }
.article-nav__title { font-size: 0.94rem; font-weight: 700; color: var(--c-text); }
.article-nav__item--next { text-align: right; }
/* 中间那块：回列表页，居中并做成浅色高亮 */
.article-nav__item--mid {
  align-content: center;
  min-width: 148px;
  text-align: center;
  border-color: var(--border-glow);
  background: rgba(30, 159, 255, 0.1);
}
.article-nav__item--mid .article-nav__title { color: var(--c-primary); }

.side-list--links { list-style: none; padding-left: 0; }
.side-list--links a { color: var(--c-text); text-decoration: none; }
.side-list--links a:hover { color: var(--c-primary); }

@media (max-width: 575px) {
  .article-nav { grid-template-columns: 1fr; }
  .article-nav__item--mid,
  .article-nav__item--next { text-align: left; }
  .article-nav__item--mid { min-width: 0; }
}

:root[data-theme="light"] .article-body pre { background: #f1f5f9; border-color: rgba(15, 23, 41, 0.12); }
:root[data-theme="light"] .article-body :not(pre) > code { background: rgba(13, 111, 209, 0.1); color: #0d6fd1; }
:root[data-theme="light"] .article-nav__item--mid { background: rgba(13, 111, 209, 0.08); }
/* 浅色下的置顶标志：深红描边 + 浅红底，保证白底上依然醒目 */
:root[data-theme="light"] .post-badge {
  border-color: rgba(200, 30, 30, 0.5);
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.92), rgba(254, 202, 202, 0.66));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 8px rgba(200, 30, 30, 0.16);
  color: #c81e1e;
}
:root[data-theme="light"] .post-item:hover .post-badge { border-color: rgba(200, 30, 30, 0.8); }

/* --------------------------------------------------------------------------
   32. 文章目录（Markdown 正文左侧的 TOC + 右侧折叠按钮）
   目录节点由 view_article.html 里的内联脚本生成：
   ul.catalog-ul[level="N"] > li.catalog-li > a.anchor
   -------------------------------------------------------------------------- */
.md-doc {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}


/* 收起：目录列宽归零，只留右侧那个按钮；gap 保留，免得按钮压到正文 */
.md-doc.is-toc-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
  gap: 0px;
}

/* 正文里没有标题时不占位置，整块目录直接不出现 */
.md-doc.is-toc-empty {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.md-doc.is-toc-empty .md-doc__aside { display: none; }

.md-doc__aside {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - var(--nav-h) - 48px);
  display: flex;
  /* 向左吃掉 .res-detail__card 的左内边距（26px），把侧栏推到卡片边上；
     侧栏只是向左加宽，右边线和折叠按钮的位置不变 */
  margin-left: -26px;
}

.markdown-toc {
  flex: 1 1 auto;
  min-width: 0;
  /* 纵向照旧滚动，横向一律裁掉，只靠 .anchor 的省略号收尾 */
  overflow: hidden auto;
  overscroll-behavior: contain;
  /* 侧栏已经贴到卡片边，这里只留目录文字自己的左侧呼吸位 */
  padding: 2px 14px 2px 0px;
  border-right: 1px solid var(--border-soft);
  scrollbar-width: thin;
  scrollbar-color: var(--border-soft) transparent;
  transition: opacity 0.22s var(--ease);
}
.markdown-toc::-webkit-scrollbar { width: 4px; }
.markdown-toc::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: var(--border-soft);
}
.md-doc.is-toc-collapsed .markdown-toc {
  opacity: 0;
  visibility: hidden;
}

/* 列表：靠左的圆点 + 逐级缩进，和参考图一致 */
.markdown-toc .catalog-ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.markdown-toc .catalog-ul[level="2"],
.markdown-toc .catalog-ul[level="3"],
.markdown-toc .catalog-ul[level="4"] { padding-left: 14px; }

.markdown-toc .catalog-li {
  position: relative;
  margin: 0;
  padding: 4px 0 3px 14px;
}
.markdown-toc .catalog-li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-muted);
  opacity: 0.55;
  transform: translateY(-50%);
}
.markdown-toc .catalog-ul[level="2"] > .catalog-li::before,
.markdown-toc .catalog-ul[level="3"] > .catalog-li::before,
.markdown-toc .catalog-ul[level="4"] > .catalog-li::before {
  left: 0;
  width: 4px;
  height: 4px;
  opacity: 0.38;
}

.markdown-toc .anchor {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--c-muted);
  font-size: 0.86rem;
  line-height: 1.7;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.markdown-toc .anchor:hover { color: var(--c-primary); }

/* 一级目录的第一条就是文档标题，按参考图用品牌色强调 */
.markdown-toc .catalog-ul[level="1"] > .catalog-li:first-child::before {
  background: var(--c-primary);
  opacity: 1;
}
.markdown-toc .catalog-ul[level="1"] > .catalog-li:first-child .anchor {
  color: var(--c-primary);
  font-weight: 700;
}

/* 当前章节：只做文字高亮（品牌色 + 加粗）和圆点点亮，不铺底色 */
.markdown-toc .catalog-li.is-active::before {
  background: var(--c-primary);
  opacity: 1;
}
.markdown-toc .catalog-li.is-active > .anchor {
  color: var(--c-primary);
  font-weight: 700;
}

/* 点目录跳转后，标题不能被吸顶的头部挡住 */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* --------------------------------------------------------------------------
   33. Markdown 正文配色（#markdown-preview）
   markdown.css 的深浅色写在 @media (prefers-color-scheme) 里，跟的是系统偏好，
   而站点主题是自己维护的 data-theme —— 站点深色 + 系统浅色时正文会变成白底黑字。
   这里用 ID 选择器把整套主题变量重定义一遍：优先级高于 markdown.css 里的
   .markdown-body，表格 / 代码块 / 引用 / 提示块也都会跟着走。
   -------------------------------------------------------------------------- */
#markdown-preview {
  color-scheme: dark;
  padding: 20px 22px;

  /* 深色下跟外层卡片完全一致：--surface-glass 是半透明的，直接引用会叠出第二层
     反而更深，所以正文块不画背景，直接透出卡片的合成结果 */
  --bgColor-default: transparent;
  /* 代码块 / 表格条纹再压深一档，正文块里才有层次 */
  --bgColor-muted: rgba(2, 8, 23, 0.45);
  --bgColor-neutral-muted: rgba(148, 163, 184, 0.16);
  --bgColor-attention-muted: rgba(210, 153, 34, 0.15);
  --fgColor-default: #e2e8f0;
  --fgColor-muted: #94a3b8;
  --fgColor-accent: #1e9fff;
  --fgColor-attention: #d29922;
  --fgColor-danger: #f85149;
  --fgColor-done: #ab7df8;
  --fgColor-success: #3fb950;
  --borderColor-default: rgba(148, 163, 184, 0.28);
  --borderColor-muted: rgba(148, 163, 184, 0.18);
  --borderColor-accent-emphasis: #1f6feb;
  --borderColor-attention-emphasis: #9e6a03;
  --borderColor-danger-emphasis: #da3633;
  --borderColor-done-emphasis: #8957e5;
  --borderColor-success-emphasis: #238636;
  --focus-outlineColor: #1e9fff;

  /* 代码高亮（markdown-it 默认不产出这些类，装上高亮插件后才用得到） */
  --color-prettylights-syntax-comment: #9198a1;
  --color-prettylights-syntax-constant: #79c0ff;
  --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
  --color-prettylights-syntax-entity: #d2a8ff;
  --color-prettylights-syntax-entity-tag: #7ee787;
  --color-prettylights-syntax-keyword: #ff7b72;
  --color-prettylights-syntax-string: #a5d6ff;
  --color-prettylights-syntax-string-regexp: #7ee787;
  --color-prettylights-syntax-variable: #ffa657;
  --color-prettylights-syntax-brackethighlighter-angle: #9198a1;
  --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
  --color-prettylights-syntax-carriage-return-text: #f0f6fc;
  --color-prettylights-syntax-carriage-return-bg: #b62324;
  --color-prettylights-syntax-markup-bold: #f0f6fc;
  --color-prettylights-syntax-markup-italic: #f0f6fc;
  --color-prettylights-syntax-markup-list: #f2cc60;
  --color-prettylights-syntax-markup-heading: #1f6feb;
  --color-prettylights-syntax-meta-diff-range: #d2a8ff;
  --color-prettylights-syntax-storage-modifier-import: #f0f6fc;
  --color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d;
  --color-prettylights-syntax-markup-inserted-text: #aff5b4;
  --color-prettylights-syntax-markup-inserted-bg: #033a16;
  --color-prettylights-syntax-markup-deleted-text: #ffdcd7;
  --color-prettylights-syntax-markup-deleted-bg: #67060c;
  --color-prettylights-syntax-markup-changed-text: #ffdfb6;
  --color-prettylights-syntax-markup-changed-bg: #5a1e02;
  --color-prettylights-syntax-markup-ignored-text: #f0f6fc;
  --color-prettylights-syntax-markup-ignored-bg: #1158c7;
}

/* 浅色主题：正文块回到浅底深字 */
:root[data-theme="light"] #markdown-preview {
  color-scheme: light;
  --bgColor-default: #ffffff;
  --bgColor-muted: #f1f5f9;
  --bgColor-neutral-muted: rgba(15, 23, 41, 0.08);
  --bgColor-attention-muted: #fff8c5;
  --fgColor-default: #0f1729;
  --fgColor-muted: #475569;
  --fgColor-accent: #0d6fd1;
  --fgColor-attention: #9a6700;
  --fgColor-danger: #d1242f;
  --fgColor-done: #8250df;
  --fgColor-success: #1a7f37;
  --borderColor-default: #d1d9e0;
  --borderColor-muted: rgba(15, 23, 41, 0.14);
  --borderColor-accent-emphasis: #0969da;
  --borderColor-attention-emphasis: #9a6700;
  --borderColor-danger-emphasis: #cf222e;
  --borderColor-done-emphasis: #8250df;
  --borderColor-success-emphasis: #1a7f37;
  --focus-outlineColor: #0d6fd1;
  --color-prettylights-syntax-comment: #59636e;
  --color-prettylights-syntax-constant: #0550ae;
  --color-prettylights-syntax-constant-other-reference-link: #0a3069;
  --color-prettylights-syntax-entity: #6639ba;
  --color-prettylights-syntax-entity-tag: #0550ae;
  --color-prettylights-syntax-keyword: #cf222e;
  --color-prettylights-syntax-string: #0a3069;
  --color-prettylights-syntax-string-regexp: #116329;
  --color-prettylights-syntax-variable: #953800;
  --color-prettylights-syntax-brackethighlighter-angle: #59636e;
  --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
  --color-prettylights-syntax-markup-bold: #1f2328;
  --color-prettylights-syntax-markup-italic: #1f2328;
  --color-prettylights-syntax-markup-list: #3b2300;
  --color-prettylights-syntax-markup-heading: #0550ae;
  --color-prettylights-syntax-meta-diff-range: #8250df;
  --color-prettylights-syntax-storage-modifier-import: #1f2328;
  --color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;
  --color-prettylights-syntax-markup-inserted-text: #116329;
  --color-prettylights-syntax-markup-inserted-bg: #dafbe1;
  --color-prettylights-syntax-markup-deleted-text: #82071e;
  --color-prettylights-syntax-markup-deleted-bg: #ffebe9;
  --color-prettylights-syntax-markup-changed-text: #953800;
  --color-prettylights-syntax-markup-changed-bg: #ffd8b5;
  --color-prettylights-syntax-markup-ignored-text: #d1d9e0;
  --color-prettylights-syntax-markup-ignored-bg: #0550ae;
}

/* .article-body 里的 p / li 有自己的颜色规则，这里让正文块统一走 markdown 变量 */
#markdown-preview p,
#markdown-preview li { color: var(--fgColor-default); }

/* 标签卡：正文容器里的 a 是带下划线的（.article-body a），标签不该跟着加 */
.tag-list a { text-decoration: none; }
.article-body .tag-list a { text-decoration: none; }

/* 右侧折叠按钮：贴在目录右边线上的小拉手 */
.md-toc-toggle {
  position: absolute;
  top: 50%;
  right: -17px;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-left: 0;
  border-radius: 0 9px 9px 0;
  background: var(--surface-solid);
  color: var(--c-muted);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.md-toc-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}
.md-toc-toggle:hover {
  color: var(--c-primary);
  border-color: var(--border-glow);
}
/* 折叠后侧栏只剩一条窄缝，按钮回到侧栏最左侧（也就是卡片边） */
.md-doc.is-toc-collapsed .md-toc-toggle {
  left: 0;
  right: auto;
}
.md-doc.is-toc-collapsed .md-toc-toggle svg { transform: rotate(180deg); }

/* 窄屏：目录收到正文上方，按钮变成一整条 */
@media (max-width: 991px) {
  .md-doc,
  .md-doc.is-toc-collapsed {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .md-doc__aside {
    position: static;
    flex-direction: column;
    max-height: none;
  }
  .markdown-toc {
    max-height: 240px;
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
  }
  .md-doc.is-toc-collapsed .markdown-toc {
    max-height: 0;
    padding: 0;
    border-bottom: 0;
  }
  .md-toc-toggle {
    position: static;
    transform: none;
    width: 100%;
    height: 32px;
    margin-top: 8px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
  }
}

/* --------------------------------------------------------------------------
   31. 筛选标签的悬停提示（带吸附箭头的小浮层）
   -------------------------------------------------------------------------- */
/* 模板 / 插件列表页的分类标签把补充说明写在 title 上，原生提示要等一秒多才出来、
   样式也跟站点不搭，这里换成自绘浮层（行为见 app.js 的 initChipTips）：
   - 位置由 JS 用 fixed 定位算出来，因为 .filter-panel 有 overflow:hidden，
     浮层挂在标签内部会被面板裁掉 —— 第一行的「行业分类」正好贴着面板上沿
   - 箭头是旋转 45° 的小方块，只保留外侧两条边当描边，看着像吸附在标签上的三角；
     坐标 --tip-arrow-x 由 JS 按标签中心算，浮层被视口挤偏时箭头仍指着标签
   - 背景用 --surface-solid（不透明），箭头压在浮层边框上才不会透出双重底色 */
.miu-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  max-width: min(280px, calc(100vw - 16px));
  padding: 7px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  background: var(--surface-solid);
  color: var(--c-text);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.55;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;        /* 浮层不挡鼠标，免得把标签本身盖住 */
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s var(--ease);
}
/* 出场方向跟着放置方向走：在上方就从下往上浮，在下方反之 */
.miu-tip[data-placement="top"] { transform: translateY(4px); }
.miu-tip[data-placement="bottom"] { transform: translateY(-4px); }
.miu-tip.is-open { opacity: 1; visibility: visible; transform: none; }

.miu-tip::after {
  content: '';
  position: absolute;
  left: var(--tip-arrow-x, 50%);
  width: 9px;
  height: 9px;
  margin-left: -5px;
  background: var(--surface-solid);
  border: 1px solid var(--border-soft);
  transform: rotate(45deg);
}
/* 朝下（浮层在标签上方）：尖角那两条边是方块的下边和右边 */
.miu-tip[data-placement="top"]::after { bottom: -6px; border-top: 0; border-left: 0; }
/* 朝上（浮层在标签下方）：尖角那两条边是方块的上边和左边 */
.miu-tip[data-placement="bottom"]::after { top: -6px; border-bottom: 0; border-right: 0; }

@media (prefers-reduced-motion: reduce) {
  .miu-tip { transition: none; }
}

@media print {
  .bg-layer, #particle-canvas, .bg-grid, .site-header, .toast-stack, .miu-tip { display: none !important; }
  body { background: #fff; color: #000; }
}
