showeed commited on
Commit
db80d02
·
verified ·
1 Parent(s): 285ea85

Upload index_sakura.html

Browse files
Files changed (1) hide show
  1. index_sakura.html +343 -37
index_sakura.html CHANGED
@@ -60,6 +60,7 @@
60
  --header-height: 58px;
61
  --filter-height: 48px;
62
  --sidebar-width: 264px;
 
63
  }
64
 
65
  html {
@@ -208,7 +209,7 @@
208
  gap: 3px;
209
  }
210
  .sidebar-item-text {
211
- font-size: 13px;
212
  color: rgba(235,224,255,0.87);
213
  line-height: 1.45;
214
  word-break: break-word;
@@ -217,7 +218,7 @@
217
  display: inline-flex;
218
  align-items: center;
219
  gap: 3px;
220
- font-size: 11px;
221
  color: rgba(175,150,255,0.68);
222
  text-decoration: none;
223
  max-width: 100%;
@@ -323,6 +324,18 @@
323
  .btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); box-shadow: 0 4px 18px rgba(116,88,184,0.55); }
324
  .btn-primary:active { transform: translateY(0); }
325
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  .btn-icon-only {
327
  background: rgba(255,255,255,0.09);
328
  color: rgba(235,224,255,0.85);
@@ -439,7 +452,7 @@
439
  gap: var(--space-3);
440
  margin: var(--space-4) 0 var(--space-2);
441
  color: rgba(235,224,255,0.40);
442
- font-size: 12px;
443
  letter-spacing: 0.05em;
444
  }
445
  .completed-separator::before,
@@ -481,7 +494,7 @@
481
  display: inline-flex; align-items: center; justify-content: center;
482
  width: 28px; height: 20px;
483
  border-radius: var(--radius-badge);
484
- font-size: 11px; font-weight: 700;
485
  flex-shrink: 0; letter-spacing: 0.02em;
486
  }
487
  .badge-high { background: var(--badge-high-bg); color: var(--badge-high-text); }
@@ -490,13 +503,13 @@
490
 
491
  .card-title-area { flex: 1; min-width: 0; cursor: pointer; }
492
  .card-title {
493
- font-size: 14px; font-weight: 500; color: var(--color-text-card);
494
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
495
  transition: color var(--transition);
496
  }
497
  .card-title-area:hover .card-title { color: var(--color-primary); }
498
  .card-title-area::after {
499
- content: "▾"; font-size: 10px;
500
  color: rgba(116,88,184,0.26); margin-left: 4px;
501
  transition: transform var(--transition), color var(--transition);
502
  }
@@ -507,20 +520,21 @@
507
  background: rgba(116,88,184,0.10); color: var(--color-primary);
508
  border: 1px solid rgba(116,88,184,0.18);
509
  border-radius: 6px; padding: 2px 8px;
510
- font-size: 12px; white-space: nowrap; flex-shrink: 0; cursor: pointer;
511
  transition: background var(--transition), color var(--transition);
512
  }
513
  .requester-chip:hover { background: rgba(116,88,184,0.20); color: #5e3ea8; }
514
 
515
  .due-date {
516
- font-size: 12px; font-family: var(--font-mono);
517
  color: var(--color-text-muted);
518
  white-space: nowrap; flex-shrink: 0; min-width: 42px; text-align: right;
519
  }
520
  .due-date.overdue { color: var(--color-overdue); font-weight: 700; }
521
  .due-date.overdue::before { content: "⚠ "; font-family: var(--font-gothic); font-size: 10px; }
522
 
523
- .card-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
 
524
  .complete-checkbox {
525
  appearance: none; width: 18px; height: 18px;
526
  border: 2px solid rgba(116,88,184,0.22);
@@ -538,7 +552,8 @@
538
  }
539
  .btn-edit, .btn-delete {
540
  background: transparent; border: none;
541
- color: rgba(116,88,184,0.26); padding: 4px; border-radius: 4px;
 
542
  display: inline-flex; align-items: center; justify-content: center;
543
  transition: background var(--transition), color var(--transition);
544
  }
@@ -550,19 +565,19 @@
550
  padding: 8px var(--space-3);
551
  background: rgba(224,80,96,0.07);
552
  border-top: 1px solid rgba(224,80,96,0.18);
553
- font-size: 13px; color: var(--color-overdue);
554
  }
555
  .delete-confirm.visible { display: flex; }
556
  .delete-confirm-text { flex: 1; }
557
  .btn-delete-confirm {
558
  background: var(--color-overdue); color: #fff; border: none;
559
- border-radius: var(--radius-btn); padding: 3px 10px; font-size: 12px;
560
  transition: background var(--transition);
561
  }
562
  .btn-delete-confirm:hover { background: #c03040; }
563
  .btn-delete-cancel {
564
  background: transparent; border: 1px solid var(--color-overdue); color: var(--color-overdue);
565
- border-radius: var(--radius-btn); padding: 3px 10px; font-size: 12px;
566
  transition: background var(--transition);
567
  }
568
  .btn-delete-cancel:hover { background: rgba(224,80,96,0.08); }
@@ -581,12 +596,12 @@
581
  padding-top: var(--space-1);
582
  border-top: 1px solid rgba(116,88,184,0.12);
583
  }
584
- .detail-item { font-size: 12px; color: var(--color-text-muted); }
585
  .detail-item strong { color: var(--color-primary); font-weight: 500; }
586
 
587
  .detail-link {
588
  display: inline-flex; align-items: center; gap: 3px;
589
- font-size: 12px; color: var(--color-primary);
590
  text-decoration: none;
591
  border-bottom: 1px solid rgba(116,88,184,0.22);
592
  padding-bottom: 1px;
@@ -623,12 +638,12 @@
623
  justify-content: center; padding: 80px var(--space-6); text-align: center;
624
  }
