.sf-template-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.sf-template {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #dce3e3);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  display: grid;
  gap: 8px;
  cursor: pointer;
}
.sf-template:hover {
  border-color: var(--primary, #166b58);
}
.sf-editor {
  width: min(1040px, 94vw);
  max-width: 1040px;
}
.sf-editor-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}
.sf-editor-meta > label:first-child {
  flex: 1;
}
.sf-editor-grid {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 28px;
}
.sf-editor-grid aside {
  border-right: 1px solid var(--line, #dce3e3);
  padding-right: 20px;
}
.sf-nodes {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: grid;
  gap: 6px;
  max-height: 42vh;
  overflow: auto;
}
.sf-nodes button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}
.sf-nodes button.selected {
  background: var(--tint, #eef6f3);
  border-color: var(--primary, #166b58);
}
.sf-nodes small {
  color: var(--muted, #677b78);
}
.sf-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sf-editor label,
.sf-question > label {
  display: block;
  margin: 12px 0 6px;
}
.sf-skip {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.sf-skip input {
  width: auto !important;
}
.sf-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sf-choice input {
  flex: 1;
}
.sf-call {
  padding: 24px;
}
.sf-call-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.sf-call-heading h3 {
  margin: 0;
}
.sf-owner {
  display: block;
  max-width: 320px;
  margin-bottom: 20px;
}
.sf-owner select {
  margin-top: 6px;
}
.sf-question,
.sf-instruction {
  border-bottom: 1px solid var(--line, #dce3e3);
  padding: 16px 0;
  max-width: 760px;
}
.sf-question input,
.sf-question select,
.sf-question textarea {
  width: 100%;
}
.sf-copy {
  white-space: pre-wrap;
  line-height: 1.6;
  color: var(--muted, #677b78);
}
.sf-required {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted, #677b78);
  margin-left: 8px;
}
.sf-finish {
  border-left: 3px solid var(--primary, #166b58);
  padding-left: 16px;
  margin-top: 16px;
}
.sf-wizard-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.sf-history {
  margin-top: 24px;
  color: var(--muted, #677b78);
}
.sf-history li {
  display: grid;
  gap: 5px;
  padding: 10px 0;
}
.sf-editor form {
  min-width: 0;
}
.sf-editor .dialog-body {
  max-height: 72vh;
  overflow: auto;
}
@media (max-width: 760px) {
  .sf-editor-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .sf-editor-grid aside {
    border-right: 0;
    padding-right: 0;
  }
  .sf-nodes {
    max-height: 160px;
  }
  .sf-editor-meta,
  .sf-call-heading {
    flex-direction: column;
    align-items: stretch;
  }
  .sf-call {
    padding: 16px;
  }
  .sf-wizard-footer button {
    flex: 1;
  }
}
