.template-ending-head,
.template-ending-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.template-ending-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.template-ending-list {
  display: grid;
  gap: 10px;
}

.template-ending-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f6f9ff;
}

.template-ending-row-head {
  margin-bottom: 8px;
}

.template-ending-row textarea {
  display: block;
  width: 100%;
  min-height: 82px;
  background: #fff;
}

.template-ending-preview {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

.template-ending-preview div {
  white-space: pre-wrap;
  line-height: 1.6;
}

@media (max-width: 650px) {
  .template-ending-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
