.notes-tool {
  min-width: 0;
}

.notes-branch {
  display: grid;
  grid-template-columns: minmax(12ch, 24ch) minmax(12ch, 1fr) minmax(10ch, 14ch) 6ch 6ch auto;
  gap: 0.25lh 1ch;
  align-items: baseline;
  padding: 0.5lh 0;
  border-bottom: 1px solid var(--line);
}

.notes-name,
.notes-entry input,
.notes-coefficient input {
  width: 100%;
  min-width: 0;
  padding: 0;
}

.notes-name {
  border-bottom-color: transparent;
}

.notes-name:focus {
  border-bottom-color: var(--accent);
}

.notes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1ch;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-list button:hover,
.notes-list button:focus-visible {
  color: var(--danger);
  text-decoration: line-through;
}

.notes-entry {
  display: flex;
  min-width: 0;
}

.notes-entry input {
  flex: 1;
}

.notes-branch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1ch;
}

.notes-coefficient,
.notes-branch-status {
  grid-column: 1 / -1;
}

.notes-coefficient {
  display: flex;
  align-items: baseline;
  gap: 1ch;
}

.notes-coefficient input {
  max-width: 12ch;
}

.notes-branch-status {
  min-height: 1lh;
  margin: 0;
}

.notes-add {
  margin-top: 1lh;
}

.notes-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2ch;
}

.notes-summary {
  margin: 1lh 0;
}

.notes-summary-row {
  display: grid;
  grid-template-columns: 24ch minmax(0, 1fr);
  gap: 1ch;
  overflow-wrap: anywhere;
}

.notes-main-result {
  margin: 1lh 0;
  color: var(--accent);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.notes-copy-bulletin {
  min-width: 23ch;
}

.notes-copy-scale {
  min-width: 21ch;
}

.notes-scale-result,
.notes-target-result {
  min-width: 0;
}

.notes-target-current {
  min-height: 1lh;
  margin: 0.5lh 0;
  overflow-wrap: anywhere;
}

.notes-scale-columns {
  columns: 12ch;
  column-gap: 2ch;
}

.notes-scale-pair {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
}

.notes-scale-pair .kit-table {
  width: 100%;
}

@media (max-width: 599px) {
  .notes-branch {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 0.25lh 1ch;
  }

  .notes-name {
    grid-column: 1;
  }

  .notes-list {
    grid-column: 1 / -1;
  }

  .notes-entry {
    grid-column: 1 / -1;
  }

  .notes-coefficient,
  .notes-branch-status {
    grid-column: 1 / -1;
  }

  .notes-summary-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-bottom: 0.5lh;
  }

  .notes-scale-columns {
    columns: 2;
  }
}
