html:has(body.chat-page){height:100%;overflow:hidden}body.chat-page{background-color:var(--bg-color);overflow:hidden}.chat-layout,body.chat-page{display:flex;flex-direction:column;height:var(--chat-vh,100dvh)}.chat-layout{margin:0 auto;max-width:860px;width:100%}.chat-topbar{background:var(--bg-white);border-bottom:1px solid var(--border-color);box-shadow:var(--shadow-sm);gap:var(--space-md);height:60px;padding:0 var(--space-lg)}.chat-topbar,.chat-topbar__logo-link{align-items:center;display:flex;flex-shrink:0}.chat-topbar__logo-link{text-decoration:none}.chat-topbar__logo{height:36px;width:auto}.chat-topbar__identity{display:flex;flex:1;flex-direction:column;line-height:1.2;min-width:0}.chat-topbar__name{color:var(--text-color);font-size:var(--font-sm);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-topbar__status{align-items:center;color:var(--text-muted);display:flex;font-size:var(--font-xs);gap:5px}.chat-status-dot{background-color:var(--success-color);border-radius:50%;flex-shrink:0;height:7px;width:7px}.chat-status-dot--offline{background-color:var(--text-subtle)}.chat-topbar__back{align-items:center;background:transparent;border:1.5px solid var(--border-color);border-radius:var(--radius-pill);color:var(--text-muted);display:flex;flex-shrink:0;font-size:var(--font-sm);font-weight:600;gap:5px;padding:6px 14px;text-decoration:none;transition:all .2s ease;white-space:nowrap}.chat-topbar__back:hover{background:rgba(255,165,0,.04);border-color:var(--main-color);color:var(--main-color)}.chat-messages{display:flex;flex:1;flex-direction:column;gap:var(--space-md);min-height:0;overflow-y:auto;padding:var(--space-lg) var(--space-lg) var(--space-md);scroll-behavior:smooth}.chat-messages::-webkit-scrollbar{width:5px}.chat-messages::-webkit-scrollbar-track{background:transparent}.chat-messages::-webkit-scrollbar-thumb{background:var(--color-light-gray);border-radius:var(--radius-pill)}.chat-welcome{align-items:center;display:flex;flex-direction:column;gap:var(--space-md);margin:auto 0;padding:var(--space-3xl) var(--space-lg);text-align:center}.chat-welcome__logo{height:64px;object-fit:contain;opacity:.9;width:64px}.chat-welcome__heading{color:var(--text-color);font-size:var(--font-xl);font-weight:700;margin:0}.chat-welcome__sub{color:var(--text-muted);font-size:var(--font-base);line-height:1.6;margin:0;max-width:380px}.chat-suggestions{display:flex;flex-wrap:wrap;gap:var(--space-xs);justify-content:center;margin-top:var(--space-xs)}.chat-suggestion{background:var(--bg-white);border:1.5px solid var(--border-light);border-radius:var(--radius-pill);color:var(--text-color);cursor:pointer;font-family:inherit;font-size:var(--font-sm);line-height:1.4;padding:8px 16px;transition:all .2s ease}.chat-suggestion:hover{background:rgba(255,165,0,.04);border-color:var(--main-color);color:var(--main-color);transform:translateY(-1px)}.chat-msg{animation:chat-msg-in .2s ease;display:flex;gap:var(--space-xs);max-width:80%}@keyframes chat-msg-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.chat-msg--user{align-self:flex-end;flex-direction:row-reverse}.chat-msg--assistant,.chat-msg--error{align-self:flex-start}.chat-msg__avatar{align-items:center;border-radius:50%;display:flex;flex-shrink:0;font-size:15px;height:32px;justify-content:center;margin-top:2px;width:32px}.chat-msg--assistant .chat-msg__avatar{background:var(--gradient-orange-light);border:1.5px solid rgba(255,165,0,.2)}.chat-msg--error .chat-msg__avatar{background:var(--error-bg);border:1.5px solid rgba(220,53,69,.2)}.chat-msg__body{display:flex;flex-direction:column;gap:3px}.chat-msg--user .chat-msg__body{align-items:flex-end}.chat-msg__bubble{border-radius:var(--radius-lg);font-size:var(--font-sm);line-height:1.6;padding:10px 14px;white-space:pre-wrap;word-break:break-word}.chat-msg--user .chat-msg__bubble{background:var(--main-color);border-bottom-right-radius:var(--radius-xs);color:var(--main-white)}.chat-msg--assistant .chat-msg__bubble{background:var(--bg-white);border:1px solid var(--border-subtle);border-bottom-left-radius:var(--radius-xs);box-shadow:var(--shadow-sm);color:var(--text-color)}.chat-msg--error .chat-msg__bubble{background:var(--error-bg);border:1px solid rgba(220,53,69,.2);border-bottom-left-radius:var(--radius-xs);color:var(--error-text)}.chat-msg__bubble a{color:inherit;text-decoration:underline;text-underline-offset:2px}.chat-msg--user .chat-msg__bubble a{color:hsla(0,0%,100%,.9)}.chat-msg__meta{color:var(--text-subtle);font-size:11px;padding:0 2px}.chat-retry-btn{align-items:center;background:transparent;border:1px solid rgba(220,53,69,.4);border-radius:var(--radius-pill);color:var(--error-text);cursor:pointer;display:inline-flex;font-family:inherit;font-size:var(--font-xs);gap:5px;margin-top:4px;padding:3px 10px;transition:all .2s ease}.chat-retry-btn:hover{background:var(--error-bg)}.chat-typing{align-items:center;align-self:flex-start;animation:chat-msg-in .2s ease;display:flex;gap:var(--space-xs);padding:6px 0}.chat-typing__avatar{align-items:center;background:var(--gradient-orange-light);border:1.5px solid rgba(255,165,0,.2);border-radius:50%;display:flex;flex-shrink:0;font-size:15px;height:32px;justify-content:center;width:32px}.chat-typing__dots{align-items:center;background:var(--bg-white);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-xs);box-shadow:var(--shadow-sm);display:flex;gap:5px;padding:10px 14px}.chat-typing__dot{animation:chat-bounce 1.4s ease-in-out infinite;background:var(--color-light-gray);border-radius:50%;height:7px;width:7px}.chat-typing__dot:first-child{animation-delay:0s}.chat-typing__dot:nth-child(2){animation-delay:.2s}.chat-typing__dot:nth-child(3){animation-delay:.4s}@keyframes chat-bounce{0%,80%,to{background:var(--color-light-gray);transform:translateY(0)}40%{background:var(--main-color);transform:translateY(-5px)}}.chat-input-area{background:var(--bg-white);border-top:1px solid var(--border-color);flex-shrink:0;padding:var(--space-md) var(--space-lg);padding-bottom:max(var(--space-md),env(safe-area-inset-bottom))}.chat-input-form{align-items:flex-end;display:flex;gap:var(--space-sm);max-width:100%}.chat-input{background:var(--bg-color);border:1.5px solid var(--border-light);border-radius:var(--radius-lg);color:var(--text-color);flex:1;font-family:inherit;font-size:max(16px,var(--font-sm));line-height:1.5;max-height:140px;overflow-y:auto;padding:10px 14px;resize:none;transition:border-color .2s ease,box-shadow .2s ease}.chat-input:focus{background:var(--bg-white);border-color:var(--main-color);box-shadow:0 0 0 3px rgba(255,165,0,.12);outline:none}.chat-input::placeholder{color:var(--text-subtle)}.chat-input:disabled{cursor:not-allowed;opacity:.6}.chat-send-btn{align-items:center;background:var(--main-color);border:none;border-radius:50%;color:var(--main-white);cursor:pointer;display:flex;flex-shrink:0;height:42px;justify-content:center;padding:0;transition:all .2s ease;width:42px}.chat-send-btn:hover:not(:disabled){background:var(--main-color-dark);box-shadow:0 4px 12px rgba(255,165,0,.35);transform:translateY(-1px)}.chat-send-btn:disabled{cursor:not-allowed;opacity:.5}.chat-send-btn svg{display:block;height:18px;width:18px}.chat-input-hint{align-items:center;display:flex;justify-content:space-between;margin-top:6px;padding:0 2px}.chat-char-count,.chat-input-hint__tip{color:var(--text-subtle);font-size:11px}.chat-char-count{transition:color .2s ease}.chat-char-count--warn{color:var(--accent-color)}.chat-char-count--limit{color:var(--error-color);font-weight:600}.chat-date-divider{align-items:center;align-self:stretch;color:var(--text-subtle);display:flex;font-size:11px;gap:var(--space-sm)}.chat-date-divider:after,.chat-date-divider:before{background:var(--border-subtle);content:"";flex:1;height:1px}@media (max-width:768px){.chat-layout{max-width:100%}.chat-topbar{gap:var(--space-sm);padding:0 var(--space-md)}.chat-topbar__back span{display:none}.chat-messages{gap:var(--space-sm);padding:var(--space-md) var(--space-md) var(--space-sm)}.chat-msg{max-width:88%}.chat-input-area{padding:var(--space-sm) var(--space-md)}.chat-welcome{padding:var(--space-2xl) var(--space-md)}.chat-welcome__heading{font-size:var(--font-lg)}.chat-suggestion{font-size:var(--font-xs);padding:7px 13px}}@media (max-width:480px){.chat-topbar__logo{height:28px}.chat-msg{max-width:92%}.chat-msg__avatar{display:none}}