.jake-chat{width:min(620px,calc(100vw - 32px));max-width:620px;max-height:min(88dvh,850px);padding:0;overflow:hidden;box-sizing:border-box;color:#3e2b1f;background:#fff8ed;border:1px solid #e9ccb7;border-radius:26px;box-shadow:0 24px 100px #38231745}
.jake-chat[open]{display:flex;flex-direction:column}
.jake-chat::backdrop{background:#30201888;backdrop-filter:blur(5px)}
.jake-chat .chat-header{flex:none;padding:20px 24px;display:flex;align-items:center;gap:14px;border-bottom:1px solid #e9daca}
.jake-chat .chat-header h2{font-size:27px;margin:0 0 3px;line-height:1.15}
.jake-chat .chat-header span{font-size:13px;letter-spacing:.02em}
.jake-chat .chat-close{margin-left:auto;flex:none;min-width:44px;min-height:44px;cursor:pointer}
.jake-chat .chat-body{padding:20px 24px 12px;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.jake-chat .chat-greeting{font-size:20px;line-height:1.35;margin:0 0 12px}
.jake-chat .chat-note{font-size:13px;line-height:1.5;margin:0 0 16px;max-width:none}
.jake-chat .chat-topics{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.jake-chat .chat-topics button{font:inherit;font-size:12px;padding:9px 12px;min-height:40px;border:1px solid #dfb99e;border-radius:22px;background:#fffaf4;color:#6f391f;cursor:pointer}
.jake-chat .chat-topics button:hover{background:#f8e6d3}
.jake-chat .chat-answer{display:flex;flex-direction:column;gap:14px;padding:0;margin:0;border:0;background:transparent;min-height:0;max-height:none;opacity:1;visibility:visible;transform:none}
.jake-chat .jake-message{padding:14px 16px;border-radius:16px;min-width:0;font-size:14px;line-height:1.6;overflow-wrap:anywhere;background:#f4e7d6;max-width:100%;box-sizing:border-box}
.jake-chat .jake-message-user{background:#e5b66c;color:#3d2819;margin-left:42px;border-bottom-right-radius:4px}
.jake-chat .jake-message-jake{border-bottom-left-radius:4px}
.jake-chat .jake-message p{font:inherit;line-height:inherit;margin:0 0 10px}
.jake-chat .jake-message p:last-child{margin-bottom:0}
.jake-chat .jake-message blockquote{border-left:3px solid #b77b3d;margin:10px 0;padding:0 0 0 12px;font-size:14px}
.jake-chat .jake-source{display:block;width:fit-content;font-size:12px;line-height:1.5;color:#73401f;text-decoration:underline;text-underline-offset:3px;margin:8px 0 4px;padding:3px 0;overflow-wrap:anywhere}
.jake-chat .jake-compose{padding:12px 24px 16px;border-top:1px solid #e9daca;flex:none;background:#fff8ed}
.jake-chat .jake-compose label{display:block;font-weight:700;font-size:13px;margin-bottom:7px}
.jake-chat .jake-input-row{display:flex;gap:8px;align-items:stretch}
.jake-chat textarea{font:inherit;font-size:16px;line-height:1.4;color:#3e2b1f;border:1px solid #b98d63;border-radius:12px;background:#fffcf7;padding:10px 12px;box-sizing:border-box;min-width:0;min-height:64px;max-height:120px;resize:vertical;flex:1}
.jake-chat .jake-send{font:inherit;font-size:14px;font-weight:700;background:#78421f;color:white;border:0;border-radius:12px;padding:10px 18px;cursor:pointer;min-height:44px}
.jake-chat button:disabled{opacity:.55;cursor:wait}
.jake-chat :focus-visible{outline:3px solid #a05c29;outline-offset:3px}
.jake-chat .jake-status{min-height:20px;font-size:12px;line-height:1.5;margin:8px 0 0}
.jake-chat .jake-compose-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:4px;font-size:12px}
.jake-chat .jake-compose-footer a{color:#73401f;text-decoration:underline;text-underline-offset:3px;padding:5px 0}
.jake-chat #jake-retry{font:inherit;color:#73401f;text-decoration:underline;background:transparent;border:0;cursor:pointer;padding:6px}
.jake-chat [hidden]{display:none!important}
@media(max-width:600px){.jake-chat{width:calc(100vw - 20px);max-height:92dvh;border-radius:22px}.jake-chat .chat-header{padding:16px}.jake-chat .chat-body{padding:16px 16px 10px}.jake-chat .jake-compose{padding:10px 16px max(12px,env(safe-area-inset-bottom))}.jake-chat .chat-header h2{font-size:24px}.jake-chat .chat-avatar{width:58px;height:58px;flex:0 0 58px}.jake-chat .chat-topics button{font-size:12px;min-height:44px}.jake-chat .jake-send{padding:10px 14px}.jake-chat .jake-message-user{margin-left:22px}}
@media(prefers-reduced-motion:reduce){.jake-chat,.jake-chat *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
