/* Чат «Рентгена»: кнопка в углу и панель разговора */
.cht { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 2147482000; font-family: var(--text, Onest, system-ui, sans-serif); }
body:has(.adm) .cht { bottom: 68px; }
.cht__open { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; background: var(--y, #FFD400); color: var(--y-ink, #0D0D0D); font-weight: 700; font-size: 1rem; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .6); transition: translate .3s var(--ease, ease); }
.cht__open:hover { translate: 0 -2px; }
.cht__dot { width: 10px; height: 10px; border-radius: 50%; background: #1F9D55; box-shadow: 0 0 0 3px rgba(31, 157, 85, .25); }
.cht.is-open .cht__open { display: none; }
.cht__panel { display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 100px)); border-radius: 22px; overflow: hidden; background: #151515; border: 1px solid #2E2E2B; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); color: #F5F5F0; }
.cht__panel[hidden] { display: none; }
.cht__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--y, #FFD400); color: #0D0D0D; }
.cht__head b { display: block; font-size: 1rem; }
.cht__head small { font-size: .8125rem; opacity: .75; }
.cht__x { width: 40px; height: 40px; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: #0D0D0D; }
.cht__x:hover { background: rgba(13, 13, 13, .1); }
.cht__log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; scrollbar-width: thin; }
.cht__m { max-width: 86%; }
.cht__m p { padding: 10px 14px; border-radius: 16px; font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.cht__m small { display: block; margin: 0 0 4px 4px; font-size: .75rem; color: #B9B9B1; }
.cht__m a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cht__m.is-a p { background: #232320; border-bottom-left-radius: 4px; }
.cht__m.is-o p { background: #17170F; border: 1px solid #6A5A00; border-bottom-left-radius: 4px; }
.cht__m.is-u { align-self: flex-end; }
.cht__m.is-u p { background: var(--y, #FFD400); color: #0D0D0D; border-bottom-right-radius: 4px; }
.cht__m.is-wait p { display: flex; gap: 4px; padding: 14px; }
.cht__m.is-wait i { width: 7px; height: 7px; border-radius: 50%; background: #B9B9B1; animation: cht-dot 1s infinite ease-in-out; }
.cht__m.is-wait i:nth-child(2) { animation-delay: .15s; } .cht__m.is-wait i:nth-child(3) { animation-delay: .3s; }
@keyframes cht-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.cht__quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.cht__quick:empty { display: none; }
.cht__quick button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #55554F; font-size: .8125rem; font-weight: 600; color: #F5F5F0; }
.cht__quick button:hover { border-color: var(--y, #FFD400); color: var(--y, #FFD400); }
.cht__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid #2E2E2B; }
.cht__form textarea { flex: 1; min-height: 44px; max-height: 120px; padding: 11px 14px; border-radius: 14px; border: 1px solid #2E2E2B; background: #0D0D0D; color: #F5F5F0; font: 400 .9375rem/1.4 inherit; resize: none; }
.cht__form textarea:focus { outline: none; border-color: var(--y, #FFD400); }
.cht__form button { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--y, #FFD400); color: #0D0D0D; }
.cht__form button:disabled { opacity: .5; }
.cht__form svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media print { .cht { display: none; } }
@media (prefers-reduced-motion: reduce) { .cht__m.is-wait i { animation: none; } }
