:is(html:has(.chat-shell),body:has(.chat-shell)){overscroll-behavior:none;overflow:hidden}body:has(.chat-shell){height:100dvh;min-height:0}body:has(.chat-shell)>footer{display:none}.chat-shell{--chat-ivory:#f7f1ea;--chat-muted:#a89d95;--chat-line:#f7f1ea14;--chat-surface:#1f1f1f;--chat-champagne:#e8c9a0;--chat-rose:#d99a8e;--chat-ground:#0b0909;--chat-glass:#0b0909b8;--chat-ease:cubic-bezier(.22, 1, .36, 1);isolation:isolate;-webkit-tap-highlight-color:transparent;flex-direction:column;flex:1;width:100%;max-width:720px;min-height:0;margin-inline:auto;display:flex;position:relative}@media (max-width:639.98px),(pointer:coarse){:is(body:has(.chat-shell) .app-topbar,body:has(.chat-shell) .app-tabbar){display:none}body:has(.chat-shell){padding-bottom:0}.chat-shell{z-index:30;height:100dvh;height:var(--chat-vvh,100dvh);padding-inline:env(safe-area-inset-left) env(safe-area-inset-right);background:var(--chat-ground);transform:translate3d(0, var(--chat-vv-top,0px), 0);position:fixed;top:0;left:0;right:0}}@media (min-width:1024px) and (pointer:fine){.chat-shell:before,.chat-shell:after{content:"";z-index:-1;filter:blur(96px);pointer-events:none;border-radius:9999px;width:320px;position:absolute;top:12%;bottom:12%}.chat-shell:before{background:#5c1a2e8c;left:-260px}.chat-shell:after{background:#c9826b29;right:-260px}}.chat-topbar{z-index:20;padding:calc(env(safe-area-inset-top) + 4px) 8px 4px 4px;background:var(--chat-glass);box-shadow:inset 0 -1px 0 var(--chat-line);-webkit-backdrop-filter:blur(20px)saturate(140%);backdrop-filter:blur(20px)saturate(140%);flex-shrink:0;align-items:center;gap:8px;display:flex;position:relative}@media (min-width:640px) and (pointer:fine){.chat-topbar{border:1px solid var(--chat-line);border-radius:24px;margin:8px 16px 0;padding:8px 8px 8px 4px;box-shadow:inset 0 1px #f7f1ea0f}}.chat-icon-button{width:44px;height:44px;color:var(--chat-ivory);transition:background-color .3s var(--chat-ease), transform .3s var(--chat-ease);border-radius:9999px;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.chat-icon-button:hover,.chat-icon-button[aria-expanded=true]{background:#f7f1ea14}.chat-icon-button:active{transform:scale(.92)}.chat-bond{color:var(--chat-champagne)}.chat-initial{color:var(--chat-ivory);background:#272727;border-radius:9999px;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.chat-status{white-space:nowrap;align-items:center;min-width:0;display:flex}.chat-status-swap{flex-shrink:0;grid-template-columns:auto auto;align-items:center;column-gap:4px;margin-left:8px;display:inline-grid}.chat-status-dot{background:var(--chat-champagne);border-radius:9999px;width:6px;height:6px}.chat-status[data-typing=true] .chat-status-dot{animation:chat-blink 1.2s var(--chat-ease) infinite alternate}.chat-status-word{transition:opacity .3s var(--chat-ease), transform .3s var(--chat-ease);grid-area:1/2}.chat-status-word[data-on=false]{opacity:0;transform:translateY(4px)}.chat-status[data-typing=true] .chat-status-word[data-on=true]{color:var(--chat-champagne)}@keyframes chat-blink{to{opacity:.3}}.chat-menu{z-index:30;border:1px solid var(--chat-line);width:240px;animation:chat-pop .24s var(--chat-ease) both;transform-origin:100% 0;background:#181818;border-radius:24px;flex-direction:column;gap:2px;padding:8px;display:flex;position:absolute;top:52px;right:0;box-shadow:0 24px 64px #00000080}.chat-menu-item{color:var(--chat-ivory);transition:background-color .3s var(--chat-ease), transform .3s var(--chat-ease)}.chat-menu-item:hover:not(:disabled){background:#f7f1ea14}.chat-menu-item:active:not(:disabled){transform:scale(.98)}.chat-menu-item:disabled{cursor:not-allowed;opacity:.5}.chat-menu-danger{color:var(--chat-rose)}@keyframes chat-pop{0%{opacity:0;transform:translateY(-4px)scale(.96)}to{opacity:1;transform:none}}.chat-stage{flex:1;min-height:0;position:relative}.chat-scroll{overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#f7f1ea1f transparent;height:100%;padding:16px 12px;overflow-y:auto;-webkit-mask-image:linear-gradient(#0000 0,#000 16px);mask-image:linear-gradient(#0000 0,#000 16px)}@media (min-width:640px){.chat-scroll{padding:24px 16px 16px}}.chat-thread{flex-direction:column;justify-content:flex-end;gap:12px;min-height:100%;display:flex}.chat-portrait{text-align:center;flex-direction:column;align-items:center;gap:4px;padding:16px 0 24px;display:flex}.chat-portrait-ring{border-radius:9999px;margin-bottom:12px;display:inline-flex;position:relative;box-shadow:0 0 0 1px #e8c9a040,0 0 0 8px #e8c9a00a,0 24px 80px #c9826b59}.chat-day{color:var(--chat-muted);background:#f7f1ea0a;border-radius:9999px;align-self:center;padding:2px 12px}.chat-pill{border:1px solid var(--chat-line);max-width:85%;color:var(--chat-muted);text-align:center;text-wrap:pretty;background:#f7f1ea08;border-radius:9999px;align-self:center;padding:4px 12px}.chat-group{flex-direction:column;gap:2px;display:flex}.chat-line{display:flex}.chat-line-me{justify-content:flex-end}.chat-bubble{white-space:pre-wrap;overflow-wrap:anywhere;border-radius:20px;max-width:min(80%,520px);padding:8px 12px}.chat-bubble[data-from=them]{color:var(--chat-ivory);background:var(--chat-surface);border:1px solid #f7f1ea0f}.chat-bubble[data-from=me]{color:#160d0a;background-image:linear-gradient(110deg,#f8e8cf 0%,#e8c9a0 60%,#dba493 100%)}.chat-bubble[data-from=them][data-pos=single],.chat-bubble[data-from=them][data-pos=last]{border-bottom-left-radius:6px}.chat-bubble[data-from=me][data-pos=single],.chat-bubble[data-from=me][data-pos=last]{border-bottom-right-radius:6px}.chat-time{color:var(--chat-muted);align-items:center;gap:4px;margin-top:2px;padding-inline:4px;display:inline-flex}.chat-group-me .chat-time{align-self:flex-end}.chat-tick{color:var(--chat-muted);display:inline-flex}.chat-tick[data-read=true]{color:var(--chat-champagne)}.chat-in{animation:chat-rise .32s var(--chat-ease) both;transform-origin:0 100%}.chat-line-me.chat-in{transform-origin:100% 100%;animation-name:chat-send-in}@keyframes chat-rise{0%{opacity:0;transform:translateY(12px)scale(.98)}to{opacity:1;transform:none}}@keyframes chat-send-in{0%{opacity:0;transform:translate(12px,24px)scale(.92)}to{opacity:1;transform:none}}.chat-fade{animation:chat-fade .3s var(--chat-ease) .16s both}@keyframes chat-fade{0%{opacity:0}to{opacity:1}}.chat-tick-in{animation:chat-tick .3s var(--chat-ease) both}@keyframes chat-tick{0%{opacity:0;transform:scale(.6)}to{opacity:1;transform:none}}.chat-typing-line{animation:chat-typing-in .24s var(--chat-ease) both;transform-origin:0 100%}@keyframes chat-typing-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.chat-typing{align-items:center;gap:4px;min-height:40px;padding-inline:16px;display:inline-flex}.chat-typing span{background:var(--chat-muted);width:8px;height:8px;animation:chat-typing 1.2s var(--chat-ease) infinite;border-radius:9999px}.chat-typing span:nth-child(2){animation-delay:.16s}.chat-typing span:nth-child(3){animation-delay:.32s}@keyframes chat-typing{0%,60%,to{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}.chat-skeleton{height:40px;animation:chat-shimmer 1.6s var(--chat-ease) infinite alternate;background:#f7f1ea0f;border-radius:20px;display:block}.chat-skeleton-me{border-bottom-right-radius:6px;align-self:flex-end}.chat-skeleton-them{border-bottom-left-radius:6px}@keyframes chat-shimmer{to{opacity:.45}}.chat-crisis{animation:chat-rise .32s var(--chat-ease) both;background:#5c1a2e59;border:1px solid #d99a8e59;border-radius:24px;flex-direction:column;align-self:stretch;gap:12px;padding:16px;display:flex}.chat-crisis-link{min-height:44px;color:var(--chat-ivory);transition:background-color .3s var(--chat-ease), transform .3s var(--chat-ease);background:#f7f1ea14;border-radius:9999px;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 16px;display:flex}.chat-crisis-link:hover{background:#f7f1ea24}.chat-crisis-link:active{transform:scale(.98)}.chat-card{width:100%;max-width:440px;animation:chat-rise .32s var(--chat-ease) both;border-radius:24px;flex-direction:column;align-self:center;gap:12px;padding:16px;display:flex}.chat-jump{min-height:44px;color:var(--chat-ivory);animation:chat-jump-in .3s var(--chat-ease) both;transition:background-color .3s var(--chat-ease), transform .3s var(--chat-ease);border-radius:9999px;align-items:center;gap:8px;padding:8px 16px;display:inline-flex;position:absolute;bottom:12px;left:50%;transform:translate(-50%)}.chat-jump:hover{background:#281e1ce6}.chat-jump:active{transform:translate(-50%)scale(.96)}@keyframes chat-jump-in{0%{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%)}}.chat-error{color:var(--chat-ivory);animation:chat-rise .32s var(--chat-ease) both;background:#5c1a2e66;border:1px solid #d99a8e4d;border-radius:16px;margin:0 12px 8px;padding:8px 16px}.chat-composer{padding:8px 12px max(8px, env(safe-area-inset-bottom));background:var(--chat-glass);box-shadow:inset 0 1px 0 var(--chat-line);-webkit-backdrop-filter:blur(20px)saturate(140%);backdrop-filter:blur(20px)saturate(140%);flex-shrink:0}.chat-shell[data-keyboard=open] .chat-composer{padding-bottom:8px}@media (min-width:640px) and (pointer:fine){.chat-composer{box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;background:0 0;padding:8px 16px 16px}}.chat-composer-box{align-items:flex-end;gap:8px;display:flex;position:relative}.chat-input{resize:none;min-width:0;min-height:40px;max-height:144px;color:var(--chat-ivory);transition:border-color .3s var(--chat-ease);background:#f7f1ea0f;border:1px solid #f7f1ea1a;border-radius:20px;flex:1;padding:8px 16px;font-size:16px;overflow-y:hidden}.chat-input::placeholder{color:#8f847d}.chat-composer .chat-input:focus{border-color:#e8c9a0b3;outline:none}.chat-input:disabled{cursor:not-allowed;opacity:.6}.chat-counter{color:var(--chat-muted);position:absolute;top:-24px;right:56px}.chat-counter[data-low=true]{color:var(--chat-rose)}.chat-send{isolation:isolate;color:#160d0a;width:40px;height:40px;transition:transform .3s var(--chat-ease), color .3s var(--chat-ease);background:#f7f1ea14;border-radius:9999px;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}.chat-send:before{content:"";z-index:-1;border-radius:inherit;transition:opacity .3s var(--chat-ease);background-image:linear-gradient(110deg,#f8e8cf 0%,#e8c9a0 50%,#dba493 100%);position:absolute;inset:0}.chat-send:disabled{cursor:not-allowed;color:var(--chat-muted);transform:scale(.9)}.chat-send:disabled:before{opacity:0}.chat-send:hover:not(:disabled){transform:scale(1.04)}.chat-send:active:not(:disabled){transform:scale(.88)}.chat-send:focus-visible{outline:2px solid var(--chat-champagne);outline-offset:2px}.chat-send-icon{border-radius:inherit;justify-content:center;align-items:center;display:inline-flex;position:absolute;inset:0}.chat-send-icon[data-launch=true] svg{animation:chat-launch .42s var(--chat-ease) both}.chat-send-icon[data-launch=true]:after{content:"";border-radius:inherit;animation:chat-ring .42s var(--chat-ease) both;pointer-events:none;position:absolute;inset:0;box-shadow:0 0 0 2px #e8c9a099}@keyframes chat-launch{0%{opacity:1;transform:none}40%{opacity:0;transform:translate(12px,-12px)scale(.8)}41%{opacity:0;transform:translate(-8px,8px)scale(.8)}to{opacity:1;transform:none}}@keyframes chat-ring{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.5)}}.chat-readonly{margin:8px 12px max(12px, env(safe-area-inset-bottom));text-align:center;border-radius:24px;padding:12px 16px}@media (prefers-reduced-motion:reduce){.chat-in,.chat-line-me.chat-in,.chat-typing-line,.chat-card,.chat-crisis,.chat-error{animation-name:chat-fade}.chat-typing span,.chat-send-icon[data-launch=true] svg,.chat-send-icon[data-launch=true]:after{animation:none}.chat-status-word[data-on=false]{transform:none}}
