:root {
  --sbvc-night: #17324d;
  --sbvc-night-soft: #294963;
  --sbvc-moon: #fff8e8;
  --sbvc-cream: #fffaf5;
  --sbvc-coral: #de7286;
  --sbvc-peach: #f2a884;
  --sbvc-sage: #6d9383;
  --sbvc-ink: #273746;
  --sbvc-muted: #6d7882;
  --sbvc-line: rgba(23, 50, 77, .13);
}

.sbvc-root, .sbvc-root * { box-sizing: border-box; }
.sbvc-root { position: fixed; z-index: 2147483000; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); font-family: ui-rounded, "Nunito Sans", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--sbvc-ink); line-height: 1.4; }
.sbvc-root.sbvc-position-left { right: auto; left: max(18px, env(safe-area-inset-left)); }
.sbvc-root button, .sbvc-root input, .sbvc-root textarea { font: inherit; }

.sbvc-launcher { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 8px 16px 8px 8px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: linear-gradient(135deg, var(--sbvc-night), #254f68); color: #fff; box-shadow: 0 14px 38px rgba(23,50,77,.25), inset 0 1px 0 rgba(255,255,255,.16); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.sbvc-launcher:hover { transform: translateY(-2px); box-shadow: 0 17px 44px rgba(23,50,77,.3), inset 0 1px 0 rgba(255,255,255,.18); }
.sbvc-launcher:focus-visible, .sbvc-panel button:focus-visible, .sbvc-panel input:focus-visible, .sbvc-panel textarea:focus-visible, .sbvc-panel a:focus-visible { outline: 3px solid #ffd58e; outline-offset: 2px; }
.sbvc-launcher-orbit { position: relative; display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: rgba(255,248,232,.13); color: var(--sbvc-moon); font-size: 25px; }
.sbvc-launcher-orbit b { position: absolute; right: 5px; top: 2px; font-size: 10px; color: #ffd58e; }
.sbvc-launcher-copy { display: grid; text-align: left; white-space: nowrap; }
.sbvc-launcher-copy strong { font-size: 14px; font-weight: 850; letter-spacing: .01em; }
.sbvc-launcher-copy small { color: rgba(255,255,255,.75); font-size: 10px; font-weight: 700; }
.sbvc-unread { display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; margin-left: 1px; border: 2px solid #fff; border-radius: 999px; background: var(--sbvc-coral); color: #fff; font-size: 11px; font-weight: 900; }

.sbvc-panel { position: absolute; right: 0; bottom: 72px; display: flex; flex-direction: column; width: min(390px, calc(100vw - 24px)); height: min(660px, calc(100vh - 108px)); overflow: hidden; border: 1px solid rgba(23,50,77,.12); border-radius: 26px; background: var(--sbvc-cream); box-shadow: 0 28px 80px rgba(23,50,77,.27); opacity: 0; transform: translateY(12px) scale(.98); transform-origin: bottom right; transition: opacity .18s ease, transform .18s ease; }
.sbvc-position-left .sbvc-panel { right: auto; left: 0; transform-origin: bottom left; }
.sbvc-panel.is-open { opacity: 1; transform: translateY(0) scale(1); }
.sbvc-panel-header { position: relative; display: flex; align-items: center; gap: 11px; min-height: 74px; padding: 14px 17px; background: radial-gradient(circle at 82% 12%, rgba(255,213,142,.26), transparent 26%), linear-gradient(135deg, var(--sbvc-night), #254f68); color: #fff; }
.sbvc-panel-header:after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 14px; background: var(--sbvc-cream); border-radius: 50% 50% 0 0 / 55% 55% 0 0; }
.sbvc-brand-mark { position: relative; display: grid; place-items: center; width: 43px; height: 43px; border-radius: 15px; background: rgba(255,255,255,.12); color: var(--sbvc-moon); font-size: 27px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.sbvc-brand-mark span { position: absolute; right: 6px; top: 3px; color: #ffd58e; font-size: 9px; }
.sbvc-panel-header > div:nth-child(2) { display: grid; gap: 2px; }
.sbvc-panel-header strong { font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.sbvc-live-line { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(255,255,255,.78); }
.sbvc-live-line em { font-style: normal; }
.sbvc-live-line i { width: 8px; height: 8px; border-radius: 50%; background: #f2a884; box-shadow: 0 0 0 3px rgba(242,168,132,.16); }
.sbvc-live-line i.is-ai, .sbvc-live-line i.is-team { background: #9fd7bd; box-shadow: 0 0 0 3px rgba(159,215,189,.17); }
.sbvc-close { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.sbvc-close:hover { background: rgba(255,255,255,.18); }

.sbvc-mode-note { margin: 13px 15px 5px; padding: 11px 13px; border: 1px solid rgba(222,114,134,.2); border-radius: 16px; background: #fff2f1; color: #62434b; font-family: Georgia, "Times New Roman", serif; font-size: 13px; line-height: 1.45; }
.sbvc-mode-note.is-offline { background: #fff6e9; border-color: rgba(216,153,78,.25); color: #644c34; }
.sbvc-messages { flex: 1 1 auto; min-height: 110px; overflow-y: auto; overscroll-behavior: contain; padding: 10px 15px 8px; scrollbar-width: thin; scrollbar-color: rgba(23,50,77,.22) transparent; }
.sbvc-message { display: grid; justify-items: start; margin: 10px 0; }
.sbvc-message.is-visitor { justify-items: end; }
.sbvc-message-label { margin: 0 6px 3px; color: var(--sbvc-muted); font-size: 10px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.sbvc-bubble { max-width: 88%; padding: 10px 13px; border: 1px solid var(--sbvc-line); border-radius: 17px 17px 17px 5px; background: #fff; color: var(--sbvc-ink); font-size: 13px; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 3px 12px rgba(23,50,77,.05); }
.sbvc-message.is-visitor .sbvc-bubble { border-color: transparent; border-radius: 17px 17px 5px 17px; background: var(--sbvc-night-soft); color: #fff; }
.sbvc-message.is-system .sbvc-bubble { border-color: rgba(216,153,78,.24); background: #fff6e9; }
.sbvc-message time { margin: 3px 6px 0; color: #98a0a8; font-size: 9px; }
.sbvc-typing { display: flex; align-items: center; gap: 4px; padding: 3px 20px 9px; color: var(--sbvc-muted); }
.sbvc-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--sbvc-sage); animation: sbvc-dot 1.1s infinite ease-in-out; }
.sbvc-typing span:nth-child(2) { animation-delay: .14s; }
.sbvc-typing span:nth-child(3) { animation-delay: .28s; }
.sbvc-typing em { margin-left: 4px; font-size: 10px; font-style: normal; }

.sbvc-form { flex: 0 0 auto; margin: 0 12px; padding: 11px; border: 1px solid var(--sbvc-line); border-radius: 19px; background: #fff; box-shadow: 0 8px 25px rgba(23,50,77,.08); }
.sbvc-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.sbvc-profile[hidden] { display: none; }
.sbvc-profile label { display: grid; gap: 4px; }
.sbvc-profile label > span { color: var(--sbvc-muted); font-size: 10px; font-weight: 800; }
.sbvc-profile small { font-weight: 600; }
.sbvc-profile input { width: 100%; min-width: 0; height: 36px; padding: 7px 9px; border: 1px solid var(--sbvc-line); border-radius: 10px; background: #fffdfb; color: var(--sbvc-ink); font-size: 12px; }
.sbvc-message-field textarea { display: block; width: 100%; min-height: 66px; max-height: 130px; resize: vertical; padding: 5px 4px; border: 0; outline: 0; background: transparent; color: var(--sbvc-ink); font-size: 13px; line-height: 1.45; }
.sbvc-message-field textarea::placeholder { color: #9aa2aa; }
.sbvc-compose-row { display: flex; align-items: center; min-height: 34px; border-top: 1px solid rgba(23,50,77,.08); padding-top: 7px; }
.sbvc-counter { margin-right: auto; color: var(--sbvc-muted); font-size: 10px; }
.sbvc-counter.is-low { color: #ad4d5e; font-weight: 800; }
.sbvc-compose-row button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 12px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--sbvc-coral), #c95e76); color: #fff; font-size: 12px; font-weight: 850; cursor: pointer; box-shadow: 0 5px 13px rgba(222,114,134,.22); }
.sbvc-compose-row button:disabled { opacity: .65; cursor: wait; }
.sbvc-compose-row button i { font-style: normal; font-size: 15px; }
.sbvc-error { margin: 8px 0 0; padding: 7px 9px; border-radius: 10px; background: #fff0ef; color: #984858; font-size: 11px; }
.sbvc-honeypot { position: absolute!important; left: -10000px!important; width: 1px!important; height: 1px!important; opacity: 0!important; }
.sbvc-privacy { padding: 8px 15px 11px; color: #7d858d; font-size: 9px; line-height: 1.42; }
.sbvc-privacy a { color: var(--sbvc-night-soft); font-weight: 800; }

@keyframes sbvc-dot { 0%, 70%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-3px); opacity: 1; } }

@media (max-width: 520px) {
  .sbvc-root { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .sbvc-root.sbvc-position-left { left: 12px; right: auto; }
  .sbvc-panel { position: fixed; left: 8px!important; right: 8px!important; bottom: max(82px, calc(env(safe-area-inset-bottom) + 74px)); width: auto; height: min(680px, calc(100dvh - 96px)); border-radius: 23px; }
  .sbvc-launcher-copy small { display: none; }
  .sbvc-launcher { min-height: 54px; }
  .sbvc-launcher-orbit { width: 38px; height: 38px; flex-basis: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .sbvc-panel, .sbvc-launcher { transition: none; }
  .sbvc-typing span { animation: none; }
}

@media print { .sbvc-root { display: none!important; } }

