/* ============================================================
   D-Tool 设计系统 —— 黑白灰 · 纯色 · 简洁 · 高性能
   色阶基于 zinc 灰度，全部交互仅使用 color/bg/border 过渡（0.15s）
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-muted: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #a1a1aa;
  --accent: #18181b;
  --accent-hover: #3f3f46;
  --accent-text: #ffffff;
  --ring: rgba(24, 24, 27, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 60px;
  --font-sans: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC",
    "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --bg-soft: #17171a;
    --bg-muted: #1e1e21;
    --border: #2a2a2e;
    --border-strong: #3f3f46;
    --text: #e7e7ea;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    --accent: #e7e7ea;
    --accent-hover: #ffffff;
    --accent-text: #111113;
    --ring: rgba(255, 255, 255, 0.12);
    color-scheme: dark;
  }
}

/* ---------- Reset / 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}
img, svg, canvas, video { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; }
::selection { background: var(--text); color: var(--bg); }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* ---------- 布局工具 ---------- */
.container { max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.wrap { max-width: 900px; margin-inline: auto; padding-inline: 20px; }
.site-main { min-height: 60vh; }
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--text); color: var(--bg);
  padding: 8px 14px; border-radius: 0 0 6px 0; z-index: 99;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; min-width: 0; }
.logo:hover { text-decoration: none; }
.logo-img { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; flex-shrink: 0; }
.logo-text { white-space: nowrap; }
.logo-sub { color: var(--text-3); font-size: 13.5px; font-weight: 400; margin-left: 1px; white-space: nowrap; }
.site-nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  padding: 6px 11px; border-radius: 6px; font-size: 14px;
  color: var(--text-2); white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.site-nav a:hover { color: var(--text); background: var(--bg-muted); text-decoration: none; }

/* ---------- 首页 Hero ---------- */
.hero { padding: 64px 0 36px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); font-weight: 800; }
.hero .lead { max-width: 660px; margin: 14px auto 0; color: var(--text-2); font-size: 16px; }
.hero .search { max-width: 560px; margin: 30px auto 0; position: relative; }
.hero .search input { padding: 12px 60px 12px 16px; font-size: 16px; }
.kbd-hint {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3);
  border: 1px solid var(--border-strong); border-radius: 4px;
  padding: 1px 7px; background: var(--bg-soft); pointer-events: none;
}
.home-copy { max-width: 760px; margin: 44px auto 0; text-align: left; color: var(--text-2); font-size: 14.5px; }
.home-copy h2 { font-size: 16px; color: var(--text); margin-bottom: 10px; }
.home-copy p { margin-bottom: 10px; }

/* ---------- 首页分区与卡片 ---------- */
.home-section { padding: 10px 0 44px; scroll-margin-top: calc(var(--header-h) + 12px); }
.home-section h2 { font-size: 20px; display: flex; align-items: baseline; gap: 10px; }
.home-section h2 .count { font-size: 13.5px; color: var(--text-3); font-weight: 400; }
.home-section > p { color: var(--text-2); font-size: 14px; margin: 4px 0 18px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 13px; }
.tool-card {
  display: block; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px; background: var(--bg);
  transition: border-color .15s, background-color .15s;
}
.tool-card:hover { border-color: var(--border-strong); background: var(--bg-soft); text-decoration: none; }
.tool-card h3 { font-size: 15.5px; margin-bottom: 5px; }
.tool-card p { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 面包屑 ---------- */
.crumbs { margin: 26px 0 2px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; padding: 0; font-size: 13.5px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--text); }
.crumb-sep { color: var(--text-3); }
.crumb-current { color: var(--text-2); }

