.editor-main {
  flex: 1;
  padding: 1.25rem 2rem;
  overflow: auto;
  background: #efe4cf;
}

.editor-banner {
  background: #fff8e1;
  border: 1px solid #c8b78f;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.editor-banner.flash {
  background: #d8f0c4;
  border-color: #7aa45a;
  transition: background 600ms ease-out, border-color 600ms ease-out;
}

.btn-ghost.danger { border-color: #b21f1f; color: #b21f1f; }
.btn-ghost.danger:hover { background: rgba(178, 31, 31, 0.08); }

.chain-block {
  background: #fffaf0;
  border: 1px solid #c8b78f;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 0 #c8b78f;
}
.chain-block > h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

.node-card {
  border: 1px solid #d6c8a8;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin: 0.5rem 0;
  background: #fdf6e8;
}
.node-card.dirty { border-color: #8b6a3b; box-shadow: 0 0 0 2px rgba(139,106,59,0.18); }

.node-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}
.node-card-head .node-id {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 3px;
  color: #555;
}
.node-card-head .node-title { font-weight: 700; flex: 1; }
.node-card-head .node-reset {
  font-size: 0.75rem;
  border: 1px solid #b21f1f;
  background: transparent;
  color: #b21f1f;
  border-radius: 999px;
  padding: 1px 8px;
  cursor: pointer;
  font-family: inherit;
}
.node-card-head .node-reset:hover { background: rgba(178, 31, 31, 0.08); }
.node-card-head .node-reset[hidden] { display: none; }
.node-card-head .chevron { font-size: 0.85rem; opacity: 0.5; }

.node-card-body {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.4rem 0.75rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #d6c8a8;
}
.node-card-body[hidden] { display: none; }
.node-card-body label {
  font-size: 0.8rem;
  font-weight: 600;
  align-self: center;
  color: #5a4a2c;
}
.node-card-body input[type="text"],
.node-card-body input[type="number"],
.node-card-body select,
.node-card-body textarea {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid #c8b78f;
  border-radius: 4px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.node-card-body textarea { min-height: 3.2em; resize: vertical; }
.node-card-body input[type="number"] { max-width: 9em; }

.prereq-row, .level-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.3rem;
}
.prereq-row select { flex: 2; }
.prereq-row input[type="number"] { flex: 1; max-width: 6em; }
.level-row .lvl-idx {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 3px;
  color: #555;
  width: 2.5em;
  text-align: center;
}
.level-row input[type="number"] { width: 7em; flex: 0 0 auto; }
.level-row input[type="text"] { flex: 1; }
.row-remove {
  background: transparent;
  border: 1px solid #b21f1f;
  color: #b21f1f;
  border-radius: 4px;
  font: inherit;
  font-size: 0.85rem;
  padding: 1px 6px;
  cursor: pointer;
}
.row-remove:hover { background: rgba(178, 31, 31, 0.08); }
.row-add {
  background: transparent;
  border: 1px dashed #8b6a3b;
  color: #6e5128;
  border-radius: 4px;
  font: inherit;
  font-size: 0.85rem;
  padding: 2px 8px;
  cursor: pointer;
  margin-top: 0.2rem;
}
.row-add:hover { background: rgba(139,106,59,0.08); }
