[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  color: #303133;
  background: #f5f6f8;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.cf-shell {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - var(--unified-shell-header-height, 82px));
}
.cf-nav {
  flex: 0 0 248px;
  width: 248px;
  box-sizing: border-box;
  background: #fff;
  border-right: 1px solid #e6e8eb;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--unified-shell-header-height, 82px);
  height: calc(100vh - var(--unified-shell-header-height, 82px));
}
.cf-nav-scroll { flex: 1; overflow: auto; padding: 8px 8px 12px; }
.cf-nav-foot { border-top: 1px solid #eef0f3; padding: 8px; }
.cf-group {
  margin: 14px 8px 6px;
  color: #909399;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}
.cf-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 2px;
  padding: 7px 4px 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #303133;
  text-align: left;
}
.cf-nav-item.is-on { background: #f3f4f6; box-shadow: inset 3px 0 0 #1f2329; }
.cf-nav-item:hover { background: #f7f8fa; }
.cf-nav-text { display: flex; flex-direction: column; min-width: 0; }
.cf-nav-text strong { font-size: 13px; font-weight: 650; line-height: 1.3; }
.cf-nav-text small { color: #909399; font-size: 11px; line-height: 1.3; }
.cf-gear {
  margin-left: auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #909399;
  flex: 0 0 auto;
}
.cf-gear:hover { background: #eef0f3; color: #303133; }
.cf-gear svg { width: 16px; height: 16px; display: block; margin: 0 auto; }
.cf-stage { flex: 1; min-width: 0; padding: 16px 18px 28px; overflow: auto; }
.cf-stage-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cf-stage-hd h1 { margin: 0; font-size: 18px; font-weight: 700; color: #1f2329; }
.cf-note, .cf-meta, .cf-opt, .cf-desc { color: #72767b; }
.cf-note { margin: 4px 0 0; font-size: 12px; }
.cf-source { margin: 4px 0 0; font-size: 12px; color: #606266; }
.cf-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.cf-step {
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cf-step-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f3;
  color: #1f2329;
  font-size: 14px;
  font-weight: 700;
}
.cf-step-no {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #303133;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.cf-step-bd { padding: 12px 14px 16px; overflow: auto; flex: 1; }
.cf-label { display: block; margin: 8px 0 0; color: #606266; font-size: 12px; }
.cf-input, .cf-select, .cf-textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: #fff;
  padding: 6px 10px;
}
.cf-textarea { min-height: 140px; resize: vertical; }
.cf-inline { display: flex; align-items: center; gap: 8px; }
.cf-inline .cf-input, .cf-inline .cf-select { margin-top: 0; flex: 1; }
.cf-file { max-width: 168px; }
.cf-video-row .cf-file { max-width: 210px; }
.cf-field { margin: 0 0 12px; }
.cf-field-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cf-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #303133;
  font-size: 12px;
}
.cf-req { color: #b88230; font-size: 12px; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.cf-chip, .cf-mini, .cf-recent-item {
  border: 1px solid #dcdfe6;
  border-radius: 999px;
  background: #fff;
  color: #303133;
  padding: 4px 10px;
  font-size: 12px;
}
.cf-chip:hover, .cf-mini:hover { border-color: #c0c4cc; background: #f7f8fa; }
.cf-chip:disabled, .cf-primary:disabled, .cf-mini:disabled { opacity: .55; cursor: wait; }
.cf-chip.is-on, .cf-saved.is-on { border-color: #1f2329; background: #f3f4f6; }
.cf-scan-item.is-ok { border-color: #b7ebc6; background: #f3faf5; }
.cf-scan-item.is-empty { border-color: #e4e7ed; background: #f5f7fa; color: #909399; }
.cf-scan-item.is-auth_required, .cf-scan-item.is-auth_failed { border-color: #f3d19e; background: #fdf6ec; color: #b88230; }
.cf-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.cf-primary {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #1f2329;
  color: #fff;
}
.cf-stop {
  height: 36px;
  padding: 0 16px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  background: #fff;
  color: #303133;
}
.cf-text-btn, .cf-login-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #0b579f;
  text-decoration: none;
  font-size: 13px;
}
#cf-llm-opt { margin-left: 12px; }
#cf-llm-opt:disabled { opacity: .55; cursor: wait; }
.cf-llm-out {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f6f7fb;
  border: 1px solid #eef0f3;
  border-radius: 8px;
  color: #303133;
  font-size: 13px;
  line-height: 1.55;
}
.cf-llm-out[hidden] { display: none; }
.cf-llm-out-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
}
.cf-llm-out-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.cf-error { color: #c45656; margin: 6px 0; }
.cf-status { margin: 0 0 6px; color: #303133; font-weight: 650; }
.cf-empty { margin: 28px 0; color: #909399; text-align: center; font-size: 13px; }
.cf-result-video, .cf-result-image {
  display: block;
  width: 100%;
  max-height: 280px;
  margin-top: 8px;
  object-fit: contain;
  background: #f3f4f6;
  border-radius: 8px;
}
.cf-result-text {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  padding: 12px;
  background: #f6f7fb;
  border-radius: 8px;
  color: #303133;
}
.cf-recent { margin-top: 12px; }
.cf-recent-title { margin: 0 0 6px; font-size: 13px; color: #303133; }
.cf-recent-item { margin: 0 8px 8px 0; border-radius: 6px; }
.cf-saved { margin-top: 8px; padding: 8px; border: 1px solid #eef0f3; border-radius: 8px; }
.cf-saved-line { margin: 0 0 6px; color: #303133; font-size: 13px; word-break: break-all; }
.cf-mask {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(17, 24, 39, .35);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow: auto;
}
.cf-dialog {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 12px;
  padding: 16px 16px 20px;
  box-shadow: 0 12px 40px rgba(17, 24, 39, .12);
  position: relative;
}
.cf-dialog-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cf-dialog-title { margin: 0; font-size: 16px; font-weight: 700; color: #1f2329; }
.cf-x {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #909399;
  font-size: 22px;
}
.cf-source-switch { display: flex; gap: 8px; margin: 8px 0 12px; }
.cf-source-switch label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  background: #fff;
}
.cf-pane { padding-top: 4px; }
.cf-settings-row, .cf-res-card {
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  padding: 12px;
  margin: 0 0 10px;
}
.cf-settings-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 10px; align-items: center; }
.cf-res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cf-tabs { display: flex; gap: 8px; margin: 0 0 12px; }
.cf-tab {
  border: 1px solid #dcdfe6;
  border-radius: 999px;
  background: #fff;
  padding: 4px 12px;
  color: #303133;
}
.cf-tab.is-on { background: #1f2329; color: #fff; border-color: #1f2329; }
.cf-login-hint, .cf-empty-machine { margin: 0 0 8px; color: #303133; }
.cf-skip { color: #909399; font-size: 12px; margin: 4px 0; }
.cf-inline-select { max-width: 280px; }
@media (max-width: 1100px) {
  .cf-steps { grid-template-columns: 1fr; }
  .cf-step { min-height: 0; }
}
@media (max-width: 768px) {
  .cf-shell { flex-direction: column; }
  .cf-nav {
    width: 100%;
    flex: none;
    position: static;
    height: auto;
    max-height: 280px;
  }
  .cf-settings-row { grid-template-columns: 1fr; }
}
