/* ============ 字体：Inter 本地化 ============ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable.woff2') format('woff2-variations');
}

/* ============================================================
   吟知 · 设计系统 v4.0
   苹果克制风 + 开发者社区实用性
   ============================================================ */

/* ============ 1. 设计令牌（Design Tokens） ============ */
:root {
  /* —— 中性色阶（10 阶） —— */
  --c-n50:  #FAFAFA;
  --c-n100: #F4F4F5;
  --c-n150: #ECECEE;
  --c-n200: #E4E4E7;
  --c-n300: #D4D4D8;
  --c-n400: #A1A1AA;
  --c-n500: #71717A;
  --c-n600: #52525B;
  --c-n700: #3F3F46;
  --c-n800: #27272A;
  --c-n900: #18181B;
  --c-n950: #0A0A0C;

  /* —— 语义背景 —— */
  --bg:           #FFFFFF;
  --bg-soft:      var(--c-n50);
  --bg-section:   var(--c-n100);
  --bg-elevated:  #FFFFFF;
  --bg-muted:     var(--c-n100);
  --bg-input:     var(--c-n100);
  --bg-glass:     rgba(255, 255, 255, 0.72);
  --bg-glass-strong: rgba(255, 255, 255, 0.86);

  /* —— 文字层级 —— */
  --text:         var(--c-n950);
  --text-strong:  #000000;
  --text-secondary: var(--c-n600);
  --text-tertiary:  var(--c-n500);
  --text-faint:     var(--c-n400);
  --text-inverse:   #FFFFFF;

  /* —— 品牌色：暖橘（呼应苹果红 + 黑苹果的"黑"）—— */
  --brand-50:  #FFF4ED;
  --brand-100: #FFE6D4;
  --brand-200: #FFCAA9;
  --brand-300: #FFA876;
  --brand-400: #FF8242;
  --brand-500: #FF6B35;   /* 主色 */
  --brand-600: #ED5424;
  --brand-700: #C4401A;
  --brand-800: #8C2E12;
  --brand-900: #5A1E0C;

  --accent:        var(--brand-500);
  --accent-hover:  var(--brand-600);
  --accent-soft:   var(--brand-50);
  --accent-ring:   rgba(255, 107, 53, 0.18);
  --accent-glow:   rgba(255, 107, 53, 0.32);

  /* —— 状态色 —— */
  --success:   #10B981;
  --success-soft: #ECFDF5;
  --warning:   #F59E0B;
  --warning-soft: #FFFBEB;
  --danger:    #EF4444;
  --danger-soft: #FEF2F2;
  --info:      #0EA5E9;
  --info-soft: #F0F9FF;

  /* —— 边框 —— */
  --border:        #E4E4E7;
  --border-soft:   #F0F0F2;
  --border-strong: #D4D4D8;
  --border-focus:  var(--brand-500);

  /* —— 阴影（极轻 → 极重） —— */
  --shadow-2xs: 0 1px 2px rgba(10, 10, 12, 0.04);
  --shadow-xs:  0 1px 2px rgba(10, 10, 12, 0.05), 0 1px 3px rgba(10, 10, 12, 0.04);
  --shadow-sm:  0 2px 4px rgba(10, 10, 12, 0.05), 0 1px 2px rgba(10, 10, 12, 0.04);
  --shadow-md:  0 4px 12px rgba(10, 10, 12, 0.06), 0 1px 3px rgba(10, 10, 12, 0.04);
  --shadow-lg:  0 12px 32px rgba(10, 10, 12, 0.08), 0 2px 6px rgba(10, 10, 12, 0.04);
  --shadow-xl:  0 24px 64px rgba(10, 10, 12, 0.12), 0 8px 16px rgba(10, 10, 12, 0.05);
  --shadow-2xl: 0 40px 96px rgba(10, 10, 12, 0.18);
  --shadow-focus: 0 0 0 4px var(--accent-ring);
  --shadow-card-hover: 0 20px 48px rgba(10, 10, 12, 0.10), 0 4px 8px rgba(10, 10, 12, 0.05);

  /* —— 圆角 —— */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-3xl: 32px;
  --r-full: 999px;

  /* —— 间距尺度（4px 基线） —— */
  --sp-0:  0;
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* —— 字体 —— */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono:
    ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --font-display:
    "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei UI", sans-serif;

  /* —— 字号梯度（苹果式大字号） —— */
  --t-caption: 12px;
  --t-small:   13px;
  --t-body:    15px;
  --t-body-lg: 17px;
  --t-h6:      18px;
  --t-h5:      20px;
  --t-h4:      24px;
  --t-h3:      30px;
  --t-h2:      40px;
  --t-h1:      56px;
  --t-display: 72px;

  /* —— 行高 —— */
  --lh-tight: 1.15;
  --lh-snug:  1.3;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  /* —— 动效 —— */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --dur-fast: 150ms;
  --dur-base: 240ms;
  --dur-slow: 400ms;

  /* —— 布局 —— */
  --container: 1200px;
  --container-narrow: 920px;
  --container-wide: 1320px;
  --header-h: 64px;
  --sidebar-w: 280px;
  --radius-pill: 999px;

  /* —— 渐变 —— */
  --gradient-brand: linear-gradient(135deg, #FF8242 0%, #FF6B35 50%, #ED5424 100%);
  --gradient-mesh:
    radial-gradient(60% 50% at 12% 18%, rgba(255, 107, 53, 0.14) 0%, transparent 60%),
    radial-gradient(55% 60% at 88% 12%, rgba(14, 165, 233, 0.10) 0%, transparent 62%),
    radial-gradient(70% 65% at 82% 88%, rgba(139, 92, 246, 0.10) 0%, transparent 65%),
    radial-gradient(50% 50% at 18% 82%, rgba(236, 72, 153, 0.08) 0%, transparent 62%);
  --gradient-soft: linear-gradient(180deg, #FFFFFF 0%, var(--c-n50) 100%);
  --gradient-hero:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 53, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(139, 92, 246, 0.10) 0%, transparent 60%);
}

/* ============ 2. 深色模式令牌 ============ */
[data-theme="dark"] {
  --bg:           #0A0A0C;
  --bg-soft:      #111114;
  --bg-section:   #14141A;
  --bg-elevated:  #18181B;
  --bg-muted:     #1E1E24;
  --bg-input:     #1E1E24;
  --bg-glass:     rgba(20, 20, 24, 0.72);
  --bg-glass-strong: rgba(20, 20, 24, 0.88);

  --text:         #F4F4F5;
  --text-strong:  #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-tertiary:  #71717A;
  --text-faint:     #52525B;
  --text-inverse:   #0A0A0C;

  --border:        #27272A;
  --border-soft:   #1E1E24;
  --border-strong: #3F3F46;

  --shadow-2xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-xs:  0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-sm:  0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 12px 32px rgba(0, 0, 0, 0.55);
  --shadow-xl:  0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-2xl: 0 40px 96px rgba(0, 0, 0, 0.7);
  --shadow-card-hover: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 107, 53, 0.18);

  --gradient-mesh:
    radial-gradient(60% 50% at 12% 18%, rgba(255, 107, 53, 0.18) 0%, transparent 60%),
    radial-gradient(55% 60% at 88% 12%, rgba(14, 165, 233, 0.12) 0%, transparent 62%),
    radial-gradient(70% 65% at 82% 88%, rgba(139, 92, 246, 0.14) 0%, transparent 65%),
    radial-gradient(50% 50% at 18% 82%, rgba(236, 72, 153, 0.10) 0%, transparent 62%);
  --gradient-soft: linear-gradient(180deg, #0A0A0C 0%, #111114 100%);
}


/* ============ 3. Reset & Base ============ */
*, *::before, *::after {
  box-sizing: border-box;
}
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  font-feature-settings: "tnum" 1, "ss01" 1;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
body.ai-zone {
  background:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 30%, rgba(139, 92, 246, 0.10) 0%, transparent 60%),
    var(--bg);
}
[data-theme="dark"] body.ai-zone {
  background:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(99, 102, 241, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 30%, rgba(139, 92, 246, 0.14) 0%, transparent 60%),
    var(--bg);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
  color: inherit;
}
button { background: none; border: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  line-height: var(--lh-tight);
}
p { color: var(--text-secondary); }

::selection {
  background: var(--accent);
  color: #fff;
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--c-n300);
  border-radius: var(--r-full);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--c-n400); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--c-n700); }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: var(--c-n600); }

/* ============ 4. Typography ============ */
.t-display {
  font-size: clamp(40px, 6.5vw, var(--t-display));
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.t-h1 {
  font-size: clamp(34px, 4.5vw, var(--t-h1));
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.t-h2 {
  font-size: clamp(28px, 3.4vw, var(--t-h2));
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.t-h3 {
  font-size: clamp(22px, 2.4vw, var(--t-h3));
  font-weight: 700;
  letter-spacing: -0.02em;
}
.t-h4 { font-size: var(--t-h4); font-weight: 600; }
.t-h5 { font-size: var(--t-h5); font-weight: 600; }
.t-eyebrow {
  font-size: var(--t-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.t-mono { font-family: var(--font-mono); }
.t-num { font-variant-numeric: tabular-nums; }
.t-muted { color: var(--text-tertiary); }
.t-center { text-align: center; }
.text-grad {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.text-grad-ai {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============ 5. Layout ============ */
.container,
.container-wide,
.container-narrow {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
.container       { max-width: var(--container); }
.container-narrow{ max-width: var(--container-narrow); }
.container-wide  { max-width: var(--container-wide); }
@media (min-width: 768px) {
  .container, .container-wide, .container-narrow { padding-inline: var(--sp-8); }
}

main { flex: 1 0 auto; }

.section {
  padding-block: clamp(56px, 8vw, 96px);
  position: relative;
}
.section-tight { padding-block: clamp(40px, 6vw, 64px); }
.section-soft  { background: var(--bg-soft); }
.section-hero  { padding-block: clamp(80px, 12vw, 160px); }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-10);
  flex-wrap: wrap;
  position: relative;
  padding-left: var(--sp-4);
  border-left: 3px solid var(--accent);
}
.section-title {
  font-size: clamp(24px, 3vw, var(--t-h3));
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.section-title .eyebrow-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.section-subtitle {
  margin-top: var(--sp-2);
  color: var(--text-tertiary);
  font-size: var(--t-body);
}
.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: var(--t-body);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-full);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.section-more:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.section-more::after { content: "→"; transition: transform var(--dur-fast) var(--ease-out); }
.section-more:hover::after { transform: translateX(2px); }

/* 栅格 */
.grid {
  display: grid;
  gap: var(--sp-6);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
}
@media (max-width: 520px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* 主内容 + 边栏 */
.layout-with-aside {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-10);
  align-items: start;
}
@media (max-width: 1024px) {
  .layout-with-aside { grid-template-columns: 1fr; gap: var(--sp-8); }
}

.aside { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 1024px) { .aside { position: static; } }
.aside-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  box-shadow: var(--shadow-2xs);
}
.aside-card + .aside-card { margin-top: var(--sp-5); }
.aside-title {
  font-size: var(--t-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}


/* ============ 6. 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--r-full);
  font-size: var(--t-body);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  user-select: none;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.btn-sm { height: 32px; padding: 0 14px; font-size: var(--t-small); }
.btn-lg { height: 48px; padding: 0 28px; font-size: var(--t-body-lg); }
.btn-xl { height: 56px; padding: 0 32px; font-size: var(--t-h6); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 8px 16px -4px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 12px 24px -4px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
}
.btn-ghost:hover { background: var(--accent-soft); }

.btn-dark {
  background: var(--c-n950);
  color: #fff;
}
[data-theme="dark"] .btn-dark { background: #fff; color: var(--c-n950); }
.btn-dark:hover { background: var(--c-n800); }
[data-theme="dark"] .btn-dark:hover { background: var(--c-n100); }

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--r-full);
}
.btn-icon.btn-sm { width: 32px; height: 32px; }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-lg svg { width: 18px; height: 18px; }

.btn-group { display: inline-flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ============ 7. 表单 ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text-secondary);
}
.field-hint { font-size: var(--t-caption); color: var(--text-tertiary); }
.field-error { font-size: var(--t-caption); color: var(--danger); }

.input, .textarea, .select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: var(--t-body);
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: all var(--dur-fast) var(--ease-out);
  outline: none;
}
.textarea {
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
  line-height: var(--lh-normal);
  resize: vertical;
  font-family: inherit;
}
.input:hover, .textarea:hover, .select:hover {
  background: var(--bg-muted);
}
.input:focus, .textarea:focus, .select:focus {
  background: var(--bg-elevated);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input[disabled], .textarea[disabled], .select[disabled] { opacity: 0.6; cursor: not-allowed; }

.input-search {
  padding-left: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 16px;
}
.input-with-icon-right { padding-right: 40px; }

.checkbox, .radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: var(--t-body);
  color: var(--text-secondary);
}
.checkbox input, .radio input {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-elevated);
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  transition: all var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.radio input { border-radius: 50%; }
.checkbox input:checked, .radio input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox input:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.radio input:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: #fff;
  border-radius: 50%;
}

/* ============ 8. 徽章 / 角标 ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--r-full);
  background: var(--bg-muted);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.badge-new   { background: var(--success-soft); color: #047857; }
.badge-hot   { background: #FEF2F2; color: #B91C1C; }
.badge-free  { background: var(--info-soft); color: #0369A1; }
.badge-pro   { background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%); color: #92400E; }
.badge-cat   { background: var(--accent-soft); color: var(--accent); }
.badge-ai    { background: linear-gradient(135deg, #EEF2FF 0%, #F3E8FF 100%); color: #6D28D9; }
[data-theme="dark"] .badge-new   { background: rgba(16,185,129,0.15); color: #6EE7B7; }
[data-theme="dark"] .badge-hot   { background: rgba(239,68,68,0.15);  color: #FCA5A5; }
[data-theme="dark"] .badge-free  { background: rgba(14,165,233,0.15); color: #7DD3FC; }
[data-theme="dark"] .badge-pro   { background: rgba(245,158,11,0.15); color: #FCD34D; }
[data-theme="dark"] .badge-ai    { background: rgba(139,92,246,0.18); color: #C4B5FD; }

/* 角标（卡片右上） */
.card-flag {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: var(--r-sm);
  background: rgba(0,0,0,0.7);
  color: #fff;
  backdrop-filter: blur(8px);
}
.card-flag-new { background: var(--success); }
.card-flag-hot { background: var(--danger); }

/* ============ 9. 卡片 ============ */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  transition: all var(--dur-base) var(--ease-out);
  overflow: hidden;
  position: relative;
}
.card-hover:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
}
.card-pad { padding: var(--sp-5); }
.card-pad-lg { padding: var(--sp-6); }

/* 资源卡片（核心） */
.res-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
  cursor: pointer;
}
.res-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
}
.res-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #FF8242 0%, #ED5424 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.res-card-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,0.15) 0%, transparent 50%);
}
.res-card-cover svg.icon, .res-card-cover i[data-lucide] {
  width: 48px; height: 48px;
  color: currentColor;
  position: relative; z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.08));
  stroke-width: 1.6;
}
/* 不同分类使用不同渐变 */
.res-card.cat-image    .res-card-cover { background: linear-gradient(135deg, #FFF4ED 0%, #FFE6D4 100%); color: #C2410C; }
.res-card.cat-kext     .res-card-cover { background: linear-gradient(135deg, var(--c-n100) 0%, var(--c-n200) 100%); color: var(--c-n700); }
.res-card.cat-efi      .res-card-cover { background: linear-gradient(135deg, var(--c-n50) 0%, var(--c-n150) 100%); color: var(--c-n800); }
.res-card.cat-tutorial .res-card-cover { background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%); color: #6D28D9; }
.res-card.cat-software .res-card-cover { background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%); color: #BE185D; }
.res-card.cat-build    .res-card-cover { background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); color: #4338CA; }
.res-card.cat-pve      .res-card-cover { background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%); color: #475569; }
.res-card.cat-tool     .res-card-cover { background: linear-gradient(135deg, #FAFAFA 0%, #F4F4F5 100%); color: #52525B; }
.res-card.cat-news     .res-card-cover { background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%); color: #EA580C; }
.res-card.cat-cheat    .res-card-cover { background: linear-gradient(135deg, #FEFCE8 0%, #FEF9C3 100%); color: #A16207; }
.res-card.cat-default  .res-card-cover { background: linear-gradient(135deg, var(--c-n100) 0%, var(--c-n200) 100%); color: var(--c-n600); }

.res-card-body {
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.res-card-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.res-card-cat::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.res-card-title {
  font-size: var(--t-body-lg);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-strong);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.01em;
}
.res-card:hover .res-card-title { color: var(--accent); }
.res-card-desc {
  font-size: var(--t-small);
  color: var(--text-tertiary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.res-meta { display: inline-flex; align-items: center; gap: 4px; }
.res-meta svg { width: 13px; height: 13px; opacity: 0.7; stroke-width: 2; }
.res-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-soft);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
}
.res-card-meta svg, .res-meta-ico { width: 13px; height: 13px; stroke-width: 1.75; vertical-align: -2px; margin-right: 3px; opacity: 0.7; }
.res-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.res-card-meta svg { width: 12px; height: 12px; }

/* 列表行资源卡（用于右侧边栏） */
.res-row {
  display: flex;
  align-items: start;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  transition: background var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.res-row:hover { background: var(--bg-muted); }
.res-row-num {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--t-caption);
  font-weight: 700;
  color: var(--text-faint);
  border-radius: var(--r-sm);
  font-variant-numeric: tabular-nums;
}
.res-row.is-1 .res-row-num,
.res-row.is-2 .res-row-num,
.res-row.is-3 .res-row-num {
  background: var(--gradient-brand);
  color: #fff;
}
.res-row-body { flex: 1; min-width: 0; }
.res-row-title {
  font-size: var(--t-body);
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.res-row:hover .res-row-title { color: var(--accent); }
.res-row-meta {
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  margin-top: 2px;
}


/* ============ 10. 导航（Header + Mega Menu） ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.header.is-scrolled {
  border-bottom-color: var(--border-soft);
  background: var(--bg-glass-strong);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--sp-6);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: var(--t-h5);
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.logo-icon {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff 0%, #FFF4ED 100%);
  border: 1px solid rgba(255, 107, 53, 0.18);
  flex-shrink: 0;
  overflow: visible;
  transition: transform 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: drop-shadow(0 2px 4px rgba(255, 107, 53, 0.12));
}
.logo:hover .logo-icon { transform: rotate(-6deg) scale(1.06); }
.logo-icon img, .logo-icon svg {
  width: 26px; height: 26px;
  display: block;
}
[data-theme="dark"] .logo-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 107, 53, 0.08) 100%);
  border-color: rgba(255, 107, 53, 0.3);
  filter: drop-shadow(0 2px 6px rgba(255, 107, 53, 0.2));
}
.logo-fallback { font-size: 18px; line-height: 1; }
.logo-text { line-height: 1; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: var(--sp-4);
  flex: 1;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-md);
  font-size: var(--t-body);
  font-weight: 500;
  color: var(--text);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.main-nav a:hover { background: var(--bg-muted); }
.main-nav a.active { color: var(--accent); }
.nav-arrow {
  font-size: 9px;
  margin-left: 4px;
  transition: transform var(--dur-fast) var(--ease-out);
  opacity: 0.6;
}
.nav-drop { position: relative; }
.nav-drop:hover .nav-arrow { transform: rotate(180deg); }

/* Mega Menu */
.nav-mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-4);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--dur-base) var(--ease-out);
  z-index: 200;
}
.nav-mega::before {
  content: "";
  position: absolute;
  top: -8px; left: 0; right: 0;
  height: 8px;
}
.nav-drop:hover .nav-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-mega-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-1);
}
.nav-mega-head {
  grid-column: 1 / -1;
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 10px 2px;
}
.nav-mega a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  height: 36px !important;
  padding: 0 10px !important;
  font-size: var(--t-body) !important;
  font-weight: 500;
  border-radius: var(--r-md) !important;
  white-space: nowrap;
}
.nav-mega a:hover { background: var(--accent-soft) !important; color: var(--accent) !important; }
.nav-mega-icon {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--bg-muted);
  font-size: 12px;
  flex-shrink: 0;
}
.nav-mega a:hover .nav-mega-icon {
  background: var(--accent);
  color: #fff;
}
.nav-mega-cta {
  grid-column: 1 / -1;
  margin-top: var(--sp-2);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--bg-soft);
  font-size: var(--t-small);
  color: var(--text-secondary);
  display: block;
  text-align: center;
}
.nav-mega-cta strong { color: var(--accent); font-weight: 600; }

