/* ============================================
 * 我的工具箱 - 全站样式
 * 想改主题色：修改 :root 里的 --primary 即可
 * ============================================ */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 22px;
}

.main-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--primary);
}

/* ---------- Hero 区 ---------- */
.hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 60%);
  padding: 72px 0 56px;
  text-align: center;
}

.hero h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary), #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  color: var(--text-light);
  font-size: 17px;
  max-width: 620px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 首页「已累计服务 N 次」——社交证明，数据来自自建 KV 统计 */
.hero-stats {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

.hero-stats b {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost {
  background: var(--card-bg);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-ghost:hover {
  background: var(--primary-light);
}

.btn-block {
  width: 100%;
  text-align: center;
}

/* ---------- 区块标题 ---------- */
.section-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-light);
  margin-bottom: 22px;
}

section {
  padding: 48px 0;
}

/* ---------- 工具卡片 ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.tool-icon {
  font-size: 34px;
}

.tool-card h3 {
  font-size: 18px;
}

.tool-card p {
  color: var(--text-light);
  font-size: 14px;
  flex: 1;
}

.tool-status {
  align-self: flex-start;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
}

/* ---------- 站长推荐（联盟位） ---------- */
.recommend-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommend-list a {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s;
}

.recommend-list a:hover {
  border-color: var(--primary);
}

/* ---------- 捐赠区 ---------- */
.donate-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- 广告位 ---------- */
.ad-slot {
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin: 24px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-placeholder {
  color: #94a3b8;
  font-size: 13px;
}

/* ---------- 工具页 ---------- */
.tool-page {
  padding: 40px 0 60px;
}

.tool-page h1 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 8px;
}

.tool-desc {
  color: var(--text-light);
  margin-bottom: 28px;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 760px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

.tool-inputs {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
}

.tool-output {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.qrcode-box {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
  width: 100%;
}

.qrcode-box img {
  max-width: 100%;
  height: auto;
}

.qrcode-box.error {
  color: #dc2626;
}

.tool-tip {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
}

/* ---------- 图片压缩 ---------- */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--primary);
  background: var(--primary-light);
}

.drop-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.drop-hint {
  color: var(--text-light);
  font-size: 13px;
  margin-top: 6px;
}

.preview-box {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
  width: 100%;
}

.preview-box img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ---------- 密码生成器 ---------- */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.password-box {
  min-height: 90px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-size: 18px;
  word-break: break-all;
  color: var(--text);
}

.password-box.error {
  color: #dc2626;
}

/* ---------- 字数统计 ---------- */
textarea#text {
  width: 100%;
  min-height: 200px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  resize: vertical;
}

textarea#text:focus {
  border-color: var(--primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-num {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-light);
}

/* ---------- 关于页 ---------- */
.about-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.about-section h2 {
  font-size: 19px;
  margin-bottom: 10px;
}

.about-section p,
.about-section li {
  color: var(--text-light);
  margin-bottom: 6px;
}

.about-section ul {
  padding-left: 20px;
}

/* ---------- 分隔线 ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* ---------- 提示词/语音等工具的通用文本域 ---------- */
.form-group textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  resize: vertical;
}

.form-group textarea:focus {
  border-color: var(--primary);
}

.prompt-result {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  min-height: 120px;
  max-height: 400px;
  overflow-y: auto;
}

.prompt-result.error {
  color: #dc2626;
}

.color-swatch {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ---------- Markdown 预览 ---------- */
.md-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 760px) {
  .md-layout { grid-template-columns: 1fr; }
}

.md-preview {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 300px;
  line-height: 1.7;
  overflow-y: auto;
}

.md-preview h1, .md-preview h2, .md-preview h3 { margin: 12px 0 6px; }
.md-preview p { margin: 6px 0; }
.md-preview ul, .md-preview ol { padding-left: 22px; margin: 6px 0; }
.md-preview code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }
.md-preview pre { background: #1e293b; color: #e2e8f0; padding: 12px; border-radius: 8px; overflow-x: auto; }
.md-preview a { color: var(--primary); }
.md-preview blockquote { border-left: 3px solid var(--primary); padding-left: 12px; color: var(--text-light); margin: 8px 0; }

/* ---------- 计时器 ---------- */
.timer-display {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 72px;
  font-weight: 800;
  text-align: center;
  color: var(--primary);
  margin: 20px 0;
}

/* ---------- 抠图透明背景棋盘格 ---------- */
.checkerboard {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
  background-image: linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 16px;
  width: 100%;
}

.checkerboard img {
  max-width: 100%;
  max-height: 360px;
  border-radius: 8px;
}

/* ============================================
 * 工具页通用小组件（提示、折叠说明、数据表、滑块）
 * ============================================ */
.field-hint {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
}

.field-details {
  margin-top: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}

.field-details > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  list-style: none;
}

