/* Квант — панель агента поддержки. Кнопка внизу справа, панель над ней. */
.kbot { position: fixed; right: 24px; bottom: 24px; z-index: 2; /* под канвасом персонажей (3): Квант стоит на кнопке */ display: grid; justify-items: end; gap: 12px; font-family: var(--cyr); }
.kbot__fab { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px 0 16px; background: var(--black); color: var(--paper); border: 1px solid var(--graphite); font: 500 15px/1 var(--cyr); cursor: pointer; box-shadow: 0 12px 40px rgba(0,0,0,.35); transition: background-color var(--t2) var(--ease), transform var(--t2) var(--ease); }
.kbot__fab:hover { background: var(--deep); transform: translateY(-1px); }
.kbot__fab .dot { box-shadow: 0 0 10px var(--blue); animation: kbot-pulse 2.4s ease-in-out infinite; }
@keyframes kbot-pulse { 50% { opacity: .35; } }
.kbot__fab-stand { width: 44px; height: 48px; margin-left: -10px; } /* якорь персонажа: он стоит на кнопке */
.kbot__win { display: none; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100svh - 110px)); grid-template-rows: auto 1fr auto auto; background: var(--white); color: var(--black); border: 1px solid var(--line-l); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); transform-origin: bottom right; }
.kbot.open .kbot__win { display: grid; animation: kbot-in .32s var(--ease) both; }
@keyframes kbot-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.kbot__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--black); color: var(--paper); }
.kbot__head b { font-weight: 600; font-size: 15px; }
.kbot__head small { display: block; color: var(--silver); font-size: 12px; }
.kbot__x { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; color: var(--silver); font-size: 22px; line-height: 1; }
.kbot__x:hover { color: var(--paper); }
.kbot__log { overflow-y: auto; padding: 16px; display: grid; gap: 10px; align-content: start; list-style: none; margin: 0; }
.kbot__m { max-width: 86%; padding: 10px 14px; font-size: 15px; line-height: 1.45; animation: kbot-in .3s var(--ease) both; }
.kbot__m--bot { justify-self: start; background: var(--paper); border: 1px solid var(--line-l); }
.kbot__m--me { justify-self: end; background: var(--black); color: var(--paper); }
.kbot__m a { color: var(--blue-t); }
.kbot__dots { display: inline-flex; gap: 4px; height: 12px; align-items: center; }
.kbot__dots b { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-l); animation: kbot-dot 1.2s infinite; }
.kbot__dots b:nth-child(2) { animation-delay: .2s; } .kbot__dots b:nth-child(3) { animation-delay: .4s; }
@keyframes kbot-dot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.kbot__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.kbot__chips button { font: 500 13px/1 var(--cyr); padding: 8px 12px; border: 1px solid var(--line-l); color: var(--black); background: var(--white); cursor: pointer; transition: background-color var(--t1), border-color var(--t1); }
.kbot__chips button:hover { background: var(--paper); border-color: var(--black); }
.kbot__form { display: flex; border-top: 1px solid var(--line-l); }
.kbot__form input { flex: 1; min-width: 0; border: 0; padding: 14px 16px; font: 400 15px/1.3 var(--cyr); color: var(--black); background: transparent; outline: none; }
.kbot__form button { width: 48px; display: grid; place-items: center; color: var(--black); font-family: var(--latin); font-size: 18px; cursor: pointer; }
.kbot__form button:hover { background: var(--paper); }
@media (max-width: 700px) { .kbot { right: 12px; bottom: 12px; } .kbot__fab { height: 44px; } }
/* телефон: кнопка без текста, чтобы не ложиться на содержание */
@media (max-width: 700px) { .kbot__fab { padding: 0 14px 0 12px; gap: 8px; font-size: 0; } .kbot__fab .dot { font-size: 0; } .kbot__fab::after { content: "Квант"; font-size: 14px; } .kbot__fab-stand { width: 40px; } }
