/* Маскот в левом столбце чатов (без скролла страницы, без эмодзи молнии и без неонового свечения) */
.lh-mascot-host { position: relative; display: inline-flex; align-items: center; justify-content: center; user-select: none; overflow: visible; }
.lh-mascot-svg { width: 100%; height: 100%; overflow: visible; display: block; }
.lh-nav-mascot-slot { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0; overflow: visible; }
.lh-nav-mascot-slot .lh-mascot-thought-cloud { display: none !important; }

@keyframes lhZzzFloat { 0% { opacity: 0; transform: translate(0, 4px) scale(0.5); } 35% { opacity: 0.95; } 100% { opacity: 0; transform: translate(14px, -22px) scale(1.15); } }
.lh-mascot-zzz { position: absolute; top: -4px; right: -8px; pointer-events: none; opacity: 0; display: flex; gap: 2px; font-weight: 600; color: var(--primary); font-size: 11px; transition: opacity 260ms ease; z-index: 12; }
.lh-mascot-host.is-state-sleeping .lh-mascot-zzz { opacity: 1; }
.lh-mascot-zzz span { display: inline-block; animation: lhZzzFloat 2.4s infinite ease-out; }
.lh-mascot-zzz span:nth-child(2) { animation-delay: 0.75s; font-size: 9px; }
.lh-mascot-zzz span:nth-child(3) { animation-delay: 1.5s; font-size: 7.5px; }

