#zaraz-tool-suite {
    width: 100%;
    margin: 40px auto 20px auto;
    box-sizing: border-box;
    color: inherit; /* 动态继承主站文字颜色，防止反色失联 */
  }

  /* Tabs 导航样式 */
  .z-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
  }
  .z-tab-btn {
    padding: 10px 18px;
    cursor: pointer;
    border: none;
    background: none;
    font-weight: 700;
    font-size: 15px;
    color: inherit;
    opacity: 0.6;
    border-bottom: 3px solid transparent;
    transition: all .2s;
  }
  .z-tab-btn.active {
    opacity: 1;
    color: #007bff;
    border-bottom-color: #007bff;
  }

  /* 诊断卡片网格布局 */
  .z-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 10px;
  }

  /* .z-card 本身不设背景色，完全交给主站原生 .detail-item 处理 */
  .detail-item.z-card {
    margin: 0 !important; /* 覆盖可能的外边距 */
    padding: 20px !important;
    text-align: left;
    box-sizing: border-box;
  }
  .z-card h3 {
    margin: 0 0 14px 0;
    font-size: 16px;
    font-weight: 700;
    color: inherit;
  }
  .z-card p { margin: 8px 0; font-size: 14px; line-height: 1.6; color: inherit; }

  /* 输入框与按钮：采用相对颜色，完美自适应 */
  .z-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.8);
    color: inherit;
    font-size: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
  }
  .z-btn {
    background: #007bff;
    color: #ffffff !important;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s;
  }
  .z-btn:hover { background: #0056b3; }
  .z-btn:disabled { opacity: 0.5; cursor: not-allowed; }

  /* 延迟测试行 */
  .z-latency-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    font-size: 14px;
  }
  .z-latency-val { font-weight: 700; }
  .z-lat-fast { color: #10b981; }
  .z-lat-med  { color: #f59e0b; }
  .z-lat-slow { color: #ef4444; }

  /* 状态标记徽章 */
  .z-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
  }
  .z-badge-safe   { background: #d1fae5; color: #065f46; }
  .z-badge-warn   { background: #fef3c7; color: #92400e; }
  .z-badge-danger { background: #fee2e2; color: #991b1b; }

  /* 代码框背景同样采用半透明，适应亮暗转换 */
  pre {
    background: rgba(0, 0, 0, 0.04);
    padding: 14px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
    color: inherit;
    margin-top: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
  }

  code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; color: #007bff; }
  .z-tab-pane { display: none; }
  .z-tab-pane.active { display: block; }

  /* ================================================================= */
  /* ======================== 极致高对比度暗黑模式 ======================= */
  /* ================================================================= */
  @media (prefers-color-scheme: dark) {
    .z-tabs-nav { border-bottom-color: rgba(255, 255, 255, 0.1); }
    .z-input {
      background: rgba(0, 0, 0, 0.3);
      border-color: rgba(255, 255, 255, 0.15);
    }
    .z-latency-row { border-bottom-color: rgba(255, 255, 255, 0.1); }
    pre {
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(255, 255, 255, 0.08);
    }
    code { color: #60a5fa; }
    .z-badge-safe   { background: rgba(16, 185, 129, 0.2); color: #34d399; }
    .z-badge-warn   { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
    .z-badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; }
  }

  /* 兼容手动切换 dark class 的主题或插件 */
  html.dark .z-tabs-nav, body.dark .z-tabs-nav { border-bottom-color: rgba(255, 255, 255, 0.1); }
  html.dark .z-input, body.dark .z-input {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
  }
  html.dark .z-latency-row, body.dark .z-latency-row { border-bottom-color: rgba(255, 255, 255, 0.1); }
  html.dark pre, body.dark pre {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
  }
  html.dark code, body.dark code { color: #60a5fa; }
  html.dark .z-badge-safe, body.dark .z-badge-safe { background: rgba(16, 185, 129, 0.2); color: #34d399; }
  html.dark .z-badge-warn, body.dark .z-badge-warn { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
  html.dark .z-badge-danger, body.dark .z-badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* ================================================================ */
/* ==== 瀑布流模块化系统 (FAQ + 技术指南合并) — 核心样式 ========= */
/* ================================================================ */

#mft-container {
  width: 100%;
  max-width: 880px;
  margin: 55px auto;
  box-sizing: border-box;
}

#mft-container .mft-title {
  font-size: 1.55em !important;
  font-weight: 700 !important;
  margin-bottom: 14px !important;
  padding-bottom: 14px !important;
  border-bottom: 2px solid var(--glass-border, rgba(0,0,0,0.06)) !important;
  color: var(--text-primary, #1e293b) !important;
  text-align: left;
}

.mft-masonry {
  column-count: 3;
  column-gap: 18px;
  margin-bottom: 20px;
}

@media (max-width: 900px) { .mft-masonry { column-count: 2; } }
@media (max-width: 560px) { .mft-masonry { column-count: 1; } }

.mft-card {
  break-inside: avoid;
  display: block;
  margin-bottom: 18px;
  border-radius: 14px !important;
  overflow: hidden;
  cursor: pointer;
  background: var(--card-glass-bg, rgba(255,255,255,0.35)) !important;
  border: 1px solid var(--card-glass-border, rgba(255,255,255,0.25)) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.01) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
}

.mft-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.08) !important;
  border-color: var(--accent-color, #2563eb) !important;
}

.mft-card-thumb {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: var(--card-glass-bg, rgba(240,242,245,0.5));
}

.mft-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0.85;
  transition: opacity 0.3s, transform 0.5s;
}

.mft-card:hover .mft-card-thumb img {
  opacity: 1; transform: scale(1.06);
}

.mft-card-thumb::after {
  content: ""; position: absolute;
  bottom: 0; left: 0; right: 0; height: 45%;
  background: linear-gradient(to bottom, transparent, var(--card-glass-bg, rgba(255,255,255,0.5)));
  pointer-events: none;
}

.mft-card-body { padding: 16px 18px 18px; text-align: left; }

.mft-card-tag {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-color, #2563eb) !important;
  opacity: 0.65; margin-bottom: 8px; display: inline-block;
}

.mft-card-title {
  font-size: 14.5px !important; font-weight: 600 !important;
  color: var(--text-primary, #1e293b) !important;
  line-height: 1.5; margin: 0 0 10px 0;
}

.mft-card-excerpt {
  font-size: 12.5px;
  color: var(--text-secondary, #64748b) !important;
  line-height: 1.6; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; opacity: 0.7;
}

.mft-toolbar {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 22px;
}

.mft-refresh-btn {
  background: var(--accent-color, #2563eb) !important;
  color: #ffffff !important; border: none; border-radius: 50px;
  padding: 8px 22px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
  box-shadow: 0 3px 12px var(--accent-bg, rgba(37,99,235,0.15));
  display: inline-flex; align-items: center; gap: 6px;
}

.mft-refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--accent-bg, rgba(37,99,235,0.25));
}
.mft-refresh-btn:active { transform: translateY(0); }

.mft-counter {
  font-size: 12px; color: var(--text-secondary, #64748b) !important;
  opacity: 0.6;
}

/* ==================== 窗口模态框 ==================== */

.mft-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 2147483646; display: none;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: mft-fade-in 0.25s ease;
}

.mft-overlay.active { display: flex; }

@keyframes mft-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes mft-win-pop {
  from { opacity: 0; transform: scale(0.9) translateY(24px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.mft-window {
  width: 620px; max-width: calc(100vw - 40px); max-height: calc(100vh - 80px);
  background: var(--glass-bg, rgba(255,255,255,0.72)) !important;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.45)) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0,0,0,0.08) !important;
  backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.8);
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.8);
  display: flex; flex-direction: column; overflow: hidden;
  animation: mft-win-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.mft-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  background: var(--card-glass-bg, rgba(240,242,245,0.5)) !important;
  border-bottom: 1px solid var(--card-glass-border, rgba(0,0,0,0.06)) !important;
  cursor: grab; user-select: none; -webkit-user-select: none; flex-shrink: 0;
}
.mft-titlebar:active { cursor: grabbing; }

.mft-tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mft-lights { display: flex; gap: 7px; flex-shrink: 0; }
.mft-light { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.mft-l-red { background: #ff5f57; }
.mft-l-yellow { background: #febc2e; }
.mft-l-green { background: #28c840; }

.mft-win-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary, #1e293b) !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mft-win-close {
  width: 28px; height: 28px; border: none; background: transparent;
  cursor: pointer; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary, #64748b) !important;
  transition: all 0.15s ease; flex-shrink: 0;
}
.mft-win-close:hover { background: rgba(239, 68, 68, 0.12); color: #ef4444 !important; }

.mft-win-body {
  padding: 24px 28px; overflow-y: auto; flex: 1;
  color: var(--text-secondary, #475569) !important;
  line-height: 1.85; font-size: 15px; text-align: left;
}
.mft-win-body::-webkit-scrollbar { width: 6px; }
.mft-win-body::-webkit-scrollbar-track { background: transparent; }
.mft-win-body::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.2); border-radius: 10px; }

.mft-win-body strong, .mft-win-body b {
  color: var(--text-primary, #1e293b) !important; font-weight: 700;
}
.mft-win-body code {
  background: var(--accent-bg, rgba(37,99,235,0.06)) !important;
  color: var(--accent-color, #2563eb) !important;
  padding: 2px 6px; border-radius: 4px; font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.mft-win-body p { margin: 10px 0; }

.mft-resize {
  position: absolute; bottom: 0; right: 0;
  width: 20px; height: 20px; cursor: nwse-resize; opacity: 0.25;
}
.mft-resize::after {
  content: ""; position: absolute; bottom: 3px; right: 3px;
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-secondary, #64748b);
  border-bottom: 2px solid var(--text-secondary, #64748b);
}

html.dark-theme .mft-titlebar {
  background: rgba(15, 23, 42, 0.45) !important;
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}
html.dark-theme .mft-overlay { background: rgba(0, 0, 0, 0.48); }

/* —— 隐藏原始 FAQ + 技术指南（中英文全覆盖） —— */
.faq-section { display: none !important; }
.worker-inject-container.tech-card { display: none !important; }
.worker-inject-container.inject-zh.tech-card { display: none !important; }
.worker-inject-container.inject-en.tech-card { display: none !important; }