.field-details > summary::-webkit-details-marker { display: none; }

.field-list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.9;
}

.field-list b { color: var(--text); }

.field-list-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-light);
}

.form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.form-row > .form-group {
  flex: 1 1 140px;
  min-width: 0;
}

.form-group input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.form-group input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 3px;
  cursor: pointer;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.data-table th,
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child { text-align: left; }

.data-table th {
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}

.data-table tbody tr:hover { background: var(--primary-light); }

/* ---------- 个税计算器 ---------- */
.tax-summary { width: 100%; }

.tax-empty {
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
  padding: 32px 10px;
}

.tax-lines {
  list-style: none;
  width: 100%;
  margin-top: 16px;
  font-size: 14px;
}

.tax-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

.tax-lines li span { color: var(--text-light); }
.tax-lines li b { color: var(--text); }

.tax-lines .tax-total {
  border-bottom: none;
  border-top: 2px solid var(--primary-light);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 15px;
}

.tax-lines .tax-total b {
  color: var(--primary);
  font-size: 17px;
}

.tool-section { padding: 40px 0 0; }

.bonus-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.bonus-row .form-group { flex: 1 1 220px; }

.bonus-result { font-size: 14px; }

.bonus-warn {
  margin-top: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 12px 16px;
  color: #92400e;
  line-height: 1.8;
}

/* ---------- 图片加水印 ---------- */
.wm-preview {
  width: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
}

.wm-preview img {
  max-width: 100%;
  max-height: 380px;
  border-radius: 8px;
}

.wm-meta {
  font-size: 12px;
  color: var(--text-light);
}

.wm-list { width: 100%; }

.wm-count {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.wm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 13px;
}

.wm-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.wm-one {
  flex-shrink: 0;
  border: 1px solid var(--primary);
  background: var(--card-bg);
  color: var(--primary);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.wm-one:hover { background: var(--primary-light); }

/* ---------- 证件照制作 ---------- */
.bg-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bg-swatch {
  flex: 1 1 auto;
  min-width: 62px;
  padding: 9px 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.bg-swatch:hover { border-color: var(--primary); }

.bg-swatch.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.idphoto-preview {
  width: 100%;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
}

.idphoto-canvas {
  max-width: 100%;
  max-height: 420px;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  background: #fff;
}

.idphoto-empty {
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
}

.idphoto-meta {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
}

/* ---------- 通用「怎么做」列表 ---------- */
.howto-list {
  padding-left: 22px;
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.95;
  margin-bottom: 14px;
}

.howto-list b { color: var(--text); }

/* ---------- PDF 合并 / 拆分 ---------- */
.pdf-list { width: 100%; }

.pdf-empty {
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
  padding: 32px 10px;
}

.pdf-count {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.pdf-info {
  width: 100%;
  margin-bottom: 8px;
}

.pdf-info-line {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.pdf-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 13px;
}

.pdf-index {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pdf-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.pdf-size {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-light);
}

.pdf-actions {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
}

.pdf-mini {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--card-bg);
  color: var(--text-light);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}

.pdf-mini:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.pdf-mini:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pdf-del:hover:not(:disabled) {
  border-color: #dc2626;
  color: #dc2626;
}

/* ============================================
 * 全站提示条（复制成功等）
 * ============================================ */
.site-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  max-width: min(90vw, 420px);
  background: #1e293b;
  color: #fff;
  font-size: 14px;
  line-height: 1.7;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  z-index: 9999;
}

.site-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.site-toast b {
  color: #a5b4fc;
  word-break: break-all;
}

/* ============================================
 * 首页工具分类
 * ============================================ */
.cat-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.cat-nav a {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.cat-nav a:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.tool-cat {
  margin-bottom: 36px;
  scroll-margin-top: 78px;   /* 锚点跳转时避开吸顶导航栏 */
}

.tool-cat-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.tool-cat-name { white-space: nowrap; }

.tool-cat-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-light);
  border-radius: 999px;
  padding: 2px 9px;
}

.tool-cat-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-light);
}