/* ---------- 工具页 ---------- */
.tool-head { padding: 18px 0 26px; }
.tool-head h1 { font-size: 28px; font-weight: 800; }
.tool-desc { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.tool-privacy { margin-top: 8px; font-size: 13.5px; color: var(--text-3); display: flex; align-items: center; gap: 7px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }

.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); padding: 22px; margin-bottom: 16px; }
.panel-title { font-size: 14px; font-weight: 600; margin-bottom: 14px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label, .field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
input[type="text"], input[type="url"], input[type="number"], input[type="search"],
input[type="datetime-local"], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 9px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--text-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--ring);
}
textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
select { width: auto; min-width: 130px; max-width: 100%; min-width: 0; }
.row .field { min-width: 0; }
.row select, .row input { min-width: 0; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.mono { font-family: var(--font-mono); font-size: 13.5px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; font-weight: 600; padding: 9px 16px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--accent); color: var(--accent-text);
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-muted); border-color: var(--text-3); }
.btn-sm { padding: 5px 11px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-danger { border-color: var(--border-strong); color: var(--text-2); background: var(--bg); }

/* ---------- 分段控件 / 工具条 ---------- */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.seg button {
  font-size: 13.5px; font-weight: 500; padding: 7px 15px; border: none;
  background: transparent; color: var(--text-2); cursor: pointer;
  border-left: 1px solid var(--border);
  transition: background-color .15s, color .15s;
}
.seg button:first-child { border-left: none; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.seg button:hover:not([aria-pressed="true"]) { color: var(--text); background: var(--bg-muted); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }

/* ---------- 输出区 ---------- */
.output { position: relative; margin-top: 14px; }
.output-label { font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.output textarea, .output pre {
  width: 100%; background: var(--bg-muted); border: 1px solid var(--border);
  color: var(--text);
}
.output pre { padding: 12px 14px; overflow: auto; max-height: 420px; white-space: pre-wrap; word-break: break-all; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; }
.output textarea { color: var(--text); }

/* ---------- 提示 / 空态 ---------- */
.note {
  background: var(--bg-muted); border-left: 3px solid var(--text);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px; font-size: 13.5px; color: var(--text-2); margin: 12px 0;
}
.empty { text-align: center; color: var(--text-3); font-size: 14px; padding: 26px 0; }
.warn { color: var(--text-2); font-size: 13.5px; background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 10px; }

/* ---------- 数据表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-soft);
  white-space: nowrap;
}
table.data td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--bg-soft); }
table.data td code { font-family: var(--font-mono); font-size: 12.5px; background: var(--bg-muted); border-radius: 4px; padding: 1px 6px; }

/* ---------- 代码 ---------- */
code { font-family: var(--font-mono); font-size: 0.92em; background: var(--bg-muted); border-radius: 4px; padding: 1px 5px; }
pre { font-family: var(--font-mono); font-size: 13.5px; background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; margin: 0; }
pre code { background: none; padding: 0; }

/* ---------- FAQ / 使用说明 ---------- */
.faq-section { margin-top: 44px; }
.faq-section h2, .usage-section h2 { font-size: 20px; margin-bottom: 16px; }
.faq { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--bg); }
.faq summary {
  cursor: pointer; padding: 13px 16px; font-weight: 600; font-size: 14.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--text-3); font-size: 17px; }
.faq[open] summary::after { content: "−"; }
.faq-a { padding: 0 16px 15px; color: var(--text-2); font-size: 14px; }
.faq-a p { margin-bottom: 8px; }
.faq-a ul { padding-left: 1.3em; margin-bottom: 8px; }
.usage-section { margin-top: 36px; }
.usage-section ul, .usage-section ol { padding-left: 1.4em; color: var(--text-2); font-size: 14.5px; }
.usage-section li { margin-bottom: 6px; }

/* ---------- 文本对比 ---------- */
.diff-stats { font-size: 13.5px; color: var(--text-2); margin-bottom: 10px; }
.diff { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.drow { display: flex; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; }
.dno {
  flex: 0 0 44px; text-align: right; padding: 0 10px; color: var(--text-3);
  background: var(--bg-soft); border-right: 1px solid var(--border); user-select: none;
}
.dtxt { padding: 0 12px; white-space: pre-wrap; word-break: break-all; flex: 1; }
.drow.del { background: var(--bg-muted); }
.drow.del .dtxt { color: var(--text-3); text-decoration: line-through; }
.drow.add .dtxt { font-weight: 700; box-shadow: inset 2px 0 0 var(--text); }

/* ---------- 图片裁剪 ---------- */
.crop-stage { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-muted); touch-action: none; user-select: none; }
.crop-stage canvas { display: block; }
.crop-box {
  position: absolute; border: 1.5px solid var(--text); cursor: move;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 9999px rgba(24, 24, 27, 0.45);
}
.crop-handle {
  position: absolute; width: 12px; height: 12px; border: 1.5px solid var(--bg);
  background: var(--text); border-radius: 2px; cursor: nwse-resize;
}
.crop-handle-0 { left: -6px; top: -6px; }
.crop-handle-1 { right: -6px; top: -6px; cursor: nesw-resize; }
.crop-handle-2 { left: -6px; bottom: -6px; cursor: nesw-resize; }
.crop-handle-3 { right: -6px; bottom: -6px; }

/* ---------- 在线计算器 ---------- */
.calc-wrap { max-width: 360px; margin-inline: auto; }
.calc-wrap input {
  font-size: 28px; font-weight: 700; text-align: right;
  margin-bottom: 10px; background: var(--bg-muted); border-color: var(--border);
}
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-key { padding: 14px 0; font-size: 17px; font-weight: 600; }
.calc-eq { background: var(--text); }
.calc-eq:hover { background: var(--accent-hover); }

/* ---------- 渐变 / 阴影生成器 ---------- */
.grad-preview { height: 140px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.shadow-stage {
  height: 200px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; background:
    repeating-conic-gradient(var(--bg-muted) 0% 25%, var(--bg) 0% 50%) 0 0 / 20px 20px;
}
.shadow-box {
  width: 120px; height: 120px; border-radius: 12px; background: var(--text);
}
#tt-voice { max-width: 100%; text-overflow: ellipsis; }

/* ---------- 反馈按钮（右侧边缘垂直居中） ---------- */
.feedback-btn {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  z-index: 60; writing-mode: vertical-rl; letter-spacing: 0.25em;
  padding: 14px 8px; font-size: 14px; font-weight: 600;
  background: var(--text); color: var(--bg);
  border-radius: 8px 0 0 8px;
  transition: background-color .15s;
}
.feedback-btn:hover { background: var(--accent-hover); text-decoration: none; }

/* ---------- GitHub 卡片 ---------- */
.github-card {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 18px; margin: 6px 0 4px;
  transition: border-color .15s, background-color .15s;
}
.github-card:hover { border-color: var(--border-strong); background: var(--bg-soft); text-decoration: none; }
.gh-icon { flex-shrink: 0; }
.gh-icon svg { width: 40px; height: 40px; fill: var(--text); }
.gh-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gh-name { font-weight: 700; font-size: 15.5px; }
.gh-desc { font-size: 13.5px; color: var(--text-2); }
.gh-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.gh-stat { display: inline-flex; align-items: center; gap: 4px; }
.gh-stat b { font-variant-numeric: tabular-nums; }

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; background: var(--bg-soft); min-width: 0; }
.stat .num { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .lbl { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* ---------- 命名转换 ---------- */
.case-box { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.case-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.case-row:last-child { border-bottom: none; }
.case-row .cname { flex: 0 0 118px; font-size: 13.5px; color: var(--text-2); }
.case-row code { flex: 1; word-break: break-all; }

/* ---------- 密码生成 ---------- */
.pw-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 8px; background: var(--bg-soft); font-family: var(--font-mono); font-size: 13.5px;
}
.pw-item code { flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-all; }
.pw-item .btn { flex-shrink: 0; }
.strength-row { margin-top: 14px; }
.strength-row .lbl { font-size: 13.5px; color: var(--text-2); }
.strength-bar { height: 6px; background: var(--bg-muted); border: 1px solid var(--border); border-radius: 3px; overflow: hidden; margin-top: 7px; }
.strength-bar i { display: block; height: 100%; background: var(--text); width: 0; transition: width .2s; }

/* ---------- 颜色 / 二维码 / 图片 ---------- */
.swatch-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.swatch-box { width: 66px; height: 66px; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.swatch-meta { font-family: var(--font-mono); font-size: 13.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 3px; }
.qr-box {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 22px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.qr-box canvas { border: 8px solid #fff; border-radius: 4px; background: #fff; }
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm);
  padding: 30px 16px; text-align: center; color: var(--text-2); font-size: 14px;
  cursor: pointer; background: var(--bg-soft);
  transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--text); background: var(--bg-muted); }
.dropzone small { display: block; margin-top: 6px; color: var(--text-3); }
.preview-img { max-height: 260px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 12px; }
.img-meta { font-size: 13.5px; color: var(--text-2); margin-top: 10px; }

/* ---------- Markdown 预览 ---------- */
.md-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.md-grid textarea { min-height: 320px; }
.md-body { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; min-height: 320px; overflow-wrap: break-word; background: var(--bg); }
.md-body h1 { font-size: 1.5em; margin: .8em 0 .45em; }
.md-body h2 { font-size: 1.28em; margin: .8em 0 .45em; }
.md-body h3 { font-size: 1.1em; margin: .8em 0 .45em; }
.md-body p { margin: 0 0 1em; }
.md-body ul, .md-body ol { padding-left: 1.4em; margin: 0 0 1em; }
.md-body blockquote { border-left: 3px solid var(--border-strong); padding-left: 13px; color: var(--text-2); margin: 0 0 1em; }
.md-body pre { margin: 0 0 1em; }
.md-body table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: 14px; }
.md-body th, .md-body td { border: 1px solid var(--border); padding: 6px 11px; text-align: left; }
.md-body th { background: var(--bg-soft); }
.md-body hr { border: none; border-top: 1px solid var(--border); margin: 1.4em 0; }
.md-body a { text-decoration: underline; }

/* ---------- 提示浮层 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 12px);
  background: var(--text); color: var(--bg); font-size: 13.5px;
  padding: 9px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; max-width: 1120px; margin-inline: auto; padding: 42px 20px 26px; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.footer-logo-img { width: 24px; height: 24px; border-radius: 5px; object-fit: contain; }
.footer-brand p { margin-top: 12px; font-size: 13.5px; color: var(--text-2); max-width: 330px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h3 { font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.footer-col a { font-size: 14px; color: var(--text-2); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1120px; margin-inline: auto; padding: 15px 20px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 12.5px; color: var(--text-3);
}
.footer-bottom a.beian { color: var(--text-3); overflow-wrap: anywhere; }
.footer-bottom a.beian:hover { color: var(--text); }

/* ---------- 通用页（关于/隐私/404） ---------- */
.prose { max-width: 720px; margin-inline: auto; padding: 40px 20px 60px; }
.prose h1 { font-size: 27px; margin-bottom: 10px; }
.prose .lead { color: var(--text-2); font-size: 15px; margin-bottom: 24px; }
.prose h2 { font-size: 18px; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--text-2); font-size: 15px; margin-bottom: 10px; }
.prose ul { padding-left: 1.4em; margin-bottom: 14px; }
.notfound { text-align: center; padding: 100px 20px; }
.notfound h1 { font-size: 68px; font-weight: 800; letter-spacing: -0.04em; }
.notfound p { color: var(--text-2); margin: 12px 0 26px; }

/* ---------- 通用工具类 ---------- */
.hidden { display: none !important; }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1; }
.w-xs { width: 96px; }
.w-sm { width: 140px; }
.w-md { width: 210px; }
.max-h { max-height: 400px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .site-nav a { padding: 7px 10px; }
}

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 8px 16px; gap: 0; row-gap: 2px; }
  .logo { font-size: 17px; }
  .logo-sub { display: none; }
  .feedback-btn { display: none; }
  .site-nav {
    width: 100%; margin-left: 0; order: 2;
    flex-wrap: wrap; overflow-x: visible;
    padding: 4px 0 6px; margin-inline: -16px;
    padding-inline: 16px;
  }
  .site-nav a { font-size: 13.5px; padding: 7px 11px; }
  .hero { padding: 36px 0 24px; }
  .hero h1 { font-size: 26px; }
  .hero .lead { font-size: 14.5px; margin-top: 10px; }
  .hero .search { margin-top: 22px; }
  .tool-head { padding: 14px 0 20px; }
  .tool-head h1 { font-size: 22px; }
  .tool-desc { font-size: 14px; }
  .kbd-hint { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
  .case-row .cname { flex-basis: 88px; }
  .panel { padding: 16px; }
  .wrap { padding-inline: 16px; }
  .crumbs { margin-top: 16px; }
  .md-grid { grid-template-columns: 1fr; }
  .btn { padding: 10px 16px; }
  .btn-sm { padding: 7px 12px; }
  .seg button { padding: 8px 13px; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
  .home-section { padding: 8px 0 36px; }
  .home-copy { margin-top: 32px; }
}

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