/* ==========================================================================
   1015 工具箱 —— 设计系统
   浅色为主 + 暗色可切换；单一强调色；靠留白与层级而不是阴影堆叠
   ========================================================================== */

:root {
  --bg: #f5f6f8;
  --bg-elev: #ffffff;
  --bg-soft: #f1f3f6;
  --bg-code: #f6f7f9;
  --border: #e6e8ec;
  --border-strong: #d5d9e0;

  --text: #16181d;
  --text-2: #5a6272;
  --text-3: #8d95a3;

  --brand: #2f6df6;
  --brand-hover: #2359d8;
  --brand-ink: #1d4ed8;
  --brand-weak: #ecf2ff;
  --brand-line: #c9dbff;

  --ok: #0f9d58;
  --ok-weak: #e7f6ee;
  --warn: #d98200;
  --warn-weak: #fdf3e0;
  --danger: #dc3545;
  --danger-weak: #fdecee;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 10px 28px -14px rgba(16, 24, 40, .14);
  --shadow-lg: 0 20px 48px -20px rgba(16, 24, 40, .28);

  --mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", Roboto, sans-serif;

  --header-h: 62px;
  --maxw: 1180px;
}

[data-theme="dark"] {
  --bg: #0e1014;
  --bg-elev: #171a21;
  --bg-soft: #1d2129;
  --bg-code: #1a1e26;
  --border: #272c36;
  --border-strong: #363d49;

  --text: #e9ebef;
  --text-2: #a5adba;
  --text-3: #78808e;

  --brand: #4d8dff;
  --brand-hover: #6ba0ff;
  --brand-ink: #9dbcff;
  --brand-weak: #182338;
  --brand-line: #2b4066;

  --ok: #3ecf8e;
  --ok-weak: #14291f;
  --warn: #e0a63c;
  --warn-weak: #2b2313;
  --danger: #ff6b74;
  --danger-weak: #2e1a1d;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .7);
  --shadow-lg: 0 24px 56px -24px rgba(0, 0, 0, .8);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0; }

img { max-width: 100%; display: block; }

/* 被 JS 关掉的元素必须真的消失（hidden 属性特异性太低，会被带 class 的 display 盖掉） */
[hidden] { display: none !important; }

::selection { background: var(--brand-weak); color: var(--brand-ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { height: 100%; display: flex; align-items: center; gap: 14px; }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; color: var(--text); letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand .logo {
  width: 30px; height: 30px; flex: none;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--brand), #7aa2ff);
  color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; letter-spacing: -.04em;
  box-shadow: 0 4px 12px -4px rgba(47, 109, 246, .38);
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--brand) 60%, transparent);
}

.nav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.nav a {
  padding: 7px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: background .14s, color .14s;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a.on { color: var(--brand); background: var(--brand-weak); }

/* 移动端顶部导航（桌面隐藏） */
.nav-m { display: none; margin-left: 2px; align-items: center; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.nav-m::-webkit-scrollbar { display: none; }
.nav-m a { padding: 6px 10px; border-radius: 999px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.nav-m a:hover { background: var(--bg-soft); color: var(--text); }
.nav-m a.on { color: var(--brand); background: var(--brand-weak); }

.topbar .spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--text-2);
  cursor: pointer; transition: .14s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-soft); }
.icon-btn svg { width: 17px; height: 17px; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--brand-weak); color: var(--brand-ink);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  border: 1px solid var(--brand-line);
}

/* 用户下拉 */
.user-menu { position: relative; }
.user-menu .trigger { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 6px 3px 3px; border-radius: 999px; border: 1px solid transparent; background: none; font: inherit; color: var(--text); }
.user-menu .trigger:hover { background: var(--bg-soft); border-color: var(--border); }
.user-menu .trigger .uname { font-size: 14px; font-weight: 500; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 172px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px; z-index: 70;
}
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border: 0; background: none; cursor: pointer;
  border-radius: var(--radius-sm); color: var(--text-2);
  font: inherit; font-size: 14px; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--bg-soft); color: var(--text); }
.dropdown .sep { height: 1px; background: var(--border); margin: 5px 4px; }
.dropdown svg { width: 15px; height: 15px; flex: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: .14s; white-space: nowrap;
}
.btn:hover { background: var(--bg-soft); border-color: var(--text-3); color: var(--text); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }

