:root,:root[data-theme=light]{--bg:#f6f7f9;--surface:#fff;--surface-2:#f1f2f5;--text:#14161a;--text-muted:#5b6471;--text-subtle:#9aa3af;--border:#e8eaed;--input-border:#dcdfe4;--primary:#4f46e5;--primary-hover:#4338ca;--primary-soft:#eef0ff;--danger:#d92d20;--danger-bg:#fee4e2;--shadow-sm:0 1px 2px #1018280d;--shadow-md:0 8px 24px #1018281f;--shadow-lg:0 20px 48px #10182833}:root[data-theme=dark]{--bg:#0d0f13;--surface:#171a21;--surface-2:#1f232c;--text:#e7eaf0;--text-muted:#9aa3af;--text-subtle:#6b7280;--border:#262b35;--input-border:#333a47;--primary:#6366f1;--primary-hover:#818cf8;--primary-soft:#232437;--danger:#f97066;--danger-bg:#3a1a1a;--shadow-sm:0 1px 2px #0006;--shadow-md:0 8px 24px #00000080;--shadow-lg:0 20px 48px #0009}*{box-sizing:border-box}html,body,#root{width:100%;min-width:0;min-height:100%;margin:0;padding:0}body{background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;transition:background .2s,color .2s}button{font-family:inherit}.app{max-width:640px;margin:0 auto;padding:2rem 1.25rem 6rem}.app-header{justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1.5rem;display:flex}.app-header h1{letter-spacing:-.02em;margin:0;font-size:1.75rem;font-weight:700}.subtitle{color:var(--text-muted);margin:.25rem 0 0;font-size:.9rem}.icon-btn{border:1px solid var(--border);background:var(--surface);width:40px;height:40px;color:var(--text-muted);cursor:pointer;border-radius:10px;place-items:center;transition:background .15s,color .15s,border-color .15s,transform .1s;display:grid}.icon-btn:hover{background:var(--surface-2);color:var(--text)}.icon-btn:active{transform:scale(.96)}.todo-list{flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none;display:flex}.todo-item{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-sm);border-radius:12px;align-items:flex-start;gap:.75rem;padding:.9rem 1rem;transition:border-color .15s,background .15s;display:flex}.todo-item:hover{border-color:var(--input-border)}.checkbox{border:2px solid var(--input-border);color:#fff;cursor:pointer;background:0 0;border-radius:50%;flex-shrink:0;place-items:center;width:22px;height:22px;margin-top:1px;transition:background .15s,border-color .15s,transform .1s;display:grid}.checkbox:active{transform:scale(.9)}.todo-item .content{flex:1;min-width:0}.todo-item .title{word-break:break-word;font-weight:500;line-height:1.4}.todo-item .desc{color:var(--text-muted);white-space:pre-wrap;word-break:break-word;margin-top:.15rem;font-size:.9rem;line-height:1.4}.todo-item.done .title{color:var(--text-subtle);text-decoration:line-through}.todo-item.done .desc{color:var(--text-subtle)}.todo-item .delete{width:32px;height:32px;color:var(--text-subtle);cursor:pointer;opacity:0;background:0 0;border:none;border-radius:8px;flex-shrink:0;place-items:center;transition:opacity .15s,background .15s,color .15s;display:grid}.todo-item:hover .delete{opacity:1}.todo-item .delete:hover{background:var(--danger-bg);color:var(--danger)}@media (hover:none){.todo-item .delete{opacity:1}}.empty-state{text-align:center;color:var(--text-muted);padding:4rem 1rem}.empty-emoji{opacity:.6;margin-bottom:.75rem;font-size:3rem}.error{background:var(--danger-bg);color:var(--danger);border-radius:10px;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:1rem;padding:.65rem .9rem;font-size:.9rem;display:flex}.link{color:inherit;cursor:pointer;font-size:inherit;background:0 0;border:none;text-decoration:underline}.fab{background:var(--primary);color:#fff;cursor:pointer;width:56px;height:56px;box-shadow:var(--shadow-md);border:none;border-radius:50%;place-items:center;transition:transform .15s,background .15s,box-shadow .15s;display:grid;position:fixed;bottom:24px;right:24px}.fab:hover{background:var(--primary-hover);box-shadow:var(--shadow-lg);transform:translateY(-2px)}.fab:active{transform:translateY(0)scale(.96)}.overlay{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:40;background:#0a0c1080;justify-content:center;align-items:center;padding:1rem;animation:.15s fade-in;display:flex;position:fixed;inset:0}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.modal{background:var(--surface);width:100%;max-width:480px;box-shadow:var(--shadow-lg);border:1px solid var(--border);overscroll-behavior:contain;border-radius:16px;max-height:calc(100dvh - 2rem);animation:.18s pop-in;overflow-y:auto}@keyframes pop-in{0%{opacity:0;transform:translateY(8px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.modal-header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:1rem 1.25rem;display:flex}.modal-header h2{margin:0;font-size:1.1rem;font-weight:600}.modal-body{flex-direction:column;gap:1rem;padding:1.25rem;display:flex}.modal-body label{flex-direction:column;gap:.4rem;display:flex}.modal-body label>span{color:var(--text-muted);font-size:.85rem;font-weight:500}.modal-body label em{color:var(--text-subtle);font-style:normal;font-weight:400}.modal-body input,.modal-body textarea{border:1px solid var(--input-border);background:var(--surface);width:100%;color:var(--text);resize:vertical;border-radius:10px;padding:.65rem .8rem;font-family:inherit;font-size:1rem;transition:border-color .15s,box-shadow .15s}.modal-body input:focus,.modal-body textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft);outline:none}.modal-actions{justify-content:flex-end;gap:.5rem;margin-top:.25rem;display:flex}.btn{cursor:pointer;border:1px solid #0000;border-radius:10px;padding:.6rem 1.1rem;font-size:.95rem;font-weight:500;transition:background .15s,color .15s,border-color .15s,transform .1s}.btn:active{transform:scale(.98)}.btn.primary{background:var(--primary);color:#fff}.btn.primary:hover{background:var(--primary-hover)}.btn.primary:disabled{opacity:.5;cursor:not-allowed}.btn.ghost{color:var(--text-muted);border-color:var(--border);background:0 0}.btn.ghost:hover{background:var(--surface-2);color:var(--text)}.drawer-overlay{opacity:0;pointer-events:none;background:#0a0c1066;justify-content:flex-end;align-items:stretch;padding:0;transition:opacity .2s}.drawer-overlay.show{opacity:1;pointer-events:auto}.drawer{background:var(--surface);border-left:1px solid var(--border);width:100%;max-width:360px;box-shadow:var(--shadow-lg);z-index:50;flex-direction:column;transition:transform .25s cubic-bezier(.4,0,.2,1);display:flex;position:fixed;top:0;bottom:0;right:0;transform:translate(100%)}.drawer.open{transform:translate(0)}.drawer-body{flex-direction:column;gap:1.5rem;padding:1.25rem;display:flex;overflow-y:auto}.settings-section h3{text-transform:uppercase;letter-spacing:.05em;color:var(--text-subtle);margin:0 0 .6rem;font-size:.8rem;font-weight:600}.segmented{background:var(--surface-2);border-radius:10px;gap:.25rem;padding:.25rem;display:flex}.segmented button{color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:1;justify-content:center;align-items:center;gap:.35rem;padding:.5rem .6rem;font-size:.85rem;font-weight:500;transition:background .15s,color .15s;display:flex}.segmented button:hover{color:var(--text)}.segmented button.active{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}@media (width<=480px){.app{padding:1.25rem 1rem 6rem}.app-header h1{font-size:1.4rem}.drawer{max-width:100%}}.row-2{grid-template-columns:1fr 1fr;gap:1rem;display:grid}@media (width<=480px){.row-2{grid-template-columns:1fr}}.modal-body select,.full-select{border:1px solid var(--input-border);background:var(--surface);width:100%;color:var(--text);cursor:pointer;border-radius:10px;padding:.65rem .8rem;font-family:inherit;font-size:1rem}.modal-body select:focus,.full-select:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft);outline:none}.todo-groups{flex-direction:column;gap:1.5rem;display:flex}.todo-group .group-title{text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);align-items:center;gap:.5rem;margin:0 0 .6rem;font-size:.85rem;font-weight:600;display:flex}.todo-group .group-title .count{background:var(--surface-2);color:var(--text-muted);border-radius:999px;margin-left:auto;padding:.1rem .5rem;font-size:.75rem;font-weight:500}.dot{border-radius:50%;flex-shrink:0;width:8px;height:8px;display:inline-block}.todo-item .content{min-width:0}.todo-item .title-row{align-items:center;gap:.5rem;display:flex}.todo-item .title{flex:1;min-width:0}.urgency-dot{border-radius:50%;flex-shrink:0;width:8px;height:8px}.todo-item .meta{flex-wrap:wrap;gap:.35rem;margin-top:.5rem;display:flex}.badge{border:1px solid var(--border);color:var(--text-muted);background:var(--surface-2);border-radius:999px;align-items:center;gap:.3rem;padding:.15rem .5rem;font-size:.75rem;line-height:1.4;display:inline-flex}.badge.category .dot{margin-right:.15rem}.badge.due.overdue{color:var(--danger);border-color:var(--danger);background:var(--danger-bg)}.badge.urgency{background:0 0;font-weight:500}.todo-item .actions{opacity:0;flex-shrink:0;gap:.25rem;transition:opacity .15s;display:flex}.todo-item:hover .actions{opacity:1}.icon-btn.small{border-radius:8px;width:32px;height:32px}.icon-btn.danger:hover{background:var(--danger-bg);color:var(--danger)}@media (hover:none){.todo-item .actions{opacity:1}}.category-manager{flex-direction:column;gap:.75rem;display:flex}.category-list{flex-direction:column;gap:.35rem;margin:0;padding:0;list-style:none;display:flex}.category-item{background:var(--surface-2);border-radius:10px;align-items:center;gap:.5rem;padding:.5rem .6rem;font-size:.9rem;display:flex}.category-item .name{flex:1}.category-item.editing{flex-direction:column;align-items:stretch;gap:.5rem;padding:.75rem}.category-item.editing input{border:1px solid var(--input-border);background:var(--surface);color:var(--text);border-radius:8px;padding:.5rem .6rem;font-size:.9rem}.color-row{flex-wrap:wrap;gap:.3rem;display:flex}.swatch{cursor:pointer;border:2px solid #0000;border-radius:50%;width:22px;height:22px;padding:0;transition:transform .1s,border-color .15s}.swatch:hover{transform:scale(1.1)}.swatch.active{border-color:var(--text);transform:scale(1.1)}.row-actions{justify-content:flex-end;gap:.5rem;display:flex}.btn.small{border-radius:8px;padding:.4rem .75rem;font-size:.85rem}.category-create{border:1px dashed var(--input-border);border-radius:10px;flex-direction:column;gap:.5rem;padding:.75rem;display:flex}.category-create input{border:1px solid var(--input-border);background:var(--surface);color:var(--text);border-radius:8px;padding:.55rem .7rem;font-size:.9rem}.segmented.wrap{flex-wrap:wrap}.segmented.wrap button{flex:none;min-width:40%}.checkbox:hover{border-color:var(--checkbox-color,var(--primary))}.todo-item.done .checkbox{background:var(--checkbox-color,var(--primary));border-color:var(--checkbox-color,var(--primary))}html{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;min-height:100%}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}body{min-height:100dvh}button,input,select,textarea{touch-action:manipulation}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--primary);outline-offset:3px}.icon-btn{min-width:44px;min-height:44px}.task-tabs{margin-bottom:1.5rem}.task-tabs button{min-height:44px}.account-name{color:var(--text-muted);overflow-wrap:anywhere;margin:.35rem 0}.account-section{flex-direction:column;gap:.5rem;display:flex}.fab{bottom:max(24px, env(safe-area-inset-bottom));right:max(24px, env(safe-area-inset-right));z-index:10}.drawer-body{padding-bottom:max(1.25rem, env(safe-area-inset-bottom))}.category-item .name,.badge{overflow-wrap:anywhere;min-width:0}.auth-page{place-items:center;min-height:100dvh;padding:1.25rem;display:grid}.auth-card{border:1px solid var(--border);background:var(--surface);width:100%;max-width:420px;box-shadow:var(--shadow-md);border-radius:20px;padding:2rem}.auth-card h1{margin:0;font-size:1.7rem}.auth-logo{background:var(--primary);color:#fff;border-radius:14px;place-items:center;width:48px;height:48px;margin-bottom:1.25rem;font-size:1.6rem;display:grid}.auth-form{padding:1.5rem 0 1rem}.auth-form .btn{min-height:48px}.auth-switch{color:var(--primary);text-align:left;min-height:44px;padding:0}@media (width<=600px){.app{padding:max(1.25rem, env(safe-area-inset-top)) 1rem calc(6rem + env(safe-area-inset-bottom))}.todo-item{grid-template-columns:28px minmax(0,1fr);gap:.5rem .65rem;padding:.85rem;display:grid}.todo-item .actions{opacity:1;grid-column:2;justify-content:flex-end}.checkbox{width:28px;height:28px;position:relative}.checkbox:before{content:"";position:absolute;inset:-8px}.icon-btn.small{width:44px;height:44px}.overlay:not(.drawer-overlay){padding:.5rem}.modal{max-height:calc(100dvh - 1rem)}.modal-header,.modal-body{padding:1rem}.modal-actions .btn{flex:1;min-height:44px}.drawer{max-width:100%}.drawer .modal-header{padding-top:max(1rem, env(safe-area-inset-top))}.segmented button{min-width:0;min-height:44px;padding:.5rem .35rem}.swatch{width:32px;height:32px}.category-create input,.category-item.editing input{font-size:16px}.auth-card{padding:1.5rem}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition:none!important;animation:none!important}}
