.todo {
  position: relative;
  display: grid;
  grid-template-columns: 320px 6px minmax(0, 1fr);
  height: 100%;
  min-height: 420px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: #1c2430;
  background: #fff;
}
.todo-create {
  display: block;
  max-width: 36rem;
  padding: 24px 20px 40px;
}
.todo-create h1 { margin: 0 0 8px; font-size: 28px; font-weight: 650; line-height: 1.2; }
.todo-create p { margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
.todo > button.todo-pane-toggle {
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 8px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: #eef1f5;
}
.todo.is-editor-closed .todo-form,
.todo.is-editor-closed .todo-resize {
  overflow: hidden;
  padding: 0;
  visibility: hidden;
  pointer-events: none;
}
.todo-form {
  min-width: 0;
  overflow: auto;
  padding: 40px 14px 24px;
  display: grid;
  gap: 12px;
  align-content: start;
  background: #f7f8fa;
}
.todo-form h1 { margin: 0; font-size: 20px; line-height: 1.2; }
.todo-form h2 { margin: 0; font-size: 13px; font-weight: 650; }
.todo-note, .todo-status { margin: 0; font-size: 13px; line-height: 1.4; color: #5c6775; }
.todo-status[data-error="true"] { color: #a32020; }
.todo-columns { display: grid; gap: 8px; }
.todo-column-edit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.todo label { display: grid; gap: 4px; font-size: 13px; }
.todo-form input, .todo-create input, .todo-bar button, .todo-form button, .todo-create button, .todo-pane-toggle {
  font: inherit;
}
.todo-form input, .todo-create input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #d5d9e0;
  border-radius: 8px;
  background: #fff;
  color: #1c2430;
}
.todo-form button, .todo-create button, .todo-pane-toggle {
  width: auto;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: #e7ebf0;
  color: #1c2430;
  cursor: pointer;
}
.todo-form button:disabled { color: #8b919a; }
.todo-resize { background: #e6e8ee; cursor: col-resize; }
.todo-resize:hover, .todo-resize:focus { background: #3d6bf5; outline: none; }
.todo-stage { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #e7ebf0; }
.todo-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 64px 8px 12px;
  background: #f7f8fa;
}
.todo-board-title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 650;
}
.todo-switch {
  display: flex;
  padding: 2px;
  border-radius: 8px;
  background: #e1e5eb;
}
.todo-switch button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 4px 10px;
  color: #3c4654;
  cursor: pointer;
}
.todo-switch button[aria-pressed="true"] {
  background: #fff;
  color: #1c2430;
  box-shadow: 0 1px 2px rgba(20, 24, 32, .16);
}
.todo-bar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.todo-dirty { min-width: 4.5rem; font-size: 13px; text-align: right; color: #9a3412; }
.todo-save {
  border: 0;
  border-radius: 8px;
  background: #e7ebf0;
  color: #6b7380;
  padding: 4px 10px;
}
.todo-save.is-dirty { background: #1c2430; color: #fff; cursor: pointer; }
.todo-surface { min-height: 0; overflow: auto; }
.todo-surface.is-board { background: #e7ebf0; }
.todo-board {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-height: 100%;
  padding: 12px;
  box-sizing: border-box;
}
.todo-lane {
  flex: 1 0 220px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 12rem;
  padding: 8px;
  background: rgba(255, 255, 255, .72);
  border-radius: 12px;
}
.todo-lane.is-aimed, .todo-sheet-group.is-aimed { background: #dbe6fb; }
.todo-lane.is-insert-before { box-shadow: inset 3px 0 0 #3d6bf5; }
.todo-sheet-group.is-insert-before { box-shadow: inset 0 3px 0 #3d6bf5; }
.todo-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 2px 4px;
  cursor: grab;
  touch-action: none;
}
.todo-lane-title {
  margin: 0;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  padding: 0;
}
input.todo-lane-title {
  width: 100%;
  border-bottom: 1px solid #b7c0cc;
  border-radius: 0;
}
.todo-count { font-size: 12px; color: #6b7380; }
.todo-cards { display: grid; gap: 8px; align-content: start; }
.todo-empty {
  display: none;
  margin: 0;
  padding: 10px 8px;
  color: #6b7380;
  font-size: 13px;
}
.todo.is-dragging .todo-lane.is-aimed .todo-empty,
.todo-cards:not(:has(.todo-card:not(.is-lifted))) .todo-empty { display: block; }
.todo-lane.is-insert-end .todo-cards::after,
.todo-sheet-group.is-insert-end .todo-cards::after {
  content: "";
  display: block;
  height: 3px;
  border-radius: 2px;
  background: #3d6bf5;
}
.todo-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20, 24, 32, .14);
  cursor: grab;
  touch-action: none;
}
.todo-card.is-selected { box-shadow: 0 0 0 2px #3d6bf5, 0 1px 2px rgba(20, 24, 32, .14); }
.todo-card.is-lifted {
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  box-shadow: none;
}
.todo-card.is-insert-before::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: -6px;
  height: 3px;
  border-radius: 2px;
  background: #3d6bf5;
}
.todo.is-dragging, .todo.is-dragging .todo-card, .todo.is-dragging .todo-lane-head { cursor: grabbing; }
.todo-headline, .todo-headline-input {
  margin: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  padding: 0;
}
.todo-headline.is-empty { color: #8b919a; font-weight: 500; }
.todo-node-line, .todo-card .todo-quiet {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.todo-node-line { margin: 0; color: #4c5663; font-size: 13px; }
.todo-nodes, .todo-links { display: grid; gap: 4px; justify-items: start; }
.todo-node, .todo-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.todo-node input {
  flex: 1;
  min-width: 6rem;
  border: 0;
  border-bottom: 1px solid #d5d9e0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  padding: 2px 0;
}
.todo-times {
  margin: 4px 0 0;
  color: #66707a;
  font-size: 12px;
  line-height: 1.4;
}
.todo-card-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.todo-quiet, .todo-new {
  border: 0;
  background: transparent;
  color: #4c5663;
  font: inherit;
  cursor: pointer;
}
.todo-quiet { width: auto; max-width: 100%; padding: 0; font-size: 12px; text-align: left; }
.todo-quiet:hover, .todo-new:hover { color: #1d4ed8; }
.todo-new {
  padding: 6px 8px;
  border-radius: 8px;
  text-align: left;
  font-size: 13px;
}
.todo-new:hover { background: rgba(28, 36, 48, .06); }
.todo-file, .todo-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.todo-surface.is-print { background: #fff; }
.todo-print {
  max-width: 40rem;
  margin: 0 auto;
  padding: 48px 40px 72px;
  box-sizing: border-box;
  background: #fff;
  color: #202020;
  font-family: Helvetica, Arial, "Nimbus Sans", sans-serif;
}
.todo-print h1 {
  margin: 0 0 28px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
}
.todo-print h2 {
  margin: 20px 0 8px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}
.todo-print section + section h2 {
  margin-top: 28px;
  padding-top: 8px;
  border-top: 1px solid #d5d5d5;
}
.todo-print p { margin: 0 0 4px; font-size: 16px; line-height: 1.5; }
.todo-print-headline { font-weight: 600; }
.todo-print-time { font-size: 14px; color: #444; }
.todo-print-item { margin: 0 0 14px; }
.todo-print-item p:not(.todo-print-headline) { color: #333; }
.todo-sheet { display: grid; gap: 18px; padding: 8px 16px 28px; }
.todo-sheet-group { display: grid; gap: 8px; }
.todo-sheet .todo-card { cursor: grab; }
.todo-ghost {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  box-sizing: border-box;
  padding: 10px 12px;
  background: #fff;
  color: #1c2430;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(20, 30, 50, .28);
  transform: rotate(1.5deg);
  font: 600 14px/1.35 ui-sans-serif, system-ui, sans-serif;
}
.todo-ghost.is-column { transform: none; font-weight: 650; }
.todo-dialog {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(247, 248, 250, .82);
}
.todo-dialog-window {
  width: min(28rem, 100%);
  max-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(20, 30, 50, .2);
  overflow: hidden;
}
.todo-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.todo-dialog-head span { font-size: 16px; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-dialog-head button, .todo-dialog-list button {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.todo-dialog-list { overflow: auto; min-height: 8rem; }
.todo-dialog-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 4px;
  border-bottom: 1px solid #eef0f3;
  border-radius: 0;
}
.todo-dialog-list button:hover, .todo-dialog-list button:focus { background: #f3f6fb; }
.todo button:focus-visible, .todo input:focus-visible {
  outline: 2px solid #3d6bf5;
  outline-offset: 1px;
}
@media (max-width: 800px) {
  .todo { grid-template-columns: minmax(0, 1fr); }
  .todo-resize { display: none; }
  .todo-form { max-height: 16rem; }
  .todo-board { flex-direction: column; }
  .todo-lane { max-width: none; }
  .todo-print { padding: 28px 20px 48px; }
}