@media (max-width: 760px) {
  .tool-cat {
    margin-bottom: 28px;
    scroll-margin-top: 70px;
  }
  .tool-cat-title {
    font-size: 17px;
  }
  .tool-cat-desc {
    display: none;   /* 手机上省点地方 */
  }
  .cat-nav {
    gap: 6px;
    margin-bottom: 18px;
  }
  .cat-nav a {
    padding: 6px 12px;
    font-size: 12.5px;
  }
}

/* ============================================
 * 首页工具搜索
 * ============================================ */
.tool-search {
  position: relative;
  margin-bottom: 20px;
}

.tool-search input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}

.tool-search input:focus {
  border-color: var(--primary);
}

.search-count {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--text-light);
  pointer-events: none;
}

.search-empty {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  color: #92400e;
  margin-bottom: 20px;
}

.search-empty a {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================
 * 工具页底部「定制服务」引导（由 main.js 自动注入）
 * ============================================ */
.custom-cta {
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

.custom-cta h2 {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 10px;
}

.custom-cta p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.85;
  margin-bottom: 18px;
}

.custom-cta .custom-cta-note {
  font-size: 13px;
  margin-bottom: 0;
}

.custom-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

@media (max-width: 760px) {
  .custom-cta {
    padding: 30px 0;
  }
  .custom-cta h2 {
    font-size: 18px;
  }
  .custom-cta-actions .btn {
    width: 100%;
  }
  .search-count {
    position: static;
    display: block;
    transform: none;
    margin-top: 6px;
    text-align: right;
  }
}

/* ============================================
 * 首页「站长推荐」大卡片
 * ============================================ */
.featured-section {
  padding: 0 0 8px;
}

.featured-section .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.featured-card {
  display: block;
  position: relative;
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 28px 30px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(99, 102, 241, 0.26);
}

.featured-flag {
  position: absolute;
  top: 0;
  right: 24px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0 0 10px 10px;
}

.featured-inner {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.featured-emoji {
  font-size: 52px;
  line-height: 1;
  flex-shrink: 0;
}

.featured-body {
  flex: 1;
}

.featured-body h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.featured-tagline {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 14px;
}

.featured-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.featured-points span {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  padding: 5px 12px;
  color: var(--text);
}

.featured-cta {
  display: inline-block;
  font-weight: 700;
  color: var(--primary);
  font-size: 15px;
}

/* 推荐位有多张卡时纵向排列（原先只有一张，直接堆叠会贴在一起） */
.featured-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- 「定制服务」推荐卡：用琥珀色，和工具卡区分开 ----------
   目的：用户是冲着免费工具来的，这张卡是唯一的商业入口，
   必须一眼就跳出来，所以刻意换一套配色而不是复用主题靛蓝。 */
.featured-card--service {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #f59e0b;
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.20);
}

.featured-card--service:hover {
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.30);
}

.featured-card--service .featured-cta {
  color: #b45309;
}

.featured-flag--service {
  background: #f59e0b;
}

@media (max-width: 760px) {
  .featured-card {
    padding: 22px 18px;
  }
  .featured-inner {
    gap: 14px;
  }
  .featured-emoji {
    font-size: 38px;
  }
  .featured-body h3 {
    font-size: 20px;
  }
  .featured-list {
    gap: 12px;
  }
}

/* ============================================
 * 薯笔 · 小红书工具箱
 * ============================================ */

/* 工具页顶部的推荐徽章 */
.featured-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* ---------- Tab 切换 ---------- */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  box-shadow: var(--shadow);
}

.tab {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-light);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.tab.active {
  background: var(--primary);
  color: #fff;
}

.tab-panel {
  display: none;
  padding: 0;
}

.tab-panel.active {
  display: block;
}

/* ---------- 违禁词检测 ---------- */
.check-summary {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  text-align: left;
  color: var(--text-light);
}

.check-summary.ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.check-summary.bad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.check-preview {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  max-height: 260px;
  overflow-y: auto;
}

.fw-hit {
  background: #fecaca;
  color: #991b1b;
  font-weight: 700;
  border-radius: 3px;
  padding: 0 2px;
  border-bottom: 2px solid #ef4444;
  cursor: help;
}

.check-list {
  width: 100%;
}

.fw-group {
  margin-bottom: 14px;
}

.fw-group-head {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.fw-group-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
}

.fw-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fw-items li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  flex-wrap: wrap;
}

.fw-word {
  color: #991b1b;
  font-weight: 700;
  text-decoration: line-through;
  text-decoration-color: #ef4444;
}

.fw-arrow {
  color: var(--text-light);
}

.fw-replace {
  color: #166534;
  font-weight: 600;
}

