/* ============================================================
 * 趣味撞色（Playful Pop）设计系统 · neo-brutalism
 * 默认浅色 · html.dark 为夜间霓虹模式 · 功能与布局结构保持不变
 * ============================================================ */

/* ---- 浅色（默认）---- */
:root {
  --bg: #faf7ff;
  --bg-elev: #ffffff;
  --bg-panel: #ffffff;
  --bg-input: #fffcf0;
  --border: #1a1a1a;
  --border-light: #4a4a4a;
  --text: #1a1a1a;
  --text-dim: #4a4a4a;
  --text-faint: #8c8c99;
  --accent: #ffd93d;
  --accent-hover: #f2c811;
  --accent-soft: #fff8d6;
  --accent-softer: #fffceb;
  --pink: #ff6b9d;
  --blue: #4d96ff;
  --green: #16a34a;
  --red: #e11d48;
  --orange: #c2680b;
  --purple: #9333ea;
  --cyan: #0284c7;
  --bd: 2px solid var(--border);
  --shadow: 4px 4px 0 var(--border);
  --shadow-hover: 6px 6px 0 var(--border);
  --shadow-sm: 2px 2px 0 var(--border);
  --radius: 12px;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

/* ---- 深色夜间（纯黑底 · 中性灰硬边 + 明黄点缀，无霓虹）---- */
html.dark {
  --bg: #000000;
  --bg-elev: #0f0f0f;
  --bg-panel: #141414;
  --bg-input: #0a0a0a;
  --border: #3a3a3a;
  --border-light: #555555;
  --text: #f2f2f2;
  --text-dim: #a8a8a8;
  --text-faint: #737373;
  --accent: #ffd93d;
  --accent-hover: #ffe566;
  --accent-soft: rgba(255, 217, 61, 0.14);
  --accent-softer: rgba(255, 217, 61, 0.07);
  --pink: #ff6b9d;
  --blue: #5b9cf6;
  --green: #34d399;
  --red: #fb7185;
  --orange: #fbbf24;
  --purple: #c084fc;
  --cyan: #38bdf8;
  --bd: 2px solid var(--border);
  --shadow: 4px 4px 0 #000000;
  --shadow-hover: 6px 6px 0 #000000;
  --shadow-sm: 2px 2px 0 #000000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.hidden { display: none !important; }
.spacer { flex: 1; }

.app { display: flex; flex-direction: column; height: 100vh; position: relative; }

/* ============ 顶栏 ============ */
.topbar {
  height: 60px;
  flex: 0 0 60px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  background: var(--bg-elev);
  border-bottom: var(--bd);
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.logo {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--accent);
  color: #1a1a1a;
  border: var(--bd);
  border-radius: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.brand-name { font-weight: 700; font-size: 15.5px; letter-spacing: -0.2px; line-height: 1.2; }
.brand-sub { color: var(--text-faint); font-size: 10px; line-height: 1.2; }

.main-nav { display: flex; gap: 6px; flex: 0 0 auto; }
.nav-btn, .subtab, .view-tab {
  background: var(--bg-panel); border: 2px solid transparent; color: var(--text-dim);
  cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 9px; transition: .15s ease;
  white-space: nowrap; flex: 0 0 auto;
}
.nav-btn:hover, .subtab:hover, .view-tab:hover { color: var(--text); background: var(--accent-softer); }
.nav-btn.active, .subtab.active, .view-tab.active {
  color: #1a1a1a; background: var(--accent); border: var(--bd);
  box-shadow: var(--shadow-sm); font-weight: 700;
}
html.dark .nav-btn.active, html.dark .subtab.active, html.dark .view-tab.active { color: #1a1a1a; }

.topbar-right { margin-left: auto; display: flex; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--bg-input); border: var(--bd);
  border-radius: 9px; color: var(--text); cursor: pointer;
  text-decoration: none; font-size: 15px; transition: .15s ease;
  box-shadow: var(--shadow-sm);
}
.icon-btn:hover { background: var(--accent); color: #1a1a1a; transform: translate(-1px, -1px); box-shadow: var(--shadow); }

/* ============ 页面 ============ */
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }

/* 子标签 */
.subtabs {
  display: flex; gap: 5px; padding: 12px 22px 0;
  border-bottom: var(--bd); background: var(--bg-elev);
  overflow-x: auto; overflow-y: hidden; flex: 0 0 auto;
}
.subtabs::-webkit-scrollbar { height: 0; }

/* 工具条 */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; flex-wrap: wrap;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; }
.toolbar-right { margin-left: auto; }

.btn {
  padding: 7px 15px; border-radius: 9px;
  border: var(--bd);
  background: var(--bg-panel); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s ease;
  white-space: nowrap; box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--accent); color: #1a1a1a; transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn.primary {
  background: var(--accent); color: #1a1a1a; border: var(--bd);
  box-shadow: var(--shadow);
}
.btn.primary:hover { background: var(--accent-hover); color: #1a1a1a; box-shadow: var(--shadow-hover); }
.mini-btn {
  padding: 4px 10px; border-radius: 7px; border: var(--bd);
  background: var(--bg-panel); color: var(--text);
  font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: .15s ease;
  box-shadow: 2px 2px 0 var(--border);
}
.mini-btn:hover { background: var(--accent); color: #1a1a1a; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--border); }
.sep { width: 2px; height: 20px; background: var(--border); margin: 0 2px; }
.checkbox { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 12px; font-weight: 600; cursor: pointer; }
.checkbox input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.status { font-size: 12px; color: var(--text-faint); min-width: 60px; text-align: right; font-weight: 600; }
.status.ok { color: var(--green); }
.status.err { color: var(--red); }

/* ============ 双栏工作区 ============ */
.workbench {
  flex: 1; min-height: 360px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  padding: 0 22px 22px;
}
.pane {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg-panel); border: var(--bd);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.pane:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hover); }
.pane-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 44px; flex: 0 0 44px; padding: 0 14px;
  background: var(--bg-elev); border-bottom: var(--bd);
  overflow-x: auto; overflow-y: hidden;
}
.pane-head::-webkit-scrollbar { height: 0; }
.pane-title { font-size: 12px; font-weight: 700; color: var(--text); }
.pane-actions { display: flex; gap: 6px; flex: 0 0 auto; white-space: nowrap; }
.view-tabs { display: flex; gap: 4px; flex: 0 0 auto; white-space: nowrap; }
.view-tab { padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.mini-btn { white-space: nowrap; }

.editor-wrap { position: relative; flex: 1; display: flex; min-height: 0; overflow: hidden; }
.line-nums {
  flex: 0 0 48px; padding: 13px 11px 13px 0;
  text-align: right; font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  line-height: 20px; color: var(--text-faint); white-space: pre;
  background: var(--bg-input); border-right: var(--bd);
  user-select: none; overflow: hidden;
}
textarea, .code-editor pre, .convert-pane pre, .result-view pre {
  flex: 1; margin: 0; padding: 13px 15px;
  font-family: var(--mono); font-size: 12.5px; line-height: 20px;
  color: var(--text); background: var(--bg-input);
  border: none; outline: none; resize: none;
  tab-size: 2; white-space: pre; overflow: auto;
}
textarea::placeholder { color: var(--text-faint); }
.error-highlight {
  position: absolute; inset: 0; pointer-events: none;
  font-family: var(--mono); font-size: 12.5px; line-height: 20px;
  padding: 13px 15px 13px 62px; white-space: pre-wrap; color: transparent;
}
.error-highlight mark { background: rgba(225, 29, 72, 0.25); border-bottom: 2px solid var(--red); }

.pane-foot {
  flex: 0 0 32px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; border-top: var(--bd);
  background: var(--bg-elev); font-size: 11px; color: var(--text-faint); font-weight: 600;
}

/* 结果区 */
.result-area { position: relative; flex: 1; min-height: 0; background: var(--bg-input); overflow: auto; }
.result-view { display: none; height: 100%; }
.result-view.active { display: block; }
.result-view pre { height: 100%; background: transparent; }
.empty-state {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: var(--text-faint); pointer-events: none;
}
.empty-state.hidden { display: none; }
.empty-icon {
  font-family: var(--mono); font-size: 30px; font-weight: 700;
  width: 64px; height: 64px; display: grid; place-items: center;
  border-radius: 14px; background: var(--accent); color: #1a1a1a;
  border: var(--bd); box-shadow: var(--shadow);
}
.empty-state p { margin: 0; font-size: 13px; }
.empty-state .sub { font-size: 12px; color: var(--text-faint); opacity: .8; }

/* 语法高亮 */
.tok-key { color: var(--cyan); }
.tok-str { color: var(--green); }
.tok-num { color: var(--orange); }
.tok-bool { color: var(--purple); }
.tok-null { color: var(--text-faint); }
.tok-punc { color: var(--text-dim); }

/* 树形视图 */
.tree { padding: 12px 15px; font-family: var(--mono); font-size: 12.5px; line-height: 22px; }
.tree-node { position: relative; }
.tree-row { display: flex; align-items: center; gap: 5px; cursor: default; white-space: nowrap; }
.tree-toggle {
  width: 14px; text-align: center; color: var(--text-faint);
  cursor: pointer; user-select: none; font-size: 10px;
}
.tree-toggle.leaf { visibility: hidden; }
.tree-key { color: var(--cyan); }
.tree-colon { color: var(--text-faint); margin-right: 3px; }
.tree-val-str { color: var(--green); }
.tree-val-num { color: var(--orange); }
.tree-val-bool { color: var(--purple); }
.tree-val-null { color: var(--text-faint); font-style: italic; }
.tree-bracket { color: var(--text-dim); }
.tree-count { color: var(--text-faint); font-size: 11px; margin-left: 4px; }
.tree-children { padding-left: 20px; border-left: 2px dashed var(--border); margin-left: 6px; }
.tree-children.collapsed { display: none; }

/* ============ 通用面板 ============ */
.panel {
  flex: 1; min-height: 0; margin: 0 22px 22px;
  display: flex; flex-direction: column;
  background: var(--bg-panel); border: var(--bd);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.panel-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px; background: var(--bg-elev); border-bottom: var(--bd);
}
.field-group { display: flex; align-items: center; gap: 8px; }
.field-group label { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.field-group.compact input { width: 70px; }
select, input[type="text"], input[type="number"] {
  background: var(--bg-input); color: var(--text);
  border: var(--bd); border-radius: 8px;
  padding: 7px 11px; font-family: inherit; font-size: 13px; font-weight: 600; outline: none;
  transition: box-shadow .15s ease, transform .15s ease;
}
select:focus, input:focus, input[type="text"]:focus, input[type="number"]:focus {
  box-shadow: var(--shadow-sm); transform: translate(-1px, -1px);
}
.code-editor { flex: 1; display: flex; min-height: 0; overflow: auto; }
.code-editor pre { background: transparent; }
.convert-workbench { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--border); min-height: 0; }
.convert-pane { display: flex; flex-direction: column; min-height: 0; background: var(--bg-input); }
.convert-pane textarea, .convert-pane pre { flex: 1; min-height: 0; background: transparent; }

/* ============ CRON 页 ============ */
#page-cron { padding: 24px; gap: 18px; }
.cron-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.cron-header h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.cron-header p { margin: 0; color: var(--text-dim); font-size: 13px; }
.cron-card {
  background: var(--bg-panel); border: var(--bd);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.cron-card h3 { margin: 0 0 16px; font-size: 14px; font-weight: 700; }
.card-head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head-row h3 { margin: 0; }
.cron-input-row { display: flex; gap: 10px; }
.cron-input-row input { flex: 1; font-family: var(--mono); font-size: 16px; padding: 11px 15px; letter-spacing: 1px; }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.presets-label { color: var(--text-dim); font-size: 12px; font-weight: 600; }
.chip {
  padding: 5px 13px; border-radius: 18px; border: var(--bd);
  background: var(--bg-panel); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: .15s ease; box-shadow: 2px 2px 0 var(--border);
}
.chip:hover { color: #1a1a1a; background: var(--pink); border-color: var(--border); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--border); }
.cron-desc {
  display: flex; align-items: center; gap: 14px; margin-top: 20px;
  padding: 15px 18px; background: var(--accent); color: #1a1a1a;
  border: var(--bd); border-radius: 10px; box-shadow: var(--shadow-sm);
}
.desc-label { font-size: 12px; color: #4a3d00; font-weight: 600; }
.desc-text { font-size: 15px; color: #1a1a1a; font-weight: 700; }
.desc-text.error { color: #b91c1c; }

/* 构建器 */
.cron-builder { display: flex; flex-direction: column; gap: 12px; }
.builder-field {
  display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: start;
  padding-bottom: 12px; border-bottom: 2px dashed var(--border);
}
.builder-field:last-child { border-bottom: none; }
.builder-name { font-size: 13px; font-weight: 700; padding-top: 6px; }
.builder-name small { display: block; color: var(--text-faint); font-weight: 400; font-size: 11px; }
.builder-modes { display: flex; flex-direction: column; gap: 8px; }
.mode-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mode-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-dim); cursor: pointer; min-width: 62px; font-weight: 600; }
.mode-label input { accent-color: var(--accent); margin: 0; }
.mode-inputs { display: flex; align-items: center; gap: 6px; }
.mode-inputs input { width: 72px; padding: 5px 8px; font-family: var(--mono); font-size: 12px; border-radius: 7px; }
.mode-inputs span { color: var(--text-faint); font-size: 12px; }
.value-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.value-grid label {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 8px; border: 2px solid var(--border); border-radius: 6px;
  font-size: 11px; font-family: var(--mono); cursor: pointer; color: var(--text-dim);
  transition: .15s ease;
}
.value-grid label:has(input:checked) { background: var(--accent); color: #1a1a1a; border-color: var(--border); }
.value-grid input { accent-color: var(--accent); margin: 0; }
.builder-result {
  display: flex; align-items: center; gap: 12px; margin-top: 18px;
  padding: 13px 15px; background: var(--bg-input); border: var(--bd); border-radius: 9px;
  font-size: 13px; color: var(--text-dim); font-weight: 600;
}
.builder-result code { font-family: var(--mono); font-size: 16px; color: var(--green); font-weight: 700; }

/* 执行时间列表 */
.next-runs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.next-runs li {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  background: var(--bg-input); border: var(--bd); border-radius: 9px; box-shadow: var(--shadow-sm);
  transition: .15s ease;
}
.next-runs li:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.run-index {
  width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--pink); color: #fff; border: 2px solid var(--border);
  border-radius: 50%; font-size: 11px; font-weight: 700; flex: 0 0 26px;
}
html.dark .run-index { color: #1a1a1a; }
.run-time { font-family: var(--mono); font-size: 13px; }
.run-week { color: var(--text-faint); font-size: 11px; margin-left: auto; }

/* 帮助卡片 */
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.help-grid > div { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-dim); }
.help-grid code { font-family: var(--mono); background: var(--bg-input); border: 2px solid var(--border); padding: 3px 7px; border-radius: 6px; color: var(--cyan); font-size: 12px; white-space: nowrap; }

/* SEO 工具介绍（可折叠，内容为搜索引擎可见的静态文案） */
.seo-content {
  flex: 0 0 auto;
  margin: 0 22px 14px;
  border: var(--bd);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.seo-content summary {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  list-style: none;
  user-select: none;
}
.seo-content summary::-webkit-details-marker { display: none; }
.seo-content summary::before { content: '▸ '; color: var(--accent); }
.seo-content[open] summary::before { content: '▾ '; }
.seo-content summary:hover { background: var(--accent-softer); color: var(--text); }
.seo-inner { padding: 4px 18px 18px; border-top: var(--bd); }
.seo-inner h2 { font-size: 15px; font-weight: 700; margin: 14px 0 8px; }
.seo-inner > p { font-size: 12.5px; line-height: 1.7; color: var(--text-dim); margin: 0 0 14px; }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.seo-grid article { padding: 14px; border: 2px solid var(--border); border-radius: 10px; background: var(--bg-input); }
.seo-grid h3 { font-size: 13px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.seo-grid p { font-size: 12px; line-height: 1.7; color: var(--text-dim); margin: 0; }
.seo-grid a {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}
.seo-grid a:hover { color: var(--accent-hover); }
@media (max-width: 900px) { .seo-content { margin: 0 10px 10px; } }

/* 备案信息 */
.site-footer {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 16px 12px;
  border-top: var(--bd);
  background: var(--bg-elev);
}
.site-footer a {
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color .15s ease;
}
.site-footer a:hover { color: var(--pink); }

/* 合并版页脚：工具介绍上推抽屉 + 居中备案号 */
.site-footer--merged {
  display: block;
  padding: 0;
  background: var(--bg-elev);
  position: relative;
}

/* 上推面板：闭合时高度为 0，开启时向上推出并压缩上方工作区 */
.seo-panel {
  position: relative;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(16px);
  border-top: 2px solid transparent;
  background: var(--bg-panel);
  transition:
    max-height .36s cubic-bezier(.22, 1, .36, 1),
    opacity .2s ease,
    transform .36s cubic-bezier(.22, 1, .36, 1),
    border-color .2s ease;
}
.site-footer--merged.open .seo-panel {
  max-height: 46vh;
  opacity: 1;
  transform: translateY(0);
  border-top-color: var(--border);
}
.seo-panel .seo-inner {
  max-height: 46vh;
  overflow-y: auto;
  padding: 12px 52px 18px 22px;
  border-top: none;
  background: transparent;
}

/* 右上角关闭按钮 */
.seo-close {
  position: absolute;
  top: 9px; right: 16px;
  z-index: 3;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  font-family: inherit;
  font-size: 17px; font-weight: 700; line-height: 1;
  color: var(--text);
  background: var(--bg-elev);
  border: 2px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: .14s ease;
}
.seo-close:hover {
  background: var(--accent);
  color: #1a1a1a;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--border);
}
.seo-close:active { transform: translate(1px, 1px); box-shadow: none; }

/* 底部条栏：左 触发按钮 / 中 备案号 / 右 占位，保证备案号真正居中 */
.footer-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 22px 10px;
}
.seo-toggle {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease;
}
.seo-toggle:hover { color: var(--text); }
.seo-arrow {
  display: inline-block;
  font-size: 10px;
  color: var(--accent-hover);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.site-footer--merged.open .seo-arrow { transform: rotate(90deg); }

.site-footer--merged .site-icp {
  justify-self: center;
  padding: 0;
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease;
}
.site-footer--merged .site-icp:hover { color: var(--pink); }
.footer-spacer { display: block; }

@media (max-width: 640px) {
  .footer-bar { padding: 8px 12px 9px; gap: 6px; }
  .seo-toggle { font-size: 11px; }
  .site-footer--merged .site-icp { font-size: 10.5px; }
  .seo-panel .seo-inner { padding: 10px 44px 16px 14px; }
  .seo-close { top: 7px; right: 10px; }
}

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 11px 22px; background: var(--accent); color: #1a1a1a;
  border: var(--bd); border-radius: 10px;
  box-shadow: var(--shadow); font-size: 13px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 滚动条 */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-input); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; border: 2px solid var(--bg-input); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============ SQL 生成器 ============ */
.sql-workbench { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 18px; }
.sql-workbench .cron-card { align-self: start; }
.source-tabs { display: flex; gap: 4px; margin: -4px 0 14px; border-bottom: var(--bd); }
.source-tabs .subtab { padding: 7px 13px; border-radius: 9px 9px 0 0; }
.source-panel { min-height: 150px; }

.file-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; height: 150px; border: 3px dashed var(--border);
  border-radius: var(--radius); cursor: pointer; transition: .15s ease; text-align: center; padding: 12px;
  background: var(--bg-input);
}
.file-drop:hover, .file-drop.dragover { border-color: var(--accent); background: var(--accent-soft); }
.file-drop input { display: none; }
.file-icon { font-size: 30px; }
.file-text { color: var(--text); font-size: 13px; font-weight: 600; }
.file-text.has-file { color: var(--green); font-weight: 700; }
.file-sub { color: var(--text-faint); font-size: 11px; }

#pasteData {
  width: 100%; height: 150px; background: var(--bg-input); color: var(--text);
  border: var(--bd); border-radius: 9px; padding: 11px 13px;
  font-family: var(--mono); font-size: 12.5px; line-height: 20px; resize: vertical; outline: none;
}
#pasteData:focus { box-shadow: var(--shadow-sm); }

.columns-preview { margin-top: 14px; padding: 11px 13px; background: var(--bg-input); border-radius: 9px; border: var(--bd); }
.preview-label { color: var(--text-dim); font-size: 12px; margin-right: 6px; font-weight: 600; }
#columnsList, #placeholderList { font-size: 12px; color: var(--text); }
#columnsList em, #placeholderList em { color: var(--text-faint); font-style: normal; }
.col-tag, .ph-tag {
  display: inline-block; padding: 3px 9px; margin: 2px 4px 2px 0;
  background: var(--blue); color: #fff;
  border: 2px solid var(--border); border-radius: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
}
.ph-tag { cursor: pointer; }
.ph-tag:hover { background: var(--pink); }
.data-stat { margin-top: 8px; font-size: 11px; color: var(--text-faint); font-weight: 600; }

.template-hint { font-size: 12px; color: var(--text-dim); margin-bottom: 11px; line-height: 1.8; }
.template-hint code { font-family: var(--mono); background: var(--bg-input); border: 2px solid var(--border); padding: 2px 7px; border-radius: 5px; color: var(--cyan); font-size: 11px; }
.template-input {
  width: 100%; height: 120px; background: var(--bg-input); color: var(--text);
  border: var(--bd); border-radius: 9px; padding: 11px 13px;
  font-family: var(--mono); font-size: 12.5px; line-height: 20px; resize: vertical; outline: none;
}
.template-input:focus { box-shadow: var(--shadow-sm); }
.template-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 11px; }
.result-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 9px; }
.result-head h3 { margin: 0; }
.result-head > div { display: flex; gap: 6px; }
.output-sql {
  width: 100%; height: 260px; background: var(--bg-input); color: var(--green);
  border: var(--bd); border-radius: 9px; padding: 11px 13px;
  font-family: var(--mono); font-size: 12px; line-height: 19px; resize: vertical; outline: none;
  white-space: pre; overflow: auto;
}

/* 响应式：工作区始终保持左右双栏，不降级为上下布局 */
@media (max-width: 900px) {
  .cron-header { flex-direction: column; align-items: flex-start; }
  .workbench { gap: 10px; padding: 0 10px 12px; }
  .convert-workbench { gap: 2px; }
  .sql-workbench { gap: 10px; }
}
