:root{--indigo: #4f46e5;--indigo-dark: #4338ca;--bg: #f7f7fb;--card: #ffffff;--text: #1f2430;--muted: #6b7280;--error: #dc2626;--success: #16a34a;--border: #e5e7eb;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--text)}*{box-sizing:border-box}html,body,#root{margin:0;min-height:100dvh;background:var(--bg)}.center-screen{min-height:100dvh;display:grid;place-items:center;padding:max(1rem,env(safe-area-inset-top)) 1rem}.card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:1.75rem;width:min(420px,100%);box-shadow:0 4px 24px #0000000a}.card h1{margin:0 0 1rem;font-size:1.5rem}input{width:100%;padding:.75rem .9rem;margin:.4rem 0 .8rem;border:1px solid var(--border);border-radius:10px;font-size:1rem}input:focus{outline:2px solid var(--indigo);border-color:var(--indigo)}button:focus-visible,a:focus-visible,select:focus-visible,.family-item:focus-visible,.photo-btn:focus-visible,.photo-field:focus-visible{outline:2px solid var(--indigo);outline-offset:2px}.skip-link{position:absolute;left:-999px;width:auto}.skip-link:focus{left:1rem;top:1rem;z-index:10;background:var(--card);color:var(--indigo);padding:.5rem .75rem;border:1px solid var(--border);border-radius:8px}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}button,.button-link{display:inline-block;width:100%;text-align:center;text-decoration:none;padding:.75rem 1rem;border:none;border-radius:10px;background:var(--indigo);color:#fff;font-size:1rem;font-weight:600;cursor:pointer}button:hover,.button-link:hover{background:var(--indigo-dark)}button:disabled{opacity:.6;cursor:not-allowed}.button-link.secondary,button.secondary{background:transparent;color:var(--indigo);border:1px solid var(--border);margin-top:.5rem}button.link{width:auto;background:none;color:var(--indigo);padding:.5rem .25rem;min-height:44px;display:inline-flex;align-items:center;justify-content:center;font-weight:500}button.link:hover{background:none;text-decoration:underline}.muted{color:var(--muted)}.small{font-size:.85rem}.error{color:var(--error);margin-top:.5rem}.success{color:var(--success);font-weight:600}.steps{padding-left:1.2rem;line-height:1.7}.steps li{margin-bottom:.4rem}.badge{display:inline-block;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:var(--indigo);color:#fff;padding:.1rem .45rem;border-radius:6px;vertical-align:middle}.app-shell{min-height:100dvh;display:flex;flex-direction:column}.topbar{display:flex;align-items:center;justify-content:space-between;padding:max(.75rem,env(safe-area-inset-top)) 1rem .75rem;background:var(--card);border-bottom:1px solid var(--border)}.content{padding:1.25rem;flex:1}label{display:block;font-size:.85rem;font-weight:600;color:var(--muted);margin-top:.75rem}label input{margin-top:.25rem;font-weight:400;color:var(--text)}.content .card{margin-top:1rem}.content .card h2{margin-top:0}.parent-group{border:1px solid var(--border);border-radius:10px;padding:0 .9rem .9rem;margin-top:1rem}.parent-group legend{display:flex;align-items:baseline;gap:.6rem;padding:0 .4rem;font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.parent-group legend button.link{padding:0;font-size:.8rem;text-transform:none;letter-spacing:normal}button.link.add-parent{margin-top:.5rem}.topbar-user{flex:1;text-align:right;margin-right:.75rem;font-size:.85rem;color:var(--muted)}.app-shell{height:100dvh}.content{overflow-y:auto}.tabbar{display:flex;border-top:1px solid var(--border);background:var(--card);padding-bottom:env(safe-area-inset-bottom)}.tab{flex:1;width:auto;min-height:48px;background:none;color:var(--muted);border-radius:0;padding:.75rem;font-size:.8rem;font-weight:600}.tab:hover{background:none}.tab.active{color:var(--indigo)}.family-list h2,.thread-title{margin:0 0 .75rem}.family-items{list-style:none;padding:0;margin:0}.family-item{display:flex;align-items:center;gap:.75rem;width:100%;background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:12px;padding:.75rem 1rem;margin-bottom:.5rem;font-weight:500}.family-item:hover{background:#fafafe}.family-avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--indigo);color:#fff;font-size:.8rem;font-weight:700;flex-shrink:0}.family-name{flex:1;text-align:left}.chevron{color:var(--muted);font-size:1.2rem}.back-btn{margin-bottom:.25rem}.chat{display:flex;flex-direction:column;height:100%}.chat-messages{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:.4rem;padding-bottom:.5rem}.center{text-align:center;margin-top:2rem}.bubble-row{display:flex}.bubble-row.mine{justify-content:flex-end}.bubble{max-width:78%;padding:.5rem .75rem;border-radius:16px;background:#fff;border:1px solid var(--border)}.bubble.mine{background:var(--indigo);color:#fff;border-color:var(--indigo)}.bubble.failed{opacity:.7}.bubble-sender{font-size:.75rem;font-weight:700;color:var(--indigo);margin-bottom:.15rem}.bubble-text{white-space:pre-wrap;word-break:break-word}.bubble-photo{display:block;max-width:100%;border-radius:10px;margin-bottom:.3rem;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.bubble-photo-btn{display:block;width:auto;padding:0;margin:0;border:none;background:none;cursor:pointer;border-radius:10px}.bubble-photo-btn .bubble-photo{margin-bottom:0}.lightbox-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:#000000d9;display:flex;flex-direction:column;padding:max(.5rem,env(safe-area-inset-top)) .5rem max(.5rem,env(safe-area-inset-bottom))}.lightbox{display:flex;flex-direction:column;flex:1;min-height:0}.lightbox-bar{display:flex;justify-content:flex-end;gap:.5rem;padding:.25rem}.lightbox-action{width:auto;padding:.6rem 1rem;min-height:44px;background:#ffffff1f;color:#fff;border:1px solid rgba(255,255,255,.3);border-radius:10px;font-size:.95rem}.lightbox-action:disabled{opacity:.5}.lightbox-action:focus-visible{outline:2px solid #fff;outline-offset:2px}.lightbox-stage{flex:1;min-height:0;display:grid;place-items:center;overflow:auto}.lightbox-img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px}.lightbox-stage .muted,.lightbox-stage .error{color:#ffffffe6}.lightbox-msg{text-align:center;color:#ffd5d5;padding:.5rem}.bubble-meta{font-size:.75rem;opacity:.7;margin-top:.2rem;text-align:right}.bubble.mine .bubble-meta .error{color:#ffd5d5}.bubble-stack{position:relative;display:flex;flex-direction:column;align-items:flex-start;max-width:78%}.bubble-row.mine .bubble-stack{align-items:flex-end}.bubble{max-width:100%;cursor:default}@media(hover:none)and (pointer:coarse){.bubble{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.reaction-chips{display:flex;flex-wrap:wrap;gap:.25rem;margin-top:.3rem}.reaction-chip{display:inline-flex;align-items:center;gap:.2rem;width:auto;min-height:28px;padding:.1rem .45rem;border:1px solid var(--border);border-radius:999px;background:#fff;color:var(--text, #1f2937);font-size:.85rem;line-height:1;cursor:pointer}.reaction-chip .reaction-count{font-size:.75rem;font-weight:600}.reaction-chip.reacted{background:#eef2ff;border-color:var(--indigo);color:var(--indigo);font-weight:600}.reaction-react-btn{display:none;position:absolute;top:-.6rem;width:auto;min-width:30px;min-height:30px;padding:.1rem .35rem;border:1px solid var(--border);border-radius:999px;background:#fff;font-size:.85rem;line-height:1;cursor:pointer;box-shadow:0 1px 4px #0000001f;opacity:0;pointer-events:none;transition:opacity .12s ease}@media(hover:hover)and (pointer:fine){.reaction-react-btn{display:inline-flex;align-items:center;justify-content:center}}.bubble-row.theirs .reaction-react-btn{right:-.4rem}.bubble-row.mine .reaction-react-btn{left:-.4rem}.bubble-stack:hover .reaction-react-btn,.reaction-react-btn:focus-visible{opacity:1;pointer-events:auto}.reaction-popover{position:fixed;z-index:1000;display:flex;gap:.15rem;padding:.25rem;background:#fff;border:1px solid var(--border);border-radius:999px;box-shadow:0 4px 16px #0000002e}.reaction-emoji-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:none;border-radius:8px;background:none;font-size:1.4rem;line-height:1;cursor:pointer}.reaction-emoji-btn:hover,.reaction-emoji-btn:focus-visible{background:#eef2ff}.chat-composer{border-top:1px solid var(--border);padding-top:.5rem}.composer-photo{display:flex;justify-content:space-between;align-items:center;font-size:.8rem;color:var(--muted);padding:.25rem .5rem}.composer-row{display:flex;align-items:flex-end;gap:.4rem}.photo-btn{font-size:1.3rem;cursor:pointer;margin:0;min-width:44px;min-height:44px;display:grid;place-items:center;border-radius:10px}.composer-input{flex:1;margin:0;padding:.6rem .9rem;border:1px solid var(--border);border-radius:18px;font-size:1rem;font-family:inherit;resize:none;overflow-y:auto;max-height:8.5rem;line-height:1.35}.composer-input:focus{outline:2px solid var(--indigo);border-color:var(--indigo)}.send-btn{width:auto;padding:.6rem 1rem;min-height:44px}.img-loading,.img-fallback{width:100%;min-height:120px;border-radius:10px;background:#eef0f6;display:grid;place-items:center;color:var(--muted)}select{width:100%;padding:.7rem .9rem;margin-top:.25rem;border:1px solid var(--border);border-radius:10px;font-size:1rem;background:#fff}.day-title{margin:.5rem 0 .75rem}.child-picker,.type-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:.5rem}.child-chip,.type-tab{width:auto;background:#fff;color:var(--text);border:1px solid var(--border);border-radius:999px;padding:.6rem 1rem;min-height:44px;font-size:.85rem;font-weight:600}.child-chip.active,.type-tab.active{background:var(--indigo);color:#fff;border-color:var(--indigo)}.log-form .photo-field{display:block;border:1px dashed var(--border);border-radius:10px;padding:.7rem;text-align:center;color:var(--muted);cursor:pointer;font-weight:500;margin-top:.75rem}.timeline{list-style:none;padding:0;margin:.5rem 0 0}.timeline-item{display:flex;gap:.75rem;padding:.6rem 0;border-bottom:1px solid var(--border)}.timeline-icon{font-size:1.4rem;width:2rem;text-align:center;flex-shrink:0}.timeline-body{flex:1}.timeline-head{display:flex;justify-content:space-between;align-items:baseline}.timeline-detail{color:var(--text)}.timeline-note{color:var(--muted);font-style:italic;margin-top:.15rem}.timeline-photo{display:block;max-width:220px;border-radius:10px;margin-top:.4rem}.notif-banner{display:flex;align-items:center;justify-content:space-between;gap:.5rem;background:#eef0ff;border:1px solid #d6daff;border-radius:12px;padding:.6rem .85rem;margin-bottom:.85rem}.notif-text p{margin:.15rem 0 0}.notif-actions{display:flex;align-items:center;gap:.3rem;flex-shrink:0}.notif-enable{width:auto;padding:.45rem .85rem;min-height:44px;font-size:.85rem}
