:root{--bg: #edf4e6;--surface: #ffffff;--ink: #24361b;--muted: #5f6f57;--line: #d0e1c1;--accent: #497b2d;--accent-ink: #fff;--danger: #b3261e;--radius: 16px;--tabbar-h: 62px;--safe-b: env(safe-area-inset-bottom, 0px);--safe-t: env(safe-area-inset-top, 0px);font-family:ui-rounded,SF Pro Rounded,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:var(--ink);-webkit-text-size-adjust:100%}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;background:#d0e1c1;overscroll-behavior-y:none}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer;border:0;background:none;padding:0}h1,h2,p{margin:0}.app{position:relative;max-width:480px;min-height:100dvh;margin:0 auto;background:var(--bg)}.screen{padding:calc(var(--safe-t) + 4px) 16px calc(var(--tabbar-h) + var(--safe-b) + 88px)}.center-screen{display:grid;place-items:center;padding:24px}.spinner{width:32px;height:32px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.notice{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px;line-height:1.5}.notice h1{font-size:20px;margin-bottom:8px}code{font-size:.9em;background:#dcebd2;padding:1px 5px;border-radius:6px;word-break:break-all}.topbar{display:flex;align-items:center;gap:8px;min-height:56px}.topbar h1{flex:1;font-size:24px;font-weight:700;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar .month-title{text-align:center;font-size:20px}.icon-btn{width:44px;height:44px;border-radius:50%;font-size:24px;line-height:1;display:grid;place-items:center;color:var(--ink);flex:none}.icon-btn:active{background:var(--line)}.btn{min-height:48px;padding:0 18px;border-radius:14px;font-weight:600;text-align:center}.btn.primary{background:var(--accent);color:var(--accent-ink)}.btn.primary:disabled{opacity:.55}.btn.danger{color:var(--danger)}.btn.ghost{border:1px solid var(--line);background:var(--surface)}.btn.link{color:var(--accent);font-weight:500}.btn.small{min-height:36px;padding:0 12px;border-radius:10px;font-size:14px;color:var(--accent);background:#e2efd8;flex:none}.logout{width:100%;margin-top:28px}.form{display:flex;flex-direction:column;gap:14px}.field{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}.field>span{font-size:13px;font-weight:600;color:var(--muted)}.field small{color:var(--muted);font-size:13px}.field.narrow{flex:0 0 116px}input,textarea,select{width:100%;min-height:48px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:16px;outline:none;-webkit-appearance:none;appearance:none}textarea{resize:vertical;line-height:1.4}input:focus,textarea:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #497b2d26}.row{display:flex;gap:10px}.switch{display:flex;align-items:center;gap:10px;min-height:44px;font-weight:600}.switch input{width:24px;height:24px;min-height:0;padding:0;-webkit-appearance:auto;appearance:auto;accent-color:var(--accent)}.error{color:var(--danger);background:#fbe9e7;border-radius:12px;padding:10px 12px;font-size:14px;line-height:1.4}.add-btn:disabled{opacity:.45}.shop-add{display:flex;align-items:center;gap:8px;margin-bottom:14px}.shop-add input{flex:1;min-width:0}.shop-add .add-btn{width:48px;height:48px;border-radius:14px}.shop-list{margin-bottom:22px}.shop-list h2{font-size:16px;font-weight:700}.shop-item{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:8px 12px;margin-bottom:8px}.shop-main{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.shop-main strong{overflow-wrap:anywhere}.check{width:26px;height:26px;border-radius:50%;border:2px solid var(--line);display:grid;place-items:center;font-style:normal;font-size:15px;font-weight:700;color:#fff;flex:none}.shop-item.is-done .check{background:#3f9b6b;border-color:#3f9b6b}.shop-item.is-done strong{text-decoration:line-through;color:var(--muted);font-weight:500}.shop-item.is-done .who{opacity:.55}.event-note{font-size:13px;color:var(--muted);white-space:pre-line;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.event-meta.is-late{color:var(--danger);font-weight:600}.shop-item.todo{padding:0;gap:0}.check-btn{align-self:stretch;display:grid;place-items:center;padding:8px 4px 8px 12px;flex:none}.todo-main{display:flex;align-items:center;gap:12px;flex:1;min-width:0;min-height:56px;padding:8px 12px 8px 8px;text-align:left}.field-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.clear-date{font-size:13px;font-weight:600;color:var(--accent);padding:0 2px}.remove-zone{margin-top:18px}.view-switch{margin-bottom:12px}.cal-day.is-holiday .cal-num{color:var(--danger);font-weight:700}.cal-day.is-today.is-holiday .cal-num,.cal-day.is-sel.is-holiday .cal-num{color:#fff}.cal-day.is-vacation{background:#f6efd9;border-radius:10px}.cal-cake{font-size:9px;font-style:normal;line-height:1}.day-note{margin:0 0 8px;padding:8px 12px;border-radius:12px;background:#f6efd9;font-size:14px}.day-note.is-holiday{background:#fbe9e7;color:var(--danger);font-weight:600}.day-note.is-birthday{background:#fbe6f1}.week-day{margin-bottom:18px}.week-day .day-head h2{font-size:16px;font-weight:700}.week-day.is-today .day-head h2{color:var(--accent)}.day-head h2.is-holiday{color:var(--danger)}.week-empty{margin:0 0 4px 2px;color:var(--muted)}.add-btn.small{width:30px;height:30px;border-radius:10px;font-size:20px}.btn.as-link{display:grid;place-items:center;text-decoration:none}.shop-tap{padding-left:12px}.more-btn{align-self:stretch;width:44px;flex:none;font-size:20px;color:var(--muted);border-left:1px solid var(--line)}.shop-cat{margin:0 0 8px;font-size:13px!important;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.suggestions{margin:-4px 0 14px!important}.suggestions .chip{min-height:32px;font-size:13px;border-style:dashed}.week-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.points{color:#b7791f;font-weight:700;white-space:nowrap;flex:none}.points.is-minus{color:var(--muted)}.sub-head{margin:18px 0 8px;font-size:15px}.tab-icon{position:relative;display:grid}.tab-badge{position:absolute;top:-5px;right:-11px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--danger);color:#fff;font-size:11px;line-height:18px;text-align:center}.kid-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 8px}.kid-hello{margin:0;font-size:28px;font-weight:800}.kid-date{margin:2px 0 0;color:var(--muted);font-size:17px}.kid-points{background:#fdf1cf;color:#b7791f;font-size:24px;font-weight:800;padding:10px 16px;border-radius:18px;white-space:nowrap}.kid-title{margin:22px 0 10px;font-size:20px;font-weight:800}.kid-empty{color:var(--muted);font-size:18px}.kid-card{display:flex;flex-direction:column;gap:4px;width:100%;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:16px;margin-bottom:10px;font-size:17px}.kid-card strong{font-size:20px}.kid-todo{flex-direction:row;align-items:center;gap:14px}.kid-todo .check{width:36px;height:36px}.kid-todo-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.bubble-col{display:flex;flex-direction:column;max-width:82%;min-width:0}.is-mine .bubble-col{align-items:flex-end}.bubble-col .bubble{max-width:100%;cursor:pointer}.bubble.has-image{padding:6px}.bubble-image{display:block;width:100%;max-width:260px;max-height:320px;object-fit:cover;border-radius:12px;margin-bottom:4px}.bubble-image.is-loading{display:grid;place-items:center;width:200px;height:120px;background:#0000000f;font-size:13px}.reactions{display:flex;gap:4px;margin:-4px 6px 6px}.reaction{min-height:24px;padding:0 7px;border-radius:12px;background:var(--surface);border:1px solid var(--line);font-size:13px}.reaction.is-mine{border-color:var(--accent);background:#e2efd8}.react-bar{display:flex;align-items:center;gap:2px;margin:0 0 8px;padding:4px;border-radius:22px;background:var(--surface);border:1px solid var(--line);box-shadow:0 4px 12px #0000001f}.react-bar button{width:40px;height:40px;font-size:22px;border-radius:50%}.react-bar .react-delete{width:auto;padding:0 12px;font-size:14px;font-weight:600;color:var(--danger)}.photo-btn{width:48px;height:48px;border-radius:50%;font-size:22px;flex:none}.lightbox{position:fixed;inset:0;z-index:40;background:#000000e6;display:grid;place-items:center;padding:12px}.lightbox img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px}.offline-bar{position:sticky;top:0;z-index:6;margin:0;padding:calc(var(--safe-t) + 6px) 14px 6px;background:#5f6f57;color:#fff;font-size:13px;text-align:center}.group-title{display:flex;align-items:center;gap:8px;margin:0 0 10px}.todo-created{font-size:12px;color:var(--muted);opacity:.85}.todo-label{font-weight:700}.event-meta .is-late{color:var(--danger);font-weight:600}.sort-btns{display:flex;flex-direction:column;align-self:stretch;flex:none;border-left:1px solid var(--line)}.sort-btns button{flex:1;width:44px;font-size:13px;color:var(--accent)}.sort-btns button:disabled{opacity:.25}.topbar .add-btn{margin-left:4px}.back{display:inline-flex;align-items:center;min-height:40px;margin:4px 0 -8px -4px;padding:0 8px;color:var(--accent);font-weight:600}.panel>*+*{margin-top:10px}.btn.wide{width:100%}.ok{margin:0;font-weight:600;color:#2f7d55}.hint.center{text-align:center;margin-top:16px}.hint.below{margin-top:8px}.hint{color:var(--muted);font-size:14px;margin:0 0 12px;line-height:1.4}.empty{color:var(--muted);text-align:center;padding:28px 12px}.empty.left{text-align:left;padding:6px 2px 2px;font-size:14px}.pre{white-space:pre-wrap;overflow-wrap:anywhere}.auth{display:flex;flex-direction:column;gap:22px;padding:calc(var(--safe-t) + 48px) 24px 32px}.auth-brand{text-align:center}.auth-brand img{border-radius:20px;margin-bottom:14px}.auth-brand h1{font-size:28px;margin-bottom:6px}.auth-brand p{color:var(--muted);line-height:1.4}.segmented{display:flex;background:#d9e8cf;border-radius:14px;padding:4px}.segmented button{flex:1;min-height:40px;border-radius:11px;font-size:14px;font-weight:600;color:var(--muted)}.segmented .is-on{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px #0000001a}.chips{display:flex;gap:8px;overflow-x:auto;padding:2px 16px 12px;margin:0 -16px;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}.chips.wrap{flex-wrap:wrap;overflow:visible;padding:0;margin:0}.chip{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border-radius:18px;border:1px solid var(--line);background:var(--surface);font-size:14px;white-space:nowrap;flex:none}.chip.is-on{background:var(--ink);border-color:var(--ink);color:#fff}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;flex:none}.who{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 5px;border-radius:12px;color:#fff;font-size:12px;font-weight:700;font-style:normal;line-height:1;flex:none}.chip .who{min-width:20px;height:20px;padding:0 4px;font-size:11px;margin-left:-4px}.who.family{background:var(--ink);padding:0;width:24px}.chip .who.family{width:20px}.chip .who.family svg{width:13px;height:13px}.chip.is-on .who.family{background:#fff;color:var(--ink)}.who-stack{display:inline-flex;flex:none}.who-stack .who+.who{margin-left:-6px;box-shadow:0 0 0 2px var(--surface)}.dot.big{width:18px;height:18px;margin:0 11px}.cal{display:grid;grid-template-columns:repeat(7,1fr);background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:8px 6px}.cal-wd{text-align:center;font-size:12px;font-weight:600;color:var(--muted);padding:4px 0 6px}.cal-day{display:flex;flex-direction:column;align-items:center;gap:3px;height:48px;padding-top:4px;border-radius:12px}.cal-num{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;font-size:15px;font-variant-numeric:tabular-nums}.cal-day.is-out .cal-num{color:#a9b8a2}.cal-day.is-today .cal-num{color:var(--accent);font-weight:800}.cal-day.is-sel .cal-num{background:var(--accent);color:#fff;font-weight:700}.cal-dots{display:flex;align-items:center;gap:3px;height:8px}.cal-dots .dot{width:6px;height:6px}.cal-more{font-style:normal;font-size:10px;line-height:6px;color:var(--muted)}.day-list{margin-top:18px}.day-list h2,.cat-head h2{font-size:16px;font-weight:700}.day-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.day-head h2{margin:0}.add-btn{width:36px;height:36px;border-radius:12px;background:var(--accent);color:#fff;font-size:24px;line-height:1;display:grid;place-items:center;flex:none}.hint{margin:0;font-size:13px;color:var(--muted)}.event{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:8px}.event-bar{width:5px;align-self:stretch;min-height:36px;border-radius:3px;flex:none}.event-main,.list-main{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.event-main strong,.list-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.event-meta{font-size:13px;color:var(--muted)}.tag{font-size:12px;font-weight:600;border:1px solid;border-radius:8px;padding:2px 7px;flex:none}.fab{position:fixed;right:max(16px,calc(50vw - 224px));bottom:calc(var(--tabbar-h) + var(--safe-b) + 16px);width:56px;height:56px;border-radius:20px;background:var(--accent);color:#fff;font-size:30px;line-height:1;box-shadow:0 6px 16px #497b2d59;z-index:5}.list{display:flex;flex-direction:column;gap:8px}.list-item{display:flex;align-items:center;gap:12px;width:100%;min-height:60px;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:10px 12px}.avatar{width:40px;height:40px;border-radius:50%;background:var(--accent);color:#fff;font-weight:700;display:grid;place-items:center;flex:none}.chev{color:var(--muted);font-size:22px}.cat{margin-top:22px}.cat-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px;margin-bottom:8px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:8px;line-height:1.45}.entry{background:var(--surface);border:1px solid var(--line);border-radius:14px;margin-bottom:8px;overflow:hidden}.entry-main{display:flex;flex-direction:column;gap:4px;width:100%;text-align:left;padding:12px;line-height:1.4}.entry-main span{color:#3d5132;font-size:15px}.entry-links{display:flex;flex-direction:column;border-top:1px solid var(--line)}.entry-links a{padding:11px 12px;color:var(--accent);text-decoration:none;font-size:15px;overflow-wrap:anywhere}.entry-links a+a{border-top:1px solid var(--line)}.code{display:grid;grid-template-columns:1fr auto;align-items:center;width:100%;text-align:left;background:var(--surface);border:1px dashed #a7caa0;border-radius:14px;padding:12px 14px;margin-bottom:8px}.code span{grid-column:1 / -1;font-size:13px;color:var(--muted)}.code strong{font-family:ui-monospace,Menlo,monospace;font-size:22px;letter-spacing:.12em}.code em{font-style:normal;font-size:14px;color:var(--accent);font-weight:600}.chat-list{padding-bottom:8px}.chat-day{text-align:center;font-size:12px;color:var(--muted);margin:14px 0 8px}.bubble-row{display:flex;margin-bottom:4px}.bubble-row.is-mine{justify-content:flex-end}.bubble{max-width:80%;background:var(--surface);border:1px solid var(--line);border-radius:18px 18px 18px 6px;padding:8px 12px 6px;display:flex;flex-direction:column}.is-mine .bubble{background:var(--accent);border-color:var(--accent);color:#fff;border-radius:18px 18px 6px}.bubble-name{font-size:13px;font-weight:700}.bubble-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.4}.bubble-time{align-self:flex-end;font-size:11px;opacity:.65;font-variant-numeric:tabular-nums}.chat-input{position:fixed;left:50%;transform:translate(-50%);bottom:calc(var(--tabbar-h) + var(--safe-b));width:100%;max-width:480px;display:flex;gap:8px;padding:8px 12px;background:var(--bg);border-top:1px solid var(--line);z-index:5}.chat-input input{border-radius:24px;padding-left:16px}.send{width:48px;height:48px;border-radius:50%;background:var(--accent);color:#fff;font-size:18px;flex:none}.send:disabled{opacity:.4}.tabbar{position:fixed;left:50%;transform:translate(-50%);bottom:0;width:100%;max-width:480px;height:calc(var(--tabbar-h) + var(--safe-b));padding-bottom:var(--safe-b);display:flex;background:var(--surface);border-top:1px solid var(--line);z-index:6}.tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;font-weight:600;color:var(--muted)}.tab.is-on{color:var(--accent)}.sheet-backdrop{position:fixed;inset:0;background:#24361b66;z-index:20;display:flex;align-items:flex-end;justify-content:center}.sheet{width:100%;max-width:480px;max-height:92dvh;background:var(--bg);border-radius:22px 22px 0 0;display:flex;flex-direction:column;animation:rise .22s ease-out}@keyframes rise{0%{transform:translateY(40px);opacity:0}}.sheet-head{display:flex;align-items:center;padding:10px 8px 4px 20px}.sheet-head h2{flex:1;font-size:19px}.sheet-head .icon-btn{font-size:16px}.sheet-body{overflow-y:auto;padding:8px 20px calc(20px + var(--safe-b))}.swatches{display:flex;flex-wrap:wrap;gap:10px}.swatch{width:40px;height:40px;border-radius:50%;border:3px solid var(--bg)}.swatch.is-on{box-shadow:0 0 0 3px var(--ink)}@media(prefers-reduced-motion:reduce){.sheet,.spinner{animation:none}}
