/* Copyright (c) 2026 VitaHub LLC. All Rights Reserved. */
@keyframes typing{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}:root{--c-accent:#8a5a83;--c-accent-dark:#6f4569;--c-bg:#f7f4f2;--c-surface:#ffffff;--c-text:#2d2a29;--c-muted:#7b7472;--c-border:#e6dfdb;--c-user:#efe6ee;--c-error:#b3261e;--radius:14px}*,::after,::before{box-sizing:border-box}body,html{height:100%;margin:0}body{font-family:"Hiragino Kaku Gothic ProN","Hiragino Sans","Noto Sans JP","Yu Gothic",Meiryo,sans-serif;color:var(--c-text);background:var(--c-bg);font-size:15px;line-height:1.7;-webkit-text-size-adjust:100%}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.chat{display:flex;flex-direction:column;height:100%;max-width:760px;margin:0 auto;background:var(--c-surface)}.is-standalone .chat{height:calc(100% - 32px);margin:16px auto;border:1px solid var(--c-border);border-radius:var(--radius);overflow:hidden;box-shadow:0 8px 30px rgba(60,40,50,.08)}.chat-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:var(--c-accent);color:#fff}.chat-title{margin:0;font-size:16px;font-weight:600;letter-spacing:.04em}.chat-close{border:0;background:0 0;color:#fff;font-size:26px;line-height:1;cursor:pointer;padding:0 4px}.chat-log{flex:1;overflow-y:auto;padding:18px 16px;display:flex;flex-direction:column;gap:12px;background:var(--c-bg)}.msg{max-width:88%;padding:10px 14px;border-radius:12px;word-wrap:break-word;overflow-wrap:anywhere}.msg p{margin:0 0 .6em}.msg p:last-child,.msg ul:last-child{margin-bottom:0}.msg ul{margin:0 0 .6em;padding-left:1.3em}.msg-assistant{align-self:flex-start;background:var(--c-surface);border:1px solid var(--c-border);border-top-left-radius:4px}.msg-user{align-self:flex-end;background:var(--c-user);border-top-right-radius:4px}.msg.is-error{border-color:#f0c8c5;color:var(--c-error)}.msg-sources{margin-top:10px;padding-top:8px;border-top:1px dashed var(--c-border);font-size:13px}.msg-sources-title{color:var(--c-muted);margin-bottom:2px}.msg-sources ol{list-style:none;margin:0;padding:0}.msg-sources li{margin:2px 0}.msg-sources-no{color:var(--c-muted);margin-right:4px}.msg-sources a{color:var(--c-accent-dark)}.typing{display:inline-flex;gap:4px;padding:4px 0}.typing i{width:7px;height:7px;border-radius:50%;background:var(--c-muted);opacity:.4;animation:typing 1.2s infinite ease-in-out}.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}.chat-form{border-top:1px solid var(--c-border);padding:10px 12px 8px;background:var(--c-surface)}.chat-form textarea{width:100%;resize:none;border:1px solid var(--c-border);border-radius:10px;padding:9px 12px;font:inherit;color:inherit;background:#fff;min-height:48px;max-height:140px}.chat-form textarea:focus{outline:2px solid rgba(138,90,131,.35);border-color:var(--c-accent)}.chat-form-footer{display:flex;align-items:center;justify-content:space-between;margin-top:6px}.chat-counter{font-size:12px;color:var(--c-muted)}.chat-counter.is-over{color:var(--c-error)}.chat-send{border:0;border-radius:999px;background:var(--c-accent);color:#fff;padding:8px 22px;font:inherit;font-weight:600;cursor:pointer}.chat-send:hover{background:var(--c-accent-dark)}.chat-send:disabled{opacity:.5;cursor:default}.chat-note{margin:0;padding:6px 14px 10px;font-size:11px;color:var(--c-muted);background:var(--c-surface)}@media (max-width:600px){.is-standalone .chat{height:100%;margin:0;border:0;border-radius:0}.msg{max-width:94%}}.msg-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.msg-action{display:inline-flex;align-items:center;min-height:36px;padding:6px 14px;border:1px solid var(--c-accent);border-radius:999px;color:var(--c-accent-dark);background:#fff;font-size:13px;text-decoration:none}.msg-action::before{content:"";width:10px;height:10px;margin-right:6px;border:2px solid currentColor;border-radius:50% 50% 50%0;transform:rotate(-45deg)}.msg-action:focus-visible,.msg-action:hover{background:var(--c-accent);color:#fff}