/* AI Mega Menu（紫色渐变） */
.nav-mega-ai {
  width: 640px;
  padding: var(--sp-5);
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(99,102,241,0.08) 0%, transparent 60%),
    var(--bg-elevated);
}
.nav-mega-ai .nav-mega-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
.nav-mega-ai a {
  height: 56px !important;
  padding: 0 12px !important;
  border-radius: var(--r-md) !important;
  flex-direction: row !important;
  align-items: center !important;
  text-align: left !important;
  gap: 12px !important;
}
.nav-mega-ai-icon {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--bg-muted);
  transition: all var(--dur-fast) var(--ease-out);
}
.nav-mega-ai a:hover .nav-mega-ai-icon { transform: scale(1.05); }
.nav-mega-ai-meta { display: flex; flex-direction: column; gap: 2px; }
.nav-mega-ai-meta strong {
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--text);
}
.nav-mega-ai-meta span {
  font-size: var(--t-caption);
  color: var(--text-tertiary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-inline-start: auto;
}
.header-search { position: relative; }
.header-search .input {
  width: 220px;
  height: 36px;
  padding-left: 36px;
  padding-right: 36px;
  background: var(--bg-muted);
  border: 1px solid transparent;
}
.header-search .input:focus {
  background: var(--bg-elevated);
  width: 280px;
  border-color: var(--border-focus);
}
.header-search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
  stroke-width: 1.6;
}
.header-search-clear {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-n300);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.header-search-clear.show { display: inline-flex; }
.header-suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 50px -12px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.08); padding: 6px; z-index: 1100; max-height: 360px; overflow-y: auto; opacity: 0; transform: translateY(-4px); transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }
.header-suggest:not([hidden]) { opacity: 1; transform: translateY(0); }
.header-suggest[hidden] { display: none; }
.header-suggest-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; transition: background 120ms; cursor: pointer; }
.header-suggest-item:hover, .header-suggest-item.is-active { background: var(--c-n50, #f5f5f7); }
[data-theme="dark"] .header-suggest-item:hover, [data-theme="dark"] .header-suggest-item.is-active { background: rgba(255,255,255,0.06); }
.header-suggest-item svg:first-child { width: 14px; height: 14px; color: var(--text-tertiary); flex-shrink: 0; }
.header-suggest-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-suggest-text mark { background: transparent; color: var(--accent); font-weight: 600; }
.header-suggest-go { width: 12px !important; height: 12px !important; color: var(--text-tertiary); opacity: 0; transition: opacity 120ms, transform 120ms; }
.header-suggest-item:hover .header-suggest-go, .header-suggest-item.is-active .header-suggest-go { opacity: 1; transform: translate(2px, -2px); }
.header-suggest-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; margin-top: 4px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--text-tertiary); }
.header-suggest-foot a { color: var(--accent); text-decoration: none; font-weight: 500; }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: var(--text);
  background: transparent;
  transition: background var(--dur-fast) var(--ease-out);
  position: relative;
}
.icon-btn:hover { background: var(--bg-muted); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--bg);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 4px;
  border-radius: var(--r-full);
  background: var(--bg-muted);
  font-size: var(--t-small);
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease-out);
}
.user-pill:hover { background: var(--c-n200); }
[data-theme="dark"] .user-pill:hover { background: var(--c-n800); }
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  font-size: var(--t-caption);
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.menu-toggle { display: none; }
.header-search-toggle, #headerSearchToggle { display: none; }

/* 移动端 */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-search-toggle, #headerSearchToggle { display: inline-flex; }
  .header-search .input { display: none; }
  .header-search.is-active .input {
    display: block;
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    width: calc(100vw - 120px);
  }
}
@media (max-width: 520px) {
  .header-search { display: none; }
  .header-search-toggle, #headerSearchToggle { display: inline-flex; }
}

/* 移动端菜单 */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  z-index: 99;
  padding: var(--sp-5) var(--sp-6) var(--sp-12);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease-out);
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-section { margin-bottom: var(--sp-6); }
.mobile-menu-head {
  font-size: var(--t-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-2);
}
.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 8px;
  border-radius: var(--r-md);
  font-size: var(--t-body);
  color: var(--text);
}
.mobile-menu a:hover, .mobile-menu a.active { background: var(--bg-muted); color: var(--accent); }
.mobile-menu .nav-ai-link-mobile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 50%, rgba(236, 72, 153, 0.08) 100%);
  color: #6366F1;
  font-weight: 600;
  margin-top: var(--sp-2);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
}
.mobile-menu .nav-ai-link-mobile.is-active {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

/* ============ AI 专区入口（主站 → AI 的"门户"胶囊）============ */
/* 在主站里它是个轻量的渐变胶囊，预告点进去会进入另一个视觉世界；
   在 AI 页面里它变成激活态（已在此区），跟苹果"已选标签"模式一致。 */
.main-nav a.nav-ai-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.06) 50%, rgba(236, 72, 153, 0.06) 100%);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: #4F46E5;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  position: relative;
  transition: all 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  -webkit-tap-highlight-color: transparent;
}
.main-nav a.nav-ai-link::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6, #EC4899);
  opacity: 0;
  z-index: -1;
  filter: blur(12px);
  transition: opacity 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}
.main-nav a.nav-ai-link:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 50%, rgba(236, 72, 153, 0.12) 100%);
  border-color: rgba(139, 92, 246, 0.4);
  color: #4338CA;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.18);
  text-decoration: none;
}
.main-nav a.nav-ai-link:hover::before { opacity: 0.45; }
.main-nav a.nav-ai-link:active { transform: translateY(0); }
.nav-ai-link-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  animation: navAiSparkle 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
  filter: drop-shadow(0 1px 1.5px rgba(99, 102, 241, 0.25));
}
.nav-ai-link-mark svg { width: 100%; height: 100%; display: block; }
.nav-ai-link-text { line-height: 1; }
@keyframes navAiSparkle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.12); }
}
/* AI 页面里：激活态（已在此区），紫色实心 + 白字 */
.main-nav a.nav-ai-link.is-active {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  border-color: transparent;
  color: #fff;
  box-shadow:
    0 4px 14px rgba(99, 102, 241, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.main-nav a.nav-ai-link.is-active::before { opacity: 0; }
.main-nav a.nav-ai-link.is-active:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px rgba(139, 92, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.nav-ai-link.is-active .nav-ai-link-mark {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
  animation: navAiSparkle 2.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}
/* 暗色模式 */
[data-theme="dark"] .main-nav a.nav-ai-link {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(236, 72, 153, 0.1) 100%);
  border-color: rgba(139, 92, 246, 0.3);
  color: #C7D2FE;
}
[data-theme="dark"] .main-nav a.nav-ai-link:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(139, 92, 246, 0.18) 50%, rgba(236, 72, 153, 0.18) 100%);
  border-color: rgba(167, 139, 250, 0.55);
  color: #DDD6FE;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.28);
}
[data-theme="dark"] .main-nav a.nav-ai-link.is-active {
  color: #fff;
  box-shadow:
    0 4px 14px rgba(99, 102, 241, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
[data-theme="dark"] .main-nav a.nav-ai-link.is-active:hover {
  box-shadow:
    0 8px 22px rgba(139, 92, 246, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
/* 移动端隐藏主按钮（用 .nav-ai-link-mobile 替代） */
@media (max-width: 980px) {
  .main-nav a.nav-ai-link { display: none; }
}

/* ============ 11. 公告栏 ============ */
.announcement-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: 36px;
  padding: 0 var(--sp-4);
  background: linear-gradient(90deg, var(--brand-50) 0%, transparent 100%);
  border: 1px solid var(--brand-100);
  border-radius: var(--r-full);
  margin-top: var(--sp-3);
  font-size: var(--t-small);
  color: var(--brand-700);
  overflow: hidden;
}
[data-theme="dark"] .announcement-bar {
  background: linear-gradient(90deg, rgba(255,107,53,0.10) 0%, transparent 100%);
  border-color: rgba(255,107,53,0.18);
  color: var(--brand-200);
}
.announcement-bar svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ============ 12. Hero（核心） ============ */
.hero {
  position: relative;
  padding-block: clamp(80px, 14vw, 160px);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--gradient-hero);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--gradient-mesh);
  opacity: 0.6;
}
.hero-inner {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-full);
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-soft);
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--text);
  backdrop-filter: blur(12px);
}
.hero-eyebrow .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: pulse 2s infinite;
}
.spin { animation: mfeSpin 1s linear infinite; }
@keyframes mfeSpin { to { transform: rotate(360deg); } }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.hero h1 {
  margin-top: var(--sp-5);
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-strong);
}
.hero h1 .accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub { color: var(--text-secondary); font-size: var(--t-body-lg); margin-bottom: var(--sp-8); max-width: 560px; }
.hero-cta {
  margin-top: var(--sp-8);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
}
.hero-search {
  margin-top: var(--sp-10);
  max-width: 560px;
  margin-inline: auto;
  position: relative;
}
.hero-search .input {
  height: 56px;
  padding-left: 56px;
  padding-right: 56px;
  font-size: var(--t-body-lg);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
}
.hero-search .input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md), var(--shadow-focus);
}
.hero-search-icon {
  position: absolute;
  left: 22px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  color: var(--text-tertiary);
  pointer-events: none;
}
.hero-search-btn {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: transform var(--dur-fast) var(--ease-out);
}
.hero-search-btn:hover { transform: translateY(-50%) scale(1.05); }
.hero-tags {
  margin-top: var(--sp-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-full);
  font-size: var(--t-caption);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(8px);
  transition: all var(--dur-fast) var(--ease-out);
}
.hero-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ============ 13. 特色区块 ============ */
/* 黑果必备 三栏排行 */
.must-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
@media (max-width: 900px) { .must-grid { grid-template-columns: 1fr; } }

.must-list {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
}
.must-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border-soft);
}
.must-list-title { font-size: var(--t-h6); font-weight: 600; }
.must-list-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
}
.must-list ol { display: flex; flex-direction: column; gap: 2px; }
.must-list-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 8px 6px;
  border-radius: var(--r-md);
  transition: background var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.must-list-item:hover { background: var(--bg-muted); }
.must-list-num {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.must-list-item.is-1 .must-list-num,
.must-list-item.is-2 .must-list-num,
.must-list-item.is-3 .must-list-num {
  background: var(--gradient-brand);
  color: #fff;
  border-radius: var(--r-sm);
}
.must-list-name {
  flex: 1;
  font-size: var(--t-small);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.must-list-item:hover .must-list-name { color: var(--accent); }
.must-list-val {
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* 教程卡片（文章风格） */
.tut-card {
  display: flex;
  gap: var(--sp-5);
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  transition: all var(--dur-base) var(--ease-out);
  cursor: pointer;
}
.tut-card:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
}
.tut-card-thumb {
  flex-shrink: 0;
  width: 200px;
  aspect-ratio: 16/10;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  position: relative;
  overflow: hidden;
}
.tut-card-thumb svg { width: 36px; height: 36px; position: relative; z-index: 1; stroke-width: 1.8; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15)); }
.tut-card-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2), transparent 60%);
}
.tut-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.tut-card-tag {
  display: inline-flex;
  width: max-content;
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tut-card-title {
  font-size: var(--t-h5);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.tut-card:hover .tut-card-title { color: var(--accent); }
.tut-card-desc {
  font-size: var(--t-body);
  color: var(--text-tertiary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tut-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
}
@media (max-width: 700px) {
  .tut-card { flex-direction: column; padding: 0; }
  .tut-card-thumb { width: 100%; }
}

/* 装机实例卡（带图） */
.build-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-out);
  cursor: pointer;
}
.build-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}
.build-card-img {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #6366F1 0%, #4338CA 100%);
  position: relative;
  overflow: hidden;
}
.build-card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2), transparent 60%);
}
.build-card-body { padding: var(--sp-4); display: flex; flex-direction: column; gap: 4px; }
.build-card-cat { font-size: var(--t-caption); color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.build-card-title { font-size: var(--t-h6); font-weight: 600; line-height: 1.3; }
.build-card:hover .build-card-title { color: var(--accent); }
.build-card-spec {
  margin-top: var(--sp-2);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* 资源请求横幅 */
.request-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  padding: var(--sp-12) var(--sp-10);
  background: var(--c-n950);
  color: #fff;
  border-radius: var(--r-2xl);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.request-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(255,107,53,0.30) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 50%, rgba(139,92,246,0.25) 0%, transparent 60%);
}
.request-banner h2 {
  font-size: clamp(28px, 3.4vw, var(--t-h2));
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1.1;
}
.request-banner p { color: rgba(255,255,255,0.72); margin-top: var(--sp-3); }
.request-banner .input {
  background: rgba(255,255,255,0.10);
  color: #fff;
  border-color: rgba(255,255,255,0.10);
}
.request-banner .input::placeholder { color: rgba(255,255,255,0.5); }
.request-banner .input:focus {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.30);
}
@media (max-width: 768px) {
  .request-banner { grid-template-columns: 1fr; padding: var(--sp-8); }
}

