:root { --nj-entry: 22; }

.nj22-line-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 10px;
  margin-block: 12px;
  padding: 14px;
  border: 1px solid #ddc8a9;
  border-radius: 12px;
  background: #f9f2e5;
}
.nj22-line-editor[hidden] { display: none !important; }
.nj22-line-editor > strong, .nj22-editor-actions { grid-column: 1 / -1; }
.nj22-line-editor label { display: grid; gap: 5px; min-width: 0; }
.nj22-line-editor input { width: 100%; direction: ltr; text-align: start; }
.nj22-editor-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ui22 .nj22-line-actions button, .ui22 .nj22-editor-actions button {
  min-height: 36px;
  padding: 5px 10px;
  margin: 2px;
  color: #593a1b;
  background: #fffdfa;
  border: 1px solid #d4c0a3;
  border-radius: 8px;
}
.ui22 .nj22-editor-actions button:first-child { background: #69451f; color: white; }
.nj22-serial-count { display: block; margin-block: 5px; color: #6a4a25; }
.nj22-save-facts {
  display: flex;
  flex: 1 0 100%;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}
.nj22-save-facts > div {
  flex: 1 1 135px;
  padding: 8px 10px;
  border: 1px solid #c9ded1;
  border-radius: 8px;
  background: #fff;
}
.nj22-save-facts dt { font-size: .82rem; }
.nj22-save-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 650px) {
  .ui22 .nj22-line-actions button, .ui22 .nj22-editor-actions button { min-height: 44px; }
}
