.guided-rule-editor {
  display: grid;
  gap: 18px;
}

.manual-run-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(57, 132, 229, 0.08);
  color: var(--text);
}

.guided-rule-editor .field-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.guided-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guided-rule-step {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

.guided-rule-step:nth-child(1) { border-top: 3px solid #3984e5; }
.guided-rule-step:nth-child(2) { border-top: 3px solid #7867d9; }
.guided-rule-step:nth-child(3) { border-top: 3px solid #36a76f; }
.guided-rule-step:nth-child(4) { border-top: 3px solid #e99936; }

.guided-rule-custom {
  margin-top: 8px;
}

.guided-rule-custom[hidden] {
  display: none;
}

.guided-rule-notes {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.guided-rule-notes summary {
  cursor: pointer;
  font-weight: 700;
}

.guided-rule-notes .modal-input {
  min-height: 74px;
  margin-top: 10px;
  padding: 10px;
}

.guided-rule-preview {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(57, 132, 229, 0.25);
  border-radius: 12px;
  background: rgba(57, 132, 229, 0.06);
}

.guided-rule-preview > strong {
  margin-bottom: 2px;
}

.guided-rule-preview div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.guided-rule-preview span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.guided-rule-preview b {
  font-size: 13px;
  line-height: 1.35;
}

body[data-theme="dark"] .guided-rule-step,
body[data-theme="dark"] .guided-rule-notes {
  background: rgba(255, 255, 255, 0.035);
}

body[data-theme="dark"] .guided-rule-preview {
  background: rgba(57, 132, 229, 0.12);
}

@media (max-width: 720px) {
  .guided-rule-grid {
    grid-template-columns: 1fr;
  }
}
