*{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;min-height:100%;font-family:var(--font-body);background:radial-gradient(circle at 15% 20%,var(--color-page-glow-strong),transparent 30%),radial-gradient(circle at 80% 0%,var(--color-page-glow-soft),transparent 28%),var(--color-bg);color:var(--color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{min-height:100vh}button,input,textarea{font:inherit}textarea{resize:vertical}button{border:none;background:none}#app{height:100%;min-height:100vh}.lucide{flex:none}.is-spinning{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.panel{border:1px solid var(--color-border);border-radius:var(--radius-xl);background:var(--color-surface-strong);box-shadow:0 20px 60px var(--color-shadow),inset 0 1px 0 var(--color-surface-highlight)}.panel--soft{background:var(--color-card-muted)}.panel--hero{background:linear-gradient(135deg,var(--color-accent-wash),transparent 54%),var(--color-surface-strong)}.section-badge{display:inline-flex;align-items:center;gap:.45rem;padding:.45rem .8rem;border-radius:999px;border:1px solid var(--color-border);background:var(--color-card-muted);color:var(--color-text-secondary);font-size:.76rem;letter-spacing:.04em;text-transform:uppercase}.section-badge--muted{background:var(--color-card-muted)}.user-avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:linear-gradient(135deg,var(--color-avatar-start),var(--color-avatar-end));color:#fff;font-family:var(--font-display);letter-spacing:.06em;box-shadow:0 12px 30px var(--color-shadow)}.user-avatar--sm{width:2.25rem;height:2.25rem;font-size:.72rem}.user-avatar--md{width:2.9rem;height:2.9rem;font-size:.82rem}.user-avatar--lg{width:4rem;height:4rem;font-size:1rem}.auth-screen{min-height:100vh;padding:1.5rem;display:flex;align-items:center;justify-content:center}.auth-screen--shell{padding:1.5rem}.auth-topbar{position:fixed;top:1.1rem;right:1.1rem}.auth-card{width:min(100%,30rem);padding:2.2rem;border:1px solid var(--color-border);border-radius:2rem;background:var(--color-surface-strong);backdrop-filter:blur(22px);box-shadow:0 34px 90px var(--color-shadow)}.auth-card--compact{width:min(100%,24rem);text-align:center}.auth-logo{width:3.4rem;height:3.4rem;display:inline-flex;align-items:center;justify-content:center;margin-bottom:1rem;border-radius:1.1rem;background:linear-gradient(135deg,var(--color-accent),var(--color-accent-strong));color:#fff;font-size:1.55rem;box-shadow:0 14px 36px var(--color-shadow)}.auth-title{font-family:var(--font-display);font-size:clamp(1.5rem,3vw,1.95rem);line-height:1.1;margin-bottom:.55rem}.auth-subtitle{color:var(--color-text-secondary);margin-bottom:1.5rem;line-height:1.6}.auth-tabs,.auth-tab{display:none}.auth-form{display:flex;flex-direction:column;gap:1rem}.auth-steps{position:relative;overflow:hidden}.auth-step{display:flex;flex-direction:column;gap:1rem;animation:auth-step-in .32s cubic-bezier(.22,1,.36,1) both}@keyframes auth-step-in{0%{opacity:0;transform:translate(12px)}to{opacity:1;transform:translate(0)}}.auth-step-indicator{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-bottom:.25rem}.auth-step-dot{width:.5rem;height:.5rem;border-radius:999px;background:var(--color-border);transition:background .2s ease,transform .2s ease}.auth-step-dot--active{background:var(--color-accent);transform:scale(1.3)}.auth-step-dot--done{background:var(--color-accent-strong)}.auth-back{display:inline-flex;align-items:center;gap:.35rem;align-self:flex-start;cursor:pointer;color:var(--color-text-secondary);font-size:.82rem;transition:color .16s ease}.auth-back:hover{color:var(--color-text)}.auth-field{display:flex;flex-direction:column;gap:.45rem}.auth-field__label,.auth-field__hint,.chat-sidebar__subtitle,.chat-sidebar__status,.chat-view__meta,.chat-view__panel-meta,.chat-view__invite-label,.chat-view__member-handle,.chat-view__footer-note,.app-panel__subtitle,.app-security-note{font-size:.8rem;line-height:1.55;color:var(--color-text-secondary)}.auth-input,.chat-sidebar__textarea,.chat-sidebar__search-input{width:100%;border:1px solid var(--color-border);border-radius:1rem;padding:.95rem 1rem;background:var(--color-card);color:var(--color-text);outline:none;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}.auth-input:focus,.chat-sidebar__textarea:focus,.chat-sidebar__search-input:focus{border-color:var(--color-accent);box-shadow:0 0 0 4px var(--color-accent-soft)}.auth-error,.chat-sidebar__status--error,.chat-view__error,.app-status--error{color:var(--color-danger)}.app-status--success{color:var(--color-success)}.app-status{font-size:.85rem}.primary-button,.ghost-button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:2.9rem;border-radius:999px;cursor:pointer;transition:transform .16s ease,opacity .16s ease,background-color .16s ease,border-color .16s ease,box-shadow .16s ease}.primary-button:disabled,.ghost-button:disabled{cursor:wait;opacity:.72}.primary-button:hover:not(:disabled),.ghost-button:hover:not(:disabled){transform:translateY(-1px)}.primary-button{width:100%;padding:.95rem 1.25rem;background:linear-gradient(135deg,var(--color-accent),var(--color-accent-strong));color:#fff;box-shadow:0 12px 28px var(--color-shadow)}.ghost-button{border:1px solid var(--color-border);padding:.78rem 1rem;color:var(--color-text);background:var(--color-card)}.ghost-button--full{width:100%}.locale-switcher{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap;justify-content:flex-end}.locale-switcher__label{font-size:.72rem;color:var(--color-text-secondary);margin-right:.15rem}.locale-switcher__button{border:1px solid var(--color-border);border-radius:999px;padding:.32rem .6rem;background:var(--color-card);color:var(--color-text-secondary);cursor:pointer}.locale-switcher__button--active{border-color:var(--color-accent);color:var(--color-accent);background:var(--color-accent-soft)}.theme-switcher{display:grid;grid-template-columns:repeat(auto-fit,minmax(7rem,1fr));gap:.55rem;width:100%}.theme-switcher__button{min-height:2.8rem;padding:.7rem .85rem;border:1px solid var(--color-border);border-radius:.95rem;background:var(--color-card);color:var(--color-text-secondary);cursor:pointer;transition:border-color .16s ease,background .16s ease,color .16s ease,transform .16s ease}.theme-switcher__button:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--color-accent) 42%,var(--color-border))}.theme-switcher__button:focus-visible{outline:none;border-color:var(--color-focus);box-shadow:0 0 0 4px var(--color-accent-soft)}.theme-switcher__button--active{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent-soft) 86%,var(--color-card));color:var(--color-text)}.chat-shell{display:grid;grid-template-columns:minmax(19.5rem,23.5rem) minmax(0,1fr);gap:1rem;height:100dvh;min-height:100dvh;padding:1rem;align-items:stretch;overflow:hidden}.chat-sidebar,.chat-main{height:calc(100dvh - 2rem);min-height:calc(100dvh - 2rem);border:1px solid var(--color-border);border-radius:2.1rem;background:var(--color-surface);backdrop-filter:blur(24px);box-shadow:0 30px 80px var(--color-shadow),inset 0 1px 0 var(--color-surface-highlight)}.chat-main{min-width:0;display:flex;flex-direction:column;overflow:hidden}.chat-empty-state,.chat-view__state{flex:1;display:flex;align-items:center;justify-content:center;padding:2rem;color:var(--color-text-secondary)}.chat-view__state--stacked,.app-overview__loading{text-align:center;display:flex;flex-direction:column;gap:1rem;align-items:center}.chat-sidebar{display:flex;flex-direction:column;gap:.9rem;padding:1rem;overflow:hidden;position:sticky;top:1rem;height:calc(100dvh - 2rem)}.chat-view__header,.chat-view__footer,.app-overview{padding:.2rem}.chat-sidebar__brand{display:flex;align-items:flex-start;gap:.95rem}.chat-sidebar__brand-mark{width:3rem;height:3rem;display:inline-flex;align-items:center;justify-content:center;border-radius:1rem;background:linear-gradient(135deg,var(--color-accent),var(--color-accent-strong));color:#fff;box-shadow:0 14px 34px var(--color-shadow);flex-shrink:0}.chat-sidebar__eyebrow{font-size:.72rem;text-transform:uppercase;letter-spacing:.12em;color:var(--color-text-secondary);margin-bottom:.25rem}.chat-sidebar__title{font-family:var(--font-display);font-size:1.15rem}.chat-sidebar__hero-panel,.chat-sidebar__surface,.chat-sidebar__section,.chat-view__panel,.recent-chat-card,.session-card{border:1px solid var(--color-border);border-radius:1.4rem;background:var(--color-card)}.chat-sidebar__hero-panel,.chat-sidebar__surface,.chat-sidebar__section{padding:1rem}.chat-sidebar__hero-panel{display:flex;flex-direction:column;gap:1rem;background:linear-gradient(180deg,#d3a56924,#ffffffb8),var(--color-card)}.chat-sidebar__summary-grid,.chat-sidebar__shortcut-grid,.chat-sidebar__workspace-list{display:grid;gap:.75rem}.chat-sidebar__summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.chat-sidebar__summary-card{display:flex;flex-direction:column;gap:.2rem;padding:.85rem .95rem;border-radius:1.1rem;background:#ffffffb3;border:1px solid rgba(211,165,105,.18)}.chat-sidebar__summary-value{font-size:1.3rem;font-weight:700;color:var(--color-text)}.chat-sidebar__summary-label{font-size:.76rem;color:var(--color-text-secondary)}.chat-sidebar__nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;padding:.3rem;border:1px solid var(--color-border);border-radius:1.25rem;background:#fff8efe6}.chat-sidebar__nav-item{min-height:3.2rem;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:.3rem;border-radius:1rem;color:var(--color-text-secondary);font-size:.74rem;font-weight:600;cursor:pointer;transition:background .16s ease,color .16s ease,transform .16s ease}.chat-sidebar__nav-item:hover{color:var(--color-text);background:#d3a5691a}.chat-sidebar__nav-item--active{color:var(--color-accent-strong);background:var(--color-surface);box-shadow:0 10px 20px #7b573714}.chat-sidebar__nav-item:focus-visible,.chat-sidebar__shortcut-card:focus-visible,.chat-sidebar__chat-card:focus-visible,.chat-sidebar__user-card:focus-visible,.mobile-bottom-bar__item:focus-visible{outline:none;box-shadow:0 0 0 3px var(--color-accent-soft)}.chat-sidebar__nav-icon-wrap,.mobile-bottom-bar__icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.chat-sidebar__nav-badge,.mobile-bottom-bar__badge{position:absolute;top:-.45rem;right:-.65rem;min-width:1.15rem;height:1.15rem;padding:0 .28rem;border-radius:999px;background:var(--color-accent-strong);color:#fff;font-size:.62rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 4px 12px var(--color-shadow)}.chat-sidebar__surface{display:flex;flex-direction:column;gap:.85rem}.chat-sidebar__surface--actions{background:var(--color-card-muted)}.chat-sidebar__surface--search{background:#fff8efb8}.chat-sidebar__surface--workspace,.chat-sidebar__section--results{background:linear-gradient(180deg,#fff8efe6,#fffffff0)}.chat-sidebar__shortcut-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.chat-sidebar__shortcut-card{display:flex;gap:.75rem;align-items:flex-start;padding:.9rem .95rem;border:1px solid var(--color-border);border-radius:1.2rem;background:var(--color-surface);color:var(--color-text);text-align:left;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.chat-sidebar__shortcut-card:hover,.chat-sidebar__chat-card:hover,.chat-sidebar__user-card:hover{transform:translateY(-1px);border-color:#d3a56966;box-shadow:0 16px 30px #7b573714}.chat-sidebar__shortcut-card--primary{background:linear-gradient(135deg,#d3a5692e,#fffffff5)}.chat-sidebar__shortcut-icon{width:2.5rem;height:2.5rem;border-radius:.95rem;display:inline-flex;align-items:center;justify-content:center;background:#d3a5691f;color:var(--color-accent-strong);flex-shrink:0}.chat-sidebar__shortcut-copy{display:flex;flex-direction:column;gap:.16rem;min-width:0}.chat-sidebar__shortcut-copy strong{font-size:.88rem;color:var(--color-text)}.chat-sidebar__shortcut-copy span{font-size:.76rem;color:var(--color-text-secondary);line-height:1.45}.chat-sidebar__hint{display:inline-flex;align-items:center;gap:.45rem;color:var(--color-text-secondary);font-size:.76rem}.chat-sidebar__inline-alert{margin:0;padding:.8rem 1rem;border-radius:1rem;border:1px solid rgba(203,88,63,.18);background:#fff0e9e6;color:var(--color-danger);font-size:.8rem}.chat-sidebar__search-field{display:flex;align-items:center;gap:.6rem;min-height:3rem;padding:0 .95rem;border:1px solid var(--color-border);border-radius:1rem;background:var(--color-surface)}.chat-sidebar__search-field:focus-within{border-color:var(--color-accent);box-shadow:0 0 0 4px var(--color-accent-soft)}.chat-sidebar__search-input{border:none;background:transparent;padding-left:0;padding-right:0;box-shadow:none!important}.chat-sidebar__search-help{margin:0;font-size:.76rem;color:var(--color-text-secondary);line-height:1.5}.chat-sidebar__group-form{display:flex;flex-direction:column;gap:.85rem;padding:1rem}.chat-sidebar__section{display:flex;flex-direction:column;gap:.75rem}.chat-sidebar__section--grow{flex:1;min-height:0}.chat-sidebar__section-heading,.chat-view__panel-title{display:inline-flex;align-items:center;gap:.45rem;font-weight:600}.chat-sidebar__section-heading-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chat-sidebar__section-meta,.chat-sidebar__chat-meta--pill,.session-card__badge{padding:.28rem .55rem;border-radius:999px;background:var(--color-accent-soft);color:var(--color-accent-strong);font-size:.74rem;font-weight:600}.chat-sidebar__group-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.chat-sidebar__status-block,.chat-sidebar__list,.chat-view__member-list,.session-list,.app-recent-list{display:flex;flex-direction:column;gap:.7rem}.chat-sidebar__list,.chat-view__member-list{overflow:auto;min-height:0;padding-right:.2rem}.chat-sidebar__chat-card,.chat-sidebar__user-card,.chat-view__member-card,.recent-chat-card,.session-card{border:1px solid var(--color-border);border-radius:1.2rem;background:var(--color-surface)}.chat-sidebar__chat-card,.chat-sidebar__user-card,.recent-chat-card{cursor:pointer;text-align:left;padding:1rem}.chat-sidebar__chat-card--active{border-color:var(--color-accent);box-shadow:0 0 0 3px var(--color-accent-soft)}.chat-sidebar__chat-main,.chat-sidebar__user-main,.chat-view__member-card,.recent-chat-card__main,.session-card{display:flex;justify-content:space-between;gap:.85rem;align-items:flex-start}.chat-sidebar__chat-identity,.chat-sidebar__user-identity,.chat-view__member-profile,.recent-chat-card__identity{display:flex;gap:.8rem;align-items:flex-start;min-width:0}.chat-sidebar__chat-identity>div,.chat-sidebar__user-identity>div,.recent-chat-card__identity>div{min-width:0}.chat-sidebar__chat-name,.chat-sidebar__user-name,.chat-view__title,.chat-view__member-name,.app-hero__title,.app-profile__identity-text strong,.recent-chat-card strong,.session-card strong{font-weight:600;color:var(--color-text)}.chat-sidebar__chat-name,.chat-sidebar__user-name,.chat-view__title{display:block}.chat-sidebar__chat-name--unread{font-weight:700}.chat-sidebar__chat-preview,.chat-sidebar__user-bio,.chat-view__panel-text,.recent-chat-card p{margin-top:.28rem;color:var(--color-text-secondary);font-size:.8rem;line-height:1.55}.chat-sidebar__chat-preview{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.chat-sidebar__chat-preview--unread{color:var(--color-text)}.chat-sidebar__chat-meta-group{display:flex;flex-direction:column;align-items:flex-end;gap:.35rem;flex-shrink:0}.chat-sidebar__chat-meta,.chat-sidebar__user-action,.chat-view__member-role,.recent-chat-card__meta,.session-card span,.stat-card__label{font-size:.74rem;color:var(--color-text-secondary)}.chat-sidebar__chat-unread-badge{min-width:1.7rem;justify-content:center;padding:.22rem .48rem;background:var(--color-accent);color:var(--color-surface-strong);border-color:transparent}.chat-sidebar__user-handle{display:block;color:var(--color-accent);font-size:.75rem;margin-top:.12rem}.chat-sidebar__empty-card{margin:0;padding:1rem;border-radius:1.1rem;background:#ffffffbd;color:var(--color-text-secondary);line-height:1.55}.sidebar-footer{margin-top:auto;padding-top:.1rem;border-top:1px solid rgba(165,135,102,.16)}.app-overview,.chat-view{display:flex;flex-direction:column;min-height:0;height:100%;overflow:auto}.app-overview{gap:1rem;padding:1.1rem}.app-hero{display:grid;gap:1rem;padding:1.2rem}.app-hero__copy{display:flex;flex-direction:column;gap:1rem}.app-hero__headline{display:flex;align-items:center;gap:1rem}.app-hero__title{font-family:var(--font-display);font-size:clamp(1.45rem,2vw,2.1rem);line-height:1.1}.app-hero__subtitle{margin-top:.35rem;color:var(--color-text-secondary);max-width:40rem;line-height:1.6}.app-hero__stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem}.stat-card{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border-radius:1.4rem;background:var(--color-card);border:1px solid var(--color-border)}.stat-card__icon{width:2rem;height:2rem;display:inline-flex;align-items:center;justify-content:center;border-radius:.75rem;background:var(--color-accent-soft);color:var(--color-accent-strong)}.stat-card__value{font-weight:600;font-size:.95rem}.app-overview__grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:1rem}.app-panel{display:flex;flex-direction:column;gap:1rem;padding:1.2rem}.app-panel--security{min-width:0}.app-panel-stack{display:flex;flex-direction:column;gap:1rem;min-width:0}.app-panel__header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}.app-panel__icon-chip{width:2rem;height:2rem;display:inline-flex;align-items:center;justify-content:center;border-radius:.75rem;color:var(--color-accent-strong);background:var(--color-accent-soft);border:1px solid color-mix(in srgb,var(--color-accent) 24%,var(--color-border))}.app-panel__subtitle{margin-top:.45rem}.app-panel__empty{color:var(--color-text-secondary);line-height:1.6}.app-panel__button{width:auto;align-self:flex-start}.theme-settings{display:flex;flex-direction:column;gap:.75rem}.theme-settings__label{font-size:.78rem;font-weight:600;color:var(--color-text-secondary)}.app-profile__identity{display:flex;align-items:center;gap:1rem;padding:.95rem 1rem;border-radius:1.2rem;background:var(--color-card-muted);border:1px solid var(--color-border)}.app-profile__identity-text{display:flex;flex-direction:column;gap:.18rem}.app-profile__identity-text span{color:var(--color-text-secondary);font-size:.78rem}.session-card,.chat-view__member-card{padding:.95rem 1rem}.session-card__main{display:flex;flex-direction:column;gap:.2rem}.session-card--current{background:linear-gradient(135deg,var(--color-accent-soft),transparent 70%),var(--color-card)}.chat-view__header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;padding:1.1rem 1.1rem .9rem;border-bottom:1px solid var(--color-border);background:var(--color-surface-strong)}.chat-view__header-main{display:flex;gap:1rem;align-items:flex-start}.chat-view__title{font-size:1.25rem;line-height:1.15}.chat-view__invite-box{display:flex;flex-direction:column;gap:.5rem;min-width:13rem;align-items:flex-start;padding:.85rem;border-radius:1rem;background:var(--color-card-muted);border:1px solid var(--color-border)}.chat-view__invite-label{display:inline-flex;align-items:center;gap:.35rem}.chat-view__invite-code{padding:.45rem .65rem;border-radius:.75rem;background:var(--color-card);border:1px solid var(--color-border)}.chat-view__body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(17rem,.85fr);gap:1rem;padding:1.1rem}.chat-view__panel{padding:1rem;display:flex;flex-direction:column;gap:.85rem}.chat-view__panel-header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.chat-view__panel-meta{display:inline-flex;align-items:center;gap:.3rem}.chat-view__last-message{display:flex;flex-direction:column;gap:.3rem;padding:.85rem 1rem;border-radius:.95rem;background:var(--color-card-muted);font-size:.84rem}.chat-view__footer{border-top:1px solid var(--color-border);background:var(--color-surface-strong);display:flex;flex-direction:column;gap:.75rem;padding:1rem 1.1rem 1.1rem}.chat-view__composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.85rem;align-items:center}.chat-view__composer-button{width:auto;min-width:8.5rem}@media(max-width:1120px){.chat-shell{grid-template-columns:minmax(18rem,21rem) minmax(0,1fr)}.app-overview__grid,.chat-view__body,.app-hero__stats{grid-template-columns:1fr}}@media(max-width:940px){.chat-shell{grid-template-columns:1fr}.chat-sidebar,.chat-main{min-height:auto;position:static;height:auto}}@media(max-width:720px){.chat-shell{padding:.75rem}.chat-sidebar,.chat-main{border-radius:1.4rem}.auth-card{padding:1.5rem}.chat-view__composer,.chat-view__panel-header,.app-hero__headline,.recent-chat-card__main,.session-card{flex-direction:column}.chat-view__composer,.chat-sidebar__shortcut-grid{grid-template-columns:1fr}.chat-sidebar__nav-item{min-height:3rem}}.auth-mode-switch{text-align:center;font-size:.84rem;color:var(--color-text-secondary);margin-top:.25rem}.auth-mode-switch__link{cursor:pointer;color:var(--color-accent);font-weight:600;background:none;border:none;padding:0;font:inherit;transition:color .16s ease}.auth-mode-switch__link:hover{color:var(--color-accent-strong)}.modal-overlay{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:1rem;background:#00000080;backdrop-filter:blur(6px);animation:modal-fade-in .2s ease}.modal-card{width:min(100% - 2rem,28rem);max-height:min(92vh,48rem);overflow:auto;padding:2rem;border:1px solid var(--color-border);border-radius:var(--radius-xl);background:linear-gradient(180deg,#fffcf4fa,#faf4e9fa),var(--color-surface-strong);box-shadow:0 30px 80px var(--color-shadow);animation:modal-scale-in .2s cubic-bezier(.22,1,.36,1);display:flex;flex-direction:column;gap:1.25rem}.modal-card__header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.modal-card__title{display:inline-flex;align-items:center;gap:.5rem;font-size:1.05rem;font-weight:600}.modal-card__close{cursor:pointer;color:var(--color-text-secondary);display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:999px;transition:background .16s ease,color .16s ease}.modal-card__close:hover{background:var(--color-card-muted);color:var(--color-text)}@keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-scale-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.mobile-bottom-bar{display:none;position:fixed;bottom:0;left:0;right:0;padding:.45rem max(.75rem,env(safe-area-inset-left)) calc(.45rem + env(safe-area-inset-bottom)) max(.75rem,env(safe-area-inset-right));background:#fffcf7f5;border-top:1px solid rgba(165,135,102,.22);backdrop-filter:blur(18px);z-index:220;box-shadow:0 -12px 34px #7b573714}.mobile-bottom-bar__item{min-height:3.4rem;display:inline-flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:.28rem;border-radius:1rem;cursor:pointer;color:var(--color-text-secondary);transition:background .16s ease,color .16s ease,transform .16s ease}.mobile-bottom-bar__item:hover{color:var(--color-text);background:#d3a5691a}.mobile-bottom-bar__item--active{color:var(--color-accent-strong);background:#d3a56924}.mobile-bottom-bar__label{font-size:.72rem;font-weight:600}.chat-view{display:grid;grid-template-rows:auto minmax(0,1fr) auto;flex:1;height:100%;min-height:0;position:relative;overflow:hidden;background:var(--color-surface-strong)}.chat-view__header--slim{padding:.7rem 1rem .65rem;flex-shrink:0}.chat-view__header-left{display:flex;align-items:center;gap:.75rem}.chat-view__back-btn{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:.75rem;cursor:pointer;color:var(--color-text-secondary);transition:background .16s ease,color .16s ease;flex-shrink:0}.chat-view__back-btn:hover{background:#8f674014;color:var(--color-text)}.chat-view__header-identity{display:flex;align-items:center;gap:.65rem}.chat-view__identity-button{display:flex;align-items:center;gap:.65rem;min-width:0;text-align:left;border-radius:1rem;padding:.35rem .45rem;margin:-.35rem -.45rem;transition:background .16s ease,transform .16s ease}.chat-view__identity-button:hover{background:#d3a56924}.chat-view__identity-button:focus-visible,.chat-bubble__avatar-button:focus-visible,.chat-bubble__author-button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--color-accent-soft)}.chat-view__title--header{font-size:.95rem;font-weight:600;line-height:1.2}.chat-view__header-meta{font-size:.75rem;color:var(--color-text-secondary)}.chat-view__header-meta--typing{color:var(--color-accent);font-weight:600}.chat-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;padding:.7rem 1rem .8rem;display:flex;flex-direction:column;gap:.1rem;background:var(--color-surface-strong)}.chat-messages__loading-more{text-align:center;color:var(--color-text-secondary);font-size:.8rem;padding:.5rem}.chat-date-separator{display:flex;align-items:center;justify-content:center;padding:.75rem 0 .25rem}.chat-date-separator span{font-size:.74rem;color:var(--color-text-secondary);padding:.28rem .65rem;border-radius:.8rem;background:color-mix(in srgb,var(--color-card-muted) 72%,transparent);border:1px solid var(--color-border)}.chat-bubble-row{display:flex;align-items:flex-end;gap:.5rem;max-width:75%;margin-bottom:.1rem}.chat-bubble-row--own{flex-direction:row-reverse;align-self:flex-end;margin-left:auto}.chat-bubble__avatar{flex-shrink:0;margin-bottom:.15rem}.chat-bubble__avatar-button{flex-shrink:0;margin-bottom:.15rem;border-radius:999px;transition:transform .16s ease,box-shadow .16s ease}.chat-bubble__avatar-button:hover{transform:translateY(-1px)}.chat-bubble__avatar-spacer{width:2.25rem;flex-shrink:0}.chat-bubble-wrap{display:flex;flex-direction:column;gap:.2rem;min-width:0}.chat-bubble-row--own .chat-bubble-wrap{align-items:flex-end}.chat-bubble__author{font-size:.74rem;font-weight:600;color:var(--color-accent);padding:0 .1rem}.chat-bubble__author-button{align-self:flex-start;font-size:.74rem;font-weight:600;color:var(--color-accent);padding:0 .1rem;border-radius:.45rem;transition:background .16s ease,color .16s ease}.chat-bubble__author-button:hover{background:#8f674014;color:var(--color-accent-strong)}.chat-bubble__reply-preview{display:flex;flex-direction:column;gap:.1rem;padding:.42rem .58rem;border-radius:.65rem;background:color-mix(in srgb,var(--color-card-muted) 70%,transparent);border-left:2px solid var(--color-accent);font-size:.78rem;max-width:100%;overflow:hidden}.chat-bubble__reply-name{font-weight:600;color:var(--color-accent)}.chat-bubble__reply-text{color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-bubble{padding:.58rem .82rem;border-radius:1rem;max-width:100%;word-break:break-word;line-height:1.5;font-size:.95rem;position:relative;cursor:default}.chat-bubble--own{background:color-mix(in srgb,var(--color-accent) 88%,var(--color-surface-strong));color:#fff;border-bottom-right-radius:.24rem}.chat-bubble--other{background:var(--color-card);border:1px solid var(--color-border);color:var(--color-text);border-bottom-left-radius:.24rem}.chat-bubble--deleted{opacity:.6;font-style:italic}.chat-bubble__content{white-space:pre-wrap}.chat-bubble__meta{display:inline-flex;align-items:center;gap:.3rem;font-size:.7rem;opacity:.76;margin-left:.45rem;float:right;margin-top:.15rem;margin-bottom:-.1rem}.chat-bubble__deleted{font-style:italic;opacity:.7;font-size:.85rem}.chat-scroll-btn{position:absolute;bottom:5.2rem;right:1.5rem;width:2.45rem;height:2.45rem;border-radius:.85rem;background:var(--color-card);border:1px solid var(--color-border);box-shadow:0 2px 10px #2c201214;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--color-text-secondary);transition:transform .16s ease,color .16s ease;z-index:10}.chat-scroll-btn:hover{transform:translateY(-1px);color:var(--color-text)}.chat-scroll-btn__badge{position:absolute;top:-.35rem;right:-.35rem;min-width:1.25rem;height:1.25rem;padding:0 .32rem;border-radius:999px;background:var(--color-accent);color:var(--color-surface-strong);font-size:.68rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 2px 8px var(--color-shadow)}.chat-composer{flex-shrink:0;border-top:1px solid var(--color-border);background:var(--color-surface-strong);padding:.6rem 1rem .8rem;display:flex;flex-direction:column;gap:.42rem}.chat-composer__context-bar{display:flex;align-items:center;gap:.5rem;padding:.42rem .68rem;border-radius:.75rem;font-size:.8rem;border-left:2px solid var(--color-accent);background:color-mix(in srgb,var(--color-card-muted) 68%,transparent)}.chat-composer__context-bar--edit{border-left-color:var(--color-accent-strong)}.chat-composer__context-info{display:flex;flex-direction:column;gap:.1rem;flex:1;min-width:0}.chat-composer__context-label{font-weight:600;color:var(--color-accent)}.chat-composer__context-text{color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-composer__context-close{cursor:pointer;color:var(--color-text-secondary);display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:999px;transition:background .16s ease;flex-shrink:0}.chat-composer__context-close:hover{background:var(--color-border)}.chat-composer__row{display:flex;align-items:flex-end;gap:.5rem}.chat-composer__attach-btn{display:inline-flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;border-radius:999px;cursor:pointer;color:var(--color-text-secondary);transition:background .16s ease,color .16s ease;flex-shrink:0}.chat-composer__attach-btn:hover{background:var(--color-card-muted);color:var(--color-text)}.chat-composer__input{flex:1;min-width:0;border:1px solid var(--color-border);border-radius:1.2rem;padding:.65rem 1rem;background:var(--color-card);color:var(--color-text);outline:none;resize:none;line-height:1.5;max-height:calc(7.5em + 1.3rem);transition:border-color .16s ease,box-shadow .16s ease}.chat-composer__input:focus{border-color:var(--color-accent);box-shadow:0 0 0 4px var(--color-accent-soft)}.chat-composer__send-btn{display:inline-flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;border-radius:999px;cursor:pointer;background:linear-gradient(135deg,var(--color-accent),var(--color-accent-strong));color:#fff;flex-shrink:0;transition:transform .16s ease,opacity .16s ease;box-shadow:0 4px 14px var(--color-shadow)}.chat-composer__send-btn:disabled{opacity:.45;cursor:default}.chat-composer__send-btn:not(:disabled):hover{transform:translateY(-1px)}.chat-context-menu{position:fixed;z-index:300;min-width:11rem;overflow:auto;border:1px solid var(--color-border);border-radius:1rem;background:var(--color-surface-strong);box-shadow:0 12px 40px var(--color-shadow);padding:.4rem;display:flex;flex-direction:column;gap:.1rem}.chat-context-menu__item{display:flex;align-items:center;gap:.55rem;padding:.6rem .85rem;border-radius:.65rem;cursor:pointer;color:var(--color-text);font-size:.86rem;text-align:left;transition:background .12s ease}.chat-context-menu__item:hover{background:var(--color-card-muted)}.chat-context-menu__item--danger{color:var(--color-danger)}.profile-modal{width:min(100% - 2rem,32rem)}.group-profile-modal{width:min(100% - 2rem,36rem)}.profile-modal__state{min-height:12rem;display:flex;align-items:center;justify-content:center;color:var(--color-text-secondary)}.profile-modal__state--stacked{flex-direction:column;gap:1rem}.profile-modal__hero{display:flex;align-items:center;gap:1rem;padding:.35rem 0 .1rem}.profile-modal__avatar{flex-shrink:0}.profile-modal__hero-copy{min-width:0;display:flex;flex-direction:column;gap:.18rem}.profile-modal__hero-title{font-size:1.25rem;font-weight:700;color:var(--color-text)}.profile-modal__hero-username{color:var(--color-accent);font-size:.92rem;font-weight:600}.profile-modal__hero-status{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem;color:var(--color-text-secondary);font-size:.84rem}.profile-modal__presence{display:inline-flex;align-items:center;min-height:1.8rem;padding:.18rem .7rem;border-radius:999px;border:1px solid var(--color-border);background:color-mix(in srgb,var(--color-card) 90%,transparent)}.profile-modal__presence--online{color:var(--color-success)}.profile-modal__presence--idle,.profile-modal__presence--dnd{color:var(--color-accent-strong)}.profile-modal__presence--offline,.profile-modal__presence--unknown{color:var(--color-text-secondary)}.profile-modal__metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.profile-modal__metric-card,.profile-modal__surface,.group-profile-modal__surface{padding:.9rem 1rem;border-radius:1rem;border:1px solid var(--color-border);background:color-mix(in srgb,var(--color-card) 92%,transparent)}.profile-modal__metric-card{display:flex;align-items:flex-start;gap:.75rem}.profile-modal__metric-icon{width:1.9rem;height:1.9rem;display:inline-flex;align-items:center;justify-content:center;border-radius:.75rem;background:var(--color-accent-soft);color:var(--color-accent-strong)}.profile-modal__metric-label,.profile-modal__surface-label,.group-profile-modal__section-label,.group-profile-modal__member-count{display:block;color:var(--color-text-secondary);font-size:.76rem;font-weight:600;letter-spacing:.02em}.profile-modal__metric-value,.group-profile-modal__invite-code{display:block;margin-top:.25rem;color:var(--color-text);line-height:1.5}.profile-modal__surface-copy,.group-profile-modal__description{margin-top:.35rem;color:var(--color-text);line-height:1.6}.profile-modal__details{display:grid;gap:.75rem}.profile-modal__detail-row{display:grid;grid-template-columns:minmax(0,8rem) minmax(0,1fr);gap:.85rem;padding:.85rem 1rem;border-radius:1rem;border:1px solid var(--color-border);background:color-mix(in srgb,var(--color-card) 90%,transparent)}.profile-modal__detail-row dt{color:var(--color-text-secondary);font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em}.profile-modal__detail-row dd{margin:0;color:var(--color-text);line-height:1.5;word-break:break-word}.profile-modal__actions{display:flex;flex-wrap:wrap;gap:.75rem}.profile-modal__action{display:inline-flex;align-items:center;gap:.55rem}.group-profile-modal__hero{display:flex;align-items:center;gap:1rem;padding:.25rem 0 .1rem}.group-profile-modal__avatar{flex-shrink:0}.group-profile-modal__hero-copy{min-width:0;display:flex;flex-direction:column;gap:.38rem}.group-profile-modal__hero-title{font-size:1.2rem;font-weight:700;color:var(--color-text)}.group-profile-modal__hero-meta{display:flex;flex-wrap:wrap;gap:.5rem}.group-profile-modal__metric-chip{display:inline-flex;align-items:center;gap:.35rem;min-height:1.8rem;padding:.2rem .7rem;border-radius:999px;border:1px solid var(--color-border);background:color-mix(in srgb,var(--color-card) 90%,transparent);color:var(--color-text-secondary);font-size:.78rem}.group-profile-modal__section-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.group-profile-modal__invite-actions{display:flex;flex-wrap:wrap;gap:.55rem}.group-profile-modal__action{display:inline-flex;align-items:center;gap:.45rem}.group-profile-modal__invite-code{font-family:var(--font-body);letter-spacing:.06em}.group-profile-modal__members{display:flex;flex-direction:column;gap:.55rem;margin-top:.75rem}.group-profile-modal__member{width:100%;display:flex;align-items:center;gap:.75rem;padding:.75rem .8rem;border-radius:.95rem;background:transparent;border:1px solid transparent;color:inherit;text-align:left;cursor:pointer;transition:background .16s ease,border-color .16s ease,transform .16s ease}.group-profile-modal__member:hover{transform:translateY(-1px);background:color-mix(in srgb,var(--color-card-muted) 70%,transparent);border-color:var(--color-border)}.group-profile-modal__member-copy{min-width:0;display:flex;flex-direction:column;gap:.12rem}.group-profile-modal__member-copy strong{color:var(--color-text)}.group-profile-modal__member-copy span{color:var(--color-text-secondary);font-size:.78rem}.group-profile-modal__role{margin-left:auto;padding:.18rem .55rem;border-radius:999px;background:var(--color-accent-soft);color:var(--color-accent-strong);font-size:.72rem;font-weight:600}.group-profile-modal__role--member{background:color-mix(in srgb,var(--color-card-muted) 70%,transparent);color:var(--color-text-secondary)}@media(max-width:768px){.mobile-bottom-bar{display:flex;align-items:center;gap:.25rem}.chat-shell{grid-template-columns:1fr;height:100dvh;min-height:100dvh;padding:.75rem .75rem calc(5.4rem + env(safe-area-inset-bottom))}.chat-sidebar,.chat-main{height:calc(100dvh - 6.15rem - env(safe-area-inset-bottom));min-height:calc(100dvh - 6.15rem - env(safe-area-inset-bottom))}.chat-sidebar{top:auto;height:auto}.chat-shell--mobile-sidebar .chat-main,.chat-shell--mobile-main .chat-sidebar,.chat-shell--mobile-chat .chat-sidebar{display:none}.chat-shell--mobile-main .chat-main{height:calc(100dvh - 6.15rem - env(safe-area-inset-bottom));min-height:calc(100dvh - 6.15rem - env(safe-area-inset-bottom))}.chat-shell--mobile-chat{padding:0}.chat-shell--mobile-chat .chat-main{height:100dvh;min-height:100dvh;border:none;border-radius:0;box-shadow:none}.chat-shell--mobile-chat .chat-view,.chat-shell--mobile-chat .app-overview{height:100dvh;min-height:100dvh}.chat-shell--mobile-chat .chat-view__header--slim{padding:.85rem .9rem .75rem}.chat-shell--mobile-chat .chat-view__back-btn,.chat-shell--mobile-chat .chat-composer__attach-btn,.chat-shell--mobile-chat .chat-composer__send-btn{width:2.75rem;height:2.75rem}.chat-shell--mobile-chat .chat-messages{padding:.9rem .85rem}.chat-shell--mobile-chat .chat-composer{padding:.75rem .85rem calc(.85rem + env(safe-area-inset-bottom))}.chat-sidebar__hero-panel,.chat-sidebar__surface,.chat-sidebar__section{padding:.95rem}.chat-sidebar__summary-grid,.chat-sidebar__shortcut-grid,.chat-sidebar__workspace-list{grid-template-columns:1fr}.chat-sidebar__nav-item,.mobile-bottom-bar__item{min-height:44px}.chat-sidebar__chat-meta-group{align-items:flex-start}.profile-modal__detail-row,.profile-modal__metrics{grid-template-columns:1fr}.group-profile-modal__section-head,.group-profile-modal__member{align-items:flex-start}.group-profile-modal__invite-actions{width:100%}.group-profile-modal__member{flex-wrap:wrap}.group-profile-modal__role{margin-left:2.85rem}}.connection-banner{position:fixed;top:0;left:0;right:0;z-index:300;padding:.5rem 1rem;background:var(--color-accent);color:#fff;text-align:center;font-size:.8rem;animation:slide-down .2s ease}@keyframes slide-down{0%{transform:translateY(-100%)}to{transform:translateY(0)}}:root{color-scheme:light;--font-display: "Unbounded", sans-serif;--font-body: "Geist", "SF Pro Text", "Segoe UI", sans-serif;--space-2xs: .375rem;--space-xs: .5rem;--space-sm: .75rem;--space-md: 1rem;--space-lg: 1.25rem;--space-xl: 1.5rem;--space-2xl: 2rem;--radius-md: .875rem;--radius-lg: 1.125rem;--radius-xl: 1.375rem;--color-bg: #f2ede4;--color-surface: rgba(252, 248, 241, .92);--color-surface-strong: #fcf8f1;--color-card: #fffaf2;--color-card-muted: #f3eadc;--color-text: #191511;--color-text-secondary: #6a5a45;--color-accent: #8f6740;--color-accent-strong: #6f4f2f;--color-accent-soft: rgba(143, 103, 64, .12);--color-border: rgba(106, 90, 69, .16);--color-shadow: rgba(44, 32, 18, .08);--color-success: #3e7d62;--color-danger: #b25845;--color-focus: #ab8258;--color-page-glow-strong: rgba(143, 103, 64, .08);--color-page-glow-soft: rgba(143, 103, 64, .05);--color-surface-highlight: rgba(255, 255, 255, .18);--color-accent-wash: rgba(143, 103, 64, .08);--color-avatar-start: rgba(143, 103, 64, .92);--color-avatar-end: rgba(111, 79, 47, .94)}:root[data-theme=dark]{color-scheme:dark;--color-bg: #14100c;--color-surface: rgba(28, 22, 18, .94);--color-surface-strong: #191411;--color-card: #221b16;--color-card-muted: #2a221c;--color-text: #f2ebdf;--color-text-secondary: #b4a088;--color-accent: #c29a67;--color-accent-strong: #dfb37f;--color-accent-soft: rgba(194, 154, 103, .14);--color-border: rgba(194, 154, 103, .14);--color-shadow: rgba(0, 0, 0, .28);--color-success: #6dc49a;--color-danger: #ec8b73;--color-focus: #dfb37f;--color-page-glow-strong: rgba(194, 154, 103, .12);--color-page-glow-soft: rgba(194, 154, 103, .08);--color-surface-highlight: rgba(255, 255, 255, .05);--color-accent-wash: rgba(194, 154, 103, .12);--color-avatar-start: rgba(194, 154, 103, .9);--color-avatar-end: rgba(111, 79, 47, .92)}html,body{font-family:var(--font-body)}body{background:radial-gradient(circle at top left,var(--color-page-glow-strong),transparent 28%),radial-gradient(circle at top right,var(--color-page-glow-soft),transparent 24%),var(--color-bg);color:var(--color-text)}button,input,textarea{font-family:var(--font-body)}.auth-card,.chat-sidebar,.chat-main,.mobile-bottom-bar,.modal-card{backdrop-filter:none}.auth-card,.chat-sidebar,.chat-main{background:var(--color-surface);border-color:var(--color-border);box-shadow:0 18px 48px var(--color-shadow)}.auth-field,.chat-sidebar__group-form,.chat-sidebar__search-field,.chat-composer__input-wrap{width:100%}.auth-card{border-radius:1.75rem;box-shadow:0 22px 64px var(--color-shadow)}.auth-title{letter-spacing:-.02em}.auth-subtitle,.chat-sidebar__search-help,.chat-view__header-meta,.chat-empty-state__copy{color:var(--color-text-secondary)}.primary-button,.ghost-button,.chat-sidebar__icon-button,.chat-sidebar__nav-item,.chat-thread,.chat-sidebar__user-card,.chat-view__back-btn,.chat-view__identity-button,.chat-bubble__avatar-button,.chat-bubble__author-button,.chat-composer__send-btn,.chat-composer__context-close,.chat-scroll-btn,.chat-context-menu__item,.modal-card__close{outline:none}.primary-button:focus-visible,.ghost-button:focus-visible,.chat-sidebar__icon-button:focus-visible,.chat-sidebar__nav-item:focus-visible,.chat-thread:focus-visible,.chat-sidebar__user-card:focus-visible,.chat-view__back-btn:focus-visible,.chat-view__identity-button:focus-visible,.chat-bubble__avatar-button:focus-visible,.chat-bubble__author-button:focus-visible,.chat-bubble-wrap:focus-visible,.chat-composer__context-close:focus-visible,.chat-composer__send-btn:focus-visible,.chat-scroll-btn:focus-visible,.chat-context-menu__item:focus-visible,.mobile-bottom-bar__item:focus-visible,.modal-card__close:focus-visible{outline:2px solid var(--color-focus);outline-offset:2px;box-shadow:none}.auth-input:focus-visible,.chat-sidebar__search-input:focus-visible,.chat-sidebar__textarea:focus-visible,.chat-composer__input:focus-visible{outline:2px solid var(--color-focus);outline-offset:2px}@media(prefers-contrast:more){.auth-input:focus,.chat-sidebar__search-input:focus,.chat-sidebar__textarea:focus,.chat-composer__input:focus{outline:3px solid currentColor;outline-offset:2px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.chat-shell{grid-template-columns:minmax(18rem,23rem) minmax(0,1fr);gap:var(--space-sm);height:100dvh;padding:var(--space-sm);overflow:hidden}.chat-sidebar,.chat-main{height:calc(100dvh - 1.5rem);min-height:calc(100dvh - 1.5rem);border-radius:1.5rem}.chat-sidebar{gap:var(--space-md);padding:var(--space-lg)}.chat-main{min-width:0;overflow:hidden;background:var(--color-surface-strong)}.chat-sidebar__topbar{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm)}.chat-sidebar__brand-link{min-width:0;display:inline-flex;align-items:center;gap:.875rem;color:inherit;text-align:left}.chat-sidebar__brand-mark{width:2.5rem;height:2.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:.95rem;background:linear-gradient(160deg,var(--color-accent),var(--color-accent-strong));color:#fff;box-shadow:0 10px 24px #6f4f2f2e}.chat-sidebar__brand-copy{min-width:0;display:flex;flex-direction:column;gap:.1rem}.chat-sidebar__eyebrow{margin:0;letter-spacing:.12em}.chat-sidebar__title{font-family:var(--font-body);font-size:1rem;font-weight:700;letter-spacing:-.02em}.chat-sidebar__topbar-actions{display:flex;align-items:center;gap:var(--space-xs)}.chat-sidebar__icon-button{width:2.75rem;height:2.75rem;display:inline-flex;align-items:center;justify-content:center;border-radius:.95rem;cursor:pointer;color:var(--color-text);background:var(--color-card);border:1px solid var(--color-border);transition:background .16s ease,transform .16s ease,border-color .16s ease}.chat-sidebar__icon-button:hover{transform:translateY(-1px);border-color:#8f674047}.chat-sidebar__icon-button--primary{color:#fff;border-color:transparent;background:linear-gradient(160deg,var(--color-accent),var(--color-accent-strong))}.chat-sidebar__nav{grid-template-columns:repeat(2,minmax(0,1fr));padding:.25rem;border-radius:1rem;background:var(--color-card-muted);border-color:transparent}.chat-sidebar__nav-item{min-height:3rem;font-size:.82rem;font-weight:600;border-radius:.85rem}.chat-sidebar__nav-item--active{background:var(--color-card);color:var(--color-text);box-shadow:0 8px 18px #2c20120f}.chat-sidebar__inline-alert{border-radius:1rem;border:1px solid rgba(178,88,69,.2);background:#b2584514}.chat-sidebar__pane{display:flex;flex-direction:column;gap:var(--space-sm)}.chat-sidebar__pane--search{gap:var(--space-xs)}.chat-sidebar__pane--list{flex:1;min-height:0}.chat-sidebar__search-field{min-height:3.25rem;padding-inline:.95rem;border-radius:1rem;background:var(--color-card);border:1px solid var(--color-border)}.chat-sidebar__search-field:focus-within,.chat-composer__surface:focus-within{border-color:#8f674057;box-shadow:0 0 0 4px var(--color-accent-soft)}.chat-sidebar__search-input{border:none;background:transparent;padding:0;min-width:0;flex:1;color:var(--color-text)}.chat-sidebar__search-clear{width:1.75rem;height:1.75rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;color:var(--color-text-secondary);transition:background .16s ease,color .16s ease}.chat-sidebar__search-clear:hover{background:#8f67401a;color:var(--color-text)}.chat-sidebar__pane-meta,.chat-sidebar__group-header{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);min-width:0;font-size:.78rem;font-weight:600;color:var(--color-text-secondary)}.chat-sidebar__list{gap:.35rem;padding-right:0}.chat-sidebar__group{display:flex;flex-direction:column;gap:.55rem}.chat-thread,.chat-sidebar__user-card{width:100%;display:flex;align-items:flex-start;gap:.8rem;padding:.75rem .85rem;border:1px solid transparent;border-radius:1rem;background:transparent;transition:background .16s ease,border-color .16s ease,transform .16s ease}.chat-thread:hover,.chat-sidebar__user-card:hover{background:#8f674012;border-color:#8f674029}.chat-thread--active{background:#8f67401a;border-color:#8f674047}.chat-thread__avatar{--chat-aura-color: transparent;position:relative;flex-shrink:0;padding:2px;border-radius:999px;box-shadow:0 0 0 2px var(--chat-aura-color)}.chat-thread__presence{position:absolute;right:0;bottom:0;width:.7rem;height:.7rem;border-radius:999px;border:2px solid var(--color-surface-strong);background:var(--color-success)}.chat-thread__content,.chat-sidebar__user-main{min-width:0;flex:1}.chat-thread__row,.chat-sidebar__user-main{display:flex;align-items:center;gap:.6rem}.chat-thread__row--meta{align-items:flex-start}.chat-thread__name,.chat-sidebar__user-name{min-width:0;font-size:.95rem;font-weight:600;color:var(--color-text)}.chat-thread__name--unread{font-weight:700}.chat-thread__time{margin-inline-start:auto;white-space:nowrap;font-size:.75rem;color:var(--color-text-secondary)}.chat-thread__preview,.chat-sidebar__user-bio{min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--color-text-secondary);font-size:.84rem;line-height:1.45}.chat-thread__preview--unread{color:var(--color-text)}.chat-thread__meta{display:inline-flex;align-items:center;gap:.35rem;margin-inline-start:auto;color:var(--color-text-secondary)}.chat-thread__unread{min-width:1.45rem;height:1.45rem;padding-inline:.38rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--color-accent);color:#fff;font-size:.7rem;font-weight:700}.chat-sidebar__user-card{flex-direction:column;align-items:stretch;background:var(--color-card);border-color:var(--color-border)}.chat-sidebar__user-handle,.chat-sidebar__user-action{color:var(--color-accent);font-size:.78rem;font-weight:600}.chat-sidebar__empty-card{display:flex;flex-direction:column;gap:.35rem;padding:1rem;border-radius:1rem;background:var(--color-card);border:1px dashed var(--color-border)}.chat-sidebar__empty-card p{color:var(--color-text-secondary);line-height:1.5}.chat-sidebar__status{padding:.75rem .1rem}.sidebar-footer{margin-top:auto;padding-top:var(--space-xs);border-top:1px solid var(--color-border)}.sidebar-footer__profile{width:100%;display:flex;align-items:center;gap:.85rem;padding:.85rem .95rem;margin-bottom:.75rem;border:1px solid var(--color-border);border-radius:1.15rem;background:var(--color-card);color:var(--color-text);text-align:left;cursor:pointer;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease}.sidebar-footer__profile:hover{transform:translateY(-1px);border-color:#8f674047;box-shadow:0 16px 28px #2c201214}.sidebar-footer__profile--active{border-color:var(--color-accent);box-shadow:0 0 0 3px var(--color-accent-soft)}.sidebar-footer__profile-avatar{flex-shrink:0}.sidebar-footer__profile-avatar--icon{width:2.4rem;height:2.4rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--color-card-muted);color:var(--color-accent-strong)}.sidebar-footer__profile-copy{min-width:0;display:flex;flex-direction:column;gap:.1rem}.sidebar-footer__profile-copy strong,.sidebar-footer__profile-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-footer__profile-copy span{font-size:.78rem;color:var(--color-text-secondary)}.chat-empty-state{flex:1;display:flex;align-items:center;justify-content:center;padding:var(--space-xl)}.chat-empty-state__card{width:min(100%,26rem);display:flex;flex-direction:column;align-items:center;gap:var(--space-sm);text-align:center}.chat-empty-state__card--main{width:min(100%,34rem);padding:1.75rem;border:1px solid var(--color-border);border-radius:1.5rem;background:linear-gradient(180deg,color-mix(in srgb,var(--color-card) 96%,var(--color-surface-strong)),color-mix(in srgb,var(--color-card) 88%,var(--color-surface))),var(--color-surface);box-shadow:0 24px 44px var(--color-shadow)}.chat-empty-state__icon{width:3rem;height:3rem;display:inline-flex;align-items:center;justify-content:center;border-radius:1rem;background:var(--color-card-muted);color:var(--color-accent-strong)}.chat-empty-state__eyebrow{font-size:.72rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--color-text-secondary)}.chat-empty-state__title{font-size:1.1rem;font-weight:700;letter-spacing:-.02em}.chat-empty-state__copy{max-width:30ch;line-height:1.6}.chat-empty-state__actions{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--space-sm)}.app-overview--profile{padding-bottom:1.4rem}.app-panel__form{display:flex;flex-direction:column;gap:1rem}.app-profile__field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem}.app-panel__actions{display:flex;align-items:center;gap:.75rem}.chat-view__header{padding:.8rem 1rem .7rem;border-bottom:1px solid var(--color-border);background:var(--color-surface-strong)}.chat-view__header-left{min-width:0}.chat-view__header-identity,.chat-view__identity-button{min-width:0;gap:.8rem}.chat-view__identity-button{padding:.25rem .35rem;margin:-.25rem -.35rem;border-radius:.8rem}.chat-view__title--header{font-size:.92rem;font-weight:600;letter-spacing:-.01em}.chat-view__header-meta{margin-top:.1rem;font-size:.78rem}.chat-messages--empty{justify-content:center}.chat-messages__empty{width:min(100%,28rem);margin:auto;display:flex;flex-direction:column;align-items:center;gap:.35rem;padding:.85rem 1rem;text-align:center}.chat-messages__empty-chip{display:inline-flex;align-items:center;min-height:1.8rem;padding-inline:.65rem;border-radius:.8rem;border:1px solid color-mix(in srgb,var(--color-border) 70%,transparent);background:transparent;color:var(--color-text-secondary);font-size:.76rem;font-weight:600}.chat-messages__empty-title{font-size:.98rem;font-weight:700;letter-spacing:-.02em}.chat-messages__empty-copy{color:var(--color-text-secondary);font-size:.84rem}:root[data-theme=dark] .chat-main,:root[data-theme=dark] .chat-messages{background:var(--color-surface-strong)}.chat-date-separator,.chat-unread-separator{display:flex;justify-content:center;padding:.95rem 0 .55rem}.chat-date-separator span,.chat-unread-separator span{padding:.32rem .72rem;border-radius:.8rem;font-size:.72rem;font-weight:600;letter-spacing:.02em;border:1px solid var(--color-border);background:color-mix(in srgb,var(--color-card) 88%,transparent);color:var(--color-text-secondary)}.chat-unread-separator span{background:var(--color-accent-soft);color:var(--color-accent-strong)}.chat-bubble-row{max-width:min(44rem,76%);gap:.55rem;margin-bottom:.22rem}.chat-bubble__avatar-button,.chat-bubble__avatar-spacer{width:2.25rem}.chat-bubble-wrap{gap:.22rem;min-width:0;border-radius:1rem}.chat-bubble__author-button{font-size:.78rem;color:var(--color-accent-strong)}.chat-bubble{display:inline-flex;flex-direction:column;gap:.36rem;padding:.62rem .82rem;border-radius:.95rem;line-height:1.48;font-size:.95rem;box-shadow:none}.chat-bubble--other{background:var(--color-card);border:1px solid var(--color-border)}.chat-bubble--own{background:color-mix(in srgb,var(--color-accent) 86%,var(--color-surface-strong));border:1px solid transparent;color:#fff}.chat-bubble__reply-preview{gap:.12rem;padding:.44rem .58rem;border-radius:.65rem;background:#0000000f;border-left:2px solid currentColor}.chat-bubble--other .chat-bubble__reply-preview{background:var(--color-card-muted);border-left-color:var(--color-accent)}.chat-bubble__reply-name{font-size:.76rem;font-weight:700}.chat-bubble__reply-text{font-size:.8rem}.chat-bubble__content{white-space:pre-wrap;overflow-wrap:anywhere}.chat-bubble__meta{align-self:flex-end;display:inline-flex;align-items:center;gap:.35rem;margin:0;float:none;font-size:.72rem;opacity:.8}.chat-bubble__status{display:inline-flex;align-items:center;justify-content:center;line-height:1}.chat-bubble__status--read{color:#ffffffe6}.chat-bubble--other .chat-bubble__status--read{color:var(--color-accent-strong)}.chat-scroll-btn{right:1rem;bottom:5.6rem;width:2.5rem;height:2.5rem;background:var(--color-card)}.chat-composer{gap:.42rem;padding:.65rem 1rem .85rem;border-top:1px solid var(--color-border);background:var(--color-surface-strong)}.chat-view__error--inline{padding-inline:.15rem;font-size:.8rem}.chat-composer__context-bar{border-left-width:2px;border-radius:.8rem;background:color-mix(in srgb,var(--color-card) 90%,transparent);border:1px solid var(--color-border)}.chat-composer__context-label{color:var(--color-accent-strong);font-size:.76rem;letter-spacing:.02em}.chat-composer__surface{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:.55rem;padding:0;border-radius:0;border:none;background:transparent}.chat-composer__input-wrap{min-width:0}.chat-composer__input{width:100%;min-height:2.9rem;max-height:calc(7.5em + .9rem);padding:.7rem .9rem;border:1px solid var(--color-border);border-radius:1rem;background:var(--color-card);box-shadow:none!important;color:var(--color-text);resize:none;font-size:.95rem;line-height:1.45}.chat-composer__send-btn{width:2.8rem;min-width:2.8rem;height:2.8rem;padding:0;gap:0;border-radius:.95rem;background:var(--color-accent);box-shadow:none}.chat-composer__send-label{display:none}.chat-composer__footer{min-height:1.25rem;display:flex;align-items:center}.chat-typing-indicator{display:inline-flex;align-items:center;gap:.55rem;min-height:1.25rem;padding-inline:.15rem;font-size:.8rem;color:var(--color-text-secondary)}.chat-typing-indicator__dots{display:inline-flex;align-items:center;gap:.18rem}.chat-typing-indicator__dots span{width:.35rem;height:.35rem;border-radius:999px;background:var(--color-accent);animation:chat-typing .9s ease-in-out infinite}.chat-typing-indicator__dots span:nth-child(2){animation-delay:.12s}.chat-typing-indicator__dots span:nth-child(3){animation-delay:.24s}@keyframes chat-typing{0%,80%,to{opacity:.32;transform:translateY(0)}40%{opacity:1;transform:translateY(-1px)}}.chat-context-menu{min-width:12rem;padding:.35rem;background:var(--color-surface-strong)}.chat-context-menu__item{min-height:2.75rem;border-radius:.8rem}.modal-overlay{background:#0f0c0a73}.modal-card{background:var(--color-surface-strong);border-radius:1.5rem}.mobile-bottom-bar{padding-inline:max(.75rem,env(safe-area-inset-left));background:#fcf8f1fa;box-shadow:0 -10px 28px #2c201214}.mobile-bottom-bar__item{min-height:3.25rem}.connection-banner{background:var(--color-accent-strong)}@media(max-width:1024px){.chat-shell{grid-template-columns:minmax(17rem,21rem) minmax(0,1fr)}}@media(max-width:768px){.mobile-bottom-bar{display:flex;align-items:center;gap:.3rem}.chat-shell{grid-template-columns:1fr;height:100dvh;min-height:100dvh;padding:.75rem}.chat-sidebar,.chat-main{height:calc(100dvh - 1.5rem);min-height:calc(100dvh - 1.5rem)}.chat-shell--mobile-sidebar .chat-main,.chat-shell--mobile-chat .chat-sidebar{display:none}.chat-shell--mobile-chat{padding:0}.chat-shell--mobile-chat .chat-main{height:100dvh;min-height:100dvh;border:none;border-radius:0;box-shadow:none}.chat-shell--mobile-chat .chat-view{height:100dvh;min-height:100dvh}.chat-sidebar{padding:var(--space-md);position:static;height:auto}.chat-view__header,.chat-messages,.chat-composer{padding-inline:.95rem}.chat-bubble-row{max-width:88%}.chat-composer{padding-bottom:calc(.95rem + env(safe-area-inset-bottom))}.chat-composer__surface{grid-template-columns:minmax(0,1fr) auto;padding-inline:.55rem}.chat-composer__send-btn{width:2.9rem;min-width:2.9rem}.chat-empty-state__card--main{padding:1.35rem}.app-overview--profile{padding:1rem .95rem calc(1rem + env(safe-area-inset-bottom))}.app-profile__field-grid{grid-template-columns:1fr}}@media(max-width:480px){.chat-sidebar,.chat-main{border-radius:1.25rem}.chat-shell--mobile-chat .chat-main{border-radius:0}.chat-sidebar__title{font-size:.95rem}.chat-thread,.chat-sidebar__user-card{padding-inline:.75rem}.chat-view__header,.chat-messages,.chat-composer{padding-inline:.8rem}.chat-bubble-row{max-width:92%}}