/* ---------- 爆款标题生成 ---------- */
.title-result {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
}

.title-empty {
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
  padding: 40px 10px;
}

.title-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  text-align: left;
}

.title-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  word-break: break-word;
}

.title-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-tag {
  font-size: 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 2px 10px;
}

.title-one-copy {
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.title-one-copy:hover {
  color: var(--primary);
}

/* ---------- 套路库 ---------- */
.library-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.lib-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.lib-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.lib-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.lib-name {
  font-size: 17px;
  font-weight: 700;
}

.lib-desc {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.lib-examples {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lib-examples li {
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border-radius: 7px;
  padding: 6px 10px;
  line-height: 1.5;
}

/* ---------- 薯笔 CTA ---------- */
.shubi-cta {
  margin-top: 34px;
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  text-align: center;
}

.shubi-cta h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.shubi-cta p {
  color: var(--text-light);
  font-size: 15px;
  max-width: 640px;
  margin: 0 auto 18px;
}

.shubi-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- AI 生成：API 说明 ---------- */
.api-notice {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 20px;
}

.api-notice h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #92400e;
}

.api-notice p {
  font-size: 14px;
  color: #78350f;
  margin-bottom: 8px;
  line-height: 1.75;
}

.api-notice-tip {
  margin-bottom: 0 !important;
  font-weight: 600;
}

/* ---------- AI 生成：API 设置 ---------- */
.api-config {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  overflow: hidden;
}

.api-config > summary {
  cursor: pointer;
  padding: 16px 22px;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
  user-select: none;
}

.api-config > summary::-webkit-details-marker { display: none; }

.api-config > summary::after {
  content: '▾';
  float: right;
  color: var(--text-light);
}

.api-config[open] > summary::after { content: '▴'; }

.api-config-body {
  padding: 4px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.api-status {
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  line-height: 1.6;
}

.api-status.ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.api-key-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}

.api-key-link:hover { text-decoration: underline; }

.api-advanced {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--bg);
}

.api-advanced > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}

.api-advanced .form-group { margin-top: 12px; }

.api-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.api-actions .btn {
  flex: 1 1 auto;
  padding: 11px 20px;
  font-size: 15px;
}