625
  .empty-kanji {
626
- font-family: var(--font-mincho); font-size: 80px;
627
  color: rgba(255,255,255,0.09); line-height: 1;
628
  margin-bottom: var(--space-4); letter-spacing: -0.02em;
629
  text-shadow: 0 0 40px rgba(200,160,240,0.08);
630
  }
631
- .empty-text { font-size: 16px; color: rgba(235,224,255,0.50); margin-bottom: var(--space-5); }
632
 
633
  /* ============================================================
634
  モーダル
@@ -772,6 +787,147 @@
772
  }
773
  #app-footer p { font-size: 12px; color: rgba(235,224,255,0.32); letter-spacing: 0.06em; }
774
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
775
  @keyframes cardEnter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
776
  .card-enter { animation: cardEnter 0.22s ease forwards; }
777
  @keyframes shake {
@@ -831,6 +987,16 @@
831
  <button id="btn-add-task" class="btn-primary">
832
  <span class="btn-icon">+</span> タスクを追加
833
  </button>
 
 
 
 
 
 
 
 
 
 
834
  <button id="btn-export" class="btn-icon-only" title="JSONでエクスポート">
835
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
836
  <span class="btn-label">エクスポート</span>
@@ -920,6 +1086,11 @@
920
  <label for="input-url">URL <span class="optional">(任意)</span></label>
921
  <input type="url" id="input-url" placeholder="https://example.com">
922
  </div>
 
 
 
 
 
923
  <div class="modal-footer">
924
  <button type="button" class="btn-ghost" id="btn-cancel">キャンセル</button>
925
  <button type="submit" class="btn-primary">保 存</button>
@@ -1127,7 +1298,7 @@
1127
  }
1128
  function initPetals() { petals = Array.from({ length: PETAL_COUNT }, () => makePetal(true)); }
1129
  function drawMoon() {
1130
- const mx = W - 130, my = 86, mr = 34;
1131
  const glow = ctx.createRadialGradient(mx, my, mr*0.4, mx, my, mr*2.8);
1132
  glow.addColorStop(0, 'rgba(255,240,140,0.13)');
1133
  glow.addColorStop(1, 'rgba(255,240,140,0)');
@@ -1197,6 +1368,8 @@
1197
  let expandedCardId = null;
1198
  let pendingDeleteId = null;
1199
  let pendingImportData = null;
 
 
1200
 
1201
  const STORAGE_KEY_TASKS = 'taskManager_tasks';
1202
  const STORAGE_KEY_UI = 'taskManager_ui';
@@ -1216,6 +1389,7 @@
1216
  priority: formData.priority, registeredAt: new Date().toISOString(),
1217
  dueDate: formData.dueDate || null, requester: formData.requester.trim(),
1218
  url: formData.url ? formData.url.trim() : '',
 
1219
  completed: false, completedAt: null, order: 0,
1220
  };
1221
  tasks.unshift(newTask);
@@ -1227,7 +1401,8 @@
1227
  if (!task) return;
1228
  task.title = formData.title.trim(); task.priority = formData.priority;
1229
  task.dueDate = formData.dueDate || null; task.requester = formData.requester.trim();
1230
- task.url = formData.url ? formData.url.trim() : '';
 
1231
  saveTasks();
1232
  }
1233
  function deleteTask(id) { tasks = tasks.filter(t => t.id !== id); reassignOrders(); saveTasks(); }
@@ -1242,15 +1417,25 @@
1242
 
1243
  /* --- SORTING / FILTERING --- */
1244
  function getFilteredSortedTasks() {
 
1245
  let filtered = tasks.filter(t => {
1246
  if (uiState.filterPriority !== 'all' && t.priority !== uiState.filterPriority) return false;
1247
  if (uiState.filterRequester && t.requester !== uiState.filterRequester) return false;
 
 
 
 
 
 
1248
  return true;
1249
  });
1250
  const sortFn = uiState.sortMode === 'dueDate'
1251
  ? (a, b) => { if (!a.dueDate && !b.dueDate) return a.order - b.order; if (!a.dueDate) return 1; if (!b.dueDate) return -1; return a.dueDate.localeCompare(b.dueDate); }
1252
  : (a, b) => a.order - b.order;
1253
- return [filtered.filter(t => !t.completed).sort(sortFn), filtered.filter(t => t.completed).sort(sortFn)];
 
 
 
1254
  }
1255
 
1256
  /* --- DATE UTILS --- */
@@ -1275,9 +1460,8 @@
1275
  const emptyState = document.getElementById('empty-state');
1276
  list.innerHTML = '';
1277
  const [incomplete, completed] = getFilteredSortedTasks();
1278
- const showCompleted = !uiState.hideCompleted;
1279
  incomplete.forEach(task => list.appendChild(renderCard(task)));
1280
- if (showCompleted && completed.length > 0) {
1281
  const sep = document.createElement('li');
1282
  sep.className = 'completed-separator';
1283
  sep.setAttribute('role', 'separator');
@@ -1285,7 +1469,7 @@
1285
  list.appendChild(sep);
1286
  completed.forEach(task => list.appendChild(renderCard(task)));
1287
  }
1288
- emptyState.hidden = incomplete.length + (showCompleted ? completed.length : 0) > 0;
1289
  if (uiState.sortMode === 'manual') initDragAndDrop();
1290
  rebuildRequesterOptions();
1291
  syncFilterBarUI();
@@ -1313,6 +1497,9 @@
1313
  const urlDetail = task.url
1314
  ? `<span class="detail-item"><strong>リンク</strong> <a class="detail-link" href="${escHtml(task.url)}" target="_blank" rel="noopener noreferrer">${linkIconSvg}${escHtml(task.url.replace(/^https?:\/\//, ''))}</a></span>`
1315
  : '';
 
 
 
1316
 
