/* ============================================================
   在线工具箱 · 深空金色主题（与主站设计系统同源）
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg0: #04060f; --bg1: #0a1226; --bg2: #101b3a; --bg3: #1a2a52;
  --gold: #fcd34d; --gold2: #f59e0b; --ice: #9ae3ff;
  --text: #e8eeff; --muted: #8aa3d8;
  --card: rgba(255,255,255,.05); --card-hover: rgba(255,255,255,.09);
  --line: rgba(255,255,255,.08); --line-ice: rgba(154,227,255,.22);
  --ok: #34d399; --bad: #f87171;
  --radius: 16px;
}
body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text); background: var(--bg0); line-height: 1.6; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
#sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(160deg, var(--bg0) 0%, var(--bg1) 45%, var(--bg2) 78%, var(--bg3) 100%);
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ---- 头部 ---- */
.header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 26px; background: rgba(4,6,15,.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.logo { font-size: 15px; letter-spacing: 1px; color: var(--muted); }
.logo a { color: var(--gold); text-decoration: none; font-weight: 700; }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 13.5px; transition: color .2s; }
.nav a:hover { color: var(--gold); }

/* ---- Hero ---- */
.hero { max-width: 1080px; margin: 0 auto; padding: 84px 24px 30px; text-align: center; }
.hero-eyebrow { font-size: 11.5px; letter-spacing: 5px; color: var(--ice); opacity: .8; }
.hero-title { font-size: clamp(38px, 7vw, 68px); font-weight: 800; letter-spacing: 4px; margin: 12px 0 0;
  background: linear-gradient(120deg, #e8eeff, #9ae3ff 55%, #ffffff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.gold { background: linear-gradient(120deg, var(--gold), var(--gold2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: var(--muted); margin-top: 12px; font-size: 14.5px; }
.hero-live { margin-top: 20px; display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  font-size: 12.5px; color: var(--muted); padding: 8px 18px; border: 1px solid var(--line);
  border-radius: 30px; background: var(--card); font-variant-numeric: tabular-nums; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 10px rgba(52,211,153,.9); animation: pulse 1.8s infinite; }
.live-sep { opacity: .35; }
#liveClock, #liveTs { color: var(--ice); }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.65); opacity: .5; } }

/* ---- 分类胶囊 ---- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 1080px;
  margin: 26px auto 6px; padding: 0 24px; }
.chip { cursor: pointer; font: inherit; font-size: 13px; color: var(--muted); padding: 8px 18px;
  border-radius: 30px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
  transition: color .2s, background .2s, border-color .2s, transform .15s; }
.chip:hover { color: var(--text); border-color: var(--line-ice); transform: translateY(-1px); }
.chip.active { color: #3b2505; font-weight: 700; border-color: transparent;
  background: linear-gradient(135deg, var(--gold2), var(--gold)); box-shadow: 0 6px 20px rgba(245,158,11,.28); }

/* ---- 工具网格 ---- */
.tgrid { max-width: 1080px; margin: 0 auto; padding: 26px 24px 70px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 18px; align-items: start; }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  transition: transform .22s, border-color .22s, background .22s, opacity .5s; }
.tool:hover { transform: translateY(-3px); border-color: var(--line-ice); background: var(--card-hover); }
.tool.hidden { display: none; }
.tool-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.tool-ico { font-size: 20px; line-height: 1.3; }
.tool-name { font-size: 15.5px; font-weight: 600; }
.tool-desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---- 表单控件 ---- */
.field { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.field > label { font-size: 12px; color: var(--muted); min-width: 44px; }
textarea, input[type=text], input[type=number], select {
  font: inherit; font-size: 13px; color: var(--text); background: rgba(4,10,25,.6);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 78px; resize: vertical; font-family: ui-monospace, Consolas, monospace; }
input[type=number], select { width: auto; min-width: 90px; }
input:focus, textarea:focus, select:focus { border-color: var(--line-ice); box-shadow: 0 0 0 3px rgba(154,227,255,.1); outline: none; }
input[type=range] { width: 100%; accent-color: var(--gold); }
input[type=color] { width: 48px; height: 34px; padding: 2px; background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--gold); }

/* ---- 按钮 + 波纹动效 ---- */
.t-btn { position: relative; overflow: hidden; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600;
  color: #3b2505; padding: 8px 16px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  transition: transform .14s, box-shadow .2s, filter .2s; }
.t-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(245,158,11,.3); }
.t-btn:active { transform: translateY(0) scale(.98); }
.t-btn.ghost { background: rgba(255,255,255,.07); color: var(--text); border: 1px solid var(--line); }
.t-btn.ghost:hover { background: rgba(255,255,255,.12); box-shadow: none; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); opacity: .55;
  background: rgba(255,255,255,.75); animation: ripple .55s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* ---- 输出区 ---- */
.out { margin-top: 12px; background: rgba(4,10,25,.55); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px; color: var(--ice); word-break: break-all; white-space: pre-wrap;
  min-height: 40px; transition: border-color .25s, background .25s; }
.out.flash { animation: flash .5s ease-out; }
@keyframes flash { 0% { border-color: var(--gold); background: rgba(252,211,77,.12); } 100% { border-color: var(--line); } }
.out.err { color: var(--bad); }
.kvline { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.kvline span:first-child { color: var(--muted); }
.kvline b { color: var(--text); font-weight: 600; text-align: right; word-break: break-all; }
.stat-big { font-size: 26px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }

/* 密码强度条 */
.bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, #f87171, var(--gold), var(--ok)); transition: width .45s cubic-bezier(.2,.8,.2,1); }

/* 色块 */
.swatch { width: 100%; height: 54px; border-radius: 12px; border: 1px solid var(--line);
  transition: background .35s ease; }

/* 列表 */
.ul-list { margin: 10px 0 0 16px; font-size: 12.5px; color: var(--muted); }
.ul-list li { margin: 3px 0; }

.foot { text-align: center; padding: 30px 20px 46px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px; }
.foot-links a { color: var(--ice); text-decoration: none; margin: 0 6px; }
.foot-links a:hover { color: var(--gold); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 18px); opacity: 0;
  background: rgba(16,27,58,.96); border: 1px solid var(--line-ice); color: var(--text);
  padding: 11px 22px; border-radius: 30px; font-size: 13px; pointer-events: none; z-index: 99;
  transition: opacity .25s, transform .25s; backdrop-filter: blur(8px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 入场渐显 */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }

@media (max-width: 560px) {
  .header { padding: 12px 16px; }
  .nav { gap: 12px; }
  .hero { padding: 60px 16px 20px; }
  .tgrid { padding: 20px 16px 60px; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------- 工具栏：搜索 + 分类（第三轮） ---------------- */
.toolbar { max-width: 1180px; margin: 0 auto 8px; padding: 0 24px; }
.tsearch {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 54px; margin: 0 0 14px; padding: 0 16px; border-radius: 16px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.tsearch:focus-within {
  border-color: rgba(252, 211, 77, .5);
  background: rgba(252, 211, 77, .06);
  box-shadow: 0 0 0 4px rgba(252, 211, 77, .1);
}
.tsearch-ico { font-size: 19px; opacity: .5; transform: rotate(-45deg); }
.tsearch input[type="search"] {
  flex: 1; min-width: 0; border: 0; outline: none; background: none;
  color: var(--text, #e8eeff); font-size: 15px; font-family: inherit;
}
.tsearch input[type="search"]::placeholder { color: rgba(232, 238, 255, .4); }
.tsearch input[type="search"]::-webkit-search-cancel-button { display: none; }
.tsearch-kbd, .tsearch-meta kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; padding: 2px 6px; border-radius: 6px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(232, 238, 255, .6);
}
.tsearch-clear {
  width: 24px; height: 24px; border: 0; border-radius: 50%; cursor: pointer;
  font-size: 14px; line-height: 1; color: inherit; background: rgba(255, 255, 255, .1);
}
.tsearch-clear:hover { background: rgba(252, 211, 77, .28); }
.tsearch-meta { margin: 0 0 18px; font-size: 12px; opacity: .6; }
.tnone {
  max-width: 1132px; margin: 0 auto 20px; padding: 18px; text-align: center;
  border-radius: 14px; font-size: 14px; opacity: .8;
  background: rgba(255, 255, 255, .04);
  border: 1px dashed rgba(255, 255, 255, .14);
}

/* 通用两列 / 三列布局 */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 680px) { .grid2 { grid-template-columns: 1fr; } }

/* select 与 input 同款 */
.field select {
  width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 14px;
  font-family: inherit; color: inherit; outline: none; cursor: pointer;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
}
.field select:focus { border-color: rgba(252, 211, 77, .55); }

/* ---------------- Markdown 渲染 ---------------- */
.md { font-size: 14px; line-height: 1.7; }
.md h1, .md h2, .md h3, .md h4 { margin: 14px 0 8px; line-height: 1.3; }
.md h1 { font-size: 20px; } .md h2 { font-size: 18px; }
.md h3 { font-size: 16px; } .md h4 { font-size: 14px; }
.md p { margin: 8px 0; }
.md ul { margin: 8px 0; padding-left: 20px; }
.md blockquote { margin: 8px 0; padding: 6px 12px; opacity: .85; border-left: 3px solid rgba(252, 211, 77, .5); }
.md-code {
  padding: 1px 5px; border-radius: 5px; font-size: 12.5px;
  background: rgba(255, 255, 255, .1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.md-pre {
  margin: 8px 0; padding: 10px 12px; border-radius: 10px; max-height: 280px; overflow: auto;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .08);
}
.md-pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; white-space: pre-wrap; word-break: break-word;
}
.md-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.md-table th, .md-table td { padding: 6px 9px; text-align: left; border: 1px solid rgba(255, 255, 255, .12); }
.md-table th { background: rgba(255, 255, 255, .06); }

/* ---------------- diff 视图 ---------------- */
.diff-box {
  max-height: 320px; overflow: auto; padding: 8px; border-radius: 10px;
  background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; line-height: 1.6;
}
.diff-line { padding: 2px 6px; border-radius: 5px; white-space: pre-wrap; word-break: break-word; }
.diff-line.add { background: rgba(52, 211, 153, .13); color: #8ef0c4; }
.diff-line.del { background: rgba(248, 113, 113, .13); color: #fca5a5; }
.diff-line.same { opacity: .62; }
.diff-sign { display: inline-block; width: 14px; opacity: .7; }

/* ---------------- 调色板 ---------------- */
.palette { display: flex; gap: 8px; margin: 6px 0 14px; }
.palette .swatch { flex: 1; height: 46px; border-radius: 10px; cursor: pointer; transition: transform .15s ease; }
.palette .swatch:hover { transform: translateY(-2px); }

@media (max-width: 640px) {
  .tsearch { height: 50px; }
  .tsearch-kbd { display: none; }
}

/* ---- 工具详情页 ---- */
.tp { max-width: 1200px; margin: 0 auto; padding: 96px 20px 44px; }
.tp-crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.tp-crumb a { color: var(--muted); text-decoration: none; }
.tp-crumb a:hover { color: var(--gold); }
.tp-crumb span { opacity: .45; }
.tp-cur { color: var(--text); }
.tp-head { display: flex; gap: 26px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.tp-eyebrow { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--ice); margin-bottom: 8px; }
.tp-title { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin-bottom: 10px; }
.tp-lead { color: var(--muted); max-width: 62ch; font-size: 14.5px; }
.tp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tp-grid { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.tp-live { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tp-live-note { color: var(--muted); font-size: 13px; margin-top: 6px; }
.tp-live .tgrid { display: block; margin-top: 16px; }
.tp-h2 { font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.tp-privacy { margin-top: 14px; font-size: 11.5px; color: var(--muted); text-align: center; }
.tp-side { display: flex; flex-direction: column; gap: 14px; }
.tp-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.tp-card p { color: var(--muted); font-size: 13.5px; }
.tp-card-tip { border-color: rgba(252, 211, 77, .3); background: rgba(252, 211, 77, .06); }
.tp-card-tip p { color: var(--text); }
.tp-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.tp-steps li { position: relative; padding-left: 27px; margin: 9px 0; font-size: 13.5px; color: var(--muted); counter-increment: s; }
.tp-steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(252, 211, 77, .16); color: var(--gold); font-size: 11px; font-weight: 700;
  display: grid; place-items: center; }
.tp-ex { font-family: ui-monospace, Consolas, "Cascadia Mono", monospace; font-size: 12.5px; line-height: 1.7;
  background: rgba(0, 0, 0, .34); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  color: var(--ice); white-space: pre-wrap; word-break: break-word; }
.tp-rel { list-style: none; display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; }
.tp-rel a { color: var(--muted); text-decoration: none; font-size: 13px; }
.tp-rel a:hover { color: var(--gold); }
.tp-pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 36px; padding-top: 20px;
  border-top: 1px solid var(--line); font-size: 13px; }
.tp-pager a { color: var(--muted); text-decoration: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.tp-pager a:hover { color: var(--gold); border-color: rgba(252, 211, 77, .35); }
@media (max-width: 980px) {
  .tp { padding-top: 84px; }
  .tp-grid { grid-template-columns: 1fr; }
  .tp-head { align-items: flex-start; }
}


/* ---- 详情页补充：标题区 / 上一个下一个 ---- */
.tp-head-main { min-width: 0; }
.tp-pager {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(154, 227, 255, .14);
}
.tp-prev, .tp-next {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid rgba(154, 227, 255, .22);
  background: rgba(10, 18, 38, .72);
  color: var(--fg, #e6ecff); font-size: 14px; text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.tp-prev:hover, .tp-next:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 211, 77, .55);
  background: rgba(252, 211, 77, .1);
  box-shadow: 0 10px 26px -18px rgba(252, 211, 77, .8);
}
body.light .tp-prev, body.light .tp-next { background: #fff; color: #1a2340; }
.tp-pager .tp-next { margin-left: auto; }
@media (max-width: 640px) {
  .tp-prev, .tp-next { flex: 1 1 100%; justify-content: center; }
}

/* ---- 可访问性：跳转链接与焦点可见 ---- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  padding: 12px 18px; border-radius: 0 0 12px 0;
  background: var(--gold, #fcd34d); color: #0a0f1e;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible { left: 0; outline: 2px solid #0a0f1e; outline-offset: 2px; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--gold, #fcd34d);
  outline-offset: 2px;
  border-radius: 6px;
}
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---- 第十三轮：详情页复制示例 / 目录页随机按钮 ---- */
.tp-h2 .copy-ex { margin-left: 10px; vertical-align: 2px; }
.tp-ex { position: relative; }
.tiny-btn.copy-ex { font-size: 12px; padding: 3px 9px; border-radius: 999px; }

/* ---- 第十三轮：详情页「这套流程里的其他工具」 ---- */
.tp-flow-why { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }
.tp-flow-more { margin: 12px 0 0; font-size: 13.5px; }
.tp-flow-more a { color: var(--gold); }

/* ============================================================
   浅色主题（与主站同一套 token，跟随工具箱主页的开关）
   ============================================================ */
html.theme-light { color-scheme: light; }
html.theme-light body {
  --bg0: #f6f8ff; --bg1: #eef2ff; --bg2: #e3e9ff; --bg3: #d8e2ff;
  --gold: #9d470a; --gold2: #b45309; --ice: #0e7490;
  --text: #101a33; --muted: #4a5b80;
  --card: rgba(255,255,255,.82); --card-hover: #ffffff;
  --line: rgba(16,26,51,.12); --line-ice: rgba(14,116,144,.25);
  --ok: #047857; --bad: #be123c;
  background: var(--bg0); color: var(--text);
}
html.theme-light #sky {
  background: linear-gradient(160deg, #f6f8ff 0%, #eef2ff 45%, #e3e9ff 78%, #d8e2ff 100%);
}
html.theme-light .header { background: rgba(246,248,255,.86); }
html.theme-light .hero-title {
  background: linear-gradient(120deg, #101a33, #0e7490 55%, #101a33);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html.theme-light .chip,
html.theme-light .chip.active,
html.theme-light .t-btn { color: #fdf8ee; }
html.theme-light .chip { background: rgba(16,26,51,.05); color: var(--muted); }
html.theme-light .chip.active { background: var(--gold); color: #fff; }
html.theme-light .t-btn { background: var(--gold); color: #fff; }
html.theme-light .t-btn.ghost,
html.theme-light .tiny-btn { background: rgba(16,26,51,.05); color: var(--text); }
html.theme-light .field input,
html.theme-light .field textarea,
html.theme-light .field select,
html.theme-light .tsearch input,
html.theme-light .out,
html.theme-light .tool,
html.theme-light .tp-card,
html.theme-light .tp-ex,
html.theme-light .toolbar,
html.theme-light .md-pre,
html.theme-light .md-code,
html.theme-light .diff-box,
html.theme-light .tsearch,
html.theme-light .swatch {
  background: rgba(16,26,51,.04);
  border-color: rgba(16,26,51,.14);
}
html.theme-light .md-table th { background: rgba(16,26,51,.06); }
html.theme-light .md-table th, html.theme-light .md-table td { border-color: rgba(16,26,51,.14); }
html.theme-light .diff-line.add { background: rgba(4,120,87,.12); color: #065f46; }
html.theme-light .diff-line.del { background: rgba(190,18,60,.12); color: #9f1239; }
html.theme-light .bar { background: rgba(16,26,51,.1); }
html.theme-light .ripple { background: rgba(16,26,51,.16); }
html.theme-light .out.err { color: #9f1239; }
html.theme-light .tp-prev, html.theme-light .tp-next { background: rgba(16,26,51,.04); color: var(--text); }
.theme-btn {
  background: none; border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  font: inherit; font-size: 13px; line-height: 1; padding: 7px 10px; border-radius: 10px;
  transition: color .2s, border-color .2s, background .2s;
}
.theme-btn:hover { color: var(--gold); border-color: var(--line-ice); background: var(--card-hover); }

/* ---- 快速跳转 ---- */
.qj-btn { font-size: 15px; padding: 5px 9px; }
.qj-scrim {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start;
  justify-content: center; padding: 12vh 16px 16px; background: rgba(4, 6, 15, .62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.qj-box {
  width: min(560px, 100%); background: var(--bg1); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, .45); overflow: hidden;
}
.qj-input {
  width: 100%; border: none; border-bottom: 1px solid var(--line); background: transparent;
  color: var(--text); font: inherit; font-size: 15px; padding: 15px 18px; outline: none;
}
.qj-list { max-height: 46vh; overflow-y: auto; }
.qj-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px;
  color: var(--text); text-decoration: none; font-size: 14px;
}
.qj-item[aria-selected="true"] { background: var(--card-hover); }
.qj-ico { width: 20px; text-align: center; }
.qj-name { flex: 1; }
.qj-cat { font-size: 11.5px; color: var(--muted); font-family: var(--mono, monospace); }
.qj-empty { padding: 18px; color: var(--muted); font-size: 13.5px; }
.qj-foot {
  display: flex; gap: 16px; padding: 9px 18px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
html.theme-light .qj-scrim { background: rgba(246, 248, 255, .72); }
html.theme-light .qj-box { background: #fff; }
