/* 阶段 7：全局样式（零 CDN，纯静态）。 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #f4f6f9; color: #1f2937; line-height: 1.6;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 16px; }
header { text-align: center; padding: 24px 0 8px; }
header h1 { font-size: 28px; }
header p { color: #6b7280; margin-top: 4px; }
.ad-slot {
  margin: 12px 0; padding: 14px; text-align: center; color: #9ca3af;
  background: #eef1f5; border: 1px dashed #d1d5db; border-radius: 8px;
  font-size: 13px; min-height: 60px; display: flex; align-items: center; justify-content: center;
}
.stats {
  display: flex; gap: 12px; margin: 16px 0; flex-wrap: wrap;
}
.stat-card {
  flex: 1; min-width: 140px; background: #fff; border-radius: 10px;
  padding: 12px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.stat-card .k { font-size: 12px; color: #9ca3af; }
.stat-card .v { font-size: 20px; font-weight: 600; margin-top: 2px; }
.panel {
  background: #fff; border-radius: 10px; padding: 16px; margin: 12px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.form-row { display: flex; gap: 8px; }
input[type=url], input[type=text] {
  flex: 1; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: 14px; outline: none;
}
input:focus { border-color: #3b82f6; }
button {
  padding: 10px 20px; border: 0; border-radius: 8px; cursor: pointer;
  background: #3b82f6; color: #fff; font-size: 14px;
}
button:disabled { background: #9ca3af; cursor: not-allowed; }
button.ghost { background: #eef1f5; color: #1f2937; }
.banner { border-radius: 8px; padding: 12px 16px; margin: 12px 0; font-size: 14px; }
.banner.warn { background: #fef3c7; border: 1px solid #f59e0b; color: #92400e; }
.banner.err { background: #fee2e2; border: 1px solid #ef4444; color: #991b1b; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
th { color: #9ca3af; font-weight: 500; }
tr.clickable { cursor: pointer; }
/* 任务列表：状态列容纳"🧹 已清理"等长标签（不换行） */
table th:nth-child(3), table td:nth-child(3) { min-width: 88px; }
tr.clickable:hover { background: #f9fafb; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.tag.done { background: #dcfce7; color: #166534; }
.tag.downloading { background: #dbeafe; color: #1e40af; }
.tag.pending { background: #fef3c7; color: #92400e; }
.tag.failed, .tag.evicted { background: #fee2e2; color: #991b1b; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; }
.pager span { font-size: 13px; color: #6b7280; }
.progress { height: 14px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin: 8px 0; }
.progress > div { height: 100%; background: #3b82f6; width: 0; transition: width .3s; }
.progress-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #6b7280; }
.progress-stats .k { color: #9ca3af; }
.progress-stats .v { color: #1f2937; font-weight: 500; }
.cmd {
  display: flex; gap: 8px; align-items: center; background: #111827; color: #e5e7eb;
  border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 13px;
  font-family: Consolas, monospace; word-break: break-all;
}
.cmd button { background: #374151; padding: 6px 12px; font-size: 12px; flex-shrink: 0; }
.cmd span { flex: 1; }
.big-btn {
  display: inline-block; background: #16a34a; color: #fff; text-decoration: none;
  padding: 12px 28px; border-radius: 10px; font-size: 16px; margin: 8px 0;
}
.muted { color: #9ca3af; font-size: 13px; }
footer { text-align: center; color: #9ca3af; font-size: 12px; padding: 20px 0; }

/* ---- 详情页填料（任务信息/工具卡/使用说明）---- */
.kv { width: 100%; border-collapse: collapse; }
.kv td { padding: 8px 4px; font-size: 14px; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.kv td.k { color: #9ca3af; width: 92px; white-space: nowrap; }
.kv td.v { color: #1f2937; word-break: break-all; }
/* 长字段行（URL/UUID）：flex 让主内容占 1fr 撑开、动作组固定右侧，
   避免按钮被长内容折行挤压。`min-width:0` 防止 flex 子项拒绝收缩。 */
.kv td.v.flex-row { display: flex; gap: 8px; align-items: flex-start; }
.kv td.v.flex-row > .main { flex: 1; min-width: 0; word-break: break-all; }
.kv td.v.flex-row > .main a { color: #2563eb; text-decoration: none; }
.kv td.v.flex-row > .main a:hover { text-decoration: underline; }
.kv td.v.flex-row > .main.mono { font-family: Consolas, monospace; font-size: 13px; }
.kv td.v.flex-row > .acts { flex-shrink: 0; display: flex; gap: 4px; }
.kv tr:last-child td { border-bottom: 0; }
/* 长字段行动作按钮：胶囊标签样式（与"下载中"状态 tag 同款：同文字高、圆角、内联）。
   注意：HTML 里 .act 直接挂在 button/a 上（不是容器），所以选择器必须命中 .act 自己或其内的 a/button；
   用 attribute 选择器 + .act 双兜底，确保不被全局 button 实底样式覆盖。 */
.act,
.act *,
.kv td.v .act,
.kv td.v .act *,
#done-panel #cp-link {
  font-size: 12px !important;
  color: #1e40af !important;
  background-color: #dbeafe !important;
  border: 0 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  line-height: 1.5 !important;
  font-weight: 500 !important;
  display: inline-block !important;
}
.act:hover,
.act:hover *,
.kv td.v .act:hover,
.kv td.v .act:hover *,
#done-panel #cp-link:hover {
  color: #fff !important;
  background-color: #3b82f6 !important;
}
#done-panel #cp-link { margin-left: 8px; }
.tools-tabs { display: flex; gap: 6px; margin: 8px 0 4px; flex-wrap: wrap; }
.tools-tabs button { background: #eef1f5; color: #1f2937; font-size: 12px; padding: 6px 12px; border-radius: 6px; }
.tools-tabs button.on { background: #3b82f6; color: #fff; }
.tools-cmd { display: none; }
.tools-cmd.on { display: flex; }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tip { background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 8px; padding: 12px 14px; }
.tip h4 { font-size: 14px; margin-bottom: 6px; color: #1f2937; }
.tip p, .tip li { font-size: 13px; color: #4b5563; line-height: 1.7; }
.tip ul { padding-left: 20px; margin: 0; }
.tip code { background: #eef1f5; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

/* ---- 主页 SEO 内容区（关于 / 适用场景 / FAQ）---- */
.panel-title { font-size: 17px; margin-bottom: 10px; color: #111827; }
.panel .lead { font-size: 14px; color: #4b5563; line-height: 1.8; margin-bottom: 10px; }
.panel .lead:last-child { margin-bottom: 0; }
.panel .lead code { background: #eef1f5; padding: 1px 6px; border-radius: 4px; font-size: 13px; font-family: Consolas, monospace; }
details.faq {
  background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 8px;
  padding: 10px 14px; margin: 8px 0;
}
details.faq summary {
  cursor: pointer; font-size: 14px; font-weight: 500; color: #111827;
  list-style-position: inside;
}
details.faq summary:hover { color: #2563eb; }
details.faq p { font-size: 13px; color: #4b5563; line-height: 1.7; margin: 8px 0 0; }
details.faq p code { background: #eef1f5; padding: 1px 5px; border-radius: 4px; font-size: 12px; font-family: Consolas, monospace; }