1317
  const detailItems = [
1318
  task.requester ? `<span class="detail-item"><strong>依頼者</strong> ${escHtml(task.requester)}</span>` : '',
@@ -1327,17 +1514,18 @@
1327
  <span class="drag-handle" title="ドラッグして並べ替え">⠿</span>
1328
  <span class="priority-badge badge-${task.priority}">${priorityLabel}</span>
1329
  <div class="card-title-area" title="${escHtml(task.title)}">
1330
- <span class="card-title">${escHtml(task.title)}</span>
1331
  </div>
1332
  ${requesterHtml}
1333
  ${dueDateHtml}
1334
  <div class="card-actions">
1335
  <input type="checkbox" class="complete-checkbox" ${task.completed ? 'checked' : ''} title="${task.completed ? '完了を取り消す' : '完了にする'}">
 
1336
  <button class="btn-edit" title="編集">
1337
- <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>
1338
  </button>
1339
  <button class="btn-delete" title="削除">
1340
- <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/><path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"/></svg>
1341
  </button>
1342
  </div>
1343
  </div>
@@ -1372,6 +1560,11 @@
1372
  li.addEventListener('dragend', () => li.setAttribute('draggable', 'false'));
1373
  li.addEventListener('mouseup', () => li.setAttribute('draggable', 'false'));
1374
  }
 
 
 
 
 
1375
  return li;
1376
  }
1377
 
@@ -1479,6 +1672,8 @@
1479
  document.getElementById('task-form').reset();
1480
  document.querySelector('input[name="priority"][value="medium"]').checked = true;
1481
  document.getElementById('input-url').value = '';
 
 
1482
  clearFormErrors();
1483
  document.getElementById('task-modal').hidden = false;
1484
  document.getElementById('input-title').focus();
@@ -1490,7 +1685,10 @@
1490
  document.querySelector(`input[name="priority"][value="${task.priority}"]`).checked = true;
1491
  document.getElementById('input-due-date').value = task.dueDate || '';
1492
  document.getElementById('input-requester').value = task.requester || '';
1493
- document.getElementById('input-url').value = task.url || '';
 
 
 
1494
  clearFormErrors();
1495
  document.getElementById('task-modal').hidden = false;
1496
  document.getElementById('input-title').focus();
@@ -1517,6 +1715,7 @@
1517
  dueDate: document.getElementById('input-due-date').value,
1518
  requester: document.getElementById('input-requester').value,
1519
  url: document.getElementById('input-url').value,
 
1520
  };
1521
  const editId = document.getElementById('edit-task-id').value;
1522
  if (editId) { updateTask(editId, formData); showToast('タスクを更新しました'); }
@@ -1549,7 +1748,8 @@
1549
 
1550
  /* --- EXPORT / IMPORT --- */
1551
  function exportTasks() {
1552
- const blob = new Blob([JSON.stringify(tasks, null, 2)], { type: 'application/json' });
 
1553
  const url = URL.createObjectURL(blob);
1554
  const today = new Date().toISOString().slice(0, 10).replace(/-/g, '');
1555
  const a = document.createElement('a');
@@ -1574,19 +1774,97 @@
1574
  e.target.value = '';
1575
  }
1576
  function validateImportData(data) {
1577
- if (!Array.isArray(data)) return null;
1578
  const required = ['id', 'title', 'priority', 'registeredAt'];
1579
- const valid = data.filter(item => item && typeof item === 'object' && required.every(k => k in item));
1580
- return valid.length > 0 ? valid : null;
1581
- }
1582
- function applyImport(importedTasks, mode) {
1583
- if (mode === 'replace') { tasks = importedTasks; reassignOrders(); }
1584
- else {
 
 
 
 
 
 
 
 
 
 
 
 
 
1585
  const maxOrder = tasks.length > 0 ? Math.max(...tasks.map(t => t.order)) : -1;
1586
  importedTasks.forEach((t, i) => { t.order = maxOrder + 1 + i; tasks.push(t); });
 
 
 
 
 
1587
  }
1588
- saveTasks(); render();
1589
- showToast(`インポート完了(${importedTasks.length}件)`);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1590
  }
1591
 
1592
  /* --- TOAST --- */
@@ -1796,6 +2074,34 @@
1796
 
1797
  document.getElementById('footer-year').textContent = new Date().getFullYear();
1798
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1799
  /* サイドバー */
1800
  renderSidebar();
1801
  document.getElementById('btn-sidebar-toggle').addEventListener('click', toggleSidebar);
 
60
  --header-height: 58px;
61
  --filter-height: 48px;
62
  --sidebar-width: 264px;
63
+ --font-scale: 1;
64
  }
65
 
66
  html {
 
209
  gap: 3px;
210
  }
211
  .sidebar-item-text {
212
+ font-size: calc(13px * var(--font-scale));
213
  color: rgba(235,224,255,0.87);
214
  line-height: 1.45;
215
  word-break: break-word;
 
218
  display: inline-flex;
219
  align-items: center;
220
  gap: 3px;
221
+ font-size: calc(11px * var(--font-scale));
222
  color: rgba(175,150,255,0.68);
223
  text-decoration: none;
224
  max-width: 100%;
 
324
  .btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); box-shadow: 0 4px 18px rgba(116,88,184,0.55); }
325
  .btn-primary:active { transform: translateY(0); }
326
 