.btn-danger { background: var(--danger-weak); border-color: #f2c8cd; color: var(--danger); }
.btn-danger:hover { background: #fbdfe3; border-color: #e7b0b7; color: var(--danger); }

.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }

input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--text);
  font: inherit; font-size: 14px; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 109, 246, .16);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
textarea { resize: vertical; line-height: 1.6; font-family: var(--mono); font-size: 13.5px; min-height: 120px; }
input::placeholder, textarea::placeholder { color: var(--text-3); }

.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: 13px; cursor: pointer; color: var(--text-2); background: var(--bg-elev);
  transition: .14s; user-select: none;
}
.radio-row label:hover { border-color: var(--text-3); }
.radio-row input { display: none; }
.radio-row input:checked + span { color: var(--brand); }
.radio-row label:has(input:checked) { border-color: var(--brand); background: var(--brand-weak); }

.check-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.check-row label { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.check-row input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

/* ---------- 卡片 / 面板 ---------- */
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.panel { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-elev);
}
.panel-head .title { font-size: 14px; font-weight: 600; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px; }

/* 工具页左右两栏 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.split.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ---------- 首页 ---------- */
.hero { padding: 56px 0 34px; text-align: center; }
.hero h1 { font-size: 38px; letter-spacing: -.03em; }
.hero .sub { margin-top: 12px; color: var(--text-2); font-size: 15.5px; }
.hero .stats { margin-top: 14px; display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; }
.hero .stats b { color: var(--text); font-weight: 600; }

