.notebook-row,
.note-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.notebook-row > button:first-child,
.note-row > button:first-child {
  min-width: 0;
}

.notebook-list .row-menu-button,
.note-menu-button {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
}

.notebook-list .row-menu-button {
  display: grid;
  width: 44px;
  min-width: 42px;
  place-items: center;
  padding: 8px;
}

.note-menu-button {
  width: 48px;
  border-top: 1px solid #e7e5de;
  color: #65706b;
}

.note-row:has(.note-card.active) {
  background: #fffefa;
  box-shadow: inset 4px 0 var(--green);
}

.note-row:has(.note-card.active) .note-card {
  box-shadow: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast button {
  border: 1px solid #ffffff88;
  border-radius: 7px;
  background: transparent;
  color: white;
  padding: 5px 8px;
  font-weight: 800;
}

.confirm-message {
  margin: 20px 0;
  line-height: 1.7;
  white-space: pre-wrap;
}

.import-history {
  display: grid;
  gap: 8px;
}

.import-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
}

.import-history-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.import-history-row strong,
.import-history-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-history-row button {
  min-height: 40px;
}

@media (max-width: 700px) {
  .notebook-row > button:first-child,
  .note-row > button:first-child,
  .notebook-list .row-menu-button,
  .note-menu-button {
    min-height: 52px;
  }

  .toast {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    justify-content: space-between;
  }
}