327
+ #btn-add-task {
328
+ padding: 8px 18px;
329
+ font-weight: 600;
330
+ letter-spacing: 0.03em;
331
+ background: linear-gradient(135deg, #a088e8 0%, #6244c0 100%);
332
+ box-shadow: 0 3px 18px rgba(116,88,184,0.55), inset 0 0 0 1px rgba(255,255,255,0.14);
333
+ }
334
+ #btn-add-task:hover {
335
+ filter: brightness(1.12);
336
+ box-shadow: 0 5px 26px rgba(116,88,184,0.75), 0 0 22px rgba(180,140,255,0.32), inset 0 0 0 1px rgba(255,255,255,0.20);
337
+ }
338
+
339
  .btn-icon-only {
340
  background: rgba(255,255,255,0.09);
341
  color: rgba(235,224,255,0.85);
 
452
  gap: var(--space-3);
453
  margin: var(--space-4) 0 var(--space-2);
454
  color: rgba(235,224,255,0.40);
455
+ font-size: calc(12px * var(--font-scale));
456
  letter-spacing: 0.05em;
457
  }
458
  .completed-separator::before,
 
494
  display: inline-flex; align-items: center; justify-content: center;
495
  width: 28px; height: 20px;
496
  border-radius: var(--radius-badge);
497
+ font-size: calc(11px * var(--font-scale)); font-weight: 700;
498
  flex-shrink: 0; letter-spacing: 0.02em;
499
  }
500
  .badge-high { background: var(--badge-high-bg); color: var(--badge-high-text); }
 
503
 
504
  .card-title-area { flex: 1; min-width: 0; cursor: pointer; }
505
  .card-title {
506
+ font-size: calc(14px * var(--font-scale)); font-weight: 500; color: var(--color-text-card);
507
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
508
  transition: color var(--transition);
509
  }
510
  .card-title-area:hover .card-title { color: var(--color-primary); }
511
  .card-title-area::after {
512
+ content: "▾"; font-size: calc(10px * var(--font-scale));
513
  color: rgba(116,88,184,0.26); margin-left: 4px;
514
  transition: transform var(--transition), color var(--transition);
515
  }
 
520
  background: rgba(116,88,184,0.10); color: var(--color-primary);
521
  border: 1px solid rgba(116,88,184,0.18);
522
  border-radius: 6px; padding: 2px 8px;
523
+ font-size: calc(12px * var(--font-scale)); white-space: nowrap; flex-shrink: 0; cursor: pointer;
524
  transition: background var(--transition), color var(--transition);
525
  }
526
  .requester-chip:hover { background: rgba(116,88,184,0.20); color: #5e3ea8; }
527
 
528
  .due-date {
529
+ font-size: calc(12px * var(--font-scale)); font-family: var(--font-mono);
530
  color: var(--color-text-muted);
531
  white-space: nowrap; flex-shrink: 0; min-width: 42px; text-align: right;
532
  }
533
  .due-date.overdue { color: var(--color-overdue); font-weight: 700; }
534
  .due-date.overdue::before { content: "⚠ "; font-family: var(--font-gothic); font-size: 10px; }
535
 
536
+ .card-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
537
+ .card-actions-sep { width: 1px; height: 14px; background: rgba(116,88,184,0.15); flex-shrink: 0; margin: 0 1px; }
538
  .complete-checkbox {
539
  appearance: none; width: 18px; height: 18px;
540
  border: 2px solid rgba(116,88,184,0.22);
 
552
  }
553
  .btn-edit, .btn-delete {
554
  background: transparent; border: none;
555
+ color: rgba(116,88,184,0.26); padding: 6px; border-radius: 6px;
556
+ width: 30px; height: 30px;
557
  display: inline-flex; align-items: center; justify-content: center;
558
  transition: background var(--transition), color var(--transition);
559
  }
 
565
  padding: 8px var(--space-3);
566
  background: rgba(224,80,96,0.07);
567
  border-top: 1px solid rgba(224,80,96,0.18);
568
+ font-size: calc(13px * var(--font-scale)); color: var(--color-overdue);
569
  }
570
  .delete-confirm.visible { display: flex; }
571
  .delete-confirm-text { flex: 1; }
572
  .btn-delete-confirm {
573
  background: var(--color-overdue); color: #fff; border: none;
574
+ border-radius: var(--radius-btn); padding: 3px 10px; font-size: calc(12px * var(--font-scale));
575
  transition: background var(--transition);
576
  }
577
  .btn-delete-confirm:hover { background: #c03040; }
578
  .btn-delete-cancel {
579
  background: transparent; border: 1px solid var(--color-overdue); color: var(--color-overdue);
580
+ border-radius: var(--radius-btn); padding: 3px 10px; font-size: calc(12px * var(--font-scale));
581
  transition: background var(--transition);
582
  }
583
  .btn-delete-cancel:hover { background: rgba(224,80,96,0.08); }
 
596
  padding-top: var(--space-1);
597
  border-top: 1px solid rgba(116,88,184,0.12);
598
  }
599
+ .detail-item { font-size: calc(12px * var(--font-scale)); color: var(--color-text-muted); }
600
  .detail-item strong { color: var(--color-primary); font-weight: 500; }
601
 
602
  .detail-link {
603
  display: inline-flex; align-items: center; gap: 3px;
604
+ font-size: calc(12px * var(--font-scale)); color: var(--color-primary);
605
  text-decoration: none;
606
  border-bottom: 1px solid rgba(116,88,184,0.22);
607
  padding-bottom: 1px;
 
638
  justify-content: center; padding: 80px var(--space-6); text-align: center;
639
  }
640
  .empty-kanji {
641
+ font-family: var(--font-mincho); font-size: calc(80px * var(--font-scale));
642
  color: rgba(255,255,255,0.09); line-height: 1;
643
  margin-bottom: var(--space-4); letter-spacing: -0.02em;
644
  text-shadow: 0 0 40px rgba(200,160,240,0.08);
645
  }
646
+ .empty-text { font-size: calc(16px * var(--font-scale)); color: rgba(235,224,255,0.50); margin-bottom: var(--space-5); }
647
 