.lh-mascot-thought-cloud { position: absolute; top: -22px; right: -46px; width: 58px; height: 48px; pointer-events: none; z-index: 20; overflow: visible; opacity: 0; }
.lh-mascot-lab-preview .lh-mascot-thought-cloud { top: -26px; right: -64px; width: 82px; height: 68px; }
.lh-mascot-thought-svg { width: 100%; height: 100%; overflow: visible; display: block; color: #18181b; }
.lh-mascot-thought-sym { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 17px; font-weight: 600; fill: #18181b; user-select: none; }

.lh-agent-layout { height: calc(100dvh - 94px); display: grid; grid-template-columns: 276px 1fr; background: var(--surface); border: 0.5px solid var(--divider); border-radius: var(--radius-surface); overflow: hidden; box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04); }
.lh-agent-sidebar { background: rgba(242, 243, 247, 0.65); border-right: 0.5px solid var(--divider); display: flex; flex-direction: column; min-height: 0; padding: 14px 12px 12px; gap: 10px; overflow: visible; }
.lh-agent-sidebar-persona { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 8px 12px; border-bottom: 0.5px solid rgba(60, 60, 67, 0.12); gap: 5px; text-align: center; overflow: visible; }
.lh-agent-avatar-ring { position: relative; width: 78px; height: 78px; border-radius: 50%; border: 2px solid #9ca3af; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; overflow: visible; }
.lh-agent-persona-orb { width: 58px; height: 58px; overflow: visible; }
.lh-agent-presence-dot { position: absolute; bottom: 1px; right: 1px; width: 15px; height: 15px; border-radius: 50%; border: 2.5px solid #ffffff; background: #9ca3af; z-index: 25; transition: background-color 260ms ease; }
.lh-agent-presence-dot.is-offline { background: #9ca3af; box-shadow: none !important; }
.lh-agent-presence-dot.is-online { background: #34c759; box-shadow: none !important; }
.lh-agent-persona-name { font-size: 13.5px; font-weight: 600; color: var(--text); margin-top: 2px; line-height: 17px; }
.lh-agent-persona-status { font-size: 11.5px; font-weight: 500; color: var(--secondary-text); letter-spacing: -0.01em; line-height: 15px; min-height: 15px; }

.lh-agent-thread-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.lh-agent-thread-item { padding: 9px 11px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text); transition: background 140ms ease; }
.lh-agent-thread-item:hover { background: var(--hover); }
.lh-agent-thread-item.is-active { background: var(--surface); font-weight: 500; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04); }
.lh-agent-thread-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 7px; }
@keyframes lhRunDotPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.lh-thread-running-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; animation: lhRunDotPulse 1.2s infinite ease-in-out; }

.lh-agent-stage { position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; background: var(--surface); }
.lh-agent-top-drawer { padding: 0 20px; border-bottom: 0.5px solid rgba(60, 60, 67, 0.06); background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(18px); z-index: 10; flex-shrink: 0; }
.lh-agent-stream { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 28px 136px; display: flex; flex-direction: column; align-items: center; gap: 22px; scroll-behavior: auto; }
.lh-agent-turn { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.lh-agent-user-row { display: flex; justify-content: flex-end; }
.lh-agent-user-bubble { max-width: 78%; background: #f2f3f7; color: var(--text); padding: 11px 16px; border-radius: 20px 20px 4px 20px; font-size: 14.5px; line-height: 21px; word-break: break-word; }
.lh-agent-response-zone { display: flex; flex-direction: column; gap: 10px; padding: 2px 0; background: transparent !important; border: 0 !important; box-shadow: none !important; }

@keyframes lhAgentShimmerLTR { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.agent_working_component { display: inline-flex; align-items: center; gap: 7px; padding: 2px 0; background: transparent !important; border: 0 !important; box-shadow: none !important; outline: 0 !important; color: var(--secondary-text); font-size: 13.5px; font-weight: 500; cursor: pointer; width: fit-content; user-select: none; }
.agent_working_component .awc-icon, .agent_working_component .awc-arrow { display: inline-flex; align-items: center; justify-content: center; color: var(--secondary-text); transition: transform 220ms var(--ease-apple), color 160ms ease; }
.agent_working_component.is-expanded .awc-arrow { transform: rotate(90deg); }
.agent_working_component .awc-label { color: var(--secondary-text); transition: color 200ms ease; }
.agent_working_component.is-working .awc-label { background: linear-gradient(90deg, #1c1c1e 0%, #1c1c1e 34%, #ffffff 50%, #1c1c1e 66%, #1c1c1e 100%); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: lhAgentShimmerLTR 1.65s infinite linear; font-weight: 500; }

.lh-agent-collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 260ms var(--ease-apple), opacity 220ms ease; overflow: hidden; }
.lh-agent-collapse.is-open { grid-template-rows: 1fr; opacity: 1; }
.lh-agent-collapse-inner { min-height: 0; overflow: hidden; padding-left: 22px; border-left: 1.5px solid rgba(60, 60, 67, 0.14); margin: 4px 0 6px 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--secondary-text); }

@keyframes lhWaitDotLevitate { 0%, 100% { transform: translateY(3px); opacity: 0.45; } 50% { transform: translateY(-4px); opacity: 1; } }
.lh-agent-waiting-block { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 2px 4px; transition: opacity 180ms ease; }
.lh-agent-waiting-block.is-hidden { display: none !important; }
.lh-wait-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text); display: inline-block; animation: lhWaitDotLevitate 1.15s infinite ease-in-out; }
.lh-wait-dot:nth-child(2) { animation-delay: 0.16s; }
.lh-wait-dot:nth-child(3) { animation-delay: 0.32s; }

.lh-agent-md-output { font-size: 15px; line-height: 1.6; color: var(--text); background: transparent !important; border: 0 !important; }
.lh-agent-md-output > * + * { margin-top: 12px; }
.lh-agent-md-output h1, .lh-agent-md-output h2, .lh-agent-md-output h3, .lh-agent-md-output h4 { font-weight: 600; color: var(--text); margin-top: 16px; margin-bottom: 6px; line-height: 1.3; }
.lh-agent-md-output p { margin: 0 0 10px 0; } .lh-agent-md-output p:last-child { margin-bottom: 0; }
.lh-agent-md-output ul, .lh-agent-md-output ol { margin: 8px 0 12px 0; padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.lh-agent-md-output code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; background: rgba(118, 118, 128, 0.12); padding: 2px 6px; border-radius: 6px; }
.lh-agent-md-output pre { background: #f2f3f7; border: 0.5px solid var(--divider); padding: 12px 14px; border-radius: 12px; overflow-x: auto; margin: 10px 0; }
.lh-agent-tbl-box { margin: 12px 0; border: 0.5px solid rgba(60, 60, 67, 0.28); border-radius: 12px; overflow: hidden; background: #ffffff; }
.lh-agent-md-output table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; margin: 0; }
.lh-agent-md-output th, .lh-agent-md-output td { border-right: 0.5px solid rgba(60, 60, 67, 0.28); border-bottom: 0.5px solid rgba(60, 60, 67, 0.28); padding: 8px 12px; text-align: left; }
.lh-agent-md-output th { background: rgba(0, 122, 255, 0.08); font-weight: 500; }

.lh-agent-composer-wrap { position: absolute; left: 0; right: 0; bottom: 16px; padding: 0 24px; display: flex; justify-content: center; z-index: 25; pointer-events: none; }
.lh-agent-composer-box { pointer-events: auto; width: 100%; max-width: 760px; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(26px) saturate(185%); border: 0.5px solid rgba(60, 60, 67, 0.14); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07); padding: 6px 6px 6px 14px; border-radius: 26px; max-height: 52px; overflow: hidden; transition: max-height 360ms var(--ease-apple), padding 280ms var(--ease-apple), border-radius 280ms var(--ease-apple); }
.lh-agent-input-row { display: flex; align-items: center; gap: 6px; width: 100%; max-height: 40px; opacity: 1; }
.lh-agent-composer-inp { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14.5px; color: var(--text); height: 36px; }
.lh-agent-send-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--primary); color: #ffffff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; box-shadow: none !important; transition: transform 140ms var(--ease-apple), background 140ms ease; }
.lh-agent-send-btn:hover { background: var(--primary-hover); }
.lh-agent-send-btn:active { transform: scale(0.92); }
.lh-mascot-lab-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; gap: 14px; background: var(--canvas); border-radius: 20px; overflow: visible; }
.lh-mascot-lab-preview { width: 148px; height: 148px; overflow: visible; }
