.c-launcher, .c-panel, .c-msg, .c-input, .c-btn { border: 1px solid var(--line); }
.c-launcher, .c-panel { position: fixed; inset-inline-end: calc(18px + env(safe-area-inset-right, 0px)); color: var(--bone); box-shadow: 0 10px 30px var(--shadow); }
:root[dir="rtl"] .c-launcher, :root[dir="rtl"] .c-panel, [dir="rtl"] .c-launcher, [dir="rtl"] .c-panel { inset-inline-end: calc(18px + env(safe-area-inset-left, 0px)); }
.c-launcher { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; min-width: 48px; min-height: 48px; padding: 0; border-radius: 50%; background: var(--card); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease; }
.c-launcher:hover { background: var(--card-2); }
.c-launcher.c-fab-hidden { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(16px); }
.c-launcher span { display: none; }
@media (min-width: 768px) {
  .c-launcher { width: auto; height: auto; min-width: 48px; min-height: 48px; padding: 12px 18px; border-radius: 999px; gap: 8px; }
  .c-launcher span { display: inline; }
}
[hidden], .c-launcher[hidden], .c-panel[hidden] { display: none !important; }
:is(.c-launcher, .c-btn, .c-send) { cursor: pointer; }
:is(.c-launcher, .c-btn):hover, .c-input:focus { border-color: var(--acc-b); }
:is(.c-btn, .c-wa):hover { color: var(--bone); }
.c-btn { min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: transparent; color: var(--muted); padding: 4px 8px; font: inherit; font-size: .78rem; }
:is(.c-input, .c-btn, .c-send, .c-launcher):focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.c-head, .c-bar, .c-foot { padding: 8px 12px; border: solid var(--line); border-width: 1px 0 0; }
.c-head, .c-bar { background: var(--card); }
.c-head { display: flex; align-items: center; justify-content: space-between; border-width: 0 0 1px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
.c-title { margin: 0; font-size: .95rem; }
.c-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wa); display: inline-block; margin-inline-end: 6px; }
.c-acts { display: flex; gap: 4px; }
.c-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; font-size: .88rem; }
.c-msg { max-width: 86%; padding: 8px 12px; border-radius: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.c-msg a { color: var(--acc-a); }
.c-u { align-self: flex-end; background: var(--card-2); border-end-end-radius: 2px; }
.c-a { align-self: flex-start; background: var(--card); border-end-start-radius: 2px; }
.c-scope { border-color: var(--acc-b); }
.c-msg.err { border-color: var(--f2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.c-msg.warn { border-color: var(--gold); text-align: center; }
.c-dots { display: inline-flex; gap: 4px; padding: 4px; }
.c-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: cb 1s infinite; }
.c-dots i+i { animation-delay: .2s; }
.c-dots i+i+i { animation-delay: .4s; }
@keyframes cb { 50% { opacity: .2; } }
.c-turnstile { display: flex; justify-content: center; padding: 0 12px; }
.c-turnstile:empty { display: none; }
.c-bar { display: flex; align-items: flex-end; gap: 8px; }
.c-input { flex: 1; min-height: 44px; max-height: 110px; padding: 8px 12px; background: var(--ground); color: var(--bone); border-radius: 12px; font: inherit; outline: 0; resize: none; field-sizing: content; }
.c-send { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; }
.c-send:hover:not(:disabled) { background: var(--gold-hi); }
:is(.c-input, .c-send):disabled { opacity: .4; cursor: not-allowed; }
.c-send svg { width: 18px; height: 18px; }
:dir(rtl) .c-send svg, [dir="rtl"] .c-send svg { transform: scaleX(-1); }
.c-foot { background: var(--ground); text-align: center; font-size: .78rem; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
.c-wa { color: var(--muted); text-decoration: none; }
.num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
:dir(rtl) .num, [dir="rtl"] .num { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 767px) {
  .c-panel { position: fixed; inset: 0; width: 100%; width: 100vw; height: 100%; height: 100dvh; max-height: 100dvh; z-index: 50; display: flex; flex-direction: column; background: var(--ground); border: 0; border-radius: 0; overflow: hidden; }
}
@media (min-width: 768px) {
  .c-panel { position: fixed; inset-inline-end: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 50; display: flex; flex-direction: column; width: min(380px, 100vw - 32px); height: min(560px, 70vh); max-height: calc(100vh - 36px); background: var(--ground); border-radius: var(--r); border: 1px solid var(--line); box-shadow: 0 10px 30px var(--shadow); overflow: hidden; }
  :root[dir="rtl"] .c-panel, [dir="rtl"] .c-panel { inset-inline-end: calc(18px + env(safe-area-inset-left, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .c-launcher, .c-panel, .c-dots i { animation: none !important; transition: none !important; }
  .c-launcher.c-fab-hidden { transform: none !important; }
}