648
  /* ============================================================
649
  モーダル
 
787
  }
788
  #app-footer p { font-size: 12px; color: rgba(235,224,255,0.32); letter-spacing: 0.06em; }
789
 
790
+ /* ============================================================
791
+ 文字サイズスライダー
792
+ ============================================================ */
793
+ .font-size-control {
794
+ display: flex;
795
+ align-items: center;
796
+ gap: 6px;
797
+ padding: 0 var(--space-3);
798
+ border-left: 1px solid rgba(255,255,255,0.10);
799
+ border-right: 1px solid rgba(255,255,255,0.10);
800
+ height: 30px;
801
+ flex-shrink: 0;
802
+ }
803
+ .font-a {
804
+ color: rgba(235,224,255,0.42);
805
+ font-family: var(--font-mincho);
806
+ user-select: none;
807
+ line-height: 1;
808
+ transition: color var(--transition);
809
+ }
810
+ .font-a-sm { font-size: 11px; }
811
+ .font-a-lg { font-size: 18px; }
812
+ .font-size-control:hover .font-a { color: rgba(235,224,255,0.65); }
813
+
814
+ #font-size-slider {
815
+ -webkit-appearance: none;
816
+ appearance: none;
817
+ width: 76px;
818
+ height: 3px;
819
+ background: rgba(255,255,255,0.16);
820
+ border-radius: 2px;
821
+ outline: none;
822
+ cursor: pointer;
823
+ }
824
+ #font-size-slider::-webkit-slider-thumb {
825
+ -webkit-appearance: none;
826
+ width: 13px; height: 13px;
827
+ border-radius: 50%;
828
+ background: rgba(210,188,255,0.82);
829
+ border: 2px solid rgba(116,88,184,0.52);
830
+ cursor: pointer;
831
+ transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
832
+ }
833
+ #font-size-slider::-webkit-slider-thumb:hover {
834
+ background: #fff;
835
+ border-color: rgba(116,88,184,0.80);
836
+ transform: scale(1.2);
837
+ }
838
+ #font-size-slider::-moz-range-thumb {
839
+ width: 13px; height: 13px;
840
+ border-radius: 50%;
841
+ background: rgba(210,188,255,0.82);
842
+ border: 2px solid rgba(116,88,184,0.52);
843
+ cursor: pointer;
844
+ }
845
+
846
+ /* ============================================================
847
+ 検索
848
+ ============================================================ */
849
+ .header-search {
850
+ position: relative; display: flex; align-items: center;
851
+ }
852
+ #task-search {
853
+ background: rgba(255,255,255,0.09);
854
+ border: 1px solid rgba(255,255,255,0.16);
855
+ border-radius: var(--radius-btn);
856
+ padding: 6px 28px 6px 30px;
857
+ font-size: 13px; color: var(--color-text-light);
858
+ outline: none; width: clamp(100px, 15vw, 230px);
859
+ transition: background var(--transition), border-color var(--transition), width 0.22s ease;
860
+ }
861
+ #task-search::placeholder { color: var(--color-text-dim); }
862
+ #task-search:focus { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.32); width: clamp(130px, 19vw, 270px); }
863
+ .search-icon { position: absolute; left: 9px; color: var(--color-text-dim); pointer-events: none; display: flex; align-items: center; }
864
+ #btn-search-clear {
865
+ position: absolute; right: 6px;
866
+ background: none; border: none; color: rgba(235,224,255,0.35);
867
+ padding: 3px; border-radius: 4px; cursor: pointer;
868
+ display: none; align-items: center; justify-content: center;
869
+ transition: color var(--transition);
870
+ }
871
+ #btn-search-clear.visible { display: flex; }
872
+ #btn-search-clear:hover { color: var(--color-text-light); }
873
+
874
+ /* ============================================================
875
+ メモ
876
+ ============================================================ */
877
+ .form-group textarea {
878
+ border: 1px solid rgba(116,88,184,0.20);
879
+ border-radius: var(--radius-btn);
880
+ padding: 8px var(--space-3);
881
+ font-size: 14px; color: var(--color-text-card);
882
+ background: rgba(255,255,255,0.82);
883
+ outline: none; resize: vertical;
884
+ min-height: 58px; max-height: 110px;
885
+ line-height: 1.55;
886
+ transition: border-color var(--transition), box-shadow var(--transition);
887
+ }
888
+ .form-group textarea:focus {
889
+ border-color: var(--color-primary);
890
+ box-shadow: 0 0 0 3px rgba(116,88,184,0.14);
891
+ }
892
+ .memo-counter {
893
+ align-self: flex-end; font-size: 11px;
894
+ color: var(--color-text-muted); margin-top: -10px;
895
+ transition: color var(--transition);
896
+ }
897
+ .memo-counter.warn { color: var(--color-accent); }
898
+ .memo-dot {
899
+ display: inline-flex; align-items: center;
900
+ color: rgba(196,84,122,0.38); flex-shrink: 0;
901
+ vertical-align: middle; margin-left: 4px;
902
+ transition: color var(--transition);
903
+ }
904
+ .card-title-area:hover .memo-dot { color: rgba(196,84,122,0.72); }
905
+ #memo-tooltip {
906
+ position: fixed; z-index: 150;
907
+ background: rgba(16,10,44,0.97);
908
+ color: rgba(235,224,255,0.90);
909
+ border: 1px solid rgba(255,255,255,0.13);
910
+ border-radius: 10px;
911
+ padding: 9px 13px 10px;
912
+ font-size: 13px;
913
+ max-width: 300px; min-width: 120px;
914
+ line-height: 1.65;
915
+ pointer-events: none;
916
+ backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
917
+ box-shadow: 0 6px 24px rgba(0,0,0,0.48), 0 0 0 1px rgba(196,84,122,0.10);
918
+ opacity: 0; transform: translateY(6px);
919
+ transition: opacity 0.18s ease, transform 0.18s ease;
920
+ white-space: pre-wrap; word-break: break-word;
921
+ }
922
+ #memo-tooltip.visible { opacity: 1; transform: translateY(0); }
923
+ #memo-tooltip.from-right { transform: translateX(-8px); }
924
+ #memo-tooltip.from-right.visible { transform: translateX(0); }
925
+ .memo-tooltip-label {
926
+ font-size: 10px; color: rgba(196,84,122,0.68);
927
+ letter-spacing: 0.10em; margin-bottom: 5px;
928
+ font-family: var(--font-mincho);
929
+ }
930
+
931
  @keyframes cardEnter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
