:root{--bg:#fafaf7;--surface:#fff;--ink:#1b1f23;--muted:#5b6470;--faint:#8a919b;--line:#e4e2da;--track:#ecebe6;--today:#c2410c;--danger:#b91c1c;--ok:#166534;--radius:14px}*{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--bg);color:var(--ink);-webkit-tap-highlight-color:transparent;margin:0;font-family:Inter,system-ui,-apple-system,sans-serif}button{font:inherit;color:inherit;cursor:pointer}h1{letter-spacing:-.02em;margin:0;font-size:26px;font-weight:700}h2{margin:0;font-size:16px;font-weight:700}.muted{color:var(--muted);font-weight:500}.small{font-size:12px}.error{color:var(--danger);margin:8px 0 0}.info{color:var(--ok);margin:8px 0 0}.center-note{text-align:center;color:var(--muted);margin-top:30vh}.empty{color:var(--muted);margin:8px 0;font-size:14px}.empty.padded{text-align:center;padding:24px 20px}.app{background:var(--bg);flex-direction:column;max-width:520px;height:100dvh;margin:0 auto;display:flex}.app-main{flex:1;min-height:0;overflow-y:auto}.screen{padding-bottom:24px}.banner{padding:calc(env(safe-area-inset-top) + 8px) 16px 8px;color:var(--danger);background:#fdecec;justify-content:space-between;align-items:center;gap:12px;font-size:14px;display:flex}.tabbar{background:var(--surface);border-top:1px solid var(--line);padding:6px 16px calc(env(safe-area-inset-bottom) + 6px);display:flex}.tab{min-height:52px;color:var(--muted);background:0 0;border:0;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:3px;font-size:11px;font-weight:500;display:flex}.tab.active{color:var(--ink);font-weight:600}.screen-header{padding:calc(env(safe-area-inset-top) + 20px) 20px 8px;justify-content:space-between;align-items:center;gap:8px;display:flex}.add-btn{background:var(--ink);color:#fff;border:0;border-radius:22px;flex:none;justify-content:center;align-items:center;width:44px;height:44px;display:flex}.icon-btn{width:44px;height:44px;color:var(--muted);background:0 0;border:0;border-radius:22px;justify-content:center;align-items:center;display:flex}.month-nav{align-items:center;margin-left:-12px;display:flex}.title-btn{letter-spacing:-.02em;background:0 0;border:0;min-height:44px;padding:0 2px;font-size:24px;font-weight:700}.toggle{background:var(--track);border-radius:12px;margin:4px 20px 12px;padding:3px;display:flex}.toggle-option{height:38px;color:var(--muted);background:0 0;border:0;border-radius:10px;flex:1;font-size:14px;font-weight:500;transition:background-color .2s,color .2s}.toggle-option.on{background:var(--surface);color:var(--ink);font-weight:600;box-shadow:0 1px 2px #00000014}.month{padding:0 12px}.weekdays,.week{text-align:center;grid-template-columns:repeat(7,minmax(0,1fr));display:grid}.weekdays{color:var(--muted);letter-spacing:.04em;padding-bottom:4px;font-size:11px;font-weight:600}.day-cell{background:0 0;border:0;flex-direction:column;grid-row:1;justify-content:space-between;align-items:center;height:60px;padding:3px 0 4px;display:flex}.bar{pointer-events:none;grid-row:1;align-self:start;height:4px}.bar.starts{border-top-left-radius:2px;border-bottom-left-radius:2px;margin-left:6px}.bar.ends{border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:6px}.day-num{border-radius:16px;justify-content:center;align-items:center;width:32px;height:32px;font-size:15px;font-weight:500;display:flex}.day-num.today{color:var(--today);font-weight:700}.day-num.selected{background:var(--ink);color:#fff;font-weight:700}.day-num.other-month{color:var(--faint)}.dots{gap:3px;height:7px;display:flex}.dot{border-radius:50%;width:7px;height:7px;display:inline-block}.dot.big{vertical-align:-1px;width:12px;height:12px}.legend{color:var(--muted);justify-content:center;gap:14px;padding:8px 0 12px;font-size:11px;font-weight:500;display:flex}.legend>span{align-items:center;gap:5px;display:flex}.day-panel{background:var(--surface);border-top:1px solid var(--line);border-radius:20px 20px 0 0;flex-direction:column;gap:10px;min-height:200px;padding:16px 20px;display:flex}.day-panel-head{justify-content:space-between;align-items:baseline;display:flex}.event-row{align-items:stretch;gap:12px;display:flex}.event-time{width:50px;color:var(--muted);flex:none;padding-top:13px;font-size:12px;font-weight:600}.event-card{text-align:left;border-radius:var(--radius);border:0;flex:1;justify-content:space-between;align-items:center;gap:8px;min-width:0;min-height:44px;padding:12px 14px;animation:.25s ease-out rise-in;display:flex}.event-text{flex-direction:column;gap:2px;min-width:0;display:flex}.event-title{overflow-wrap:anywhere;font-size:15px;font-weight:600}.event-sub{color:var(--muted);font-size:12px}.chip{background:var(--surface);border-radius:10px;flex:none;padding:4px 10px;font-size:11px;font-weight:600}.agenda{flex-direction:column;gap:18px;padding:0 20px;display:flex}.agenda-day{flex-direction:column;gap:8px;display:flex}.agenda-head{align-items:baseline;gap:8px;display:flex}.agenda-head h2{font-size:15px}.agenda-head h2.today{color:var(--today)}.chips{flex-wrap:wrap;gap:8px;padding:4px 20px 14px;display:flex}.filter-chip{border:2px solid #0000;border-radius:19px;min-height:38px;padding:0 16px;font-size:13px;font-weight:600}.filter-chip.neutral{background:var(--track);color:var(--ink)}.filter-chip.neutral.on{background:var(--ink);color:#fff}.todo-groups{flex-direction:column;gap:18px;padding:0 20px;display:flex}.todo-groups section{flex-direction:column;gap:6px;display:flex}.group-label{color:var(--muted);letter-spacing:.04em;text-transform:uppercase;font-size:13px;font-weight:700}.todo-row{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);align-items:center;gap:4px;padding:2px 12px 2px 2px;animation:.25s ease-out rise-in;display:flex}.check{background:0 0;border:0;flex:none;justify-content:center;align-items:center;width:44px;height:44px;display:flex}.check-circle{border:2px solid var(--faint);color:#fff;border-radius:12px;justify-content:center;align-items:center;width:24px;height:24px;transition:background-color .2s,border-color .2s;display:flex}.todo-main{text-align:left;background:0 0;border:0;flex-direction:column;flex:1;justify-content:center;gap:2px;min-width:0;min-height:52px;padding:6px 0;display:flex}.todo-title{overflow-wrap:anywhere;font-size:15px;font-weight:600}.todo-due{color:var(--muted);font-size:12px}.todo-due.overdue{color:var(--danger);font-weight:600}.todo-row.done .todo-title{color:var(--muted);text-decoration:line-through}.sheet-backdrop{z-index:10;background:#1b1f2359;justify-content:center;align-items:flex-end;animation:.2s ease-out fade-in;display:flex;position:fixed;inset:0}.sheet{background:var(--surface);width:100%;max-width:520px;max-height:92dvh;padding:8px 20px calc(env(safe-area-inset-bottom) + 20px);border-radius:20px 20px 0 0;animation:.25s ease-out slide-up;overflow-y:auto}.sheet-head{justify-content:space-between;align-items:center;margin-right:-10px;display:flex}.form{flex-direction:column;display:flex}.form label,.form .label{margin:14px 0 6px;font-size:14px;font-weight:500}input,textarea{width:100%;min-height:44px;font:inherit;color:var(--ink);background:var(--surface);border:1px solid #cfccc2;border-radius:10px;padding:8px 12px;font-size:16px}textarea{resize:vertical}.form-row{grid-template-columns:1fr 1fr;gap:12px;display:grid}.form .check-line{align-items:center;gap:10px;min-height:44px;margin-bottom:0;display:flex}.check-line input{width:22px;height:22px;min-height:0;accent-color:var(--ink);margin:0}.input-with-btn{align-items:center;gap:8px;display:flex}.input-with-btn .btn-link{width:auto;margin:0}.who-picker{gap:8px;display:flex}.who-option{border:2px solid var(--line);background:var(--surface);min-height:44px;color:var(--muted);text-overflow:ellipsis;white-space:nowrap;border-radius:12px;flex:1;padding:0 8px;font-size:14px;font-weight:600;overflow:hidden}.btn-primary,.btn-secondary,.btn-danger{border:0;border-radius:12px;width:100%;min-height:48px;margin-top:20px;font-size:16px;font-weight:600}.btn-primary{background:var(--ink);color:#fff}.btn-secondary{background:var(--track)}.btn-danger{color:var(--danger);background:0 0;margin-top:8px}.btn-primary:disabled,.btn-danger:disabled{opacity:.6}.btn-link{color:#1d4ed8;background:0 0;border:0;min-height:44px;padding:0 4px;font-weight:600}.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;margin:12px 20px;padding:16px 20px}.card p{margin:0 0 10px}.auth-card{background:var(--surface);border-radius:16px;flex-direction:column;max-width:380px;margin:12vh auto 0;padding:24px;display:flex;box-shadow:0 1px 4px #00000014}.auth-card label{margin:12px 0 4px;font-size:14px}.auth-card .btn-link{margin-top:8px}@keyframes fade-in{0%{opacity:0}}@keyframes slide-up{0%{transform:translateY(100%)}}@keyframes rise-in{0%{opacity:0;transform:translateY(4px)}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition:none!important;animation:none!important}}.event-notes{color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere;margin-top:4px;font-size:13px}.btn-danger.armed{background:var(--danger);color:#fff}
