/* LF 和 DX 共用待辦操作的樣式，卡片底色由各站提供。 */
.todo-item { box-sizing:border-box; display:flex; align-items:flex-start; gap:14px; min-height:44px; padding:8px 4px; cursor:pointer; }
.todo-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.todo-title { font-size:1rem; color:#0f172a; white-space:pre-wrap; overflow-wrap:anywhere; }
.dark .todo-title { color:#fff; }
.todo-meta { font-size:0.8125rem; color:#64748b; }
.dark .todo-meta { color:#8A92A6; }
.todo-ck { box-sizing:border-box; appearance:none; -webkit-appearance:none; flex:none; width:22px; height:22px; margin:1px 0 0; border-radius:50%; border:2px solid #94a3b8; display:grid; place-content:center; cursor:pointer; background:transparent; transition:all .15s; }
.dark .todo-ck { border-color:#4B5263; }
.todo-ck.p1, .dark .todo-ck.p1 { border-color:#FB923C; }
.todo-ck:checked, .dark .todo-ck:checked { background:#007E8A; border-color:#007E8A; }
.todo-ck:checked::after { content:""; width:5px; height:10px; border:solid #fff; border-width:0 2px 2px 0; transform:translateY(-1px) rotate(45deg); }
.todo-ck:focus-visible { outline:2px solid #00A3B4; outline-offset:2px; }
/* 待辦列：勾選、刪除、群組、語音 */
.todo-list { margin:0; padding:0; list-style:none; }
.todo-row { display:flex; align-items:flex-start; gap:4px; border-bottom:1px solid #f1f5f9; }
.dark .todo-row { border-bottom-color:rgba(255,255,255,.06); }
.todo-list .todo-row:last-child { border-bottom:0; }
.todo-row .todo-item { flex:1; min-width:0; cursor:default; }
.todo-row { position:relative; }
.todo-ck-hit { display:grid; place-content:center; margin:-11px; padding:11px; cursor:pointer; flex:none; }
.todo-ck-hit .todo-ck { margin-top:0; }
.todo-text { cursor:text; border-radius:6px; }
.todo-text:focus-visible { outline:2px solid #00A3B4; outline-offset:2px; }
.todo-edit { flex:1; min-width:0; min-height:56px; padding:6px 10px; resize:vertical; border-radius:10px; border:1px solid #007E8A; background:transparent; color:inherit; font:inherit; font-size:1rem; outline:none; }
.todo-row:has(.todo-ck:checked) .todo-title { text-decoration:line-through; opacity:.5; }
.todo-meta.is-overdue { color:#ea580c; }
.dark .todo-meta.is-overdue { color:#fb923c; }
.todo-tag { color:#007E8A; }
.dark .todo-tag { color:#00A3B4; }
.todo-group { margin:6px 0 0; font-size:.75rem; font-weight:700; letter-spacing:.05em; color:#64748b; }
.dark .todo-group { color:#8A92A6; }
.todo-group.is-overdue { color:#ea580c; }
.dark .todo-group.is-overdue { color:#fb923c; }
.todo-empty { padding:14px 4px; font-size:.875rem; color:#64748b; }
.dark .todo-empty { color:#8A92A6; }
.todo-chevron { transition:transform .2s; }
[aria-controls].is-open .todo-chevron { transform:rotate(180deg); }
button.todo-mic { flex:none; width:40px; height:40px; display:grid; place-content:center; border:0; border-radius:12px; background:none; color:#64748b; cursor:pointer; }
.dark button.todo-mic { color:#8A92A6; }
button.todo-mic:hover { color:#007E8A; }
button.todo-mic.is-listening { color:#fff; background:#e11d48; animation:micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 0%,100% { box-shadow:0 0 0 0 rgba(225,29,72,.45); } 50% { box-shadow:0 0 0 8px rgba(225,29,72,0); } }
.todo-add-input:disabled { cursor:not-allowed; }

.todo-row {
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.todo-row .todo-edit {
  user-select: text;
  -webkit-user-select: text;
}
.todo-mic.hidden { display: none; }
.todo-row .todo-del {
  flex: none;
  align-self: start;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 22px;
  cursor: pointer;
}
.todo-row .todo-del:hover, .todo-row .todo-del:focus-visible {
  background: var(--btn, rgb(127 127 127 / .16));
}

form button.todo-send {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--todo-send-bg, #007e8a);
  color: white;
  cursor: pointer;
}
form .todo-send.hidden { display: none; }
.todo-send svg { width: 20px; height: 20px; }

.todo-done-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  font-size: .75rem;
  color: #64748b;
}
.dark .todo-done-bar { color: #8a92a6; }
.todo-done-bar > button {
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
}
.todo-done-bar > button svg { width: 16px; height: 16px; flex: none; }
.todo-undo-bar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  margin-inline-start: auto;
}
.todo-undo-bar[hidden] { display: none; }
.todo-undo-bar .todo-undo-action {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: .16em;
  font: inherit;
  cursor: pointer;
}
.dark .todo-undo-action { color: #67e8f9; }
.todo-undo-action:disabled { opacity: .6; cursor: wait; }
