:root{--bg: #f6f7f9;--surface: #ffffff;--surface-2: #f0f2f5;--border: #e2e5ea;--text: #1b1f27;--muted: #687082;--accent: #2f5bd3;--accent-soft: #e6ecfb;--danger: #c93a3a;--warn: #c27a0e;--ok: #2e8b57;--c-blue: #2f6fd3;--c-green: #2e8b57;--c-orange: #d9822b;--c-red: #d14343;--c-purple: #7d4cc9;--c-teal: #1a9a9a;--radius: 12px;--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);--nav-h: 64px;color-scheme:light}@media(prefers-color-scheme:dark){:root{--bg: #111318;--surface: #1a1d24;--surface-2: #232731;--border: #2e3340;--text: #e8eaf0;--muted: #9aa2b3;--accent: #6c93f0;--accent-soft: #233057;--danger: #f07070;--warn: #e5a54b;--ok: #5cc28b;--shadow: none;color-scheme:dark}}*{box-sizing:border-box}html,body{margin:0}body{background:var(--bg);color:var(--text);font:15px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-tap-highlight-color:transparent}h1{font-size:1.6rem;margin:0}h2{font-size:1.15rem;margin:0}h3{font-size:1rem;margin:0 0 .6rem}h4{font-size:.85rem;margin:1rem 0 .4rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}a{color:var(--accent);text-decoration:none}button{font:inherit;color:inherit;cursor:pointer}input,select,textarea{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:.55rem .7rem;width:100%;min-width:0}input:focus,select:focus,textarea:focus{outline:2px solid var(--accent);outline-offset:-1px;border-color:transparent}input[type=checkbox]{width:auto}input[type=range]{padding:0;border:0}textarea{resize:vertical}.muted{color:var(--muted)}.small{font-size:.85rem}.hint{color:var(--muted);font-size:.85rem;margin:.3rem 0 .6rem}.error{color:var(--danger);margin:0}.empty{color:var(--muted);font-style:italic;margin:.5rem 0}.pre{white-space:pre-wrap}.row{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.row h3{margin:0}.splash,.shell{min-height:100vh}.nav{position:fixed;inset:auto 0 0 0;z-index:20;height:calc(var(--nav-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);display:flex;background:var(--surface);border-top:1px solid var(--border)}.nav .brand,.nav .nav-foot{display:none}.nav-link{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--muted);font-size:.7rem;background:none;border:0;padding:0}.nav-link.active{color:var(--accent)}.main{padding:max(12px,env(safe-area-inset-top)) 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom))}.mobile-top{display:flex;justify-content:flex-end;margin-bottom:4px}@media(min-width:900px){.nav{inset:0 auto 0 0;width:220px;height:auto;flex-direction:column;padding:20px 12px;border-top:0;border-right:1px solid var(--border)}.nav .brand{display:block;font-weight:700;font-size:1.1rem;padding:0 12px 20px}.nav-link{flex:0;flex-direction:row;justify-content:flex-start;gap:12px;padding:10px 12px;border-radius:8px;font-size:.95rem}.nav-link:hover{background:var(--surface-2)}.nav-link.active{background:var(--accent-soft)}.nav .nav-foot{display:flex;flex-direction:column;gap:8px;margin-top:auto}.main{margin-left:220px;padding:28px 32px 40px}.mobile-top{display:none}}.page{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:14px}.page.wide{max-width:1200px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.page-foot{display:flex;justify-content:center;padding-top:8px}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;box-shadow:var(--shadow);min-width:0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:.5rem .9rem;font-weight:500;white-space:nowrap}.btn:hover{background:var(--surface-2)}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover{filter:brightness(1.08)}.btn.danger{color:var(--danger)}.btn.small{padding:.3rem .65rem;font-size:.85rem}.btn:disabled{opacity:.5;cursor:default}.icon-btn{display:inline-grid;place-items:center;width:36px;height:36px;border:0;background:none;border-radius:8px;color:var(--muted);flex:none}.icon-btn:hover{background:var(--surface-2);color:var(--text)}.icon-btn:disabled{opacity:.4}.seg{display:inline-flex;background:var(--surface-2);border-radius:9px;padding:3px;align-self:flex-start}.seg button{border:0;background:none;padding:.35rem .9rem;border-radius:7px;color:var(--muted)}.seg button.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}.chip{flex:none;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);background:var(--surface);border-radius:999px;padding:.4rem .9rem}.chip.active{background:var(--accent);border-color:var(--accent);color:#fff}.chip.ghost{color:var(--muted);border-style:dashed}.chip .count{background:#0000001f;border-radius:999px;padding:0 .45rem;font-size:.75rem}.date-nav{display:flex;align-items:center;gap:8px}.date-nav strong{min-width:0;white-space:nowrap;flex:1;text-align:center;overflow:hidden;text-overflow:ellipsis}@media(min-width:900px){.date-nav strong{flex:0 1 auto}}.banner{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:var(--accent-soft);border-radius:var(--radius);padding:10px 14px}.sync-badge{display:inline-flex;align-items:center;gap:6px;border:0;background:var(--surface-2);color:var(--muted);border-radius:999px;padding:.25rem .7rem;font-size:.78rem}.sync-badge .dot{width:8px;height:8px;border-radius:50%;background:var(--ok)}.sync-badge.busy .dot{background:var(--accent)}.sync-badge.warn .dot{background:var(--warn)}.progress{height:6px;background:var(--surface-2);border-radius:99px;overflow:hidden}.progress>div{height:100%;background:var(--accent);border-radius:99px;transition:width .3s}.tag{font-size:.72rem;background:var(--accent-soft);color:var(--accent);border-radius:6px;padding:1px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:40%}.check{flex:none;width:24px;height:24px;border-radius:50%;border:2px solid var(--border);background:none;padding:0;position:relative}.check.on{background:var(--accent);border-color:var(--accent)}.check.on:after{content:"";position:absolute;left:7px;top:3px;width:6px;height:11px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.modal{border:0;padding:0;background:var(--surface);color:var(--text);border-radius:16px;width:min(560px,calc(100vw - 32px));max-height:90vh}.modal::backdrop{background:#0a0c1273}.modal-body{padding:16px 18px 18px}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}@media(max-width:600px){.modal{width:100vw;max-width:100vw;margin:auto 0 0;border-radius:16px 16px 0 0;padding-bottom:env(safe-area-inset-bottom)}}.form{display:flex;flex-direction:column;gap:12px}.form label,label.block{display:flex;flex-direction:column;gap:4px;font-size:.85rem;color:var(--muted);flex:1;min-width:0}.form label.inline{flex-direction:row;align-items:center;gap:8px;color:var(--text);font-size:.95rem}.form-row{display:flex;gap:10px;flex-wrap:wrap}.form-row>label{min-width:120px}.form-actions{display:flex;justify-content:space-between;gap:10px;margin-top:4px}.form-actions .primary{margin-left:auto}.toast{position:fixed;z-index:50;left:16px;right:16px;bottom:calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));margin:0 auto;max-width:480px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:10px 14px;box-shadow:0 6px 24px #0000002e}.toast span{flex:1}@media(min-width:900px){.toast{bottom:20px}}.login{min-height:100vh;display:grid;place-items:center;padding:16px}.login-card{width:min(380px,100%);display:flex;flex-direction:column;gap:14px;padding:28px 24px}.login-card label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:.85rem}.tasks{list-style:none;margin:0 0 6px;padding:0}.task{display:flex;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid var(--border)}.task:last-child{border-bottom:0}.task-main{flex:1;min-width:0;display:flex;align-items:center;gap:8px;border:0;background:none;padding:4px 0;text-align:left}.task-title{flex:1 1 auto;min-width:0;overflow-wrap:break-word}.task-time{font-size:.78rem;font-variant-numeric:tabular-nums;color:var(--accent);background:var(--accent-soft);padding:1px 6px;border-radius:6px;white-space:nowrap}.task.done .task-title{text-decoration:line-through;color:var(--muted)}.task.p3 .check:not(.on){border-color:var(--danger)}.task.p2 .check:not(.on){border-color:var(--warn)}.task[draggable=true]{cursor:grab}.quick-add{display:flex;gap:6px;align-items:center;margin-top:6px}.quick-add input{border-style:dashed;background:transparent}.drop-over{outline:2px dashed var(--accent);outline-offset:2px;border-radius:var(--radius)}.day-note h3{margin-bottom:.4rem}.focus{margin:0 0 12px;padding-left:1.4rem;display:flex;flex-direction:column;gap:6px}.focus input{border-color:transparent;background:var(--surface-2)}.day-note label.block{margin-bottom:10px}.planner{display:grid;gap:14px}@media(min-width:1000px){.planner{grid-template-columns:1fr 280px;align-items:start}}.week{display:grid;gap:10px}@media(min-width:700px){.week{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}}.week-day{padding:10px 12px}.week-day.today{border-color:var(--accent)}.week-day-head{display:flex;gap:6px;align-items:baseline;border:0;background:none;padding:0 0 6px;color:var(--muted)}.week-day-head strong{color:var(--text);font-size:1.1rem}.week-day .task{font-size:.9rem;align-items:flex-start}.week-day .task .check{margin-top:4px}.week-day .task-main{flex-wrap:wrap;gap:2px 6px}.inbox .tasks .task-main{padding:6px 0}.goal{padding:10px 0;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:6px}.goal:last-child{border-bottom:0}.goal .goal{border-bottom:0;padding-bottom:0}.goal-head{display:flex;align-items:center;gap:6px}.goal-title{flex:1;display:flex;flex-direction:column;align-items:flex-start;border:0;background:none;padding:0;text-align:left}.goal-detail{padding:6px 0 4px 12px;border-left:2px solid var(--accent-soft);display:flex;flex-direction:column;gap:6px;align-items:stretch}.goal-detail>.btn{align-self:flex-start}.goal.compact{padding:6px 0;border:0}.cal-layout{display:grid;gap:14px}@media(min-width:1000px){.cal-layout{grid-template-columns:1fr 320px;align-items:start}}.month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;padding:8px}.dow{text-align:center;font-size:.75rem;color:var(--muted);padding:4px 0}.cell{min-height:54px;display:flex;flex-direction:column;align-items:center;gap:3px;padding:4px 2px;border:0;border-radius:8px;background:none;overflow:hidden}.cell:hover{background:var(--surface-2)}.cell.other .num{color:var(--muted);opacity:.6}.cell .num{font-size:.85rem;width:26px;height:26px;display:grid;place-items:center;border-radius:50%}.cell.today .num{background:var(--accent);color:#fff;font-weight:600}.cell.sel{background:var(--accent-soft)}.cell .pills{display:none}.cell .dots{display:flex;gap:3px;flex-wrap:wrap;justify-content:center}.cell .dots i{width:6px;height:6px;border-radius:50%;background:var(--c)}.cell .dots .task-dot{background:none;border:1.5px solid var(--muted);width:6px;height:6px}@media(min-width:700px){.cell{min-height:96px;align-items:stretch}.cell .num{align-self:flex-end}.cell .pills{display:flex;flex-direction:column;gap:2px}.cell .dots i:not(.task-dot){display:none}.cell .dots{justify-content:flex-start}.pill{font-size:.72rem;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:1px 5px;border-radius:4px;background:color-mix(in srgb,var(--c) 18%,transparent);color:var(--text);border-left:3px solid var(--c)}.more{font-size:.7rem;color:var(--muted);text-align:left}}.c-blue{--c: var(--c-blue)}.c-green{--c: var(--c-green)}.c-orange{--c: var(--c-orange)}.c-red{--c: var(--c-red)}.c-purple{--c: var(--c-purple)}.c-teal{--c: var(--c-teal)}.agenda-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.agenda-item{width:100%;display:flex;gap:10px;align-items:stretch;text-align:left;border:0;background:none;padding:6px 4px;border-radius:8px}button.agenda-item:hover{background:var(--surface-2)}.agenda-item>span{display:flex;flex-direction:column;min-width:0}.agenda-item .bar{width:4px;border-radius:2px;background:var(--c);flex:none}.agenda .row{margin-bottom:8px}.add-item{display:flex;gap:6px;padding:8px;flex-wrap:wrap}.add-item .grow{flex:1 1 180px}.add-item .qty{flex:0 0 70px}.add-item .cat{flex:1 1 110px}.group{display:flex;flex-direction:column}.group-title{font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:6px 4px}.group-title h3{font-size:inherit;margin:0}.items{list-style:none;margin:0;padding:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.item{display:flex;align-items:center;border-bottom:1px solid var(--border);padding-right:4px}.item:last-child{border-bottom:0}.item-main{flex:1;min-width:0;display:flex;align-items:center;gap:12px;border:0;background:none;padding:14px;text-align:left;font-size:1rem}.item-name{flex:1;min-width:0;overflow-wrap:break-word}.item-qty{color:var(--muted);font-size:.9rem}.item.checked .item-name{text-decoration:line-through;color:var(--muted)}.today-grid{display:grid;gap:14px}@media(min-width:800px){.today-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:1200px){.today-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}.link-list{list-style:none;margin:0;padding:0}.link-list a{display:flex;justify-content:space-between;padding:8px 0;color:var(--text);border-bottom:1px solid var(--border)}.link-list li:last-child a{border-bottom:0}