932
  .card-enter { animation: cardEnter 0.22s ease forwards; }
933
  @keyframes shake {
 
987
  <button id="btn-add-task" class="btn-primary">
988
  <span class="btn-icon">+</span> タスクを追加
989
  </button>
990
+ <div class="header-search">
991
+ <span class="search-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg></span>
992
+ <input type="text" id="task-search" placeholder="タスクを検索..." autocomplete="off">
993
+ <button id="btn-search-clear" title="検索をクリア"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button>
994
+ </div>
995
+ <div class="font-size-control" title="文字サイズを調整">
996
+ <span class="font-a font-a-sm">A</span>
997
+ <input type="range" id="font-size-slider" min="0.75" max="1.45" step="0.05" value="1">
998
+ <span class="font-a font-a-lg">A</span>
999
+ </div>
1000
  <button id="btn-export" class="btn-icon-only" title="JSONでエクスポート">
1001
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
1002
  <span class="btn-label">エクスポート</span>
 
1086
  <label for="input-url">URL <span class="optional">(任意)</span></label>
1087
  <input type="url" id="input-url" placeholder="https://example.com">
1088
  </div>
1089
+ <div class="form-group">
1090
+ <label for="input-memo">メモ <span class="optional">(任意・100文字以内)</span></label>
1091
+ <textarea id="input-memo" placeholder="タスクに関するメモを入力..." maxlength="100" rows="2"></textarea>
1092
+ <span class="memo-counter" id="memo-counter">0/100</span>
1093
+ </div>
1094
  <div class="modal-footer">
1095
  <button type="button" class="btn-ghost" id="btn-cancel">キャンセル</button>
1096
  <button type="submit" class="btn-primary">保 存</button>
 
1298
  }
1299
  function initPetals() { petals = Array.from({ length: PETAL_COUNT }, () => makePetal(true)); }
1300
  function drawMoon() {
1301
+ const mx = W - 130, my = 140, mr = 34;
1302
  const glow = ctx.createRadialGradient(mx, my, mr*0.4, mx, my, mr*2.8);
1303
  glow.addColorStop(0, 'rgba(255,240,140,0.13)');
1304
  glow.addColorStop(1, 'rgba(255,240,140,0)');
 
1368
  let expandedCardId = null;
1369
  let pendingDeleteId = null;
1370
  let pendingImportData = null;
1371
+ let searchQuery = '';
1372
+ let memoTooltipEl = null;
1373
 
1374
  const STORAGE_KEY_TASKS = 'taskManager_tasks';
1375
  const STORAGE_KEY_UI = 'taskManager_ui';
 
1389
  priority: formData.priority, registeredAt: new Date().toISOString(),
1390
  dueDate: formData.dueDate || null, requester: formData.requester.trim(),
1391
  url: formData.url ? formData.url.trim() : '',
1392
+ memo: formData.memo ? formData.memo.trim() : '',
1393
  completed: false, completedAt: null, order: 0,
1394
  };
1395
  tasks.unshift(newTask);
 
1401
  if (!task) return;
1402
  task.title = formData.title.trim(); task.priority = formData.priority;
1403
  task.dueDate = formData.dueDate || null; task.requester = formData.requester.trim();
1404
+ task.url = formData.url ? formData.url.trim() : '';
1405
+ task.memo = formData.memo ? formData.memo.trim() : '';
1406
  saveTasks();
1407
  }
1408
  function deleteTask(id) { tasks = tasks.filter(t => t.id !== id); reassignOrders(); saveTasks(); }
 
1417
 
1418
  /* --- SORTING / FILTERING --- */
1419
  function getFilteredSortedTasks() {
1420
+ const q = searchQuery.trim().toLowerCase();
1421
  let filtered = tasks.filter(t => {
1422
  if (uiState.filterPriority !== 'all' && t.priority !== uiState.filterPriority) return false;
1423
  if (uiState.filterRequester && t.requester !== uiState.filterRequester) return false;
1424
+ if (q) {
1425
+ const inTitle = t.title.toLowerCase().includes(q);
1426
+ const inReq = t.requester ? t.requester.toLowerCase().includes(q) : false;
1427
+ const inMemo = t.memo ? t.memo.toLowerCase().includes(q) : false;
1428
+ if (!inTitle && !inReq && !inMemo) return false;
1429
+ }
1430
  return true;
1431
  });
1432
  const sortFn = uiState.sortMode === 'dueDate'
1433
  ? (a, b) => { if (!a.dueDate && !b.dueDate) return a.order - b.order; if (!a.dueDate) return 1; if (!b.dueDate) return -1; return a.dueDate.localeCompare(b.dueDate); }
1434
  : (a, b) => a.order - b.order;
1435
+ const hideCompleted = q ? false : uiState.hideCompleted;
1436
+ const incomplete = filtered.filter(t => !t.completed).sort(sortFn);
1437
+ const completed = hideCompleted ? [] : filtered.filter(t => t.completed).sort(sortFn);
1438
+ return [incomplete, completed];
1439
  }
1440
 
1441
  /* --- DATE UTILS --- */
 
1460
  const emptyState = document.getElementById('empty-state');
1461
  list.innerHTML = '';
1462
  const [incomplete, completed] = getFilteredSortedTasks();
 
1463
  incomplete.forEach(task => list.appendChild(renderCard(task)));
