* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f5f5; color: #333; max-width: 640px; margin: 0 auto; padding: 16px; }
h1 { margin-bottom: 16px; }
.card { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.card h2 { font-size: 14px; margin-bottom: 8px; color: #666; }
textarea, input[type="text"], input[type="file"] { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; margin-bottom: 8px; }
button { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; color: #fff; }
.btn-post { background: #2563eb; }
.btn-start { background: #16a34a; }
.btn-end { background: #dc2626; }
button:hover { opacity: 0.9; }
.messages { list-style: none; margin-bottom: 12px; }
.messages li { padding: 8px 12px; border-radius: 4px; margin-bottom: 4px; font-size: 14px; }
.messages .success { background: #dcfce7; color: #166534; }
.messages .error { background: #fee2e2; color: #991b1b; }
.entry { padding: 12px 0; border-bottom: 1px solid #eee; }
.entry:last-child { border-bottom: none; }
.entry-meta { font-size: 12px; color: #999; margin-bottom: 4px; }
.entry-content { font-size: 14px; white-space: pre-wrap; }
.entry img { max-width: 100%; border-radius: 4px; margin-top: 8px; }
.badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.badge-post { background: #dbeafe; color: #1e40af; }
.badge-time { background: #fef3c7; color: #92400e; }
.badge-active { background: #dcfce7; color: #166534; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.day-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.day-nav a { color: #2563eb; text-decoration: none; font-size: 13px; white-space: nowrap; }
.day-nav a:hover { text-decoration: underline; }
.nav-disabled { color: #ccc; font-size: 13px; }
.day-center { text-align: center; }
.day-center h2 { margin-bottom: 4px; }
.date-jump { display: flex; gap: 4px; justify-content: center; }
.date-jump input[type="date"] { width: auto; margin-bottom: 0; padding: 4px 6px; font-size: 12px; }
.date-jump button { padding: 4px 8px; font-size: 12px; background: #6b7280; }
.shortcut-hint { font-size: 12px; color: #999; margin-bottom: 12px; }
.shortcut-hint kbd { background: #e5e7eb; padding: 1px 5px; border-radius: 3px; font-size: 11px; border: 1px solid #d1d5db; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 100; justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: 8px; padding: 24px; max-width: 400px; width: 90%; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.modal h2 { font-size: 16px; margin-bottom: 12px; }
.modal table { width: 100%; border-collapse: collapse; }
.modal td { padding: 6px 0; font-size: 14px; }
.modal td:first-child { font-weight: 600; white-space: nowrap; padding-right: 16px; }
.modal td kbd { background: #e5e7eb; padding: 1px 5px; border-radius: 3px; font-size: 12px; border: 1px solid #d1d5db; }
.context-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.context-chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.context-chip { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; text-decoration: none; opacity: 0.7; }
.context-chip:hover { opacity: 1; }
.context-chip-active { opacity: 1; outline: 2px solid #333; outline-offset: 1px; }
.context-chip-clear { background: #fee2e2; color: #991b1b; }
.context-chip kbd { font-size: 10px; opacity: 0.7; margin-right: 1px; }
.badge-context { margin-left: 2px; text-transform: none; }
.search-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.search-bar input[type="text"] { margin-bottom: 0; }
.search-bar a { font-size: 13px; color: #dc2626; text-decoration: none; white-space: nowrap; }
.search-bar a:hover { text-decoration: underline; }
.search-header { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.forms-row { display: flex; gap: 12px; }
.forms-row > .card { flex: 1; }
.pending-tasks h2 { font-size: 14px; color: #92400e; margin-bottom: 8px; }
.badge-done { background: #e5e7eb; color: #6b7280; }
.entry-done { text-decoration: line-through; opacity: 0.6; }
.btn-done { display: inline; padding: 2px 8px; font-size: 11px; background: #9ca3af; color: #fff; border: none; border-radius: 3px; cursor: pointer; margin-left: 6px; vertical-align: middle; }
.btn-done:hover { background: #6b7280; }
.btn-resume { display: inline; padding: 2px 8px; font-size: 11px; background: #2563eb; color: #fff; border: none; border-radius: 3px; cursor: pointer; margin-left: 4px; vertical-align: middle; }
.btn-resume:hover { background: #1d4ed8; }
.entry-resumed-from { font-size: 11px; color: #9ca3af; margin-bottom: 2px; }
.subtask { margin-left: 24px; padding: 8px 0; border-top: 1px solid #f3f4f6; }
.subtask-form { display: flex; gap: 6px; margin-left: 24px; margin-top: 8px; }
.subtask-input { flex: 1; padding: 4px 8px; font-size: 12px; margin-bottom: 0; }
.btn-subtask { padding: 4px 10px; font-size: 11px; background: #6b7280; color: #fff; border: none; border-radius: 3px; cursor: pointer; white-space: nowrap; }
.btn-subtask:hover { background: #4b5563; }
.entry-waiting { background: #fefce8; border-radius: 6px; padding: 12px; margin: -12px 0; margin-bottom: 0; }
.badge-waiting { background: #fef9c3; color: #854d0e; text-transform: none; }
.wait-form { display: flex; gap: 6px; margin-left: 24px; margin-top: 4px; }
.btn-wait { padding: 4px 10px; font-size: 11px; background: #d97706; color: #fff; border: none; border-radius: 3px; cursor: pointer; white-space: nowrap; }
.btn-wait:hover { background: #b45309; }
.btn-cancel-wait { padding: 4px 10px; font-size: 11px; background: #9ca3af; color: #fff; border: none; border-radius: 3px; cursor: pointer; white-space: nowrap; }
.btn-cancel-wait:hover { background: #6b7280; }
.rename-form { margin-left: 24px; margin-top: 8px; }
.rename-input { width: 100%; padding: 6px 8px; font-size: 13px; margin-bottom: 4px; resize: vertical; }
.pending-task-image { margin-left: 24px; margin-top: 6px; }
.pending-task-image img { max-width: 100%; border-radius: 4px; }
.report-toggle { font-size: 13px; color: #2563eb; text-decoration: none; white-space: nowrap; }
.report-toggle:hover { text-decoration: underline; }
.report-task { padding: 10px 0; border-bottom: 1px solid #eee; }
.report-task:last-child { border-bottom: none; }
.report-content { font-size: 14px; margin: 4px 0; white-space: pre-wrap; }
.report-times { font-size: 12px; color: #666; display: flex; gap: 16px; }
.report-time strong { color: #333; }
.btn-ai-report { padding: 6px 14px; font-size: 12px; background: #7c3aed; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.btn-ai-report:hover { background: #6d28d9; }
.btn-ai-report:disabled { background: #a78bfa; cursor: wait; }
.ai-report-output { font-size: 14px; color: #555; }
.ai-report-output h1, .ai-report-output h2, .ai-report-output h3 { font-size: 14px; color: #333; margin: 12px 0 6px; }
.ai-report-output p { margin: 6px 0; }
.ai-report-output ul, .ai-report-output ol { margin: 6px 0; padding-left: 20px; }
.ai-report-output li { margin: 4px 0; }
.ai-report-output strong { color: #333; }
.ai-report-output code { background: #f3f4f6; padding: 1px 4px; border-radius: 3px; font-size: 13px; }
.ai-report-output blockquote { border-left: 3px solid #d1d5db; padding-left: 12px; color: #666; margin: 8px 0; }
@media (max-width: 500px) { .forms-row { flex-direction: column; } }
