/* koukoutu 净室重建 · 亮色清新高级（Linear/Vercel 式） */
:root {
  --bg: #fafafc;
  --bg-soft: #f1f2f7;
  --card: #ffffff;
  --border: rgba(17, 17, 30, .08);
  --border-strong: rgba(17, 17, 30, .14);
  --text: #16161d;
  --text-dim: #56566a;
  --text-faint: #9293a5;
  --brand: #635bff;
  --brand-2: #0ea5e9;
  --grad: linear-gradient(120deg, #635bff, #8b5cf6);
  --grad-soft: linear-gradient(120deg, rgba(99, 91, 255, .1), rgba(139, 92, 246, .08));
  --shadow: 0 16px 48px rgba(30, 30, 60, .08);
  --radius: 16px;
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  min-height: 100vh; -webkit-font-smoothing: antialiased; line-height: 1.6;
  background-image:
    radial-gradient(900px 480px at 85% -10%, rgba(99, 91, 255, .07), transparent 60%),
    radial-gradient(700px 420px at -10% 20%, rgba(14, 165, 233, .05), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }

/* 导航 */
.nav { position: sticky; top: 0; z-index: 100; backdrop-filter: blur(20px) saturate(180%); background: var(--nav-glass); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 28px; height: 64px; display: flex; align-items: center; gap: 30px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; font-size: 15px; color: #fff; box-shadow: 0 6px 18px rgba(99,91,255,.35); }
.logo em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--text-dim); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; width: 240px; }
.search-box input { border: none; outline: none; font-size: 13.5px; width: 100%; background: none; }
.credits-pill { background: var(--grad-soft); border: 1px solid rgba(99,91,255,.3); padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.credits-pill b { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }

/* 按钮 */
.btn { border: none; border-radius: 12px; font-size: 14px; font-weight: 600; padding: 11px 26px; transition: all .2s; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(99,91,255,.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(99,91,255,.38); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-sm { padding: 8px 18px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Hero */
.hero { max-width: 1280px; margin: 28px auto 0; padding: 0 28px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.hero-card { border-radius: 22px; padding: 40px; color: #16161d; border: 1px solid var(--border); position: relative; overflow: hidden; }
.hero-card.a { background: linear-gradient(115deg, #eef0ff, #e7e4ff); }
.hero-card.b { background: linear-gradient(115deg, #e8f4ff, #eee9ff); }
.hero-card h1 { font-size: 28px; font-weight: 800; line-height: 1.3; }
.hero-card p { margin-top: 10px; color: rgba(22,22,45,.66); font-size: 15px; }
.hero-card .btn { margin-top: 20px; }
.hero-badge { display: inline-flex; background: var(--nav-glass); border: 1px solid rgba(22,22,45,.1); padding: 4px 12px; border-radius: 999px; font-size: 12px; color: #4a4a5e; margin-bottom: 14px; }

/* 板块 */
.section { max-width: 1280px; margin: 46px auto 0; padding: 0 28px 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 5px; height: 22px; border-radius: 3px; background: var(--grad); }
.count-pill { font-size: 12.5px; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); padding: 5px 14px; border-radius: 999px; }

/* 工具卡片网格 */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all .25s; position: relative; overflow: hidden; padding: 0; }
.tool-card:hover { transform: translateY(-5px); border-color: rgba(99,91,255,.32); box-shadow: 0 20px 44px rgba(30,30,60,.1); }
.tool-cover { width: 100%; height: 116px; object-fit: cover; display: block; }
.tool-body { padding: 14px 18px 18px; }
.tool-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--grad-soft); border: 1px solid rgba(99,91,255,.2); display: grid; place-items: center; font-size: 20px; }
.tool-name { margin-top: 4px; font-size: 15.5px; font-weight: 700; }
.tool-desc { margin-top: 6px; font-size: 12.5px; color: var(--text-dim); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.tool-badge { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700; background: var(--grad); color: #fff; padding: 3px 10px; border-radius: 999px; }
.free-tag { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700; background: #eaf3de; color: #3b6d11; padding: 3px 10px; border-radius: 999px; }
.fav-btn { position: absolute; bottom: 14px; right: 14px; background: none; border: none; font-size: 16px; opacity: .4; transition: .2s; }
.fav-btn.on { opacity: 1; }
.fav-btn:hover { opacity: 1; transform: scale(1.15); }

/* 分类 chip */
.cats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-chip { padding: 8px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); transition: .2s; }
.cat-chip.on { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(99,91,255,.3); }

/* 页脚 */
.footer { margin-top: 70px; border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 40px 28px; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer h4 { font-size: 14px; margin-bottom: 14px; }
.footer a { display: block; font-size: 13px; color: var(--text-faint); margin-bottom: 9px; }
.footer a:hover { color: var(--brand); }

/* toast */
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-16px); background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); padding: 12px 24px; border-radius: 12px; font-size: 14px; z-index: 999; opacity: 0; pointer-events: none; transition: .3s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 工具详情工作台 ===== */
.wb { display: grid; grid-template-columns: 400px 1fr; min-height: calc(100vh - 64px); }
.wb-side { background: var(--surface); border-right: 1px solid var(--border); padding: 22px 26px; position: sticky; top: 64px; height: calc(100vh - 64px); display: flex; flex-direction: column; }
.wb-back { font-size: 13px; color: var(--text-faint); }
.wb-back:hover { color: var(--brand); }
.wb-title { margin-top: 12px; font-size: 24px; font-weight: 800; }
.wb-desc { margin-top: 8px; font-size: 13px; color: var(--text-dim); }
.wb-form { flex: 1; overflow-y: auto; margin-top: 18px; padding-right: 8px; min-height: 0; }
.form-item { margin-bottom: 18px; }
.form-item label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.form-item label .req { color: #e24b4a; }
.form-item input[type="text"], .form-item textarea, .form-item select { width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 11px; padding: 11px 14px; font-size: 14px; color: var(--text); outline: none; }
.form-item input:focus, .form-item textarea:focus, .form-item select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,91,255,.12); }
.upload-zone { border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 26px 16px; text-align: center; color: var(--text-faint); font-size: 13px; cursor: pointer; background: var(--bg-soft); }
.upload-zone:hover { border-color: var(--brand); color: var(--brand); }
.upload-zone .up-ico { font-size: 26px; display: block; margin-bottom: 8px; }
.url-input { margin-top: 8px; width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 11px; padding: 10px 14px; font-size: 13px; outline: none; }
.wb-foot { border-top: 1px solid var(--border); padding-top: 16px; }
.wb-cost { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.wb-go { font-size: 16px; padding: 14px; letter-spacing: 2px; }
.wb-main { padding: 22px 28px; min-width: 0; display: flex; flex-direction: column; }
.wb-canvas { flex: 1; min-height: 460px; border-radius: 18px; border: 1px solid var(--border); background: radial-gradient(800px 400px at 70% -20%, rgba(99,91,255,.06), transparent 60%), #fafafc; display: grid; place-items: center; }
.wb-empty { text-align: center; padding: 40px; }
.wb-empty-ico { font-size: 60px; }
.wb-empty-title { margin-top: 16px; font-size: 20px; font-weight: 800; }
.wb-empty-tip { margin-top: 10px; font-size: 13px; color: var(--text-faint); }
.wb-spinner { width: 54px; height: 54px; margin: 0 auto; border-radius: 50%; border: 3px solid rgba(99,91,255,.18); border-top-color: var(--brand); border-right-color: var(--brand-2); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wb-loading { text-align: center; padding: 40px; }
.wb-loading-title { margin-top: 18px; font-size: 16px; font-weight: 700; }
.progress-bar { margin-top: 16px; height: 8px; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--grad); border-radius: 6px; transition: width .5s; }
.wb-loading-pct { margin-top: 10px; font-size: 13px; color: var(--brand); font-weight: 700; }
.wb-result { width: 100%; height: 100%; display: flex; flex-direction: column; }
.wb-result-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; font-size: 13px; color: var(--text-dim); border-bottom: 1px solid var(--border); }
.wb-result-img { flex: 1; min-height: 0; width: 100%; object-fit: contain; background-image: conic-gradient(#eef0f5 0 25%, #fafafc 0 50%, #eef0f5 0 75%, #fafafc 0); background-size: 22px 22px; }
.wb-history { margin-top: 16px; }
.wb-history-title { font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 10px; }
.wb-history-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.hist-item { width: 96px; height: 72px; border-radius: 10px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--border); cursor: pointer; background: var(--surface); }
.hist-item img { width: 100%; height: 100%; object-fit: cover; }
.hist-item.ok { border-color: rgba(52,211,153,.5); }
.hist-item.fail { border-color: rgba(226,75,74,.5); }

.empty { text-align: center; padding: 60px 0; color: var(--text-faint); font-size: 14px; }

/* ===== 左侧锚点导航（首页，简短 + 点击下滑） ===== */
.side-anchor {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 9px; font-size: 13.5px; color: var(--text-dim);
  cursor: pointer; transition: .15s;
}
.side-anchor:hover { background: var(--bg-soft); color: var(--text); }
.side-anchor.active { color: var(--brand); background: var(--grad-soft); font-weight: 600; }
.sa-count { margin-left: auto; font-size: 11px; color: var(--text-faint); background: var(--bg-soft); padding: 1px 8px; border-radius: 999px; }
.side-anchor.active .sa-count { background: rgba(99,91,255,.12); color: var(--brand); }

/* 锚点滚动时给 sticky 导航留出高度 */
.section { scroll-margin-top: 84px; }
.tool-main .hero, .tool-main .section { padding-left: 0; padding-right: 0; }

/* ===== 左侧导航列表（工具目录） ===== */
.layout { display: flex; min-height: calc(100vh - 64px); }
.side-nav {
  width: 248px; flex-shrink: 0; border-right: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 64px; height: calc(100vh - 64px);
  overflow-y: auto; padding: 18px 12px;
}
.side-nav::-webkit-scrollbar { width: 6px; }
.side-group { margin-bottom: 6px; }
.side-group-head {
  font-size: 12px; font-weight: 700; color: var(--text-faint);
  letter-spacing: .5px; padding: 8px 12px; cursor: pointer; display: flex;
  align-items: center; justify-content: space-between; border-radius: 8px;
}
.side-group-head:hover { color: var(--text); background: var(--bg-soft); }
.side-group-head .arr { transition: transform .2s; font-size: 10px; }
.side-group.collapsed .side-tools { display: none; }
.side-group.collapsed .arr { transform: rotate(-90deg); }
.side-tools { display: flex; flex-direction: column; }
.side-tool {
  font-size: 13px; color: var(--text-dim); padding: 7px 12px 7px 24px;
  border-radius: 8px; cursor: pointer; transition: .15s; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.side-tool:hover { color: var(--text); background: var(--bg-soft); }
.side-tool.active { color: var(--brand); background: var(--grad-soft); font-weight: 600; }

/* ===== 批量上传 ===== */
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.upload-tile {
  position: relative; aspect-ratio: 1; border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; background: var(--bg-soft);
}
.upload-tile img { width: 100%; height: 100%; object-fit: cover; }
.upload-tile .rm {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; border: none; font-size: 12px; line-height: 1;
}
.upload-add {
  aspect-ratio: 1; border: 1.5px dashed var(--border-strong); border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; color: var(--text-faint);
  font-size: 12px; text-align: center; transition: .2s; background: var(--surface);
}
.upload-add:hover { border-color: var(--brand); color: var(--brand); }
.upload-add .plus { font-size: 26px; display: block; margin-bottom: 4px; }

/* ===== 模型信息 + 评分 ===== */
.model-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px;
  color: var(--brand); background: var(--grad-soft); border: 1px solid rgba(99,91,255,.25);
  padding: 5px 12px; border-radius: 999px; margin-top: 10px;
}
.rating-line { margin-top: 8px; font-size: 12.5px; color: var(--text-faint); }
.rating-line b { color: #ba7517; }

/* ===== 结果网格（批量） ===== */
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; width: 100%; padding: 18px; }
.result-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.result-item .rimg {
  aspect-ratio: 1; background-image: conic-gradient(#eef0f5 0 25%, #fafafc 0 50%, #eef0f5 0 75%, #fafafc 0);
  background-size: 22px 22px; display: grid; place-items: center; overflow: hidden;
}
.result-item .rimg img { width: 100%; height: 100%; object-fit: contain; }
.result-item .rbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; }
.result-item .rbar .dn { font-size: 12px; color: var(--brand); font-weight: 600; cursor: pointer; }
.result-item .rbar .dn:hover { text-decoration: underline; }

/* 工具页主区 */
.tool-main { flex: 1; min-width: 0; padding: 26px 32px; }
.tool-head { margin-bottom: 20px; }
.tool-head h1 { font-size: 26px; font-weight: 800; }
.tool-head .sub { margin-top: 8px; font-size: 14px; color: var(--text-dim); }
.workbench { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.wb-canvas-full { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); min-height: 360px; }
.params-panel { border: 1px solid var(--border); border-radius: 16px; padding: 20px; background: var(--surface); }

@media (max-width: 900px) {
  .side-nav { display: none; }
  .workbench { grid-template-columns: 1fr; }
}

/* ===== 高级工作台（工具操作端） ===== */
.wb-head { margin-bottom: 24px; }
.wb-back { font-size: 13px; color: var(--text-faint); }
.wb-back:hover { color: var(--brand); }
.wb-title { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-top: 10px; line-height: 1.25; }
.wb-sub { margin-top: 8px; font-size: 14px; color: var(--text-dim); max-width: 680px; line-height: 1.7; }
.wb-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

.wb-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.wb-stage { min-width: 0; }
.wb-canvas {
  min-height: 500px; border-radius: 20px; border: 1px solid var(--border);
  background:
    radial-gradient(900px 420px at 70% -10%, rgba(99,91,255,.05), transparent 60%),
    radial-gradient(600px 300px at 10% 110%, rgba(14,165,233,.04), transparent 60%),
    #fff;
  box-shadow: 0 1px 2px rgba(17,17,30,.03);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.wb-empty { text-align: center; padding: 60px 40px; }
.wb-empty-ico { font-size: 76px; line-height: 1; filter: drop-shadow(0 12px 30px rgba(99,91,255,.25)); }
.wb-empty-title { margin-top: 20px; font-size: 20px; font-weight: 800; }
.wb-empty-tip { margin-top: 10px; font-size: 13.5px; color: var(--text-faint); }

.wb-params {
  position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: 0 8px 30px rgba(30,30,60,.06); overflow: hidden;
}
.wb-params-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 700; }
.wb-params-sub { font-size: 10px; letter-spacing: 2px; color: var(--text-faint); font-weight: 600; }
.wb-form { padding: 20px 22px; max-height: 50vh; overflow-y: auto; }
.wb-form::-webkit-scrollbar { width: 6px; }
.wb-actions { padding: 18px 22px; border-top: 1px solid var(--border); background: var(--surface); }
.wb-cost { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.wb-cost b { font-size: 18px; color: var(--brand); font-weight: 800; }
.wb-cta {
  width: 100%; padding: 15px; font-size: 16px; font-weight: 700; letter-spacing: 3px;
  border-radius: 14px; background: linear-gradient(120deg, #635bff, #8b5cf6); color: #fff;
  box-shadow: 0 10px 26px rgba(99,91,255,.35); transition: all .2s; border: none;
}
.wb-cta:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(99,91,255,.45); }
.wb-cta:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.wb-hint { margin-top: 10px; font-size: 12px; color: var(--text-faint); text-align: center; }

/* 表单控件高级化 */
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.form-item label .req { color: #e24b4a; margin-left: 2px; }
.form-item input[type="text"], .form-item textarea, .form-item select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 11px 14px; font-size: 14px; color: var(--text);
  outline: none; transition: all .2s;
}
.form-item input:focus, .form-item textarea:focus, .form-item select:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px rgba(99,91,255,.12); }
.form-item select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2356566a' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

/* 上传区高级化 */
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; padding: 22px; width: 100%; }
.upload-add {
  aspect-ratio: 1; border: 1.5px dashed var(--border-strong); border-radius: 14px;
  display: grid; place-items: center; cursor: pointer; color: var(--text-faint);
  font-size: 12px; text-align: center; transition: .2s; background: var(--surface); padding: 8px;
}
.upload-add:hover { border-color: var(--brand); color: var(--brand); background: rgba(99,91,255,.04); }
.upload-add .plus { font-size: 28px; display: block; margin-bottom: 4px; color: var(--brand); }
.upload-tile { border-radius: 14px; }
.url-input { width: calc(100% - 44px); margin: 0 22px 18px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; padding: 11px 14px; font-size: 13px; outline: none; }
.url-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,91,255,.12); }

/* 结果网格高级化 */
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; width: 100%; padding: 22px; align-self: start; }
.result-item { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: 0 2px 10px rgba(30,30,60,.04); }

@media (max-width: 1024px) {
  .wb-grid { grid-template-columns: 1fr; }
  .wb-params { position: static; }
  .wb-form { max-height: none; }
}

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .wb { grid-template-columns: 1fr; }
  .wb-side { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .nav-links { display: none; }
}
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } .search-box { display: none; } }


/* ===== 工具工作台 v3：最左工具导航 + 左操作面板 + 中对比画布 + 右历史（参考 koukoutu 工作台） ===== */
.tk-app { display: grid; grid-template-columns: 300px 1fr 264px; height: calc(100vh - 64px); overflow: hidden; }

/* 最左工具竖排导航（已按需求移除，保留 tk-rail-* 样式以备复用） */

/* 左操作面板 */
.tk-panel { border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; overflow: hidden; }
.tk-panel-intro { padding: 14px 18px 4px; }
.tk-name { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.tk-desc { margin-top: 5px; font-size: 12px; color: var(--text-faint); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-scroll { flex: 1; overflow-y: auto; padding: 10px 18px 18px; min-height: 0; }
.tk-scroll::-webkit-scrollbar { width: 6px; }
.tk-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin: 12px 0 8px; }
.tk-label-tip { font-size: 11px; font-weight: 500; color: var(--text-faint); }
.tk-drop { border: 1.5px dashed var(--border-strong); border-radius: 16px; background: var(--bg-soft); transition: .2s; overflow: hidden; }
.tk-drop:hover, .tk-drop.hover { border-color: var(--brand); background: var(--grad-soft); box-shadow: 0 0 0 4px rgba(99,91,255,.08); }
.tk-drop-inner { text-align: center; padding: 26px 14px 18px; cursor: pointer; }
.tk-drop-ico { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; background: var(--grad-soft); border: 1px solid rgba(99,91,255,.25); display: grid; place-items: center; font-size: 20px; color: var(--brand); }
.tk-drop-txt { margin-top: 10px; font-size: 13.5px; font-weight: 600; }
.tk-drop-url { display: inline-block; margin-top: 6px; font-size: 11.5px; color: var(--text-faint); cursor: pointer; }
.tk-drop-url:hover { color: var(--brand); }
.tk-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-pill { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 7px 16px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); transition: .18s; }
.tk-pill:hover { border-color: var(--brand); }
.tk-pill.on { background: var(--grad-soft); border-color: rgba(99,91,255,.4); color: var(--brand); }
.tk-model-line { margin-top: 10px; font-size: 11.5px; color: var(--text-faint); }
.tk-adv-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; margin: 16px 0 8px; padding: 10px 12px; background: var(--bg-soft); border-radius: 12px; cursor: pointer; }
.tk-adv-head:hover { background: var(--grad-soft); }
.tk-adv-arr { font-size: 11px; color: var(--text-faint); }
.tk-adv { padding-bottom: 6px; }
.tk-adv .wb-form { padding: 0; max-height: none; }
.tk-panel-foot { border-top: 1px solid var(--border); padding: 14px 18px 16px; background: var(--surface); }
.tk-cta { width: 100%; border: none; border-radius: 999px; padding: 14px; font-size: 15.5px; font-weight: 800; letter-spacing: 2px; color: #fff; background: linear-gradient(120deg, #635bff, #8b5cf6, #0ea5e9); background-size: 200% 100%; box-shadow: 0 10px 26px rgba(99,91,255,.4); transition: .25s; }
.tk-cta:hover:not(:disabled) { transform: translateY(-2px); background-position: 60% 0; box-shadow: 0 14px 34px rgba(99,91,255,.5); }
.tk-cta:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* 中间画布 */
.tk-stage { display: flex; flex-direction: column; min-width: 0; background: transparent; }
.tk-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--surface); }
.tk-tabs { display: flex; gap: 6px; overflow-x: auto; min-width: 0; }
.tk-tabs::-webkit-scrollbar { height: 0; }
.tk-tab { flex-shrink: 0; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); transition: .18s; }
.tk-tab:hover { border-color: var(--brand); color: var(--brand); }
.tk-tab.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(99,91,255,.3); }
.tk-toolbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.tk-hint { font-size: 11.5px; color: var(--text-faint); }
.tk-up-btn { border: 1px solid rgba(99,91,255,.35); background: var(--grad-soft); color: var(--brand); border-radius: 999px; padding: 7px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: .18s; }
.tk-up-btn:hover { background: var(--grad); color: #fff; border-color: transparent; }
.tk-canvas { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px;
  background: radial-gradient(700px 360px at 60% -10%, rgba(99,91,255,.05), transparent 60%), transparent; }
.tk-compare { display: flex; gap: 26px; align-items: stretch; justify-content: center; width: 100%; }
.tk-pane { flex: 1; max-width: 520px; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.tk-tag { padding: 4px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 12px; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.tk-tag.pink { background: linear-gradient(120deg, #f472b6, #ec4899); }
.tk-tag.green { background: linear-gradient(120deg, #34d399, #10b981); }
.tk-pane-img { width: 100%; border-radius: 14px; overflow: hidden; background-image: conic-gradient(#eef0f5 0 25%, #fafafc 0 50%, #eef0f5 0 75%, #fafafc 0); background-size: 22px 22px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.tk-pane-img img { width: 100%; height: auto; max-height: 58vh; object-fit: contain; display: block; }
.tk-thumbbar { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.tk-thumbbar img { width: 58px; height: 58px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; opacity: .7; transition: .18s; }
.tk-thumbbar img:hover { opacity: 1; }
.tk-thumbbar img.on { border-color: var(--brand); opacity: 1; box-shadow: 0 4px 12px rgba(99,91,255,.3); }

/* 底部状态栏 */
.tk-statusbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.tk-sb-group { display: flex; align-items: center; gap: 8px; }
.tk-sb-btn { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 6px 15px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); transition: .18s; }
.tk-sb-btn:hover { border-color: var(--brand); color: var(--brand); }
.tk-sb-btn.on { background: var(--grad); color: #fff; border-color: transparent; }
.tk-sb-btn:disabled { opacity: .4; cursor: not-allowed; }
.tk-sb-dims { font-size: 12.5px; color: var(--text-dim); }
.tk-sb-dims b { color: var(--brand); font-weight: 700; }
.tk-zoom { font-size: 12px; color: var(--text-faint); min-width: 34px; text-align: right; }

/* 右历史记录 */
.tk-history { border-left: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; overflow: hidden; }
.tk-his-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.tk-his-title { font-size: 13.5px; font-weight: 800; }
.tk-his-tabs { display: flex; gap: 4px; margin-left: auto; }
.tk-his-tabs button { border: none; background: none; font-size: 12px; font-weight: 600; color: var(--text-faint); padding: 4px 8px; border-radius: 8px; }
.tk-his-tabs button.on { color: var(--brand); background: var(--grad-soft); }
.tk-his-clear { border: none; background: none; font-size: 12px; color: var(--text-faint); cursor: pointer; }
.tk-his-clear:hover { color: #e24b4a; }
.tk-his-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.tk-his-list::-webkit-scrollbar { width: 6px; }
.tk-his-empty { text-align: center; color: var(--text-faint); font-size: 12.5px; padding: 40px 0; }
.tk-his-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; cursor: pointer; transition: .15s; border: 1px solid transparent; }
.tk-his-item:hover { background: var(--grad-soft); border-color: rgba(99,91,255,.2); }
.tk-his-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: var(--bg-soft); }
.tk-his-info { min-width: 0; flex: 1; }
.tk-his-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-his-meta { margin-top: 3px; font-size: 11px; color: var(--text-faint); }
.tk-his-badge { display: inline-block; background: var(--grad-soft); color: var(--brand); border-radius: 6px; padding: 1px 7px; font-size: 10.5px; font-weight: 700; }
.tk-his-time { font-size: 10.5px; color: var(--text-faint); flex-shrink: 0; }

/* 开关（详细参数内） */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.switch input { display: none; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: .2s; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--grad); }
.switch input:checked + i::after { left: 21px; }

/* 响应式 */
@media (max-width: 1280px) { .tk-app { grid-template-columns: 280px 1fr 232px; } }
@media (max-width: 1080px) { .tk-app { grid-template-columns: 280px 1fr; } .tk-history { display: none; } }
@media (max-width: 860px) { .tk-app { grid-template-columns: 1fr; height: auto; overflow: visible; } .tk-panel { border-right: none; border-bottom: 1px solid var(--border); } }

/* 历史记录折叠 */
.tk-his-fold { border: none; background: none; color: var(--text-faint); font-size: 15px; cursor: pointer; padding: 2px 4px; border-radius: 8px; line-height: 1; }
.tk-his-fold:hover { color: var(--brand); background: var(--grad-soft); }
.tk-app.his-folded { grid-template-columns: 300px 1fr 46px; }
.tk-history.folded { align-items: center; padding: 10px 0; }
.tk-history.folded .tk-his-head, .tk-history.folded .tk-his-list { display: none; }
.tk-his-expand { display: flex; flex-direction: column; align-items: center; gap: 8px; border: none; background: none; color: var(--text-faint); font-size: 12.5px; font-weight: 600; cursor: pointer; writing-mode: vertical-rl; letter-spacing: 3px; padding: 12px 6px; border-radius: 10px; }
.tk-his-expand:hover { color: var(--brand); background: var(--grad-soft); }
@media (max-width: 1280px) { .tk-app.his-folded { grid-template-columns: 280px 1fr 46px; } }


/* ===== 多主题系统（白天/黑夜/九尾灵狐/洁瀚星空/星空之境/清柠时光） ===== */

/* 黑夜模式 · 护眼暗色 */
html[data-theme="dark"] {
  --bg: #101319; --bg-soft: #171b24; --surface: #1a1f2a; --card: #1a1f2a;
  --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.17);
  --text: #e8eaf2; --text-dim: #a3a9bd; --text-faint: #6b7186;
  --brand: #7c7fff; --brand-2: #38bdf8;
  --grad: linear-gradient(120deg, #7c7fff, #a78bfa);
  --grad-soft: linear-gradient(120deg, rgba(124,127,255,.16), rgba(167,139,250,.12));
  --nav-glass: rgba(16,19,25,.72);
  --shadow: 0 16px 48px rgba(0,0,0,.45);
}
html[data-theme="dark"] body { background-image: radial-gradient(900px 480px at 85% -10%, rgba(124,127,255,.1), transparent 60%), radial-gradient(700px 420px at -10% 20%, rgba(56,189,248,.06), transparent 60%); }
html[data-theme="dark"] .hero-card.a, html[data-theme="dark"] .hero-card.b { background: var(--surface); color: var(--text); border-color: var(--border); }
html[data-theme="dark"] .hero-card p { color: var(--text-dim); }
html[data-theme="dark"] .hero-badge { background: rgba(255,255,255,.06); color: var(--text-dim); border-color: var(--border); }
html[data-theme="dark"] .tk-pane-img { background-image: conic-gradient(#20242e 0 25%, #181c25 0 50%, #20242e 0 75%, #181c25 0); }

/* 九尾灵狐 · 神秘灵动 */
html[data-theme="fox"] {
  --bg: #1b1114; --bg-soft: #261a1e; --surface: #2b1e22; --card: #2b1e22;
  --border: rgba(255,180,150,.1); --border-strong: rgba(255,180,150,.2);
  --text: #f7ebe4; --text-dim: #c9a89a; --text-faint: #93766a;
  --brand: #ff7e5f; --brand-2: #feb47b;
  --grad: linear-gradient(120deg, #ff7e5f, #ff9a76);
  --grad-soft: linear-gradient(120deg, rgba(255,126,95,.16), rgba(254,180,123,.12));
  --nav-glass: rgba(27,17,20,.72);
  --shadow: 0 16px 48px rgba(0,0,0,.45);
}
html[data-theme="fox"] body { background-image: radial-gradient(900px 480px at 85% -10%, rgba(255,126,95,.12), transparent 60%), radial-gradient(700px 420px at -10% 20%, rgba(254,180,123,.07), transparent 60%); }
html[data-theme="fox"] .hero-card.a, html[data-theme="fox"] .hero-card.b { background: linear-gradient(115deg, #3a2320, #45281f); color: #f7ebe4; border-color: rgba(255,180,150,.14); }
html[data-theme="fox"] .hero-card p { color: #c9a89a; }
html[data-theme="fox"] .hero-badge { background: rgba(255,255,255,.06); color: #c9a89a; border-color: rgba(255,180,150,.14); }
html[data-theme="fox"] .tk-pane-img { background-image: conic-gradient(#332326 0 25%, #2a1d20 0 50%, #332326 0 75%, #2a1d20 0); }

/* 洁瀚星空 · 未来科幻 */
html[data-theme="space"] {
  --bg: #0b1026; --bg-soft: #0f1530; --surface: #131a3d; --card: #131a3d;
  --border: rgba(120,150,255,.12); --border-strong: rgba(120,150,255,.22);
  --text: #e6ebff; --text-dim: #9aa6d1; --text-faint: #616d9e;
  --brand: #4f7cff; --brand-2: #22d3ee;
  --grad: linear-gradient(120deg, #4f7cff, #22d3ee);
  --grad-soft: linear-gradient(120deg, rgba(79,124,255,.16), rgba(34,211,238,.1));
  --nav-glass: rgba(11,16,38,.72);
  --shadow: 0 16px 48px rgba(0,0,0,.5);
}
html[data-theme="space"] body { background-image: radial-gradient(900px 480px at 85% -10%, rgba(79,124,255,.14), transparent 60%), radial-gradient(700px 420px at -10% 20%, rgba(34,211,238,.08), transparent 60%); }
html[data-theme="space"] .hero-card.a, html[data-theme="space"] .hero-card.b { background: linear-gradient(115deg, #182252, #101a44); color: #e6ebff; border-color: rgba(120,150,255,.16); }
html[data-theme="space"] .hero-card p { color: #9aa6d1; }
html[data-theme="space"] .hero-badge { background: rgba(255,255,255,.06); color: #9aa6d1; border-color: rgba(120,150,255,.16); }
html[data-theme="space"] .tk-pane-img { background-image: conic-gradient(#1a2350 0 25%, #141b40 0 50%, #1a2350 0 75%, #141b40 0); }

/* 星空之境 · 明亮璀璨 */
html[data-theme="star"] {
  --bg: #faf7ff; --bg-soft: #f3ecff; --surface: #ffffff; --card: #ffffff;
  --border: rgba(90,50,160,.1); --border-strong: rgba(90,50,160,.18);
  --text: #241b3a; --text-dim: #5d5478; --text-faint: #9a92b5;
  --brand: #8b5cf6; --brand-2: #ec4899;
  --grad: linear-gradient(120deg, #8b5cf6, #ec4899);
  --grad-soft: linear-gradient(120deg, rgba(139,92,246,.12), rgba(236,72,153,.1));
  --nav-glass: rgba(250,247,255,.72);
}
html[data-theme="star"] body { background-image: radial-gradient(900px 480px at 85% -10%, rgba(139,92,246,.1), transparent 60%), radial-gradient(700px 420px at -10% 20%, rgba(236,72,153,.08), transparent 60%); }

/* 清柠时光 · 浅夏清凉 */
html[data-theme="lime"] {
  --bg: #f5faf1; --bg-soft: #eaf4e4; --surface: #ffffff; --card: #ffffff;
  --border: rgba(40,80,50,.1); --border-strong: rgba(40,80,50,.18);
  --text: #1c2b22; --text-dim: #56685c; --text-faint: #8fa096;
  --brand: #57a773; --brand-2: #8fd694;
  --grad: linear-gradient(120deg, #57a773, #8fd694);
  --grad-soft: linear-gradient(120deg, rgba(87,167,115,.12), rgba(143,214,148,.1));
  --nav-glass: rgba(245,250,241,.75);
}
html[data-theme="lime"] body { background-image: radial-gradient(900px 480px at 85% -10%, rgba(87,167,115,.1), transparent 60%), radial-gradient(700px 420px at -10% 20%, rgba(143,214,148,.08), transparent 60%); }

/* 白天模式 = 默认 :root，仅统一 body 光晕 */
html[data-theme="light"] body { background-image: radial-gradient(900px 480px at 85% -10%, rgba(99,91,255,.07), transparent 60%), radial-gradient(700px 420px at -10% 20%, rgba(14,165,233,.05), transparent 60%); }

/* ===== 顶栏：通知铃铛 + 主题切换下拉 ===== */
.site-bell, .site-theme { position: relative; }
.site-bell-btn, .site-theme-btn { display: flex; align-items: center; gap: 7px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--text-dim); transition: .18s; }
.site-bell-btn:hover, .site-theme-btn:hover { border-color: var(--brand); color: var(--brand); }
.site-bell-btn { font-size: 16px; padding: 8px 11px; position: relative; }
.site-dot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; border: 2px solid var(--surface); }
.site-caret { font-size: 10px; color: var(--text-faint); }
.site-pop { position: absolute; top: calc(100% + 10px); right: 0; width: 300px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow); padding: 10px; z-index: 300; opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none; transition: .2s; }
.site-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.site-theme-pop { width: 268px; }
.theme-item { display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: none; border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: .15s; text-align: left; }
.theme-item:hover { background: var(--grad-soft); }
.theme-item.on { background: var(--grad-soft); }
.theme-item.on .theme-name { color: var(--brand); }
.theme-swatch { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--border-strong); }
.theme-name { font-size: 14px; font-weight: 700; color: var(--text); }
.theme-sub { margin-left: auto; font-size: 11.5px; color: var(--text-faint); }
.site-notice-pop { width: 320px; }
.notice-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 6px; border-bottom: 1px solid var(--border); }
.notice-head b { font-size: 14px; }
.notice-readall { border: none; background: none; font-size: 12px; color: var(--text-faint); cursor: pointer; }
.notice-readall:hover { color: var(--brand); }
.notice-item { padding: 11px 12px; border-radius: 12px; transition: .15s; cursor: default; }
.notice-item:hover { background: var(--grad-soft); }
.notice-item + .notice-item { margin-top: 2px; }
.notice-top { display: flex; align-items: center; gap: 8px; }
.notice-tag { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--grad-soft); color: var(--brand); }
.notice-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.notice-time { margin-left: auto; font-size: 10.5px; color: var(--text-faint); }
.notice-text { margin-top: 5px; font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }
.notice-empty { text-align: center; color: var(--text-faint); font-size: 12.5px; padding: 26px 0; }


/* ===== 参考主题面板新增 4 套 ===== */

/* 浅色 · 极简素雅 */
html[data-theme="plain"] {
  --bg: #f4f5f7; --bg-soft: #eceef1; --surface: #ffffff; --card: #ffffff;
  --border: rgba(20,22,30,.09); --border-strong: rgba(20,22,30,.17);
  --text: #20232b; --text-dim: #5a5e6a; --text-faint: #9298a4;
  --brand: #3c4250; --brand-2: #6b7383;
  --grad: linear-gradient(120deg, #3c4250, #6b7383);
  --grad-soft: linear-gradient(120deg, rgba(60,66,80,.09), rgba(107,115,131,.07));
  --nav-glass: rgba(244,245,247,.78);
}
html[data-theme="plain"] body { background-image: radial-gradient(900px 480px at 85% -10%, rgba(60,66,80,.05), transparent 60%), radial-gradient(700px 420px at -10% 20%, rgba(107,115,131,.04), transparent 60%); }

/* 有风 · 森野清风（草地+晴空） */
html[data-theme="breeze"] {
  --bg: #f3f9f4; --bg-soft: #e7f3ea; --surface: #ffffff; --card: #ffffff;
  --border: rgba(30,90,55,.1); --border-strong: rgba(30,90,55,.19);
  --text: #17281e; --text-dim: #56705f; --text-faint: #8ba294;
  --brand: #2f9e63; --brand-2: #7cc9a3;
  --grad: linear-gradient(120deg, #2f9e63, #7cc9a3);
  --grad-soft: linear-gradient(120deg, rgba(47,158,99,.12), rgba(124,201,163,.1));
  --nav-glass: rgba(243,249,244,.78);
}
html[data-theme="breeze"] body { background-image: linear-gradient(180deg, #e0f1fb 0%, #f3f9f4 46%, #e2f2e5 100%); background-attachment: fixed; }

/* 同行 · 澄澈湖蓝（水波纹青蓝） */
html[data-theme="lake"] {
  --bg: #eef7fb; --bg-soft: #e2f0f8; --surface: #ffffff; --card: #ffffff;
  --border: rgba(20,80,110,.1); --border-strong: rgba(20,80,110,.19);
  --text: #142630; --text-dim: #4f6b7a; --text-faint: #88a3b1;
  --brand: #2f8fc4; --brand-2: #7fd0e8;
  --grad: linear-gradient(120deg, #2f8fc4, #7fd0e8);
  --grad-soft: linear-gradient(120deg, rgba(47,143,196,.12), rgba(127,208,232,.1));
  --nav-glass: rgba(238,247,251,.78);
}
html[data-theme="lake"] body { background-image: radial-gradient(900px 480px at 85% -10%, rgba(47,143,196,.1), transparent 60%), radial-gradient(700px 420px at -10% 20%, rgba(127,208,232,.09), transparent 60%); }

/* 浅漪 · 天青微澜（淡雅天青） */
html[data-theme="ripple"] {
  --bg: #f2f7fc; --bg-soft: #e9f1f9; --surface: #ffffff; --card: #ffffff;
  --border: rgba(40,70,100,.09); --border-strong: rgba(40,70,100,.17);
  --text: #1a2733; --text-dim: #56697c; --text-faint: #93a4b5;
  --brand: #5b8fc9; --brand-2: #a7c9ec;
  --grad: linear-gradient(120deg, #5b8fc9, #a7c9ec);
  --grad-soft: linear-gradient(120deg, rgba(91,143,201,.12), rgba(167,201,236,.1));
  --nav-glass: rgba(242,247,252,.78);
}
html[data-theme="ripple"] body { background-image: radial-gradient(900px 480px at 85% -10%, rgba(91,143,201,.09), transparent 60%), radial-gradient(700px 420px at -10% 20%, rgba(167,201,236,.08), transparent 60%); }


/* ============================================================
   ===== 全站视觉/交互精修层 v4（不动结构，仅覆盖式增强） =====
   ============================================================ */

/* ---------- 1. 全局基底 ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; letter-spacing: .01em; }
::selection { background: color-mix(in srgb, var(--brand) 28%, transparent); color: var(--text); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-faint) 45%, transparent); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--brand) 60%, transparent); background-clip: content-box; }
a, button { transition: color .22s, background-color .22s, border-color .22s, box-shadow .28s, transform .22s cubic-bezier(.2,.8,.2,1); }

/* ---------- 2. 顶栏导航 ---------- */
.nav { transition: box-shadow .35s, background-color .35s, border-color .35s; }
.nav.scrolled { box-shadow: 0 10px 34px rgba(30,30,60,.1); border-bottom-color: transparent; }
html[data-theme="dark"] .nav.scrolled,
html[data-theme="fox"] .nav.scrolled,
html[data-theme="space"] .nav.scrolled { box-shadow: 0 12px 36px rgba(0,0,0,.5); }
.logo { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.logo:hover { transform: translateY(-1px); }
.logo-mark { transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); box-shadow: 0 10px 26px rgba(99,91,255,.45); }
.nav-links a { position: relative; padding: 6px 2px; font-weight: 500; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  border-radius: 2px; background: var(--grad); transition: right .32s cubic-bezier(.2,.8,.2,1);
}
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--text); font-weight: 600; }
.search-box { transition: width .32s cubic-bezier(.2,.8,.2,1), border-color .25s, box-shadow .25s; }
.search-box:focus-within { width: 280px; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent); }
.credits-pill { transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.credits-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 22%, transparent); }
.avatar { transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--brand) 35%, transparent); }
.avatar:hover { transform: scale(1.08) rotate(3deg); }
.site-bell-btn:hover, .site-theme-btn:hover { transform: translateY(-1px); }
.site-pop { backdrop-filter: blur(14px) saturate(160%); }

/* ---------- 3. 按钮质感 ---------- */
.btn { position: relative; overflow: hidden; }
.btn-primary { background-image: var(--grad); background-size: 180% 100%; }
.btn-primary:hover { background-position: 80% 0; }
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg); transition: left .6s cubic-bezier(.2,.8,.2,1); pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn:active { transform: scale(.975); }
.btn-ghost:active { transform: scale(.975); }

/* ---------- 4. 首页 hero ---------- */
.hero-card { position: relative; overflow: hidden; transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
.hero-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(340px 240px at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.6), transparent 68%);
}
.hero-card:hover { transform: translateY(-5px); box-shadow: 0 26px 60px rgba(30,30,60,.15); }
.hero-card:hover::after { opacity: 1; }
.hero-card h1 { letter-spacing: -.6px; }
.hero-card .btn { position: relative; }

/* ---------- 5. 区块标题 ---------- */
.section-head h2 { letter-spacing: -.4px; }
.section-head h2::before { box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 45%, transparent); }
.count-pill { transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s, color .25s; }
.count-pill:hover { transform: translateY(-1px); border-color: var(--brand); color: var(--brand); }

/* ---------- 6. 工具卡片 ---------- */
.tool-card { transition: transform .38s cubic-bezier(.2,.8,.2,1), box-shadow .38s, border-color .3s; }
.tool-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  transition: opacity .38s; z-index: 1;
  background: radial-gradient(260px 180px at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%);
}
.tool-card:hover::before { opacity: 1; }
.tool-card:hover { transform: translateY(-6px); box-shadow: 0 26px 52px rgba(30,30,60,.13); border-color: color-mix(in srgb, var(--brand) 34%, transparent); }
.tool-card:active { transform: translateY(-3px) scale(.994); }
.tool-cover { transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .5s; opacity: 0; }
.tool-cover.loaded { opacity: 1; }
.tool-card:hover .tool-cover { transform: scale(1.07); }
.tool-body { position: relative; z-index: 2; }
.tool-name { transition: color .25s; }
.tool-card:hover .tool-name { color: var(--brand); }
.tool-badge, .free-tag { z-index: 3; box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.tool-badge { background-image: var(--grad); }
.fav-btn { transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s; }
.fav-btn:hover { transform: scale(1.25) rotate(6deg); }
.fav-btn.on { animation: favPop .42s cubic-bezier(.34,1.56,.64,1); }
@keyframes favPop { 0% { transform: scale(1); } 45% { transform: scale(1.45) rotate(-10deg); } 100% { transform: scale(1); } }

/* ---------- 7. 左侧锚点导航 ---------- */
.side-nav { backdrop-filter: blur(8px); }
.side-anchor { position: relative; transition: transform .22s cubic-bezier(.2,.8,.2,1), background-color .22s, color .22s; }
.side-anchor::before {
  content: ""; position: absolute; left: 2px; top: 50%; width: 3px; height: 0; border-radius: 3px;
  background: var(--grad); transform: translateY(-50%); transition: height .28s cubic-bezier(.2,.8,.2,1);
}
.side-anchor:hover { transform: translateX(3px); }
.side-anchor.active { transform: translateX(3px); }
.side-anchor.active::before { height: 18px; }
.sa-icon { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.side-anchor:hover .sa-icon { transform: scale(1.14); }

/* ---------- 8. 滚动入场 / 数字滚动 ---------- */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .62s cubic-bezier(.2,.8,.2,1), transform .62s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* ---------- 9. 充值套餐 ---------- */
.plan-card { position: relative; overflow: hidden; transition: transform .38s cubic-bezier(.2,.8,.2,1), box-shadow .38s, border-color .3s; }
.plan-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .38s;
  background: radial-gradient(280px 200px at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--brand) 13%, transparent), transparent 70%);
}
.plan-card:hover::after { opacity: 1; }
.plan-card:hover { transform: translateY(-6px); box-shadow: 0 26px 54px rgba(30,30,60,.14); border-color: color-mix(in srgb, var(--brand) 34%, transparent); }
.plan-card.best { border-color: color-mix(in srgb, var(--brand) 42%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent), 0 18px 40px rgba(30,30,60,.1); }

/* ---------- 10. 工作台（工具操作端） ---------- */
.tk-panel, .tk-history { box-shadow: 0 1px 2px rgba(17,17,30,.03); }
.tk-drop { position: relative; }
.tk-drop.hover { animation: dropPulse 1.1s ease-in-out infinite; }
@keyframes dropPulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 22%, transparent); }
  50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--brand) 0%, transparent); }
}
.tk-drop-inner:hover .tk-drop-ico { transform: translateY(-3px) scale(1.06); }
.tk-drop-ico { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.tk-pill, .tk-tab, .tk-sb-btn { transition: transform .22s cubic-bezier(.2,.8,.2,1), background-color .22s, color .22s, border-color .22s, box-shadow .25s; }
.tk-pill:hover, .tk-tab:hover, .tk-sb-btn:hover { transform: translateY(-1px); }
.tk-cta { position: relative; overflow: hidden; }
.tk-cta::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -55%; width: 42%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg); transition: left .7s cubic-bezier(.2,.8,.2,1); pointer-events: none;
}
.tk-cta:hover:not(:disabled)::after { left: 135%; }
.tk-cta:active:not(:disabled) { transform: scale(.985); }
.tk-pane-img { transition: transform .38s cubic-bezier(.2,.8,.2,1), box-shadow .38s; }
.tk-pane-img:hover { transform: translateY(-3px); box-shadow: 0 24px 54px rgba(30,30,60,.14); }
.tk-pane-img img { animation: imgIn .55s cubic-bezier(.2,.8,.2,1); }
@keyframes imgIn { from { opacity: 0; transform: scale(1.015); } to { opacity: 1; transform: none; } }
.tk-thumbbar img:hover { transform: translateY(-2px) scale(1.05); }
.tk-thumbbar img { transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s, border-color .25s; }
.tk-his-item { transition: transform .25s cubic-bezier(.2,.8,.2,1), background-color .2s, border-color .2s; }
.tk-his-item:hover { transform: translateX(3px); }
.tk-his-item img { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.tk-his-item:hover img { transform: scale(1.06); }
.progress-bar { position: relative; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.06); }
.progress-bar i { position: relative; box-shadow: 0 0 12px color-mix(in srgb, var(--brand) 60%, transparent); }
.progress-bar i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  animation: barSheen 1.2s linear infinite;
}
@keyframes barSheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.upload-tile { transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s; }
.upload-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(30,30,60,.12); }
.upload-tile .rm { opacity: 0; transition: opacity .2s, transform .25s cubic-bezier(.34,1.56,.64,1); }
.upload-tile:hover .rm { opacity: 1; }
.upload-tile .rm:hover { transform: scale(1.12); }
.tk-name { letter-spacing: -.4px; }
.tk-compare { animation: imgIn .5s cubic-bezier(.2,.8,.2,1); }

/* ---------- 11. 提示条 ---------- */
.toast { display: flex; align-items: center; gap: 9px; backdrop-filter: blur(14px) saturate(160%); }
.toast::before { content: "✓"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 12px; flex-shrink: 0; }
.toast.warn::before { content: "!"; background: linear-gradient(120deg, #f59e0b, #ef4444); }
.toast { transform: translateX(-50%) translateY(-18px) scale(.96); }
.toast.show { transform: translateX(-50%) translateY(0) scale(1); }

/* ---------- 12. 空状态（仅空集合显示图标，加载中不显示） ---------- */
.empty { position: relative; }
.grid > .empty::before, .tk-his-empty::before, .notice-empty::before { content: "🗂️"; display: block; font-size: 40px; opacity: .45; margin-bottom: 10px; }

/* ---------- 13. 页脚 ---------- */
.footer { position: relative; }
.footer h4 { position: relative; padding-left: 12px; }
.footer h4::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 3px; background: var(--grad); }
.footer a { transition: color .2s, transform .22s cubic-bezier(.2,.8,.2,1); }
.footer a:hover { transform: translateX(3px); }

/* ===== v5 侧栏精修（静态高级版：去渐变、细线制、低饱和） ===== */

/* ---- 首页左侧锚点导航 ---- */
.side-nav { width: 236px; padding: 22px 14px 26px; background: var(--surface); }
.side-nav::before {
  content: "工具目录"; display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em;
  color: var(--text-faint); padding: 0 10px 12px; margin-bottom: 8px; border-bottom: 1px solid var(--border);
}
.side-anchor { position: relative; padding: 8px 10px; border-radius: 8px; gap: 10px; transition: background-color .16s, color .16s; }
.side-anchor .sa-icon { font-size: 14px; line-height: 1; opacity: .85; filter: grayscale(.35); transition: opacity .16s, filter .16s; }
.side-anchor:hover { background: var(--bg-soft); color: var(--text); }
.side-anchor.active { background: var(--bg-soft); color: var(--text); font-weight: 650; }
.side-anchor.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 2px; border-radius: 0 2px 2px 0; background: var(--brand); }
.side-anchor.active .sa-icon { opacity: 1; filter: none; }
.sa-count { background: transparent; border: 1px solid var(--border); color: var(--text-faint); font-size: 10.5px; padding: 1px 7px; border-radius: 6px; }
.side-anchor.active .sa-count { border-color: var(--border-strong); color: var(--text-dim); }

/* ---- 工作台左操作面板 ---- */
.tk-panel { background: var(--surface); }
.tk-panel-intro { padding: 20px 18px 14px; border-bottom: 1px solid var(--border); }
.tk-name { font-size: 17px; font-weight: 750; letter-spacing: -.2px; }
.tk-desc { margin-top: 6px; font-size: 12.5px; line-height: 1.65; color: var(--text-faint); -webkit-line-clamp: 3; }
.tk-scroll { padding: 6px 18px 18px; }
.tk-label { margin: 16px 0 9px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--text-faint); }
.tk-label-tip { font-size: 11px; font-weight: 500; letter-spacing: 0; opacity: .85; }

.tk-drop { border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--bg); }
.tk-drop:hover, .tk-drop.hover { border-color: var(--brand); background: var(--bg-soft); box-shadow: none; animation: none; }
.tk-drop-inner { padding: 22px 14px 16px; }
.tk-drop-ico {
  width: 38px; height: 38px; margin: 0 auto; border-radius: 10px; background: var(--bg-soft);
  border: 1px solid var(--border); color: var(--text-dim); display: grid; place-items: center; transition: none;
}
.tk-drop-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tk-drop-inner:hover .tk-drop-ico { transform: none; }
.tk-drop-txt { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--text-dim); }
.tk-drop-url { margin-top: 6px; font-size: 11.5px; color: var(--text-faint); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.tk-drop-url:hover { color: var(--text); }

.tk-pills { gap: 6px; }
.tk-pill {
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--text-dim); box-shadow: none;
}
.tk-pill:hover { transform: none; background: var(--bg-soft); border-color: var(--border-strong); color: var(--text); }
.tk-pill.on, .tk-pill.on:hover { background: var(--text); border-color: var(--text); color: var(--surface); font-weight: 650; }
.tk-model-line { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 11.5px; color: var(--text-faint); }
.tk-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }

.tk-adv-head {
  margin: 18px 0 0; padding: 14px 0 10px; background: none; border-radius: 0;
  border-top: 1px solid var(--border); font-size: 12.5px; font-weight: 650; color: var(--text-dim);
}
.tk-adv-head:hover { background: none; color: var(--text); }
.tk-adv-arr { font-size: 10px; }
.tk-adv { padding-bottom: 0; }
.tk-adv .form-item { margin-bottom: 14px; }
.tk-adv .form-item label { display: block; margin-bottom: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.tk-adv .form-item input[type="text"], .tk-adv .form-item textarea, .tk-adv .form-item select {
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; font-size: 13px;
}
.tk-adv .form-item input:focus, .tk-adv .form-item textarea:focus, .tk-adv .form-item select:focus {
  background: var(--surface); border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent); outline: none;
}
.switch i { background: var(--border-strong); }
.switch input:checked + i { background: var(--brand); }

.tk-panel-foot { padding: 14px 18px 18px; background: var(--surface); }
.wb-cost { margin-bottom: 11px; font-size: 12.5px; color: var(--text-faint); }
.wb-cost b { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.tk-cta {
  border-radius: 10px; padding: 13px; font-size: 14.5px; font-weight: 700; letter-spacing: .02em;
  background: var(--brand); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 24%, transparent);
  transition: background-color .18s, box-shadow .18s, transform .18s;
}
.tk-cta:hover:not(:disabled) { transform: translateY(-1px); background: color-mix(in srgb, var(--brand) 86%, #000); box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 30%, transparent); }
.tk-cta:active:not(:disabled) { transform: translateY(0); }
.tk-cta::after { display: none; }
.wb-hint { margin-top: 10px; font-size: 11.5px; color: var(--text-faint); }

/* ---- 工作台工具栏 / 状态栏 ---- */
.tk-toolbar { padding: 12px 18px; background: var(--surface); }
.tk-tab { border-color: transparent; background: transparent; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.tk-tab:hover { transform: none; background: var(--bg-soft); border-color: transparent; color: var(--text); }
.tk-tab.on, .tk-tab.on:hover { background: var(--text); border-color: var(--text); color: var(--surface); box-shadow: none; font-weight: 650; }
.tk-up-btn { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 8px; padding: 7px 14px; font-weight: 650; }
.tk-up-btn:hover { background: var(--bg-soft); border-color: var(--border-strong); color: var(--text); }
.tk-statusbar { padding: 10px 18px; background: var(--surface); }
.tk-sb-btn { border-color: transparent; background: transparent; border-radius: 8px; padding: 6px 12px; color: var(--text-dim); }
.tk-sb-btn:hover { transform: none; background: var(--bg-soft); border-color: transparent; color: var(--text); }
.tk-sb-btn.on, .tk-sb-btn.on:hover { background: var(--text); border-color: var(--text); color: var(--surface); font-weight: 650; }
.tk-sb-btn.tk-dl { border-color: var(--border-strong); background: var(--surface); color: var(--text); font-weight: 650; }
.tk-sb-btn.tk-dl:not(:disabled):hover { background: var(--text); border-color: var(--text); color: var(--surface); }
.tk-sb-dims { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.tk-sb-dims b { color: var(--text-dim); font-weight: 650; }

/* ---- 画布（静态底色，不再透出动态背景） ---- */
.tk-stage { background: var(--bg-soft); }
.tk-canvas { background: var(--bg-soft); }
.tk-tag { padding: 4px 14px; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; box-shadow: none; margin-bottom: 10px; }
.tk-tag.pink { background: color-mix(in srgb, #ec4899 10%, transparent); color: #ec4899; border: 1px solid color-mix(in srgb, #ec4899 24%, transparent); }
.tk-tag.green { background: color-mix(in srgb, #10b981 10%, transparent); color: #10b981; border: 1px solid color-mix(in srgb, #10b981 24%, transparent); }
.tk-thumbbar { gap: 8px; margin-top: 16px; }
.tk-thumbbar img { border: 1px solid var(--border); border-radius: 8px; opacity: .75; }
.tk-thumbbar img.on { border-color: var(--text); box-shadow: none; opacity: 1; }
.wb-empty { padding: 40px; }
.wb-empty-ico { width: 56px; height: 56px; margin: 0 auto; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; filter: none; }
.wb-empty-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--text-faint); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wb-empty-title { margin-top: 16px; font-size: 15px; font-weight: 650; color: var(--text-dim); }
.wb-empty-tip { margin-top: 8px; font-size: 12.5px; color: var(--text-faint); }
.progress-bar { height: 4px; border-radius: 999px; box-shadow: none; }
.progress-bar i { background: var(--brand); box-shadow: none; }
.progress-bar i::after { display: none; }

/* ---- 右历史记录 ---- */
.tk-history { background: var(--surface); }
.tk-his-head { padding: 14px 14px 12px; gap: 10px; }
.tk-his-title { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--text-dim); }
.tk-his-tabs { gap: 2px; background: var(--bg-soft); padding: 2px; border-radius: 8px; }
.tk-his-tabs button { border-radius: 6px; padding: 4px 10px; font-size: 11.5px; color: var(--text-faint); }
.tk-his-tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.tk-his-clear { font-size: 11.5px; }
.tk-his-list { padding: 8px; gap: 2px; }
.tk-his-item { padding: 8px; border-radius: 8px; border: none; }
.tk-his-item:hover { background: var(--bg-soft); border: none; transform: none; }
.tk-his-item img { width: 44px; height: 44px; border-radius: 8px; }
.tk-his-item:hover img { transform: none; }
.tk-his-name { font-size: 12.5px; font-weight: 600; }
.tk-his-meta { margin-top: 4px; font-size: 11px; }
.tk-his-badge { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 5px; color: var(--text-faint); font-size: 10px; font-weight: 600; padding: 1px 6px; }
.tk-his-time { font-size: 10.5px; }
.tk-his-fold:hover, .tk-his-expand:hover { color: var(--text); background: var(--bg-soft); }

/* ---- 目录型侧栏（收藏/分类/充值页共用的 45 工具目录） ---- */
.side-group { margin-bottom: 2px; }
.side-group-head {
  padding: 9px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .06em; color: var(--text-faint);
}
.side-group-head:hover { background: var(--bg-soft); color: var(--text-dim); }
.side-group-head .sg-ico { filter: grayscale(1); opacity: .5; margin-right: 7px; font-size: 12px; }
.side-group-head .arr { font-size: 9px; color: var(--text-faint); }
.side-tools { padding: 2px 0 8px; }
.side-tool { padding: 7px 10px 7px 22px; margin: 1px 0; border-radius: 8px; font-size: 12.5px; color: var(--text-dim); transition: background-color .15s, color .15s; }
.side-tool:hover { background: var(--bg-soft); color: var(--text); }
.side-tool.active { position: relative; background: var(--bg-soft); color: var(--text); font-weight: 650; }
.side-tool.active::before {
  content: ""; position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--brand);
}

/* ===== v6 侧栏改版：分组卡片语言（大留白 + 卡片分组 + 单一深色主按钮） ===== */
.tk-panel { background: var(--bg-soft); border-right: 1px solid var(--border); }
.tk-panel-intro { padding: 20px 20px 14px; border-bottom: none; }
.tk-name { font-size: 16.5px; font-weight: 700; letter-spacing: -.2px; }
.tk-desc { margin-top: 5px; font-size: 12.5px; line-height: 1.6; color: var(--text-faint); }

.tk-scroll { padding: 2px 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.tk-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.tk-card-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 11px;
  font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--text-faint);
}
.tk-card-note { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--text-faint); opacity: .85; }
.tk-card-toggle { cursor: pointer; margin-bottom: 0; transition: color .16s; }
.tk-card-toggle:hover { color: var(--text); }

/* 输入区：卡片内的浅底投放区（无边框盒子，最安静的做法） */
.tk-drop { border: none; background: var(--bg-soft); border-radius: 10px; box-shadow: inset 0 0 0 1px transparent; transition: background-color .18s, box-shadow .18s; }
.tk-drop:hover, .tk-drop.hover {
  background: color-mix(in srgb, var(--text) 4%, var(--bg-soft)); border: none; animation: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 38%, transparent);
}
.tk-drop-inner { padding: 22px 12px 18px; }
.tk-drop-ico { width: auto; height: auto; background: none; border: none; border-radius: 0; color: var(--text-dim); }
.tk-drop-ico svg { width: 19px; height: 19px; }
.tk-drop-txt { margin-top: 9px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.tk-drop-url { margin-top: 5px; font-size: 11.5px; color: var(--text-faint); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.tk-drop-url:hover { color: var(--text); }
.upload-grid { gap: 10px; }

/* 模型版本 */
.tk-pills { gap: 6px; }
.tk-pill { border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--text-dim); box-shadow: none; }
.tk-pill:hover { transform: none; background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.tk-pill.on, .tk-pill.on:hover { background: var(--text); border-color: var(--text); color: var(--surface); font-weight: 650; }
.tk-model-line { margin-top: 11px; font-size: 11.5px; color: var(--text-faint); }
.tk-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }

/* 详细参数 */
.tk-adv-arr { font-size: 10px; color: var(--text-faint); }
.tk-adv { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); padding-bottom: 0; }
.tk-adv .form-item { margin-bottom: 13px; }
.tk-adv .form-item label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.tk-adv .form-item input[type="text"], .tk-adv .form-item textarea, .tk-adv .form-item select {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; font-size: 12.5px;
}
.tk-adv .form-item input:focus, .tk-adv .form-item textarea:focus, .tk-adv .form-item select:focus {
  background: var(--surface); border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent); outline: none;
}

/* 底部动作区：单一深色主按钮 */
.tk-panel-foot { background: var(--bg-soft); border-top: none; padding: 8px 14px 16px; }
.wb-cost { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; font-size: 12px; color: var(--text-faint); }
.wb-cost b { font-size: 13px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.tk-cta {
  border-radius: 999px; padding: 13px; font-size: 14px; font-weight: 700; letter-spacing: .01em;
  background: var(--text); color: var(--bg); box-shadow: none; transition: background-color .18s, opacity .18s;
}
.tk-cta:hover:not(:disabled) { transform: none; box-shadow: none; background: color-mix(in srgb, var(--text) 86%, var(--bg)); }
.tk-cta:active:not(:disabled) { transform: none; }
.tk-cta::after { display: none; }
.tk-cta:disabled { background: var(--text); }
.wb-hint { margin-top: 9px; font-size: 11px; color: var(--text-faint); text-align: center; }

/* 历史记录栏：同一套卡片语言 */
.tk-history { background: var(--bg-soft); border-left: 1px solid var(--border); }
.tk-his-head { padding: 16px 16px 12px; border-bottom: none; }
.tk-his-tabs { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 2px; gap: 2px; }
.tk-his-tabs button { border-radius: 6px; padding: 3px 9px; font-size: 11.5px; color: var(--text-faint); }
.tk-his-tabs button.on { background: var(--text); color: var(--bg); box-shadow: none; }
.tk-his-list { padding: 4px 12px 12px; gap: 8px; }
.tk-his-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 9px; }
.tk-his-item:hover { background: var(--surface); border-color: var(--border-strong); transform: none; }
.tk-his-item img { width: 42px; height: 42px; border-radius: 9px; }
.tk-his-item:hover img { transform: none; }
.tk-his-empty { padding: 44px 12px; font-size: 12px; line-height: 1.7; }

/* 画布与工具栏对齐同一底色体系 */
.tk-stage { background: var(--bg-soft); }
.tk-canvas { background: var(--bg-soft); }

/* ---- v6 细节收口 ---- */
.tk-card .upload-grid { padding: 12px; }
.tk-card .url-input { width: calc(100% - 24px); margin: 2px 12px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; font-size: 12.5px; }
.tk-his-empty::before { display: none; }
.tk-his-empty { color: var(--text-faint); }

/* ===== 前后端绑定：引擎徽标 + 后台案例展示 ===== */
/* 首页卡片：引擎状态 + 单价 */
.engine-tag { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 2.5px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; backdrop-filter: blur(6px); }
.engine-tag.real { background: rgba(16,185,129,.14); color: #0d9e6e; border: 1px solid rgba(16,185,129,.35); }
.engine-tag.mock { background: rgba(120,122,140,.12); color: var(--text-faint, #8a8b9e); border: 1px solid rgba(120,122,140,.3); }
.cost-tag { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 2.5px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: rgba(255,255,255,.85); color: var(--text-dim, #6f7080); border: 1px solid var(--border, #e7e8ef); backdrop-filter: blur(6px); }
[data-theme="dark"] .cost-tag { background: rgba(30,30,40,.75); }

/* 工作台头部：引擎徽标（紧跟工具名） */
.engine-badge { display: inline-block; margin-left: 10px; vertical-align: 3px; padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .3px; cursor: help; }
.engine-badge.on { background: rgba(16,185,129,.12); color: #0d9e6e; border: 1px solid rgba(16,185,129,.35); }
.engine-badge.warn { background: rgba(245,158,11,.12); color: #c07d08; border: 1px solid rgba(245,158,11,.35); }
[data-theme="dark"] .engine-badge.on { color: #34d399; }
[data-theme="dark"] .engine-badge.warn { color: #fbbf24; }

/* 空画布：后台配置的示例效果 */
.tk-example { margin-top: 26px; width: 100%; max-width: 720px; }
.tk-example-head { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--text-faint, #8a8b9e); margin-bottom: 14px; letter-spacing: 1px; }
.tk-example .tk-pane-img img { max-height: 220px; }
.tk-example-desc { text-align: center; margin-top: 12px; font-size: 12px; color: var(--text-faint, #8a8b9e); }

/* v7：出图选项 + 视频教程入口（后台配置驱动） */
.tut-link { display:inline-flex; align-items:center; gap:4px; margin-top:6px; font-size:12.5px; color:var(--text-dim); text-decoration:none; border:1px solid var(--border); border-radius:999px; padding:3px 10px; transition:.15s; }
.tut-link:hover { color:var(--text); border-color:var(--border-strong); }
.opt-row { display:flex; align-items:center; gap:10px; padding:6px 0; flex-wrap:wrap; }
.opt-label { font-size:12.5px; color:var(--text-faint); min-width:60px; }
.opt-pills { display:flex; gap:6px; flex-wrap:wrap; }
.opt-pill { border:1px solid var(--border); background:transparent; color:var(--text-dim); border-radius:999px; padding:5px 12px; font-size:12.5px; cursor:pointer; transition:.15s; font-family:inherit; }
.opt-pill:hover { border-color:var(--border-strong); color:var(--text); }
.opt-pill.on { background:var(--text); color:var(--bg); border-color:var(--text); }

/* v8：滑动对比 + 标签选择 + 裁剪弹窗 */
.tk-slide { position:relative; width:100%; height:100%; display:flex; align-items:center; justify-content:center; overflow:hidden; user-select:none; touch-action:none; }
.tk-slide-base { max-width:100%; max-height:100%; object-fit:contain; display:block; }
.tk-slide-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; clip-path: inset(0 50% 0 0); }
.tk-slide-line { position:absolute; top:0; bottom:0; width:2px; background:#fff; box-shadow:0 0 6px rgba(0,0,0,.45); left:50%; }
.tk-slide-line::after { content://; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:28px; height:28px; border-radius:50%; background:#fff; border:1px solid rgba(0,0,0,.15); box-shadow:0 1px 4px rgba(0,0,0,.3); }
.tk-slide-tag-l { position:absolute; left:10px; top:10px; }
.tk-slide-tag-r { position:absolute; right:10px; top:10px; }
.tag-chips { display:flex; gap:6px; flex-wrap:wrap; }
.tag-chip { border:1px solid var(--border); background:transparent; color:var(--text-dim); border-radius:999px; padding:5px 12px; font-size:12.5px; cursor:pointer; transition:.15s; font-family:inherit; }
.tag-chip:hover { border-color:var(--border-strong); color:var(--text); }
.tag-chip.on { background:var(--text); color:var(--bg); border-color:var(--text); }
/* 上传裁剪弹窗 */
.crop-mask { position:fixed; inset:0; background:rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; z-index:999; }
.crop-mask[hidden] { display:none; }
.crop-modal { width:min(92vw,860px); background:var(--card); border-radius:16px; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,.35); display:flex; flex-direction:column; }
.crop-head { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--border); }
.crop-head b { font-size:15px; }
.crop-x { border:none; background:none; font-size:22px; color:var(--text-faint); cursor:pointer; line-height:1; padding:0 4px; }
.crop-stage { position:relative; flex:1; display:flex; align-items:center; justify-content:center; overflow:hidden; background:var(--bg-soft); min-height:320px; padding:20px; }
.crop-imgwrap { position:relative; display:inline-block; line-height:0; }
.crop-imgwrap img { display:block; max-width:100%; max-height:58vh; }
.crop-box { position:absolute; border:2px solid #fff; box-shadow:0 0 0 9999px rgba(0,0,0,.45); cursor:move; box-sizing:border-box; }
.crop-handle { position:absolute; right:-7px; bottom:-7px; width:16px; height:16px; background:#fff; border:1px solid rgba(0,0,0,.2); border-radius:3px; cursor:nwse-resize; }
.crop-foot { display:flex; align-items:center; gap:10px; padding:14px 18px; border-top:1px solid var(--border); }
.crop-hint { font-size:12px; color:var(--text-faint); flex:1; }
.crop-btn { border:1px solid var(--border); background:transparent; color:var(--text-dim); border-radius:10px; padding:8px 18px; font-size:13px; cursor:pointer; font-family:inherit; }
.crop-btn-dark { background:var(--text); color:var(--bg); border-color:var(--text); }

/* 工具图标（后台配置） */
.tool-icon { margin-right:5px; font-size:14px; }