1464
+ if (completed.length > 0) {
1465
  const sep = document.createElement('li');
1466
  sep.className = 'completed-separator';
1467
  sep.setAttribute('role', 'separator');
 
1469
  list.appendChild(sep);
1470
  completed.forEach(task => list.appendChild(renderCard(task)));
1471
  }
1472
+ emptyState.hidden = incomplete.length + completed.length > 0;
1473
  if (uiState.sortMode === 'manual') initDragAndDrop();
1474
  rebuildRequesterOptions();
1475
  syncFilterBarUI();
 
1497
  const urlDetail = task.url
1498
  ? `<span class="detail-item"><strong>リンク</strong> <a class="detail-link" href="${escHtml(task.url)}" target="_blank" rel="noopener noreferrer">${linkIconSvg}${escHtml(task.url.replace(/^https?:\/\//, ''))}</a></span>`
1499
  : '';
1500
+ const memoIconHtml = task.memo
1501
+ ? `<svg class="memo-dot" xmlns="http://www.w3.org/2000/svg" width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" title="メモあり"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>`
1502
+ : '';
1503
 
1504
  const detailItems = [
1505
  task.requester ? `<span class="detail-item"><strong>依頼者</strong> ${escHtml(task.requester)}</span>` : '',
 
1514
  <span class="drag-handle" title="ドラッグして並べ替え">⠿</span>
1515
  <span class="priority-badge badge-${task.priority}">${priorityLabel}</span>
1516
  <div class="card-title-area" title="${escHtml(task.title)}">
1517
+ <span class="card-title">${escHtml(task.title)}</span>${memoIconHtml}
1518
  </div>
1519
  ${requesterHtml}
1520
  ${dueDateHtml}
1521
  <div class="card-actions">
1522
  <input type="checkbox" class="complete-checkbox" ${task.completed ? 'checked' : ''} title="${task.completed ? '完了を取り消す' : '完了にする'}">
1523
+ <div class="card-actions-sep"></div>
1524
  <button class="btn-edit" title="編集">
1525
+ <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>
1526
  </button>
1527
  <button class="btn-delete" title="削除">
1528
+ <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/><path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"/></svg>
1529
  </button>
1530
  </div>
1531
  </div>
 
1560
  li.addEventListener('dragend', () => li.setAttribute('draggable', 'false'));
1561
  li.addEventListener('mouseup', () => li.setAttribute('draggable', 'false'));
1562
  }
1563
+ if (task.memo) {
1564
+ const cardRow = li.querySelector('.card-row');
1565
+ cardRow.addEventListener('mouseenter', () => showMemoTooltip(task.memo, li));
1566
+ cardRow.addEventListener('mouseleave', hideMemoTooltip);
1567
+ }
1568
  return li;
1569
  }
1570
 
 
1672
  document.getElementById('task-form').reset();
1673
  document.querySelector('input[name="priority"][value="medium"]').checked = true;
1674
  document.getElementById('input-url').value = '';
1675
+ document.getElementById('input-memo').value = '';
1676
+ updateMemoCounter(0);
1677
  clearFormErrors();
1678
  document.getElementById('task-modal').hidden = false;
1679
  document.getElementById('input-title').focus();
 
1685
  document.querySelector(`input[name="priority"][value="${task.priority}"]`).checked = true;
1686
  document.getElementById('input-due-date').value = task.dueDate || '';
1687
  document.getElementById('input-requester').value = task.requester || '';
1688
+ document.getElementById('input-url').value = task.url || '';
1689
+ const memoVal = task.memo || '';
1690
+ document.getElementById('input-memo').value = memoVal;
1691
+ updateMemoCounter(memoVal.length);
1692
  clearFormErrors();
1693
  document.getElementById('task-modal').hidden = false;
1694
  document.getElementById('input-title').focus();
 
1715
  dueDate: document.getElementById('input-due-date').value,
1716
  requester: document.getElementById('input-requester').value,
1717
  url: document.getElementById('input-url').value,
1718
+ memo: document.getElementById('input-memo').value,
1719
  };
1720
  const editId = document.getElementById('edit-task-id').value;
1721
  if (editId) { updateTask(editId, formData); showToast('タスクを更新しました'); }
 
1748
 
1749
  /* --- EXPORT / IMPORT --- */
1750
  function exportTasks() {
1751
+ const data = { version: '2', tasks, sidebar: sidebarItems };
1752
+ const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
1753
  const url = URL.createObjectURL(blob);
1754
  const today = new Date().toISOString().slice(0, 10).replace(/-/g, '');
1755
  const a = document.createElement('a');
 
1774
  e.target.value = '';
1775
  }
