:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--background:#fbf8f5;--surface:#fff;--surface-raised:#fff;--companion-bubble:#f1ece7;--user-bubble:#6b5fc7;--user-bubble-text:#fff;--accent:#6b5fc7;--accent-ink:#fff;--accent-wash:#6b5fc71f;--border:#e7e1da;--text:#1c1b1f;--text-secondary:#5f5b66;--text-muted:#8a8590;--error:#c2410c;--error-wash:#c2410c14;--radius:20px;--radius-small:12px;--shadow:0 1px 2px #1c1b1f0d, 0 8px 24px #1c1b1f0d;--font:system-ui, -apple-system, "Segoe UI", sans-serif;--font-rounded:ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;--sidebar-width:248px}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--background:#141318;--surface:#1e1d24;--surface-raised:#24232b;--companion-bubble:#27252f;--user-bubble:#7d72d8;--accent:#9c92ec;--accent-ink:#141318;--accent-wash:#9c92ec29;--border:#2e2c36;--text:#f2f0f5;--text-secondary:#b8b3c0;--text-muted:#8c8794;--error:#f59e7b;--error-wash:#f59e7b1a;--shadow:none}}*,:before,:after{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--background);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased;margin:0;font-size:16px;line-height:1.5}button,input,textarea,select{font:inherit;color:inherit}a{color:var(--accent)}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}h1,h2,h3{margin:0;line-height:1.25}h1{font-size:1.75rem;font-family:var(--font-rounded)}h2{font-size:1.15rem}p{margin:0}.visually-hidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.secondary{color:var(--text-secondary)}.muted{color:var(--text-muted)}.small{font-size:.875rem}.stack{flex-direction:column;gap:12px;display:flex}.row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.spacer{flex:1}.button{border:1px solid var(--border);background:var(--surface);min-height:44px;color:var(--accent);cursor:pointer;white-space:nowrap;border-radius:999px;justify-content:center;align-items:center;gap:8px;padding:0 18px;font-weight:600;text-decoration:none;display:inline-flex}.button:hover:not(:disabled){background:var(--accent-wash)}.button:disabled{opacity:.5;cursor:default}.button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.button.primary:hover:not(:disabled){filter:brightness(1.06);background:var(--accent)}.button.ghost{background:0 0;border-color:#0000}.button.danger{color:var(--error)}.button.small{min-height:34px;padding:0 12px;font-size:.875rem}.button.block{width:100%}.icon-button{width:40px;height:40px;color:var(--text-secondary);cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;display:inline-flex}.icon-button:hover{background:var(--accent-wash);color:var(--accent)}.field{flex-direction:column;gap:6px;display:flex}.field>span{font-size:.9rem;font-weight:600}.input{border-radius:var(--radius-small);border:1px solid var(--border);background:var(--surface);width:100%;min-height:44px;padding:10px 14px}textarea.input{resize:vertical}.input[aria-invalid=true]{border-color:var(--error)}.field-error{color:var(--error);font-size:.85rem}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px 20px}.banner{border:1px solid var(--border);background:var(--surface);border-radius:14px;align-items:flex-start;gap:10px;padding:12px 14px;display:flex}.banner.error{border-color:var(--error);background:var(--error-wash)}.banner.info{background:var(--accent-wash);border-color:#0000}.badge{background:var(--accent-wash);height:22px;color:var(--accent);border-radius:999px;align-items:center;gap:4px;padding:0 9px;font-size:.75rem;font-weight:700;display:inline-flex}.chips{flex-wrap:wrap;gap:6px;display:flex}.chip{background:var(--accent-wash);border-radius:999px;padding:4px 10px;font-size:.8rem;font-weight:500}.empty{text-align:center;color:var(--text-secondary);padding:40px 16px}.spinner{border:2.5px solid var(--accent-wash);border-top-color:var(--accent);border-radius:50%;width:22px;height:22px;animation:.8s linear infinite spin}.center{place-items:center;min-height:160px;display:grid}@keyframes spin{to{transform:rotate(360deg)}}dialog.dialog{border-radius:var(--radius);background:var(--surface-raised);max-width:min(440px,100vw - 32px);color:var(--text);border:none;padding:24px;box-shadow:0 20px 60px #00000040}dialog.dialog::backdrop{background:#0a0a0e73}.shell{grid-template-columns:var(--sidebar-width) minmax(0, 1fr);height:100%;display:grid}.sidebar{border-right:1px solid var(--border);background:var(--surface);flex-direction:column;gap:4px;padding:20px 14px;display:flex;overflow-y:auto}.brand{font-family:var(--font-rounded);align-items:center;gap:10px;padding:4px 10px 18px;font-size:1.15rem;font-weight:700;display:flex}.nav-link{min-height:44px;color:var(--text-secondary);border-radius:12px;align-items:center;gap:12px;padding:0 12px;font-weight:500;text-decoration:none;display:flex}.nav-link:hover{background:var(--accent-wash);color:var(--text)}.nav-link.active{background:var(--accent-wash);color:var(--accent);font-weight:600}.nav-count{background:var(--accent);min-width:22px;height:22px;color:var(--accent-ink);border-radius:999px;place-items:center;margin-left:auto;padding:0 6px;font-size:.75rem;font-weight:700;display:grid}.main{min-width:0;height:100%;overflow-y:auto}.page{flex-direction:column;gap:20px;max-width:760px;margin:0 auto;padding:28px 24px 96px;display:flex}.page-header{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:12px;display:flex}.page-header p{color:var(--text-secondary);margin-top:4px}.section-title{letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted);margin:8px 0 -4px;font-size:.8rem;font-weight:700}.list{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);flex-direction:column;display:flex;overflow:hidden}.list-item{border-bottom:1px solid var(--border);color:inherit;text-align:left;cursor:pointer;background:0 0;border-top:none;border-left:none;border-right:none;align-items:center;gap:14px;width:100%;padding:14px 18px;text-decoration:none;display:flex}.list-item:last-child{border-bottom:none}.list-item:hover{background:var(--accent-wash)}.bottom-nav{display:none}.auth{place-items:center;min-height:100%;padding:24px 16px;display:grid}.auth .card{flex-direction:column;gap:16px;width:100%;max-width:420px;padding:28px;display:flex}.divider{color:var(--text-muted);align-items:center;gap:12px;font-size:.85rem;display:flex}.divider:before,.divider:after{content:"";background:var(--border);flex:1;height:1px}@media (width<=760px){.shell{grid-template-rows:minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr)}.sidebar{display:none}.bottom-nav{border-top:1px solid var(--border);background:var(--surface);padding:4px 4px calc(4px + env(safe-area-inset-bottom));justify-content:space-around;display:flex}.bottom-nav .nav-link{flex-direction:column;justify-content:center;gap:2px;min-height:52px;padding:4px 6px;font-size:.7rem;position:relative}.bottom-nav .nav-count{min-width:18px;height:18px;font-size:.65rem;position:absolute;top:2px;right:2px}.page{padding:20px 16px 40px}}@media (prefers-reduced-motion:reduce){.spinner{animation-duration:2.4s}}.chat-layout{grid-template-columns:280px minmax(0,1fr);height:100%;display:grid}.chat-sidebar{border-right:1px solid var(--border);padding:16px 12px;overflow-y:auto}.chat-main{min-width:0;height:100%;overflow:hidden}.conversation-list{flex-direction:column;gap:12px;display:flex}.conversation-list ul{flex-direction:column;gap:2px;margin:0;padding:0;list-style:none;display:flex}.conversation-row{text-align:left;cursor:pointer;background:0 0;border:none;border-radius:12px;flex-direction:column;align-items:flex-start;width:100%;padding:10px 12px;display:flex}.conversation-row:hover{background:var(--accent-wash)}.conversation-row.active{background:var(--accent-wash);color:var(--accent)}.conversation-title{text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-weight:600;overflow:hidden}.chat-view{flex-direction:column;height:100%;display:flex}.chat-header{border-bottom:1px solid var(--border);background:var(--surface);align-items:center;gap:10px;padding:12px 20px;display:flex}.chat-title{font-size:1.1rem}.chat-list-toggle{display:none}.transcript{flex-direction:column;flex:1;gap:12px;padding:16px 20px;display:flex;overflow-y:auto}.transcript>.earlier{align-self:center}.chat-empty{text-align:center;flex-direction:column;align-items:center;gap:10px;max-width:420px;margin:48px auto;display:flex}.experience-intro{flex-direction:column;align-self:stretch;gap:8px;display:flex}.messages{flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.message{align-items:flex-end;gap:8px;max-width:100%;display:flex}.message.mine{justify-content:flex-end;padding-left:15%}.message.theirs{padding-right:15%}.message-body{flex-direction:column;gap:4px;min-width:0;display:flex}.message.mine .message-body{align-items:flex-end}.bubble{background:var(--companion-bubble);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:18px;padding:10px 15px}.bubble.sending{opacity:.7}.message-meta{color:var(--text-muted);font-size:.75rem}.message-retry{color:var(--error);cursor:pointer;text-align:right;background:0 0;border:none;min-height:32px;font-size:.8rem}.bubble.typing{gap:5px;padding:14px 16px;display:flex}.bubble.typing span{background:var(--text-muted);border-radius:50%;width:7px;height:7px;animation:1.2s ease-in-out infinite typing}.bubble.typing span:nth-child(2){animation-delay:.2s}.bubble.typing span:nth-child(3){animation-delay:.4s}@keyframes typing{0%,80%,to{opacity:.3}40%{opacity:.9}}.notice{text-align:center}.experience-panel{border-top:1px solid var(--border);background:var(--surface);flex-direction:column;gap:8px;padding:10px 20px;display:flex}.composer{border-top:1px solid var(--border);background:var(--surface);flex-wrap:wrap;align-items:flex-end;gap:10px;padding:10px 20px 14px;display:flex}.composer textarea{resize:none;field-sizing:content;border-radius:22px;flex:1;min-height:44px;max-height:180px}.composer-error{flex-basis:100%}@media (width<=760px){.chat-layout{grid-template-columns:minmax(0,1fr)}.chat-sidebar{border-right:none;display:none}.chat-layout.show-list .chat-sidebar{display:block}.chat-layout.show-list .chat-main{display:none}.chat-list-toggle{display:inline-flex}.chat-header,.transcript,.composer,.experience-panel{padding-left:12px;padding-right:12px}.message.mine{padding-left:8%}.message.theirs{padding-right:8%}}@media (prefers-reduced-motion:reduce){.bubble.typing span{opacity:.6;animation:none}}.community-card{flex-direction:column;gap:12px;display:flex}.community-card .eyebrow{color:var(--accent);align-items:center;gap:8px;font-size:.85rem;font-weight:600;display:flex}.community-card .topics{color:var(--accent);font-size:.85rem;font-weight:500}.community-card .open{all:unset;cursor:pointer;flex-direction:column;gap:8px;display:flex}.community-card .open:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:8px}.invitation-actions{grid-template-columns:1fr 1fr;gap:8px;display:grid}.invitation-actions .join{grid-column:1/-1}.group-icon{background:var(--accent-wash);width:44px;height:44px;color:var(--accent);border-radius:50%;flex:none;place-items:center;display:grid}.group-row-text{flex-direction:column;gap:2px;min-width:0;display:flex}.count-badge{background:var(--accent);min-width:22px;height:22px;color:var(--accent-ink);vertical-align:middle;border-radius:999px;place-items:center;margin-left:8px;padding:0 6px;font-size:.75rem;font-weight:700;display:inline-grid}.group-chat{grid-template-rows:auto minmax(0,1fr) auto;height:100%;display:grid}.group-chat-header{border-bottom:1px solid var(--border);background:var(--surface);align-items:center;gap:8px;padding:10px 16px;display:flex}.group-chat-header h1{font-size:1.05rem;font-family:var(--font);text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.transcript{flex-direction:column;gap:10px;padding:16px;display:flex;overflow-y:auto}.transcript-inner{flex-direction:column;gap:10px;width:100%;max-width:760px;margin:0 auto;display:flex}.system-message{text-align:center;color:var(--text-secondary);align-self:center;padding:2px 8px;font-size:.85rem}.message{flex-direction:column;gap:4px;max-width:min(78%,560px);display:flex}.message.mine{align-self:flex-end;align-items:flex-end}.message.theirs{align-self:flex-start;align-items:flex-start}.bubble{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--companion-bubble);border-radius:18px;padding:10px 15px}.message.mine .bubble{background:var(--user-bubble);color:var(--user-bubble-text)}.message.agent .bubble{background:var(--accent-wash);border:1px solid color-mix(in srgb, var(--accent) 35%, transparent)}.message.dim .bubble{opacity:.6}.sender{color:var(--text-secondary);font-size:.8rem;font-weight:600}.agent-label{align-items:center;gap:8px;font-size:.85rem;font-weight:600;display:inline-flex}.agent-avatar{background:var(--accent);width:26px;height:26px;color:var(--accent-ink);border-radius:50%;flex:none;place-items:center;display:grid}.ai-badge{background:var(--accent-wash);color:var(--accent);border-radius:999px;padding:2px 7px;font-size:.68rem;font-weight:700}.meta{color:var(--text-muted);align-items:center;gap:8px;font-size:.75rem;display:flex}.meta button{all:unset;cursor:pointer;color:var(--text-muted);text-decoration:underline}.meta button:focus-visible{outline:2px solid var(--accent)}.failed{color:var(--error);font-size:.8rem}.composer-bar{border-top:1px solid var(--border);background:var(--surface);padding:8px 16px calc(10px + env(safe-area-inset-bottom))}.composer-inner{flex-direction:column;gap:8px;max-width:760px;margin:0 auto;display:flex}.composer{align-items:flex-end;gap:10px;display:flex}.composer textarea{resize:none;border-radius:22px;flex:1;min-height:44px;max-height:180px;padding:10px 16px}.send-button{background:var(--accent);width:44px;height:44px;color:var(--accent-ink);cursor:pointer;border:none;border-radius:50%;flex:none;place-items:center;display:grid}.send-button:disabled{opacity:.4;cursor:default}.ask-agent{align-self:flex-start}.closed-notice{text-align:center;color:var(--text-secondary);padding:10px 0;font-size:.9rem}.group-intro{text-align:center;color:var(--text-secondary);flex-direction:column;align-items:center;gap:10px;padding:8px 0 12px;font-size:.9rem;display:flex}.stars{justify-content:center;gap:4px;display:flex}.star{all:unset;cursor:pointer;width:44px;height:44px;color:var(--text-muted);place-items:center;font-size:1.8rem;display:grid}.star[aria-checked=true],.star.on{color:var(--accent)}.star:focus-visible{outline:2px solid var(--accent);border-radius:8px}.choice-list{flex-direction:column;gap:4px;display:flex}.choice{cursor:pointer;border-radius:12px;align-items:center;gap:12px;min-height:44px;padding:6px 14px;display:flex}.choice:hover{background:var(--accent-wash)}.toggle-row{justify-content:space-between;align-items:center;gap:12px;display:flex}.toggle-row input[type=checkbox]{width:22px;height:22px;accent-color:var(--accent);flex:none}.companion-list{margin:0;padding:0;list-style:none}.companion-relationship{align-items:flex-start}.identity-review{border-color:var(--accent)}.identity-row{border-bottom:1px solid var(--border)}.identity-row:last-child,.identity-row>.list-item{border-bottom:none}.identity-status{color:var(--text-muted);flex:none;font-size:.75rem;font-weight:600}.identity-status.ok{color:var(--accent)}.identity-status.warn{color:var(--error)}.identity-detail{padding:0 18px 16px}.identity-evidence{color:var(--text-secondary);margin:0;padding-left:18px;font-size:.875rem}.identity-evidence .contradiction{color:var(--error)}