/* 为什么选吟知 */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
}
@media (max-width: 1024px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .why-grid { grid-template-columns: 1fr; } }
.why-card {
  padding: var(--sp-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  transition: all var(--dur-base) var(--ease-out);
}
.why-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}
.why-icon {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  font-size: 22px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.why-icon svg { width: 24px; height: 24px; stroke-width: 1.75; }
.why-card h3 { font-size: var(--t-h5); font-weight: 600; margin-bottom: var(--sp-2); }
.why-card p { font-size: var(--t-small); color: var(--text-tertiary); line-height: 1.6; }

/* 站点数据 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
}
.stat-num {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-label {
  margin-top: var(--sp-3);
  font-size: var(--t-small);
  color: var(--text-tertiary);
  font-weight: 500;
}

/* 友情链接 */
.friends {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.friends a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-full);
  font-size: var(--t-caption);
  color: var(--text-secondary);
  background: var(--bg-muted);
  transition: all var(--dur-fast) var(--ease-out);
}
.friends a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ============ 14. Footer ============ */
.footer {
  margin-top: var(--sp-24);
  padding: var(--sp-20) 0 var(--sp-8);
  background: var(--c-n950);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(255,107,53,0.10) 0%, transparent 60%);
  pointer-events: none;
}
[data-theme="dark"] .footer {
  background: #000;
}
.footer-inner { position: relative; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; }
}
.footer-brand .logo { color: #fff; }
.footer-brand p {
  margin-top: var(--sp-4);
  color: rgba(255,255,255,0.6);
  font-size: var(--t-small);
  line-height: 1.6;
  max-width: 360px;
}
.footer-pills {
  margin-top: var(--sp-5);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.footer-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 500;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
}
.footer-col h4 {
  font-size: var(--t-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--sp-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-col a {
  font-size: var(--t-body);
  color: rgba(255,255,255,0.72);
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-8);
  flex-wrap: wrap;
  font-size: var(--t-caption);
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: #fff; }
.footer-legal { display: inline-flex; gap: var(--sp-4); }


/* ============ 15. 浮动工具栏 ============ */
.fab {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fab-btn {
  position: relative;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10), 0 2px 4px rgba(0, 0, 0, 0.04);
  color: var(--accent);
  border-color: var(--accent);
}
.fab-btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.32), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.fab-btn-primary:hover {
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(255, 107, 53, 0.42), 0 2px 4px rgba(0, 0, 0, 0.04);
}
.fab-btn svg { width: 18px; height: 18px; }
[data-theme="dark"] .fab-btn {
  background: rgba(28, 28, 30, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .fab-btn:hover { color: var(--brand-300); border-color: var(--brand-300); }
.fab-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--c-n950);
  color: #fff;
  font-size: var(--t-caption);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--dur-fast) var(--ease-out);
  pointer-events: none;
}
.fab-btn:hover .fab-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(-4px);
}
.fab-to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--dur-base) var(--ease-out);
}
.fab-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 768px) {
  .fab { display: none; }
}

/* ============ 16. Toast / Modal / Skeleton ============ */
.toast-stack {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--r-full);
  background: rgba(20, 20, 24, 0.92);
  color: #fff;
  font-size: var(--t-body);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  animation: toast-in var(--dur-base) var(--ease-spring);
  pointer-events: auto;
}
.toast.success { background: rgba(16,185,129,0.95); }
.toast.error   { background: rgba(239,68,68,0.95); }
.toast.warning { background: rgba(245,158,11,0.95); }
.toast.info    { background: rgba(14,165,233,0.95); }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--dur-base) var(--ease-out);
}
.modal-mask.is-open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--bg-elevated);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-2xl);
  transform: scale(0.95) translateY(8px);
  opacity: 0;
  transition: all var(--dur-base) var(--ease-spring);
}
.modal-mask.is-open .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-title { font-size: var(--t-h5); font-weight: 600; }
.modal-body { padding: 24px; }
.modal-foot {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border-soft);
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all var(--dur-fast) var(--ease-out);
}
.modal-close:hover { background: var(--bg-muted); color: var(--text); }

.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 0%, var(--c-n150) 50%, var(--bg-muted) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: var(--r-sm);
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, var(--c-n800) 0%, var(--c-n700) 50%, var(--c-n800) 100%);
  background-size: 200% 100%;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
}
.skeleton-cover { aspect-ratio: 16/10; border-radius: var(--r-md); }
.skeleton-line { height: 14px; border-radius: 4px; }
.skeleton-line.lg { height: 18px; }
.skeleton-line.sm { height: 10px; width: 60%; }

/* 通用骨架屏 grid/list/table 容器 */
.grid-skeleton { display: grid; gap: var(--sp-5, 20px); }
.grid-skeleton.grid-cols-1 { grid-template-columns: 1fr; }
.grid-skeleton.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-skeleton.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-skeleton.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .grid-skeleton.grid-cols-3, .grid-skeleton.grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-skeleton.grid-cols-2, .grid-skeleton.grid-cols-3, .grid-skeleton.grid-cols-4 { grid-template-columns: 1fr; }
}

.list-skeleton { display: flex; flex-direction: column; gap: 12px; }
.skeleton-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-lg); }
.skeleton-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }

.rows-skeleton { display: flex; flex-direction: column; gap: 10px; }
.skeleton-row-item { padding: 14px 16px; background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 8px; }

.table-skeleton { width: 100%; }

/* ============ 17. 分页 ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: var(--sp-10);
  flex-wrap: wrap;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text);
  background: transparent;
  transition: all var(--dur-fast) var(--ease-out);
}
.page-btn:hover { background: var(--bg-muted); }
.page-btn.is-active {
  background: var(--accent);
  color: #fff;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-ellipsis { padding: 0 4px; color: var(--text-faint); }

/* ============ 18. 标签芯片 ============ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-full);
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text);
  background: var(--bg-muted);
  border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { background: var(--c-n200); }
[data-theme="dark"] .chip:hover { background: var(--c-n800); }
.chip.is-active {
  background: var(--accent);
  color: #fff;
}
.chip-sm { height: 24px; padding: 0 10px; font-size: var(--t-caption); }
.chip-group { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip-count {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  background: var(--c-n200);
  color: var(--text-secondary);
}
[data-theme="dark"] .chip-count { background: var(--c-n800); }
.chip.is-active .chip-count { background: rgba(255,255,255,0.25); color: #fff; }

/* ============ 19. 进度条 / 阅读进度 ============ */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--gradient-brand);
  z-index: 200;
  width: 0%;
  transition: width 100ms linear;
}

/* ============ 20. 评论 ============ */
.comment {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border-soft);
}
.comment:last-child { border-bottom: none; }
.comment-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  font-size: var(--t-small);
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: 4px;
  font-size: var(--t-small);
}
.comment-author { font-weight: 600; color: var(--text); }
.comment-time { color: var(--text-tertiary); }
.comment-text {
  font-size: var(--t-body);
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.comment-actions {
  margin-top: var(--sp-2);
  display: inline-flex;
  gap: var(--sp-3);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
}
.comment-actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  transition: all var(--dur-fast) var(--ease-out);
}
.comment-actions button:hover { background: var(--bg-muted); color: var(--accent); }
.comment-actions button.is-liked { color: var(--accent); }
.comment-actions svg { width: 14px; height: 14px; }

/* ============ 21. 工具类 ============ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mt-10 { margin-top: var(--sp-10); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============ 22. 认证页（登录/注册） ============ */
.auth {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: calc(100vh - var(--header-h));
}
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } }

.auth-side {
  position: relative;
  background: var(--c-n950);
  color: #fff;
  padding: var(--sp-12) var(--sp-10);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  isolation: isolate;
}
.auth-side::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(255,107,53,0.40) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139,92,246,0.35) 0%, transparent 50%);
}
.auth-side::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
}
.auth-side h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
  max-width: 480px;
}
.auth-side h1 span {
  background: linear-gradient(135deg, #FF8242 0%, #EC4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.auth-side p {
  margin-top: var(--sp-4);
  color: rgba(255,255,255,0.7);
  font-size: var(--t-body-lg);
  max-width: 420px;
  line-height: 1.6;
}
.auth-features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
}
.auth-feature {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: rgba(255,255,255,0.85);
  font-size: var(--t-body);
}
.auth-feature-icon {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.10);
  border-radius: 8px;
  color: #fff;
  flex-shrink: 0;
}
.auth-feature-icon svg { width: 16px; height: 16px; }
.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-8);
  padding-top: var(--sp-8);
  border-top: 1px solid rgba(255,255,255,0.10);
}
.auth-stat-num {
  font-size: var(--t-h2);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
}
.auth-stat-label {
  margin-top: 4px;
  font-size: var(--t-caption);
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-12) var(--sp-8);
}
.auth-form {
  width: 100%;
  max-width: 380px;
}
.auth-form h2 {
  font-size: var(--t-h2);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-2);
}
.auth-form .auth-sub {
  color: var(--text-tertiary);
  margin-bottom: var(--sp-8);
  font-size: var(--t-body);
}
.auth-form .field + .field { margin-top: var(--sp-4); }
.auth-form .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-3);
  font-size: var(--t-small);
}
.auth-form .row a { color: var(--accent); font-weight: 500; }
.auth-form .row a:hover { text-decoration: underline; }
.auth-form .btn { width: 100%; margin-top: var(--sp-6); }
.auth-form .divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: var(--sp-6) 0;
  font-size: var(--t-caption);
  color: var(--text-tertiary);
}
.auth-form .divider::before,
.auth-form .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}
.auth-form .auth-foot {
  margin-top: var(--sp-6);
  text-align: center;
  font-size: var(--t-small);
  color: var(--text-tertiary);
}
.auth-form .auth-foot a { color: var(--accent); font-weight: 500; }

@media (max-width: 900px) {
  .auth-side { padding: var(--sp-8); }
  .auth-form-wrap { padding: var(--sp-8); }
}

/* ============ 23. 个人中心 ============ */
.profile {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-8);
  align-items: start;
}
@media (max-width: 900px) { .profile { grid-template-columns: 1fr; } }

.profile-side {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-2xl);
  padding: var(--sp-6);
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
@media (max-width: 900px) { .profile-side { position: static; } }
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-id { text-align: center; margin-top: var(--sp-4); }
.profile-name { font-size: var(--t-h5); font-weight: 700; }
.profile-mail { font-size: var(--t-caption); color: var(--text-tertiary); margin-top: 2px; }
.profile-lv {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  margin-top: var(--sp-3);
}
.profile-xp {
  margin-top: var(--sp-3);
  height: 6px;
  border-radius: 3px;
  background: var(--bg-muted);
  overflow: hidden;
}
.profile-xp-bar {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 3px;
}
.profile-xp-text {
  display: flex;
  justify-content: space-between;
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  margin-top: 4px;
}
.profile-nav { margin-top: var(--sp-6); display: flex; flex-direction: column; gap: 2px; }
.profile-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-md);
  font-size: var(--t-body);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.profile-nav-item:hover { background: var(--bg-muted); color: var(--text); }
.profile-nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.profile-nav-item svg { width: 16px; height: 16px; }
.profile-nav-foot {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-soft);
}

.profile-main {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-2xl);
  overflow: hidden;
  min-height: 480px;
}
.profile-tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
  overflow-x: auto;
}
.profile-tab-bar button {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-md);
  font-size: var(--t-body);
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}
.profile-tab-bar button.is-active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.profile-tab-body { padding: var(--sp-8); }

/* 全部已读按钮 (notifications 标签页) */
.notif-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-5); flex-wrap: wrap; gap: var(--sp-3); }
.notif-toolbar h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.notif-mark-read { font-size: 13px; color: var(--accent); background: transparent; border: 1px solid var(--border-soft); padding: 6px 12px; border-radius: var(--r-full); cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 4px; }
.notif-mark-read:hover { background: var(--accent-soft); border-color: var(--accent); }
.notif-mark-read[disabled] { opacity: .5; cursor: not-allowed; }

/* 概览统计卡 + 列表 (profile 通用内联样式迁移) */
.profile-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.profile-section-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.profile-section-sub { color: var(--text-tertiary); font-size: 14px; margin-bottom: 32px; }
.profile-stat-mini { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; }
.profile-stat-num { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; color: var(--text); font-variant-numeric: tabular-nums; }
.profile-stat-card { text-align: left; padding: 20px 24px; }
.profile-grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.profile-list-item { padding: 16px 20px; background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: 14px; margin-bottom: 12px; }
.profile-list-flex { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.profile-list-name { font-size: 16px; font-weight: 600; }
.profile-list-sub { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }
.profile-list-time { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; }
.profile-card-pad { padding: var(--sp-8); }
.profile-card-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.profile-card-title-sm { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.profile-field-mt { margin-top: 16px; }
.profile-action-mt { margin-top: 20px; }
.profile-signin-row { display: flex; align-items: center; gap: 16px; }
.profile-empty { color: var(--text-tertiary); text-align: center; padding: 60px 0; }
.profile-loading { padding: 80px 0; text-align: center; color: var(--text-tertiary); }
.profile-unread { background: var(--accent-soft); }
.profile-read { background: var(--bg-soft); }
.profile-notif-body { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }
.profile-notif-title { font-size: 15px; font-weight: 600; }
.profile-avatar-text { display:flex; align-items:center; justify-content:center; width:100%; height:100%; }

/* ============ Profile 响应式 ============ */
@media (max-width: 900px) {
  .profile { grid-template-columns: 1fr !important; gap: var(--sp-4) !important; }
  .profile-side { position: sticky; top: 0; z-index: 5; flex-direction: row; align-items: center; flex-wrap: wrap; padding: var(--sp-4) !important; gap: var(--sp-4); }
  .profile-side .profile-avatar { width: 48px !important; height: 48px !important; font-size: 18px !important; }
  .profile-side .profile-id { text-align: left; flex: 1; min-width: 0; margin-top: 0; }
  .profile-side .profile-xp, .profile-side .profile-xp-text { display: none; }
  .profile-nav { flex-direction: row !important; margin-top: 0 !important; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .profile-nav .profile-nav-item { white-space: nowrap; padding: 8px 14px !important; }
  .profile-nav-foot { margin-left: auto; }
  .profile-stats-grid { grid-template-columns: 1fr 1fr; }
  .profile-main { padding: 0 !important; }
  .profile-tab-body { padding: var(--sp-5) var(--sp-4); }
}
@media (max-width: 560px) {
  .profile-stats-grid { grid-template-columns: 1fr; }
  .profile-side .profile-id { flex-basis: 100%; }
}

/* ============ 24. 详情页 ============ */
.detail {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-10);
  align-items: start;
}
@media (max-width: 1024px) { .detail { grid-template-columns: 1fr; } }

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: var(--t-small);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-4);
}
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--text-faint); }

.detail-head { margin-bottom: var(--sp-8); }
.detail-title {
  font-size: clamp(28px, 3.4vw, var(--t-h2));
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  font-size: var(--t-small);
  color: var(--text-tertiary);
}
.detail-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.detail-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
  flex-wrap: wrap;
}
.detail-actions .btn { height: 36px; padding: 0 16px; font-size: var(--t-small); }

