:root{--bg: #f8f7f4;--surface: #ffffff;--surface-2: #f1f0ec;--border: #e5e3dc;--text: #1a1916;--text-secondary: #6b6a66;--text-muted: #9e9d99;--agenda-border: #378ADD;--todo-border: #EF9F27;--p1-bg: #FCEBEB;--p1-text: #A32D2D;--p2-bg: #FAEEDA;--p2-text: #854F0B;--p3-bg: #EAF3DE;--p3-text: #3B6D11;--p4-bg: #E6F1FB;--p4-text: #185FA5;--p5-bg: #F1EFE8;--p5-text: #5F5E5A;--accent: #378ADD;--danger: #D9534F;--radius: 8px;--radius-sm: 6px;--max-w: 420px;--shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);--shadow-md: 0 4px 12px rgba(0,0,0,.1)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}html{height:100%;background:var(--bg)}body{font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;line-height:1.5;color:var(--text);background:var(--bg);min-height:100%;overflow-x:hidden}#root{display:flex;justify-content:center;min-height:100vh}.app-wrapper{width:100%;max-width:var(--max-w);min-height:100vh;background:var(--bg);display:flex;flex-direction:column;position:relative}button{font-family:inherit;cursor:pointer;border:none;background:none;font-size:inherit}input,select,textarea{font-family:inherit;font-size:inherit;color:var(--text)}.header{padding:16px 16px 12px;display:flex;align-items:center;justify-content:space-between;background:var(--bg);position:sticky;top:0;z-index:10}.header-title{font-size:20px;font-weight:700;letter-spacing:-.5px;color:var(--text)}.header-title span{color:var(--accent)}.header-actions{display:flex;gap:8px;align-items:center}.btn-add{background:var(--text);color:#fff;padding:8px 14px;border-radius:20px;font-size:13px;font-weight:600;min-height:36px;display:flex;align-items:center;gap:4px}.btn-add:active{opacity:.85}.btn-icon{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--text-secondary);background:var(--surface-2)}.btn-icon:active{background:var(--border)}.main-content{padding:0 16px 100px;flex:1}.section-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);margin-bottom:10px}.project-filter{margin-bottom:20px}.project-chips{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.project-chips::-webkit-scrollbar{display:none}.chip{display:flex;align-items:center;gap:5px;padding:6px 12px;border-radius:20px;font-size:13px;font-weight:500;white-space:nowrap;min-height:32px;border:1.5px solid var(--border);background:var(--surface);color:var(--text-secondary);transition:all .12s ease}.chip.active{background:var(--text);color:#fff;border-color:var(--text)}.chip-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.upcoming-section{margin-bottom:20px}.upcoming-list{display:flex;flex-direction:column;gap:6px}.upcoming-item{background:var(--surface);border-radius:var(--radius);border-left:3px solid var(--agenda-border);padding:10px 12px;display:flex;align-items:center;gap:10px;box-shadow:var(--shadow)}.upcoming-date-badge{display:flex;flex-direction:column;align-items:center;min-width:36px;flex-shrink:0}.upcoming-date-day{font-size:18px;font-weight:700;line-height:1;color:var(--accent)}.upcoming-date-month{font-size:10px;font-weight:500;text-transform:uppercase;color:var(--text-muted);letter-spacing:.05em}.upcoming-info{flex:1;min-width:0}.upcoming-title{font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.upcoming-meta{font-size:11px;color:var(--text-muted);margin-top:1px}.upcoming-time{font-size:12px;font-weight:500;color:var(--text-secondary);flex-shrink:0}.filter-row{display:flex;gap:6px;margin-bottom:16px;overflow-x:auto;scrollbar-width:none}.filter-row::-webkit-scrollbar{display:none}.filter-btn{padding:7px 14px;border-radius:20px;font-size:13px;font-weight:500;white-space:nowrap;min-height:34px;border:1.5px solid var(--border);background:var(--surface);color:var(--text-secondary);transition:all .12s ease}.filter-btn.active{background:var(--text);color:#fff;border-color:var(--text)}.item-list{display:flex;flex-direction:column;gap:8px}.item-card-wrapper{position:relative;overflow:hidden;border-radius:var(--radius)}.item-card-delete-bg{position:absolute;right:0;top:0;bottom:0;width:72px;background:#d9534f;display:flex;align-items:center;justify-content:center;border-radius:0 var(--radius) var(--radius) 0}.item-card-delete-bg svg{color:#fff}.item-card{position:relative;background:var(--surface);border-radius:var(--radius);padding:10px 10px 10px 12px;box-shadow:var(--shadow);transform:translate(0);transition:transform .15s ease;will-change:transform;touch-action:pan-y}.item-card.agenda{border:1.5px solid var(--agenda-border)}.item-card.todo{border:1.5px solid var(--todo-border)}.item-card-header{display:flex;align-items:flex-start;gap:6px;margin-bottom:6px}.item-card-title{flex:1;font-size:14px;font-weight:600;color:var(--text);line-height:1.3;padding-right:4px}.priority-badge{flex-shrink:0;font-size:10px;font-weight:700;padding:2px 6px;border-radius:4px;white-space:nowrap;margin-top:1px}.p1{background:var(--p1-bg);color:var(--p1-text)}.p2{background:var(--p2-bg);color:var(--p2-text)}.p3{background:var(--p3-bg);color:var(--p3-text)}.p4{background:var(--p4-bg);color:var(--p4-text)}.p5{background:var(--p5-bg);color:var(--p5-text)}.item-card-footer{display:flex;align-items:center;justify-content:space-between;margin-top:4px;gap:6px}.item-project{display:flex;align-items:center;gap:4px;min-width:0}.item-project-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}.item-project-name{font-size:11px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}.item-date{font-size:11px;font-weight:500;color:var(--text-muted);white-space:nowrap;flex-shrink:0;display:flex;align-items:center;gap:4px}.item-date.urgent{color:var(--danger);font-weight:700}.item-time{font-size:11px;color:var(--text-muted);margin-left:2px}.subtasks{margin-top:8px;display:flex;flex-direction:column;gap:4px;border-top:1px solid var(--surface-2);padding-top:8px}.subtask-item{display:flex;align-items:center;gap:8px;min-height:30px;cursor:pointer}.subtask-checkbox{width:16px;height:16px;border-radius:4px;border:1.5px solid var(--border);flex-shrink:0;display:flex;align-items:center;justify-content:center;background:var(--surface);transition:all .1s}.subtask-checkbox.checked{background:var(--p3-text);border-color:var(--p3-text)}.subtask-checkbox.checked svg{display:block}.subtask-checkbox svg{display:none;color:#fff;width:10px;height:10px}.subtask-label{font-size:12px;color:var(--text-secondary);flex:1;line-height:1.3}.subtask-label.completed{text-decoration:line-through;color:var(--text-muted)}.subtask-progress{font-size:10px;color:var(--text-muted);font-weight:500;margin-top:2px;display:block}.card-actions{display:flex;justify-content:flex-end;margin-top:8px;gap:6px}.card-action-btn{width:28px;height:28px;border-radius:6px;display:flex;align-items:center;justify-content:center;color:var(--text-muted);background:var(--surface-2)}.card-action-btn:active{background:var(--border)}.card-action-btn.danger{color:var(--danger)}.empty-state{text-align:center;padding:40px 24px;color:var(--text-muted)}.empty-state-icon{font-size:40px;margin-bottom:12px;opacity:.6}.empty-state h3{font-size:16px;font-weight:600;color:var(--text-secondary);margin-bottom:6px}.empty-state p{font-size:13px;line-height:1.5}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;z-index:100;display:flex;align-items:flex-end;justify-content:center;padding:0;animation:fadeIn .15s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.modal-sheet{background:var(--bg);border-radius:20px 20px 0 0;width:100%;max-width:var(--max-w);max-height:92vh;overflow-y:auto;animation:slideUp .2s ease;padding-bottom:env(safe-area-inset-bottom,16px)}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}.modal-handle{width:36px;height:4px;background:var(--border);border-radius:2px;margin:12px auto 0}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 0}.modal-title{font-size:17px;font-weight:700}.modal-close{width:32px;height:32px;border-radius:50%;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--text-secondary);font-size:18px;font-weight:400}.modal-body{padding:20px;display:flex;flex-direction:column;gap:16px}.form-group{display:flex;flex-direction:column;gap:6px}.form-label{font-size:12px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.06em}.form-input{background:var(--surface);border:1.5px solid var(--border);border-radius:var(--radius-sm);padding:10px 12px;font-size:15px;color:var(--text);outline:none;width:100%;min-height:44px;transition:border-color .1s}.form-input:focus{border-color:var(--accent)}.form-input::placeholder{color:var(--text-muted)}.type-toggle{display:flex;background:var(--surface-2);border-radius:var(--radius-sm);padding:3px}.type-btn{flex:1;padding:8px;border-radius:5px;font-size:13px;font-weight:600;text-align:center;min-height:36px;transition:all .12s;color:var(--text-secondary)}.type-btn.active.agenda{background:var(--surface);color:var(--agenda-border);box-shadow:var(--shadow)}.type-btn.active.todo{background:var(--surface);color:var(--todo-border);box-shadow:var(--shadow)}.priority-selector{display:flex;gap:6px}.priority-opt{flex:1;padding:8px 4px;border-radius:var(--radius-sm);font-size:12px;font-weight:700;text-align:center;border:1.5px solid var(--border);min-height:40px;display:flex;align-items:center;justify-content:center;background:var(--surface);color:var(--text-secondary);transition:all .1s}.priority-opt.selected.p1{background:var(--p1-bg);color:var(--p1-text);border-color:var(--p1-text)}.priority-opt.selected.p2{background:var(--p2-bg);color:var(--p2-text);border-color:var(--p2-text)}.priority-opt.selected.p3{background:var(--p3-bg);color:var(--p3-text);border-color:var(--p3-text)}.priority-opt.selected.p4{background:var(--p4-bg);color:var(--p4-text);border-color:var(--p4-text)}.priority-opt.selected.p5{background:var(--p5-bg);color:var(--p5-text);border-color:var(--p5-text)}.date-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.subtasks-form{display:flex;flex-direction:column;gap:6px}.subtask-input-row{display:flex;align-items:center;gap:6px}.subtask-remove{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--surface-2);color:var(--text-muted);flex-shrink:0;font-size:16px;line-height:1}.btn-add-subtask{display:flex;align-items:center;gap:6px;color:var(--accent);font-size:13px;font-weight:600;padding:6px 0;min-height:36px}.project-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239e9d99' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:32px}.btn-submit{background:var(--text);color:#fff;padding:14px;border-radius:var(--radius);font-size:15px;font-weight:700;width:100%;min-height:50px;text-align:center;margin-top:4px}.btn-submit:active{opacity:.85}.btn-submit:disabled{opacity:.4}.projects-page{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--bg);z-index:90;overflow-y:auto;display:flex;justify-content:center}.projects-page-inner{width:100%;max-width:var(--max-w);padding-bottom:40px}.projects-page-header{padding:16px 16px 8px;display:flex;align-items:center;gap:8px;position:sticky;top:0;background:var(--bg);z-index:1}.btn-back{width:36px;height:36px;border-radius:50%;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--text);flex-shrink:0}.projects-page-title{font-size:17px;font-weight:700}.projects-list{padding:0 16px;display:flex;flex-direction:column;gap:8px;margin-bottom:20px}.project-item{background:var(--surface);border-radius:var(--radius);padding:12px 16px;display:flex;align-items:center;gap:10px;box-shadow:var(--shadow)}.project-item-dot{width:12px;height:12px;border-radius:50%;flex-shrink:0}.project-item-name{flex:1;font-size:14px;font-weight:600}.project-item-delete{width:32px;height:32px;border-radius:6px;display:flex;align-items:center;justify-content:center;color:var(--text-muted)}.project-item-delete:active{color:var(--danger);background:var(--surface-2)}.add-project-form{padding:0 16px}.add-project-form h3{font-size:13px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.06em;margin-bottom:12px}.color-swatches{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.color-swatch{width:36px;height:36px;border-radius:50%;border:3px solid transparent;transition:all .1s;outline:none}.color-swatch.selected{border-color:var(--text)}.loading{padding:40px;text-align:center;color:var(--text-muted);font-size:13px}.divider{height:1px;background:var(--border);margin:4px 0 16px}.type-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0;margin-top:5px}.type-dot.agenda{background:var(--agenda-border)}.type-dot.todo{background:var(--todo-border)}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.bottom-pad{height:24px}.dots-menu-wrapper{position:relative;flex-shrink:0}.dots-btn{width:28px;height:28px;border-radius:6px;display:flex;align-items:center;justify-content:center;color:var(--text-muted)}.dots-btn:active{background:var(--surface-2)}.dots-dropdown{position:absolute;right:0;top:30px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-md);border:1px solid var(--border);min-width:150px;z-index:50;overflow:hidden}.dots-option{display:flex;align-items:center;gap:8px;padding:11px 14px;width:100%;font-size:14px;font-weight:500;color:var(--text);text-align:left}.dots-option:active{background:var(--surface-2)}.dots-option.danger{color:var(--danger)}.todo-check-btn{flex-shrink:0;width:22px;height:22px;display:flex;align-items:center;justify-content:center;margin-right:2px}.todo-circle{width:18px;height:18px;border-radius:50%;border:2px solid var(--todo-border);transition:all .1s}.todo-check-btn:active .todo-circle{background:var(--todo-border);transform:scale(.9)}.all-done-banner{background:var(--p3-bg);color:var(--p3-text);border-radius:6px;padding:8px 10px;font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}.all-done-yes{background:var(--p3-text);color:#fff;border-radius:5px;padding:4px 10px;font-size:12px;font-weight:700;min-height:28px}.all-done-no{color:var(--p3-text);font-size:12px;font-weight:600;padding:4px 6px;min-height:28px;opacity:.7}.confirm-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000059;z-index:200;display:flex;align-items:center;justify-content:center;padding:24px}.confirm-box{background:var(--surface);border-radius:var(--radius);padding:20px;width:100%;max-width:320px;box-shadow:var(--shadow-md)}.confirm-message{font-size:15px;font-weight:600;color:var(--text);margin-bottom:16px;line-height:1.4}.confirm-actions{display:flex;gap:8px;justify-content:flex-end}.confirm-cancel{padding:9px 16px;border-radius:var(--radius-sm);background:var(--surface-2);color:var(--text-secondary);font-size:14px;font-weight:600;min-height:40px}.confirm-ok{padding:9px 16px;border-radius:var(--radius-sm);background:var(--text);color:#fff;font-size:14px;font-weight:600;min-height:40px}.confirm-ok.danger{background:var(--danger)}.completed-section{margin-top:20px;border-radius:var(--radius);overflow:hidden;border:1.5px solid var(--border)}.completed-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:var(--surface);width:100%;font-size:13px;font-weight:600;color:var(--text-secondary);min-height:44px}.completed-header-label{display:flex;align-items:center;gap:2px}.completed-count{background:var(--surface-2);color:var(--text-muted);border-radius:10px;padding:1px 7px;font-size:11px;font-weight:700;margin-left:6px}.completed-body{border-top:1px solid var(--border);background:var(--surface)}.bulk-delete-btn{display:flex;align-items:center;gap:6px;padding:10px 14px;font-size:12px;font-weight:600;color:var(--danger);border-bottom:1px solid var(--surface-2);width:100%;min-height:40px}.completed-list{display:flex;flex-direction:column}.completed-item{padding:10px 14px;border-bottom:1px solid var(--surface-2);display:flex;flex-direction:column;gap:3px}.completed-item:last-child{border-bottom:none}.completed-item-main{display:flex;align-items:center;gap:8px}.completed-item-title{font-size:13px;font-weight:500;color:var(--text-muted);text-decoration:line-through;flex:1}.completed-item-meta{display:flex;align-items:center;gap:8px;padding-left:36px}.completed-project{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--text-muted)}.completed-date{font-size:11px;color:var(--text-muted)}.completed-item-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:2px}.completed-action{width:32px;height:32px;border-radius:6px;display:flex;align-items:center;justify-content:center}.completed-action.restore{background:var(--p4-bg);color:var(--p4-text)}.completed-action.delete{background:var(--surface-2);color:var(--text-muted)}.completed-action:active{opacity:.7}.subtask-existing{display:flex;align-items:center;gap:8px;min-height:44px;cursor:default}.subtask-done-dot{width:8px;height:8px;border-radius:50%;background:var(--p3-text);flex-shrink:0}