1776
  function validateImportData(data) {
 
1777
  const required = ['id', 'title', 'priority', 'registeredAt'];
1778
+ if (Array.isArray(data)) {
1779
+ const valid = data.filter(item => item && typeof item === 'object' && required.every(k => k in item));
1780
+ return valid.length > 0 ? { tasks: valid, sidebar: [] } : null;
1781
+ }
1782
+ if (data && typeof data === 'object' && Array.isArray(data.tasks)) {
1783
+ const validTasks = data.tasks.filter(item => item && typeof item === 'object' && required.every(k => k in item));
1784
+ if (!validTasks.length) return null;
1785
+ const validSidebar = Array.isArray(data.sidebar) ? data.sidebar.filter(i => i && i.id && i.text) : [];
1786
+ return { tasks: validTasks, sidebar: validSidebar };
1787
+ }
1788
+ return null;
1789
+ }
1790
+ function applyImport(importData, mode) {
1791
+ const { tasks: importedTasks, sidebar: importedSidebar } = importData;
1792
+ if (mode === 'replace') {
1793
+ tasks = importedTasks; reassignOrders();
1794
+ sidebarItems = importedSidebar.map((item, i) => ({ ...item, order: i }));
1795
+ saveSidebar();
1796
+ } else {
1797
  const maxOrder = tasks.length > 0 ? Math.max(...tasks.map(t => t.order)) : -1;
1798
  importedTasks.forEach((t, i) => { t.order = maxOrder + 1 + i; tasks.push(t); });
1799
+ if (importedSidebar.length) {
1800
+ const maxSb = sidebarItems.length > 0 ? Math.max(...sidebarItems.map(i => i.order)) : -1;
1801
+ importedSidebar.forEach((item, i) => { sidebarItems.push({ ...item, order: maxSb + 1 + i }); });
1802
+ saveSidebar();
1803
+ }
1804
  }
1805
+ saveTasks(); render(); renderSidebar();
1806
+ showToast(`インポート完了(タスク${importedTasks.length}件 / メモ${importedSidebar.length}件)`);
1807
+ }
1808
+
1809
+ /* --- FONT SCALE --- */
1810
+ const STORAGE_KEY_FONT_SCALE = 'taskManager_font_scale';
1811
+
1812
+ function applyFontScale(scale) {
1813
+ document.documentElement.style.setProperty('--font-scale', scale);
1814
+ localStorage.setItem(STORAGE_KEY_FONT_SCALE, scale);
1815
+ }
1816
+ function initFontScale() {
1817
+ const saved = localStorage.getItem(STORAGE_KEY_FONT_SCALE);
1818
+ const scale = saved ? parseFloat(saved) : 1.0;
1819
+ applyFontScale(scale);
1820
+ document.getElementById('font-size-slider').value = scale;
1821
+ }
1822
+
1823
+ /* --- MEMO TOOLTIP --- */
1824
+ function showMemoTooltip(text, cardEl) {
1825
+ if (!memoTooltipEl) return;
1826
+ document.getElementById('memo-tooltip-body').textContent = text;
1827
+
1828
+ // 一旦オフスクリーンで描画してサイズを取得
1829
+ memoTooltipEl.classList.remove('visible', 'from-right');
1830
+ memoTooltipEl.style.left = '-9999px';
1831
+ memoTooltipEl.style.top = '0px';
1832
+ const tooltipW = memoTooltipEl.offsetWidth;
1833
+ const tooltipH = memoTooltipEl.offsetHeight;
1834
+
1835
+ const rect = cardEl.getBoundingClientRect();
1836
+ const MARGIN = 12;
1837
+ let finalLeft, finalTop, fromRight = false;
1838
+
1839
+ if (window.innerWidth - rect.right - MARGIN >= tooltipW + MARGIN) {
1840
+ // 右側に十分スペースあり → 右表示(カード中央の高さに揃える)
1841
+ fromRight = true;
1842
+ finalLeft = rect.right + MARGIN;
1843
+ finalTop = Math.max(8, Math.min(
1844
+ rect.top + (rect.height / 2) - (tooltipH / 2),
1845
+ window.innerHeight - tooltipH - 8
1846
+ ));
1847
+ } else {
1848
+ // スペース不足 → 下側表示
1849
+ finalLeft = Math.max(8, Math.min(rect.left, window.innerWidth - tooltipW - 8));
1850
+ finalTop = rect.bottom + 6;
1851
+ if (finalTop + tooltipH > window.innerHeight - 8) finalTop = rect.top - tooltipH - 6;
1852
+ finalTop = Math.max(8, finalTop);
1853
+ }
1854
+
1855
+ memoTooltipEl.style.left = finalLeft + 'px';
1856
+ memoTooltipEl.style.top = finalTop + 'px';
1857
+ if (fromRight) memoTooltipEl.classList.add('from-right');
1858
+ memoTooltipEl.classList.add('visible');
1859
+ }
1860
+ function hideMemoTooltip() {
1861
+ if (memoTooltipEl) memoTooltipEl.classList.remove('visible', 'from-right');
1862
+ }
1863
+ function updateMemoCounter(len) {
1864
+ const counter = document.getElementById('memo-counter');
1865
+ if (!counter) return;
1866
+ counter.textContent = `${len}/100`;
1867
+ counter.classList.toggle('warn', len >= 90);
1868
  }
1869
 
1870
  /* --- TOAST --- */
 
2074
 
2075
  document.getElementById('footer-year').textContent = new Date().getFullYear();
2076
 
2077
+ /* 文字サイズ */
2078
+ initFontScale();
2079
+ document.getElementById('font-size-slider').addEventListener('input', e => {
2080
+ applyFontScale(parseFloat(e.target.value));
2081
+ });
2082
+
2083
+ /* メモツールチップ */
2084
+ memoTooltipEl = document.createElement('div');
2085
+ memoTooltipEl.id = 'memo-tooltip';
2086
+ memoTooltipEl.innerHTML = '<div class="memo-tooltip-label">メモ</div><div id="memo-tooltip-body"></div>';
2087
+ document.body.appendChild(memoTooltipEl);
2088
+ document.getElementById('input-memo').addEventListener('input', e => updateMemoCounter(e.target.value.length));
2089
+
2090
+ /* 検索 */
2091
+ const searchInput = document.getElementById('task-search');
2092
+ const searchClearBtn = document.getElementById('btn-search-clear');
2093
+ searchInput.addEventListener('input', e => {
2094
+ searchQuery = e.target.value;
2095
+ searchClearBtn.classList.toggle('visible', searchQuery.length > 0);
2096
+ render();
2097
+ });
2098
+ searchClearBtn.addEventListener('click', () => {
2099
+ searchQuery = '';
2100
+ searchInput.value = '';
2101
+ searchClearBtn.classList.remove('visible');
2102
+ render();
2103
+ });
2104
+
2105
  /* サイドバー */
2106
  renderSidebar();
2107
  document.getElementById('btn-sidebar-toggle').addEventListener('click', toggleSidebar);