.detail-cover {
  aspect-ratio: 16/9;
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, #FF8242 0%, #ED5424 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--sp-8);
  isolation: isolate;
}
.detail-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,0.15), transparent 50%);
  z-index: 0;
}
.detail-cover.cat-image    { background: linear-gradient(135deg, #FFF4ED 0%, #FFE6D4 100%); color: #C2410C; }
.detail-cover.cat-kext     { background: linear-gradient(135deg, var(--c-n100) 0%, var(--c-n200) 100%); color: var(--c-n700); }
.detail-cover.cat-efi      { background: linear-gradient(135deg, var(--c-n50) 0%, var(--c-n150) 100%); color: var(--c-n800); }
.detail-cover.cat-tutorial { background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%); color: #6D28D9; }
.detail-cover.cat-software { background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%); color: #BE185D; }
.detail-cover.cat-build    { background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); color: #4338CA; }
.detail-cover.cat-pve      { background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%); color: #475569; }
.detail-cover.cat-cheatsheet,
.detail-cover.cat-ssdt,
.detail-cover.cat-bootloader { background: linear-gradient(135deg, #FEFCE8 0%, #FEF9C3 100%); color: #A16207; }
.detail-cover.cat-default  { background: linear-gradient(135deg, var(--c-n100) 0%, var(--c-n200) 100%); color: var(--c-n600); }
.detail-cover .detail-cover-bg {
  position: absolute; right: -20px; bottom: -20px; z-index: 1;
  width: 220px; height: 220px; opacity: .08;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.detail-cover .detail-cover-bg i, .detail-cover .detail-cover-bg [data-lucide] {
  width: 220px; height: 220px; stroke-width: 1.0;
  color: currentColor;
}
.detail-cover .detail-cover-icon {
  position: relative; z-index: 2;
  width: 72px; height: 72px;
  display: inline-flex; align-items: center; justify-content: center;
}
.detail-cover .detail-cover-icon .res-cover-ico { width: 72px; height: 72px; opacity: .9; }

.detail-prose {
  font-size: var(--t-body-lg);
  line-height: 1.7;
  color: var(--text);
}
.detail-prose h2, .detail-prose h3 {
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-4);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.detail-prose h2 { font-size: var(--t-h3); }
.detail-prose h3 { font-size: var(--t-h4); }
.detail-prose p { margin-bottom: var(--sp-4); color: var(--text-secondary); }
.detail-prose ul, .detail-prose ol { padding-left: 24px; margin-bottom: var(--sp-4); }
.detail-prose li { margin-bottom: 8px; color: var(--text-secondary); }
.detail-prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  background: var(--bg-muted);
  border-radius: 4px;
  color: var(--accent);
}
.detail-prose pre {
  margin: var(--sp-4) 0;
  padding: var(--sp-4);
  background: var(--c-n950);
  color: var(--c-n100);
  border-radius: var(--r-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  line-height: 1.6;
}

.dl-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.dl-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  transition: all var(--dur-fast) var(--ease-out);
}
.dl-item:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
}
.dl-item-icon {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
  overflow: hidden;
}
.dl-item-icon .brand-svg, .dl-item-icon .brand-chip { width: 22px; height: 22px; }
.dl-item-icon .brand-chip { font-size: 11px; border-radius: 6px; }
.dl-item-body { flex: 1; min-width: 0; }
.dl-item-name { font-weight: 500; font-size: var(--t-body); }
.dl-item-meta { font-size: var(--t-caption); color: var(--text-tertiary); margin-top: 2px; }
.dl-item-actions { display: inline-flex; gap: 4px; flex-shrink: 0; }

.dl-table {
  margin-top: var(--sp-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}
.dl-table-row {
  display: flex;
  font-size: var(--t-small);
}
.dl-table-row + .dl-table-row { border-top: 1px solid var(--border-soft); }
.dl-table-key {
  flex: 0 0 140px;
  padding: 10px 16px;
  background: var(--bg-soft);
  color: var(--text-tertiary);
  font-weight: 500;
}
.dl-table-val { flex: 1; padding: 10px 16px; font-family: var(--font-mono); word-break: break-all; }

/* ============ 25. 列表页 ============ */
.list-head {
  margin-bottom: var(--sp-8);
}
.list-title {
  font-size: clamp(28px, 3.4vw, var(--t-h2));
  font-weight: 700;
  letter-spacing: -0.025em;
}
.list-sub {
  margin-top: var(--sp-2);
  color: var(--text-tertiary);
  font-size: var(--t-body);
}
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}
.list-toolbar-left, .list-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.view-toggle {
  display: inline-flex;
  background: var(--bg-muted);
  border-radius: var(--r-md);
  padding: 3px;
}
.view-toggle button {
  width: 32px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: var(--text-tertiary);
  transition: all var(--dur-fast) var(--ease-out);
}
.view-toggle button.is-active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.view-toggle button svg { width: 14px; height: 14px; }

.list-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
@media (max-width: 1024px) { .list-aside { position: static; } }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 列表视图 */
.list-rows {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.res-list-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.res-list-card:hover {
  background: var(--bg-soft);
  border-color: var(--border);
  transform: translateX(2px);
}
.res-list-cover {
  width: 80px; height: 80px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #FF8242 0%, #ED5424 100%);
}
.res-list-cover.cat-image    { background: linear-gradient(135deg, #FFF4ED 0%, #FFE6D4 100%); }
.res-list-cover.cat-kext     { background: linear-gradient(135deg, var(--c-n100) 0%, var(--c-n200) 100%); }
.res-list-cover.cat-efi      { background: linear-gradient(135deg, var(--c-n50) 0%, var(--c-n150) 100%); }
.res-list-cover.cat-tutorial { background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%); }
.res-list-cover.cat-software { background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%); }
.res-list-cover.cat-build    { background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); }
.res-list-cover.cat-pve      { background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%); }
.res-list-cover.cat-tool     { background: linear-gradient(135deg, #FAFAFA 0%, #F4F4F5 100%); }
.res-list-cover.cat-news     { background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%); }
.res-list-cover.cat-cheat    { background: linear-gradient(135deg, #FEFCE8 0%, #FEF9C3 100%); }
.res-list-body { flex: 1; min-width: 0; }
.res-list-title { font-size: var(--t-h6); font-weight: 600; }
.res-list-desc {
  margin-top: 4px;
  font-size: var(--t-small);
  color: var(--text-tertiary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.res-list-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
}
@media (max-width: 600px) {
  .res-list-card { flex-direction: column; align-items: flex-start; }
  .res-list-cover { width: 100%; height: 120px; }
}

/* ============ 26. 表单（投稿/请求） ============ */
.form-page {
  max-width: 920px;
  margin-inline: auto;
}
.form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-2xl);
  padding: var(--sp-8);
}
.form-card h1 {
  font-size: var(--t-h2);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-2);
}
.form-card .form-sub {
  color: var(--text-tertiary);
  margin-bottom: var(--sp-8);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-soft);
}

/* ============ 27. 论坛（AI 专区） ============ */
.forum-board {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  transition: all var(--dur-base) var(--ease-out);
  cursor: pointer;
  margin-bottom: var(--sp-3);
}
.forum-board:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
}
.forum-board-icon {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  font-size: 22px;
  flex-shrink: 0;
}
.forum-board-body { flex: 1; min-width: 0; }
.forum-board-name { font-size: var(--t-h5); font-weight: 600; }
.forum-board-desc {
  font-size: var(--t-small);
  color: var(--text-tertiary);
  margin-top: 4px;
}
.forum-board-stats {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.forum-board-stats strong {
  display: block;
  color: var(--text);
  font-size: var(--t-h5);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .forum-board-stats { display: none; }
}

.post-row {
  display: grid;
  grid-template-columns: 1fr 100px 100px 140px;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-2);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
  font-size: var(--t-small);
}
.post-row:hover {
  background: var(--bg-soft);
  border-color: var(--border);
}
.post-row-title {
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-row-title:hover { color: var(--accent); }
.post-row-cell { color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .post-row { grid-template-columns: 1fr 80px; }
  .post-row-cell.hide-sm { display: none; }
}

/* ============ 28. 暗色模式微调 ============ */
[data-theme="dark"] .auth-side {
  background: #000;
}
[data-theme="dark"] .auth-side::after {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
}

/* ============ 29. 打印 ============ */
@media print {
  .header, .footer, .fab, .toast-stack, .nav-mega, .announcement-bar, .request-banner {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  .detail { grid-template-columns: 1fr; }
}

/* ============ 30. 详情页 v5 增强 ============ */
.detail-cover-wrap { margin-bottom: var(--sp-8); }
.detail-cover-icon {
  font-size: clamp(64px, 12vw, 120px);
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.2));
}
.detail-cat-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-full);
  font-size: var(--t-caption);
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: 0.04em;
}
.detail-actions .heart { color: var(--accent); font-size: 16px; }
.detail-section { margin-top: var(--sp-12); }
.detail-section:first-of-type { margin-top: var(--sp-8); }
.detail-section-title {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  font-size: var(--t-h4);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border-soft);
}
.detail-section-meta {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text-tertiary);
}
.detail-intro {
  font-size: var(--t-body-lg);
  line-height: 1.7;
  color: var(--text-secondary);
}
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp-8); }

/* 详情页面包屑 */
.breadcrumb .breadcrumb-sep { opacity: 0.5; }

/* 详情 prose 增强 */
.md-pre {
  margin: var(--sp-4) 0;
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-n950);
  color: var(--c-n100);
  border-radius: var(--r-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  line-height: 1.65;
}
.md-pre code { font-family: inherit; }
.md-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-4) 0;
  font-size: var(--t-body);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}
.md-table th, .md-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}
.md-table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--text);
  font-size: var(--t-small);
}
.md-table tr:last-child td { border-bottom: none; }
.md-table tr:nth-child(even) td { background: var(--bg-soft); }

.detail-prose blockquote {
  margin: var(--sp-4) 0;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* 下载项 */
.dl-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-lg); transition: all var(--dur-fast) var(--ease-out); }
.dl-item:hover { border-color: var(--border); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.dl-item-icon {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.dl-item-body { flex: 1; min-width: 0; }
.dl-item-name { font-weight: 600; font-size: var(--t-body); }
.dl-item-pwd { font-size: var(--t-caption); color: var(--text-tertiary); margin-top: 2px; }
.dl-item-actions { display: flex; align-items: center; gap: var(--sp-2); }
.dl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border-radius: var(--r-md);
  background: var(--accent);
  color: #fff;
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.dl-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 16px var(--accent-glow); }
.dl-copy {
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 12px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  color: var(--text-secondary);
  font-size: var(--t-small);
  font-weight: 500;
  border: 1px solid var(--border-soft);
  transition: all var(--dur-fast) var(--ease-out);
}
.dl-copy:hover { background: var(--bg-muted); color: var(--text); }

/* 详情页元数据卡 */
.meta-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.meta-card-head {
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border-soft);
}
.meta-table { width: 100%; font-size: var(--t-small); }
.meta-table th, .meta-table td { padding: 8px 0; vertical-align: top; }
.meta-table th { text-align: left; color: var(--text-tertiary); font-weight: 500; width: 80px; }
.meta-table td { color: var(--text); text-align: right; word-break: break-all; }
.meta-table tr + tr th, .meta-table tr + tr td { border-top: 1px solid var(--border-soft); }
.meta-actions { display: flex; flex-direction: column; gap: 4px; }
.meta-action {
  display: flex; align-items: center; gap: var(--sp-2);
  width: 100%;
  height: 40px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: var(--t-body);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  text-align: left;
}
.meta-action:hover { background: var(--bg-soft); color: var(--text); }
.meta-action span { font-size: 16px; width: 24px; text-align: center; }
.meta-action svg { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 2; color: var(--text-tertiary); transition: color 150ms; }
.meta-action:hover svg { color: var(--brand-500); }

/* 二维码占位 */
.share-card { padding-bottom: 4px; }
.share-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 4px 0 12px;
}
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg-glass); border: 1px solid var(--border-soft);
  color: var(--text); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-align: left;
}
.share-btn:hover {
  background: var(--bg-glass-strong); border-color: var(--brand-500);
  color: var(--brand-600);
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}
.share-btn svg { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 2; }
.share-btn.is-copied { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.share-hint { font-size: 12px; color: var(--text-tertiary); line-height: 1.5; }
.qr-mock {
  width: 140px; height: 140px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 2px;
  background: #fff;
  padding: 6px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
}
.qr-mock > div { background: var(--c-n900); border-radius: 1px; }

































.qr-tip { font-size: var(--t-caption); color: var(--text-tertiary); margin-top: var(--sp-2); }

/* 相关资源 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
}
.related-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--dur-fast) var(--ease-out);
  text-decoration: none;
}
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); border-color: var(--border); }
.related-card-cover {
  aspect-ratio: 16/10;
  background: var(--gradient-soft);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.related-card-cover .res-cover-ico { position: relative; z-index: 2; width: 36px; height: 36px; opacity: .9; }
/* 不同分类的 related-card-cover 颜色（继承 cat 主题） */
.related-card-cover.cat-image    { background: linear-gradient(135deg, #FFF4ED 0%, #FFE6D4 100%); color: #C2410C; }
.related-card-cover.cat-kext     { background: linear-gradient(135deg, var(--c-n100) 0%, var(--c-n200) 100%); color: var(--c-n700); }
.related-card-cover.cat-efi      { background: linear-gradient(135deg, var(--c-n50) 0%, var(--c-n150) 100%); color: var(--c-n800); }
.related-card-cover.cat-tutorial { background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%); color: #6D28D9; }
.related-card-cover.cat-software { background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%); color: #BE185D; }
.related-card-cover.cat-build    { background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); color: #4338CA; }
.related-card-cover.cat-pve      { background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%); color: #475569; }
.related-card-cover.cat-default  { background: linear-gradient(135deg, var(--c-n100) 0%, var(--c-n200) 100%); color: var(--c-n600); }
.related-card-body { padding: var(--sp-3) var(--sp-4); }
.related-card-cat { font-size: var(--t-caption); color: var(--text-tertiary); margin-bottom: 2px; }
.related-card-title { font-size: var(--t-small); font-weight: 600; line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card-meta { font-size: var(--t-caption); color: var(--text-tertiary); }

/* 上下篇 */
.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-soft);
}
.prev-next-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.prev-next-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.prev-next-item.is-disabled { opacity: 0.4; pointer-events: none; }
.prev-next-prev { text-align: left; }
.prev-next-next { text-align: right; }
.prev-next-dir { font-size: var(--t-caption); color: var(--text-tertiary); }
.prev-next-name { font-size: var(--t-body); font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) { .prev-next { grid-template-columns: 1fr; } }

/* 评论 */
.comment-form {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.comment-form textarea {
  width: 100%;
  padding: var(--sp-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: var(--t-body);
  resize: vertical;
  min-height: 80px;
  transition: border-color var(--dur-fast) var(--ease-out);
  font-family: inherit;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.comment-form-row { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-3); }
.comment-tip { font-size: var(--t-caption); color: var(--text-tertiary); }
.comment-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.comment-item { display: flex; gap: var(--sp-3); }
.comment-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: 4px; }
.comment-name { font-size: var(--t-small); font-weight: 600; }
.comment-time { font-size: var(--t-caption); color: var(--text-tertiary); }
.comment-text { font-size: var(--t-body); line-height: 1.6; color: var(--text); white-space: pre-wrap; word-wrap: break-word; }
.comment-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-2); }
.comment-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.comment-actions button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; background: transparent; border: 0; font-size: 13px; color: var(--text-tertiary); cursor: pointer; border-radius: 8px; transition: all 120ms; }
.comment-actions button:hover { background: var(--c-n50, #f5f5f7); color: var(--accent); }
[data-theme="dark"] .comment-actions button:hover { background: rgba(255,255,255,0.06); }
.comment-actions button.is-liked { color: var(--accent); }
.comment-actions svg { width: 13px; height: 13px; stroke-width: 1.75; }
.comment-reply-form { margin-top: 12px; padding: 12px; background: var(--c-n50, #f5f5f7); border-radius: 12px; }
[data-theme="dark"] .comment-reply-form { background: rgba(255,255,255,0.04); }
.comment-reply-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text); font-size: 13px; line-height: 1.5; resize: vertical; min-height: 60px; }
.comment-reply-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-reply-cancel { padding: 6px 14px; background: transparent; border: 1px solid var(--border); color: var(--text-secondary); border-radius: 8px; font-size: 13px; cursor: pointer; }
.comment-reply-cancel:hover { background: var(--c-n50, #f5f5f7); }
.comment-replies { margin-top: 14px; margin-left: 44px; padding-left: 14px; border-left: 2px solid var(--border-soft); display: flex; flex-direction: column; gap: 14px; }
.comment-item-reply .comment-avatar { width: 28px; height: 28px; font-size: 12px; }
[data-theme="dark"] .comment-replies { border-left-color: rgba(255,255,255,0.08); }
.comment-like, .comment-reply {
  background: none; border: none;
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: all var(--dur-fast) var(--ease-out);
}
.comment-like:hover, .comment-reply:hover { background: var(--bg-soft); color: var(--text); }
.comment-like.is-liked { color: var(--accent); }

/* 详情页布局 */
.detail { display: grid; grid-template-columns: 1fr 320px; gap: var(--sp-10); align-items: start; padding-top: var(--sp-6); }
.detail-aside { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }
.detail-skeleton { padding: 40px 0; }
.skeleton-cover-lg { height: 320px; border-radius: var(--r-2xl); margin-bottom: var(--sp-6); }
.skeleton-line { height: 16px; margin: 12px 0; border-radius: var(--r-sm); }
.skeleton-line.lg { height: 32px; width: 80%; }
.skeleton-line.w60 { width: 60%; }
@media (max-width: 1024px) {
  .detail { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
}

/* 列表行视图 */
.list-rows { display: flex; flex-direction: column; gap: var(--sp-3); }
.res-list-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-fast) var(--ease-out);
}
.res-list-card:hover { border-color: var(--border); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.res-list-cover { aspect-ratio: 1; border-radius: var(--r-md); background: var(--gradient-soft); }
.res-list-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.res-list-title { font-size: var(--t-body-lg); font-weight: 600; margin-bottom: 4px; }
.res-list-desc { font-size: var(--t-small); color: var(--text-tertiary); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-list-meta { display: flex; gap: var(--sp-3); font-size: var(--t-caption); color: var(--text-tertiary); }

/* ============ 31. About / Beginner / Submit / Request / Search 等静态页 ============ */

/* About 页 */
.about-page { max-width: 920px; margin: 0 auto; padding: var(--sp-12) 0 var(--sp-20); }
.about-hero { text-align: center; padding: var(--sp-16) 0 var(--sp-10); }
.about-hero h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: var(--sp-4);
}
.about-hero h1 .accent {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.about-hero p { font-size: var(--t-body-lg); color: var(--text-secondary); max-width: 580px; margin: 0 auto; }
.about-block {
  margin-top: var(--sp-10);
  padding: var(--sp-8);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-2xl);
}
.about-block h2 { font-size: var(--t-h4); font-weight: 700; margin-bottom: var(--sp-4); letter-spacing: -0.02em; }
.about-block p { color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--sp-3); font-size: var(--t-body-lg); }
.about-block ul { list-style: none; padding: 0; margin: var(--sp-4) 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
@media (max-width: 700px) { .about-block ul { grid-template-columns: 1fr; } }
.about-block li {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: var(--t-body);
}
.about-block li::before {
  content: ''; flex-shrink: 0; margin-top: 4px;
  width: 16px; height: 16px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
}
.about-block a { color: var(--accent); text-decoration: none; }
.about-block a:hover { text-decoration: underline; }
.friends-box {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.friend-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  transition: all var(--dur-fast) var(--ease-out);
}
.friend-item:hover { background: var(--bg-elevated); border-color: var(--accent); transform: translateY(-1px); }
.friend-icon { font-size: 18px; }
.friend-name { font-weight: 500; }
.about-cta { display: flex; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-12); flex-wrap: wrap; }

/* 新手指南 */
.beginner-hero {
  text-align: center;
  padding: var(--sp-16) 0 var(--sp-10);
}
.beginner-hero h1 {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--sp-3);
}
.beginner-hero p { color: var(--text-secondary); font-size: var(--t-body-lg); max-width: 580px; margin: 0 auto var(--sp-6); }
.beginner-hero .beginner-stats { display: inline-flex; gap: var(--sp-8); margin-top: var(--sp-6); padding: var(--sp-5) var(--sp-8); background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-full); }
.beginner-stat { text-align: center; }
.beginner-stat-num { font-size: var(--t-h4); font-weight: 800; letter-spacing: -0.02em; color: var(--accent); }
.beginner-stat-label { font-size: var(--t-caption); color: var(--text-tertiary); margin-top: 2px; }

.beginner-stages { display: flex; flex-direction: column; gap: var(--sp-6); }
.beginner-stage {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-2xl);
  padding: var(--sp-6) var(--sp-8);
  position: relative;
}
.beginner-stage-num {
  position: absolute;
  top: -16px; left: var(--sp-6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.beginner-stage h2 { font-size: var(--t-h4); font-weight: 700; margin-bottom: var(--sp-2); letter-spacing: -0.02em; }
.beginner-stage-desc { color: var(--text-tertiary); font-size: var(--t-body); margin-bottom: var(--sp-4); }
.beginner-stage-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-3); }
.beginner-stage-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  transition: all var(--dur-fast) var(--ease-out);
}
.beginner-stage-item:hover { background: var(--bg-elevated); border-color: var(--accent); transform: translateY(-1px); }
.beginner-stage-item-icon { font-size: 20px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.beginner-stage-item-icon svg { width: 18px; height: 18px; stroke-width: 1.75; }
.beginner-stage-item-body { flex: 1; min-width: 0; }
.beginner-stage-item-title { font-weight: 600; font-size: var(--t-small); margin-bottom: 2px; }
.beginner-stage-item-meta { font-size: var(--t-caption); color: var(--text-tertiary); }

/* 表单（submit/request） */
.form-page { max-width: 760px; margin: 0 auto; padding: var(--sp-12) 0 var(--sp-20); }
.form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-2xl);
  padding: var(--sp-8);
}
.form-card h1 { font-size: var(--t-h3); font-weight: 800; letter-spacing: -0.025em; margin-bottom: var(--sp-2); }
.form-card > p { color: var(--text-secondary); font-size: var(--t-body-lg); margin-bottom: var(--sp-6); }
.form-row { margin-bottom: var(--sp-5); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }
.form-label { display: block; font-size: var(--t-small); font-weight: 600; margin-bottom: var(--sp-2); color: var(--text); }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-label .hint { color: var(--text-tertiary); font-weight: 400; margin-left: var(--sp-2); font-size: var(--t-caption); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: var(--t-body);
  transition: all var(--dur-fast) var(--ease-out);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.form-textarea { resize: vertical; min-height: 100px; font-family: inherit; }
.form-submit-row { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-6); }
.form-submit-tip { font-size: var(--t-caption); color: var(--text-tertiary); }

