.landing-jason { position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 40; font-size: 14px; line-height: 1.5; }
.landing-jason button, .landing-jason textarea { font: inherit; }
.jason-launcher { display: flex; align-items: center; gap: 14px; padding: 10px 32px 10px 10px; border: 0; border-radius: 999px; background: var(--brand); color: white; font-size: 26px!important; font-weight: 700!important; box-shadow: 0 6px 24px #653de94d; cursor: pointer; transition: transform .2s; }
.jason-launcher:hover { transform: scale(1.04); }
.jason-launcher img { width: 56px; height: 56px; border-radius: 50%; background: #ffffff33; }
.jason-panel { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; overflow: hidden; background: white; border-radius: 16px; box-shadow: 0 16px 60px #17151f26; border: 2px solid #9879ef; animation: jason-open .2s ease-out; }
.landing-jason [hidden] { display: none; }
.jason-header { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #17151f0d; }
.jason-dot { width: 8px; height: 8px; background: var(--brand); border-radius: 50%; }
.jason-header strong { font-weight: 400; }
.jason-header small { display: block; color: var(--muted); font-size: 10px; }
.jason-close { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 26px!important; width: 32px; height: 32px; cursor: pointer; }
.jason-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 22px 12px; color: var(--text-2, #53505f); }
.jason-intro { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--text); }
.jason-intro img { border-radius: 50%; background: var(--brand); padding: 5px; }
.jason-starters { display: grid; gap: 2px; margin: 20px 0; }
.jason-starters button { display: flex; justify-content: space-between; padding: 10px; border: 0; background: transparent; border-radius: 8px; text-align: left; cursor: pointer; color: inherit; }
.jason-starters button:hover { background: #F5F3F9; }
.jason-starters span { color: var(--muted); }
.jason-composer { display: flex; align-items: flex-end; padding: 10px; border: 1px solid var(--border); border-radius: 12px; margin-top: 0; }
.jason-composer textarea { flex: 1; min-width: 0; resize: none; max-height: 120px; border: 0; background: transparent; color: var(--text); outline: none; }
.jason-composer:focus-within { border-color: var(--brand); }
.jason-composer button { border: 0; border-radius: 50%; width: 32px; height: 32px; background: var(--brand); color: white; cursor: pointer; }
.jason-preview-note { text-align: center; font-size: 10px; color: var(--muted); margin: 10px 0 0; }
.jason-messages p { margin: 12px 0; }
.jason-user-message { background: #F0EAFD; border-radius: 14px 14px 2px 14px; padding: 12px; overflow-wrap: anywhere; }
@keyframes jason-open { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media(max-width: 600px) { .landing-jason { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); } }
@media(prefers-reduced-motion: reduce) { .jason-panel { animation: none; } .jason-launcher { transition: none; } }
.jason-reply { white-space: pre-wrap; overflow-wrap: anywhere; }
.jason-status { font-size: 12px; color: var(--muted); }
.jason-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.jason-actions button { border: 1px solid var(--border); background: white; color: var(--brand); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.landing-jason button:disabled { opacity: .45; cursor: wait; }
.jason-continue { display: block; margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: var(--brand); color: white; text-align: center; }
.jason-activity-wrap { margin: 16px 0; font-size: 12px; background: #f7f5fb; padding: 10px; border-radius: 8px; }
.jason-activity-wrap summary { cursor: pointer; }
.jason-activity p { overflow-wrap: anywhere; }

.jason-panel { font-size: 16px; }
@media(max-width: 600px) { .jason-launcher { font-size: 22px!important; padding: 8px 24px 8px 8px; gap: 10px; } .jason-launcher img { width: 48px; height: 48px; } .jason-body { padding: 20px 16px 14px; } }
.jason-greeting { min-height: 48px; }
.jason-greeting-spinner { display: inline-block; width: 22px; height: 22px; border: 2px solid #e8e0fa; border-top-color: var(--brand); border-radius: 50%; animation: jason-typing .75s linear infinite; }
.jason-greeting-message { margin: 0; color: var(--text); animation: jason-greeting-in .45s ease-out both; }
@keyframes jason-typing { to { transform: rotate(360deg); } }
@keyframes jason-greeting-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media(prefers-reduced-motion: reduce) { .jason-greeting-spinner, .jason-greeting-message { animation: none; } }
/* Compact conversation controls and Factory-style tool calls. */
.jason-conversation a { color: var(--muted); text-decoration: none; }
.jason-conversation a:hover { color: var(--brand); text-decoration: underline; }
.jason-working { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; margin: 16px 0 8px; }
.jason-working-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: jason-pulse 1.4s ease-in-out infinite; }
.jason-stop, .jason-clear { padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.jason-stop:hover, .jason-clear:hover { color: var(--brand); text-decoration: underline; }
.jason-status:empty, .jason-actions:not(:has(button:not([hidden]))) { display: none; }
.jason-activity-wrap { background: none; padding: 0; margin: 16px 0; }
.jason-tool { display: flex; align-items: center; gap: 7px; margin: 2px 0; padding: 3px 0; font-size: 11px; line-height: 1.4; }
.jason-tool-icon { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 4px; background: #64748b; color: white; }
.jason-tool-icon svg { width: 12px; height: 12px; }
.jason-tool-icon-fetch { background: #0284c7; }
.jason-tool-icon-search { background: #d97706; }
.jason-tool-icon-file { background: #4f46e5; }
.jason-tool-icon-data { background: #7c3aed; }
.jason-tool-label { display: flex; align-items: baseline; gap: 6px; min-width: 0; color: var(--muted); }
.jason-tool-label small { display: inline; min-width: 0; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.jason-tool-status, .jason-tool-spinner { margin-left: auto; flex-shrink: 0; color: var(--muted); }
.jason-tool-spinner { width: 12px; height: 12px; border: 1.5px solid #e8e0fa; border-top-color: var(--brand); border-radius: 50%; animation: jason-typing .75s linear infinite; }
.jason-reply { white-space: normal; margin: 16px 0; }
.jason-reply > :first-child { margin-top: 0; }
.jason-reply > :last-child { margin-bottom: 0; }
.jason-reply a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.jason-reply ul, .jason-reply ol { padding-left: 22px; margin: 10px 0; }
.jason-reply li { margin: 4px 0; }
.jason-reply pre { padding: 12px; background: #f7f5fb; border-radius: 8px; overflow: auto; font-size: 12px; }
.jason-reply code { font-size: .85em; background: #f7f5fb; }
.jason-reply blockquote { margin: 12px 0; padding-left: 12px; border-left: 3px solid var(--border); }
.jason-reply h1, .jason-reply h2, .jason-reply h3, .jason-reply h4 { font-size: 1.05em; line-height: 1.5; letter-spacing: normal; margin: 16px 0 8px; font-weight: 600; color: var(--text); }
.jason-table { max-width: 100%; overflow-x: auto; }
.jason-table table { border-collapse: collapse; width: 100%; font-size: 12px; }
.jason-table td, .jason-table th { padding: 8px; border-bottom: 1px solid var(--border); text-align: left; }
.jason-user-message { margin: 14px 0; white-space: pre-wrap; }
@keyframes jason-pulse { 50% { opacity: .25; transform: scale(.8); } }
@media(prefers-reduced-motion: reduce) { .jason-working-pulse, .jason-tool-spinner { animation: none; } }

.jason-tool-favicon { background: transparent; }
.jason-tool-favicon svg { display: none; }
.jason-tool-favicon img { display: block; width: 16px; height: 16px; border-radius: 3px; }

.jason-stop { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 5px; }
.jason-stop:hover { background: #f0eafd; }

.jason-dock { flex-shrink: 0; padding: 12px 22px 16px; background: white; border-top: 1px solid #17151f0d; color: var(--text-2, #53505f); }
.jason-dock .jason-working { margin: 0 0 8px; }
.jason-dock .jason-continue { margin-top: 0; }
.jason-dock .jason-actions:has(button:not([hidden])) { margin-bottom: 10px; }
@media(max-width: 600px) { .jason-dock { padding: 12px 16px 14px; } }

.jason-retry { display:inline-flex; align-items:center; gap:6px; }
.jason-retry[hidden] { display:none; }