.searchbar { max-width: 620px; margin: 26px auto 0; position: relative; }
.searchbar svg.mag { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.searchbar input {
  height: 50px; padding-left: 44px; padding-right: 108px;
  border-radius: 999px; font-size: 15px;
  box-shadow: var(--shadow);
}
.searchbar .go {
  position: absolute; right: 6px; top: 6px; bottom: 6px;
  padding: 0 20px; border-radius: 999px; border: 0;
  background: var(--brand); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.searchbar .go:hover { background: var(--brand-hover); }

.catbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.catbar a {
  padding: 6px 14px; border-radius: 999px; font-size: 13.5px;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-2);
}
.catbar a:hover { border-color: var(--border-strong); color: var(--text); }

.section { padding: 8px 0 40px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 16px; }
.section-head h2 { font-size: 18px; }
.section-head .count { color: var(--text-3); font-size: 13px; }
.section-head .line { flex: 1; height: 1px; background: var(--border); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 14px; }

.tool-card {
  display: flex; gap: 13px; padding: 16px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); transition: .16s; position: relative;
}
.tool-card:hover {
  color: var(--text); border-color: var(--brand-line);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.tool-card .ico {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  background: var(--brand-weak); color: var(--brand);
  display: grid; place-items: center;
}
.tool-card .ico svg { width: 19px; height: 19px; }
.tool-card .meta { min-width: 0; }
.tool-card .nm { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.tool-card .ds { margin-top: 3px; font-size: 12.8px; color: var(--text-2); line-height: 1.55; }
.tool-card .tag {
  font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px;
  background: var(--bg-soft); color: var(--text-3); border: 1px solid var(--border);
}
.tool-card .tag.hot { background: var(--warn-weak); color: var(--warn); border-color: transparent; }

/* ---------- 工具页 ---------- */
.crumb { display: flex; align-items: center; gap: 7px; color: var(--text-3); font-size: 13px; padding: 20px 0 0; }
.crumb a { color: var(--text-3); }
.crumb a:hover { color: var(--brand); }
.crumb .sep { opacity: .6; }

.tool-head { display: flex; align-items: flex-start; gap: 16px; padding: 16px 0 22px; flex-wrap: wrap; }
.tool-head .ico {
  width: 50px; height: 50px; flex: none; border-radius: 14px;
  background: var(--brand-weak); color: var(--brand);
  display: grid; place-items: center;
}
.tool-head .ico svg { width: 25px; height: 25px; }
.tool-head h1 { font-size: 24px; }
.tool-head .ds { margin-top: 5px; color: var(--text-2); font-size: 14px; }
.tool-head .acts { margin-left: auto; display: flex; gap: 8px; }

.tool-body { padding-bottom: 46px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar .spacer { flex: 1; }

textarea.code, .out {
  font-family: var(--mono); font-size: 13px; line-height: 1.65;
  background: var(--bg-code); tab-size: 2;
}
.out {
  min-height: 120px; padding: 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-all;
  overflow: auto; color: var(--text);
}
.out.tall { min-height: 220px; }
.out.center { display: grid; place-items: center; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.stat {
  padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elev);
}
.stat .k { font-size: 12px; color: var(--text-3); }
.stat .v { font-size: 21px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.kv { display: grid; grid-template-columns: 118px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; word-break: break-all; font-family: var(--mono); font-size: 13px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.st-wait  { background: var(--bg-soft); color: var(--text-3); }
.st-accept{ background: var(--brand-weak); color: var(--brand-ink); }
.st-doing { background: var(--warn-weak); color: var(--warn); }
.st-done  { background: var(--ok-weak); color: var(--ok); }
.st-no    { background: var(--danger-weak); color: var(--danger); }
/* 审核态：待审核用实心蓝跳出来；已驳回用描边，跟「暂不考虑」的实心红区分开 */
.st-audit { background: var(--brand); color: #fff; }
.st-reject{ background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px rgba(220, 53, 69, .4); }

.note {
  padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px;
  background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--border);
}
.note.info { background: var(--brand-weak); border-color: var(--brand-line); color: var(--brand-ink); }
.note.warn { background: var(--warn-weak); border-color: transparent; color: var(--warn); }
.note.err  { background: var(--danger-weak); border-color: transparent; color: var(--danger); }

/* 差异高亮 */
.diff-line { display: flex; gap: 10px; padding: 0 10px; font-family: var(--mono); font-size: 12.8px; line-height: 1.75; white-space: pre-wrap; word-break: break-all; }
.diff-line .ln { flex: none; width: 34px; text-align: right; color: var(--text-3); user-select: none; font-variant-numeric: tabular-nums; }
.diff-line.add { background: rgba(15, 157, 88, .11); background: color-mix(in srgb, var(--ok) 11%, transparent); }
.diff-line.del { background: rgba(220, 53, 69, .11); background: color-mix(in srgb, var(--danger) 11%, transparent); }
.diff-line .txt { flex: 1; min-width: 0; }
.diff-line ins { background: rgba(15, 157, 88, .3); background: color-mix(in srgb, var(--ok) 30%, transparent); text-decoration: none; border-radius: 2px; }
.diff-line del { background: rgba(220, 53, 69, .28); background: color-mix(in srgb, var(--danger) 28%, transparent); text-decoration: line-through; border-radius: 2px; }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { color: var(--text-3); font-weight: 500; font-size: 12.5px; background: var(--bg-soft); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl code { font-family: var(--mono); font-size: 12.5px; background: var(--bg-code); padding: 1px 5px; border-radius: 4px; }

/* ---------- 认证页 ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h) - 120px); display: grid; place-items: center; padding: 44px 20px; }
.auth-card { width: 100%; max-width: 400px; padding: 30px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 21px; }
.auth-card .sub { margin-top: 6px; color: var(--text-2); font-size: 13.5px; }
.auth-card form { margin-top: 22px; }
.auth-foot { margin-top: 16px; text-align: center; font-size: 13.5px; color: var(--text-2); }

/* ---------- 需求广场 ---------- */
.fb-item { padding: 16px; border-bottom: 1px solid var(--border); display: flex; gap: 14px; }
.fb-item:last-child { border-bottom: 0; }
.vote {
  flex: none; width: 56px; padding: 8px 0; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text-2);
  cursor: pointer; font: inherit; display: grid; place-items: center; gap: 1px; transition: .14s;
}
.vote:hover { border-color: var(--brand); color: var(--brand); }
.vote.on { background: var(--brand-weak); border-color: var(--brand); color: var(--brand-ink); }
.vote .n { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.vote .t { font-size: 11px; }
.fb-body { min-width: 0; flex: 1; }
.fb-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-txt { margin-top: 6px; color: var(--text-2); font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.fb-meta { margin-top: 9px; display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-3); font-size: 12.5px; }
.fb-reply { margin-top: 9px; padding: 9px 11px; border-radius: var(--radius-sm); background: var(--brand-weak); border: 1px solid var(--brand-line); font-size: 13px; color: var(--brand-ink); }

/* 「我提交的」——本人还没通过审核的需求，只有自己看得到 */
.fb-mine-list { border-top: 0; }
.fb-mine { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.fb-mine:last-child { border-bottom: 0; }
.fb-mine-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-mine-c, .fb-mine-d { font-size: 12.5px; white-space: nowrap; }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 22px 0; }
.pager a, .pager span {
  min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev);
  color: var(--text-2); font-size: 13.5px;
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .cur { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .off { opacity: .45; pointer-events: none; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-elev); margin-top: 30px; }
.footer .wrap { padding: 26px 20px; }
.footer .cols { display: flex; flex-wrap: wrap; gap: 22px 40px; justify-content: space-between; align-items: flex-start; }
.footer .fname { font-weight: 700; font-size: 14px; }
.footer .fdesc { margin-top: 6px; color: var(--text-3); font-size: 12.5px; max-width: 420px; line-height: 1.7; }
.footer .links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.footer .links a { color: var(--text-2); }
.footer .links a:hover { color: var(--brand); }
.footer .fh-t { font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.footer .copy { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer .beian { display: inline-flex; gap: 14px; flex-wrap: wrap; }
.footer .beian a { color: var(--text-3); }
.footer .beian a:hover { color: var(--brand); }

/* ---------- 代码片段（错误页等） ---------- */
.codeblock {
  display: inline-block;
  margin: 14px 0 4px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  text-align: left;
  overflow-x: auto;
  max-width: 100%;
}

/* ---------- 工具页正文（给搜索引擎看的内容区） ---------- */
.seo-body { max-width: 880px; }
.seo-body section + section { margin-top: 26px; }
.seo-body h2 { font-size: 16.5px; font-weight: 600; margin-bottom: 10px; }
.seo-body p { color: var(--text-2); font-size: 14px; line-height: 1.9; }
.seo-list { margin: 0; padding-left: 21px; color: var(--text-2); font-size: 14px; line-height: 1.9; }
.seo-list li + li { margin-top: 5px; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  padding: 14px 17px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border);
}
.faq-item h3 { font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.faq-item p { font-size: 13.5px; line-height: 1.85; color: var(--text-2); }

/* ---------- 提示条 ---------- */
.toast-host { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 10px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  background: #16181d; color: #fff; box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease-out; max-width: 88vw; text-align: center;
}
[data-theme="dark"] .toast { background: #f1f3f6; color: #16181d; }
[data-theme="dark"] .topbar { background: rgba(23, 26, 33, .9); }
.toast.ok { background: var(--ok); color: #fff; }
.toast.err { background: var(--danger); color: #fff; }
.toast.out { animation: toastOut .2s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- 404 ---------- */
.errpage { text-align: center; padding: 90px 20px; }
.errpage .code { font-size: 76px; font-weight: 800; letter-spacing: -.05em; color: var(--brand); line-height: 1; }
.errpage h2 { margin-top: 14px; font-size: 20px; }
.errpage p { margin-top: 10px; color: var(--text-2); }
.errpage .acts { margin-top: 26px; display: flex; gap: 10px; justify-content: center; }

/* ---------- 杂项 ---------- */
.mono { font-family: var(--mono); }
.muted { color: var(--text-3); }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.scroll-y { max-height: 300px; overflow-y: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .split, .split.cols-3, .row2 { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .hero { padding: 34px 0 22px; }
  .hero h1 { font-size: 26px; }
  .hero .sub { font-size: 14px; }
  .searchbar input { height: 46px; font-size: 14.5px; padding-right: 92px; }
  .searchbar .go { padding: 0 15px; font-size: 13.5px; }
  .nav { display: none; }
  .topbar .nav-m { display: flex; }
  .topbar .wrap { gap: 8px; }
  .brand .bt { display: none; }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .tool-card { padding: 14px; }
  .tool-head h1 { font-size: 20px; }
  .tool-head .acts { margin-left: 0; width: 100%; }
  .kv { grid-template-columns: 92px 1fr; }
  .toolbar { gap: 6px; }
  .toolbar .btn { padding: 7px 12px; font-size: 13px; }
  .fb-item { gap: 10px; padding: 14px 0; }
  .vote { width: 48px; }
  .footer .cols { flex-direction: column; }
  .panel-body { padding: 13px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 23px; }
  .tool-card .ds { font-size: 12.5px; }
}