.form-cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.form-cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border-radius: var(--r-full);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: var(--t-small);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  user-select: none;
}
.form-cat-chip:hover { background: var(--bg-muted); color: var(--text); }
.form-cat-chip input { display: none; }
.form-cat-chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

.form-success {
  text-align: center;
  padding: var(--sp-8);
  background: var(--success-soft);
  border: 1px solid var(--success);
  border-radius: var(--r-xl);
  color: var(--success);
}
.form-success-icon { font-size: 56px; margin-bottom: var(--sp-4); }
.form-success h3 { font-size: var(--t-h4); margin-bottom: var(--sp-2); }
.form-success p { color: var(--text-secondary); margin-bottom: var(--sp-5); }
.form-success-actions { display: flex; gap: var(--sp-3); justify-content: center; }

.form-error {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  color: var(--danger);
  font-size: var(--t-small);
  margin-bottom: var(--sp-4);
}

/* Request 页（左右布局） */
.request-page { padding: var(--sp-10) 0 var(--sp-20); }
.request-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--sp-8); align-items: start; }
@media (max-width: 900px) { .request-layout { grid-template-columns: 1fr; } }
.request-stats-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.request-stat-row { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) 0; }
.request-stat-row + .request-stat-row { border-top: 1px solid var(--border-soft); }
.request-stat-label { font-size: var(--t-small); color: var(--text-tertiary); }
.request-stat-num { font-size: var(--t-h5); font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* 搜索 */
.search-page { padding: var(--sp-12) 0 var(--sp-20); }
.search-box {
  max-width: 640px;
  margin: 0 auto var(--sp-10);
  text-align: center;
}
.search-box h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: var(--sp-3); }
.search-box p { color: var(--text-secondary); font-size: var(--t-body-lg); margin-bottom: var(--sp-6); }
.search-input-wrap {
  position: relative;
  display: flex;
  gap: var(--sp-2);
}
.search-input-wrap svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-tertiary); pointer-events: none; }
.search-input {
  flex: 1;
  height: 56px;
  padding: 0 18px 0 52px;
  font-size: var(--t-body-lg);
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  transition: all var(--dur-fast) var(--ease-out);
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.search-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); justify-content: center; }
.search-empty { text-align: center; padding: var(--sp-16) 0; color: var(--text-tertiary); }
.search-empty-icon { font-size: 64px; opacity: 0.4; margin-bottom: var(--sp-3); }
.search-results-meta { color: var(--text-tertiary); font-size: var(--t-small); margin-bottom: var(--sp-4); }

/* 通用：空状态 */
.empty-state { text-align: center; padding: var(--sp-10) 0; color: var(--text-tertiary); }
.empty-state-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg-soft); color: var(--text-tertiary);
  margin-bottom: var(--sp-3);
}
.empty-state-icon svg { width: 36px; height: 36px; }
.empty-state-icon i, .empty-state-icon [data-lucide] { width: 36px; height: 36px; }
.empty-state h2 { color: var(--text); font-size: var(--t-h4); font-weight: 600; margin-bottom: var(--sp-2); }
.empty-state p { margin-bottom: var(--sp-4); }

/* 工具：芯片 */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--r-full); background: var(--bg-soft); border: 1px solid var(--border-soft); color: var(--text-secondary); font-size: var(--t-small); font-weight: 500; text-decoration: none; transition: all var(--dur-fast) var(--ease-out); cursor: pointer; }
.chip:hover { background: var(--bg-muted); color: var(--text); border-color: var(--border); }
.chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip-sm { height: 24px; padding: 0 10px; font-size: var(--t-caption); }
.chip-count { background: rgba(0,0,0,0.06); padding: 0 6px; height: 18px; border-radius: var(--r-full); font-size: 11px; font-weight: 600; line-height: 18px; margin-left: 4px; }
[data-theme="dark"] .chip-count { background: rgba(255,255,255,0.10); }
.chip.is-active .chip-count { background: rgba(255,255,255,0.20); color: #fff; }

/* 列表页工具栏 */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.list-toolbar-left, .list-toolbar-right { display: flex; align-items: center; gap: var(--sp-2); }
.view-toggle { display: inline-flex; gap: 2px; padding: 4px; background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: var(--r-md); }
.view-toggle button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; border: none; background: transparent; color: var(--text-tertiary); cursor: pointer; border-radius: 6px; transition: all var(--dur-fast) var(--ease-out); }
.view-toggle button svg { width: 16px; height: 16px; }
.view-toggle button:hover { color: var(--text); }
.view-toggle button.is-active { background: var(--bg-elevated); color: var(--accent); box-shadow: var(--shadow-xs); }