.api-test-result {
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.api-test-result.ok { color: #166534; }
.api-test-result.bad { color: #dc2626; }

/* ---------- AI 生成：获取 Key 指引 ---------- */
.api-guide {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14px;
}

.api-guide h4 {
  font-size: 15px;
  margin-bottom: 10px;
}

.api-guide ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-light);
  line-height: 1.8;
}

.api-guide ol b { color: var(--text); }
.api-guide a { color: var(--primary); }

.api-guide code {
  background: var(--primary-light);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.api-guide-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.85;
}

/* ---------- AI 生成：模式切换 ---------- */
.mode-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.mode-btn {
  flex: 1 1 auto;
  padding: 12px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-light);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.mode-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mode-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.mode-panel {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 14px;
}

.mode-panel.active { display: flex; }

/* ---------- AI 生成：图片预览 ---------- */
.ai-image-preview {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ai-image-preview img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 10px;
}

.img-hint {
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.8;
}

.img-meta {
  font-size: 12px;
  color: var(--text-light);
}

.img-loading { color: var(--primary); font-size: 14px; }
.img-error { color: #dc2626; font-size: 14px; }

/* ---------- AI 生成：结果 ---------- */
.ai-loading {
  margin-top: 20px;
  padding: 16px;
  text-align: center;
  color: var(--primary-dark);
  font-weight: 600;
  background: var(--primary-light);
  border-radius: 12px;
}

.ai-result {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ai-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
}

.ai-copy {
  border: 1px solid var(--primary);
  background: var(--card-bg);
  color: var(--primary);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.ai-copy:hover { background: var(--primary-light); }

.ai-block-body {
  margin: 0;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  color: var(--text);
}

/* ---------- AI 生成：高质量模式开关 ---------- */
.ai-quality {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--primary-light);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  cursor: pointer;
}

.ai-quality input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

/* ---------- AI 生成：原始返回 ---------- */
.ai-raw {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.ai-raw > summary {
  cursor: pointer;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-light);
  list-style: none;
  user-select: none;
}

.ai-raw > summary::-webkit-details-marker { display: none; }
.ai-raw > summary:hover { color: var(--primary); }

.ai-raw pre {
  margin: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SF Mono", Consolas, monospace;
  color: var(--text-light);
  max-height: 320px;
  overflow-y: auto;
}

.ai-warn {
  color: #92400e;
  font-size: 14px;
  line-height: 1.8;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0;
}

.ai-error {
  color: #dc2626;
  font-size: 15px;
  line-height: 1.8;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 16px 18px;
}

@media (max-width: 760px) {
  .tab {
    min-width: 0;
    font-size: 13px;
    padding: 9px 10px;
  }
  .library-list {
    grid-template-columns: 1fr;
  }
  .shubi-cta {
    padding: 20px 16px;
  }
  .api-config > summary,
  .api-config-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .mode-panel {
    padding: 16px;
  }
  .ai-block-head {
    padding: 10px 14px;
    font-size: 14px;
  }
  .ai-block-body {
    padding: 14px;
    font-size: 14px;
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  padding: 24px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}

.footer-links {
  margin-top: 6px;
  display: flex;
  gap: 16px;
  justify-content: center;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 760px) {
  .hero {
    padding: 48px 0 40px;
  }
  .hero h1 {
    font-size: 30px;
  }
  /* 导航项变多了，手机上要收紧，避免挤成两行 */
  .header-inner {
    height: auto;
    min-height: 56px;
    padding: 8px 0;
    flex-wrap: wrap;
    gap: 4px;
  }
  .brand {
    font-size: 16px;
  }
  .main-nav {
    gap: 10px;
  }
  .main-nav a {
    font-size: 12.5px;
    white-space: nowrap;
  }
}

/* ============================================
 * 定制服务页（service.html）
 * --------------------------------------------
 * 内容块外壳复用 .about-section，
 * 这里只补它内部需要的网格 / 报价表 / 步骤 / FAQ 样式。
 * ============================================ */

/* ---------- 服务卡片 ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.service-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 8px;
}

.service-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.service-card p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ---------- 报价表 ---------- */
.price-list {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}

.price-row:last-child { border-bottom: none; }
.price-row:nth-child(even) { background: var(--bg); }

.price-name { color: var(--text); }

.price-val {
  color: var(--primary-dark);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- 合作流程 ---------- */
.flow-steps { margin-top: 14px; }

.flow-step {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}

.flow-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.flow-num {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-body h4 {
  font-size: 15.5px;
  margin-bottom: 4px;
}

.flow-body p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ---------- 作品清单 ---------- */
.case-list { margin-top: 10px; }

.case-list li {
  margin-bottom: 10px;
  line-height: 1.75;
}

.case-list a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.case-list a:hover { text-decoration: underline; }

/* ---------- 常见问题 ---------- */
.faq-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-q {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.faq-a {
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 0;
}

/* ---------- 底部联系块 ---------- */
.contact-block { text-align: center; }
.contact-block .donate-buttons { margin-top: 16px; }

/* ---------- 返回首页 ---------- */
.back-home {
  margin: 4px 0 28px;
  font-size: 14px;
}

.back-home a {
  color: var(--text-light);
  text-decoration: none;
}

.back-home a:hover { color: var(--primary); }

@media (max-width: 560px) {
  .price-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

/* ---------- 首页「需要定制开发的？」引导块 ---------- */
.service-promo {
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 28px;
  margin: 40px 0 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.service-promo .section-sub {
  max-width: 660px;
  margin: 0 auto 20px;
}

.service-promo-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .service-promo { padding: 26px 18px; }

  .service-promo-actions .btn { width: 100%; }
}

/* ============================================
 * 联系方式（微信二维码 + 邮箱）
 * --------------------------------------------
 * 用在 service.html 和 about.html 的联系区块。
 * 二维码图片缺失时由 onerror 给 .wechat-box 加上
 * .wechat-missing，CSS 负责把破图换成提示文字。
 * ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 20px 0 14px;
  text-align: left;
}

.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.contact-icon {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 6px;
}

.contact-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.contact-email {
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
  margin-bottom: 14px;
}

.contact-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 二维码：白底 + 内边距，保证扫码识别率 */
.wechat-qr {
  display: block;
  width: 176px;
  height: 176px;
  object-fit: contain;
  margin: 0 auto 10px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.contact-note {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 0;
}

/* 图片没上传时的降级：藏掉破图，显示提示，避免页面看起来是坏的 */
.wechat-missing-tip {
  display: none;
  font-size: 13.5px;
  color: var(--text-light);
  line-height: 1.8;
  padding: 22px 0;
  margin-bottom: 0;
}

.wechat-missing .wechat-qr { display: none; }

.wechat-missing .wechat-missing-tip { display: block; }

@media (max-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
