#tool-body {
  --card-bg: #fff;
  --card-border: #ebedf0;
  --card-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  --muted: #999;
  --label-color: #555;
  --switch-off: #d8dade;
  --switch-on: #1e9fff;
  --mode-muted-bg: #f6f7f8;
}
.theme-dark-mode #tool-body {
  --card-bg: #262628;
  --card-border: #3a3a3d;
  --card-shadow: none;
  --muted: #8a8a8f;
  --label-color: #bbb;
  --switch-off: #555559;
  --switch-on: #1e9fff;
  --mode-muted-bg: #333336;
}
#tool-body .section-title {
  margin: 18px 0 8px 2px;
  font-size: 14px;
  color: var(--label-color);
}
#tool-body .section-tip {
  margin: 0 0 12px 2px;
  font-size: 12px;
  color: var(--muted);
}
#tool-body .example-link {
  color: #1e9fff;
  margin: 0 14px 0 4px;
  cursor: pointer;
}
#tool-body .example-link:hover {
  text-decoration: underline;
}
#tool-body .rule-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 12px 14px;
  margin-bottom: 12px;
}
#tool-body .rule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
#tool-body .rule-no {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-color);
}
#tool-body .mode-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  overflow: hidden;
  background: var(--mode-muted-bg);
}
#tool-body .mode-btn {
  padding: 4px 14px;
  font-size: 12px;
  line-height: 1.6;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
#tool-body .mode-btn + .mode-btn {
  border-left: 1px solid var(--card-border);
}
#tool-body .mode-btn.active {
  background: var(--switch-on);
  color: #fff;
}
#tool-body .rule-del {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
}
#tool-body .rule-del:hover {
  color: #ff5722;
}
#tool-body .rule-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#tool-body .rule-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
#tool-body .rule-label {
  flex-shrink: 0;
  width: 60px;
  font-size: 13px;
  color: var(--label-color);
  text-align: right;
  align-self: flex-start;
  line-height: 40px;
}
@media screen and (max-width: 767px) {
  #tool-body .rule-label {
    width: 52px;
  }
}
#tool-body .rule-row textarea.layui-textarea {
  flex: 1;
  min-height: 40px;
  height: 40px;
  resize: none;
}
#tool-body .opt-label {
  font-size: 13px;
  color: var(--label-color);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#tool-body .ml-tip {
  position: relative;
  left: -4px;
  font-size: 13px;
}
#tool-body .ml-tip .fa-question-circle {
  color: var(--muted);
  cursor: help;
}
#tool-body .switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--switch-off);
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
#tool-body .switch .switch-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: left .2s;
}
#tool-body .switch.on {
  background: var(--switch-on);
}
#tool-body .switch.on .switch-dot {
  left: 20px;
}
#tool-body .global-opts {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 4px 0 16px 2px;
}
#tool-body .head-input-box {
  margin-top: 10px;
}