.list-head { margin-bottom: var(--sp-6); }
.list-title { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.list-sub { color: var(--text-tertiary); font-size: var(--t-body); margin-top: 4px; }

.layout-with-aside { display: grid; grid-template-columns: 1fr 280px; gap: var(--sp-8); align-items: start; }
@media (max-width: 980px) { .layout-with-aside { grid-template-columns: 1fr; } }
.aside-card { background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-xl); padding: var(--sp-5); margin-bottom: var(--sp-4); }
.aside-title { font-size: var(--t-caption); font-weight: 600; color: var(--text-tertiary); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.aside-title svg { width: 13px; height: 13px; stroke-width: 2; vertical-align: -2px; margin-right: 6px; color: var(--accent); }
.aside { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }

/* 教程卡 */
.tut-card { display: flex; gap: var(--sp-4); background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-xl); padding: var(--sp-4); text-decoration: none; color: inherit; transition: all var(--dur-fast) var(--ease-out); }
.tut-card:hover { border-color: var(--border); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.tut-card-thumb { width: 88px; height: 88px; border-radius: var(--r-md); background: var(--gradient-soft); display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.tut-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tut-card-tag { font-size: var(--t-caption); color: var(--accent); font-weight: 600; }
.tut-card-title { font-size: var(--t-h6); font-weight: 600; margin: 4px 0 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tut-card-desc { font-size: var(--t-small); color: var(--text-tertiary); line-height: 1.5; margin-bottom: var(--sp-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.tut-card-meta { display: flex; gap: var(--sp-2); font-size: var(--t-caption); color: var(--text-tertiary); }

/* 装机实例卡 */
.build-card { background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-xl); overflow: hidden; transition: all var(--dur-fast) var(--ease-out); text-decoration: none; color: inherit; }
.build-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.build-card-img { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--c-n100) 0%, var(--c-n200) 100%); display: flex; align-items: center; justify-content: center; font-size: 36px; }
.build-card-body { padding: var(--sp-4); }
.build-card-cat { font-size: var(--t-caption); color: var(--accent); font-weight: 600; }
.build-card-title { font-size: var(--t-body-lg); font-weight: 600; margin: 4px 0 6px; line-height: 1.35; }
.build-card-spec { font-size: var(--t-small); color: var(--text-tertiary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 三栏排行 */
.must-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.must-list-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border-soft); cursor: pointer; transition: all var(--dur-fast) var(--ease-out); }
.must-list-item:last-child { border-bottom: none; }
.must-list-item:hover { padding-left: 4px; }
.must-list-num { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; border-radius: var(--r-sm); background: var(--bg-soft); color: var(--text-tertiary); flex-shrink: 0; }
.must-list-item.is-1 .must-list-num { background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); color: #fff; }
.must-list-item.is-2 .must-list-num { background: linear-gradient(135deg, #C0C0C0 0%, #909090 100%); color: #fff; }
.must-list-item.is-3 .must-list-num { background: linear-gradient(135deg, #CD7F32 0%, #8B5A2B 100%); color: #fff; }
.must-list-name { flex: 1; min-width: 0; font-size: var(--t-small); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.must-list-item:hover .must-list-name { color: var(--accent); }
.must-list-val { font-size: var(--t-caption); color: var(--text-tertiary); font-variant-numeric: tabular-nums; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: var(--sp-10); flex-wrap: wrap; }
.page-btn { min-width: 36px; height: 36px; padding: 0 12px; border-radius: var(--r-md); background: var(--bg-elevated); border: 1px solid var(--border-soft); color: var(--text); font-size: var(--t-small); font-weight: 500; cursor: pointer; transition: all var(--dur-fast) var(--ease-out); }
.page-btn:hover:not(:disabled) { background: var(--bg-soft); border-color: var(--border); }
.page-btn.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-ellipsis { padding: 0 8px; color: var(--text-tertiary); }

/* 公告 */
.announcement-bar { display: flex; align-items: center; gap: var(--sp-3); padding: 8px 16px; margin-top: var(--sp-2); margin-bottom: var(--sp-4); background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 100%); border-radius: var(--r-md); font-size: var(--t-small); color: var(--text-secondary); overflow: hidden; white-space: nowrap; }
.announcement-bar svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.announcement-bar strong { color: var(--text); }

/* 移动端 */
@media (max-width: 768px) {
  .detail-title { font-size: 28px; }
  .detail-actions .btn { flex: 1; justify-content: center; }
  .comment-form-row { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
  .comment-form-row .btn { width: 100%; justify-content: center; }
}

/* print 优化 */
@media print {
  .detail-aside, .detail-actions, .prev-next, #comments, .breadcrumb { display: none !important; }
  .detail { grid-template-columns: 1fr; }
  body { background: #fff; }
}

/* ============ Hero v6 升级版 ============ */
.hero { position: relative; padding: clamp(60px, 9vw, 120px) 0 clamp(40px, 6vw, 80px); overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.55;
  animation: heroOrb 18s ease-in-out infinite alternate;
}
.hero-orb-1 { top: -8%; right: 6%; width: 520px; height: 520px; background: radial-gradient(circle, rgba(255,107,53,0.12), transparent 70%); }
.hero-orb-2 { top: 35%; left: -6%; width: 380px; height: 380px; background: radial-gradient(circle, rgba(255,170,120,0.08), transparent 70%); animation-delay: -6s; }
@keyframes heroOrb {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -20px) scale(1.05); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 30%, transparent 70%);
}
[data-theme="dark"] .hero-grid { background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px); }
[data-theme="dark"] .hero-orb { opacity: 0.18; }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  text-align: left;
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
.hero-content { max-width: 640px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--bg-glass-strong); border: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: var(--sp-6); box-shadow: var(--shadow-xs); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.hero-eyebrow .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 var(--success); animation: pulse 2s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.hero-title {
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--text-strong);
  margin: 0 0 var(--sp-5);
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-title-end { color: var(--text); }
.hero-sub { font-size: clamp(15px, 1.6vw, 18px); color: var(--text-secondary); line-height: 1.55; margin: 0 0 var(--sp-7); max-width: 540px; }
.hero-cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-7); }
.hero-cta .btn { display: inline-flex; align-items: center; }

.hero-search {
  display: flex; align-items: center; gap: 0; position: relative;
  background: var(--bg-glass-strong); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-sm);
  transition: all 200ms var(--ease-out, cubic-bezier(0.25, 0.46, 0.45, 0.94));
  max-width: 540px; margin-bottom: var(--sp-5);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.hero-search:focus-within { border-color: var(--brand-500); box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-ring); }
.hero-search-icon { width: 18px; height: 18px; color: var(--text-tertiary); flex-shrink: 0; stroke-width: 2; }
.hero-search .input { flex: 1; border: none; background: transparent; padding: 12px 12px; font-size: 15px; outline: none; box-shadow: none; }
.hero-search-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--brand-500); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 200ms var(--ease-out, cubic-bezier(0.25, 0.46, 0.45, 0.94)); }
.hero-search-btn:hover { background: var(--brand-600); transform: scale(1.05); }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tag { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--bg-glass); border: 1px solid var(--border-soft); font-size: 13px; color: var(--text-secondary); transition: all 200ms var(--ease-out, cubic-bezier(0.25, 0.46, 0.45, 0.94)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.hero-tag:hover { background: var(--bg-elevated); color: var(--text); border-color: var(--border); transform: translateY(-1px); }
.hero-tag-ai { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.25); color: var(--ai-blue, #6366F1); }
.hero-tag-ai:hover { background: rgba(99,102,241,0.12); }

/* ===== Hero 视觉：双窗口浮层 ===== */
.hero-visual {
  position: relative;
  min-height: 500px;
  display: flex; align-items: center; justify-content: center;
  isolation: isolate; /* 光斑不溢出 */
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: -10% -5% -10% -5%;
  background:
    radial-gradient(ellipse 60% 50% at 78% 28%, rgba(255,107,53,0.22), transparent 60%),
    radial-gradient(ellipse 50% 50% at 22% 78%, rgba(99,102,241,0.14), transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(255,255,255,0.10), transparent 60%);
  z-index: -1;
  pointer-events: none;
  filter: blur(8px);
}
[data-theme="dark"] .hero-visual::before {
  background:
    radial-gradient(ellipse 60% 50% at 78% 28%, rgba(255,107,53,0.30), transparent 60%),
    radial-gradient(ellipse 50% 50% at 22% 78%, rgba(99,102,241,0.20), transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(255,255,255,0.04), transparent 60%);
}
.hero-window {
  position: absolute;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 18px;
  box-shadow:
    0 32px 80px -20px rgba(255,107,53,0.20),
    0 12px 32px -12px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.9);
  overflow: hidden;
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}
[data-theme="dark"] .hero-window {
  background: rgba(22,22,28,0.72);
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    0 32px 80px -20px rgba(255,107,53,0.28),
    0 12px 32px -12px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.hero-window-back  { width: 320px; top: 0; right: 30px; z-index: 1; transform: rotate(-1.8deg); animation: floatBack 8s ease-in-out infinite; }
.hero-window-front { width: 290px; bottom: 0; left: 30px; z-index: 2; transform: rotate(1.8deg); animation: floatFront 8s ease-in-out infinite reverse; }
@keyframes floatBack  { 0%, 100% { transform: rotate(-1.8deg) translateY(0); } 50% { transform: rotate(-1.8deg) translateY(-12px); } }
@keyframes floatFront { 0%, 100% { transform: rotate(1.8deg)  translateY(0); } 50% { transform: rotate(1.8deg)  translateY(-10px); } }
@media (max-width: 960px) {
  .hero-visual { display: none; }
}
.hero-window-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--c-n50); border-bottom: 1px solid var(--border-soft); }
[data-theme="dark"] .hero-window-bar { background: var(--c-n100); }
.hero-window-dot { width: 11px; height: 11px; border-radius: 50%; }
.hero-window-title { margin-left: 8px; font-size: 12px; color: var(--text-tertiary); font-weight: 500; }
.hero-window-body { padding: 16px; }
.hero-window-editor { font-family: 'SF Mono', 'Menlo', monospace; font-size: 12.5px; line-height: 1.7; }
.hero-editor-line { display: flex; gap: 12px; }
.hero-editor-line .line-no { color: var(--text-faint); user-select: none; min-width: 22px; text-align: right; }
.hero-editor-line .line-kw { color: var(--brand-600); font-weight: 600; }
.hero-editor-line .line-mute { color: var(--text-tertiary); }
.hero-editor-line .line-str { color: #34C759; }
.hero-editor-line .line-accent { color: var(--ai-blue, #6366F1); }
.hero-file { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; transition: background 150ms; }
.hero-file + .hero-file { border-top: 1px solid var(--border-soft); }
.hero-file:hover { background: var(--c-n50); }
.hero-file-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.hero-file-icon svg { width: 20px; height: 20px; stroke-width: 1.75; }
.hero-file-icon-img  { background: linear-gradient(135deg, #1d1d1f, #424245); color: #fff; }
.hero-file-icon-kext { background: linear-gradient(135deg, #FF6B35, #FF8242); }
.hero-file-icon-efi  { background: linear-gradient(135deg, #34C759, #30B350); }
.hero-file-icon-soft { background: linear-gradient(135deg, #6366F1, #8B5CF6); }
.hero-file-meta { flex: 1; min-width: 0; }
.hero-file-name { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-file-sub { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }
.hero-file-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--brand-500); color: #fff; letter-spacing: 0.04em; }


/* ============ Hero v6b 修复：标题换行 + 渐变更浓郁 ============ */
.hero-inner { grid-template-columns: 1.15fr 1fr; }
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
.hero-title {
  font-size: clamp(38px, 4.6vw, 64px);
  letter-spacing: -0.045em;
  line-height: 1.04;
  word-break: keep-all;
  white-space: normal;
}
/* 主 hero 改深紫粉渐变背景，气场拉满 */
.hero {
  background:
    radial-gradient(ellipse 70% 60% at 18% 22%, rgba(139, 92, 246, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 55% 50% at 88% 12%, rgba(236, 72, 153, 0.24) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 78% 90%, rgba(99, 102, 241, 0.20) 0%, transparent 60%),
    linear-gradient(180deg, #faf9ff 0%, #f5f3ff 60%, #fff7f0 100%);
}
[data-theme="dark"] .hero {
  background:
    radial-gradient(ellipse 70% 60% at 18% 22%, rgba(139, 92, 246, 0.38) 0%, transparent 55%),
    radial-gradient(ellipse 55% 50% at 88% 12%, rgba(236, 72, 153, 0.32) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 78% 90%, rgba(99, 102, 241, 0.30) 0%, transparent 60%),
    linear-gradient(180deg, #0a0a0c 0%, #110b1f 60%, #1a0f0a 100%);
}
[data-theme="dark"] .hero-orb-1 { background: radial-gradient(circle, #8B5CF6, transparent 65%); opacity: 0.5; }
[data-theme="dark"] .hero-orb-2 { background: radial-gradient(circle, #EC4899, transparent 65%); opacity: 0.4; }
[data-theme="dark"] .hero-eyebrow { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.10); }
[data-theme="dark"] .hero-search { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.10); }
[data-theme="dark"] .hero-tag { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.10); }
[data-theme="dark"] .hero-tag:hover { background: rgba(255,255,255,0.10); }
/* 在深色背景上让 brand-700 渐变更亮 */
[data-theme="dark"] .hero-title .accent {
  background: linear-gradient(135deg, #FF8A5C, #FFB36B, #FF6B35);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ============ v7.1 — 导航登录区样式（修复 user-entry 缺失） ============ */
.user-slot { display: inline-flex; align-items: center; }
.user-entry { position: relative; display: inline-flex; align-items: center; }
.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 18px;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.btn-login:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-register {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  font-size: var(--t-small);
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--r-full);
  text-decoration: none;
  margin-left: 8px;
  transition: all var(--dur-fast) var(--ease-out);
}
.btn-register:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  text-decoration: none;
}
.user-entry-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: 14px 16px;
  min-width: 220px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--dur-fast) var(--ease-out);
  z-index: 100;
}
.user-entry-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.user-entry-menu .uem-tip {
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.user-entry-menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  background: var(--bg-soft);
  color: var(--text);
  border-radius: var(--r-md);
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.user-entry-menu a:hover { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-login { background: var(--c-n800); border-color: var(--c-n700); }
[data-theme="dark"] .user-entry-menu { background: var(--c-n900); }

/* ============ v7.1 — 浮动工具栏瘦身：折叠为单按钮 + 展开 ============ */
.fab {
  right: 16px;
  bottom: 16px;
  gap: 10px;
  align-items: flex-end;
}
.fab-btn {
  width: 40px; height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.fab-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(255,107,53,0.30);
}
.fab-to-top { display: none; }
.fab-to-top.show { display: inline-flex; }
.fab-tooltip {
  background: var(--c-n950);
  color: #fff;
  font-size: var(--t-caption);
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--r-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============ v7.1 — 头部响应式修复（避免登录/注册挤出 logo） ============ */
.header-search { flex: 0 1 220px; min-width: 0; }
.header-search .input { width: 100%; }
.main-nav { gap: 4px; flex: 1 1 auto; justify-content: center; }
.main-nav > a, .nav-drop > a {
  padding: 8px 10px;
  font-size: var(--t-small);
  white-space: nowrap;
}
.header-right { flex: 0 0 auto; gap: 6px; }
.btn-login, .btn-register { padding: 0 14px; font-size: var(--t-caption); height: 34px; }
@media (max-width: 1180px) {
  .header-search { max-width: 180px; flex: 0 1 180px; }
}
@media (max-width: 1024px) {
  .btn-register { display: none; }
  .header-search { max-width: 160px; }
}

/* ============ AI 专区转场（主站 → AI，Apple Intelligence 风）============ */
.ai-portal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ai-portal.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* 圆形遮罩：从点击位置膨胀覆盖全屏 */
.ai-portal-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(236, 72, 153, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(99, 102, 241, 0.4) 0%, transparent 55%),
    linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  transform: scale(0);
  border-radius: 50%;
  transform-origin: var(--origin-x, 50%) var(--origin-y, 50%);
  transition: transform 800ms cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.ai-portal.is-active .ai-portal-veil {
  transform: scale(4);
}
/* 中心内容：图标 + 标题 + 副标题 */
.ai-portal-content {
  position: relative;
  text-align: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 360ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 320ms,
    transform 480ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 320ms;
  will-change: opacity, transform;
}
.ai-portal.is-active .ai-portal-content {
  opacity: 1;
  transform: scale(1);
}
.ai-portal-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 20px 50px rgba(99, 102, 241, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
  animation: aiPortalPulse 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.ai-portal-mark img {
  width: 48px;
  height: 48px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(99, 102, 241, 0.3));
}
@keyframes aiPortalPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.ai-portal-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.ai-portal-sub {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============ 帮助中心（Apple 克制风）============ */
.help-page { padding: var(--sp-12) 0 var(--sp-20); }
.help-hero { text-align: center; padding: var(--sp-8) 0 var(--sp-10); }
.help-hero h1 {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: var(--sp-4);
}
.help-hero h1 .accent {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.help-hero p { font-size: var(--t-body-lg); color: var(--text-secondary); max-width: 560px; margin: 0 auto; }
.help-search-box { max-width: 640px; margin: 0 auto var(--sp-10); }
.help-search-box .search-input-large {
  width: 100%;
  padding: 16px 22px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
  transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.help-search-box .search-input-large:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
}
.help-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: var(--sp-12); }
.help-cat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 18px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: all 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.help-cat:hover {
  border-color: var(--brand-500);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.08);
  text-decoration: none;
}
.help-cat .ico {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-600);
  transition: all 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.help-cat:hover .ico { background: var(--brand-500); color: #fff; }
.help-cat .ico svg { width: 22px; height: 22px; stroke-width: 2; }
.help-cat h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.help-cat p { font-size: 12.5px; color: var(--text-tertiary); }
@media (max-width: 833px) { .help-cats { grid-template-columns: repeat(2, 1fr); } }

/* FAQ 列表（沿用原风格） */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 200ms ease;
}
.faq-item.open { border-color: var(--brand-500); }
.faq-q {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  list-style: none;
}
.faq-q::after { content: '+'; font-size: 20px; color: var(--text-tertiary); font-weight: 400; transition: transform 200ms ease; }
.faq-item.open .faq-q::after { content: '−'; color: var(--brand-500); }
.faq-a { padding: 0 20px 18px; color: var(--text-secondary); line-height: 1.7; font-size: 14.5px; display: none; }
.faq-item.open .faq-a { display: block; }

/* ============ 标签云页（/tags）============ */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-top: var(--sp-6);
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.2;
  transition: all 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.tag-pill:hover {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
  transform: translateY(-1px);
  text-decoration: none;
}
.tag-pill .tag-hash { color: var(--text-tertiary); font-weight: 500; }
.tag-pill:hover .tag-hash { color: rgba(255, 255, 255, 0.85); }
.tag-pill .tag-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-tertiary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tag-pill:hover .tag-count { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ============ 时间归档页（/archives）============ */
.arc-stats {
  display: flex;
  gap: 24px;
  margin: var(--sp-8) 0 var(--sp-10);
}
.arc-stat {
  flex: 0 0 auto;
  padding: 20px 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}
.arc-stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--brand-500);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.arc-stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.arc-timeline {
  position: relative;
  padding-left: 24px;
}
.arc-timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brand-500) 0%, var(--border) 100%);
  border-radius: 2px;
}
.arc-month {
  position: relative;
  margin-bottom: var(--sp-8);
}
.arc-month::before {
  content: '';
  position: absolute;
  left: -22px; top: 14px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--brand-500);
  box-shadow: 0 0 0 4px var(--bg);
}
.arc-month-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.arc-year {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.arc-month-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-500);
}
.arc-month-count {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 2px 10px;
  background: var(--bg-soft);
  border-radius: 999px;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.arc-month-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.arc-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.arc-item:hover {
  border-color: var(--brand-500);
  transform: translateX(4px);
  text-decoration: none;
}
.arc-day {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-500);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.arc-name {
  font-size: 14.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arc-cat {
  font-size: 11px;
  padding: 2px 10px;
  background: var(--bg-soft);
  color: var(--text-tertiary);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ============ 公告页重构 ============ */
.ann-group-head {
  font-size: 13px; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 32px 0 12px; padding-left: 4px;
}
.ann-group-head:first-child { margin-top: 0; }
.ann-card {
  display: block; margin-bottom: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ann-card:hover { border-color: var(--ac); box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.ann-card[open] { border-color: var(--ac); }
.ann-card[open] .ann-toggle svg { transform: rotate(180deg); }
.ann-summary {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 16px; padding: 18px 22px;
  cursor: pointer; list-style: none; user-select: none;
}
.ann-summary::-webkit-details-marker { display: none; }
.ann-type {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.ann-type svg { width: 14px; height: 14px; stroke-width: 2.4; }
.ann-body { min-width: 0; }
.ann-title {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-bottom: 6px; display: flex; align-items: center; gap: 8px;
}
.ann-pin {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-500); color: #fff; font-weight: 600;
}
.ann-pin svg { width: 11px; height: 11px; stroke-width: 2.4; }
.ann-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12px; color: var(--text-tertiary);
}
.ann-meta svg { width: 12px; height: 12px; margin-right: 3px; vertical-align: -1px; }
.ann-toggle {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); transition: color 150ms;
}
.ann-toggle svg { width: 18px; height: 18px; transition: transform 200ms; }
.ann-card[open] .ann-toggle { color: var(--ac); }
.ann-content {
  padding: 0 22px 20px 22px; color: var(--text-secondary);
  font-size: 14px; line-height: 1.7; border-top: 1px dashed var(--border);
  margin-top: -4px; padding-top: 16px;
}
.ann-empty { color: var(--text-tertiary); font-style: italic; }
@media (max-width: 720px) {
  .ann-summary { grid-template-columns: auto 1fr; gap: 10px; padding: 14px 16px; }
  .ann-toggle { grid-column: 2; justify-self: end; }
  .ann-meta { gap: 10px; font-size: 11px; }
  .ann-content { padding: 0 16px 16px 16px; padding-top: 14px; }
}
[data-theme="dark"] .ann-card { background: var(--bg-soft); }

/* ============= 统一内联 lucide 样式 ============= */
.meta-ico, .res-meta-ico, .ai-meta-ico, .tut-meta-ico {
  width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px;
  color: var(--text-tertiary); stroke-width: 1.8;
  display: inline-block; flex-shrink: 0;
}
.meta-action-ico, .heart-inline {
  width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px;
  color: var(--text-tertiary); stroke-width: 2; transition: color 200ms, fill 200ms;
}
.meta-action-ico.is-on, .heart-inline.is-on {
  color: #ff3b30; fill: #ff3b30;
}
.chip-ico {
  width: 14px; height: 14px; vertical-align: -2px; color: currentColor;
  stroke-width: 2; flex-shrink: 0;
}
.chip.is-active .chip-ico { color: var(--accent); }
.brand-svg { display: inline-block; vertical-align: -4px; flex-shrink: 0; }
.brand-chip {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; font-weight: 700; letter-spacing: -0.02em;
  vertical-align: -4px; flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.cover-fallback-ico { width: 96px; height: 96px; color: rgba(255,255,255,.55); stroke-width: 1.5; }
.empty-ico { width: 48px; height: 48px; color: var(--text-tertiary); }
.copy-tick { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; color: var(--accent); }
.learn-tick { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.learn-step-check.is-done .learn-tick { color: var(--accent); }
/* admin sysInfo 图标容器：原来是 emoji 直接放，加个内嵌 svg 适配 */
.act-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; }
.act-icon svg, .act-icon [data-lucide] { width: 14px; height: 14px; color: var(--text-secondary); stroke-width: 2; }
/* detail-cover-icon 之前的 emoji fallback 现在是 lucide */
.detail-cover-icon { display: inline-flex; align-items: center; justify-content: center; }
.detail-cover-icon svg, .detail-cover-icon [data-lucide] { width: 100%; height: 100%; }
/* 资源卡封面图标 */
.res-card-cover { display: flex; align-items: center; justify-content: center; }
.res-card-cover .cover-fallback-ico { width: 48px; height: 48px; color: rgba(255,255,255,.7); }
.res-cover-ico {
  width: 38px; height: 38px;
  color: currentColor;
  opacity: 0.85;
  stroke-width: 1.6;
  display: block;
  transition: transform 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.res-card:hover .res-cover-ico, .res-list-card:hover .res-cover-ico {
  transform: scale(1.08) rotate(-3deg);
  opacity: 1;
}

/* 通用 card-icon（教程/指南卡图标） */
.card-icon-wrap { display: flex; align-items: center; justify-content: center; }
.card-icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card-icon .card-ico-i { width: 24px; height: 24px; stroke-width: 1.8; }
.guide-card { background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-xl); padding: 18px; transition: all 200ms; text-decoration: none; color: inherit; display: flex; gap: 14px; }
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); border-color: transparent; }

/* nav-mega-icon 内的 lucide */
.nav-mega-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; }
.nav-mega-icon i, .nav-mega-icon [data-lucide] { width: 14px; height: 14px; color: var(--accent); stroke-width: 1.8; }
.sidebar-logo i, .sidebar-logo [data-lucide] { width: 18px; height: 18px; color: var(--accent); }
.sidebar-logo { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; }
.nav-icon i, .nav-icon [data-lucide] { width: 16px; height: 16px; }
.nav-icon [data-lucide] { color: var(--text-secondary); }
.nav-item.active .nav-icon [data-lucide] { color: var(--accent); }
.page-title-ico { width: 28px; height: 28px; vertical-align: -6px; color: var(--accent); margin-right: 8px; }
.page-h-ico, .page-h-ico-sm { vertical-align: -4px; margin-right: 8px; color: var(--accent); }
.page-h-ico { width: 22px; height: 22px; }
.page-h-ico-sm { width: 16px; height: 16px; }
/* AI 顶部导航图标 */
.ai-nav-ico { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; stroke-width: 2; }
/* suggest-icon */
.suggest-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.suggest-icon i, .suggest-icon [data-lucide] { width: 18px; height: 18px; stroke-width: 1.8; }
/* form-cat-chip 内的 icon */
.form-cat-chip { display: inline-flex; align-items: center; gap: 4px; }
.form-cat-chip .chip-ico { width: 14px; height: 14px; vertical-align: -2px; }

/* 深色模式：资源卡封面去饱和、加深底色 */
[data-theme="dark"] .res-card.cat-image    .res-card-cover { background: linear-gradient(135deg, rgba(194,65,12,.25), rgba(255,107,53,.18)); color: #FB923C; }
[data-theme="dark"] .res-card.cat-kext     .res-card-cover { background: linear-gradient(135deg, rgba(120,120,128,.25), rgba(80,80,90,.35)); color: #C7C7CC; }
[data-theme="dark"] .res-card.cat-efi      .res-card-cover { background: linear-gradient(135deg, rgba(120,120,128,.22), rgba(60,60,67,.4)); color: #D1D1D6; }
[data-theme="dark"] .res-card.cat-tutorial .res-card-cover { background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(99,102,241,.18)); color: #A78BFA; }
[data-theme="dark"] .res-card.cat-software .res-card-cover { background: linear-gradient(135deg, rgba(236,72,153,.22), rgba(244,114,182,.18)); color: #F472B6; }
[data-theme="dark"] .res-card.cat-build    .res-card-cover { background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(79,70,229,.2)); color: #818CF8; }
[data-theme="dark"] .res-card.cat-pve      .res-card-cover { background: linear-gradient(135deg, rgba(71,85,105,.35), rgba(51,65,85,.45)); color: #94A3B8; }
[data-theme="dark"] .related-card-cover.cat-image    { background: linear-gradient(135deg, rgba(194,65,12,.25), rgba(255,107,53,.18)); color: #FB923C; }
[data-theme="dark"] .related-card-cover.cat-kext     { background: linear-gradient(135deg, rgba(120,120,128,.25), rgba(80,80,90,.35)); color: #C7C7CC; }
[data-theme="dark"] .related-card-cover.cat-efi      { background: linear-gradient(135deg, rgba(120,120,128,.22), rgba(60,60,67,.4)); color: #D1D1D6; }
[data-theme="dark"] .related-card-cover.cat-tutorial { background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(99,102,241,.18)); color: #A78BFA; }
[data-theme="dark"] .related-card-cover.cat-software { background: linear-gradient(135deg, rgba(236,72,153,.22), rgba(244,114,182,.18)); color: #F472B6; }
[data-theme="dark"] .related-card-cover.cat-build    { background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(79,70,229,.2)); color: #818CF8; }
[data-theme="dark"] .related-card-cover.cat-pve      { background: linear-gradient(135deg, rgba(71,85,105,.35), rgba(51,65,85,.45)); color: #94A3B8; }
[data-theme="dark"] .detail-cover.cat-image    { background: linear-gradient(135deg, rgba(194,65,12,.25), rgba(255,107,53,.18)); color: #FB923C; }
[data-theme="dark"] .detail-cover.cat-kext     { background: linear-gradient(135deg, rgba(120,120,128,.25), rgba(80,80,90,.35)); color: #C7C7CC; }
[data-theme="dark"] .detail-cover.cat-efi      { background: linear-gradient(135deg, rgba(120,120,128,.22), rgba(60,60,67,.4)); color: #D1D1D6; }
[data-theme="dark"] .detail-cover.cat-tutorial { background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(99,102,241,.18)); color: #A78BFA; }
[data-theme="dark"] .detail-cover.cat-software { background: linear-gradient(135deg, rgba(236,72,153,.22), rgba(244,114,182,.18)); color: #F472B6; }
[data-theme="dark"] .detail-cover.cat-build    { background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(79,70,229,.2)); color: #818CF8; }
[data-theme="dark"] .detail-cover.cat-pve      { background: linear-gradient(135deg, rgba(71,85,105,.35), rgba(51,65,85,.45)); color: #94A3B8; }
[data-theme="dark"] .res-card.cat-cheatsheet .res-card-cover,
[data-theme="dark"] .res-card.cat-ssdt       .res-card-cover,
[data-theme="dark"] .res-card.cat-bootloader .res-card-cover { background: linear-gradient(135deg, rgba(120,120,128,.22), rgba(60,60,67,.4)); color: #C7C7CC; }
[data-theme="dark"] .res-list-cover.cat-image    { background: linear-gradient(135deg, rgba(194,65,12,.25), rgba(255,107,53,.18)); }
[data-theme="dark"] .res-list-cover.cat-kext     { background: linear-gradient(135deg, rgba(120,120,128,.25), rgba(80,80,90,.35)); }
[data-theme="dark"] .res-list-cover.cat-efi      { background: linear-gradient(135deg, rgba(120,120,128,.22), rgba(60,60,67,.4)); }
[data-theme="dark"] .res-list-cover.cat-tutorial { background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(99,102,241,.18)); }
[data-theme="dark"] .res-list-cover.cat-software { background: linear-gradient(135deg, rgba(236,72,153,.22), rgba(244,114,182,.18)); }
[data-theme="dark"] .res-list-cover.cat-build    { background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(79,70,229,.2)); }
[data-theme="dark"] .res-list-cover.cat-pve      { background: linear-gradient(135deg, rgba(71,85,105,.35), rgba(51,65,85,.45)); }
/* 深色模式保持 currentColor（外层 cat 已有色），只调整 hover */
[data-theme="dark"] .res-cover-ico { opacity: 0.9; }
[data-theme="dark"] .res-card:hover .res-cover-ico { opacity: 1; }
/* 深色模式：详情页封面默认渐变改暗 */
[data-theme="dark"] .detail-cover { background: linear-gradient(135deg, #3A1A0E 0%, #1A0A06 100%); color: rgba(255,255,255,.4); }
[data-theme="dark"] .detail-cover-icon svg, [data-theme="dark"] .detail-cover-icon [data-lucide] { color: rgba(255,255,255,.4); }

/* 装机实例配置清单 */
.build-spec { }
.bs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: var(--sp-3); }
.bs-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  transition: all 200ms;
}
.bs-row:hover { border-color: var(--border); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.bs-ico {
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.bs-ico svg, .bs-ico [data-lucide] { width: 20px; height: 20px; stroke-width: 1.8; }
.bs-meta { min-width: 0; }
.bs-label { font-size: 12px; color: var(--text-tertiary); margin-bottom: 2px; }
.bs-value { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.detail-h-ico { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; color: var(--accent); }

/* 列表项前的小图标（request.ejs / feedback.ejs 共用）—— 统一图标语言，消除 ✓ 字符。
   lucide.createIcons 会把 <i data-lucide=...> 转为 <svg>，并保留 class，所以规则同时覆盖两者。 */
.list-check-ico,
.list-check-ico svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
  display: inline-block;
  stroke-width: 1.6;
  vertical-align: -2px;
}


/* ============ 边界状态：空 / 错误 / 加载占位 ============ */
.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 20px;
  min-height: 300px;
  color: var(--text-tertiary);
}
.empty-state .state-icon,
.error-state .state-icon {
  width: 64px; height: 64px;
  margin-bottom: var(--sp-4);
  color: var(--text-faint);
  opacity: 0.6;
}
.error-state .state-icon { color: var(--danger); opacity: 0.7; }
.empty-state .state-title,
.error-state .state-title {
  font-size: var(--t-h6);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-2);
}
.empty-state .state-sub,
.error-state .state-sub {
  font-size: var(--t-small);
  color: var(--text-tertiary);
  max-width: 400px;
  line-height: 1.5;
  margin-bottom: var(--sp-5);
}
.empty-state .state-cta,
.error-state .state-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 列表空态：紧凑版（用于侧边栏） */
.empty-compact {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-faint);
  font-size: var(--t-small);
}

/* 公告栏防 CLS 兜底 */
.announcement-slot {
  min-height: 0;
}
.announcement-slot:not(:empty) {
  min-height: 40px;
}

/* 列表初始骨架（inject-friendly） */
.list-skeleton {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1024px) { .list-skeleton { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .list-skeleton { grid-template-columns: 1fr; } }
.list-skeleton .skeleton-card { aspect-ratio: auto; }

/* 暗色模式适配 */
[data-theme="dark"] .empty-state .state-icon,
[data-theme="dark"] .error-state .state-icon {
  opacity: 0.5;
}

/* ============ 详情页 SSR 兜底壳（无 JS 也可见） ============ */
.detail-ssr-shell {
  padding: var(--sp-8) 0 var(--sp-12);
  max-width: 920px;
  margin: 0 auto;
}
.detail-ssr-title {
  font-size: clamp(24px, 3vw, var(--t-h2));
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: var(--sp-3);
  color: var(--text-strong);
}
.detail-ssr-meta {
  font-size: var(--t-small);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-5);
}
.detail-ssr-cat {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--t-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail-ssr-desc {
  font-size: var(--t-body-lg);
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ============ 密码框眼睛切换 ============ */
.input-with-eye {
  position: relative;
  display: block;
}
.input-with-eye .input { padding-right: 44px; }
.input-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.input-eye:hover { background: var(--bg-muted); color: var(--text); }
.input-eye:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.input-eye i { width: 16px; height: 16px; stroke-width: 1.8; }
.input-eye .eye-hide { display: none; }
.input-eye[aria-pressed="true"] .eye-show { display: none; }
.input-eye[aria-pressed="true"] .eye-hide { display: inline-block; }


/* ============ 反馈页布局 ============ */
.feedback-grid { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; max-width: 1000px; margin: 0 auto; }
.feedback-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
.feedback-side { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.feedback-side h4 { margin-bottom: 16px; }
.feedback-side ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.feedback-side li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-secondary); }
.feedback-row { margin-bottom: 20px; }
.feedback-row label { display: block; font-weight: 600; margin-bottom: 6px; }
.feedback-row .req { color: var(--danger); }
.feedback-row input, .feedback-row select, .feedback-row textarea { width: 100%; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg); color: var(--text-primary); font-size: 14px; }
.feedback-row textarea { resize: vertical; }
.feedback-submit { width: 100%; padding: 14px; font-size: 16px; border-radius: 10px; }
.feedback-success { display: none; text-align: center; padding: 32px; margin-top: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; }
.feedback-success-icon { font-size: 48px; margin-bottom: 12px; color: var(--accent); }
@media (max-width: 800px) {
  .feedback-grid { grid-template-columns: 1fr !important; }
}


/* ============ 404 页 ============ */
.btn-ico { width: 16px; height: 16px; margin-right: 4px; }
.err-section-h { font-size: 16px; color: var(--text-tertiary); font-weight: 500; margin-bottom: 18px; }

.feedback-success i[data-lucide] { width: 48px; height: 48px; }

/* ============ profile 微调 ============ */
.profile-card-mb { margin-bottom: 16px; }
.profile-section-mb { margin-bottom: 24px; }
.profile-muted { color: var(--text-tertiary); }
.profile-accent-strong { color: var(--accent); }
.profile-accent-link { color: var(--accent); }
.profile-grid-full { grid-column: 1/-1; }
.profile-activity-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.profile-logout { color: var(--danger); }
.profile-loading-ico { width: 24px; height: 24px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.ico-sm { width: 14px; height: 14px; }


/* ============ 全局动效体系 (P1 13-21) ============ */

/* 13. 页面级入场 */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
main { animation: pageFadeIn 400ms var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)); }

/* 14. 按钮微交互 */
.btn-primary {
  transition: transform 180ms var(--ease-out, ease), box-shadow 240ms var(--ease-out, ease), background-color 200ms var(--ease-out, ease);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--accent-glow, rgba(255, 107, 53, 0.28)); }
.btn-primary:active { transform: translateY(0); transition-duration: 60ms; }
.btn-secondary {
  transition: border-color 200ms var(--ease-out, ease), background-color 200ms var(--ease-out, ease), color 200ms var(--ease-out, ease);
}
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-soft, rgba(255,107,53,0.06)); }

/* 15. Mega Menu 透明度过渡 */
.nav-mega {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 200ms var(--ease-out, ease), transform 200ms var(--ease-out, ease);
}
.nav-drop:hover .nav-mega,
.nav-drop.active .nav-mega { opacity: 1; transform: translateY(0); pointer-events: auto; }
@media (max-width: 1024px) {
  .nav-mega { opacity: 1; transform: none; pointer-events: auto; }
}

/* 16. 弹窗动画 (用于任何 .modal-bg / [data-modal]) */
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-bg, [data-modal]:not([hidden]) {
  animation: modalIn 240ms var(--ease-out, ease);
}
@keyframes modalOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.96) translateY(6px); }
}

/* 17. 折叠面板 (grid-template-rows 1fr/0fr 技巧) */
.collapse-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms var(--ease-out, ease);
  overflow: hidden;
}
.collapse-panel.open { grid-template-rows: 1fr; }
.collapse-panel > * { min-height: 0; }

/* 18. Tab Panel 切换 */
.tab-panel {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 220ms var(--ease-out, ease), transform 220ms var(--ease-out, ease);
  display: none;
}
.tab-panel.active { opacity: 1; transform: translateX(0); display: block; }

/* 19. 图片懒加载淡入 */
img[loading="lazy"] { opacity: 0; transition: opacity 400ms var(--ease-out, ease); }
img[loading="lazy"].loaded,
img[loading="lazy"].is-loaded { opacity: 1; }

/* 20. 表单抖动错误 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
.input.is-error, .textarea.is-error, .select.is-error {
  border-color: var(--danger);
  animation: shake 400ms var(--ease-out, ease);
  background: var(--danger-soft, rgba(255, 59, 48, 0.04));
}

/* 21. Header 滚动过渡 */
.header, .header-ai {
  transition: background-color 280ms var(--ease-out, ease), box-shadow 280ms var(--ease-out, ease), border-color 280ms var(--ease-out, ease);
}
.header.is-scrolled, .header-ai.is-scrolled {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.06));
  border-bottom-color: var(--border);
}

/* 27. 主题切换过渡 */
html { transition: background-color 300ms var(--ease-out, ease), color 300ms var(--ease-out, ease); }

/* 28. section-header merged into original */

/* 28. hr 品牌渐变 */
hr { border: none; height: 1px; background: var(--gradient-brand, linear-gradient(90deg, var(--accent) 0%, transparent 100%)); margin: var(--sp-6) 0; }

/* 29. 长文本排版 (about/privacy/terms/help/beginner) */
.prose { max-width: 680px; margin: 0 auto; line-height: var(--lh-relaxed, 1.7); }
.prose p { margin-bottom: 1.2em; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.8em; margin-bottom: 0.6em; line-height: 1.3; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { border-left: 3px solid var(--border); padding: var(--sp-3) var(--sp-4); color: var(--text-secondary); margin: 1.2em 0; }
.prose code { font-family: var(--font-mono, 'SF Mono', Menlo, monospace); background: var(--bg-muted); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.prose pre { background: var(--bg-muted); padding: var(--sp-4); border-radius: var(--r-md); overflow-x: auto; }

/* ============ 注册密码强度条 ============ */
.pwd-strength { display: flex; gap: 4px; margin-top: 8px; align-items: center; }
.pwd-strength-bar { flex: 1; height: 4px; background: var(--bg-muted); border-radius: 2px; transition: background-color 200ms var(--ease-out, ease); }
.pwd-strength-label { font-size: 12px; color: var(--text-tertiary); min-width: 32px; text-align: right; }
.pwd-strength[data-level="0"] .pwd-strength-bar:nth-child(-n+1) { background: var(--c-n200, #e5e5e7); }
.pwd-strength[data-level="1"] .pwd-strength-bar:nth-child(1) { background: var(--danger); }
.pwd-strength[data-level="2"] .pwd-strength-bar:nth-child(1),
.pwd-strength[data-level="2"] .pwd-strength-bar:nth-child(2) { background: var(--c-yellow, #f59e0b); }
.pwd-strength[data-level="3"] .pwd-strength-bar { background: var(--c-green, #10b981); }

/* ============ Cookie 同意横幅 ============ */
.cookie-banner {
  position: fixed; left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-4);
  z-index: 999;
  display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,0.12));
  font-size: var(--t-small);
  animation: cookieSlideUp 360ms var(--ease-out, ease);
}
.cookie-banner.is-leaving { animation: cookieSlideDown 280ms var(--ease-out, ease) forwards; }
.cookie-banner-text { flex: 1; min-width: 240px; color: var(--text-secondary); }
.cookie-banner-text a { color: var(--accent); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-banner-actions .btn { padding: 8px 16px; font-size: 13px; }
@keyframes cookieSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cookieSlideDown { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(20px); } }
@media (max-width: 640px) {
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 12px 14px; }
  .cookie-banner-actions .btn { flex: 1; }
}

/* ============ Hero 搜索建议下拉 (复用 .header-suggest) ============ */
.hero-search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,0.1));
  max-height: 320px; overflow-y: auto;
  display: none; z-index: 50;
}
.hero-search-suggest.is-open { display: block; }
.hero-search-suggest a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 14px; color: var(--text); }
.hero-search-suggest a:hover, .hero-search-suggest a.is-active { background: var(--bg-muted); }
.hero-search-suggest .hss-icon { color: var(--text-tertiary); }
.hero-search-suggest .hss-cat { margin-left: auto; font-size: 11px; color: var(--text-tertiary); background: var(--bg-muted); padding: 2px 8px; border-radius: 999px; }
.hero-search-suggest .hss-foot { padding: 8px 14px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; font-size: 12px; color: var(--text-tertiary); }

/* ============ 移动端菜单遮罩 ============ */
.menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.32); z-index: 60;
  opacity: 0; pointer-events: none;
  transition: opacity 200ms var(--ease-out, ease);
}
.menu-backdrop.is-open { opacity: 1; pointer-events: auto; }


/* ============ 长文本排版自动应用到 about/privacy/terms/help/beginner ============ */
.about-block, .help-faq, .beginner-content,
.about-page .prose-block, .help-page .prose-block {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.about-block p, .help-faq p, .beginner-content p,
.terms-page p, .privacy-page p, .help-page p, .beginner-page p {
  line-height: var(--lh-relaxed, 1.7);
  margin-bottom: 1.2em;
}
.about-block h2, .help-faq h2, .beginner-content h2 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  line-height: 1.3;
}
.about-block ul, .help-faq ul, .beginner-content ul {
  padding-left: 1.4em;
  margin-bottom: 1.2em;
}
.about-block li, .help-faq li, .beginner-content li {
  margin-bottom: 0.4em;
  line-height: var(--lh-relaxed, 1.7);
}

/* help + beginner 排版 */
.help-section, .beginner-section, .help-page > p, .beginner-page > p,
.help-faq, .help-content, .beginner-content, .beginner-text {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.help-section p, .beginner-section p, .beginner-text p, .help-page p {
  line-height: var(--lh-relaxed, 1.7);
  margin-bottom: 1.2em;
}
.help-section h2, .beginner-section h2, .beginner-text h2,
.help-faq h2, .help-faq h3 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  line-height: 1.3;
}


/* ============ Markdown 编辑器 ============ */
.md-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; padding: 4px; background: var(--bg-soft); border-radius: var(--r-md); border: 1px solid var(--border-soft); width: fit-content; }
.md-tab { padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--text-secondary); background: transparent; border: none; border-radius: var(--r-sm); cursor: pointer; transition: all 200ms var(--ease-out, ease); }
.md-tab:hover { color: var(--text); }
.md-tab.is-active { background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow-xs); }
.md-tab-md-tool { padding: 6px 10px; margin-left: 4px; color: var(--text-tertiary); background: transparent; border: none; border-radius: var(--r-sm); cursor: pointer; transition: all 200ms var(--ease-out, ease); display: inline-flex; align-items: center; }
.md-tab-md-tool:hover { background: var(--bg-elevated); color: var(--accent); }
.md-preview { padding: var(--sp-4); background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-md); min-height: 120px; line-height: var(--lh-relaxed, 1.7); }
.md-preview p { margin-bottom: 0.8em; }
.md-preview h1, .md-preview h2, .md-preview h3 { margin-top: 1.4em; margin-bottom: 0.6em; line-height: 1.3; }
.md-preview code { font-family: var(--font-mono, 'SF Mono', Menlo, monospace); background: var(--bg-muted); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.md-preview pre { background: var(--bg-muted); padding: var(--sp-3); border-radius: var(--r-md); overflow-x: auto; }
.md-preview ul, .md-preview ol { padding-left: 1.4em; margin-bottom: 0.8em; }
.md-preview img { max-width: 100%; height: auto; border-radius: var(--r-md); margin: 8px 0; }
.md-preview a { color: var(--accent); }

/* 用户菜单下拉 */
.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--border-soft, #E4E4E7);
  border-radius: var(--r-lg, 12px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  padding: 6px;
  z-index: 100;
  display: none;
  flex-direction: column;
}
[data-theme="dark"] .user-menu {
  background: var(--c-n900, #1c1c1e);
  border-color: var(--c-n800, #2c2c2e);
}
.user-menu.open { display: flex; }
.user-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r-md, 8px);
  color: var(--text, #1d1d1f);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 150ms var(--ease-out, ease);
  white-space: nowrap;
}
.user-menu a:hover { background: var(--bg-muted, #F4F4F5); }
[data-theme="dark"] .user-menu a:hover { background: var(--c-n800, #2c2c2e); }
.user-menu a svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-secondary, #555); }
.user-pill { position: relative; }
.user-pill svg.chev { width: 14px; height: 14px; opacity: .6; margin-left: 2px; }

/* ===================================================
   吟知 MacEFI 全站增强 v3
   - 模态/抽屉
   - 设计 token 注释
   - 滚动渐显
   - 工具提示
   - 焦点环
   - 输入校验
   =================================================== */

/* ----- 设计 token 速查（v3 整理版） -----
   色板：
     --accent           主色（暖橘） #FF6B35
     --accent-soft      主色软底（橘 12%） #FFF1EA
     --accent-strong    主色深   #E85A24
     --accent-ring      焦点环  rgba(255,107,53,0.20)
     --bg               页面底   #FFFFFF / #0A0A0C
     --bg-card          卡片底   #FFFFFF / #1A1A1C
     --bg-soft          软分区   #FAFAFA / #15151A
     --bg-muted         弱化     #F4F4F5 / #25252A
     --border           边框     #E4E4E7 / #2A2A30
     --border-soft      软边框   #F0F0F2 / #1F1F25
     --text             主文     #1D1D1F / #F5F5F7
     --text-secondary   次文     #555 / #C7C7CC
     --text-tertiary    弱文     #999 / #8E8E93
     --success          成功     #34C759
     --warning          警告     #F59E0B
     --danger           危险     #FF3B30
     --info             信息     #007AFF
   圆角：
     --r-sm 6px  --r-md 8px  --r-lg 12px  --r-xl 16px  --r-2xl 20px
   间距（4px 基线）：
     --sp-1 4 --sp-2 8 --sp-3 12 --sp-4 16 --sp-5 20 --sp-6 24
     --sp-8 32 --sp-10 40 --sp-12 48 --sp-16 64 --sp-20 80
   缓动：
     --ease-out  cubic-bezier(0.16, 1, 0.3, 1)  （推荐）
     --ease-soft cubic-bezier(0.4, 0, 0.2, 1)  （标准 Material）
   时长：
     --dur-fast 150ms  --dur-base 240ms  --dur-slow 400ms
   ---------------------------------------- */

/* ----- 焦点环统一 ----- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ----- 输入校验视觉 ----- */
.input.is-error,
.textarea.is-error {
  border-color: var(--danger);
  background: rgba(255, 59, 48, 0.04);
}
.input.is-error:focus,
.textarea.is-error:focus {
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
  border-color: var(--danger);
}
.input.is-success {
  border-color: var(--success);
}
.field-error {
  display: none;
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  line-height: 1.4;
}
.field-error.show { display: flex; align-items: center; gap: 4px; }
.field-error::before { content: ''; display: inline-block; width: 12px; height: 12px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L13.09 8.26L20 9L13.09 9.74L12 16L10.91 9.74L4 9L10.91 8.26L12 2Z' fill='currentColor'/%3E%3C/svg%3E") no-repeat center / contain; }

/* ----- 通用模态 ----- */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  padding: 16px;
  animation: fadeIn 200ms ease;
}
.modal[hidden] { display: none; }
.modal-dialog {
  background: var(--bg-card, #fff);
  border-radius: var(--r-2xl, 20px);
  border: 1px solid var(--border-soft, #F0F0F2);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPop 240ms var(--ease-out, ease);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.20);
}
.modal-dialog.lg { max-width: 720px; }
.modal-dialog.xl { max-width: 960px; }
.modal-head {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft, #F0F0F2);
}
.modal-title { font-size: 16px; font-weight: 600; color: var(--text, #1D1D1F); }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--r-md, 8px);
  background: none; border: 0; cursor: pointer;
  color: var(--text-tertiary, #999);
  display: flex; align-items: center; justify-content: center;
  transition: all 150ms;
}
.modal-close:hover { background: var(--bg-muted, #F4F4F5); color: var(--text, #1D1D1F); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot {
  padding: 14px 24px;
  border-top: 1px solid var(--border-soft, #F0F0F2);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ----- 工具提示（纯 CSS，data-tip） ----- */
[data-tip] {
  position: relative;
}
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text, #1D1D1F);
  color: var(--bg, #fff);
  font-size: 12px;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms, transform 150ms;
  z-index: 1000;
}
[data-tip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ----- 滚动渐显 ----- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out, ease), transform 600ms var(--ease-out, ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-reveal-delay="1"] { transition-delay: 80ms; }
.reveal[data-reveal-delay="2"] { transition-delay: 160ms; }
.reveal[data-reveal-delay="3"] { transition-delay: 240ms; }
.reveal[data-reveal-delay="4"] { transition-delay: 320ms; }
.reveal[data-reveal-delay="5"] { transition-delay: 400ms; }
.reveal[data-reveal-delay="6"] { transition-delay: 480ms; }

/* ----- 按钮按压效果 ----- */
.btn:not(:disabled):active { transform: scale(0.98); }

/* ----- 卡片悬浮效果（资源卡等） ----- */
.lift-on-hover {
  transition: transform 240ms var(--ease-out, ease), box-shadow 240ms var(--ease-out, ease);
}
.lift-on-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ----- 链接下划线动画 ----- */
.link-anim {
  position: relative;
  text-decoration: none;
  color: inherit;
}
.link-anim::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms var(--ease-out, ease);
}
.link-anim:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ----- 标签徽标 ----- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-muted, #F4F4F5);
  color: var(--text-secondary, #555);
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.5;
}
.badge.accent { background: var(--accent-soft, #FFF1EA); color: var(--accent, #FF6B35); }
.badge.success { background: rgba(52, 199, 89, 0.12); color: var(--success, #34C759); }
.badge.warn    { background: rgba(245, 158, 11, 0.12); color: var(--warning, #F59E0B); }
.badge.danger  { background: rgba(255, 59, 48, 0.12); color: var(--danger, #FF3B30); }
.badge.info    { background: rgba(0, 122, 255, 0.12); color: var(--info, #007AFF); }
.badge.lg { font-size: 12px; padding: 4px 10px; }

/* ----- 空状态/错误状态升级 ----- */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.empty-state-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg-soft, #FAFAFA);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary, #999);
}
.empty-state-icon svg { width: 28px; height: 28px; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text, #1D1D1F); margin: 0; }
.empty-state-desc { color: var(--text-tertiary, #999); font-size: 14px; max-width: 360px; margin: 0; line-height: 1.6; }
.empty-state .btn { margin-top: 8px; }

/* ----- 分隔线 ----- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-soft, #F0F0F2) 20%, var(--border-soft, #F0F0F2) 80%, transparent);
  margin: var(--sp-6, 24px) 0;
}
.divider.v { width: 1px; height: auto; align-self: stretch; background: var(--border-soft, #F0F0F2); margin: 0 var(--sp-3, 12px); }

/* ----- 加载中（spinner） ----- */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border, #E4E4E7);
  border-top-color: var(--accent, #FF6B35);
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}
.spinner.sm { width: 12px; height: 12px; border-width: 1.5px; }
.spinner.lg { width: 24px; height: 24px; border-width: 2.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- 进度条 ----- */
.progress {
  height: 4px;
  background: var(--bg-muted, #F4F4F5);
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}
.progress-bar {
  height: 100%;
  background: var(--accent, #FF6B35);
  border-radius: 2px;
  transition: width 600ms var(--ease-out, ease);
}

/* ----- 头像组（stacked） ----- */
.avatar-group { display: inline-flex; }
.avatar-group .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #FF8E53);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  border: 2px solid var(--bg-card, #fff);
  margin-left: -8px;
}
.avatar-group .avatar:first-child { margin-left: 0; }

/* ----- 倒计时数字 ----- */
.countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent);
}
.countdown-num { font-size: 18px; }
.countdown-unit { font-size: 12px; color: var(--text-tertiary); }

/* ----- 平滑滚动到顶部按钮 ----- */
.scroll-top-btn {
  position: fixed;
  bottom: 80px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-soft, #F0F0F2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  display: flex; align-items: center; justify-content: center;
  color: var(--text, #1D1D1F);
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 240ms var(--ease-out, ease), transform 240ms var(--ease-out, ease);
}
.scroll-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top-btn:hover {
  background: var(--accent, #FF6B35);
  color: #fff;
  border-color: var(--accent, #FF6B35);
}
.scroll-top-btn svg { width: 18px; height: 18px; }

/* ----- 数字变化动画 ----- */
.count-up { transition: color 240ms; }
.count-up.is-pulse { animation: countPulse 800ms var(--ease-out, ease); }
@keyframes countPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); color: var(--accent); }
  100% { transform: scale(1); }
}

/* ----- 高亮文本 ----- */
mark {
  background: var(--accent-soft, #FFF1EA);
  color: var(--accent-strong, #E85A24);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 500;
}

/* ----- 响应式断点（PC 优先，兼容平板） ----- */
@media (max-width: 1180px) {
  .hide-on-narrow { display: none !important; }
}
@media (max-width: 960px) {
  .hide-on-tablet { display: none !important; }
}
@media (max-width: 720px) {
  .hide-on-mobile { display: none !important; }
  .modal { padding: 8px; }
  .modal-dialog { max-width: 100%; }
}

/* ----- 暗色微调 ----- */
[data-theme="dark"] .input.is-error,
[data-theme="dark"] .textarea.is-error {
  background: rgba(255, 59, 48, 0.08);
}
[data-theme="dark"] mark {
  color: var(--accent);
}
