.arc-root {
  --arc-accent: #2563eb;
  box-sizing: border-box;
  color: #172033;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  z-index: 999999;
}
.arc-root *, .arc-root *::before, .arc-root *::after { box-sizing: inherit; }
.arc-root [hidden] { display: none !important; }
.arc-floating { position: fixed; bottom: 22px; }
.arc-floating.arc-right { right: 22px; }
.arc-floating.arc-left { left: 22px; }
.arc-launcher {
  position: relative;
  width: 58px; height: 58px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--arc-accent); color: #fff; font-size: 25px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .25);
}
.arc-launcher i {
  position: absolute; top: 2px; right: 2px; width: 13px; height: 13px;
  border: 2px solid #fff; border-radius: 50%; background: #22c55e;
}
.arc-panel {
  width: min(360px, calc(100vw - 32px)); overflow: hidden; border: 1px solid #e5e7eb;
  border-radius: 16px; background: #fff; box-shadow: 0 18px 45px rgba(15, 23, 42, .22);
}
.arc-inline .arc-panel { width: 100%; max-width: 620px; box-shadow: 0 8px 24px rgba(15, 23, 42, .10); }
.arc-header {
  display: flex; min-height: 56px; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--arc-accent); color: #fff;
}
.arc-identity { display: flex; min-width: 0; align-items: center; gap: 10px; }
.arc-identity > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.arc-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-identity small { display: flex; align-items: center; gap: 5px; opacity: .9; font-size: 11px; }
.arc-identity small i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
.arc-avatar {
  display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center;
  border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(255,255,255,.17);
  font-size: 11px; font-weight: 800;
}
.arc-header-actions { display: flex; align-items: center; gap: 2px; }
.arc-close, .arc-restart {
  display: grid; width: 38px; height: 38px; place-items: center; border: 0;
  border-radius: 50%; background: transparent; color: #fff; cursor: pointer; line-height: 1;
}
.arc-close { font-size: 28px; }
.arc-restart { font-size: 22px; }
.arc-close:hover, .arc-restart:hover { background: rgba(255,255,255,.15); }
.arc-messages {
  display: flex; height: 330px; flex-direction: column; gap: 10px;
  overflow-y: auto; padding: 16px; background: #f8fafc;
}
.arc-row { display: flex; max-width: 88%; flex-direction: column; gap: 3px; }
.arc-bot-row { align-self: flex-start; }
.arc-user-row { align-self: flex-end; align-items: flex-end; }
.arc-row time { padding: 0 4px; color: #94a3b8; font-size: 10px; }
.arc-message { max-width: 100%; padding: 10px 12px; border-radius: 13px; overflow-wrap: anywhere; }
.arc-bot { align-self: flex-start; border: 1px solid #e5e7eb; background: #fff; }
.arc-user { align-self: flex-end; background: var(--arc-accent); color: #fff; }
.arc-message a { color: inherit; font-weight: 600; text-decoration: underline; }
.arc-suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 12px 0; background: #fff; }
.arc-suggestions .arc-action {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  border: 1px solid var(--arc-accent); border-radius: 999px; padding: 6px 10px;
  background: #fff; color: var(--arc-accent); cursor: pointer; font: inherit; font-size: 13px;
}
.arc-suggestions .arc-action:hover { background: var(--arc-accent); color: #fff; }
.arc-suggestions.arc-muted { pointer-events: none; opacity: .55; }
.arc-form { display: flex; gap: 8px; padding: 12px; background: #fff; }
.arc-form input {
  min-width: 0; flex: 1; border: 1px solid #cbd5e1; border-radius: 10px;
  padding: 10px 12px; color: #172033; background: #fff;
}
.arc-form input:focus { border-color: var(--arc-accent); outline: 2px solid color-mix(in srgb, var(--arc-accent) 22%, transparent); }
.arc-form button {
  border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer;
  background: var(--arc-accent); color: #fff; font-weight: 600;
}
.arc-form button:disabled { cursor: wait; opacity: .65; }
.arc-form button b { display: none; }
.arc-retry {
  align-self: flex-start; margin: 6px 4px 0; border: 1px solid var(--arc-accent);
  border-radius: 999px; padding: 5px 10px; background: #fff; color: var(--arc-accent); cursor: pointer;
}
.arc-typing .arc-message { display: flex; align-items: center; gap: 4px; min-width: 52px; min-height: 38px; }
.arc-typing .arc-message span {
  width: 7px; height: 7px; border-radius: 50%; background: #94a3b8;
  animation: arc-bounce 1.2s infinite ease-in-out;
}
.arc-typing .arc-message span:nth-child(2) { animation-delay: .15s; }
.arc-typing .arc-message span:nth-child(3) { animation-delay: .3s; }
@keyframes arc-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .55; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .arc-typing .arc-message span { animation: none; }
}
.arc-privacy { display: block; padding: 0 12px 10px; color: #64748b; background: #fff; font-size: 11px; }
@media (max-width: 600px) {
  .arc-floating {
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px !important;
  }
  .arc-floating .arc-panel {
    display: flex;
    width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    flex-direction: column;
    border-radius: 15px;
  }
  .arc-floating .arc-messages {
    height: auto;
    min-height: 180px;
    max-height: none;
    flex: 1 1 auto;
    overscroll-behavior: contain;
  }
  .arc-floating.arc-right .arc-launcher { margin-left: auto; }
  .arc-floating.arc-left .arc-launcher { margin-right: auto; }
  .arc-launcher { width: 60px; height: 60px; }
  .arc-header { flex: 0 0 auto; }
  .arc-close { min-width: 44px; min-height: 44px; }
  .arc-suggestions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .arc-suggestions::-webkit-scrollbar { display: none; }
  .arc-suggestions .arc-action { min-height: 40px; flex: 0 0 auto; padding: 8px 12px; }
  .arc-form { flex: 0 0 auto; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .arc-form input { min-height: 46px; font-size: 16px; }
  .arc-form button { min-width: 68px; min-height: 46px; }
  .arc-form button span { display: none; }
  .arc-form button b { display: inline; font-size: 17px; }
  .arc-privacy { flex: 0 0 auto; }
}
@media (max-width: 600px) and (max-height: 520px) {
  .arc-floating .arc-panel { max-height: calc(100dvh - 12px); }
  .arc-floating .arc-messages { min-height: 100px; padding: 10px; }
  .arc-header { min-height: 48px; padding: 8px 12px; }
}
