.task-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 2px;
}
.todo-list, .month-todo-list { gap: 0; }
.todo-item {
  grid-template-columns: minmax(0, 1fr) 24px;
  min-height: 27px;
  padding: 1px 0 1px 2px;
  line-height: 1.28;
}
.month-todo-item {
  grid-template-columns: minmax(0, 1fr) 21px;
  min-height: 22px;
  line-height: 1.25;
}
.library-row { min-height: 30px; }
.library-content {
  min-height: 30px;
  padding: 2px 34px 2px 2px;
  line-height: 1.35;
  white-space: pre-wrap;
}
.todo-text { min-width: 0; white-space: pre-wrap; }
.edit-button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #a3afbd;
  opacity: 0;
  cursor: pointer;
}
.todo-item:hover .edit-button,
.month-todo-item:hover .edit-button,
.library-row:hover .edit-button,
.edit-button:focus-visible { opacity: 1; }
.edit-button:hover { color: var(--blue-deep); background: var(--blue-soft); }
.library-row > .edit-button { position: absolute; right: 5px; top: 3px; }
.add-entry {
  flex: 0 0 25px;
  width: 100%;
  height: 25px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: transparent;
  font-size: 11px;
  text-align: left;
  cursor: text;
}
.add-entry:hover, .add-entry:focus-visible { color: #8ba7c3; }
.editor-form { flex: 0 0 auto; }
.entry-textarea {
  resize: none;
  overflow-y: auto;
  white-space: pre-wrap;
}
.inline-entry-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; gap: 4px; align-items: start; }
.inline-entry-editor .text-input { min-height: 27px; padding: 3px 2px; }
.inline-editor-actions { display: flex; gap: 2px; }
.inline-editor-actions button { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #8c9aaa; cursor: pointer; }
.inline-editor-actions button:hover { background: var(--blue-soft); color: var(--blue-deep); }
.entry-full-preview {
  position: fixed;
  z-index: 1000;
  width: max-content;
  max-width: min(420px, calc(100vw - 16px));
  max-height: min(260px, calc(100vh - 16px));
  overflow: auto;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #344156;
  box-shadow: 0 10px 32px rgba(42,72,110,.14);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.library-add-entry { margin-top: 1px; }
@media (hover: none), (pointer: coarse) { .edit-button { opacity: 1; } }
@media (display-mode: standalone) { textarea { -webkit-user-select: text; user-select: text; } }
